@atlaskit/editor-plugin-date 5.1.3 → 5.1.5
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
package/dist/cjs/datePlugin.js
CHANGED
|
@@ -18,6 +18,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
18
18
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
19
19
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
20
20
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _actions = require("./pm-plugins/actions");
|
|
22
23
|
var _commands = require("./pm-plugins/commands");
|
|
23
24
|
var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
@@ -143,7 +144,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
143
144
|
nodes: function nodes() {
|
|
144
145
|
return [{
|
|
145
146
|
name: 'date',
|
|
146
|
-
node: _adfSchema.date
|
|
147
|
+
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.dateWithLocalId : _adfSchema.date
|
|
147
148
|
}];
|
|
148
149
|
},
|
|
149
150
|
pmPlugins: function pmPlugins() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
-
import { date } from '@atlaskit/adf-schema';
|
|
3
|
+
import { date, dateWithLocalId } from '@atlaskit/adf-schema';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -10,6 +10,7 @@ import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
10
10
|
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { closeDatePicker, closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
|
|
14
15
|
import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
|
|
15
16
|
import keymap from './pm-plugins/keymap';
|
|
@@ -133,7 +134,7 @@ const datePlugin = ({
|
|
|
133
134
|
nodes() {
|
|
134
135
|
return [{
|
|
135
136
|
name: 'date',
|
|
136
|
-
node: date
|
|
137
|
+
node: fg('platform_editor_adf_with_localid') ? dateWithLocalId : date
|
|
137
138
|
}];
|
|
138
139
|
},
|
|
139
140
|
pmPlugins() {
|
package/dist/esm/datePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
-
import { date } from '@atlaskit/adf-schema';
|
|
3
|
+
import { date, dateWithLocalId } from '@atlaskit/adf-schema';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -10,6 +10,7 @@ import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
10
10
|
import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
12
12
|
import CommentIcon from '@atlaskit/icon/core/comment';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { closeDatePicker as _closeDatePicker, closeDatePickerWithAnalytics as _closeDatePickerWithAnalytics, createDate } from './pm-plugins/actions';
|
|
14
15
|
import { deleteDateCommand, insertDateCommand } from './pm-plugins/commands';
|
|
15
16
|
import keymap from './pm-plugins/keymap';
|
|
@@ -132,7 +133,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
132
133
|
nodes: function nodes() {
|
|
133
134
|
return [{
|
|
134
135
|
name: 'date',
|
|
135
|
-
node: date
|
|
136
|
+
node: fg('platform_editor_adf_with_localid') ? dateWithLocalId : date
|
|
136
137
|
}];
|
|
137
138
|
},
|
|
138
139
|
pmPlugins: function pmPlugins() {
|
|
@@ -7,47 +7,7 @@ export declare const focusDateInput: () => (state: EditorState, dispatch: Comman
|
|
|
7
7
|
export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
8
8
|
export declare const closeDatePicker: () => Command;
|
|
9
9
|
export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
|
|
10
|
-
date?: DateType
|
|
11
|
-
pluginInjectionApi?:
|
|
12
|
-
pluginConfiguration: import("../types").DatePluginOptions | undefined;
|
|
13
|
-
dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
14
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
15
|
-
sharedState: {
|
|
16
|
-
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
17
|
-
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
18
|
-
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
19
|
-
};
|
|
20
|
-
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
21
|
-
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
22
|
-
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
23
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
24
|
-
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
25
|
-
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
26
|
-
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
27
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginOptions | undefined;
|
|
28
|
-
}, import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"annotation", {
|
|
29
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined;
|
|
30
|
-
sharedState: import("@atlaskit/editor-plugin-annotation").InlineCommentPluginState | undefined;
|
|
31
|
-
dependencies: import("@atlaskit/editor-plugin-annotation").AnnotationPluginDependencies;
|
|
32
|
-
actions: {
|
|
33
|
-
stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: EditorState) => boolean | undefined;
|
|
34
|
-
setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => Command;
|
|
35
|
-
showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => Command;
|
|
36
|
-
hasAnyUnResolvedAnnotationInPage: (state: EditorState) => boolean;
|
|
37
|
-
};
|
|
38
|
-
}, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
39
|
-
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
40
|
-
dependencies: [];
|
|
41
|
-
pluginConfiguration?: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginOptions | undefined;
|
|
42
|
-
commands: {
|
|
43
|
-
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
44
|
-
};
|
|
45
|
-
}, import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginOptions | undefined>>];
|
|
46
|
-
sharedState: import("../types").DatePluginSharedState;
|
|
47
|
-
commands: {
|
|
48
|
-
insertDate: import("../types").InsertDate;
|
|
49
|
-
deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
|
|
50
|
-
};
|
|
51
|
-
}> | undefined;
|
|
10
|
+
date?: DateType;
|
|
11
|
+
pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>;
|
|
52
12
|
}) => Command;
|
|
53
13
|
export declare const openDatePicker: () => Command;
|
|
@@ -7,55 +7,7 @@ export declare const focusDateInput: () => (state: EditorState, dispatch: Comman
|
|
|
7
7
|
export declare const setDatePickerAt: (showDatePickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
8
8
|
export declare const closeDatePicker: () => Command;
|
|
9
9
|
export declare const closeDatePickerWithAnalytics: ({ date, pluginInjectionApi, }: {
|
|
10
|
-
date?: DateType
|
|
11
|
-
pluginInjectionApi?:
|
|
12
|
-
pluginConfiguration: import("../types").DatePluginOptions | undefined;
|
|
13
|
-
dependencies: [
|
|
14
|
-
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
15
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
16
|
-
sharedState: {
|
|
17
|
-
createAnalyticsEvent: import("packages/analytics/analytics-next/dist/types").CreateUIAnalyticsEvent | null;
|
|
18
|
-
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
19
|
-
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
20
|
-
};
|
|
21
|
-
dependencies: [
|
|
22
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
23
|
-
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
24
|
-
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
25
|
-
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
26
|
-
];
|
|
27
|
-
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
28
|
-
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>,
|
|
29
|
-
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorDisabled", {
|
|
30
|
-
sharedState: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginState;
|
|
31
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginOptions | undefined;
|
|
32
|
-
}, import("@atlaskit/editor-plugin-editor-disabled").EditorDisabledPluginOptions | undefined>,
|
|
33
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"annotation", {
|
|
34
|
-
pluginConfiguration: import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined;
|
|
35
|
-
sharedState: import("@atlaskit/editor-plugin-annotation").InlineCommentPluginState | undefined;
|
|
36
|
-
dependencies: import("@atlaskit/editor-plugin-annotation").AnnotationPluginDependencies;
|
|
37
|
-
actions: {
|
|
38
|
-
stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: EditorState) => boolean | undefined;
|
|
39
|
-
setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugin-annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugin-annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => Command;
|
|
40
|
-
showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => Command;
|
|
41
|
-
hasAnyUnResolvedAnnotationInPage: (state: EditorState) => boolean;
|
|
42
|
-
};
|
|
43
|
-
}, import("@atlaskit/editor-plugin-annotation").AnnotationProviders | undefined>>,
|
|
44
|
-
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
45
|
-
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
46
|
-
dependencies: [
|
|
47
|
-
];
|
|
48
|
-
pluginConfiguration?: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginOptions | undefined;
|
|
49
|
-
commands: {
|
|
50
|
-
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
51
|
-
};
|
|
52
|
-
}, import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginOptions | undefined>>
|
|
53
|
-
];
|
|
54
|
-
sharedState: import("../types").DatePluginSharedState;
|
|
55
|
-
commands: {
|
|
56
|
-
insertDate: import("../types").InsertDate;
|
|
57
|
-
deleteDate: import("@atlaskit/editor-common/types").EditorCommand;
|
|
58
|
-
};
|
|
59
|
-
}> | undefined;
|
|
10
|
+
date?: DateType;
|
|
11
|
+
pluginInjectionApi?: ExtractInjectionAPI<DatePlugin>;
|
|
60
12
|
}) => Command;
|
|
61
13
|
export declare const openDatePicker: () => Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"@atlaskit/css": "^0.12.0",
|
|
38
38
|
"@atlaskit/date": "^2.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-annotation": "^3.
|
|
40
|
+
"@atlaskit/editor-plugin-annotation": "^3.3.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
45
|
-
"@atlaskit/form": "^12.
|
|
46
|
-
"@atlaskit/icon": "^27.
|
|
44
|
+
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
45
|
+
"@atlaskit/form": "^12.1.0",
|
|
46
|
+
"@atlaskit/icon": "^27.12.0",
|
|
47
47
|
"@atlaskit/locale": "^3.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/textfield": "^8.0.0",
|
|
50
50
|
"@atlaskit/theme": "^19.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^11.0.0",
|
|
52
52
|
"@atlaskit/tokens": "^6.0.0",
|
|
53
53
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"@atlaskit/editor-plugin-guideline": "^3.0.0",
|
|
66
66
|
"@atlaskit/editor-plugin-quick-insert": "^3.0.0",
|
|
67
67
|
"@atlaskit/editor-plugin-selection": "^3.0.0",
|
|
68
|
-
"@atlaskit/editor-plugin-table": "^12.
|
|
69
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^6.
|
|
68
|
+
"@atlaskit/editor-plugin-table": "^12.2.0",
|
|
69
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^6.3.0",
|
|
70
70
|
"@atlaskit/editor-plugin-type-ahead": "^3.1.0",
|
|
71
71
|
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
72
72
|
"@testing-library/react": "^13.4.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^107.
|
|
75
|
+
"@atlaskit/editor-common": "^107.25.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-dom": "^18.2.0"
|
|
78
78
|
},
|
|
@@ -117,6 +117,9 @@
|
|
|
117
117
|
},
|
|
118
118
|
"editor_a11y_announce_date_picker_open": {
|
|
119
119
|
"type": "boolean"
|
|
120
|
+
},
|
|
121
|
+
"platform_editor_adf_with_localid": {
|
|
122
|
+
"type": "boolean"
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
}
|