@atlaskit/editor-plugin-date 5.1.8 → 5.1.10
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/dist/types/datePluginType.d.ts +4 -4
- package/dist/types/pm-plugins/types.d.ts +6 -6
- package/dist/types/types/index.d.ts +11 -11
- package/dist/types/ui/DatePicker/date-picker-input.d.ts +7 -7
- package/dist/types/ui/DatePicker/index.d.ts +10 -10
- package/dist/types-ts4.5/datePluginType.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/types.d.ts +6 -6
- package/dist/types-ts4.5/types/index.d.ts +11 -11
- package/dist/types-ts4.5/ui/DatePicker/date-picker-input.d.ts +7 -7
- package/dist/types-ts4.5/ui/DatePicker/index.d.ts +10 -10
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 5.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 5.1.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 5.1.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,11 +11,11 @@ export type DatePluginDependencies = [
|
|
|
11
11
|
OptionalPlugin<EditorViewModePlugin>
|
|
12
12
|
];
|
|
13
13
|
export type DatePlugin = NextEditorPlugin<'date', {
|
|
14
|
-
pluginConfiguration: DatePluginOptions | undefined;
|
|
15
|
-
dependencies: DatePluginDependencies;
|
|
16
|
-
sharedState: DatePluginSharedState;
|
|
17
14
|
commands: {
|
|
18
|
-
insertDate: InsertDate;
|
|
19
15
|
deleteDate: DeleteDate;
|
|
16
|
+
insertDate: InsertDate;
|
|
20
17
|
};
|
|
18
|
+
dependencies: DatePluginDependencies;
|
|
19
|
+
pluginConfiguration: DatePluginOptions | undefined;
|
|
20
|
+
sharedState: DatePluginSharedState;
|
|
21
21
|
}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export type DatePluginState = {
|
|
2
|
-
isQuickInsertAction?: boolean;
|
|
3
|
-
isNew: boolean;
|
|
4
|
-
showDatePickerAt: number | null;
|
|
5
|
-
isDateEmpty: boolean;
|
|
6
2
|
focusDateInput: boolean;
|
|
3
|
+
isDateEmpty: boolean;
|
|
7
4
|
isInitialised: boolean;
|
|
5
|
+
isNew: boolean;
|
|
6
|
+
isQuickInsertAction?: boolean;
|
|
7
|
+
showDatePickerAt: number | null;
|
|
8
8
|
};
|
|
9
9
|
export type DatePluginMeta = {
|
|
10
|
-
isNew?: boolean;
|
|
11
|
-
showDatePickerAt?: number | null;
|
|
12
10
|
isDateEmpty?: boolean;
|
|
13
11
|
isInitialised: boolean;
|
|
12
|
+
isNew?: boolean;
|
|
13
|
+
showDatePickerAt?: number | null;
|
|
14
14
|
};
|
|
@@ -7,9 +7,9 @@ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabl
|
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
8
|
export type DateSegment = 'day' | 'month' | 'year';
|
|
9
9
|
export type DateType = {
|
|
10
|
-
year: number;
|
|
11
|
-
month: number;
|
|
12
10
|
day?: number;
|
|
11
|
+
month: number;
|
|
12
|
+
year: number;
|
|
13
13
|
};
|
|
14
14
|
export interface DatePluginOptions {
|
|
15
15
|
weekStartDay?: WeekDay;
|
|
@@ -21,29 +21,29 @@ export interface DatePluginOptions {
|
|
|
21
21
|
*/
|
|
22
22
|
export type DatePluginConfig = DatePluginOptions;
|
|
23
23
|
export type DatePluginSharedState = {
|
|
24
|
-
showDatePickerAt?: number | null;
|
|
25
|
-
isNew: boolean;
|
|
26
24
|
focusDateInput: boolean;
|
|
27
25
|
isInitialised: boolean;
|
|
26
|
+
isNew: boolean;
|
|
27
|
+
showDatePickerAt?: number | null;
|
|
28
28
|
};
|
|
29
29
|
export type InsertDate = (props: {
|
|
30
|
-
date?: DateType;
|
|
31
|
-
inputMethod?: TOOLBAR_MENU_TYPE;
|
|
32
30
|
commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
|
|
31
|
+
date?: DateType;
|
|
33
32
|
enterPressed?: boolean;
|
|
33
|
+
inputMethod?: TOOLBAR_MENU_TYPE;
|
|
34
34
|
}) => EditorCommand;
|
|
35
35
|
export type DeleteDate = EditorCommand;
|
|
36
36
|
export type DatePlugin = NextEditorPlugin<'date', {
|
|
37
|
-
|
|
37
|
+
commands: {
|
|
38
|
+
deleteDate: DeleteDate;
|
|
39
|
+
insertDate: InsertDate;
|
|
40
|
+
};
|
|
38
41
|
dependencies: [
|
|
39
42
|
typeof analyticsPlugin,
|
|
40
43
|
EditorDisabledPlugin,
|
|
41
44
|
OptionalPlugin<AnnotationPlugin>,
|
|
42
45
|
OptionalPlugin<EditorViewModePlugin>
|
|
43
46
|
];
|
|
47
|
+
pluginConfiguration: DatePluginOptions | undefined;
|
|
44
48
|
sharedState: DatePluginSharedState;
|
|
45
|
-
commands: {
|
|
46
|
-
insertDate: InsertDate;
|
|
47
|
-
deleteDate: DeleteDate;
|
|
48
|
-
};
|
|
49
49
|
}>;
|
|
@@ -7,17 +7,17 @@ import type { 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 {
|
|
10
|
-
/** Locale code string (eg. "en-AU") */
|
|
11
|
-
locale: string;
|
|
12
|
-
date: DateType;
|
|
13
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
14
|
-
onNewDate: (date: DateType) => void;
|
|
15
|
-
onSubmitDate: (date: DateType | null) => void;
|
|
16
|
-
onEmptySubmit: () => void;
|
|
17
10
|
/** Automatically focus the text field */
|
|
18
11
|
autoFocus?: boolean;
|
|
19
12
|
/** Automatically select all text in the field. Requires autoFocus to be true. */
|
|
20
13
|
autoSelectAll?: boolean;
|
|
14
|
+
date: DateType;
|
|
15
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
16
|
+
/** Locale code string (eg. "en-AU") */
|
|
17
|
+
locale: string;
|
|
18
|
+
onEmptySubmit: () => void;
|
|
19
|
+
onNewDate: (date: DateType) => void;
|
|
20
|
+
onSubmitDate: (date: DateType | null) => void;
|
|
21
21
|
}
|
|
22
22
|
export interface InputState {
|
|
23
23
|
inputText: string;
|
|
@@ -9,29 +9,29 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
9
9
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import type { DateType } from '../../types';
|
|
11
11
|
export interface Props {
|
|
12
|
-
element: HTMLElement | null;
|
|
13
|
-
closeDatePicker: () => void;
|
|
14
|
-
/** Whether the date is newly created, selcting and focusing the input */
|
|
15
|
-
isNew: boolean;
|
|
16
12
|
/** Whether to automatically focus the input */
|
|
17
13
|
autoFocus?: boolean;
|
|
18
|
-
onSelect: (date: DateType | null, commitMethod: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD) => void;
|
|
19
|
-
onDelete: () => void;
|
|
20
|
-
mountTo?: HTMLElement;
|
|
21
14
|
boundariesElement?: HTMLElement;
|
|
22
|
-
|
|
15
|
+
closeDatePicker: () => void;
|
|
23
16
|
closeDatePickerWithAnalytics: ({ date }: {
|
|
24
17
|
date?: DateType;
|
|
25
18
|
}) => void;
|
|
26
|
-
onTextChanged: (date: DateType) => void;
|
|
27
19
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
20
|
+
element: HTMLElement | null;
|
|
21
|
+
/** Whether the date is newly created, selcting and focusing the input */
|
|
22
|
+
isNew: boolean;
|
|
23
|
+
mountTo?: HTMLElement;
|
|
24
|
+
onDelete: () => void;
|
|
25
|
+
onSelect: (date: DateType | null, commitMethod: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD) => void;
|
|
26
|
+
onTextChanged: (date: DateType) => void;
|
|
27
|
+
scrollableElement?: HTMLElement;
|
|
28
28
|
weekStartDay?: WeekDay;
|
|
29
29
|
}
|
|
30
30
|
export interface State {
|
|
31
31
|
date: DateType;
|
|
32
|
+
latestValidDate: DateType;
|
|
32
33
|
selected: Array<string>;
|
|
33
34
|
setInputSelectionPos?: number;
|
|
34
|
-
latestValidDate: DateType;
|
|
35
35
|
}
|
|
36
36
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
@@ -11,11 +11,11 @@ export type DatePluginDependencies = [
|
|
|
11
11
|
OptionalPlugin<EditorViewModePlugin>
|
|
12
12
|
];
|
|
13
13
|
export type DatePlugin = NextEditorPlugin<'date', {
|
|
14
|
-
pluginConfiguration: DatePluginOptions | undefined;
|
|
15
|
-
dependencies: DatePluginDependencies;
|
|
16
|
-
sharedState: DatePluginSharedState;
|
|
17
14
|
commands: {
|
|
18
|
-
insertDate: InsertDate;
|
|
19
15
|
deleteDate: DeleteDate;
|
|
16
|
+
insertDate: InsertDate;
|
|
20
17
|
};
|
|
18
|
+
dependencies: DatePluginDependencies;
|
|
19
|
+
pluginConfiguration: DatePluginOptions | undefined;
|
|
20
|
+
sharedState: DatePluginSharedState;
|
|
21
21
|
}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export type DatePluginState = {
|
|
2
|
-
isQuickInsertAction?: boolean;
|
|
3
|
-
isNew: boolean;
|
|
4
|
-
showDatePickerAt: number | null;
|
|
5
|
-
isDateEmpty: boolean;
|
|
6
2
|
focusDateInput: boolean;
|
|
3
|
+
isDateEmpty: boolean;
|
|
7
4
|
isInitialised: boolean;
|
|
5
|
+
isNew: boolean;
|
|
6
|
+
isQuickInsertAction?: boolean;
|
|
7
|
+
showDatePickerAt: number | null;
|
|
8
8
|
};
|
|
9
9
|
export type DatePluginMeta = {
|
|
10
|
-
isNew?: boolean;
|
|
11
|
-
showDatePickerAt?: number | null;
|
|
12
10
|
isDateEmpty?: boolean;
|
|
13
11
|
isInitialised: boolean;
|
|
12
|
+
isNew?: boolean;
|
|
13
|
+
showDatePickerAt?: number | null;
|
|
14
14
|
};
|
|
@@ -7,9 +7,9 @@ import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabl
|
|
|
7
7
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
8
8
|
export type DateSegment = 'day' | 'month' | 'year';
|
|
9
9
|
export type DateType = {
|
|
10
|
-
year: number;
|
|
11
|
-
month: number;
|
|
12
10
|
day?: number;
|
|
11
|
+
month: number;
|
|
12
|
+
year: number;
|
|
13
13
|
};
|
|
14
14
|
export interface DatePluginOptions {
|
|
15
15
|
weekStartDay?: WeekDay;
|
|
@@ -21,29 +21,29 @@ export interface DatePluginOptions {
|
|
|
21
21
|
*/
|
|
22
22
|
export type DatePluginConfig = DatePluginOptions;
|
|
23
23
|
export type DatePluginSharedState = {
|
|
24
|
-
showDatePickerAt?: number | null;
|
|
25
|
-
isNew: boolean;
|
|
26
24
|
focusDateInput: boolean;
|
|
27
25
|
isInitialised: boolean;
|
|
26
|
+
isNew: boolean;
|
|
27
|
+
showDatePickerAt?: number | null;
|
|
28
28
|
};
|
|
29
29
|
export type InsertDate = (props: {
|
|
30
|
-
date?: DateType;
|
|
31
|
-
inputMethod?: TOOLBAR_MENU_TYPE;
|
|
32
30
|
commitMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD;
|
|
31
|
+
date?: DateType;
|
|
33
32
|
enterPressed?: boolean;
|
|
33
|
+
inputMethod?: TOOLBAR_MENU_TYPE;
|
|
34
34
|
}) => EditorCommand;
|
|
35
35
|
export type DeleteDate = EditorCommand;
|
|
36
36
|
export type DatePlugin = NextEditorPlugin<'date', {
|
|
37
|
-
|
|
37
|
+
commands: {
|
|
38
|
+
deleteDate: DeleteDate;
|
|
39
|
+
insertDate: InsertDate;
|
|
40
|
+
};
|
|
38
41
|
dependencies: [
|
|
39
42
|
typeof analyticsPlugin,
|
|
40
43
|
EditorDisabledPlugin,
|
|
41
44
|
OptionalPlugin<AnnotationPlugin>,
|
|
42
45
|
OptionalPlugin<EditorViewModePlugin>
|
|
43
46
|
];
|
|
47
|
+
pluginConfiguration: DatePluginOptions | undefined;
|
|
44
48
|
sharedState: DatePluginSharedState;
|
|
45
|
-
commands: {
|
|
46
|
-
insertDate: InsertDate;
|
|
47
|
-
deleteDate: DeleteDate;
|
|
48
|
-
};
|
|
49
49
|
}>;
|
|
@@ -7,17 +7,17 @@ import type { 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 {
|
|
10
|
-
/** Locale code string (eg. "en-AU") */
|
|
11
|
-
locale: string;
|
|
12
|
-
date: DateType;
|
|
13
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
14
|
-
onNewDate: (date: DateType) => void;
|
|
15
|
-
onSubmitDate: (date: DateType | null) => void;
|
|
16
|
-
onEmptySubmit: () => void;
|
|
17
10
|
/** Automatically focus the text field */
|
|
18
11
|
autoFocus?: boolean;
|
|
19
12
|
/** Automatically select all text in the field. Requires autoFocus to be true. */
|
|
20
13
|
autoSelectAll?: boolean;
|
|
14
|
+
date: DateType;
|
|
15
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
16
|
+
/** Locale code string (eg. "en-AU") */
|
|
17
|
+
locale: string;
|
|
18
|
+
onEmptySubmit: () => void;
|
|
19
|
+
onNewDate: (date: DateType) => void;
|
|
20
|
+
onSubmitDate: (date: DateType | null) => void;
|
|
21
21
|
}
|
|
22
22
|
export interface InputState {
|
|
23
23
|
inputText: string;
|
|
@@ -9,29 +9,29 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
9
9
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
10
|
import type { DateType } from '../../types';
|
|
11
11
|
export interface Props {
|
|
12
|
-
element: HTMLElement | null;
|
|
13
|
-
closeDatePicker: () => void;
|
|
14
|
-
/** Whether the date is newly created, selcting and focusing the input */
|
|
15
|
-
isNew: boolean;
|
|
16
12
|
/** Whether to automatically focus the input */
|
|
17
13
|
autoFocus?: boolean;
|
|
18
|
-
onSelect: (date: DateType | null, commitMethod: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD) => void;
|
|
19
|
-
onDelete: () => void;
|
|
20
|
-
mountTo?: HTMLElement;
|
|
21
14
|
boundariesElement?: HTMLElement;
|
|
22
|
-
|
|
15
|
+
closeDatePicker: () => void;
|
|
23
16
|
closeDatePickerWithAnalytics: ({ date }: {
|
|
24
17
|
date?: DateType;
|
|
25
18
|
}) => void;
|
|
26
|
-
onTextChanged: (date: DateType) => void;
|
|
27
19
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
20
|
+
element: HTMLElement | null;
|
|
21
|
+
/** Whether the date is newly created, selcting and focusing the input */
|
|
22
|
+
isNew: boolean;
|
|
23
|
+
mountTo?: HTMLElement;
|
|
24
|
+
onDelete: () => void;
|
|
25
|
+
onSelect: (date: DateType | null, commitMethod: INPUT_METHOD.PICKER | INPUT_METHOD.KEYBOARD) => void;
|
|
26
|
+
onTextChanged: (date: DateType) => void;
|
|
27
|
+
scrollableElement?: HTMLElement;
|
|
28
28
|
weekStartDay?: WeekDay;
|
|
29
29
|
}
|
|
30
30
|
export interface State {
|
|
31
31
|
date: DateType;
|
|
32
|
+
latestValidDate: DateType;
|
|
32
33
|
selected: Array<string>;
|
|
33
34
|
setInputSelectionPos?: number;
|
|
34
|
-
latestValidDate: DateType;
|
|
35
35
|
}
|
|
36
36
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
37
37
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
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.10",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
45
|
-
"@atlaskit/form": "^12.
|
|
46
|
-
"@atlaskit/icon": "^
|
|
45
|
+
"@atlaskit/form": "^12.2.0",
|
|
46
|
+
"@atlaskit/icon": "^28.0.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": "^11.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
52
52
|
"@atlaskit/tokens": "^6.0.0",
|
|
53
53
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
65
65
|
"@atlaskit/editor-plugin-guideline": "^3.0.0",
|
|
66
66
|
"@atlaskit/editor-plugin-quick-insert": "^3.0.0",
|
|
67
|
-
"@atlaskit/editor-plugin-selection": "^3.
|
|
68
|
-
"@atlaskit/editor-plugin-table": "^12.
|
|
67
|
+
"@atlaskit/editor-plugin-selection": "^3.2.0",
|
|
68
|
+
"@atlaskit/editor-plugin-table": "^12.3.0",
|
|
69
69
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^6.4.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.28.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-dom": "^18.2.0"
|
|
78
78
|
},
|