@atlaskit/editor-plugin-table 10.11.3 → 10.11.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 +12 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +1 -2
- package/dist/cjs/nodeviews/TableComponent.js +50 -48
- package/dist/cjs/nodeviews/TableContainer.js +1 -2
- package/dist/cjs/nodeviews/TableResizer.js +1 -2
- package/dist/cjs/nodeviews/TableRow.js +3 -1
- package/dist/cjs/nodeviews/lazy-node-views.js +1 -2
- package/dist/cjs/pm-plugins/commands/commands-with-analytics.js +14 -14
- package/dist/cjs/pm-plugins/view-mode-sort/index.js +10 -10
- package/dist/cjs/tablePlugin.js +57 -58
- package/dist/cjs/ui/DragHandle/index.js +1 -2
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -2
- package/dist/cjs/ui/FloatingContextualButton/index.js +1 -2
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +45 -46
- package/dist/cjs/ui/FloatingDeleteButton/index.js +1 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +1 -2
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +1 -2
- package/dist/cjs/ui/FloatingInsertButton/index.js +1 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +1 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.js +1 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnDropTargets/index.js +1 -2
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/CornerControls/ClassicCornerControls.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/RowDropTarget/index.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/index.js +1 -2
- package/dist/cjs/ui/event-handlers.js +12 -12
- package/dist/cjs/ui/toolbar.js +1 -2
- package/dist/cjs/ui/ui-styles.js +16 -16
- package/dist/es2019/nodeviews/TableComponent.js +8 -6
- package/dist/es2019/nodeviews/TableRow.js +3 -1
- package/dist/esm/nodeviews/TableComponent.js +50 -48
- package/dist/esm/nodeviews/TableRow.js +3 -1
- package/dist/esm/pm-plugins/commands/commands-with-analytics.js +14 -14
- package/dist/esm/pm-plugins/view-mode-sort/index.js +10 -10
- package/dist/esm/tablePlugin.js +56 -56
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +44 -44
- package/dist/esm/ui/event-handlers.js +12 -12
- package/dist/esm/ui/ui-styles.js +16 -16
- package/package.json +4 -4
- package/src/nodeviews/TableComponent.tsx +1 -1
- package/src/nodeviews/TableRow.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,8 +13,7 @@ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
|
13
13
|
var _columnControls = require("../pm-plugins/utils/column-controls");
|
|
14
14
|
var _consts = require("../ui/consts");
|
|
15
15
|
var _ColumnDropTarget = require("../ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget");
|
|
16
|
-
function
|
|
17
|
-
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; }
|
|
16
|
+
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); }
|
|
18
17
|
var ExternalDropTargets = exports.ExternalDropTargets = function ExternalDropTargets(_ref) {
|
|
19
18
|
var editorView = _ref.editorView,
|
|
20
19
|
node = _ref.node,
|
|
@@ -403,7 +403,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
403
403
|
key: "componentDidMount",
|
|
404
404
|
value: function componentDidMount() {
|
|
405
405
|
var _this2 = this;
|
|
406
|
-
if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', false
|
|
406
|
+
if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', false, {
|
|
407
|
+
exposure: true
|
|
408
|
+
})) {
|
|
407
409
|
this.initialiseEventListenersAfterMount();
|
|
408
410
|
return;
|
|
409
411
|
}
|
|
@@ -610,14 +612,14 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
610
612
|
var _this$containerWidth,
|
|
611
613
|
_this4 = this;
|
|
612
614
|
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
613
|
-
var _this$
|
|
614
|
-
getNode = _this$
|
|
615
|
-
containerWidth = _this$
|
|
616
|
-
isResizing = _this$
|
|
617
|
-
view = _this$
|
|
618
|
-
getPos = _this$
|
|
619
|
-
getEditorFeatureFlags = _this$
|
|
620
|
-
options = _this$
|
|
615
|
+
var _this$props0 = this.props,
|
|
616
|
+
getNode = _this$props0.getNode,
|
|
617
|
+
containerWidth = _this$props0.containerWidth,
|
|
618
|
+
isResizing = _this$props0.isResizing,
|
|
619
|
+
view = _this$props0.view,
|
|
620
|
+
getPos = _this$props0.getPos,
|
|
621
|
+
getEditorFeatureFlags = _this$props0.getEditorFeatureFlags,
|
|
622
|
+
options = _this$props0.options;
|
|
621
623
|
if (!this.table) {
|
|
622
624
|
return;
|
|
623
625
|
}
|
|
@@ -725,17 +727,17 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
725
727
|
_this$props$options9,
|
|
726
728
|
_this$wrapper,
|
|
727
729
|
_this5 = this;
|
|
728
|
-
var _this$
|
|
729
|
-
view = _this$
|
|
730
|
-
getNode = _this$
|
|
731
|
-
isMediaFullscreen = _this$
|
|
732
|
-
allowColumnResizing = _this$
|
|
733
|
-
allowTableResizing = _this$
|
|
734
|
-
isResizing = _this$
|
|
735
|
-
options = _this$
|
|
736
|
-
isTableScalingEnabled = _this$
|
|
737
|
-
getPos = _this$
|
|
738
|
-
getEditorFeatureFlags = _this$
|
|
730
|
+
var _this$props1 = this.props,
|
|
731
|
+
view = _this$props1.view,
|
|
732
|
+
getNode = _this$props1.getNode,
|
|
733
|
+
isMediaFullscreen = _this$props1.isMediaFullscreen,
|
|
734
|
+
allowColumnResizing = _this$props1.allowColumnResizing,
|
|
735
|
+
allowTableResizing = _this$props1.allowTableResizing,
|
|
736
|
+
isResizing = _this$props1.isResizing,
|
|
737
|
+
options = _this$props1.options,
|
|
738
|
+
isTableScalingEnabled = _this$props1.isTableScalingEnabled,
|
|
739
|
+
getPos = _this$props1.getPos,
|
|
740
|
+
getEditorFeatureFlags = _this$props1.getEditorFeatureFlags;
|
|
739
741
|
var isInDanger = this.props.isInDanger;
|
|
740
742
|
var table = (0, _utils2.findTable)(view.state.selection);
|
|
741
743
|
if (!(0, _platformFeatureFlags.fg)('platform_editor_table_use_shared_state_hook_fg')) {
|
|
@@ -853,33 +855,33 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
853
855
|
key: "render",
|
|
854
856
|
value: function render() {
|
|
855
857
|
var _this6 = this,
|
|
856
|
-
_this$props$
|
|
857
|
-
var _this$
|
|
858
|
-
view = _this$
|
|
859
|
-
getNode = _this$
|
|
860
|
-
isResizing = _this$
|
|
861
|
-
_this$
|
|
862
|
-
allowControls = _this$
|
|
863
|
-
isHeaderRowEnabled = _this$
|
|
864
|
-
ordering = _this$
|
|
865
|
-
isHeaderColumnEnabled = _this$
|
|
866
|
-
tableActive = _this$
|
|
867
|
-
containerWidth = _this$
|
|
868
|
-
options = _this$
|
|
869
|
-
getPos = _this$
|
|
870
|
-
pluginInjectionApi = _this$
|
|
871
|
-
isDragAndDropEnabled = _this$
|
|
872
|
-
getEditorFeatureFlags = _this$
|
|
873
|
-
isTableScalingEnabled = _this$
|
|
874
|
-
allowTableResizing = _this$
|
|
875
|
-
allowTableAlignment = _this$
|
|
876
|
-
selection = _this$
|
|
877
|
-
var _this$
|
|
878
|
-
isInDanger = _this$
|
|
879
|
-
hoveredRows = _this$
|
|
880
|
-
hoveredCell = _this$
|
|
881
|
-
isTableHovered = _this$
|
|
882
|
-
isWholeTableInDanger = _this$
|
|
858
|
+
_this$props$options0;
|
|
859
|
+
var _this$props10 = this.props,
|
|
860
|
+
view = _this$props10.view,
|
|
861
|
+
getNode = _this$props10.getNode,
|
|
862
|
+
isResizing = _this$props10.isResizing,
|
|
863
|
+
_this$props10$allowCo = _this$props10.allowControls,
|
|
864
|
+
allowControls = _this$props10$allowCo === void 0 ? true : _this$props10$allowCo,
|
|
865
|
+
isHeaderRowEnabled = _this$props10.isHeaderRowEnabled,
|
|
866
|
+
ordering = _this$props10.ordering,
|
|
867
|
+
isHeaderColumnEnabled = _this$props10.isHeaderColumnEnabled,
|
|
868
|
+
tableActive = _this$props10.tableActive,
|
|
869
|
+
containerWidth = _this$props10.containerWidth,
|
|
870
|
+
options = _this$props10.options,
|
|
871
|
+
getPos = _this$props10.getPos,
|
|
872
|
+
pluginInjectionApi = _this$props10.pluginInjectionApi,
|
|
873
|
+
isDragAndDropEnabled = _this$props10.isDragAndDropEnabled,
|
|
874
|
+
getEditorFeatureFlags = _this$props10.getEditorFeatureFlags,
|
|
875
|
+
isTableScalingEnabled = _this$props10.isTableScalingEnabled,
|
|
876
|
+
allowTableResizing = _this$props10.allowTableResizing,
|
|
877
|
+
allowTableAlignment = _this$props10.allowTableAlignment,
|
|
878
|
+
selection = _this$props10.selection;
|
|
879
|
+
var _this$props11 = this.props,
|
|
880
|
+
isInDanger = _this$props11.isInDanger,
|
|
881
|
+
hoveredRows = _this$props11.hoveredRows,
|
|
882
|
+
hoveredCell = _this$props11.hoveredCell,
|
|
883
|
+
isTableHovered = _this$props11.isTableHovered,
|
|
884
|
+
isWholeTableInDanger = _this$props11.isWholeTableInDanger;
|
|
883
885
|
var _this$state3 = this.state,
|
|
884
886
|
showBeforeShadow = _this$state3.showBeforeShadow,
|
|
885
887
|
showAfterShadow = _this$state3.showAfterShadow;
|
|
@@ -974,7 +976,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
974
976
|
var _getEditorFeatureFlag7 = getEditorFeatureFlags(),
|
|
975
977
|
_getEditorFeatureFlag8 = _getEditorFeatureFlag7.tableWithFixedColumnWidthsOption,
|
|
976
978
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag8 === void 0 ? false : _getEditorFeatureFlag8;
|
|
977
|
-
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$
|
|
979
|
+
var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options0 = this.props.options) !== null && _this$props$options0 !== void 0 && _this$props$options0.isCommentEditor));
|
|
978
980
|
return /*#__PURE__*/_react.default.createElement(_TableContainer.TableContainer
|
|
979
981
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
980
982
|
, {
|
|
@@ -24,8 +24,7 @@ var _alignment = require("../pm-plugins/utils/alignment");
|
|
|
24
24
|
var _types = require("../types");
|
|
25
25
|
var _tableContainerStyles = require("./table-container-styles");
|
|
26
26
|
var _TableResizer = require("./TableResizer");
|
|
27
|
-
function
|
|
28
|
-
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; }
|
|
27
|
+
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); }
|
|
29
28
|
var InnerContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
30
29
|
var className = _ref.className,
|
|
31
30
|
style = _ref.style,
|
|
@@ -37,8 +37,7 @@ var _guidelines = require("../pm-plugins/utils/guidelines");
|
|
|
37
37
|
var _snapping = require("../pm-plugins/utils/snapping");
|
|
38
38
|
var _consts2 = require("../ui/consts");
|
|
39
39
|
var _useInternalTablePluginStateSelector = require("../ui/hooks/useInternalTablePluginStateSelector");
|
|
40
|
-
function
|
|
41
|
-
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; }
|
|
40
|
+
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); }
|
|
42
41
|
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; }
|
|
43
42
|
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; }
|
|
44
43
|
var RESIZE_STEP_VALUE = 10;
|
|
@@ -86,7 +86,9 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
86
86
|
_this.isInNestedTable = (0, _nesting.getParentOfTypeCount)(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
|
|
87
87
|
}
|
|
88
88
|
if (_this.isHeaderRow) {
|
|
89
|
-
if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', false
|
|
89
|
+
if ((0, _experiments.editorExperiment)('platform_editor_nodevisibility', false, {
|
|
90
|
+
exposure: true
|
|
91
|
+
})) {
|
|
90
92
|
_this.subscribeWhenRowVisible();
|
|
91
93
|
} else {
|
|
92
94
|
var _nodeVisibilityManage = (0, _nodeVisibility.nodeVisibilityManager)(view.dom),
|
|
@@ -12,8 +12,7 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
12
12
|
var _table = require("./table");
|
|
13
13
|
var _TableCell = _interopRequireDefault(require("./TableCell"));
|
|
14
14
|
var _TableRow = _interopRequireDefault(require("./TableRow"));
|
|
15
|
-
function
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(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; } // TODO: ED-23976 - Clean up
|
|
15
|
+
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" != (0, _typeof2.default)(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); } // TODO: ED-23976 - Clean up
|
|
17
16
|
var lazyTableView = exports.lazyTableView = function lazyTableView(options) {
|
|
18
17
|
// LNV tables were broken in concurrent mode - they were temporarily disabled to unblock concurrent mode.
|
|
19
18
|
// Enabling them again via the platform_editor_enable_table_lnv flag.
|
|
@@ -417,9 +417,9 @@ var toggleNumberColumnWithAnalytics = exports.toggleNumberColumnWithAnalytics =
|
|
|
417
417
|
var sortColumnWithAnalytics = exports.sortColumnWithAnalytics = function sortColumnWithAnalytics(editorAnalyticsAPI) {
|
|
418
418
|
return function (inputMethod, columnIndex, sortOrder) {
|
|
419
419
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
420
|
-
var
|
|
421
|
-
totalRowCount =
|
|
422
|
-
totalColumnCount =
|
|
420
|
+
var _getSelectedTableInfo0 = (0, _analytics2.getSelectedTableInfo)(state.selection),
|
|
421
|
+
totalRowCount = _getSelectedTableInfo0.totalRowCount,
|
|
422
|
+
totalColumnCount = _getSelectedTableInfo0.totalColumnCount;
|
|
423
423
|
return {
|
|
424
424
|
action: _analytics.TABLE_ACTION.SORTED_COLUMN,
|
|
425
425
|
actionSubject: _analytics.ACTION_SUBJECT.TABLE,
|
|
@@ -461,9 +461,9 @@ var distributeColumnsWidthsWithAnalytics = exports.distributeColumnsWidthsWithAn
|
|
|
461
461
|
};
|
|
462
462
|
var wrapTableInExpandWithAnalytics = exports.wrapTableInExpandWithAnalytics = function wrapTableInExpandWithAnalytics(editorAnalyticsAPI) {
|
|
463
463
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
464
|
-
var
|
|
465
|
-
totalRowCount =
|
|
466
|
-
totalColumnCount =
|
|
464
|
+
var _getSelectedTableInfo1 = (0, _analytics2.getSelectedTableInfo)(state.selection),
|
|
465
|
+
totalRowCount = _getSelectedTableInfo1.totalRowCount,
|
|
466
|
+
totalColumnCount = _getSelectedTableInfo1.totalColumnCount;
|
|
467
467
|
return {
|
|
468
468
|
action: _analytics.TABLE_ACTION.COLLAPSED,
|
|
469
469
|
actionSubject: _analytics.ACTION_SUBJECT.TABLE,
|
|
@@ -478,10 +478,10 @@ var wrapTableInExpandWithAnalytics = exports.wrapTableInExpandWithAnalytics = fu
|
|
|
478
478
|
};
|
|
479
479
|
var toggleFixedColumnWidthsOptionAnalytics = exports.toggleFixedColumnWidthsOptionAnalytics = function toggleFixedColumnWidthsOptionAnalytics(editorAnalyticsAPI, inputMethod) {
|
|
480
480
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
481
|
-
var
|
|
482
|
-
table =
|
|
483
|
-
totalRowCount =
|
|
484
|
-
totalColumnCount =
|
|
481
|
+
var _getSelectedTableInfo10 = (0, _analytics2.getSelectedTableInfo)(state.selection),
|
|
482
|
+
table = _getSelectedTableInfo10.table,
|
|
483
|
+
totalRowCount = _getSelectedTableInfo10.totalRowCount,
|
|
484
|
+
totalColumnCount = _getSelectedTableInfo10.totalColumnCount;
|
|
485
485
|
var previousDisplayMode;
|
|
486
486
|
var newDisplayMode;
|
|
487
487
|
switch (table === null || table === void 0 ? void 0 : table.node.attrs.displayMode) {
|
|
@@ -516,10 +516,10 @@ var toggleFixedColumnWidthsOptionAnalytics = exports.toggleFixedColumnWidthsOpti
|
|
|
516
516
|
var setTableAlignmentWithAnalytics = exports.setTableAlignmentWithAnalytics = function setTableAlignmentWithAnalytics(editorAnalyticsAPI, isCommentEditor) {
|
|
517
517
|
return function (newAlignment, previousAlignment, inputMethod, reason) {
|
|
518
518
|
return (0, _analytics2.withEditorAnalyticsAPI)(function (state) {
|
|
519
|
-
var
|
|
520
|
-
table =
|
|
521
|
-
totalRowCount =
|
|
522
|
-
totalColumnCount =
|
|
519
|
+
var _getSelectedTableInfo11 = (0, _analytics2.getSelectedTableInfo)(state.selection),
|
|
520
|
+
table = _getSelectedTableInfo11.table,
|
|
521
|
+
totalRowCount = _getSelectedTableInfo11.totalRowCount,
|
|
522
|
+
totalColumnCount = _getSelectedTableInfo11.totalColumnCount;
|
|
523
523
|
return {
|
|
524
524
|
action: _analytics.TABLE_ACTION.CHANGED_ALIGNMENT,
|
|
525
525
|
actionSubject: _analytics.ACTION_SUBJECT.TABLE,
|
|
@@ -193,8 +193,8 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
|
|
|
193
193
|
var hoverTableMeta = tr.getMeta('mouseEnterTable');
|
|
194
194
|
if (hoverTableMeta) {
|
|
195
195
|
allTables = allTables.filter(function (_ref9) {
|
|
196
|
-
var
|
|
197
|
-
id =
|
|
196
|
+
var _ref0 = (0, _slicedToArray2.default)(_ref9, 1),
|
|
197
|
+
id = _ref0[0];
|
|
198
198
|
return id !== hoverTableMeta[0];
|
|
199
199
|
});
|
|
200
200
|
allTables.push(hoverTableMeta);
|
|
@@ -214,10 +214,10 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
|
|
|
214
214
|
tableId = _table2[0],
|
|
215
215
|
node = _table2[1],
|
|
216
216
|
pos = _table2[2];
|
|
217
|
-
var
|
|
218
|
-
oldOrder =
|
|
219
|
-
oldDirection =
|
|
220
|
-
oldIndex =
|
|
217
|
+
var _ref1 = (oldPluginState === null || oldPluginState === void 0 || (_oldPluginState$sort = oldPluginState.sort) === null || _oldPluginState$sort === void 0 ? void 0 : _oldPluginState$sort[tableId]) || {},
|
|
218
|
+
oldOrder = _ref1.order,
|
|
219
|
+
oldDirection = _ref1.direction,
|
|
220
|
+
oldIndex = _ref1.index;
|
|
221
221
|
if (isChangesIncoming) {
|
|
222
222
|
var _maybeTableNode$attrs;
|
|
223
223
|
var maybeTableNode = tr.doc.nodeAt(pos);
|
|
@@ -257,10 +257,10 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
|
|
|
257
257
|
/**
|
|
258
258
|
* Sort the table if the sort order has changed
|
|
259
259
|
*/
|
|
260
|
-
var
|
|
261
|
-
newOrder =
|
|
262
|
-
newDirection =
|
|
263
|
-
newIndex =
|
|
260
|
+
var _ref10 = (newPluginState === null || newPluginState === void 0 || (_newPluginState$sort = newPluginState.sort) === null || _newPluginState$sort === void 0 ? void 0 : _newPluginState$sort[tableId]) || {},
|
|
261
|
+
newOrder = _ref10.order,
|
|
262
|
+
newDirection = _ref10.direction,
|
|
263
|
+
newIndex = _ref10.index;
|
|
264
264
|
var orderChanged = oldDirection !== newDirection || oldIndex !== newIndex;
|
|
265
265
|
if (orderChanged) {
|
|
266
266
|
if (!isRemote && newDirection !== _types.SortOrder.NO_ORDER) {
|
package/dist/cjs/tablePlugin.js
CHANGED
|
@@ -65,8 +65,7 @@ var _globalStyles = require("./ui/global-styles");
|
|
|
65
65
|
var _SizeSelector = require("./ui/SizeSelector");
|
|
66
66
|
var _TableFullWidthLabel = require("./ui/TableFullWidthLabel");
|
|
67
67
|
var _toolbar = require("./ui/toolbar");
|
|
68
|
-
function
|
|
69
|
-
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; }
|
|
68
|
+
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); }
|
|
70
69
|
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; }
|
|
71
70
|
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; } // Ignored via go/ees005
|
|
72
71
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -351,9 +350,9 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
351
350
|
var _ref9 = options || {},
|
|
352
351
|
dragAndDropEnabled = _ref9.dragAndDropEnabled;
|
|
353
352
|
return (0, _pmPlugins.tableEditing)({
|
|
354
|
-
reportFixedTable: function reportFixedTable(
|
|
355
|
-
var tr =
|
|
356
|
-
reason =
|
|
353
|
+
reportFixedTable: function reportFixedTable(_ref0) {
|
|
354
|
+
var tr = _ref0.tr,
|
|
355
|
+
reason = _ref0.reason;
|
|
357
356
|
editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
|
|
358
357
|
action: _analytics.TABLE_ACTION.FIXED,
|
|
359
358
|
actionSubject: _analytics.ACTION_SUBJECT.TABLE,
|
|
@@ -369,61 +368,61 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
369
368
|
}
|
|
370
369
|
}, {
|
|
371
370
|
name: 'tableStickyHeaders',
|
|
372
|
-
plugin: function plugin(
|
|
373
|
-
var dispatch =
|
|
374
|
-
eventDispatcher =
|
|
371
|
+
plugin: function plugin(_ref1) {
|
|
372
|
+
var dispatch = _ref1.dispatch,
|
|
373
|
+
eventDispatcher = _ref1.eventDispatcher;
|
|
375
374
|
return options && options.tableOptions.stickyHeaders ? (0, _plugin4.createPlugin)(dispatch, function () {
|
|
376
375
|
return [];
|
|
377
376
|
}) : undefined;
|
|
378
377
|
}
|
|
379
378
|
}, {
|
|
380
379
|
name: 'tableDragAndDrop',
|
|
381
|
-
plugin: function plugin(
|
|
382
|
-
var dispatch =
|
|
380
|
+
plugin: function plugin(_ref10) {
|
|
381
|
+
var dispatch = _ref10.dispatch;
|
|
383
382
|
return options !== null && options !== void 0 && options.dragAndDropEnabled ? (0, _plugin3.createPlugin)(dispatch, editorAnalyticsAPI, options === null || options === void 0 ? void 0 : options.isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, options.isCommentEditor) : undefined;
|
|
384
383
|
}
|
|
385
384
|
}, {
|
|
386
385
|
name: 'tableViewModeSort',
|
|
387
|
-
plugin: function plugin(
|
|
388
|
-
var nodeViewPortalProviderAPI =
|
|
386
|
+
plugin: function plugin(_ref11) {
|
|
387
|
+
var nodeViewPortalProviderAPI = _ref11.nodeViewPortalProviderAPI;
|
|
389
388
|
return api !== null && api !== void 0 && api.editorViewMode ? (0, _viewModeSort.createPlugin)(api, nodeViewPortalProviderAPI) : undefined;
|
|
390
389
|
}
|
|
391
390
|
}, {
|
|
392
391
|
name: 'tableLocalId',
|
|
393
|
-
plugin: function plugin(
|
|
394
|
-
var dispatch =
|
|
392
|
+
plugin: function plugin(_ref12) {
|
|
393
|
+
var dispatch = _ref12.dispatch;
|
|
395
394
|
return (0, _tableLocalId.createPlugin)(dispatch);
|
|
396
395
|
}
|
|
397
396
|
}, {
|
|
398
397
|
name: 'tableWidth',
|
|
399
|
-
plugin: function plugin(
|
|
398
|
+
plugin: function plugin(_ref13) {
|
|
400
399
|
var _options$fullWidthEna, _options$isTableScali, _options$tableOptions3, _options$isCommentEdi;
|
|
401
|
-
var dispatchAnalyticsEvent =
|
|
402
|
-
dispatch =
|
|
400
|
+
var dispatchAnalyticsEvent = _ref13.dispatchAnalyticsEvent,
|
|
401
|
+
dispatch = _ref13.dispatch;
|
|
403
402
|
return options !== null && options !== void 0 && options.tableOptions.allowTableResizing ? (0, _tableWidth.createPlugin)(dispatch, dispatchAnalyticsEvent, (_options$fullWidthEna = options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false, (_options$isTableScali = options.isTableScalingEnabled) !== null && _options$isTableScali !== void 0 ? _options$isTableScali : false, (_options$tableOptions3 = options.tableOptions.allowTableResizing) !== null && _options$tableOptions3 !== void 0 ? _options$tableOptions3 : false, (_options$isCommentEdi = options.isCommentEditor) !== null && _options$isCommentEdi !== void 0 ? _options$isCommentEdi : false) : undefined;
|
|
404
403
|
}
|
|
405
404
|
}, {
|
|
406
405
|
name: 'tableWidthInCommentFix',
|
|
407
|
-
plugin: function plugin(
|
|
406
|
+
plugin: function plugin(_ref14) {
|
|
408
407
|
var _options$tableOptions4;
|
|
409
|
-
var dispatch =
|
|
408
|
+
var dispatch = _ref14.dispatch;
|
|
410
409
|
return options !== null && options !== void 0 && options.tableOptions.allowTableResizing && options !== null && options !== void 0 && options.isCommentEditor ? (0, _tableWidthInCommentFix.createPlugin)(dispatch, (_options$tableOptions4 = options.tableOptions.allowTableAlignment) !== null && _options$tableOptions4 !== void 0 ? _options$tableOptions4 : false) : undefined;
|
|
411
410
|
}
|
|
412
411
|
},
|
|
413
412
|
// TODO: ED-26961 - should be deprecated and eventually replaced with 'tableAnalyticsPlugin'
|
|
414
413
|
{
|
|
415
414
|
name: 'tableOverflowAnalyticsPlugin',
|
|
416
|
-
plugin: function plugin(
|
|
415
|
+
plugin: function plugin(_ref15) {
|
|
417
416
|
var _options$tableOptions5;
|
|
418
|
-
var dispatch =
|
|
419
|
-
dispatchAnalyticsEvent =
|
|
417
|
+
var dispatch = _ref15.dispatch,
|
|
418
|
+
dispatchAnalyticsEvent = _ref15.dispatchAnalyticsEvent;
|
|
420
419
|
return (0, _tableAnalytics.createPlugin)(dispatch, dispatchAnalyticsEvent, (_options$tableOptions5 = options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing) !== null && _options$tableOptions5 !== void 0 ? _options$tableOptions5 : false);
|
|
421
420
|
}
|
|
422
421
|
}, {
|
|
423
422
|
name: 'tableAnalyticsPlugin',
|
|
424
|
-
plugin: function plugin(
|
|
425
|
-
var dispatch =
|
|
426
|
-
dispatchAnalyticsEvent =
|
|
423
|
+
plugin: function plugin(_ref16) {
|
|
424
|
+
var dispatch = _ref16.dispatch,
|
|
425
|
+
dispatchAnalyticsEvent = _ref16.dispatchAnalyticsEvent;
|
|
427
426
|
return (0, _plugin.createPlugin)(dispatch, dispatchAnalyticsEvent);
|
|
428
427
|
}
|
|
429
428
|
}, {
|
|
@@ -442,8 +441,8 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
442
441
|
}
|
|
443
442
|
}, {
|
|
444
443
|
name: 'tableSizeSelectorPlugin',
|
|
445
|
-
plugin: function plugin(
|
|
446
|
-
var dispatch =
|
|
444
|
+
plugin: function plugin(_ref17) {
|
|
445
|
+
var dispatch = _ref17.dispatch;
|
|
447
446
|
return isTableSelectorEnabled ? (0, _tableSizeSelector.createPlugin)(dispatch) : undefined;
|
|
448
447
|
}
|
|
449
448
|
}];
|
|
@@ -460,13 +459,13 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
460
459
|
}
|
|
461
460
|
return plugins;
|
|
462
461
|
},
|
|
463
|
-
contentComponent: function contentComponent(
|
|
462
|
+
contentComponent: function contentComponent(_ref18) {
|
|
464
463
|
var _api$featureFlags;
|
|
465
|
-
var editorView =
|
|
466
|
-
popupsMountPoint =
|
|
467
|
-
popupsBoundariesElement =
|
|
468
|
-
popupsScrollableElement =
|
|
469
|
-
dispatchAnalyticsEvent =
|
|
464
|
+
var editorView = _ref18.editorView,
|
|
465
|
+
popupsMountPoint = _ref18.popupsMountPoint,
|
|
466
|
+
popupsBoundariesElement = _ref18.popupsBoundariesElement,
|
|
467
|
+
popupsScrollableElement = _ref18.popupsScrollableElement,
|
|
468
|
+
dispatchAnalyticsEvent = _ref18.dispatchAnalyticsEvent;
|
|
470
469
|
if ((0, _experiments.editorExperiment)('platform_editor_usesharedpluginstateselector', true)) {
|
|
471
470
|
return /*#__PURE__*/_react.default.createElement(_ContentComponent.ContentComponent, {
|
|
472
471
|
api: api,
|
|
@@ -499,14 +498,14 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
499
498
|
dragAndDropState: _pluginKey2.pluginKey,
|
|
500
499
|
sizeSelectorPluginState: _tableSizeSelector.pluginKey
|
|
501
500
|
},
|
|
502
|
-
render: function render(
|
|
501
|
+
render: function render(_ref19) {
|
|
503
502
|
var _sizeSelectorPluginSt, _api$analytics3;
|
|
504
|
-
var resizingPluginState =
|
|
505
|
-
stickyHeadersState =
|
|
506
|
-
tablePluginState =
|
|
507
|
-
tableWidthPluginState =
|
|
508
|
-
dragAndDropState =
|
|
509
|
-
sizeSelectorPluginState =
|
|
503
|
+
var resizingPluginState = _ref19.tableResizingPluginState,
|
|
504
|
+
stickyHeadersState = _ref19.stickyHeadersState,
|
|
505
|
+
tablePluginState = _ref19.tablePluginState,
|
|
506
|
+
tableWidthPluginState = _ref19.tableWidthPluginState,
|
|
507
|
+
dragAndDropState = _ref19.dragAndDropState,
|
|
508
|
+
sizeSelectorPluginState = _ref19.sizeSelectorPluginState;
|
|
510
509
|
// Any changes made inside `<WithPluginState>` need to be reflected in the
|
|
511
510
|
// `<ContentComponent>` as well.
|
|
512
511
|
var isColumnResizing = resizingPluginState === null || resizingPluginState === void 0 ? void 0 : resizingPluginState.dragging;
|
|
@@ -516,20 +515,20 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
516
515
|
var isResizing = isColumnResizing || isTableResizing;
|
|
517
516
|
var widthToWidest = tablePluginState === null || tablePluginState === void 0 ? void 0 : tablePluginState.widthToWidest;
|
|
518
517
|
var isSizeSelectorOpen = sizeSelectorPluginState === null || sizeSelectorPluginState === void 0 ? void 0 : sizeSelectorPluginState.isSelectorOpen;
|
|
519
|
-
var
|
|
520
|
-
tableNode =
|
|
521
|
-
tablePos =
|
|
522
|
-
targetCellPosition =
|
|
523
|
-
isContextualMenuOpen =
|
|
524
|
-
tableRef =
|
|
525
|
-
pluginConfig =
|
|
526
|
-
insertColumnButtonIndex =
|
|
527
|
-
insertRowButtonIndex =
|
|
528
|
-
isHeaderColumnEnabled =
|
|
529
|
-
isHeaderRowEnabled =
|
|
530
|
-
isDragAndDropEnabled =
|
|
531
|
-
tableWrapperTarget =
|
|
532
|
-
isCellMenuOpenByKeyboard =
|
|
518
|
+
var _ref20 = tablePluginState,
|
|
519
|
+
tableNode = _ref20.tableNode,
|
|
520
|
+
tablePos = _ref20.tablePos,
|
|
521
|
+
targetCellPosition = _ref20.targetCellPosition,
|
|
522
|
+
isContextualMenuOpen = _ref20.isContextualMenuOpen,
|
|
523
|
+
tableRef = _ref20.tableRef,
|
|
524
|
+
pluginConfig = _ref20.pluginConfig,
|
|
525
|
+
insertColumnButtonIndex = _ref20.insertColumnButtonIndex,
|
|
526
|
+
insertRowButtonIndex = _ref20.insertRowButtonIndex,
|
|
527
|
+
isHeaderColumnEnabled = _ref20.isHeaderColumnEnabled,
|
|
528
|
+
isHeaderRowEnabled = _ref20.isHeaderRowEnabled,
|
|
529
|
+
isDragAndDropEnabled = _ref20.isDragAndDropEnabled,
|
|
530
|
+
tableWrapperTarget = _ref20.tableWrapperTarget,
|
|
531
|
+
isCellMenuOpenByKeyboard = _ref20.isCellMenuOpenByKeyboard;
|
|
533
532
|
var allowControls = pluginConfig.allowControls;
|
|
534
533
|
var stickyHeader = stickyHeadersState ? (0, _util.findStickyHeaderForTable)(stickyHeadersState, tablePos) : undefined;
|
|
535
534
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, targetCellPosition && (tableRef || isCellMenuOpenByKeyboard) && !isResizing && options && options.allowContextualMenu && /*#__PURE__*/_react.default.createElement(_FloatingContextualButton.default, {
|
|
@@ -631,8 +630,8 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
631
630
|
}));
|
|
632
631
|
},
|
|
633
632
|
pluginsOptions: {
|
|
634
|
-
quickInsert: function quickInsert(
|
|
635
|
-
var formatMessage =
|
|
633
|
+
quickInsert: function quickInsert(_ref21) {
|
|
634
|
+
var formatMessage = _ref21.formatMessage;
|
|
636
635
|
return [{
|
|
637
636
|
id: 'table',
|
|
638
637
|
title: formatMessage(_messages.toolbarInsertBlockMessages.table),
|
|
@@ -703,8 +702,8 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
703
702
|
return editorViewRef.current;
|
|
704
703
|
}, options, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent)((0, _createPluginConfig.pluginConfig)(options === null || options === void 0 ? void 0 : options.tableOptions))
|
|
705
704
|
},
|
|
706
|
-
usePluginHook: function usePluginHook(
|
|
707
|
-
var editorView =
|
|
705
|
+
usePluginHook: function usePluginHook(_ref22) {
|
|
706
|
+
var editorView = _ref22.editorView;
|
|
708
707
|
var _useTableSharedState = useTableSharedState(api),
|
|
709
708
|
mode = _useTableSharedState.mode;
|
|
710
709
|
(0, _react.useEffect)(function () {
|
|
@@ -27,8 +27,7 @@ var _consts = require("../consts");
|
|
|
27
27
|
var _DragPreview = require("../DragPreview");
|
|
28
28
|
var _useInternalTablePluginStateSelector = require("../hooks/useInternalTablePluginStateSelector");
|
|
29
29
|
var _HandleIconComponent = require("./HandleIconComponent");
|
|
30
|
-
function
|
|
31
|
-
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; }
|
|
30
|
+
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); }
|
|
32
31
|
/* eslint-disable @atlaskit/design-system/no-html-button */
|
|
33
32
|
|
|
34
33
|
var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
@@ -12,8 +12,7 @@ var _reactDom = require("react-dom");
|
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _types = require("../../types");
|
|
14
14
|
var _commonStyles = require("../common-styles");
|
|
15
|
-
function
|
|
16
|
-
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; }
|
|
15
|
+
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); }
|
|
17
16
|
var BUTTON_WIDTH = 20;
|
|
18
17
|
var calcLeftPos = exports.calcLeftPos = function calcLeftPos(_ref) {
|
|
19
18
|
var buttonWidth = _ref.buttonWidth,
|
|
@@ -22,8 +22,7 @@ var _commands = require("../../pm-plugins/commands");
|
|
|
22
22
|
var _types = require("../../types");
|
|
23
23
|
var _FixedButton = _interopRequireDefault(require("./FixedButton"));
|
|
24
24
|
var _styles = require("./styles");
|
|
25
|
-
function
|
|
26
|
-
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; }
|
|
25
|
+
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); }
|
|
27
26
|
/**
|
|
28
27
|
* @jsxRuntime classic
|
|
29
28
|
* @jsx jsx
|