Skip to content

Commit

Permalink
7.0.0 (#100)
Browse files Browse the repository at this point in the history
* Cleanup

* Update logo

* Set main view colour to system background

* Add basic SwiftUI support

* Update package revision

* Wire up isEditing binding

* Manage first responder

* Update deps

* Add onSubmit and onFocus accessory methods

* Manage first responder, p.2

* Incorporate env attributes

* Cleanup

* Add PhoneInputListener

* Update CHANGELOG

* Add a basic UI test

* Prepare for SPI

* Update docs & cleanup

* Compute tail placeholder

* Make a custom UITextField background

* Update CHANGELOG, cleanup

---------

Co-authored-by: Jeorge Taflanidi <jeorge.morpheus@icloud.com>
  • Loading branch information
taflanidi and Jeorge Taflanidi committed Mar 30, 2023
1 parent 40e33ad commit fbb17f6
Show file tree
Hide file tree
Showing 42 changed files with 3,089 additions and 306 deletions.
5 changes: 5 additions & 0 deletions .spi.yml
@@ -0,0 +1,5 @@
version: 1
builder:
configs:
- documentation_targets: [InputMask]
platform: ios
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/InputMask.xcscheme
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InputMask"
BuildableName = "InputMask"
BlueprintName = "InputMask"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InputMaskTests"
BuildableName = "InputMaskTests"
BlueprintName = "InputMaskTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InputMaskTests"
BuildableName = "InputMaskTests"
BlueprintName = "InputMaskTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InputMask"
BuildableName = "InputMask"
BlueprintName = "InputMask"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
72 changes: 46 additions & 26 deletions CHANGELOG.md
@@ -1,43 +1,63 @@
# Changelog
# 𝌡Changelog

### `6.1.0`
## 7.0.0

##### Added:
**⤵️ Added:**

* iOS suggestions support
* New logo :D
* New README :D
* A basic UI test in the **Sample** project for the date/phone fields
* `"".extractDigits()`: a helper method to extract digits from a `String`
* `"".boxSizeWithFont(font)`: a helper method to calculate a rectangle size for a `String`
* Text listener callbacks now return a `tailPlaceholder` for the value to be completed
* `Country`: a model object representing a country with phone formatting, ISO codes & emojis
* `Country.all`: a dictionary of known countries
* `MaskedTextField`: a SwiftUI `TextField` with an attached mask
* A SwiftUI sample project
* `PhoneInputListener`: a `MaskedTextInputListener` allowing to enter a phone number of any known country

### `6.0.0`
**⤴️ Removed:**

#### Removed:
* `UITextField.cursorPosition`: please use a `UITextInput.caretPosition` property instead
* `UITextView.cursorPosition`: please use a `UITextInput.caretPosition` property instead

* `Mask::apply()`, the `autocomplete` flag
**🔄 Modified:**

This flag is now a part of the `CaretGravity.forward` enum case.
* `swift-tools-version``5.7.1`
* Pod platform → `16.1`

#### Added:
## 6.1.0

* `CaretGravity.forward`, the `autocomplete` flag
* `CaretGravity.backward`, the [`autoskip`](https://github.com/RedMadRobot/input-mask-ios/wiki/0.-Mask#autoskip-flag) flag
**⤵️ Added:**

* iOS text suggestions support (see [`UITextContentType`](https://developer.apple.com/documentation/uikit/uitextcontenttype))

## 6.0.0

### `5.0.0`
**⤴️ Removed:**

#### Removed:
* `Mask::apply()`, the `autocomplete` flag (this flag is now a part of the `CaretGravity.forward` enum case)

**⤵️ Added:**

* `CaretGravity.forward`, the `autocomplete` flag
* `CaretGravity.backward`, the [`autoskip`](https://github.com/RedMadRobot/input-mask-ios/wiki/0.-Mask#autoskip-flag) flag

* `CaretStringIterator::beforeCaret()`
## 5.0.0

This method is now replaced with `::insertionAffectsCaret()` and `::deletionAffectsCaret()` calls.
**⤴️ Removed:**

* `::deleteText()` and `::modifyText()` in `MaskedTextFieldDelegate`, `MaskedTextInputListener` and `MaskedTextViewDelegate`
* `CaretStringIterator::beforeCaret()` (this method is now replaced with `::insertionAffectsCaret()` and `::deletionAffectsCaret()` calls)

These methods had been refactored and merged.
* `::deleteText()` and `::modifyText()` in `MaskedTextFieldDelegate`, `MaskedTextInputListener` and `MaskedTextViewDelegate` (these methods had been refactored and merged)

Please, consider overriding corresponding
`textField(:shouldChangeCharactersIn:replacementString:)`
`textInput(:isChangingCharactersIn:replacementString:)` or
`textView(:shouldChangeTextIn:replacementText:)`
instead.

#### Added:
**⤵️ Added:**

* `CaretString` instances now contain caret gravity.

Expand All @@ -49,30 +69,30 @@ Default `CaretGravity` is `.forward`. Set caret gravity to `.backward` only when

These methods allow to incorporate new caret gravity setting. `RTLCaretStringIterator` had also been rewritten to reflect these changes.

#### Modified:
**🔄 Modified:**

* [Atomic cursor movement](https://github.com/RedMadRobot/input-mask-ios/wiki/2.-Text-Field-Listener#atomic-cursor-movement-an-ugly-workaround-property) is now turned off by default.

### `4.3.0`
## 4.3.0

#### Added:
**⤵️ Added:**

* `AffinityCalculationStrategy.extractedValueCapacity` option allowing to have radically different mask format depending on the extracted value length

### `4.2.0`
## 4.2.0

#### Added:
**⤵️ Added:**

* `AffinityCalculationStrategy.capacity` option allowing to have radically different mask format depending on the input length

### `4.1.0`
## 4.1.0

#### Added:
**⤵️ Added:**

* `Mask.isValid(format:customNotations:)` method for format checks
* `MaskedTextFieldDelegate.atomicCursorMovement` and `MaskedTextInputListener.atomicCaretMovement` properties in order to address issue [#32](https://github.com/RedMadRobot/input-mask-ios/issues/32)

#### Fixed:
**↩️ Fixed:**

* Optional blocks of symbols are now ignored when extracted value completeness is calculated
* `textFieldDidEndEditing` delegate method not called
Expand Down
Binary file added Documentation/Assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation/Assets/logo.xcf
Binary file not shown.
4 changes: 2 additions & 2 deletions InputMask.podspec
@@ -1,13 +1,13 @@
Pod::Spec.new do |spec|
spec.name = "InputMask"
spec.version = "6.1.0"
spec.version = "7.0.0"
spec.summary = "InputMask"
spec.description = "User input masking library."
spec.homepage = "https://github.com/RedMadRobot/input-mask-ios"
spec.license = "MIT"
spec.author = { "Egor Taflanidi" => "et@redmadrobot.com" }
spec.source = { :git => "https://github.com/RedMadRobot/input-mask-ios.git", :tag => spec.version.to_s }
spec.platform = :ios, "8.0"
spec.platform = :ios, "16.1"
spec.requires_arc = true
spec.source_files = "Source/InputMask/InputMask/Classes/**/*"
end
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Redmadrobot
Copyright (c) 2023 YEHOR TAFLANIDI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:4.1
// swift-tools-version: 5.7.1

import PackageDescription

Expand Down

0 comments on commit fbb17f6

Please sign in to comment.