@atlaskit/editor-plugin-extension 10.1.18 → 11.0.1
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 +12 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +3 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/index.js +4 -1
- package/dist/cjs/ui/ConfigPanel/FieldMessages.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +17 -17
- package/dist/cjs/ui/ConfigPanel/Fields/Date.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +2 -0
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +10 -14
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Header/HeaderAfterIconElement.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Header/HeaderIcon.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +2 -1
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +2 -1
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -1
- package/dist/cjs/ui/ConfigPanel/transformers.js +26 -32
- package/dist/cjs/ui/ConfigPanel/utils.js +3 -1
- package/dist/cjs/ui/SaveIndicator/SaveIndicator.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanelLoader.js +3 -2
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/index.js +4 -1
- package/dist/es2019/ui/ConfigPanel/FieldMessages.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +5 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Date.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +2 -0
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/es2019/ui/ConfigPanel/FormErrorBoundary.js +2 -0
- package/dist/es2019/ui/ConfigPanel/Header/HeaderAfterIconElement.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header/HeaderIcon.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +2 -1
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +2 -1
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -1
- package/dist/es2019/ui/ConfigPanel/transformers.js +2 -2
- package/dist/es2019/ui/ConfigPanel/utils.js +3 -1
- package/dist/es2019/ui/SaveIndicator/SaveIndicator.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanelLoader.js +3 -2
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +1 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/index.js +4 -1
- package/dist/esm/ui/ConfigPanel/FieldMessages.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +17 -17
- package/dist/esm/ui/ConfigPanel/Fields/Date.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +2 -0
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +10 -14
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
- package/dist/esm/ui/ConfigPanel/Header/HeaderAfterIconElement.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header/HeaderIcon.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +2 -1
- package/dist/esm/ui/ConfigPanel/LoadingState.js +2 -1
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +4 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +26 -32
- package/dist/esm/ui/ConfigPanel/utils.js +3 -1
- package/dist/esm/ui/SaveIndicator/SaveIndicator.js +1 -1
- package/dist/types/editor-commands/commands.d.ts +8 -7
- package/dist/types/nodeviews/lazyExtension.d.ts +2 -1
- package/dist/types/pm-plugins/macro/plugin.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/pm-plugins/plugin-factory.d.ts +7 -4
- package/dist/types/pm-plugins/toDOM-fixes/bodiedExtension.d.ts +18 -17
- package/dist/types/pm-plugins/unique-id.d.ts +1 -1
- package/dist/types/pm-plugins/update-edit-button.d.ts +2 -2
- package/dist/types/pm-plugins/utils.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelLoader.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/FieldMessages.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/CustomSelect.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Date.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +9 -4
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +5 -5
- package/dist/types/ui/ConfigPanel/Header/HeaderAfterIconElement.d.ts +6 -5
- package/dist/types/ui/ConfigPanel/Header/HeaderIcon.d.ts +6 -5
- package/dist/types/ui/ConfigPanel/Header.d.ts +9 -4
- package/dist/types/ui/ConfigPanel/LoadingState.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +3 -3
- package/dist/types/ui/SaveIndicator/SaveIndicator.d.ts +1 -1
- package/dist/types-ts4.5/editor-commands/commands.d.ts +8 -7
- package/dist/types-ts4.5/nodeviews/lazyExtension.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/macro/plugin.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +7 -4
- package/dist/types-ts4.5/pm-plugins/toDOM-fixes/bodiedExtension.d.ts +18 -17
- package/dist/types-ts4.5/pm-plugins/unique-id.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/update-edit-button.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanelLoader.d.ts +3 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ErrorMessage/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/FieldMessages.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CustomSelect.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Date.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/DateRange.d.ts +9 -4
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Fieldset.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/TabGroup.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/FormErrorBoundary.d.ts +5 -5
- package/dist/types-ts4.5/ui/ConfigPanel/Header/HeaderAfterIconElement.d.ts +6 -5
- package/dist/types-ts4.5/ui/ConfigPanel/Header/HeaderIcon.d.ts +6 -5
- package/dist/types-ts4.5/ui/ConfigPanel/Header.d.ts +9 -4
- package/dist/types-ts4.5/ui/ConfigPanel/LoadingState.d.ts +2 -1
- package/dist/types-ts4.5/ui/ConfigPanel/NestedForms/RemovableField.d.ts +3 -3
- package/dist/types-ts4.5/ui/SaveIndicator/SaveIndicator.d.ts +1 -1
- package/example-utils/config-panel/ConfigPanelWithExtensionPicker.tsx +2 -2
- package/package.json +15 -13
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
7
|
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { injectIntl } from 'react-intl-next';
|
|
8
9
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
@@ -61,4 +61,7 @@ const RemovableField = ({
|
|
|
61
61
|
label: intl.formatMessage(messages.removeField)
|
|
62
62
|
}))));
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
66
|
+
const _default_1 = injectIntl(RemovableField);
|
|
67
|
+
export default _default_1;
|
|
@@ -102,7 +102,7 @@ export const serialize = async (manifest, data, fields, options = {}) => {
|
|
|
102
102
|
const serializeFieldset = async (manifest, field, data, depth) => {
|
|
103
103
|
let fieldSerializer;
|
|
104
104
|
try {
|
|
105
|
-
fieldSerializer =
|
|
105
|
+
fieldSerializer = getFieldSerializer(manifest, field.options.transformer);
|
|
106
106
|
} catch (ex) {
|
|
107
107
|
// We only throw if there is data that may be lost
|
|
108
108
|
if (data[field.name] !== undefined) {
|
|
@@ -317,7 +317,7 @@ export const deserialize = async (manifest, data, fields, depth = 0) => {
|
|
|
317
317
|
// WARNING: don't recursively serialize, limit to depth < 1
|
|
318
318
|
// deserializable?
|
|
319
319
|
if (isFieldset(field) && depth === 0) {
|
|
320
|
-
const fieldDeserializer =
|
|
320
|
+
const fieldDeserializer = getFieldDeserializer(manifest, field.options.transformer);
|
|
321
321
|
if (fieldDeserializer) {
|
|
322
322
|
try {
|
|
323
323
|
value = fieldDeserializer(value);
|
|
@@ -77,7 +77,9 @@ export const parseParamType = (paramValue, paramField
|
|
|
77
77
|
// Safety net
|
|
78
78
|
return null;
|
|
79
79
|
};
|
|
80
|
-
export const getLoggedParameters = (macroKey, currentParams, macroFields
|
|
80
|
+
export const getLoggedParameters = (macroKey, currentParams, macroFields
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
82
|
+
) => {
|
|
81
83
|
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
82
84
|
return Object.keys(currentParams).filter(paramKey => {
|
|
83
85
|
var _ALLOWED_LOGGED_MACRO;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Loadable from 'react-loadable';
|
|
2
2
|
import LoadingState from './LoadingState';
|
|
3
|
-
|
|
3
|
+
var _default_1 = Loadable({
|
|
4
4
|
loader: function loader() {
|
|
5
5
|
return import( /* webpackChunkName: "@atlaskit-internal_editor-core-config-panel" */
|
|
6
6
|
'./ConfigPanelFieldsLoader').then(function (module) {
|
|
@@ -8,4 +8,5 @@ export default Loadable({
|
|
|
8
8
|
});
|
|
9
9
|
},
|
|
10
10
|
loading: LoadingState
|
|
11
|
-
});
|
|
11
|
+
});
|
|
12
|
+
export default _default_1;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
var imageContainerStyles = css({
|
|
10
10
|
margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
|
|
@@ -17,4 +17,7 @@ var ConfigPanelErrorMessage = function ConfigPanelErrorMessage(_ref) {
|
|
|
17
17
|
testId: "config-panel-error-message"
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
22
|
+
var _default_1 = injectIntl(ConfigPanelErrorMessage);
|
|
23
|
+
export default _default_1;
|
|
@@ -102,4 +102,7 @@ var FieldMessages = function FieldMessages(_ref2) {
|
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
107
|
+
var _default_1 = injectIntl(FieldMessages);
|
|
108
|
+
export default _default_1;
|
|
@@ -8,7 +8,7 @@ var _excluded = ["value"],
|
|
|
8
8
|
*/
|
|
9
9
|
import React, { Fragment } from 'react';
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
14
14
|
import { Field } from '@atlaskit/form';
|
|
@@ -9,7 +9,7 @@ var _excluded = ["onChange", "value"];
|
|
|
9
9
|
|
|
10
10
|
import { Fragment, useCallback } from 'react';
|
|
11
11
|
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
15
15
|
import { Fieldset as AKFieldset, Field } from '@atlaskit/form';
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
*/
|
|
8
8
|
import { Fragment } from 'react';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { chartsColorPaletteTooltipMessages, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
13
13
|
import { ColorPickerButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -66,32 +66,29 @@ function CustomSelect(_ref2) {
|
|
|
66
66
|
case 0:
|
|
67
67
|
setLoading(true);
|
|
68
68
|
_context.prev = 1;
|
|
69
|
-
|
|
70
|
-
return getCustomFieldResolver(extensionManifest, field.options.resolver);
|
|
71
|
-
case 4:
|
|
72
|
-
_resolver = _context.sent;
|
|
69
|
+
_resolver = getCustomFieldResolver(extensionManifest, field.options.resolver);
|
|
73
70
|
if (!cancel) {
|
|
74
|
-
_context.next =
|
|
71
|
+
_context.next = 5;
|
|
75
72
|
break;
|
|
76
73
|
}
|
|
77
74
|
return _context.abrupt("return");
|
|
78
|
-
case
|
|
75
|
+
case 5:
|
|
79
76
|
setResolver(function () {
|
|
80
77
|
return _resolver;
|
|
81
78
|
});
|
|
82
79
|
|
|
83
80
|
// fetch the default values
|
|
84
|
-
_context.next =
|
|
81
|
+
_context.next = 8;
|
|
85
82
|
return _resolver(undefined, fieldDefaultValue, parameters);
|
|
86
|
-
case
|
|
83
|
+
case 8:
|
|
87
84
|
_options = _context.sent;
|
|
88
85
|
setDefaultOptions(_options);
|
|
89
86
|
if (!cancel) {
|
|
90
|
-
_context.next =
|
|
87
|
+
_context.next = 12;
|
|
91
88
|
break;
|
|
92
89
|
}
|
|
93
90
|
return _context.abrupt("return");
|
|
94
|
-
case
|
|
91
|
+
case 12:
|
|
95
92
|
// filter returned values to match the defaultValue
|
|
96
93
|
if (fieldDefaultValue && isMultiple) {
|
|
97
94
|
setDefaultValue(_options.filter(function (option) {
|
|
@@ -103,20 +100,20 @@ function CustomSelect(_ref2) {
|
|
|
103
100
|
return fieldDefaultValue === option.value;
|
|
104
101
|
}));
|
|
105
102
|
}
|
|
106
|
-
_context.next =
|
|
103
|
+
_context.next = 19;
|
|
107
104
|
break;
|
|
108
|
-
case
|
|
109
|
-
_context.prev =
|
|
105
|
+
case 16:
|
|
106
|
+
_context.prev = 16;
|
|
110
107
|
_context.t0 = _context["catch"](1);
|
|
111
108
|
// eslint-disable-next-line no-console
|
|
112
109
|
console.error(_context.t0);
|
|
113
|
-
case
|
|
110
|
+
case 19:
|
|
114
111
|
setLoading(false);
|
|
115
|
-
case
|
|
112
|
+
case 20:
|
|
116
113
|
case "end":
|
|
117
114
|
return _context.stop();
|
|
118
115
|
}
|
|
119
|
-
}, _callee, null, [[1,
|
|
116
|
+
}, _callee, null, [[1, 16]]);
|
|
120
117
|
}));
|
|
121
118
|
return _fetchResolver.apply(this, arguments);
|
|
122
119
|
}
|
|
@@ -184,4 +181,7 @@ function CustomSelect(_ref2) {
|
|
|
184
181
|
}));
|
|
185
182
|
});
|
|
186
183
|
}
|
|
187
|
-
|
|
184
|
+
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
186
|
+
var _default_1 = injectIntl(CustomSelect);
|
|
187
|
+
export default _default_1;
|
|
@@ -84,4 +84,7 @@ function Expand(_ref) {
|
|
|
84
84
|
css: expanded ? expandContentContainerVisibleStyles : expandContentContainerHiddenStyles
|
|
85
85
|
}, children));
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
89
|
+
var _default_1 = injectIntl(Expand);
|
|
90
|
+
export default _default_1;
|
|
@@ -274,4 +274,7 @@ function FieldsetError(_ref) {
|
|
|
274
274
|
var sectionMessageWrapperStyles = xcss({
|
|
275
275
|
marginBottom: 'space.300'
|
|
276
276
|
});
|
|
277
|
-
|
|
277
|
+
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
279
|
+
var _default_1 = injectIntl(FieldsetField);
|
|
280
|
+
export default _default_1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import Avatar from '@atlaskit/avatar';
|
|
8
8
|
var itemWrapperStyles = css({
|
|
@@ -191,32 +191,28 @@ export default function UserSelect(_ref2) {
|
|
|
191
191
|
case 0:
|
|
192
192
|
_context3.prev = 0;
|
|
193
193
|
_context3.next = 3;
|
|
194
|
-
return getUserFieldContextProvider(extensionManifest, field.options.provider);
|
|
194
|
+
return getUserFieldContextProvider(extensionManifest, field.options.provider)();
|
|
195
195
|
case 3:
|
|
196
|
-
_context3.t0 = _context3.sent;
|
|
197
|
-
_context3.next = 6;
|
|
198
|
-
return (0, _context3.t0)();
|
|
199
|
-
case 6:
|
|
200
196
|
_context2 = _context3.sent;
|
|
201
197
|
if (!cancel) {
|
|
202
|
-
_context3.next =
|
|
198
|
+
_context3.next = 6;
|
|
203
199
|
break;
|
|
204
200
|
}
|
|
205
201
|
return _context3.abrupt("return");
|
|
206
|
-
case
|
|
202
|
+
case 6:
|
|
207
203
|
setContext(_context2);
|
|
208
|
-
_context3.next =
|
|
204
|
+
_context3.next = 12;
|
|
209
205
|
break;
|
|
210
|
-
case
|
|
211
|
-
_context3.prev =
|
|
212
|
-
_context3.
|
|
206
|
+
case 9:
|
|
207
|
+
_context3.prev = 9;
|
|
208
|
+
_context3.t0 = _context3["catch"](0);
|
|
213
209
|
// eslint-disable-next-line no-console
|
|
214
|
-
console.error(_context3.
|
|
215
|
-
case
|
|
210
|
+
console.error(_context3.t0);
|
|
211
|
+
case 12:
|
|
216
212
|
case "end":
|
|
217
213
|
return _context3.stop();
|
|
218
214
|
}
|
|
219
|
-
}, _callee2, null, [[0,
|
|
215
|
+
}, _callee2, null, [[0, 9]]);
|
|
220
216
|
}));
|
|
221
217
|
return _fetchContext.apply(this, arguments);
|
|
222
218
|
}
|
|
@@ -130,7 +130,7 @@ var FormErrorBoundaryInner = /*#__PURE__*/function (_React$Component) {
|
|
|
130
130
|
}, intl.formatMessage(messages.errorBoundaryNote))));
|
|
131
131
|
}
|
|
132
132
|
}]);
|
|
133
|
-
}(React.Component);
|
|
133
|
+
}(React.Component); // eslint-disable-next-line @typescript-eslint/ban-types
|
|
134
134
|
export var FormErrorBoundaryImpl = injectIntl(FormErrorBoundaryInner);
|
|
135
135
|
export var FormErrorBoundary = withAnalyticsContext()(withAnalyticsEvents()(FormErrorBoundaryImpl));
|
|
136
136
|
FormErrorBoundary.displayName = 'FormErrorBoundary';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
7
|
import { css, jsx } from '@emotion/react';
|
|
7
8
|
import { injectIntl } from 'react-intl-next';
|
|
8
9
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
@@ -62,4 +62,7 @@ var RemovableField = function RemovableField(_ref) {
|
|
|
62
62
|
label: intl.formatMessage(messages.removeField)
|
|
63
63
|
}))));
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
67
|
+
var _default_1 = injectIntl(RemovableField);
|
|
68
|
+
export default _default_1;
|
|
@@ -187,44 +187,41 @@ var serializeFieldset = /*#__PURE__*/function () {
|
|
|
187
187
|
while (1) switch (_context3.prev = _context3.next) {
|
|
188
188
|
case 0:
|
|
189
189
|
_context3.prev = 0;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
case 3:
|
|
193
|
-
fieldSerializer = _context3.sent;
|
|
194
|
-
_context3.next = 10;
|
|
190
|
+
fieldSerializer = getFieldSerializer(manifest, field.options.transformer);
|
|
191
|
+
_context3.next = 8;
|
|
195
192
|
break;
|
|
196
|
-
case
|
|
197
|
-
_context3.prev =
|
|
193
|
+
case 4:
|
|
194
|
+
_context3.prev = 4;
|
|
198
195
|
_context3.t0 = _context3["catch"](0);
|
|
199
196
|
if (!(data[field.name] !== undefined)) {
|
|
200
|
-
_context3.next =
|
|
197
|
+
_context3.next = 8;
|
|
201
198
|
break;
|
|
202
199
|
}
|
|
203
200
|
throw _context3.t0;
|
|
204
|
-
case
|
|
201
|
+
case 8:
|
|
205
202
|
if (fieldSerializer) {
|
|
206
|
-
_context3.next =
|
|
203
|
+
_context3.next = 10;
|
|
207
204
|
break;
|
|
208
205
|
}
|
|
209
206
|
return _context3.abrupt("return");
|
|
210
|
-
case
|
|
207
|
+
case 10:
|
|
211
208
|
fieldsetFields = field.fields;
|
|
212
209
|
fieldParams = extract(data[field.name], field, {
|
|
213
210
|
useDefaultValue: true
|
|
214
211
|
}) || {};
|
|
215
|
-
_context3.next =
|
|
212
|
+
_context3.next = 14;
|
|
216
213
|
return serialize(manifest, fieldParams, fieldsetFields, {
|
|
217
214
|
depth: depth + 1,
|
|
218
215
|
parentType: 'fieldset'
|
|
219
216
|
});
|
|
220
|
-
case
|
|
217
|
+
case 14:
|
|
221
218
|
extracted = _context3.sent;
|
|
222
219
|
return _context3.abrupt("return", _defineProperty({}, field.name, fieldSerializer(extracted)));
|
|
223
|
-
case
|
|
220
|
+
case 16:
|
|
224
221
|
case "end":
|
|
225
222
|
return _context3.stop();
|
|
226
223
|
}
|
|
227
|
-
}, _callee3, null, [[0,
|
|
224
|
+
}, _callee3, null, [[0, 4]]);
|
|
228
225
|
}));
|
|
229
226
|
return function serializeFieldset(_x5, _x6, _x7, _x8) {
|
|
230
227
|
return _ref3.apply(this, arguments);
|
|
@@ -520,38 +517,35 @@ var _deserialize = /*#__PURE__*/function () {
|
|
|
520
517
|
return _context8.abrupt("return", 0);
|
|
521
518
|
case 8:
|
|
522
519
|
if (!(isFieldset(field) && depth === 0)) {
|
|
523
|
-
_context8.next =
|
|
520
|
+
_context8.next = 22;
|
|
524
521
|
break;
|
|
525
522
|
}
|
|
526
|
-
|
|
527
|
-
return getFieldDeserializer(manifest, field.options.transformer);
|
|
528
|
-
case 11:
|
|
529
|
-
fieldDeserializer = _context8.sent;
|
|
523
|
+
fieldDeserializer = getFieldDeserializer(manifest, field.options.transformer);
|
|
530
524
|
if (!fieldDeserializer) {
|
|
531
|
-
_context8.next =
|
|
525
|
+
_context8.next = 22;
|
|
532
526
|
break;
|
|
533
527
|
}
|
|
534
|
-
_context8.prev =
|
|
528
|
+
_context8.prev = 11;
|
|
535
529
|
value = fieldDeserializer(value);
|
|
536
|
-
_context8.next =
|
|
530
|
+
_context8.next = 19;
|
|
537
531
|
break;
|
|
538
|
-
case
|
|
539
|
-
_context8.prev =
|
|
540
|
-
_context8.t0 = _context8["catch"](
|
|
532
|
+
case 15:
|
|
533
|
+
_context8.prev = 15;
|
|
534
|
+
_context8.t0 = _context8["catch"](11);
|
|
541
535
|
errors.push(_defineProperty({}, name, _context8.t0 instanceof Error ? _context8.t0.message : String(_context8.t0)));
|
|
542
536
|
return _context8.abrupt("return", 0);
|
|
543
|
-
case
|
|
544
|
-
_context8.next =
|
|
537
|
+
case 19:
|
|
538
|
+
_context8.next = 21;
|
|
545
539
|
return _deserialize(manifest, value, field.fields, depth + 1);
|
|
546
|
-
case
|
|
540
|
+
case 21:
|
|
547
541
|
value = _context8.sent;
|
|
548
|
-
case
|
|
542
|
+
case 22:
|
|
549
543
|
result.push(_defineProperty({}, name, value));
|
|
550
|
-
case
|
|
544
|
+
case 23:
|
|
551
545
|
case "end":
|
|
552
546
|
return _context8.stop();
|
|
553
547
|
}
|
|
554
|
-
}, _loop2, null, [[
|
|
548
|
+
}, _loop2, null, [[11, 15]]);
|
|
555
549
|
});
|
|
556
550
|
_iterator2.s();
|
|
557
551
|
case 9:
|
|
@@ -101,7 +101,9 @@ export var parseParamType = function parseParamType(paramValue, paramField
|
|
|
101
101
|
// Safety net
|
|
102
102
|
return null;
|
|
103
103
|
};
|
|
104
|
-
export var getLoggedParameters = function getLoggedParameters(macroKey, currentParams, macroFields
|
|
104
|
+
export var getLoggedParameters = function getLoggedParameters(macroKey, currentParams, macroFields
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
106
|
+
) {
|
|
105
107
|
// Get the parameters only defined in the allowlist of logged macro/parameter keys
|
|
106
108
|
return Object.keys(currentParams).filter(function (paramKey) {
|
|
107
109
|
var _ALLOWED_LOGGED_MACRO;
|
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
*/
|
|
6
6
|
import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { EditorAnalyticsAPI, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Parameters, TransformAfter, TransformBefore } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
5
6
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
7
|
import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import type { ExtensionState, RejectSave } from '../extensionPluginType';
|
|
8
|
-
export declare function updateState(state: Partial<ExtensionState>):
|
|
9
|
-
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>, applyChangeToContextPanel: ApplyChangeHandler | undefined):
|
|
10
|
-
export declare const clearEditingContext: (applyChangeToContextPanel: ApplyChangeHandler | undefined) =>
|
|
11
|
-
export declare const forceAutoSave: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => (resolve: () => void, reject?: RejectSave) =>
|
|
12
|
-
export declare const updateExtensionLayout: (layout: ExtensionLayout, analyticsApi?: EditorAnalyticsAPI) =>
|
|
13
|
-
export declare const removeExtension: (editorAnalyticsAPI?: EditorAnalyticsAPI, inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB) =>
|
|
14
|
-
export declare const removeDescendantNodes: (sourceNode?: PMNode) =>
|
|
9
|
+
export declare function updateState(state: Partial<ExtensionState>): Command;
|
|
10
|
+
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>, applyChangeToContextPanel: ApplyChangeHandler | undefined): Command;
|
|
11
|
+
export declare const clearEditingContext: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => Command;
|
|
12
|
+
export declare const forceAutoSave: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => (resolve: () => void, reject?: RejectSave) => Command;
|
|
13
|
+
export declare const updateExtensionLayout: (layout: ExtensionLayout, analyticsApi?: EditorAnalyticsAPI) => Command;
|
|
14
|
+
export declare const removeExtension: (editorAnalyticsAPI?: EditorAnalyticsAPI, inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB) => Command;
|
|
15
|
+
export declare const removeDescendantNodes: (sourceNode?: PMNode) => Command;
|
|
15
16
|
export declare const removeSelectedNodeWithAnalytics: (state: EditorState, tr: Transaction, analyticsApi?: EditorAnalyticsAPI, inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB) => Transaction;
|
|
16
17
|
export declare const checkAndRemoveExtensionNode: (state: EditorState, tr: Transaction, analyticsApi?: EditorAnalyticsAPI, inputMethod?: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB) => Transaction;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ExtensionNodeView } from '@atlaskit/editor-common/extensibility';
|
|
2
|
-
|
|
2
|
+
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
|
+
export declare function lazyExtensionNodeView(nodeName: string, ...params: Parameters<typeof ExtensionNodeView>): NodeViewConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory) => SafePlugin
|
|
4
|
+
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory) => SafePlugin;
|
|
@@ -8,7 +8,7 @@ import type { EditorAppearance, ExtractInjectionAPI, FeatureFlags } from '@atlas
|
|
|
8
8
|
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
9
9
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
-
import type { ExtensionPlugin, ExtensionPluginOptions } from '../extensionPluginType';
|
|
11
|
+
import type { ExtensionPlugin, ExtensionPluginOptions, ExtensionState } from '../extensionPluginType';
|
|
12
12
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
13
13
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
14
14
|
applyChange: ApplyChangeHandler | undefined;
|
|
@@ -20,4 +20,4 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
20
20
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
21
21
|
appearance?: EditorAppearance;
|
|
22
22
|
getExtensionHeight?: GetPMNodeHeight;
|
|
23
|
-
}, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions["__rendererExtensionOptions"]) => SafePlugin<
|
|
23
|
+
}, featureFlags?: FeatureFlags, __rendererExtensionOptions?: ExtensionPluginOptions["__rendererExtensionOptions"]) => SafePlugin<ExtensionState>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { ExtensionAction, ExtensionState } from '../extensionPluginType';
|
|
5
|
+
export declare const createPluginState: (dispatch: Dispatch, initialState: ExtensionState | ((state: EditorState) => ExtensionState)) => SafeStateField<ExtensionState>;
|
|
6
|
+
export declare const createCommand: <A = ExtensionAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
export declare const getPluginState: (state: EditorState) => ExtensionState;
|