@atlaskit/editor-plugin-date 10.0.0 → 10.0.2
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 +14 -0
- package/README.md +18 -2
- package/dist/cjs/datePlugin.js +2 -2
- package/dist/cjs/pm-plugins/commands.js +3 -1
- package/dist/cjs/pm-plugins/main.js +6 -6
- package/dist/cjs/ui/DatePicker/date-picker-input.js +3 -2
- package/dist/cjs/ui/DatePicker/index.js +3 -2
- package/dist/es2019/datePlugin.js +2 -2
- package/dist/es2019/pm-plugins/commands.js +4 -2
- package/dist/es2019/pm-plugins/main.js +3 -4
- package/dist/es2019/ui/DatePicker/date-picker-input.js +4 -1
- package/dist/es2019/ui/DatePicker/index.js +4 -1
- package/dist/esm/datePlugin.js +2 -2
- package/dist/esm/pm-plugins/commands.js +4 -2
- package/dist/esm/pm-plugins/main.js +6 -6
- package/dist/esm/ui/DatePicker/date-picker-input.js +3 -2
- package/dist/esm/ui/DatePicker/index.js +3 -2
- package/dist/types/nodeviews/dateNodeSpec.d.ts +2 -2
- package/dist/types/pm-plugins/main.d.ts +2 -1
- package/dist/types/ui/DatePicker/date-picker-input.d.ts +3 -3
- package/dist/types/ui/DatePicker/index.d.ts +3 -3
- package/dist/types-ts4.5/nodeviews/dateNodeSpec.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -1
- package/dist/types-ts4.5/ui/DatePicker/date-picker-input.d.ts +3 -3
- package/dist/types-ts4.5/ui/DatePicker/index.d.ts +3 -3
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 10.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5985f38f7104e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5985f38f7104e) -
|
|
8
|
+
Update README.md and 0-intro.tsx
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
# Editor
|
|
1
|
+
# Editor Plugin Date
|
|
2
2
|
|
|
3
3
|
Date plugin for @atlaskit/editor-core
|
|
4
|
+
|
|
4
5
|
**Note:** This component is designed for internal Atlassian development.
|
|
5
6
|
External contributors will be able to use this component but will not be able to submit issues.
|
|
6
7
|
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The Date plugin provides date insertion and editing capabilities for the Atlassian Editor. It integrates with `@atlaskit/calendar` to enable users to select and insert dates into editor content with a visual date picker interface.
|
|
11
|
+
|
|
12
|
+
## Key features
|
|
13
|
+
|
|
14
|
+
- **Date insertion** - Insert dates into editor content with a calendar-based date picker
|
|
15
|
+
- **Date editing** - Edit existing dates inline with the same date picker interface
|
|
16
|
+
- **Configurable week start** - Configure the first day of the week in the date picker
|
|
17
|
+
- **Date analytics** - Track date insertion and editing actions through the analytics plugin
|
|
18
|
+
- **Inline date display** - Dates are displayed inline within the document content
|
|
19
|
+
|
|
7
20
|
## Install
|
|
8
21
|
---
|
|
9
22
|
- **Install** - *yarn add @atlaskit/editor-plugin-date*
|
|
@@ -15,9 +28,12 @@ External contributors will be able to use this component but will not be able to
|
|
|
15
28
|
---
|
|
16
29
|
|
|
17
30
|
**Internal use only**
|
|
31
|
+
|
|
18
32
|
@atlaskit/editor-plugin-date is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
|
|
33
|
+
|
|
19
34
|
Direct use of this component is not supported.
|
|
20
|
-
|
|
35
|
+
|
|
36
|
+
Please see [Atlaskit - Editor plugin Date](https://atlaskit.atlassian.com/packages/editor/editor-plugin-date) for documentation and examples for this package.
|
|
21
37
|
|
|
22
38
|
## Support
|
|
23
39
|
---
|
package/dist/cjs/datePlugin.js
CHANGED
|
@@ -213,7 +213,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
213
213
|
icon: function icon() {
|
|
214
214
|
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconDate, null);
|
|
215
215
|
},
|
|
216
|
-
action: function action(insert, state) {
|
|
216
|
+
action: function action(insert, state, source) {
|
|
217
217
|
var _api$analytics, _api$analytics$attach;
|
|
218
218
|
var tr = (0, _actions.createDate)(true)(state);
|
|
219
219
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || (_api$analytics$attach = _api$analytics.attachAnalyticsEvent) === null || _api$analytics$attach === void 0 || _api$analytics$attach.call(_api$analytics, {
|
|
@@ -222,7 +222,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
222
222
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.DATE,
|
|
223
223
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
224
224
|
attributes: {
|
|
225
|
-
inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
|
|
225
|
+
inputMethod: source !== null && source !== void 0 ? source : _analytics.INPUT_METHOD.QUICK_INSERT
|
|
226
226
|
}
|
|
227
227
|
})(tr);
|
|
228
228
|
return tr;
|
|
@@ -9,6 +9,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _internal = require("../ui/DatePicker/utils/internal");
|
|
13
14
|
var _pluginKey = require("./plugin-key");
|
|
14
15
|
/** Delete the date and close the datepicker */
|
|
@@ -47,13 +48,14 @@ var insertDateCommand = exports.insertDateCommand = function insertDateCommand(p
|
|
|
47
48
|
}
|
|
48
49
|
if (inputMethod) {
|
|
49
50
|
var _pluginInjectionApi$a;
|
|
51
|
+
var resolvedInputMethod = (0, _platformFeatureFlags.fg)('platform_editor_element_browser_analytic') ? inputMethod : _analytics.INPUT_METHOD.QUICK_INSERT;
|
|
50
52
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 || (_pluginInjectionApi$a = _pluginInjectionApi$a.actions) === null || _pluginInjectionApi$a === void 0 || _pluginInjectionApi$a.attachAnalyticsEvent({
|
|
51
53
|
action: _analytics.ACTION.INSERTED,
|
|
52
54
|
actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
|
|
53
55
|
actionSubjectId: _analytics.ACTION_SUBJECT_ID.DATE,
|
|
54
56
|
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
55
57
|
attributes: {
|
|
56
|
-
inputMethod:
|
|
58
|
+
inputMethod: resolvedInputMethod
|
|
57
59
|
}
|
|
58
60
|
})(tr);
|
|
59
61
|
}
|
|
@@ -9,12 +9,12 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
9
9
|
var _DateNodeView = require("../nodeviews/DateNodeView");
|
|
10
10
|
var _pluginKey = require("./plugin-key");
|
|
11
11
|
var _utils2 = require("./utils");
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var dest = (0, _utils.pluginFactory)(_pluginKey.pluginKey, _utils2.reducer, {
|
|
13
|
+
mapping: _utils2.mapping,
|
|
14
|
+
onSelectionChanged: _utils2.onSelectionChanged
|
|
15
|
+
});
|
|
16
|
+
var createPluginState = dest.createPluginState;
|
|
17
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
18
18
|
var createPlugin = function createPlugin(pmPluginFactoryParams) {
|
|
19
19
|
var dispatch = pmPluginFactoryParams.dispatch;
|
|
20
20
|
var newPluginState = {
|
|
@@ -238,5 +238,6 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}]);
|
|
241
|
-
}(_react.default.Component);
|
|
242
|
-
var
|
|
241
|
+
}(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
242
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(DatePickerInput);
|
|
243
|
+
var _default = exports.default = _default_1;
|
|
@@ -186,5 +186,6 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
186
186
|
}));
|
|
187
187
|
}
|
|
188
188
|
}]);
|
|
189
|
-
}(_react.default.Component);
|
|
190
|
-
var
|
|
189
|
+
}(_react.default.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
190
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(DatePicker);
|
|
191
|
+
var _default = exports.default = _default_1;
|
|
@@ -200,7 +200,7 @@ const datePlugin = ({
|
|
|
200
200
|
keywords: ['calendar', 'day', 'time', 'today', '/'],
|
|
201
201
|
keyshortcut: '//',
|
|
202
202
|
icon: () => /*#__PURE__*/React.createElement(IconDate, null),
|
|
203
|
-
action(insert, state) {
|
|
203
|
+
action(insert, state, source) {
|
|
204
204
|
var _api$analytics, _api$analytics$action, _api$analytics$action2;
|
|
205
205
|
const tr = createDate(true)(state);
|
|
206
206
|
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, {
|
|
@@ -209,7 +209,7 @@ const datePlugin = ({
|
|
|
209
209
|
actionSubjectId: ACTION_SUBJECT_ID.DATE,
|
|
210
210
|
eventType: EVENT_TYPE.TRACK,
|
|
211
211
|
attributes: {
|
|
212
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
212
|
+
inputMethod: source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT
|
|
213
213
|
}
|
|
214
214
|
})(tr);
|
|
215
215
|
return tr;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { canInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { isToday } from '../ui/DatePicker/utils/internal';
|
|
7
8
|
import { pluginKey } from './plugin-key';
|
|
8
9
|
/** Delete the date and close the datepicker */
|
|
@@ -42,13 +43,14 @@ export const insertDateCommand = pluginInjectionApi => ({
|
|
|
42
43
|
}
|
|
43
44
|
if (inputMethod) {
|
|
44
45
|
var _pluginInjectionApi$a, _pluginInjectionApi$a2;
|
|
46
|
+
const resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
45
47
|
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : (_pluginInjectionApi$a2 = _pluginInjectionApi$a.actions) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.attachAnalyticsEvent({
|
|
46
48
|
action: ACTION.INSERTED,
|
|
47
49
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
48
50
|
actionSubjectId: ACTION_SUBJECT_ID.DATE,
|
|
49
51
|
eventType: EVENT_TYPE.TRACK,
|
|
50
52
|
attributes: {
|
|
51
|
-
inputMethod
|
|
53
|
+
inputMethod: resolvedInputMethod
|
|
52
54
|
}
|
|
53
55
|
})(tr);
|
|
54
56
|
}
|
|
@@ -3,13 +3,12 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
3
3
|
import { DateNodeView } from '../nodeviews/DateNodeView';
|
|
4
4
|
import { pluginKey } from './plugin-key';
|
|
5
5
|
import { mapping, onSelectionChanged, reducer } from './utils';
|
|
6
|
-
const {
|
|
7
|
-
createPluginState,
|
|
8
|
-
getPluginState
|
|
9
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
6
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
10
7
|
mapping,
|
|
11
8
|
onSelectionChanged
|
|
12
9
|
});
|
|
10
|
+
const createPluginState = dest.createPluginState;
|
|
11
|
+
const getPluginState = dest.getPluginState;
|
|
13
12
|
const createPlugin = pmPluginFactoryParams => {
|
|
14
13
|
const {
|
|
15
14
|
dispatch
|
|
@@ -230,4 +230,7 @@ class DatePickerInput extends React.Component {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
235
|
+
const _default_1 = injectIntl(DatePickerInput);
|
|
236
|
+
export default _default_1;
|
package/dist/esm/datePlugin.js
CHANGED
|
@@ -202,7 +202,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
202
202
|
icon: function icon() {
|
|
203
203
|
return /*#__PURE__*/React.createElement(IconDate, null);
|
|
204
204
|
},
|
|
205
|
-
action: function action(insert, state) {
|
|
205
|
+
action: function action(insert, state, source) {
|
|
206
206
|
var _api$analytics, _api$analytics$attach;
|
|
207
207
|
var tr = createDate(true)(state);
|
|
208
208
|
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 || (_api$analytics$attach = _api$analytics.attachAnalyticsEvent) === null || _api$analytics$attach === void 0 || _api$analytics$attach.call(_api$analytics, {
|
|
@@ -211,7 +211,7 @@ var datePlugin = function datePlugin(_ref3) {
|
|
|
211
211
|
actionSubjectId: ACTION_SUBJECT_ID.DATE,
|
|
212
212
|
eventType: EVENT_TYPE.TRACK,
|
|
213
213
|
attributes: {
|
|
214
|
-
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
214
|
+
inputMethod: source !== null && source !== void 0 ? source : INPUT_METHOD.QUICK_INSERT
|
|
215
215
|
}
|
|
216
216
|
})(tr);
|
|
217
217
|
return tr;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import { todayTimestampInUTC } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { canInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { isToday } from '../ui/DatePicker/utils/internal';
|
|
7
8
|
import { pluginKey } from './plugin-key';
|
|
8
9
|
/** Delete the date and close the datepicker */
|
|
@@ -41,13 +42,14 @@ export var insertDateCommand = function insertDateCommand(pluginInjectionApi) {
|
|
|
41
42
|
}
|
|
42
43
|
if (inputMethod) {
|
|
43
44
|
var _pluginInjectionApi$a;
|
|
45
|
+
var resolvedInputMethod = fg('platform_editor_element_browser_analytic') ? inputMethod : INPUT_METHOD.QUICK_INSERT;
|
|
44
46
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 || (_pluginInjectionApi$a = _pluginInjectionApi$a.actions) === null || _pluginInjectionApi$a === void 0 || _pluginInjectionApi$a.attachAnalyticsEvent({
|
|
45
47
|
action: ACTION.INSERTED,
|
|
46
48
|
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
47
49
|
actionSubjectId: ACTION_SUBJECT_ID.DATE,
|
|
48
50
|
eventType: EVENT_TYPE.TRACK,
|
|
49
51
|
attributes: {
|
|
50
|
-
inputMethod:
|
|
52
|
+
inputMethod: resolvedInputMethod
|
|
51
53
|
}
|
|
52
54
|
})(tr);
|
|
53
55
|
}
|
|
@@ -3,12 +3,12 @@ import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
|
3
3
|
import { DateNodeView } from '../nodeviews/DateNodeView';
|
|
4
4
|
import { pluginKey } from './plugin-key';
|
|
5
5
|
import { mapping, onSelectionChanged, reducer } from './utils';
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
7
|
+
mapping: mapping,
|
|
8
|
+
onSelectionChanged: onSelectionChanged
|
|
9
|
+
});
|
|
10
|
+
var createPluginState = dest.createPluginState;
|
|
11
|
+
var getPluginState = dest.getPluginState;
|
|
12
12
|
var createPlugin = function createPlugin(pmPluginFactoryParams) {
|
|
13
13
|
var dispatch = pmPluginFactoryParams.dispatch;
|
|
14
14
|
var newPluginState = {
|
|
@@ -232,5 +232,6 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
}]);
|
|
235
|
-
}(React.Component);
|
|
236
|
-
|
|
235
|
+
}(React.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
236
|
+
var _default_1 = injectIntl(DatePickerInput);
|
|
237
|
+
export default _default_1;
|
|
@@ -180,5 +180,6 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
180
180
|
}));
|
|
181
181
|
}
|
|
182
182
|
}]);
|
|
183
|
-
}(React.Component);
|
|
184
|
-
|
|
183
|
+
}(React.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
184
|
+
var _default_1 = injectIntl(DatePicker);
|
|
185
|
+
export default _default_1;
|
|
@@ -10,11 +10,11 @@ export declare const dateToDOM: (node: PMNode, state: EditorState, getPos: getPo
|
|
|
10
10
|
})[])[], (string | Record<string, string> | (string | {
|
|
11
11
|
class: string;
|
|
12
12
|
style: string;
|
|
13
|
-
})[])[], (string | {
|
|
13
|
+
})[])[], ((string | {
|
|
14
14
|
class: string;
|
|
15
15
|
contentEditable: string;
|
|
16
16
|
} | (string | {
|
|
17
17
|
class: string;
|
|
18
18
|
})[])[] | (string | {
|
|
19
19
|
class: string;
|
|
20
|
-
})[]];
|
|
20
|
+
})[])];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { DatePluginState } from './types';
|
|
4
|
-
declare const getPluginState: (state:
|
|
5
|
+
declare const getPluginState: (state: EditorState) => DatePluginState;
|
|
5
6
|
declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<DatePluginState>;
|
|
6
7
|
export { getPluginState };
|
|
7
8
|
export default createPlugin;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { DateType } from '../../types';
|
|
9
9
|
export interface InputProps {
|
|
@@ -22,7 +22,7 @@ export interface InputProps {
|
|
|
22
22
|
export interface InputState {
|
|
23
23
|
inputText: string;
|
|
24
24
|
}
|
|
25
|
-
declare const
|
|
25
|
+
declare const _default_1: React.FC<WithIntlProps<InputProps & WrappedComponentProps>> & {
|
|
26
26
|
WrappedComponent: React.ComponentType<InputProps & WrappedComponentProps>;
|
|
27
27
|
};
|
|
28
|
-
export default
|
|
28
|
+
export default _default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { WeekDay } from '@atlaskit/calendar/types';
|
|
8
8
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -33,7 +33,7 @@ export interface State {
|
|
|
33
33
|
selected: Array<string>;
|
|
34
34
|
setInputSelectionPos?: number;
|
|
35
35
|
}
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
|
@@ -15,12 +15,12 @@ export declare const dateToDOM: (node: PMNode, state: EditorState, getPos: getPo
|
|
|
15
15
|
class: string;
|
|
16
16
|
style: string;
|
|
17
17
|
})[])[],
|
|
18
|
-
(string | {
|
|
18
|
+
((string | {
|
|
19
19
|
class: string;
|
|
20
20
|
contentEditable: string;
|
|
21
21
|
} | (string | {
|
|
22
22
|
class: string;
|
|
23
23
|
})[])[] | (string | {
|
|
24
24
|
class: string;
|
|
25
|
-
})[]
|
|
25
|
+
})[])
|
|
26
26
|
];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { DatePluginState } from './types';
|
|
4
|
-
declare const getPluginState: (state:
|
|
5
|
+
declare const getPluginState: (state: EditorState) => DatePluginState;
|
|
5
6
|
declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<DatePluginState>;
|
|
6
7
|
export { getPluginState };
|
|
7
8
|
export default createPlugin;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { DateType } from '../../types';
|
|
9
9
|
export interface InputProps {
|
|
@@ -22,7 +22,7 @@ export interface InputProps {
|
|
|
22
22
|
export interface InputState {
|
|
23
23
|
inputText: string;
|
|
24
24
|
}
|
|
25
|
-
declare const
|
|
25
|
+
declare const _default_1: React.FC<WithIntlProps<InputProps & WrappedComponentProps>> & {
|
|
26
26
|
WrappedComponent: React.ComponentType<InputProps & WrappedComponentProps>;
|
|
27
27
|
};
|
|
28
|
-
export default
|
|
28
|
+
export default _default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { WeekDay } from '@atlaskit/calendar/types';
|
|
8
8
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -33,7 +33,7 @@ export interface State {
|
|
|
33
33
|
selected: Array<string>;
|
|
34
34
|
setInputSelectionPos?: number;
|
|
35
35
|
}
|
|
36
|
-
declare const
|
|
36
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
38
38
|
};
|
|
39
|
-
export default
|
|
39
|
+
export default _default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/textfield": "^8.2.0",
|
|
46
46
|
"@atlaskit/theme": "^22.0.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^36.3.0",
|
|
48
48
|
"@atlaskit/tokens": "^11.1.0",
|
|
49
49
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@testing-library/react": "^16.3.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^112.
|
|
60
|
+
"@atlaskit/editor-common": "^112.2.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0"
|
|
63
63
|
},
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"platform-feature-flags": {
|
|
100
|
+
"platform_editor_element_browser_analytic": {
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
100
103
|
"platform_editor_adf_with_localid": {
|
|
101
104
|
"type": "boolean"
|
|
102
105
|
}
|