@atlaskit/editor-plugin-date 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 0.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43694](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43694) [`fa3d07e4692`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa3d07e4692) - [ux] [ED-20697] Fix issue where dates with dashes were being incorrectly marked as invalid
|
|
8
|
+
|
|
3
9
|
## 0.2.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -75,7 +75,7 @@ function isDatePossiblyValid(date) {
|
|
|
75
75
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
76
76
|
var c = _step.value;
|
|
77
77
|
var isNumber = c >= '0' && c <= '9';
|
|
78
|
-
var isValidPunctuation = '.
|
|
78
|
+
var isValidPunctuation = '. ,/-'.indexOf(c) !== -1;
|
|
79
79
|
if (!(isNumber || isValidPunctuation)) {
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
@@ -57,7 +57,7 @@ function isCursorInLastDateSegment(cursorPos, date) {
|
|
|
57
57
|
export function isDatePossiblyValid(date) {
|
|
58
58
|
for (const c of date) {
|
|
59
59
|
const isNumber = c >= '0' && c <= '9';
|
|
60
|
-
const isValidPunctuation = '.
|
|
60
|
+
const isValidPunctuation = '. ,/-'.indexOf(c) !== -1;
|
|
61
61
|
if (!(isNumber || isValidPunctuation)) {
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
@@ -64,7 +64,7 @@ export function isDatePossiblyValid(date) {
|
|
|
64
64
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
65
65
|
var c = _step.value;
|
|
66
66
|
var isNumber = c >= '0' && c <= '9';
|
|
67
|
-
var isValidPunctuation = '.
|
|
67
|
+
var isValidPunctuation = '. ,/-'.indexOf(c) !== -1;
|
|
68
68
|
if (!(isNumber || isValidPunctuation)) {
|
|
69
69
|
return false;
|
|
70
70
|
}
|
package/dist/types/actions.d.ts
CHANGED
|
@@ -19,10 +19,10 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
|
|
|
19
19
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
20
20
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
21
21
|
};
|
|
22
|
-
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
22
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
23
23
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
24
24
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
25
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
25
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
26
26
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
27
27
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
28
28
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
@@ -39,10 +39,10 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
|
|
|
39
39
|
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
40
40
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
41
41
|
};
|
|
42
|
-
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
42
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
43
43
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
44
44
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
45
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
45
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
46
46
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
47
47
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
48
48
|
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
@@ -22,10 +22,10 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
|
|
|
22
22
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
23
23
|
};
|
|
24
24
|
dependencies: [
|
|
25
|
-
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
25
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
26
26
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
27
27
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
28
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
28
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
29
29
|
];
|
|
30
30
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
31
31
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>,
|
|
@@ -47,10 +47,10 @@ export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi,
|
|
|
47
47
|
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
48
48
|
};
|
|
49
49
|
dependencies: [
|
|
50
|
-
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
50
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
51
51
|
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
52
52
|
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
53
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags
|
|
53
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
54
54
|
];
|
|
55
55
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
56
56
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>,
|