@atlaskit/editor-plugin-extension 1.14.17 → 1.15.0
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 +33 -0
- package/dist/cjs/ui/ConfigPanel/FieldMessages.js +9 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +3 -5
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +3 -5
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +16 -11
- package/dist/cjs/ui/SaveIndicator/SaveIndicator.js +6 -5
- package/dist/es2019/ui/ConfigPanel/FieldMessages.js +9 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +3 -5
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +4 -5
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +16 -11
- package/dist/es2019/ui/SaveIndicator/SaveIndicator.js +6 -5
- package/dist/esm/ui/ConfigPanel/FieldMessages.js +9 -2
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +3 -5
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +4 -5
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +4 -1
- package/dist/esm/ui/ConfigPanel/Header.js +16 -11
- package/dist/esm/ui/SaveIndicator/SaveIndicator.js +6 -5
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +65 -15
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -1
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +74 -15
- package/dist/types-ts4.5/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -1
- package/example-utils/config-panel/ConfigPanelWithExtensionPicker.tsx +5 -4
- package/package.json +12 -11
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +0 -14
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +0 -7
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +0 -7
- package/dist/types/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +0 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 1.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#151190](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151190)
|
|
8
|
+
[`a3723b1cdede2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a3723b1cdede2) -
|
|
9
|
+
[ux] [ED-25037] this change bumps @atlaskit/adf-schema from 40.9.0 to 40.9.4 which makes the
|
|
10
|
+
blockquote selectable, adds missing marks to the PM node spec and fixes a bug that converted
|
|
11
|
+
pasted external images to media groups.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 1.14.18
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#149558](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/149558)
|
|
22
|
+
[`5e8619ac0f6e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5e8619ac0f6e4) -
|
|
23
|
+
[ux] [ED-25085] Migrate typography \
|
|
24
|
+
|
|
25
|
+
editor-plugin-media:
|
|
26
|
+
|
|
27
|
+
- replace caption placeholder span with button
|
|
28
|
+
- replace x between width and height pixel entry with symbol × \
|
|
29
|
+
|
|
30
|
+
tmp-editor-statsig:
|
|
31
|
+
|
|
32
|
+
- Add experiment `platform_editor_typography_migration_ugc`
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 1.14.17
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
11
11
|
var _form = require("@atlaskit/form");
|
|
12
|
+
var _primitives = require("@atlaskit/primitives");
|
|
12
13
|
var _types = require("./types");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -42,11 +43,17 @@ function makeMarkup(fragment, key) {
|
|
|
42
43
|
key: key
|
|
43
44
|
}, children);
|
|
44
45
|
case 'STRONG':
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
47
|
+
as: "strong",
|
|
48
|
+
color: "color.text.subtlest",
|
|
49
|
+
size: "UNSAFE_small",
|
|
46
50
|
key: key
|
|
47
51
|
}, children);
|
|
48
52
|
case 'EM':
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
54
|
+
as: "em",
|
|
55
|
+
color: "color.text.subtlest",
|
|
56
|
+
size: "UNSAFE_small",
|
|
50
57
|
key: key
|
|
51
58
|
}, children);
|
|
52
59
|
case 'CODE':
|
|
@@ -12,10 +12,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _checkbox = require("@atlaskit/checkbox");
|
|
14
14
|
var _form = require("@atlaskit/form");
|
|
15
|
+
var _primitives = require("@atlaskit/primitives");
|
|
15
16
|
var _toggle = _interopRequireDefault(require("@atlaskit/toggle"));
|
|
16
17
|
var _FieldMessages = _interopRequireDefault(require("../FieldMessages"));
|
|
17
18
|
var _types = require("../types");
|
|
18
|
-
var _RequiredIndicator = require("./common/RequiredIndicator");
|
|
19
19
|
var _excluded = ["value"],
|
|
20
20
|
_excluded2 = ["id", "value"];
|
|
21
21
|
/**
|
|
@@ -119,10 +119,8 @@ function Toggle(_ref3) {
|
|
|
119
119
|
css: toggleLabelStyles,
|
|
120
120
|
id: id,
|
|
121
121
|
htmlFor: id
|
|
122
|
-
}, label, isRequired ?
|
|
123
|
-
|
|
124
|
-
(0, _react2.jsx)("span", {
|
|
125
|
-
css: _RequiredIndicator.requiredIndicator,
|
|
122
|
+
}, label, isRequired ? (0, _react2.jsx)(_primitives.Text, {
|
|
123
|
+
color: "color.text.danger",
|
|
126
124
|
"aria-hidden": "true"
|
|
127
125
|
}, "*") : null), (0, _react2.jsx)(_toggle.default, (0, _extends2.default)({}, restFieldProps, {
|
|
128
126
|
onChange: function onChange(event) {
|
|
@@ -11,10 +11,10 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
12
12
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
13
13
|
var _form = require("@atlaskit/form");
|
|
14
|
+
var _primitives = require("@atlaskit/primitives");
|
|
14
15
|
var _typography = require("@atlaskit/theme/typography");
|
|
15
16
|
var _FieldMessages = _interopRequireDefault(require("../FieldMessages"));
|
|
16
17
|
var _utils = require("../utils");
|
|
17
|
-
var _RequiredIndicator = require("./common/RequiredIndicator");
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
20
20
|
* @jsxRuntime classic
|
|
@@ -398,10 +398,8 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
398
398
|
css: colorPickerWrapperStyles
|
|
399
399
|
}, (0, _react2.jsx)("label", {
|
|
400
400
|
css: colorPickerLabelStyles
|
|
401
|
-
}, label, isRequired &&
|
|
402
|
-
|
|
403
|
-
(0, _react2.jsx)("span", {
|
|
404
|
-
css: _RequiredIndicator.requiredIndicator,
|
|
401
|
+
}, label, isRequired && (0, _react2.jsx)(_primitives.Text, {
|
|
402
|
+
color: "color.text.danger",
|
|
405
403
|
"aria-hidden": "true"
|
|
406
404
|
}, "*")), (0, _react2.jsx)(ColorPicker, {
|
|
407
405
|
name: name,
|
|
@@ -21,6 +21,7 @@ var _react2 = require("@emotion/react");
|
|
|
21
21
|
var _reactIntlNext = require("react-intl-next");
|
|
22
22
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
23
23
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
24
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
24
25
|
var _addCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/add-circle"));
|
|
25
26
|
var _primitives = require("@atlaskit/primitives");
|
|
26
27
|
var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
|
|
@@ -246,7 +247,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
246
247
|
var children = this.renderActions();
|
|
247
248
|
return (0, _react2.jsx)(_react.Fragment, null, error && (0, _react2.jsx)(FieldsetError, {
|
|
248
249
|
message: error
|
|
249
|
-
}), (0, _react2.jsx)("div", null, options
|
|
250
|
+
}), (0, _react2.jsx)("div", null, (options === null || options === void 0 ? void 0 : options.showTitle) && (0, _react2.jsx)(_heading.default, {
|
|
251
|
+
size: "xsmall"
|
|
252
|
+
}, label), (0, _react2.jsx)(FormComponent, {
|
|
250
253
|
fields: selectedFields,
|
|
251
254
|
parentName: name,
|
|
252
255
|
extensionManifest: extensionManifest,
|
|
@@ -13,6 +13,7 @@ var _new = require("@atlaskit/button/new");
|
|
|
13
13
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
15
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
16
|
+
var _primitives = require("@atlaskit/primitives");
|
|
16
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
18
19
|
/**
|
|
@@ -77,11 +78,11 @@ var itemTextStyles = (0, _react2.css)({
|
|
|
77
78
|
textOverflow: 'ellipsis'
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
|
-
var descriptionStyles = (0,
|
|
81
|
-
marginBottom:
|
|
81
|
+
var descriptionStyles = (0, _primitives.xcss)({
|
|
82
|
+
marginBottom: 'space.300'
|
|
82
83
|
});
|
|
83
|
-
var helpLinkStyles = (0,
|
|
84
|
-
paddingTop:
|
|
84
|
+
var helpLinkStyles = (0, _primitives.xcss)({
|
|
85
|
+
paddingTop: 'space.150'
|
|
85
86
|
});
|
|
86
87
|
var closeButtonWrapperStyles = (0, _react2.css)({
|
|
87
88
|
width: buttonWidth,
|
|
@@ -131,18 +132,22 @@ var Header = function Header(_ref) {
|
|
|
131
132
|
label: intl.formatMessage(_extensions.configPanelMessages.close),
|
|
132
133
|
icon: _cross.default,
|
|
133
134
|
onClick: onClose
|
|
134
|
-
}))), (description || documentationUrl) && (0, _react2.jsx)(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
}))), (description || documentationUrl) && (0, _react2.jsx)(_primitives.Box, {
|
|
136
|
+
xcss: descriptionStyles
|
|
137
|
+
}, (0, _react2.jsx)(_primitives.Text, {
|
|
138
|
+
as: "p",
|
|
139
|
+
testId: "config-panel-header-description"
|
|
140
|
+
}, description && (0, _react2.jsx)(_react.Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? (0, _react2.jsx)(_primitives.Box, {
|
|
141
|
+
xcss: helpLinkStyles
|
|
142
|
+
}, (0, _react2.jsx)(_primitives.Text, {
|
|
143
|
+
as: "p"
|
|
139
144
|
}, (0, _react2.jsx)(HelpLink, {
|
|
140
145
|
documentationUrl: documentationUrl,
|
|
141
146
|
label: intl.formatMessage(_extensions.configPanelMessages.help)
|
|
142
|
-
})) : (0, _react2.jsx)(HelpLink, {
|
|
147
|
+
}))) : (0, _react2.jsx)(HelpLink, {
|
|
143
148
|
documentationUrl: documentationUrl,
|
|
144
149
|
label: intl.formatMessage(_extensions.configPanelMessages.documentation)
|
|
145
|
-
}))));
|
|
150
|
+
})))));
|
|
146
151
|
};
|
|
147
152
|
var HelpLink = function HelpLink(_ref2) {
|
|
148
153
|
var documentationUrl = _ref2.documentationUrl,
|
|
@@ -11,6 +11,7 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
13
13
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
14
|
+
var _primitives = require("@atlaskit/primitives");
|
|
14
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
16
|
/**
|
|
16
17
|
* @jsxRuntime classic
|
|
@@ -37,8 +38,8 @@ var saveIndicatorContentStyles = (0, _react2.css)({
|
|
|
37
38
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0px 8px 12px rgba(9, 30, 66, 0.15), 0px 0px 1px rgba(9, 30, 66, 0.31)", ")"),
|
|
38
39
|
borderRadius: '16px'
|
|
39
40
|
});
|
|
40
|
-
var saveIndicatorTextStyles = (0,
|
|
41
|
-
paddingLeft:
|
|
41
|
+
var saveIndicatorTextStyles = (0, _primitives.xcss)({
|
|
42
|
+
paddingLeft: 'space.075'
|
|
42
43
|
});
|
|
43
44
|
var SaveIndicator = exports.SaveIndicator = function SaveIndicator(_ref) {
|
|
44
45
|
var children = _ref.children,
|
|
@@ -78,7 +79,7 @@ var SaveIndicator = exports.SaveIndicator = function SaveIndicator(_ref) {
|
|
|
78
79
|
label: "Saving",
|
|
79
80
|
primaryColor: "var(--ds-icon-success, ".concat(_colors.G300, ")"),
|
|
80
81
|
size: "small"
|
|
81
|
-
}), (0, _react2.jsx)(
|
|
82
|
-
|
|
83
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _extensions.messages.saveIndicator)))));
|
|
82
|
+
}), (0, _react2.jsx)(_primitives.Box, {
|
|
83
|
+
xcss: saveIndicatorTextStyles
|
|
84
|
+
}, (0, _react2.jsx)(_primitives.Text, null, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _extensions.messages.saveIndicator))))));
|
|
84
85
|
};
|
|
@@ -2,6 +2,7 @@ import React, { Fragment, useMemo } from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import { ErrorMessage, HelperMessage } from '@atlaskit/form';
|
|
5
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
6
|
import { FieldTypeError, ValidationError } from './types';
|
|
6
7
|
|
|
7
8
|
// sidestep XSS issues
|
|
@@ -36,11 +37,17 @@ function makeMarkup(fragment, key) {
|
|
|
36
37
|
key: key
|
|
37
38
|
}, children);
|
|
38
39
|
case 'STRONG':
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
41
|
+
as: "strong",
|
|
42
|
+
color: "color.text.subtlest",
|
|
43
|
+
size: "UNSAFE_small",
|
|
40
44
|
key: key
|
|
41
45
|
}, children);
|
|
42
46
|
case 'EM':
|
|
43
|
-
return /*#__PURE__*/React.createElement(
|
|
47
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
48
|
+
as: "em",
|
|
49
|
+
color: "color.text.subtlest",
|
|
50
|
+
size: "UNSAFE_small",
|
|
44
51
|
key: key
|
|
45
52
|
}, children);
|
|
46
53
|
case 'CODE':
|
|
@@ -9,10 +9,10 @@ import React, { Fragment } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
11
11
|
import { Field } from '@atlaskit/form';
|
|
12
|
+
import { Text } from '@atlaskit/primitives';
|
|
12
13
|
import AKToggle from '@atlaskit/toggle';
|
|
13
14
|
import FieldMessages from '../FieldMessages';
|
|
14
15
|
import { ValidationError } from '../types';
|
|
15
|
-
import { requiredIndicator } from './common/RequiredIndicator';
|
|
16
16
|
const toggleFieldWrapperStyles = css({
|
|
17
17
|
display: 'flex'
|
|
18
18
|
});
|
|
@@ -109,10 +109,8 @@ function Toggle({
|
|
|
109
109
|
css: toggleLabelStyles,
|
|
110
110
|
id: id,
|
|
111
111
|
htmlFor: id
|
|
112
|
-
}, label, isRequired ?
|
|
113
|
-
|
|
114
|
-
jsx("span", {
|
|
115
|
-
css: requiredIndicator,
|
|
112
|
+
}, label, isRequired ? jsx(Text, {
|
|
113
|
+
color: "color.text.danger",
|
|
116
114
|
"aria-hidden": "true"
|
|
117
115
|
}, "*") : null), jsx(AKToggle, _extends({}, restFieldProps, {
|
|
118
116
|
onChange: event => handleOnChange(fieldProps.onChange, onFieldChange, event),
|
|
@@ -9,10 +9,11 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { chartsColorPaletteTooltipMessages, DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { ColorPickerButton } from '@atlaskit/editor-common/ui-menu';
|
|
11
11
|
import { Field } from '@atlaskit/form';
|
|
12
|
+
import { Text } from '@atlaskit/primitives';
|
|
12
13
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
13
14
|
import FieldMessages from '../FieldMessages';
|
|
14
15
|
import { validate } from '../utils';
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
/*
|
|
17
18
|
NOTE: color used here are not yet in atlaskit code
|
|
18
19
|
this is part of extended color pack from ADG, which is yet to be release
|
|
@@ -392,10 +393,8 @@ const ColorPickerField = ({
|
|
|
392
393
|
css: colorPickerWrapperStyles
|
|
393
394
|
}, jsx("label", {
|
|
394
395
|
css: colorPickerLabelStyles
|
|
395
|
-
}, label, isRequired &&
|
|
396
|
-
|
|
397
|
-
jsx("span", {
|
|
398
|
-
css: requiredIndicator,
|
|
396
|
+
}, label, isRequired && jsx(Text, {
|
|
397
|
+
color: "color.text.danger",
|
|
399
398
|
"aria-hidden": "true"
|
|
400
399
|
}, "*")), jsx(ColorPicker, {
|
|
401
400
|
name: name,
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import Button from '@atlaskit/button/new';
|
|
13
13
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
14
|
+
import Heading from '@atlaskit/heading';
|
|
14
15
|
import AddCircleIcon from '@atlaskit/icon/glyph/add-circle';
|
|
15
16
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
16
17
|
import SectionMessage from '@atlaskit/section-message';
|
|
@@ -204,7 +205,9 @@ class FieldsetField extends React.Component {
|
|
|
204
205
|
const children = this.renderActions();
|
|
205
206
|
return jsx(Fragment, null, error && jsx(FieldsetError, {
|
|
206
207
|
message: error
|
|
207
|
-
}), jsx("div", null, options
|
|
208
|
+
}), jsx("div", null, (options === null || options === void 0 ? void 0 : options.showTitle) && jsx(Heading, {
|
|
209
|
+
size: "xsmall"
|
|
210
|
+
}, label), jsx(FormComponent, {
|
|
208
211
|
fields: selectedFields,
|
|
209
212
|
parentName: name,
|
|
210
213
|
extensionManifest: extensionManifest,
|
|
@@ -12,6 +12,7 @@ import { IconButton } from '@atlaskit/button/new';
|
|
|
12
12
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
15
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
15
16
|
import { N200 } from '@atlaskit/theme/colors';
|
|
16
17
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
17
18
|
const iconWidth = 40;
|
|
@@ -69,11 +70,11 @@ const itemTextStyles = css({
|
|
|
69
70
|
textOverflow: 'ellipsis'
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
|
-
const descriptionStyles =
|
|
73
|
-
marginBottom:
|
|
73
|
+
const descriptionStyles = xcss({
|
|
74
|
+
marginBottom: 'space.300'
|
|
74
75
|
});
|
|
75
|
-
const helpLinkStyles =
|
|
76
|
-
paddingTop:
|
|
76
|
+
const helpLinkStyles = xcss({
|
|
77
|
+
paddingTop: 'space.150'
|
|
77
78
|
});
|
|
78
79
|
const closeButtonWrapperStyles = css({
|
|
79
80
|
width: buttonWidth,
|
|
@@ -122,18 +123,22 @@ const Header = ({
|
|
|
122
123
|
label: intl.formatMessage(messages.close),
|
|
123
124
|
icon: CrossIcon,
|
|
124
125
|
onClick: onClose
|
|
125
|
-
}))), (description || documentationUrl) && jsx(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
}))), (description || documentationUrl) && jsx(Box, {
|
|
127
|
+
xcss: descriptionStyles
|
|
128
|
+
}, jsx(Text, {
|
|
129
|
+
as: "p",
|
|
130
|
+
testId: "config-panel-header-description"
|
|
131
|
+
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? jsx(Box, {
|
|
132
|
+
xcss: helpLinkStyles
|
|
133
|
+
}, jsx(Text, {
|
|
134
|
+
as: "p"
|
|
130
135
|
}, jsx(HelpLink, {
|
|
131
136
|
documentationUrl: documentationUrl,
|
|
132
137
|
label: intl.formatMessage(messages.help)
|
|
133
|
-
})) : jsx(HelpLink, {
|
|
138
|
+
}))) : jsx(HelpLink, {
|
|
134
139
|
documentationUrl: documentationUrl,
|
|
135
140
|
label: intl.formatMessage(messages.documentation)
|
|
136
|
-
}))));
|
|
141
|
+
})))));
|
|
137
142
|
};
|
|
138
143
|
const HelpLink = ({
|
|
139
144
|
documentationUrl,
|
|
@@ -9,6 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
11
11
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
12
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
12
13
|
import { G300, N0 } from '@atlaskit/theme/colors';
|
|
13
14
|
const noop = () => {};
|
|
14
15
|
const saveIndicatorWrapperStyles = css({
|
|
@@ -28,8 +29,8 @@ const saveIndicatorContentStyles = css({
|
|
|
28
29
|
boxShadow: `var(--ds-shadow-overlay, ${`0px 8px 12px rgba(9, 30, 66, 0.15), 0px 0px 1px rgba(9, 30, 66, 0.31)`})`,
|
|
29
30
|
borderRadius: '16px'
|
|
30
31
|
});
|
|
31
|
-
const saveIndicatorTextStyles =
|
|
32
|
-
paddingLeft:
|
|
32
|
+
const saveIndicatorTextStyles = xcss({
|
|
33
|
+
paddingLeft: 'space.075'
|
|
33
34
|
});
|
|
34
35
|
export const SaveIndicator = ({
|
|
35
36
|
children,
|
|
@@ -64,7 +65,7 @@ export const SaveIndicator = ({
|
|
|
64
65
|
label: "Saving",
|
|
65
66
|
primaryColor: `var(--ds-icon-success, ${G300})`,
|
|
66
67
|
size: "small"
|
|
67
|
-
}), jsx(
|
|
68
|
-
|
|
69
|
-
}, jsx(FormattedMessage, messages.saveIndicator)))));
|
|
68
|
+
}), jsx(Box, {
|
|
69
|
+
xcss: saveIndicatorTextStyles
|
|
70
|
+
}, jsx(Text, null, jsx(FormattedMessage, messages.saveIndicator))))));
|
|
70
71
|
};
|
|
@@ -2,6 +2,7 @@ import React, { Fragment, useMemo } from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import { ErrorMessage, HelperMessage } from '@atlaskit/form';
|
|
5
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
6
|
import { FieldTypeError, ValidationError } from './types';
|
|
6
7
|
|
|
7
8
|
// sidestep XSS issues
|
|
@@ -34,11 +35,17 @@ function makeMarkup(fragment, key) {
|
|
|
34
35
|
key: key
|
|
35
36
|
}, children);
|
|
36
37
|
case 'STRONG':
|
|
37
|
-
return /*#__PURE__*/React.createElement(
|
|
38
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
39
|
+
as: "strong",
|
|
40
|
+
color: "color.text.subtlest",
|
|
41
|
+
size: "UNSAFE_small",
|
|
38
42
|
key: key
|
|
39
43
|
}, children);
|
|
40
44
|
case 'EM':
|
|
41
|
-
return /*#__PURE__*/React.createElement(
|
|
45
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
46
|
+
as: "em",
|
|
47
|
+
color: "color.text.subtlest",
|
|
48
|
+
size: "UNSAFE_small",
|
|
42
49
|
key: key
|
|
43
50
|
}, children);
|
|
44
51
|
case 'CODE':
|
|
@@ -12,10 +12,10 @@ import React, { Fragment } from 'react';
|
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
13
|
import { Checkbox as AKCheckbox } from '@atlaskit/checkbox';
|
|
14
14
|
import { Field } from '@atlaskit/form';
|
|
15
|
+
import { Text } from '@atlaskit/primitives';
|
|
15
16
|
import AKToggle from '@atlaskit/toggle';
|
|
16
17
|
import FieldMessages from '../FieldMessages';
|
|
17
18
|
import { ValidationError } from '../types';
|
|
18
|
-
import { requiredIndicator } from './common/RequiredIndicator';
|
|
19
19
|
var toggleFieldWrapperStyles = css({
|
|
20
20
|
display: 'flex'
|
|
21
21
|
});
|
|
@@ -110,10 +110,8 @@ function Toggle(_ref3) {
|
|
|
110
110
|
css: toggleLabelStyles,
|
|
111
111
|
id: id,
|
|
112
112
|
htmlFor: id
|
|
113
|
-
}, label, isRequired ?
|
|
114
|
-
|
|
115
|
-
jsx("span", {
|
|
116
|
-
css: requiredIndicator,
|
|
113
|
+
}, label, isRequired ? jsx(Text, {
|
|
114
|
+
color: "color.text.danger",
|
|
117
115
|
"aria-hidden": "true"
|
|
118
116
|
}, "*") : null), jsx(AKToggle, _extends({}, restFieldProps, {
|
|
119
117
|
onChange: function onChange(event) {
|
|
@@ -12,10 +12,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';
|
|
14
14
|
import { Field } from '@atlaskit/form';
|
|
15
|
+
import { Text } from '@atlaskit/primitives';
|
|
15
16
|
import { headingSizes } from '@atlaskit/theme/typography';
|
|
16
17
|
import FieldMessages from '../FieldMessages';
|
|
17
18
|
import { validate as _validate } from '../utils';
|
|
18
|
-
|
|
19
|
+
|
|
19
20
|
/*
|
|
20
21
|
NOTE: color used here are not yet in atlaskit code
|
|
21
22
|
this is part of extended color pack from ADG, which is yet to be release
|
|
@@ -394,10 +395,8 @@ var ColorPickerField = function ColorPickerField(_ref) {
|
|
|
394
395
|
css: colorPickerWrapperStyles
|
|
395
396
|
}, jsx("label", {
|
|
396
397
|
css: colorPickerLabelStyles
|
|
397
|
-
}, label, isRequired &&
|
|
398
|
-
|
|
399
|
-
jsx("span", {
|
|
400
|
-
css: requiredIndicator,
|
|
398
|
+
}, label, isRequired && jsx(Text, {
|
|
399
|
+
color: "color.text.danger",
|
|
401
400
|
"aria-hidden": "true"
|
|
402
401
|
}, "*")), jsx(ColorPicker, {
|
|
403
402
|
name: name,
|
|
@@ -23,6 +23,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
23
23
|
import { injectIntl } from 'react-intl-next';
|
|
24
24
|
import Button from '@atlaskit/button/new';
|
|
25
25
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
26
|
+
import Heading from '@atlaskit/heading';
|
|
26
27
|
import AddCircleIcon from '@atlaskit/icon/glyph/add-circle';
|
|
27
28
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
28
29
|
import SectionMessage from '@atlaskit/section-message';
|
|
@@ -239,7 +240,9 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
239
240
|
var children = this.renderActions();
|
|
240
241
|
return jsx(Fragment, null, error && jsx(FieldsetError, {
|
|
241
242
|
message: error
|
|
242
|
-
}), jsx("div", null, options
|
|
243
|
+
}), jsx("div", null, (options === null || options === void 0 ? void 0 : options.showTitle) && jsx(Heading, {
|
|
244
|
+
size: "xsmall"
|
|
245
|
+
}, label), jsx(FormComponent, {
|
|
243
246
|
fields: selectedFields,
|
|
244
247
|
parentName: name,
|
|
245
248
|
extensionManifest: extensionManifest,
|
|
@@ -12,6 +12,7 @@ import { IconButton } from '@atlaskit/button/new';
|
|
|
12
12
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
13
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
15
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
15
16
|
import { N200 } from '@atlaskit/theme/colors';
|
|
16
17
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
17
18
|
var iconWidth = 40;
|
|
@@ -69,11 +70,11 @@ var itemTextStyles = css({
|
|
|
69
70
|
textOverflow: 'ellipsis'
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
|
-
var descriptionStyles =
|
|
73
|
-
marginBottom:
|
|
73
|
+
var descriptionStyles = xcss({
|
|
74
|
+
marginBottom: 'space.300'
|
|
74
75
|
});
|
|
75
|
-
var helpLinkStyles =
|
|
76
|
-
paddingTop:
|
|
76
|
+
var helpLinkStyles = xcss({
|
|
77
|
+
paddingTop: 'space.150'
|
|
77
78
|
});
|
|
78
79
|
var closeButtonWrapperStyles = css({
|
|
79
80
|
width: buttonWidth,
|
|
@@ -123,18 +124,22 @@ var Header = function Header(_ref) {
|
|
|
123
124
|
label: intl.formatMessage(messages.close),
|
|
124
125
|
icon: CrossIcon,
|
|
125
126
|
onClick: onClose
|
|
126
|
-
}))), (description || documentationUrl) && jsx(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
}))), (description || documentationUrl) && jsx(Box, {
|
|
128
|
+
xcss: descriptionStyles
|
|
129
|
+
}, jsx(Text, {
|
|
130
|
+
as: "p",
|
|
131
|
+
testId: "config-panel-header-description"
|
|
132
|
+
}, description && jsx(Fragment, null, description.replace(/([^.])$/, '$1.'), " "), documentationUrl && (enableHelpCTA ? jsx(Box, {
|
|
133
|
+
xcss: helpLinkStyles
|
|
134
|
+
}, jsx(Text, {
|
|
135
|
+
as: "p"
|
|
131
136
|
}, jsx(HelpLink, {
|
|
132
137
|
documentationUrl: documentationUrl,
|
|
133
138
|
label: intl.formatMessage(messages.help)
|
|
134
|
-
})) : jsx(HelpLink, {
|
|
139
|
+
}))) : jsx(HelpLink, {
|
|
135
140
|
documentationUrl: documentationUrl,
|
|
136
141
|
label: intl.formatMessage(messages.documentation)
|
|
137
|
-
}))));
|
|
142
|
+
})))));
|
|
138
143
|
};
|
|
139
144
|
var HelpLink = function HelpLink(_ref2) {
|
|
140
145
|
var documentationUrl = _ref2.documentationUrl,
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
13
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
13
14
|
import { G300, N0 } from '@atlaskit/theme/colors';
|
|
14
15
|
var noop = function noop() {};
|
|
15
16
|
var saveIndicatorWrapperStyles = css({
|
|
@@ -29,8 +30,8 @@ var saveIndicatorContentStyles = css({
|
|
|
29
30
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0px 8px 12px rgba(9, 30, 66, 0.15), 0px 0px 1px rgba(9, 30, 66, 0.31)", ")"),
|
|
30
31
|
borderRadius: '16px'
|
|
31
32
|
});
|
|
32
|
-
var saveIndicatorTextStyles =
|
|
33
|
-
paddingLeft:
|
|
33
|
+
var saveIndicatorTextStyles = xcss({
|
|
34
|
+
paddingLeft: 'space.075'
|
|
34
35
|
});
|
|
35
36
|
export var SaveIndicator = function SaveIndicator(_ref) {
|
|
36
37
|
var children = _ref.children,
|
|
@@ -70,7 +71,7 @@ export var SaveIndicator = function SaveIndicator(_ref) {
|
|
|
70
71
|
label: "Saving",
|
|
71
72
|
primaryColor: "var(--ds-icon-success, ".concat(G300, ")"),
|
|
72
73
|
size: "small"
|
|
73
|
-
}), jsx(
|
|
74
|
-
|
|
75
|
-
}, jsx(FormattedMessage, messages.saveIndicator)))));
|
|
74
|
+
}), jsx(Box, {
|
|
75
|
+
xcss: saveIndicatorTextStyles
|
|
76
|
+
}, jsx(Text, null, jsx(FormattedMessage, messages.saveIndicator))))));
|
|
76
77
|
};
|
|
@@ -1,22 +1,72 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
import type { ExtensionManifest, FieldDefinition, OnSaveCallback, Parameters } from '@atlaskit/editor-common/extensions';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
extensionManifest?: ExtensionManifest;
|
|
8
|
-
fields?: FieldDefinition[];
|
|
9
|
-
parameters?: Parameters;
|
|
10
|
-
autoSaveTrigger?: () => void;
|
|
11
|
-
autoSaveReject?: RejectSave;
|
|
12
|
-
showHeader?: boolean;
|
|
13
|
-
closeOnEsc?: boolean;
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { RejectSave } from '../../types';
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
7
|
+
extensionManifest?: ExtensionManifest | undefined;
|
|
8
|
+
fields?: FieldDefinition[] | undefined;
|
|
9
|
+
parameters?: Parameters | undefined;
|
|
10
|
+
autoSaveTrigger?: (() => void) | undefined;
|
|
11
|
+
autoSaveReject?: RejectSave | undefined;
|
|
12
|
+
showHeader?: boolean | undefined;
|
|
13
|
+
closeOnEsc?: boolean | undefined;
|
|
14
14
|
onChange: OnSaveCallback;
|
|
15
15
|
onCancel: () => void;
|
|
16
16
|
errorMessage: string | null;
|
|
17
|
-
isLoading?: boolean;
|
|
18
|
-
featureFlags?: FeatureFlags;
|
|
19
|
-
api:
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
isLoading?: boolean | undefined;
|
|
18
|
+
featureFlags?: FeatureFlags | undefined;
|
|
19
|
+
api: import("@atlaskit/editor-common/types").EditorInjectionAPI<"extension", {
|
|
20
|
+
pluginConfiguration: import("../../types").ExtensionPluginOptions | undefined;
|
|
21
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
22
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
23
|
+
sharedState: {
|
|
24
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
25
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
26
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
27
|
+
};
|
|
28
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
29
|
+
pluginConfiguration: FeatureFlags;
|
|
30
|
+
sharedState: FeatureFlags;
|
|
31
|
+
}, FeatureFlags>>];
|
|
32
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
33
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
34
|
+
pluginConfiguration: FeatureFlags;
|
|
35
|
+
sharedState: FeatureFlags;
|
|
36
|
+
}, FeatureFlags>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
37
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
38
|
+
}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
39
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
40
|
+
actions: {
|
|
41
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
42
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
43
|
+
};
|
|
44
|
+
}, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
45
|
+
actions: {
|
|
46
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
47
|
+
};
|
|
48
|
+
sharedState: {
|
|
49
|
+
contents: React.ReactNode[] | undefined;
|
|
50
|
+
} | undefined;
|
|
51
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextIdentifier", {
|
|
52
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-context-identifier").PluginConfiguration | undefined;
|
|
53
|
+
sharedState: import("@atlaskit/editor-plugin-context-identifier").ContextIdentifierConfiguration | undefined;
|
|
54
|
+
commands: {
|
|
55
|
+
setProvider: (config: import("@atlaskit/editor-plugin-context-identifier").ContextIdentifierConfiguration) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
56
|
+
};
|
|
57
|
+
}, import("@atlaskit/editor-plugin-context-identifier").PluginConfiguration | undefined>>];
|
|
58
|
+
sharedState: {
|
|
59
|
+
showContextPanel: boolean | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
actions: {
|
|
62
|
+
editSelectedExtension: () => boolean;
|
|
63
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI;
|
|
64
|
+
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
65
|
+
insertOrReplaceExtension: ({ editorView, action, attrs, content, position, size, tr, }: import("../../types").InsertOrReplaceExtensionType) => import("prosemirror-state").Transaction;
|
|
66
|
+
insertOrReplaceBodiedExtension: ({ editorView, action, attrs, content, position, size, tr, }: import("../../types").InsertOrReplaceExtensionType) => import("prosemirror-state").Transaction;
|
|
67
|
+
runMacroAutoConvert: import("../../types").RunMacroAutoConvert;
|
|
68
|
+
forceAutoSave: (applyChangeToContextPanel: import("@atlaskit/editor-plugin-context-panel").ApplyChangeHandler | undefined) => (resolve: () => void, reject?: RejectSave | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
69
|
+
};
|
|
70
|
+
}> | undefined;
|
|
71
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "featureFlags" | "api" | "autoSaveReject" | "parameters" | "key" | "onChange" | "errorMessage" | "analyticsContext" | "fields" | "extensionManifest" | "isLoading" | "onCancel" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
|
|
22
72
|
export default _default;
|
|
@@ -12,5 +12,7 @@ interface Props {
|
|
|
12
12
|
export declare const FormErrorBoundaryImpl: React.FC<import("react-intl-next").WithIntlProps<Props & WithAnalyticsEventsProps & WrappedComponentProps>> & {
|
|
13
13
|
WrappedComponent: React.ComponentType<Props & WithAnalyticsEventsProps & WrappedComponentProps>;
|
|
14
14
|
};
|
|
15
|
-
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Omit<
|
|
15
|
+
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WithAnalyticsEventsProps & WrappedComponentProps, "intl"> & {
|
|
16
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
17
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "analyticsContext" | "forwardedRef" | keyof Props> & React.RefAttributes<any>>;
|
|
16
18
|
export {};
|
|
@@ -1,22 +1,81 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
import type { ExtensionManifest, FieldDefinition, OnSaveCallback, Parameters } from '@atlaskit/editor-common/extensions';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
extensionManifest?: ExtensionManifest;
|
|
8
|
-
fields?: FieldDefinition[];
|
|
9
|
-
parameters?: Parameters;
|
|
10
|
-
autoSaveTrigger?: () => void;
|
|
11
|
-
autoSaveReject?: RejectSave;
|
|
12
|
-
showHeader?: boolean;
|
|
13
|
-
closeOnEsc?: boolean;
|
|
4
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { RejectSave } from '../../types';
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
7
|
+
extensionManifest?: ExtensionManifest | undefined;
|
|
8
|
+
fields?: FieldDefinition[] | undefined;
|
|
9
|
+
parameters?: Parameters | undefined;
|
|
10
|
+
autoSaveTrigger?: (() => void) | undefined;
|
|
11
|
+
autoSaveReject?: RejectSave | undefined;
|
|
12
|
+
showHeader?: boolean | undefined;
|
|
13
|
+
closeOnEsc?: boolean | undefined;
|
|
14
14
|
onChange: OnSaveCallback;
|
|
15
15
|
onCancel: () => void;
|
|
16
16
|
errorMessage: string | null;
|
|
17
|
-
isLoading?: boolean;
|
|
18
|
-
featureFlags?: FeatureFlags;
|
|
19
|
-
api:
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
isLoading?: boolean | undefined;
|
|
18
|
+
featureFlags?: FeatureFlags | undefined;
|
|
19
|
+
api: import("@atlaskit/editor-common/types").EditorInjectionAPI<"extension", {
|
|
20
|
+
pluginConfiguration: import("../../types").ExtensionPluginOptions | undefined;
|
|
21
|
+
dependencies: [
|
|
22
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
23
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
24
|
+
sharedState: {
|
|
25
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
26
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
27
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
28
|
+
};
|
|
29
|
+
dependencies: [
|
|
30
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
31
|
+
pluginConfiguration: FeatureFlags;
|
|
32
|
+
sharedState: FeatureFlags;
|
|
33
|
+
}, FeatureFlags>>
|
|
34
|
+
];
|
|
35
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
36
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>,
|
|
37
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
38
|
+
pluginConfiguration: FeatureFlags;
|
|
39
|
+
sharedState: FeatureFlags;
|
|
40
|
+
}, FeatureFlags>>,
|
|
41
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"width", {
|
|
42
|
+
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
43
|
+
}, undefined>,
|
|
44
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"decorations", {
|
|
45
|
+
sharedState: import("@atlaskit/editor-plugin-decorations").DecorationState;
|
|
46
|
+
actions: {
|
|
47
|
+
hoverDecoration: (nodeType: import("prosemirror-model").NodeType | import("prosemirror-model").NodeType[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
48
|
+
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
49
|
+
};
|
|
50
|
+
}, undefined>,
|
|
51
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
|
|
52
|
+
actions: {
|
|
53
|
+
applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
|
|
54
|
+
};
|
|
55
|
+
sharedState: {
|
|
56
|
+
contents: React.ReactNode[] | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
}, undefined>>,
|
|
59
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextIdentifier", {
|
|
60
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-context-identifier").PluginConfiguration | undefined;
|
|
61
|
+
sharedState: import("@atlaskit/editor-plugin-context-identifier").ContextIdentifierConfiguration | undefined;
|
|
62
|
+
commands: {
|
|
63
|
+
setProvider: (config: import("@atlaskit/editor-plugin-context-identifier").ContextIdentifierConfiguration) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
64
|
+
};
|
|
65
|
+
}, import("@atlaskit/editor-plugin-context-identifier").PluginConfiguration | undefined>>
|
|
66
|
+
];
|
|
67
|
+
sharedState: {
|
|
68
|
+
showContextPanel: boolean | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
actions: {
|
|
71
|
+
editSelectedExtension: () => boolean;
|
|
72
|
+
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI;
|
|
73
|
+
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
74
|
+
insertOrReplaceExtension: ({ editorView, action, attrs, content, position, size, tr, }: import("../../types").InsertOrReplaceExtensionType) => import("prosemirror-state").Transaction;
|
|
75
|
+
insertOrReplaceBodiedExtension: ({ editorView, action, attrs, content, position, size, tr, }: import("../../types").InsertOrReplaceExtensionType) => import("prosemirror-state").Transaction;
|
|
76
|
+
runMacroAutoConvert: import("../../types").RunMacroAutoConvert;
|
|
77
|
+
forceAutoSave: (applyChangeToContextPanel: import("@atlaskit/editor-plugin-context-panel").ApplyChangeHandler | undefined) => (resolve: () => void, reject?: RejectSave | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
78
|
+
};
|
|
79
|
+
}> | undefined;
|
|
80
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "featureFlags" | "api" | "autoSaveReject" | "parameters" | "key" | "onChange" | "errorMessage" | "analyticsContext" | "fields" | "extensionManifest" | "isLoading" | "onCancel" | "autoSaveTrigger" | "showHeader" | "closeOnEsc"> & React.RefAttributes<any>>;
|
|
22
81
|
export default _default;
|
|
@@ -12,5 +12,7 @@ interface Props {
|
|
|
12
12
|
export declare const FormErrorBoundaryImpl: React.FC<import("react-intl-next").WithIntlProps<Props & WithAnalyticsEventsProps & WrappedComponentProps>> & {
|
|
13
13
|
WrappedComponent: React.ComponentType<Props & WithAnalyticsEventsProps & WrappedComponentProps>;
|
|
14
14
|
};
|
|
15
|
-
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Omit<
|
|
15
|
+
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Omit<Omit<Props & WithAnalyticsEventsProps & WrappedComponentProps, "intl"> & {
|
|
16
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
17
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "analyticsContext" | "forwardedRef" | keyof Props> & React.RefAttributes<any>>;
|
|
16
18
|
export {};
|
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
Parameters,
|
|
18
18
|
} from '@atlaskit/editor-common/extensions';
|
|
19
19
|
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions';
|
|
20
|
+
import Heading from '@atlaskit/heading';
|
|
20
21
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
21
22
|
import TextArea from '@atlaskit/textarea';
|
|
22
23
|
import * as colors from '@atlaskit/theme/colors';
|
|
@@ -97,7 +98,7 @@ function ExtensionConfigPanel({
|
|
|
97
98
|
<div css={exampleWrapperStyles}>
|
|
98
99
|
{/* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */}
|
|
99
100
|
<div css={column(400)} key="config-panel">
|
|
100
|
-
<
|
|
101
|
+
<Heading size="medium">Config panel:</Heading>
|
|
101
102
|
<ConfigPanelWithProviders
|
|
102
103
|
extensionType={extension.type}
|
|
103
104
|
extensionKey={extension.key}
|
|
@@ -109,11 +110,11 @@ function ExtensionConfigPanel({
|
|
|
109
110
|
</div>
|
|
110
111
|
{/* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */}
|
|
111
112
|
<div css={column(500)} key="parameters">
|
|
112
|
-
<
|
|
113
|
+
<Heading size="medium">Initial Parameters:</Heading>
|
|
113
114
|
<div css={codeWrapperStyles}>
|
|
114
115
|
{parameters && <TextArea onChange={onChangeParametersJson} value={parametersJson} />}
|
|
115
116
|
</div>
|
|
116
|
-
<
|
|
117
|
+
<Heading size="medium">State:</Heading>
|
|
117
118
|
<div css={codeWrapperStyles}>
|
|
118
119
|
{parameters && (
|
|
119
120
|
<CodeBlock
|
|
@@ -126,7 +127,7 @@ function ExtensionConfigPanel({
|
|
|
126
127
|
</div>
|
|
127
128
|
{/* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */}
|
|
128
129
|
<div css={column(500)} key="fields-definition">
|
|
129
|
-
<
|
|
130
|
+
<Heading size="medium">Fields definition:</Heading>
|
|
130
131
|
<div css={codeWrapperStyles}>
|
|
131
132
|
<CodeBlock
|
|
132
133
|
language="json"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
".": "./src/index.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-schema": "^40.9.
|
|
27
|
-
"@atlaskit/adf-utils": "^19.
|
|
26
|
+
"@atlaskit/adf-schema": "^40.9.4",
|
|
27
|
+
"@atlaskit/adf-utils": "^19.9.0",
|
|
28
28
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
29
29
|
"@atlaskit/avatar": "^21.15.0",
|
|
30
30
|
"@atlaskit/button": "^20.2.0",
|
|
31
31
|
"@atlaskit/checkbox": "^14.0.0",
|
|
32
|
-
"@atlaskit/datetime-picker": "^15.
|
|
33
|
-
"@atlaskit/editor-common": "^93.
|
|
34
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
32
|
+
"@atlaskit/datetime-picker": "^15.3.0",
|
|
33
|
+
"@atlaskit/editor-common": "^93.3.0",
|
|
34
|
+
"@atlaskit/editor-json-transformer": "^8.19.0",
|
|
35
|
+
"@atlaskit/editor-plugin-analytics": "^1.9.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-panel": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
@@ -43,19 +43,20 @@
|
|
|
43
43
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
44
44
|
"@atlaskit/empty-state": "^7.11.0",
|
|
45
45
|
"@atlaskit/form": "^10.5.0",
|
|
46
|
-
"@atlaskit/
|
|
46
|
+
"@atlaskit/heading": "2.4.6",
|
|
47
|
+
"@atlaskit/icon": "^22.22.0",
|
|
47
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
48
49
|
"@atlaskit/primitives": "^12.2.0",
|
|
49
50
|
"@atlaskit/radio": "^6.5.0",
|
|
50
51
|
"@atlaskit/section-message": "^6.6.0",
|
|
51
|
-
"@atlaskit/select": "^18.
|
|
52
|
+
"@atlaskit/select": "^18.1.0",
|
|
52
53
|
"@atlaskit/smart-user-picker": "^6.10.0",
|
|
53
54
|
"@atlaskit/spinner": "^16.3.0",
|
|
54
|
-
"@atlaskit/tabs": "^16.
|
|
55
|
+
"@atlaskit/tabs": "^16.5.0",
|
|
55
56
|
"@atlaskit/textarea": "^5.6.0",
|
|
56
57
|
"@atlaskit/textfield": "^6.5.0",
|
|
57
58
|
"@atlaskit/theme": "^13.0.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^2.3.0",
|
|
59
60
|
"@atlaskit/toggle": "^13.4.0",
|
|
60
61
|
"@atlaskit/tokens": "^2.0.0",
|
|
61
62
|
"@atlaskit/tooltip": "^18.8.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.requiredIndicator = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
var requiredIndicator = exports.requiredIndicator = (0, _react.css)({
|
|
13
|
-
color: "var(--ds-text-danger, ".concat(_colors.R500, ")")
|
|
14
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { R500 } from '@atlaskit/theme/colors';
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
|
-
export const requiredIndicator = css({
|
|
6
|
-
color: `var(--ds-text-danger, ${R500})`
|
|
7
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { R500 } from '@atlaskit/theme/colors';
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
|
-
export var requiredIndicator = css({
|
|
6
|
-
color: "var(--ds-text-danger, ".concat(R500, ")")
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const requiredIndicator: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const requiredIndicator: import("@emotion/react").SerializedStyles;
|