@atlaskit/editor-plugin-date 1.2.3 → 1.2.4
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 +10 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/ui/DatePicker/index.js +1 -0
- package/dist/es2019/plugin.js +26 -23
- package/dist/es2019/ui/DatePicker/index.js +1 -0
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/ui/DatePicker/index.js +1 -0
- package/dist/types/types.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/package.json +84 -104
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 1.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
|
|
8
|
+
[`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
|
|
9
|
+
[ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
|
|
10
|
+
the fold (in the top 5 results)
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.2.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -167,12 +167,13 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
167
167
|
},
|
|
168
168
|
pluginsOptions: {
|
|
169
169
|
quickInsert: function quickInsert(_ref6) {
|
|
170
|
+
var _options$getEditorFea;
|
|
170
171
|
var formatMessage = _ref6.formatMessage;
|
|
171
172
|
return [{
|
|
172
173
|
id: 'date',
|
|
173
174
|
title: formatMessage(_messages.toolbarInsertBlockMessages.date),
|
|
174
175
|
description: formatMessage(_messages.toolbarInsertBlockMessages.dateDescription),
|
|
175
|
-
priority: 800,
|
|
176
|
+
priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
|
|
176
177
|
keywords: ['calendar', 'day', 'time', 'today', '/'],
|
|
177
178
|
keyshortcut: '//',
|
|
178
179
|
icon: function icon() {
|
|
@@ -30,6 +30,7 @@ var PopupWithListeners = (0, _ui.withOuterListeners)(_ui.Popup);
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
31
31
|
var popupContentWrapper = (0, _react2.css)({
|
|
32
32
|
padding: "var(--ds-space-025, 2px)",
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
34
|
borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
|
|
34
35
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N60A, ", 0 0 1px ").concat(_colors.N60A), ")"),
|
|
35
36
|
backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")")
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -158,29 +158,32 @@ const datePlugin = ({
|
|
|
158
158
|
pluginsOptions: {
|
|
159
159
|
quickInsert: ({
|
|
160
160
|
formatMessage
|
|
161
|
-
}) =>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
161
|
+
}) => {
|
|
162
|
+
var _options$getEditorFea;
|
|
163
|
+
return [{
|
|
164
|
+
id: 'date',
|
|
165
|
+
title: formatMessage(messages.date),
|
|
166
|
+
description: formatMessage(messages.dateDescription),
|
|
167
|
+
priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
|
|
168
|
+
keywords: ['calendar', 'day', 'time', 'today', '/'],
|
|
169
|
+
keyshortcut: '//',
|
|
170
|
+
icon: () => /*#__PURE__*/React.createElement(IconDate, null),
|
|
171
|
+
action(insert, state) {
|
|
172
|
+
var _api$analytics, _api$analytics$action, _api$analytics$action2;
|
|
173
|
+
const tr = createDate(true)(state);
|
|
174
|
+
api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : (_api$analytics$action = _api$analytics.actions) === null || _api$analytics$action === void 0 ? void 0 : (_api$analytics$action2 = _api$analytics$action.attachAnalyticsEvent) === null || _api$analytics$action2 === void 0 ? void 0 : _api$analytics$action2.call(_api$analytics$action, {
|
|
175
|
+
action: ACTION.INSERTED,
|
|
176
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
177
|
+
actionSubjectId: ACTION_SUBJECT_ID.DATE,
|
|
178
|
+
eventType: EVENT_TYPE.TRACK,
|
|
179
|
+
attributes: {
|
|
180
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
181
|
+
}
|
|
182
|
+
})(tr);
|
|
183
|
+
return tr;
|
|
184
|
+
}
|
|
185
|
+
}];
|
|
186
|
+
}
|
|
184
187
|
}
|
|
185
188
|
});
|
|
186
189
|
export default datePlugin;
|
|
@@ -17,6 +17,7 @@ import DatePickerInput from './date-picker-input';
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
18
18
|
const popupContentWrapper = css({
|
|
19
19
|
padding: "var(--ds-space-025, 2px)",
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
21
|
borderRadius: `${borderRadius()}px`,
|
|
21
22
|
boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`,
|
|
22
23
|
backgroundColor: `var(--ds-surface-overlay, ${N0})`
|
package/dist/esm/plugin.js
CHANGED
|
@@ -155,12 +155,13 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
155
155
|
},
|
|
156
156
|
pluginsOptions: {
|
|
157
157
|
quickInsert: function quickInsert(_ref6) {
|
|
158
|
+
var _options$getEditorFea;
|
|
158
159
|
var formatMessage = _ref6.formatMessage;
|
|
159
160
|
return [{
|
|
160
161
|
id: 'date',
|
|
161
162
|
title: formatMessage(messages.date),
|
|
162
163
|
description: formatMessage(messages.dateDescription),
|
|
163
|
-
priority: 800,
|
|
164
|
+
priority: (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 100 : 800,
|
|
164
165
|
keywords: ['calendar', 'day', 'time', 'today', '/'],
|
|
165
166
|
keyshortcut: '//',
|
|
166
167
|
icon: function icon() {
|
|
@@ -25,6 +25,7 @@ import DatePickerInput from './date-picker-input';
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
26
26
|
var popupContentWrapper = css({
|
|
27
27
|
padding: "var(--ds-space-025, 2px)",
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
29
|
borderRadius: "".concat(borderRadius(), "px"),
|
|
29
30
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"),
|
|
30
31
|
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")")
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WeekDay } from '@atlaskit/calendar/types';
|
|
2
2
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
6
6
|
export type DateSegment = 'day' | 'month' | 'year';
|
|
@@ -11,6 +11,7 @@ export type DateType = {
|
|
|
11
11
|
};
|
|
12
12
|
export interface DatePluginConfig {
|
|
13
13
|
weekStartDay?: WeekDay;
|
|
14
|
+
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
14
15
|
}
|
|
15
16
|
export type DatePluginSharedState = {
|
|
16
17
|
showDatePickerAt?: number | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WeekDay } from '@atlaskit/calendar/types';
|
|
2
2
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
6
6
|
export type DateSegment = 'day' | 'month' | 'year';
|
|
@@ -11,6 +11,7 @@ export type DateType = {
|
|
|
11
11
|
};
|
|
12
12
|
export interface DatePluginConfig {
|
|
13
13
|
weekStartDay?: WeekDay;
|
|
14
|
+
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
14
15
|
}
|
|
15
16
|
export type DatePluginSharedState = {
|
|
16
17
|
showDatePickerAt?: number | null;
|
package/package.json
CHANGED
|
@@ -1,105 +1,85 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"design-tokens": [
|
|
87
|
-
"color"
|
|
88
|
-
],
|
|
89
|
-
"theming": [
|
|
90
|
-
"react-context"
|
|
91
|
-
],
|
|
92
|
-
"ui-components": [
|
|
93
|
-
"lite-mode"
|
|
94
|
-
],
|
|
95
|
-
"deprecation": "no-deprecated-imports",
|
|
96
|
-
"styling": [
|
|
97
|
-
"emotion",
|
|
98
|
-
"emotion"
|
|
99
|
-
],
|
|
100
|
-
"imports": [
|
|
101
|
-
"import-no-extraneous-disable-for-examples-and-docs"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: AI",
|
|
12
|
+
"singleton": true,
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"runReact18": false
|
|
15
|
+
},
|
|
16
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
17
|
+
"main": "dist/cjs/index.js",
|
|
18
|
+
"module": "dist/esm/index.js",
|
|
19
|
+
"module:es2019": "dist/es2019/index.js",
|
|
20
|
+
"types": "dist/types/index.d.ts",
|
|
21
|
+
"typesVersions": {
|
|
22
|
+
">=4.5 <4.9": {
|
|
23
|
+
"*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"atlaskit:src": "src/index.ts",
|
|
28
|
+
"af:exports": {
|
|
29
|
+
".": "./src/index.ts"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
33
|
+
"@atlaskit/calendar": "^14.2.0",
|
|
34
|
+
"@atlaskit/date": "^0.10.0",
|
|
35
|
+
"@atlaskit/editor-common": "^82.6.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
38
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^2.12.0",
|
|
40
|
+
"@atlaskit/form": "^10.3.0",
|
|
41
|
+
"@atlaskit/locale": "^2.7.0",
|
|
42
|
+
"@atlaskit/textfield": "6.3.1",
|
|
43
|
+
"@atlaskit/theme": "^12.9.0",
|
|
44
|
+
"@atlaskit/tokens": "^1.50.0",
|
|
45
|
+
"@babel/runtime": "^7.0.0",
|
|
46
|
+
"@emotion/react": "^11.7.1",
|
|
47
|
+
"date-fns": "^2.17.0",
|
|
48
|
+
"react-dom": "^16.8.0",
|
|
49
|
+
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
50
|
+
"react-loadable": "^5.1.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@atlaskit/editor-plugin-composition": "^1.1.0",
|
|
54
|
+
"@atlaskit/editor-plugin-content-insertion": "^1.2.0",
|
|
55
|
+
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
56
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
57
|
+
"@atlaskit/editor-plugin-guideline": "^1.1.0",
|
|
58
|
+
"@atlaskit/editor-plugin-quick-insert": "^1.1.0",
|
|
59
|
+
"@atlaskit/editor-plugin-selection": "^1.2.0",
|
|
60
|
+
"@atlaskit/editor-plugin-table": "^7.17.0",
|
|
61
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^1.3.0",
|
|
62
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.2.0",
|
|
63
|
+
"@atlaskit/editor-plugin-width": "^1.1.0",
|
|
64
|
+
"@testing-library/react": "^12.1.5"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"react": "^16.8.0"
|
|
68
|
+
},
|
|
69
|
+
"techstack": {
|
|
70
|
+
"@atlassian/frontend": {
|
|
71
|
+
"import-structure": ["atlassian-conventions"],
|
|
72
|
+
"circular-dependencies": ["file-and-folder-level"]
|
|
73
|
+
},
|
|
74
|
+
"@repo/internal": {
|
|
75
|
+
"dom-events": "use-bind-event-listener",
|
|
76
|
+
"analytics": ["analytics-next"],
|
|
77
|
+
"design-tokens": ["color"],
|
|
78
|
+
"theming": ["react-context"],
|
|
79
|
+
"ui-components": ["lite-mode"],
|
|
80
|
+
"deprecation": "no-deprecated-imports",
|
|
81
|
+
"styling": ["emotion", "emotion"],
|
|
82
|
+
"imports": ["import-no-extraneous-disable-for-examples-and-docs"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|