@atlaskit/editor-plugin-block-menu 3.2.3 → 3.2.5
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 +17 -0
- package/dist/cjs/editor-commands/formatNode.js +7 -1
- package/dist/cjs/editor-commands/selection.js +39 -0
- package/dist/cjs/ui/block-menu.js +1 -2
- package/dist/cjs/ui/copy-block.js +4 -1
- package/dist/cjs/ui/copy-link.js +2 -1
- package/dist/cjs/ui/delete-button.js +4 -1
- package/dist/cjs/ui/format-menu-nested.js +4 -1
- package/dist/es2019/editor-commands/formatNode.js +7 -1
- package/dist/es2019/editor-commands/selection.js +33 -0
- package/dist/es2019/ui/block-menu.js +1 -2
- package/dist/es2019/ui/copy-block.js +4 -1
- package/dist/es2019/ui/copy-link.js +2 -1
- package/dist/es2019/ui/delete-button.js +4 -1
- package/dist/es2019/ui/format-menu-nested.js +4 -1
- package/dist/esm/editor-commands/formatNode.js +7 -1
- package/dist/esm/editor-commands/selection.js +33 -0
- package/dist/esm/ui/block-menu.js +1 -2
- package/dist/esm/ui/copy-block.js +4 -1
- package/dist/esm/ui/copy-link.js +2 -1
- package/dist/esm/ui/delete-button.js +4 -1
- package/dist/esm/ui/format-menu-nested.js +4 -1
- package/dist/types/editor-commands/selection.d.ts +10 -0
- package/dist/types-ts4.5/editor-commands/selection.d.ts +10 -0
- package/package.json +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 3.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f7bc2f60e0fc6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7bc2f60e0fc6) -
|
|
8
|
+
[ux] Updates copy text for drag handle, copy block, copy link and updates order of items in Turn
|
|
9
|
+
into menu.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.2.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`ef686b3cfdbff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef686b3cfdbff) -
|
|
17
|
+
ED-29222: Make empty line experiment dependent on block menu
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 3.2.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.formatNode = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
9
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
|
+
var _selection = require("./selection");
|
|
9
11
|
var _layoutTransforms = require("./transforms/layout-transforms");
|
|
10
12
|
var _transformNodeToTargetType = require("./transforms/transformNodeToTargetType");
|
|
11
13
|
/**
|
|
@@ -98,7 +100,11 @@ var formatNode = exports.formatNode = function formatNode(targetType) {
|
|
|
98
100
|
nodePos = selection.$from.pos;
|
|
99
101
|
}
|
|
100
102
|
try {
|
|
101
|
-
|
|
103
|
+
var newTr = (0, _transformNodeToTargetType.transformNodeToTargetType)(tr, nodeToFormat, nodePos, targetType);
|
|
104
|
+
if (newTr && (0, _platformFeatureFlags.fg)('platform_editor_block_menu_selection_fix')) {
|
|
105
|
+
return (0, _selection.setSelectionAfterTransform)(newTr, nodePos, targetType);
|
|
106
|
+
}
|
|
107
|
+
return newTr;
|
|
102
108
|
} catch (_unused) {
|
|
103
109
|
return null;
|
|
104
110
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setSelectionAfterTransform = void 0;
|
|
7
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
+
/**
|
|
9
|
+
* Sets the appropriate selection after transforming a node to a target type
|
|
10
|
+
* @param newTr - The transaction containing the transformed node
|
|
11
|
+
* @param nodePos - The position of the transformed node
|
|
12
|
+
* @param targetType - The target type the node was transformed to
|
|
13
|
+
* @returns The transaction with the updated selection, or the original transaction if no selection change needed
|
|
14
|
+
*/
|
|
15
|
+
var setSelectionAfterTransform = exports.setSelectionAfterTransform = function setSelectionAfterTransform(newTr, nodePos, targetType) {
|
|
16
|
+
// Find the actual node that was transformed to get its positioning
|
|
17
|
+
var transformedNodePos = newTr.doc.resolve(nodePos);
|
|
18
|
+
var transformedNode = transformedNodePos.nodeAfter;
|
|
19
|
+
if (!transformedNode) {
|
|
20
|
+
return newTr;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Check if target type is other than list, text, heading, blockquotes
|
|
24
|
+
var isListNode = targetType === 'bulletList' || targetType === 'orderedList' || targetType === 'taskList';
|
|
25
|
+
var isBlockquote = targetType === 'blockquote';
|
|
26
|
+
var isContainer = ['panel', 'expand', 'codeBlock', 'layoutSection'].includes(targetType);
|
|
27
|
+
if (isListNode || isBlockquote) {
|
|
28
|
+
// For taskList, select all content within the list
|
|
29
|
+
var textStart = transformedNodePos.pos + 1; // Inside the taskList
|
|
30
|
+
var textEnd = transformedNodePos.pos + transformedNode.nodeSize - 1; // End of taskList content
|
|
31
|
+
var textSelection = _state.TextSelection.between(newTr.doc.resolve(textStart), newTr.doc.resolve(textEnd));
|
|
32
|
+
return newTr.setSelection(textSelection);
|
|
33
|
+
} else if (isContainer) {
|
|
34
|
+
// Use NodeSelection for types other than list, text, heading, blockquotes
|
|
35
|
+
var nodeSelection = _state.NodeSelection.create(newTr.doc, transformedNodePos.pos);
|
|
36
|
+
return newTr.setSelection(nodeSelection);
|
|
37
|
+
}
|
|
38
|
+
return newTr;
|
|
39
|
+
};
|
|
@@ -80,11 +80,10 @@ var BlockMenu = function BlockMenu(_ref2) {
|
|
|
80
80
|
var targetHandleRef = editorView === null || editorView === void 0 || (_editorView$dom = editorView.dom) === null || _editorView$dom === void 0 ? void 0 : _editorView$dom.querySelector(_styles.DRAG_HANDLE_SELECTOR);
|
|
81
81
|
var hasFocus = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? (_ref3 = (editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) || document.activeElement === targetHandleRef) !== null && _ref3 !== void 0 ? _ref3 : false : (_editorView$hasFocus = editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) !== null && _editorView$hasFocus !== void 0 ? _editorView$hasFocus : false;
|
|
82
82
|
var hasSelection = !!editorView && !editorView.state.selection.empty;
|
|
83
|
-
var emptyLineEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
84
83
|
|
|
85
84
|
// hasSelection true, always show block menu
|
|
86
85
|
// hasSelection false, only show block menu when empty line experiment is enabled
|
|
87
|
-
var shouldShowBlockMenuForEmptyLine = hasSelection ||
|
|
86
|
+
var shouldShowBlockMenuForEmptyLine = hasSelection || !hasSelection && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
88
87
|
(0, _react.useEffect)(function () {
|
|
89
88
|
var _api$userIntent;
|
|
90
89
|
if (!isMenuOpen || !menuTriggerBy || !isSelectedViaDragHandle || !hasFocus || !shouldShowBlockMenuForEmptyLine || ['resizing', 'dragging'].includes(currentUserIntent || '')) {
|
|
@@ -11,11 +11,13 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
11
11
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
12
12
|
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
13
13
|
var _copyButton = require("@atlaskit/editor-common/copy-button");
|
|
14
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
15
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
17
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
17
18
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
18
19
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
21
|
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; }
|
|
20
22
|
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; }
|
|
21
23
|
var toDOMFromFragment = function toDOMFromFragment(fragment, schema) {
|
|
@@ -101,6 +103,7 @@ var CopyBlockMenuItem = function CopyBlockMenuItem(_ref) {
|
|
|
101
103
|
api === null || api === void 0 || api.core.actions.focus();
|
|
102
104
|
}
|
|
103
105
|
};
|
|
106
|
+
var text = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_patch_1') ? formatMessage(_messages.blockMenuMessages.copyContent) : formatMessage(_blockMenu.messages.copyBlock);
|
|
104
107
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
105
108
|
elemBefore: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
106
109
|
label: ""
|
|
@@ -108,6 +111,6 @@ var CopyBlockMenuItem = function CopyBlockMenuItem(_ref) {
|
|
|
108
111
|
onClick: function onClick(e) {
|
|
109
112
|
return copyHandler(e);
|
|
110
113
|
}
|
|
111
|
-
},
|
|
114
|
+
}, text);
|
|
112
115
|
};
|
|
113
116
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(CopyBlockMenuItem);
|
package/dist/cjs/ui/copy-link.js
CHANGED
|
@@ -48,11 +48,12 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
|
|
|
48
48
|
if (!(0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') || checkIsNestedNode()) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
+
var text = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_patch_1') ? formatMessage(_messages.blockMenuMessages.copyLinkToBlock) : formatMessage(_messages.blockMenuMessages.copyLink);
|
|
51
52
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
|
|
52
53
|
onClick: handleClick,
|
|
53
54
|
elemBefore: /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
54
55
|
label: ""
|
|
55
56
|
})
|
|
56
|
-
},
|
|
57
|
+
}, text);
|
|
57
58
|
};
|
|
58
59
|
var CopyLinkDropdownItem = exports.CopyLinkDropdownItem = (0, _reactIntlNext.injectIntl)(CopyLinkDropdownItemContent);
|
|
@@ -9,10 +9,12 @@ exports.DeleteDropdownItem = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
12
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
14
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
14
15
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
16
|
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
18
|
var _box = require("@atlaskit/primitives/box");
|
|
17
19
|
var _text = _interopRequireDefault(require("@atlaskit/primitives/text"));
|
|
18
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -66,6 +68,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
66
68
|
var _api$decorations2, _api$decorations2$rem;
|
|
67
69
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$decorations2 = api.decorations) === null || _api$decorations2 === void 0 || (_api$decorations2 = _api$decorations2.commands) === null || _api$decorations2 === void 0 || (_api$decorations2$rem = _api$decorations2.removeDecoration) === null || _api$decorations2$rem === void 0 ? void 0 : _api$decorations2$rem.call(_api$decorations2));
|
|
68
70
|
};
|
|
71
|
+
var text = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_patch_1') ? formatMessage(_messages.blockMenuMessages.deleteBlock) : formatMessage(_blockMenu.messages.deleteBlock);
|
|
69
72
|
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
70
73
|
onMouseEnter: onMouseEnter,
|
|
71
74
|
onMouseLeave: onMouseLeave
|
|
@@ -78,6 +81,6 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
78
81
|
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
79
82
|
as: "span",
|
|
80
83
|
color: "color.text.danger"
|
|
81
|
-
},
|
|
84
|
+
}, text)));
|
|
82
85
|
};
|
|
83
86
|
var DeleteDropdownItem = exports.DeleteDropdownItem = (0, _reactIntlNext.injectIntl)(DeleteDropdownItemContent);
|
|
@@ -8,15 +8,18 @@ exports.FormatMenuComponent = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
11
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
12
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
13
|
var _changes = _interopRequireDefault(require("@atlaskit/icon/core/changes"));
|
|
13
14
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
16
|
var FormatMenuComponent = exports.FormatMenuComponent = function FormatMenuComponent(_ref) {
|
|
15
17
|
var children = _ref.children;
|
|
16
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
17
19
|
formatMessage = _useIntl.formatMessage;
|
|
20
|
+
var text = (0, _platformFeatureFlags.fg)('platform_editor_block_menu_patch_1') ? formatMessage(_messages.blockMenuMessages.turnInto) : formatMessage(_blockMenu.messages.turnInto);
|
|
18
21
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarNestedDropdownMenu, {
|
|
19
|
-
text:
|
|
22
|
+
text: text,
|
|
20
23
|
elemBefore: /*#__PURE__*/_react.default.createElement(_changes.default, {
|
|
21
24
|
label: ""
|
|
22
25
|
}),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { findParentNodeOfType, findSelectedNodeOfType, safeInsert as pmSafeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
|
+
import { setSelectionAfterTransform } from './selection';
|
|
3
5
|
import { createDefaultLayoutSection } from './transforms/layout-transforms';
|
|
4
6
|
import { transformNodeToTargetType } from './transforms/transformNodeToTargetType';
|
|
5
7
|
/**
|
|
@@ -101,7 +103,11 @@ export const formatNode = targetType => {
|
|
|
101
103
|
nodePos = selection.$from.pos;
|
|
102
104
|
}
|
|
103
105
|
try {
|
|
104
|
-
|
|
106
|
+
const newTr = transformNodeToTargetType(tr, nodeToFormat, nodePos, targetType);
|
|
107
|
+
if (newTr && fg('platform_editor_block_menu_selection_fix')) {
|
|
108
|
+
return setSelectionAfterTransform(newTr, nodePos, targetType);
|
|
109
|
+
}
|
|
110
|
+
return newTr;
|
|
105
111
|
} catch {
|
|
106
112
|
return null;
|
|
107
113
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
/**
|
|
3
|
+
* Sets the appropriate selection after transforming a node to a target type
|
|
4
|
+
* @param newTr - The transaction containing the transformed node
|
|
5
|
+
* @param nodePos - The position of the transformed node
|
|
6
|
+
* @param targetType - The target type the node was transformed to
|
|
7
|
+
* @returns The transaction with the updated selection, or the original transaction if no selection change needed
|
|
8
|
+
*/
|
|
9
|
+
export const setSelectionAfterTransform = (newTr, nodePos, targetType) => {
|
|
10
|
+
// Find the actual node that was transformed to get its positioning
|
|
11
|
+
const transformedNodePos = newTr.doc.resolve(nodePos);
|
|
12
|
+
const transformedNode = transformedNodePos.nodeAfter;
|
|
13
|
+
if (!transformedNode) {
|
|
14
|
+
return newTr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Check if target type is other than list, text, heading, blockquotes
|
|
18
|
+
const isListNode = targetType === 'bulletList' || targetType === 'orderedList' || targetType === 'taskList';
|
|
19
|
+
const isBlockquote = targetType === 'blockquote';
|
|
20
|
+
const isContainer = ['panel', 'expand', 'codeBlock', 'layoutSection'].includes(targetType);
|
|
21
|
+
if (isListNode || isBlockquote) {
|
|
22
|
+
// For taskList, select all content within the list
|
|
23
|
+
const textStart = transformedNodePos.pos + 1; // Inside the taskList
|
|
24
|
+
const textEnd = transformedNodePos.pos + transformedNode.nodeSize - 1; // End of taskList content
|
|
25
|
+
const textSelection = TextSelection.between(newTr.doc.resolve(textStart), newTr.doc.resolve(textEnd));
|
|
26
|
+
return newTr.setSelection(textSelection);
|
|
27
|
+
} else if (isContainer) {
|
|
28
|
+
// Use NodeSelection for types other than list, text, heading, blockquotes
|
|
29
|
+
const nodeSelection = NodeSelection.create(newTr.doc, transformedNodePos.pos);
|
|
30
|
+
return newTr.setSelection(nodeSelection);
|
|
31
|
+
}
|
|
32
|
+
return newTr;
|
|
33
|
+
};
|
|
@@ -70,11 +70,10 @@ const BlockMenu = ({
|
|
|
70
70
|
const targetHandleRef = editorView === null || editorView === void 0 ? void 0 : (_editorView$dom = editorView.dom) === null || _editorView$dom === void 0 ? void 0 : _editorView$dom.querySelector(DRAG_HANDLE_SELECTOR);
|
|
71
71
|
const hasFocus = expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? (_ref = (editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) || document.activeElement === targetHandleRef) !== null && _ref !== void 0 ? _ref : false : (_editorView$hasFocus = editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) !== null && _editorView$hasFocus !== void 0 ? _editorView$hasFocus : false;
|
|
72
72
|
const hasSelection = !!editorView && !editorView.state.selection.empty;
|
|
73
|
-
const emptyLineEnabled = expValEqualsNoExposure('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
74
73
|
|
|
75
74
|
// hasSelection true, always show block menu
|
|
76
75
|
// hasSelection false, only show block menu when empty line experiment is enabled
|
|
77
|
-
const shouldShowBlockMenuForEmptyLine = hasSelection ||
|
|
76
|
+
const shouldShowBlockMenuForEmptyLine = hasSelection || !hasSelection && expValEqualsNoExposure('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
78
77
|
useEffect(() => {
|
|
79
78
|
var _api$userIntent;
|
|
80
79
|
if (!isMenuOpen || !menuTriggerBy || !isSelectedViaDragHandle || !hasFocus || !shouldShowBlockMenuForEmptyLine || ['resizing', 'dragging'].includes(currentUserIntent || '')) {
|
|
@@ -3,11 +3,13 @@ import { injectIntl, useIntl } from 'react-intl-next';
|
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
4
4
|
import { copyHTMLToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
5
5
|
import { toDOM, copyDomNode } from '@atlaskit/editor-common/copy-button';
|
|
6
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
6
7
|
import { Fragment, DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
9
10
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
10
11
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
13
|
const toDOMFromFragment = (fragment, schema) => {
|
|
12
14
|
return DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
13
15
|
};
|
|
@@ -94,11 +96,12 @@ const CopyBlockMenuItem = ({
|
|
|
94
96
|
api === null || api === void 0 ? void 0 : api.core.actions.focus();
|
|
95
97
|
}
|
|
96
98
|
};
|
|
99
|
+
const text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.copyContent) : formatMessage(messages.copyBlock);
|
|
97
100
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
98
101
|
elemBefore: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
99
102
|
label: ""
|
|
100
103
|
}),
|
|
101
104
|
onClick: e => copyHandler(e)
|
|
102
|
-
},
|
|
105
|
+
}, text);
|
|
103
106
|
};
|
|
104
107
|
export default injectIntl(CopyBlockMenuItem);
|
|
@@ -42,11 +42,12 @@ const CopyLinkDropdownItemContent = ({
|
|
|
42
42
|
if (!fg('platform_editor_adf_with_localid') || checkIsNestedNode()) {
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
|
+
const text = fg('platform_editor_block_menu_patch_1') ? formatMessage(messages.copyLinkToBlock) : formatMessage(messages.copyLink);
|
|
45
46
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
46
47
|
onClick: handleClick,
|
|
47
48
|
elemBefore: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
48
49
|
label: ""
|
|
49
50
|
})
|
|
50
|
-
},
|
|
51
|
+
}, text);
|
|
51
52
|
};
|
|
52
53
|
export const CopyLinkDropdownItem = injectIntl(CopyLinkDropdownItemContent);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl, injectIntl } from 'react-intl-next';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
4
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
6
7
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { Box } from '@atlaskit/primitives/box';
|
|
9
11
|
import Text from '@atlaskit/primitives/text';
|
|
10
12
|
const DeleteDropdownItemContent = ({
|
|
@@ -61,6 +63,7 @@ const DeleteDropdownItemContent = ({
|
|
|
61
63
|
var _api$decorations2, _api$decorations2$com, _api$decorations2$com2;
|
|
62
64
|
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$decorations2 = api.decorations) === null || _api$decorations2 === void 0 ? void 0 : (_api$decorations2$com = _api$decorations2.commands) === null || _api$decorations2$com === void 0 ? void 0 : (_api$decorations2$com2 = _api$decorations2$com.removeDecoration) === null || _api$decorations2$com2 === void 0 ? void 0 : _api$decorations2$com2.call(_api$decorations2$com));
|
|
63
65
|
};
|
|
66
|
+
const text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.deleteBlock) : formatMessage(messages.deleteBlock);
|
|
64
67
|
return /*#__PURE__*/React.createElement(Box, {
|
|
65
68
|
onMouseEnter: onMouseEnter,
|
|
66
69
|
onMouseLeave: onMouseLeave
|
|
@@ -73,6 +76,6 @@ const DeleteDropdownItemContent = ({
|
|
|
73
76
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
74
77
|
as: "span",
|
|
75
78
|
color: "color.text.danger"
|
|
76
|
-
},
|
|
79
|
+
}, text)));
|
|
77
80
|
};
|
|
78
81
|
export const DeleteDropdownItem = injectIntl(DeleteDropdownItemContent);
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
4
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
6
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
export const FormatMenuComponent = ({
|
|
8
10
|
children
|
|
9
11
|
}) => {
|
|
10
12
|
const {
|
|
11
13
|
formatMessage
|
|
12
14
|
} = useIntl();
|
|
15
|
+
const text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.turnInto) : formatMessage(messages.turnInto);
|
|
13
16
|
return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
|
|
14
|
-
text:
|
|
17
|
+
text: text,
|
|
15
18
|
elemBefore: /*#__PURE__*/React.createElement(ChangesIcon, {
|
|
16
19
|
label: ""
|
|
17
20
|
}),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { findParentNodeOfType, findSelectedNodeOfType, safeInsert as pmSafeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
|
+
import { setSelectionAfterTransform } from './selection';
|
|
3
5
|
import { createDefaultLayoutSection } from './transforms/layout-transforms';
|
|
4
6
|
import { transformNodeToTargetType } from './transforms/transformNodeToTargetType';
|
|
5
7
|
/**
|
|
@@ -92,7 +94,11 @@ export var formatNode = function formatNode(targetType) {
|
|
|
92
94
|
nodePos = selection.$from.pos;
|
|
93
95
|
}
|
|
94
96
|
try {
|
|
95
|
-
|
|
97
|
+
var newTr = transformNodeToTargetType(tr, nodeToFormat, nodePos, targetType);
|
|
98
|
+
if (newTr && fg('platform_editor_block_menu_selection_fix')) {
|
|
99
|
+
return setSelectionAfterTransform(newTr, nodePos, targetType);
|
|
100
|
+
}
|
|
101
|
+
return newTr;
|
|
96
102
|
} catch (_unused) {
|
|
97
103
|
return null;
|
|
98
104
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
/**
|
|
3
|
+
* Sets the appropriate selection after transforming a node to a target type
|
|
4
|
+
* @param newTr - The transaction containing the transformed node
|
|
5
|
+
* @param nodePos - The position of the transformed node
|
|
6
|
+
* @param targetType - The target type the node was transformed to
|
|
7
|
+
* @returns The transaction with the updated selection, or the original transaction if no selection change needed
|
|
8
|
+
*/
|
|
9
|
+
export var setSelectionAfterTransform = function setSelectionAfterTransform(newTr, nodePos, targetType) {
|
|
10
|
+
// Find the actual node that was transformed to get its positioning
|
|
11
|
+
var transformedNodePos = newTr.doc.resolve(nodePos);
|
|
12
|
+
var transformedNode = transformedNodePos.nodeAfter;
|
|
13
|
+
if (!transformedNode) {
|
|
14
|
+
return newTr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Check if target type is other than list, text, heading, blockquotes
|
|
18
|
+
var isListNode = targetType === 'bulletList' || targetType === 'orderedList' || targetType === 'taskList';
|
|
19
|
+
var isBlockquote = targetType === 'blockquote';
|
|
20
|
+
var isContainer = ['panel', 'expand', 'codeBlock', 'layoutSection'].includes(targetType);
|
|
21
|
+
if (isListNode || isBlockquote) {
|
|
22
|
+
// For taskList, select all content within the list
|
|
23
|
+
var textStart = transformedNodePos.pos + 1; // Inside the taskList
|
|
24
|
+
var textEnd = transformedNodePos.pos + transformedNode.nodeSize - 1; // End of taskList content
|
|
25
|
+
var textSelection = TextSelection.between(newTr.doc.resolve(textStart), newTr.doc.resolve(textEnd));
|
|
26
|
+
return newTr.setSelection(textSelection);
|
|
27
|
+
} else if (isContainer) {
|
|
28
|
+
// Use NodeSelection for types other than list, text, heading, blockquotes
|
|
29
|
+
var nodeSelection = NodeSelection.create(newTr.doc, transformedNodePos.pos);
|
|
30
|
+
return newTr.setSelection(nodeSelection);
|
|
31
|
+
}
|
|
32
|
+
return newTr;
|
|
33
|
+
};
|
|
@@ -72,11 +72,10 @@ var BlockMenu = function BlockMenu(_ref2) {
|
|
|
72
72
|
var targetHandleRef = editorView === null || editorView === void 0 || (_editorView$dom = editorView.dom) === null || _editorView$dom === void 0 ? void 0 : _editorView$dom.querySelector(DRAG_HANDLE_SELECTOR);
|
|
73
73
|
var hasFocus = expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true) ? (_ref3 = (editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) || document.activeElement === targetHandleRef) !== null && _ref3 !== void 0 ? _ref3 : false : (_editorView$hasFocus = editorView === null || editorView === void 0 ? void 0 : editorView.hasFocus()) !== null && _editorView$hasFocus !== void 0 ? _editorView$hasFocus : false;
|
|
74
74
|
var hasSelection = !!editorView && !editorView.state.selection.empty;
|
|
75
|
-
var emptyLineEnabled = expValEqualsNoExposure('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
76
75
|
|
|
77
76
|
// hasSelection true, always show block menu
|
|
78
77
|
// hasSelection false, only show block menu when empty line experiment is enabled
|
|
79
|
-
var shouldShowBlockMenuForEmptyLine = hasSelection ||
|
|
78
|
+
var shouldShowBlockMenuForEmptyLine = hasSelection || !hasSelection && expValEqualsNoExposure('platform_editor_block_menu_empty_line', 'isEnabled', true);
|
|
80
79
|
useEffect(function () {
|
|
81
80
|
var _api$userIntent;
|
|
82
81
|
if (!isMenuOpen || !menuTriggerBy || !isSelectedViaDragHandle || !hasFocus || !shouldShowBlockMenuForEmptyLine || ['resizing', 'dragging'].includes(currentUserIntent || '')) {
|
|
@@ -6,11 +6,13 @@ import { injectIntl, useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
7
7
|
import { copyHTMLToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
8
8
|
import { toDOM, copyDomNode } from '@atlaskit/editor-common/copy-button';
|
|
9
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
9
10
|
import { Fragment, DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
10
11
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
12
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
12
13
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
13
14
|
import CopyIcon from '@atlaskit/icon/core/copy';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
16
|
var toDOMFromFragment = function toDOMFromFragment(fragment, schema) {
|
|
15
17
|
return DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
16
18
|
};
|
|
@@ -94,6 +96,7 @@ var CopyBlockMenuItem = function CopyBlockMenuItem(_ref) {
|
|
|
94
96
|
api === null || api === void 0 || api.core.actions.focus();
|
|
95
97
|
}
|
|
96
98
|
};
|
|
99
|
+
var text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.copyContent) : formatMessage(messages.copyBlock);
|
|
97
100
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
98
101
|
elemBefore: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
99
102
|
label: ""
|
|
@@ -101,6 +104,6 @@ var CopyBlockMenuItem = function CopyBlockMenuItem(_ref) {
|
|
|
101
104
|
onClick: function onClick(e) {
|
|
102
105
|
return copyHandler(e);
|
|
103
106
|
}
|
|
104
|
-
},
|
|
107
|
+
}, text);
|
|
105
108
|
};
|
|
106
109
|
export default injectIntl(CopyBlockMenuItem);
|
package/dist/esm/ui/copy-link.js
CHANGED
|
@@ -39,11 +39,12 @@ var CopyLinkDropdownItemContent = function CopyLinkDropdownItemContent(_ref) {
|
|
|
39
39
|
if (!fg('platform_editor_adf_with_localid') || checkIsNestedNode()) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
|
+
var text = fg('platform_editor_block_menu_patch_1') ? formatMessage(messages.copyLinkToBlock) : formatMessage(messages.copyLink);
|
|
42
43
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
|
43
44
|
onClick: handleClick,
|
|
44
45
|
elemBefore: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
45
46
|
label: ""
|
|
46
47
|
})
|
|
47
|
-
},
|
|
48
|
+
}, text);
|
|
48
49
|
};
|
|
49
50
|
export var CopyLinkDropdownItem = injectIntl(CopyLinkDropdownItemContent);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl, injectIntl } from 'react-intl-next';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
4
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
6
7
|
import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
|
|
7
8
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { Box } from '@atlaskit/primitives/box';
|
|
9
11
|
import Text from '@atlaskit/primitives/text';
|
|
10
12
|
var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
@@ -57,6 +59,7 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
57
59
|
var _api$decorations2, _api$decorations2$rem;
|
|
58
60
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$decorations2 = api.decorations) === null || _api$decorations2 === void 0 || (_api$decorations2 = _api$decorations2.commands) === null || _api$decorations2 === void 0 || (_api$decorations2$rem = _api$decorations2.removeDecoration) === null || _api$decorations2$rem === void 0 ? void 0 : _api$decorations2$rem.call(_api$decorations2));
|
|
59
61
|
};
|
|
62
|
+
var text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.deleteBlock) : formatMessage(messages.deleteBlock);
|
|
60
63
|
return /*#__PURE__*/React.createElement(Box, {
|
|
61
64
|
onMouseEnter: onMouseEnter,
|
|
62
65
|
onMouseLeave: onMouseLeave
|
|
@@ -69,6 +72,6 @@ var DeleteDropdownItemContent = function DeleteDropdownItemContent(_ref) {
|
|
|
69
72
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
70
73
|
as: "span",
|
|
71
74
|
color: "color.text.danger"
|
|
72
|
-
},
|
|
75
|
+
}, text)));
|
|
73
76
|
};
|
|
74
77
|
export var DeleteDropdownItem = injectIntl(DeleteDropdownItemContent);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { messages } from '@atlaskit/editor-common/block-menu';
|
|
4
|
+
import { blockMenuMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { ToolbarNestedDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
5
6
|
import ChangesIcon from '@atlaskit/icon/core/changes';
|
|
6
7
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
export var FormatMenuComponent = function FormatMenuComponent(_ref) {
|
|
8
10
|
var children = _ref.children;
|
|
9
11
|
var _useIntl = useIntl(),
|
|
10
12
|
formatMessage = _useIntl.formatMessage;
|
|
13
|
+
var text = fg('platform_editor_block_menu_patch_1') ? formatMessage(blockMenuMessages.turnInto) : formatMessage(messages.turnInto);
|
|
11
14
|
return /*#__PURE__*/React.createElement(ToolbarNestedDropdownMenu, {
|
|
12
|
-
text:
|
|
15
|
+
text: text,
|
|
13
16
|
elemBefore: /*#__PURE__*/React.createElement(ChangesIcon, {
|
|
14
17
|
label: ""
|
|
15
18
|
}),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { FormatNodeTargetType } from './transforms/types';
|
|
3
|
+
/**
|
|
4
|
+
* Sets the appropriate selection after transforming a node to a target type
|
|
5
|
+
* @param newTr - The transaction containing the transformed node
|
|
6
|
+
* @param nodePos - The position of the transformed node
|
|
7
|
+
* @param targetType - The target type the node was transformed to
|
|
8
|
+
* @returns The transaction with the updated selection, or the original transaction if no selection change needed
|
|
9
|
+
*/
|
|
10
|
+
export declare const setSelectionAfterTransform: (newTr: Transaction, nodePos: number, targetType: FormatNodeTargetType) => Transaction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { FormatNodeTargetType } from './transforms/types';
|
|
3
|
+
/**
|
|
4
|
+
* Sets the appropriate selection after transforming a node to a target type
|
|
5
|
+
* @param newTr - The transaction containing the transformed node
|
|
6
|
+
* @param nodePos - The position of the transformed node
|
|
7
|
+
* @param targetType - The target type the node was transformed to
|
|
8
|
+
* @returns The transaction with the updated selection, or the original transaction if no selection change needed
|
|
9
|
+
*/
|
|
10
|
+
export declare const setSelectionAfterTransform: (newTr: Transaction, nodePos: number, targetType: FormatNodeTargetType) => Transaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@atlaskit/icon-lab": "^5.7.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/primitives": "^14.15.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^12.29.0",
|
|
46
46
|
"@atlaskit/tokens": "^6.3.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^109.
|
|
50
|
+
"@atlaskit/editor-common": "^109.14.0",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
53
53
|
},
|
|
@@ -90,6 +90,12 @@
|
|
|
90
90
|
"platform-feature-flags": {
|
|
91
91
|
"platform_editor_adf_with_localid": {
|
|
92
92
|
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"platform_editor_block_menu_selection_fix": {
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
"platform_editor_block_menu_patch_1": {
|
|
98
|
+
"type": "boolean"
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
}
|