@atlaskit/editor-plugin-media 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/pm-plugins/main.js +8 -6
- package/dist/cjs/toolbar/index.js +8 -5
- package/dist/cjs/utils/media-inline.js +4 -4
- package/dist/es2019/plugin.js +2 -1
- package/dist/es2019/pm-plugins/main.js +5 -4
- package/dist/es2019/toolbar/index.js +6 -3
- package/dist/es2019/utils/media-inline.js +4 -4
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/pm-plugins/main.js +7 -5
- package/dist/esm/toolbar/index.js +6 -3
- package/dist/esm/utils/media-inline.js +4 -4
- package/dist/types/types.d.ts +6 -0
- package/dist/types/utils/media-inline.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +6 -0
- package/dist/types-ts4.5/utils/media-inline.d.ts +2 -2
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#68372](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68372) [`17f42e77e826`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/17f42e77e826) - add allowMediaInlineImage media option to support new media inline image feature
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 0.12.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#70373](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70373) [`fdcf1d5c6b11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fdcf1d5c6b11) - Fix duplicate I18N IDs for media toolbar
|
|
15
|
+
|
|
3
16
|
## 0.12.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -280,7 +280,8 @@ var mediaPlugin = exports.mediaPlugin = function mediaPlugin(_ref2) {
|
|
|
280
280
|
allowAdvancedToolBarOptions: options && options.allowAdvancedToolBarOptions,
|
|
281
281
|
allowAltTextOnImages: options && options.allowAltTextOnImages,
|
|
282
282
|
altTextValidator: options && options.altTextValidator,
|
|
283
|
-
fullWidthEnabled: options && options.fullWidthEnabled
|
|
283
|
+
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
284
|
+
allowMediaInlineImages: options && options.allowMediaInlineImages
|
|
284
285
|
}, api);
|
|
285
286
|
}
|
|
286
287
|
}
|
|
@@ -22,6 +22,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
22
22
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
23
23
|
var _reactIntlNext = require("react-intl-next");
|
|
24
24
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
25
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
25
26
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
26
27
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
27
28
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -31,14 +32,13 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
31
32
|
var _view2 = require("@atlaskit/editor-prosemirror/view");
|
|
32
33
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
33
34
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
34
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
35
35
|
var _helpers = _interopRequireWildcard(require("../commands/helpers"));
|
|
36
36
|
var helpers = _helpers;
|
|
37
37
|
var _pickerFacade = _interopRequireDefault(require("../picker-facade"));
|
|
38
38
|
var _DropPlaceholder = _interopRequireDefault(require("../ui/Media/DropPlaceholder"));
|
|
39
39
|
var _mediaCommon2 = require("../utils/media-common");
|
|
40
40
|
var _mediaFiles = require("../utils/media-files");
|
|
41
|
-
var
|
|
41
|
+
var _mediaInline2 = require("../utils/media-inline");
|
|
42
42
|
var _mediaSingle2 = require("../utils/media-single");
|
|
43
43
|
var _mediaTaskManager = require("./mediaTaskManager");
|
|
44
44
|
var _pluginKey = require("./plugin-key");
|
|
@@ -71,7 +71,9 @@ var createDropPlaceholder = function createDropPlaceholder(intl, allowDropLine)
|
|
|
71
71
|
var MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
72
72
|
var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
73
73
|
function MediaPluginStateImplementation(_state, options, mediaOptions, newInsertionBehaviour, _dispatch, pluginInjectionApi) {
|
|
74
|
-
var _this = this
|
|
74
|
+
var _this = this,
|
|
75
|
+
_this$mediaOptions2,
|
|
76
|
+
_this$mediaOptions3;
|
|
75
77
|
(0, _classCallCheck2.default)(this, MediaPluginStateImplementation);
|
|
76
78
|
(0, _defineProperty2.default)(this, "allowsUploads", false);
|
|
77
79
|
(0, _defineProperty2.default)(this, "ignoreLinks", false);
|
|
@@ -202,7 +204,7 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
202
204
|
* called when we insert a new file via the picker (connected via pickerfacade)
|
|
203
205
|
*/
|
|
204
206
|
(0, _defineProperty2.default)(this, "insertFile", function (mediaState, onMediaStateChanged, pickerType) {
|
|
205
|
-
var _this$pluginInjection, _mediaState$collectio, _this$
|
|
207
|
+
var _this$pluginInjection, _mediaState$collectio, _this$pluginInjection2;
|
|
206
208
|
var state = _this.view.state;
|
|
207
209
|
var editorAnalyticsAPI = (_this$pluginInjection = _this.pluginInjectionApi) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.analytics) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.actions;
|
|
208
210
|
var mediaStateWithContext = _objectSpread(_objectSpread({}, mediaState), {}, {
|
|
@@ -219,7 +221,7 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
219
221
|
allUploadsFinished: false
|
|
220
222
|
});
|
|
221
223
|
}
|
|
222
|
-
switch ((0,
|
|
224
|
+
switch ((0, _mediaInline2.getMediaNodeInsertionType)(state, _this.mediaOptions, mediaStateWithContext.fileMimeType)) {
|
|
223
225
|
case 'inline':
|
|
224
226
|
(0, _mediaFiles.insertMediaInlineNode)(editorAnalyticsAPI)(_this.view, mediaStateWithContext, collection, _this.allowInlineImages, _this.getInputMethod(pickerType));
|
|
225
227
|
break;
|
|
@@ -474,7 +476,7 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
474
476
|
options.providerFactory.subscribe('mediaProvider', function (_name, provider) {
|
|
475
477
|
return _this.setMediaProvider(provider);
|
|
476
478
|
});
|
|
477
|
-
if ((0,
|
|
479
|
+
if ((0, _mediaInline.mediaInlineImagesEnabled)((0, _mediaCommon.getMediaFeatureFlag)('mediaInline', (_this$mediaOptions2 = this.mediaOptions) === null || _this$mediaOptions2 === void 0 ? void 0 : _this$mediaOptions2.featureFlags), (_this$mediaOptions3 = this.mediaOptions) === null || _this$mediaOptions3 === void 0 ? void 0 : _this$mediaOptions3.allowMediaInlineImages)) {
|
|
478
480
|
this.allowInlineImages = true;
|
|
479
481
|
}
|
|
480
482
|
this.errorReporter = options.errorReporter || new _utils.ErrorReporter();
|
|
@@ -12,6 +12,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
14
|
var _card = require("@atlaskit/editor-common/card");
|
|
15
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
15
16
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
16
17
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
17
18
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
@@ -38,7 +39,7 @@ var _imageBorder = require("./imageBorder");
|
|
|
38
39
|
var _layoutGroup = require("./layout-group");
|
|
39
40
|
var _linking3 = require("./linking");
|
|
40
41
|
var _linkingToolbarAppearance = require("./linking-toolbar-appearance");
|
|
41
|
-
var
|
|
42
|
+
var _mediaInline2 = require("./mediaInline");
|
|
42
43
|
var _utils2 = require("./utils");
|
|
43
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
44
45
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -172,7 +173,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
172
173
|
allowLinking = options.allowLinking,
|
|
173
174
|
allowAdvancedToolBarOptions = options.allowAdvancedToolBarOptions,
|
|
174
175
|
allowResizingInTables = options.allowResizingInTables,
|
|
175
|
-
allowAltTextOnImages = options.allowAltTextOnImages
|
|
176
|
+
allowAltTextOnImages = options.allowAltTextOnImages,
|
|
177
|
+
allowMediaInline = options.allowMediaInline,
|
|
178
|
+
allowMediaInlineImages = options.allowMediaInlineImages;
|
|
176
179
|
var toolbarButtons = [];
|
|
177
180
|
var _ref = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
178
181
|
hoverDecoration = _ref.hoverDecoration;
|
|
@@ -219,7 +222,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
var layoutButtons = (0, _card.buildLayoutButtons)(state, intl, state.schema.nodes.mediaSingle, widthPlugin, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions, allowResizing, allowResizingInTables, true, true, isChangingLayoutDisabled);
|
|
222
|
-
if ((0,
|
|
225
|
+
if ((0, _mediaInline.mediaInlineImagesEnabled)(allowMediaInline, allowMediaInlineImages) && selectedNode) {
|
|
223
226
|
var selectedLayoutIcon = (0, _utils2.getSelectedLayoutIcon)([].concat((0, _toConsumableArray2.default)(_card.alignmentIcons), (0, _toConsumableArray2.default)(_card.wrappingIcons)), selectedNode.node);
|
|
224
227
|
if (selectedLayoutIcon && layoutButtons.length) {
|
|
225
228
|
var _options = {
|
|
@@ -259,7 +262,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
259
262
|
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
260
263
|
var _pluginInjectionApi$a4;
|
|
261
264
|
var hasCaption = (0, _utils.contains)(selectedNode.node, state.schema.nodes.caption);
|
|
262
|
-
var inlineSwitcherTitle = intl.formatMessage(hasCaption ? _messages.mediaAndEmbedToolbarMessages.
|
|
265
|
+
var inlineSwitcherTitle = intl.formatMessage(hasCaption ? _messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImageCaptionWarning : _messages.mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
263
266
|
var floatingSwitcherTitle = intl.formatMessage(_messages.mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
264
267
|
toolbarButtons.push({
|
|
265
268
|
type: 'button',
|
|
@@ -544,7 +547,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
544
547
|
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaInlineNodeSelector));
|
|
545
548
|
return element || mediaPluginState.element;
|
|
546
549
|
};
|
|
547
|
-
items = (0,
|
|
550
|
+
items = (0, _mediaInline2.generateMediaInlineFloatingToolbar)(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
548
551
|
} else {
|
|
549
552
|
baseToolbar.getDomRef = function () {
|
|
550
553
|
var _mediaPluginState$ele3;
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isInSupportedInlineImageParent = exports.getMediaNodeInsertionType = void 0;
|
|
7
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
7
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
9
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
9
10
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
11
|
var _mediaFiles = require("../utils/media-files");
|
|
12
12
|
var _mediaSingle = require("../utils/media-single");
|
|
13
13
|
var _isType = require("./is-type");
|
|
@@ -15,9 +15,9 @@ var _mediaCommon2 = require("./media-common");
|
|
|
15
15
|
var isInSupportedInlineImageParent = exports.isInSupportedInlineImageParent = function isInSupportedInlineImageParent(state) {
|
|
16
16
|
return (0, _utils2.hasParentNodeOfType)([state.schema.nodes.listItem])(state.selection);
|
|
17
17
|
};
|
|
18
|
-
var getMediaNodeInsertionType = exports.getMediaNodeInsertionType = function getMediaNodeInsertionType(state,
|
|
19
|
-
var canInsertInlineNode = (0, _mediaCommon.getMediaFeatureFlag)('mediaInline',
|
|
20
|
-
if ((0,
|
|
18
|
+
var getMediaNodeInsertionType = exports.getMediaNodeInsertionType = function getMediaNodeInsertionType(state, mediaOptions, fileMimeType) {
|
|
19
|
+
var canInsertInlineNode = (0, _mediaCommon.getMediaFeatureFlag)('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags) && !(0, _utils.isInEmptyLine)(state) && (!(0, _mediaCommon2.isInsidePotentialEmptyParagraph)(state) || isInSupportedInlineImageParent(state)) && (0, _mediaFiles.canInsertMediaInline)(state);
|
|
20
|
+
if ((0, _mediaInline.mediaInlineImagesEnabled)((0, _mediaCommon.getMediaFeatureFlag)('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags), mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.allowMediaInlineImages)) {
|
|
21
21
|
if (canInsertInlineNode && !(0, _isType.isVideo)(fileMimeType)) {
|
|
22
22
|
return 'inline';
|
|
23
23
|
}
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -273,7 +273,8 @@ export const mediaPlugin = ({
|
|
|
273
273
|
allowAdvancedToolBarOptions: options && options.allowAdvancedToolBarOptions,
|
|
274
274
|
allowAltTextOnImages: options && options.allowAltTextOnImages,
|
|
275
275
|
altTextValidator: options && options.altTextValidator,
|
|
276
|
-
fullWidthEnabled: options && options.fullWidthEnabled
|
|
276
|
+
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
277
|
+
allowMediaInlineImages: options && options.allowMediaInlineImages
|
|
277
278
|
}, api)
|
|
278
279
|
}
|
|
279
280
|
};
|
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import { RawIntlProvider } from 'react-intl-next';
|
|
6
6
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
7
8
|
import { CAPTION_PLACEHOLDER_ID, getMaxWidthForNestedNodeNext } from '@atlaskit/editor-common/media-single';
|
|
8
9
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
9
10
|
import { browser, ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
@@ -13,7 +14,6 @@ import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType, isNodeSe
|
|
|
13
14
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
14
15
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
15
16
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
16
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import * as helpers from '../commands/helpers';
|
|
18
18
|
import { updateMediaNodeAttrs } from '../commands/helpers';
|
|
19
19
|
import PickerFacade from '../picker-facade';
|
|
@@ -47,6 +47,7 @@ const createDropPlaceholder = (intl, allowDropLine) => {
|
|
|
47
47
|
const MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
48
48
|
export class MediaPluginStateImplementation {
|
|
49
49
|
constructor(_state, options, mediaOptions, newInsertionBehaviour, _dispatch, pluginInjectionApi) {
|
|
50
|
+
var _this$mediaOptions2, _this$mediaOptions3;
|
|
50
51
|
_defineProperty(this, "allowsUploads", false);
|
|
51
52
|
_defineProperty(this, "ignoreLinks", false);
|
|
52
53
|
_defineProperty(this, "waitForMediaUpload", true);
|
|
@@ -148,7 +149,7 @@ export class MediaPluginStateImplementation {
|
|
|
148
149
|
* called when we insert a new file via the picker (connected via pickerfacade)
|
|
149
150
|
*/
|
|
150
151
|
_defineProperty(this, "insertFile", (mediaState, onMediaStateChanged, pickerType) => {
|
|
151
|
-
var _this$pluginInjection, _this$pluginInjection2, _mediaState$collectio, _this$
|
|
152
|
+
var _this$pluginInjection, _this$pluginInjection2, _mediaState$collectio, _this$pluginInjection3, _this$pluginInjection4;
|
|
152
153
|
const {
|
|
153
154
|
state
|
|
154
155
|
} = this.view;
|
|
@@ -168,7 +169,7 @@ export class MediaPluginStateImplementation {
|
|
|
168
169
|
allUploadsFinished: false
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
|
-
switch (getMediaNodeInsertionType(state,
|
|
172
|
+
switch (getMediaNodeInsertionType(state, this.mediaOptions, mediaStateWithContext.fileMimeType)) {
|
|
172
173
|
case 'inline':
|
|
173
174
|
insertMediaInlineNode(editorAnalyticsAPI)(this.view, mediaStateWithContext, collection, this.allowInlineImages, this.getInputMethod(pickerType));
|
|
174
175
|
break;
|
|
@@ -422,7 +423,7 @@ export class MediaPluginStateImplementation {
|
|
|
422
423
|
} = _state.schema;
|
|
423
424
|
assert(nodes.media && (nodes.mediaGroup || nodes.mediaSingle), 'Editor: unable to init media plugin - media or mediaGroup/mediaSingle node absent in schema');
|
|
424
425
|
options.providerFactory.subscribe('mediaProvider', (_name, provider) => this.setMediaProvider(provider));
|
|
425
|
-
if (
|
|
426
|
+
if (mediaInlineImagesEnabled(getMediaFeatureFlag('mediaInline', (_this$mediaOptions2 = this.mediaOptions) === null || _this$mediaOptions2 === void 0 ? void 0 : _this$mediaOptions2.featureFlags), (_this$mediaOptions3 = this.mediaOptions) === null || _this$mediaOptions3 === void 0 ? void 0 : _this$mediaOptions3.allowMediaInlineImages)) {
|
|
426
427
|
this.allowInlineImages = true;
|
|
427
428
|
}
|
|
428
429
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { alignmentIcons, buildLayoutButtons, IconCard, IconEmbed, IconInline, layoutToMessages, wrappingIcons } from '@atlaskit/editor-common/card';
|
|
5
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
5
6
|
import { calcMinWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
6
7
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
7
8
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -161,7 +162,9 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
161
162
|
allowLinking,
|
|
162
163
|
allowAdvancedToolBarOptions,
|
|
163
164
|
allowResizingInTables,
|
|
164
|
-
allowAltTextOnImages
|
|
165
|
+
allowAltTextOnImages,
|
|
166
|
+
allowMediaInline,
|
|
167
|
+
allowMediaInlineImages
|
|
165
168
|
} = options;
|
|
166
169
|
let toolbarButtons = [];
|
|
167
170
|
const {
|
|
@@ -212,7 +215,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
212
215
|
}
|
|
213
216
|
}
|
|
214
217
|
const layoutButtons = buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, widthPlugin, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions, allowResizing, allowResizingInTables, true, true, isChangingLayoutDisabled);
|
|
215
|
-
if (
|
|
218
|
+
if (mediaInlineImagesEnabled(allowMediaInline, allowMediaInlineImages) && selectedNode) {
|
|
216
219
|
const selectedLayoutIcon = getSelectedLayoutIcon([...alignmentIcons, ...wrappingIcons], selectedNode.node);
|
|
217
220
|
if (selectedLayoutIcon && layoutButtons.length) {
|
|
218
221
|
const options = {
|
|
@@ -252,7 +255,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
252
255
|
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
253
256
|
var _pluginInjectionApi$a4;
|
|
254
257
|
const hasCaption = contains(selectedNode.node, state.schema.nodes.caption);
|
|
255
|
-
const inlineSwitcherTitle = intl.formatMessage(hasCaption ? mediaAndEmbedToolbarMessages.
|
|
258
|
+
const inlineSwitcherTitle = intl.formatMessage(hasCaption ? mediaAndEmbedToolbarMessages.changeToMediaInlineImageCaptionWarning : mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
256
259
|
const floatingSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
257
260
|
toolbarButtons.push({
|
|
258
261
|
type: 'button',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
1
2
|
import { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { canInsertMediaInline } from '../utils/media-files';
|
|
6
6
|
import { isMediaSingle } from '../utils/media-single';
|
|
7
7
|
import { isVideo } from './is-type';
|
|
@@ -9,9 +9,9 @@ import { isInsidePotentialEmptyParagraph } from './media-common';
|
|
|
9
9
|
export const isInSupportedInlineImageParent = state => {
|
|
10
10
|
return hasParentNodeOfType([state.schema.nodes.listItem])(state.selection);
|
|
11
11
|
};
|
|
12
|
-
export const getMediaNodeInsertionType = (state,
|
|
13
|
-
const canInsertInlineNode = getMediaFeatureFlag('mediaInline',
|
|
14
|
-
if (
|
|
12
|
+
export const getMediaNodeInsertionType = (state, mediaOptions, fileMimeType) => {
|
|
13
|
+
const canInsertInlineNode = getMediaFeatureFlag('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags) && !isInEmptyLine(state) && (!isInsidePotentialEmptyParagraph(state) || isInSupportedInlineImageParent(state)) && canInsertMediaInline(state);
|
|
14
|
+
if (mediaInlineImagesEnabled(getMediaFeatureFlag('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags), mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.allowMediaInlineImages)) {
|
|
15
15
|
if (canInsertInlineNode && !isVideo(fileMimeType)) {
|
|
16
16
|
return 'inline';
|
|
17
17
|
}
|
package/dist/esm/plugin.js
CHANGED
|
@@ -269,7 +269,8 @@ export var mediaPlugin = function mediaPlugin(_ref2) {
|
|
|
269
269
|
allowAdvancedToolBarOptions: options && options.allowAdvancedToolBarOptions,
|
|
270
270
|
allowAltTextOnImages: options && options.allowAltTextOnImages,
|
|
271
271
|
altTextValidator: options && options.altTextValidator,
|
|
272
|
-
fullWidthEnabled: options && options.fullWidthEnabled
|
|
272
|
+
fullWidthEnabled: options && options.fullWidthEnabled,
|
|
273
|
+
allowMediaInlineImages: options && options.allowMediaInlineImages
|
|
273
274
|
}, api);
|
|
274
275
|
}
|
|
275
276
|
}
|
|
@@ -13,6 +13,7 @@ import React from 'react';
|
|
|
13
13
|
import ReactDOM from 'react-dom';
|
|
14
14
|
import { RawIntlProvider } from 'react-intl-next';
|
|
15
15
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
16
17
|
import { CAPTION_PLACEHOLDER_ID, getMaxWidthForNestedNodeNext } from '@atlaskit/editor-common/media-single';
|
|
17
18
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
18
19
|
import { browser, ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
@@ -22,7 +23,6 @@ import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType, isNodeSe
|
|
|
22
23
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
23
24
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
24
25
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
25
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
26
26
|
import * as helpers from '../commands/helpers';
|
|
27
27
|
import { updateMediaNodeAttrs } from '../commands/helpers';
|
|
28
28
|
import PickerFacade from '../picker-facade';
|
|
@@ -56,7 +56,9 @@ var createDropPlaceholder = function createDropPlaceholder(intl, allowDropLine)
|
|
|
56
56
|
var MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
57
57
|
export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
58
58
|
function MediaPluginStateImplementation(_state, options, mediaOptions, newInsertionBehaviour, _dispatch, pluginInjectionApi) {
|
|
59
|
-
var _this = this
|
|
59
|
+
var _this = this,
|
|
60
|
+
_this$mediaOptions2,
|
|
61
|
+
_this$mediaOptions3;
|
|
60
62
|
_classCallCheck(this, MediaPluginStateImplementation);
|
|
61
63
|
_defineProperty(this, "allowsUploads", false);
|
|
62
64
|
_defineProperty(this, "ignoreLinks", false);
|
|
@@ -187,7 +189,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
187
189
|
* called when we insert a new file via the picker (connected via pickerfacade)
|
|
188
190
|
*/
|
|
189
191
|
_defineProperty(this, "insertFile", function (mediaState, onMediaStateChanged, pickerType) {
|
|
190
|
-
var _this$pluginInjection, _mediaState$collectio, _this$
|
|
192
|
+
var _this$pluginInjection, _mediaState$collectio, _this$pluginInjection2;
|
|
191
193
|
var state = _this.view.state;
|
|
192
194
|
var editorAnalyticsAPI = (_this$pluginInjection = _this.pluginInjectionApi) === null || _this$pluginInjection === void 0 || (_this$pluginInjection = _this$pluginInjection.analytics) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.actions;
|
|
193
195
|
var mediaStateWithContext = _objectSpread(_objectSpread({}, mediaState), {}, {
|
|
@@ -204,7 +206,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
204
206
|
allUploadsFinished: false
|
|
205
207
|
});
|
|
206
208
|
}
|
|
207
|
-
switch (getMediaNodeInsertionType(state,
|
|
209
|
+
switch (getMediaNodeInsertionType(state, _this.mediaOptions, mediaStateWithContext.fileMimeType)) {
|
|
208
210
|
case 'inline':
|
|
209
211
|
insertMediaInlineNode(editorAnalyticsAPI)(_this.view, mediaStateWithContext, collection, _this.allowInlineImages, _this.getInputMethod(pickerType));
|
|
210
212
|
break;
|
|
@@ -459,7 +461,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
459
461
|
options.providerFactory.subscribe('mediaProvider', function (_name, provider) {
|
|
460
462
|
return _this.setMediaProvider(provider);
|
|
461
463
|
});
|
|
462
|
-
if (
|
|
464
|
+
if (mediaInlineImagesEnabled(getMediaFeatureFlag('mediaInline', (_this$mediaOptions2 = this.mediaOptions) === null || _this$mediaOptions2 === void 0 ? void 0 : _this$mediaOptions2.featureFlags), (_this$mediaOptions3 = this.mediaOptions) === null || _this$mediaOptions3 === void 0 ? void 0 : _this$mediaOptions3.allowMediaInlineImages)) {
|
|
463
465
|
this.allowInlineImages = true;
|
|
464
466
|
}
|
|
465
467
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
@@ -6,6 +6,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { alignmentIcons, buildLayoutButtons, IconCard, IconEmbed, IconInline, layoutToMessages, wrappingIcons } from '@atlaskit/editor-common/card';
|
|
9
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
9
10
|
import { calcMinWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
10
11
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
12
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -162,7 +163,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
162
163
|
allowLinking = options.allowLinking,
|
|
163
164
|
allowAdvancedToolBarOptions = options.allowAdvancedToolBarOptions,
|
|
164
165
|
allowResizingInTables = options.allowResizingInTables,
|
|
165
|
-
allowAltTextOnImages = options.allowAltTextOnImages
|
|
166
|
+
allowAltTextOnImages = options.allowAltTextOnImages,
|
|
167
|
+
allowMediaInline = options.allowMediaInline,
|
|
168
|
+
allowMediaInlineImages = options.allowMediaInlineImages;
|
|
166
169
|
var toolbarButtons = [];
|
|
167
170
|
var _ref = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
168
171
|
hoverDecoration = _ref.hoverDecoration;
|
|
@@ -209,7 +212,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
209
212
|
}
|
|
210
213
|
}
|
|
211
214
|
var layoutButtons = buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, widthPlugin, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions, allowResizing, allowResizingInTables, true, true, isChangingLayoutDisabled);
|
|
212
|
-
if (
|
|
215
|
+
if (mediaInlineImagesEnabled(allowMediaInline, allowMediaInlineImages) && selectedNode) {
|
|
213
216
|
var selectedLayoutIcon = getSelectedLayoutIcon([].concat(_toConsumableArray(alignmentIcons), _toConsumableArray(wrappingIcons)), selectedNode.node);
|
|
214
217
|
if (selectedLayoutIcon && layoutButtons.length) {
|
|
215
218
|
var _options = {
|
|
@@ -249,7 +252,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
249
252
|
if (((_selectedNode$node$fi = selectedNode.node.firstChild) === null || _selectedNode$node$fi === void 0 ? void 0 : _selectedNode$node$fi.attrs.type) !== 'external') {
|
|
250
253
|
var _pluginInjectionApi$a4;
|
|
251
254
|
var hasCaption = contains(selectedNode.node, state.schema.nodes.caption);
|
|
252
|
-
var inlineSwitcherTitle = intl.formatMessage(hasCaption ? mediaAndEmbedToolbarMessages.
|
|
255
|
+
var inlineSwitcherTitle = intl.formatMessage(hasCaption ? mediaAndEmbedToolbarMessages.changeToMediaInlineImageCaptionWarning : mediaAndEmbedToolbarMessages.changeToMediaInlineImage);
|
|
253
256
|
var floatingSwitcherTitle = intl.formatMessage(mediaAndEmbedToolbarMessages.changeToMediaSingle);
|
|
254
257
|
toolbarButtons.push({
|
|
255
258
|
type: 'button',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
1
2
|
import { isInEmptyLine } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { canInsertMediaInline } from '../utils/media-files';
|
|
6
6
|
import { isMediaSingle } from '../utils/media-single';
|
|
7
7
|
import { isVideo } from './is-type';
|
|
@@ -9,9 +9,9 @@ import { isInsidePotentialEmptyParagraph } from './media-common';
|
|
|
9
9
|
export var isInSupportedInlineImageParent = function isInSupportedInlineImageParent(state) {
|
|
10
10
|
return hasParentNodeOfType([state.schema.nodes.listItem])(state.selection);
|
|
11
11
|
};
|
|
12
|
-
export var getMediaNodeInsertionType = function getMediaNodeInsertionType(state,
|
|
13
|
-
var canInsertInlineNode = getMediaFeatureFlag('mediaInline',
|
|
14
|
-
if (
|
|
12
|
+
export var getMediaNodeInsertionType = function getMediaNodeInsertionType(state, mediaOptions, fileMimeType) {
|
|
13
|
+
var canInsertInlineNode = getMediaFeatureFlag('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags) && !isInEmptyLine(state) && (!isInsidePotentialEmptyParagraph(state) || isInSupportedInlineImageParent(state)) && canInsertMediaInline(state);
|
|
14
|
+
if (mediaInlineImagesEnabled(getMediaFeatureFlag('mediaInline', mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.featureFlags), mediaOptions === null || mediaOptions === void 0 ? void 0 : mediaOptions.allowMediaInlineImages)) {
|
|
15
15
|
if (canInsertInlineNode && !isVideo(fileMimeType)) {
|
|
16
16
|
return 'inline';
|
|
17
17
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | '
|
|
|
15
15
|
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
16
16
|
export interface MediaOptions {
|
|
17
17
|
provider?: Providers['mediaProvider'];
|
|
18
|
+
/**
|
|
19
|
+
* @experimental
|
|
20
|
+
* Still under development. Use with caution.
|
|
21
|
+
*/
|
|
22
|
+
allowMediaInlineImages?: boolean;
|
|
18
23
|
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
19
24
|
allowMediaGroup?: boolean;
|
|
20
25
|
customDropzoneContainer?: HTMLElement;
|
|
@@ -97,6 +102,7 @@ export type MediaFloatingToolbarOptions = {
|
|
|
97
102
|
providerFactory?: ProviderFactory;
|
|
98
103
|
allowResizing?: boolean;
|
|
99
104
|
allowMediaInline?: boolean;
|
|
105
|
+
allowMediaInlineImages?: boolean;
|
|
100
106
|
allowLinking?: boolean;
|
|
101
107
|
allowAdvancedToolBarOptions?: boolean;
|
|
102
108
|
allowResizingInTables?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MediaOptions } from '../types';
|
|
3
3
|
export type MediaNodeType = 'inline' | 'block' | 'group';
|
|
4
4
|
export declare const isInSupportedInlineImageParent: (state: EditorState) => boolean;
|
|
5
|
-
export declare const getMediaNodeInsertionType: (state: EditorState,
|
|
5
|
+
export declare const getMediaNodeInsertionType: (state: EditorState, mediaOptions?: MediaOptions, fileMimeType?: string) => MediaNodeType;
|
|
@@ -15,6 +15,11 @@ export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | '
|
|
|
15
15
|
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
16
16
|
export interface MediaOptions {
|
|
17
17
|
provider?: Providers['mediaProvider'];
|
|
18
|
+
/**
|
|
19
|
+
* @experimental
|
|
20
|
+
* Still under development. Use with caution.
|
|
21
|
+
*/
|
|
22
|
+
allowMediaInlineImages?: boolean;
|
|
18
23
|
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
19
24
|
allowMediaGroup?: boolean;
|
|
20
25
|
customDropzoneContainer?: HTMLElement;
|
|
@@ -97,6 +102,7 @@ export type MediaFloatingToolbarOptions = {
|
|
|
97
102
|
providerFactory?: ProviderFactory;
|
|
98
103
|
allowResizing?: boolean;
|
|
99
104
|
allowMediaInline?: boolean;
|
|
105
|
+
allowMediaInlineImages?: boolean;
|
|
100
106
|
allowLinking?: boolean;
|
|
101
107
|
allowAdvancedToolBarOptions?: boolean;
|
|
102
108
|
allowResizingInTables?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MediaOptions } from '../types';
|
|
3
3
|
export type MediaNodeType = 'inline' | 'block' | 'group';
|
|
4
4
|
export declare const isInSupportedInlineImageParent: (state: EditorState) => boolean;
|
|
5
|
-
export declare const getMediaNodeInsertionType: (state: EditorState,
|
|
5
|
+
export declare const getMediaNodeInsertionType: (state: EditorState, mediaOptions?: MediaOptions, fileMimeType?: string) => MediaNodeType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@atlaskit/adf-schema": "^35.3.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
39
|
-
"@atlaskit/button": "^17.
|
|
40
|
-
"@atlaskit/editor-common": "^77.
|
|
39
|
+
"@atlaskit/button": "^17.3.0",
|
|
40
|
+
"@atlaskit/editor-common": "^77.2.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.2",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
43
43
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
@@ -125,7 +125,8 @@
|
|
|
125
125
|
"type": "boolean"
|
|
126
126
|
},
|
|
127
127
|
"platform.editor.media.inline-image.base-support": {
|
|
128
|
-
"type": "boolean"
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"referenceOnly": "true"
|
|
129
130
|
},
|
|
130
131
|
"platform.media-experience.media-viewer-v2_hgsii": {
|
|
131
132
|
"type": "boolean",
|