@atlaskit/editor-plugin-table 7.31.3 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/dist/cjs/commands/column-resize.js +3 -2
- package/dist/cjs/commands/hover.js +5 -3
- package/dist/cjs/event-handlers.js +12 -1
- package/dist/cjs/nodeviews/TableComponent.js +18 -15
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/cjs/nodeviews/lazy-node-views.js +2 -3
- package/dist/cjs/nodeviews/table.js +16 -12
- package/dist/cjs/plugin.js +21 -26
- package/dist/cjs/pm-plugins/main.js +3 -5
- package/dist/cjs/toolbar.js +1 -1
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/ui/common-styles.js +2 -2
- package/dist/cjs/ui/ui-styles.js +6 -9
- package/dist/cjs/utils/decoration.js +2 -2
- package/dist/es2019/commands/column-resize.js +3 -2
- package/dist/es2019/commands/hover.js +11 -6
- package/dist/es2019/event-handlers.js +12 -1
- package/dist/es2019/nodeviews/TableComponent.js +18 -15
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/es2019/nodeviews/lazy-node-views.js +2 -3
- package/dist/es2019/nodeviews/table.js +16 -12
- package/dist/es2019/plugin.js +21 -24
- package/dist/es2019/pm-plugins/main.js +3 -5
- package/dist/es2019/toolbar.js +1 -1
- package/dist/es2019/types.js +2 -0
- package/dist/es2019/ui/common-styles.js +4 -4
- package/dist/es2019/ui/ui-styles.js +36 -29
- package/dist/es2019/utils/decoration.js +2 -2
- package/dist/esm/commands/column-resize.js +3 -2
- package/dist/esm/commands/hover.js +5 -3
- package/dist/esm/event-handlers.js +12 -1
- package/dist/esm/nodeviews/TableComponent.js +18 -15
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +5 -2
- package/dist/esm/nodeviews/lazy-node-views.js +2 -3
- package/dist/esm/nodeviews/table.js +16 -12
- package/dist/esm/plugin.js +21 -26
- package/dist/esm/pm-plugins/main.js +3 -5
- package/dist/esm/toolbar.js +1 -1
- package/dist/esm/types.js +2 -0
- package/dist/esm/ui/common-styles.js +2 -2
- package/dist/esm/ui/ui-styles.js +6 -9
- package/dist/esm/utils/decoration.js +2 -2
- package/dist/types/event-handlers.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +2 -1
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +3 -1
- package/dist/types/nodeviews/lazy-node-views.d.ts +0 -1
- package/dist/types/nodeviews/table.d.ts +1 -1
- package/dist/types/nodeviews/types.d.ts +2 -2
- package/dist/types/plugin.d.ts +1 -3
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/types.d.ts +4 -1
- package/dist/types/ui/ui-styles.d.ts +1 -1
- package/dist/types/utils/decoration.d.ts +1 -1
- package/dist/types-ts4.5/event-handlers.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +3 -1
- package/dist/types-ts4.5/nodeviews/lazy-node-views.d.ts +0 -1
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +2 -2
- package/dist/types-ts4.5/plugin.d.ts +1 -3
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +4 -1
- package/dist/types-ts4.5/ui/ui-styles.d.ts +1 -1
- package/dist/types-ts4.5/utils/decoration.d.ts +1 -1
- package/package.json +5 -5
- package/src/commands/column-resize.ts +8 -3
- package/src/commands/hover.ts +14 -10
- package/src/event-handlers.ts +16 -1
- package/src/nodeviews/TableComponent.tsx +22 -16
- package/src/nodeviews/TableComponentWithSharedState.tsx +6 -1
- package/src/nodeviews/lazy-node-views.ts +0 -4
- package/src/nodeviews/table.tsx +13 -8
- package/src/nodeviews/types.ts +2 -2
- package/src/plugin.tsx +24 -31
- package/src/pm-plugins/main.ts +2 -6
- package/src/toolbar.tsx +1 -1
- package/src/types.ts +5 -1
- package/src/ui/common-styles.ts +1 -1
- package/src/ui/ui-styles.ts +36 -29
- package/src/utils/decoration.ts +8 -3
|
@@ -27,15 +27,15 @@ const tableAttributes = node => {
|
|
|
27
27
|
'data-table-display-mode': node.attrs.displayMode
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
const getInlineWidth = (node, options, state, pos) => {
|
|
31
|
-
if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor &&
|
|
30
|
+
const getInlineWidth = (node, options, state, pos, allowTableResizing) => {
|
|
31
|
+
if (!node.attrs.width && options !== null && options !== void 0 && options.isCommentEditor && allowTableResizing) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// provide a width for tables when custom table width is supported
|
|
36
36
|
// this is to ensure 'responsive' tables (colgroup widths are undefined) become fixed to
|
|
37
37
|
// support screen size adjustments
|
|
38
|
-
const shouldHaveInlineWidth =
|
|
38
|
+
const shouldHaveInlineWidth = allowTableResizing && !isTableNested(state, pos);
|
|
39
39
|
let widthValue = getTableContainerWidth(node);
|
|
40
40
|
if (node.attrs.isNumberColumnEnabled) {
|
|
41
41
|
widthValue -= akEditorTableNumberColumnWidth;
|
|
@@ -73,7 +73,7 @@ export default class TableView extends ReactNodeView {
|
|
|
73
73
|
var _this$options, _this$options2, _this$getEditorFeatur;
|
|
74
74
|
this.table = rendered.dom;
|
|
75
75
|
if (!((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.isTableScalingEnabled) || (_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.isTableScalingEnabled && (_this$getEditorFeatur = this.getEditorFeatureFlags) !== null && _this$getEditorFeatur !== void 0 && _this$getEditorFeatur.call(this).tableWithFixedColumnWidthsOption && this.node.attrs.displayMode === 'fixed') {
|
|
76
|
-
const tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos());
|
|
76
|
+
const tableInlineWidth = getInlineWidth(this.node, this.reactComponentProps.options, this.reactComponentProps.view.state, this.reactComponentProps.getPos(), this.reactComponentProps.allowTableResizing);
|
|
77
77
|
if (tableInlineWidth) {
|
|
78
78
|
handleInlineTableWidth(this.table, tableInlineWidth);
|
|
79
79
|
}
|
|
@@ -95,7 +95,7 @@ export default class TableView extends ReactNodeView {
|
|
|
95
95
|
if (!((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.isTableScalingEnabled) || (_this$options4 = this.options) !== null && _this$options4 !== void 0 && _this$options4.isTableScalingEnabled && (_this$getEditorFeatur2 = this.getEditorFeatureFlags) !== null && _this$getEditorFeatur2 !== void 0 && _this$getEditorFeatur2.call(this).tableWithFixedColumnWidthsOption && node.attrs.displayMode === 'fixed') {
|
|
96
96
|
var _tableWidthPluginKey$;
|
|
97
97
|
// handle inline style when table been resized
|
|
98
|
-
const tableInlineWidth = getInlineWidth(node, this.reactComponentProps.options, this.view.state, this.getPos());
|
|
98
|
+
const tableInlineWidth = getInlineWidth(node, this.reactComponentProps.options, this.view.state, this.getPos(), this.reactComponentProps.allowTableResizing);
|
|
99
99
|
const isTableResizing = (_tableWidthPluginKey$ = tableWidthPluginKey.getState(this.view.state)) === null || _tableWidthPluginKey$ === void 0 ? void 0 : _tableWidthPluginKey$.resizing;
|
|
100
100
|
if (!isTableResizing && tableInlineWidth) {
|
|
101
101
|
handleInlineTableWidth(this.table, tableInlineWidth);
|
|
@@ -112,6 +112,8 @@ export default class TableView extends ReactNodeView {
|
|
|
112
112
|
eventDispatcher: props.eventDispatcher,
|
|
113
113
|
api: props.pluginInjectionApi,
|
|
114
114
|
allowColumnResizing: props.allowColumnResizing,
|
|
115
|
+
allowTableAlignment: props.allowTableAlignment,
|
|
116
|
+
allowTableResizing: props.allowTableResizing,
|
|
115
117
|
allowControls: props.allowControls,
|
|
116
118
|
getPos: props.getPos,
|
|
117
119
|
getEditorFeatureFlags: props.getEditorFeatureFlags,
|
|
@@ -149,7 +151,7 @@ export default class TableView extends ReactNodeView {
|
|
|
149
151
|
},
|
|
150
152
|
editorView: props.view,
|
|
151
153
|
render: pluginStates => {
|
|
152
|
-
var _props$options
|
|
154
|
+
var _props$options;
|
|
153
155
|
const {
|
|
154
156
|
tableResizingPluginState,
|
|
155
157
|
tableWidthPluginState,
|
|
@@ -185,7 +187,8 @@ export default class TableView extends ReactNodeView {
|
|
|
185
187
|
isDragAndDropEnabled: pluginState.isDragAndDropEnabled,
|
|
186
188
|
isTableScalingEnabled: (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.isTableScalingEnabled // this.options?.isTableScalingEnabled same as TableOptions.isTableScalingEnabled same as pluginState.isTableScalingEnabled
|
|
187
189
|
,
|
|
188
|
-
|
|
190
|
+
allowTableAlignment: props.allowTableAlignment,
|
|
191
|
+
allowTableResizing: props.allowTableResizing,
|
|
189
192
|
tableActive: tableActive,
|
|
190
193
|
ordering: pluginState.ordering,
|
|
191
194
|
isResizing: isResizing,
|
|
@@ -258,23 +261,26 @@ export default class TableView extends ReactNodeView {
|
|
|
258
261
|
super.destroy();
|
|
259
262
|
}
|
|
260
263
|
}
|
|
261
|
-
export const createTableView = (node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi,
|
|
264
|
+
export const createTableView = (node, view, getPos, portalProviderAPI, eventDispatcher, getEditorContainerWidth, getEditorFeatureFlags, dispatchAnalyticsEvent, pluginInjectionApi, isCommentEditor, isChromelessEditor) => {
|
|
262
265
|
const {
|
|
263
266
|
pluginConfig,
|
|
264
267
|
isFullWidthModeEnabled,
|
|
265
268
|
wasFullWidthModeEnabled,
|
|
266
|
-
isTableResizingEnabled,
|
|
267
269
|
isDragAndDropEnabled,
|
|
268
270
|
isTableScalingEnabled // same as options.isTableScalingEnabled
|
|
269
271
|
} = getPluginState(view.state);
|
|
270
272
|
const {
|
|
271
273
|
allowColumnResizing,
|
|
272
|
-
allowControls
|
|
274
|
+
allowControls,
|
|
275
|
+
allowTableResizing,
|
|
276
|
+
allowTableAlignment
|
|
273
277
|
} = getPluginConfig(pluginConfig);
|
|
274
278
|
return new TableView({
|
|
275
279
|
node,
|
|
276
280
|
view,
|
|
277
281
|
allowColumnResizing,
|
|
282
|
+
allowTableResizing,
|
|
283
|
+
allowTableAlignment,
|
|
278
284
|
allowControls,
|
|
279
285
|
portalProviderAPI,
|
|
280
286
|
eventDispatcher,
|
|
@@ -282,11 +288,9 @@ export const createTableView = (node, view, getPos, portalProviderAPI, eventDisp
|
|
|
282
288
|
options: {
|
|
283
289
|
isFullWidthModeEnabled,
|
|
284
290
|
wasFullWidthModeEnabled,
|
|
285
|
-
isTableResizingEnabled,
|
|
286
291
|
isDragAndDropEnabled,
|
|
287
292
|
isTableScalingEnabled,
|
|
288
293
|
// same as options.isTableScalingEnabled
|
|
289
|
-
isTableAlignmentEnabled,
|
|
290
294
|
isCommentEditor,
|
|
291
295
|
isChromelessEditor
|
|
292
296
|
},
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -107,11 +107,11 @@ const tablesPlugin = ({
|
|
|
107
107
|
var _api$contentInsertion, _api$contentInsertion2, _api$contentInsertion3;
|
|
108
108
|
const node = createTableWithWidth({
|
|
109
109
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
110
|
-
isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.
|
|
110
|
+
isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
|
|
111
111
|
isFullWidthModeEnabled: options === null || options === void 0 ? void 0 : options.fullWidthEnabled,
|
|
112
112
|
isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
|
|
113
113
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
|
|
114
|
-
isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.
|
|
114
|
+
isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing
|
|
115
115
|
})(state.schema);
|
|
116
116
|
|
|
117
117
|
// If the cursor is inside a table
|
|
@@ -147,7 +147,7 @@ const tablesPlugin = ({
|
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
commands: {
|
|
150
|
-
insertTableWithSize: insertTableWithSize(options === null || options === void 0 ? void 0 : options.fullWidthEnabled, options === null || options === void 0 ? void 0 : options.isTableScalingEnabled, options === null || options === void 0 ? void 0 : options.
|
|
150
|
+
insertTableWithSize: insertTableWithSize(options === null || options === void 0 ? void 0 : options.fullWidthEnabled, options === null || options === void 0 ? void 0 : options.isTableScalingEnabled, options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment, api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions, options === null || options === void 0 ? void 0 : options.isCommentEditor)
|
|
151
151
|
},
|
|
152
152
|
nodes() {
|
|
153
153
|
const {
|
|
@@ -158,7 +158,7 @@ const tablesPlugin = ({
|
|
|
158
158
|
name: 'table',
|
|
159
159
|
node: tableNodeSpecWithFixedToDOM({
|
|
160
160
|
allowColumnResizing: Boolean(allowColumnResizing),
|
|
161
|
-
tableResizingEnabled: Boolean(options === null || options === void 0 ? void 0 : options.
|
|
161
|
+
tableResizingEnabled: Boolean(options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing),
|
|
162
162
|
getEditorContainerWidth: defaultGetEditorContainerWidth,
|
|
163
163
|
isNestingSupported
|
|
164
164
|
})
|
|
@@ -175,7 +175,7 @@ const tablesPlugin = ({
|
|
|
175
175
|
name: 'table',
|
|
176
176
|
node: tableNodeSpecWithFixedToDOM({
|
|
177
177
|
allowColumnResizing: Boolean(allowColumnResizing),
|
|
178
|
-
tableResizingEnabled: Boolean(options === null || options === void 0 ? void 0 : options.
|
|
178
|
+
tableResizingEnabled: Boolean(options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing),
|
|
179
179
|
getEditorContainerWidth: defaultGetEditorContainerWidth,
|
|
180
180
|
isNestingSupported
|
|
181
181
|
})
|
|
@@ -204,16 +204,14 @@ const tablesPlugin = ({
|
|
|
204
204
|
const {
|
|
205
205
|
fullWidthEnabled,
|
|
206
206
|
wasFullWidthEnabled,
|
|
207
|
-
tableResizingEnabled,
|
|
208
207
|
tableOptions,
|
|
209
208
|
getEditorFeatureFlags,
|
|
210
209
|
dragAndDropEnabled,
|
|
211
210
|
isTableScalingEnabled,
|
|
212
|
-
isTableAlignmentEnabled,
|
|
213
211
|
isCommentEditor,
|
|
214
212
|
isChromelessEditor
|
|
215
213
|
} = options || {};
|
|
216
|
-
return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, getIntl,
|
|
214
|
+
return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, getIntl, fullWidthEnabled, wasFullWidthEnabled, dragAndDropEnabled, editorAnalyticsAPI, api, isTableScalingEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor);
|
|
217
215
|
}
|
|
218
216
|
}, {
|
|
219
217
|
name: 'tablePMColResizing',
|
|
@@ -226,15 +224,15 @@ const tablesPlugin = ({
|
|
|
226
224
|
tableOptions,
|
|
227
225
|
getEditorFeatureFlags,
|
|
228
226
|
isTableScalingEnabled,
|
|
229
|
-
isNewColumnResizingEnabled
|
|
230
|
-
isTableAlignmentEnabled
|
|
227
|
+
isNewColumnResizingEnabled
|
|
231
228
|
} = options || {};
|
|
232
229
|
const {
|
|
233
|
-
allowColumnResizing
|
|
230
|
+
allowColumnResizing,
|
|
231
|
+
allowTableAlignment
|
|
234
232
|
} = pluginConfig(tableOptions);
|
|
235
233
|
return allowColumnResizing ? createFlexiResizingPlugin(dispatch, {
|
|
236
234
|
lastColumnResizable: !fullWidthEnabled
|
|
237
|
-
}, defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isTableScalingEnabled || false, isNewColumnResizingEnabled,
|
|
235
|
+
}, defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, isTableScalingEnabled || false, isNewColumnResizingEnabled, allowTableAlignment, !!(options !== null && options !== void 0 && options.isCommentEditor)) : undefined;
|
|
238
236
|
}
|
|
239
237
|
}, {
|
|
240
238
|
name: 'tableEditing',
|
|
@@ -251,13 +249,12 @@ const tablesPlugin = ({
|
|
|
251
249
|
const {
|
|
252
250
|
dragAndDropEnabled,
|
|
253
251
|
isTableScalingEnabled = false,
|
|
254
|
-
isTableAlignmentEnabled = false,
|
|
255
252
|
fullWidthEnabled = false,
|
|
256
253
|
isCommentEditor = false,
|
|
257
254
|
isChromelessEditor = false,
|
|
258
|
-
|
|
255
|
+
tableOptions
|
|
259
256
|
} = options || {};
|
|
260
|
-
return keymapPlugin(defaultGetEditorContainerWidth, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled,
|
|
257
|
+
return keymapPlugin(defaultGetEditorContainerWidth, api, nodeViewPortalProviderAPI, editorAnalyticsAPI, dragAndDropEnabled, isTableScalingEnabled, tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.allowTableAlignment, fullWidthEnabled, api, getIntl, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.allowTableResizing);
|
|
261
258
|
}
|
|
262
259
|
}, {
|
|
263
260
|
name: 'tableSelectionKeymap',
|
|
@@ -319,16 +316,16 @@ const tablesPlugin = ({
|
|
|
319
316
|
dispatchAnalyticsEvent,
|
|
320
317
|
dispatch
|
|
321
318
|
}) => {
|
|
322
|
-
var _options$fullWidthEna, _options$isTableScali, _options$
|
|
323
|
-
return options !== null && options !== void 0 && options.
|
|
319
|
+
var _options$fullWidthEna, _options$isTableScali, _options$tableOptions, _options$isCommentEdi;
|
|
320
|
+
return options !== null && options !== void 0 && options.tableOptions.allowTableResizing ? createTableWidthPlugin(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$tableOptions = options.tableOptions.allowTableResizing) !== null && _options$tableOptions !== void 0 ? _options$tableOptions : false, (_options$isCommentEdi = options.isCommentEditor) !== null && _options$isCommentEdi !== void 0 ? _options$isCommentEdi : false) : undefined;
|
|
324
321
|
}
|
|
325
322
|
}, {
|
|
326
323
|
name: 'tableWidthInCommentFix',
|
|
327
324
|
plugin: ({
|
|
328
325
|
dispatch
|
|
329
326
|
}) => {
|
|
330
|
-
var _options$
|
|
331
|
-
return options !== null && options !== void 0 && options.
|
|
327
|
+
var _options$tableOptions2;
|
|
328
|
+
return options !== null && options !== void 0 && options.tableOptions.allowTableResizing && options !== null && options !== void 0 && options.isCommentEditor ? createTableWidthInCommentFixPlugin(dispatch, (_options$tableOptions2 = options.tableOptions.allowTableAlignment) !== null && _options$tableOptions2 !== void 0 ? _options$tableOptions2 : false) : undefined;
|
|
332
329
|
}
|
|
333
330
|
},
|
|
334
331
|
// TODO: should be deprecated and eventually replaced with 'tableAnalyticsPlugin'
|
|
@@ -338,8 +335,8 @@ const tablesPlugin = ({
|
|
|
338
335
|
dispatch,
|
|
339
336
|
dispatchAnalyticsEvent
|
|
340
337
|
}) => {
|
|
341
|
-
var _options$
|
|
342
|
-
return createTableOverflowAnalyticsPlugin(dispatch, dispatchAnalyticsEvent, (_options$
|
|
338
|
+
var _options$tableOptions3;
|
|
339
|
+
return createTableOverflowAnalyticsPlugin(dispatch, dispatchAnalyticsEvent, (_options$tableOptions3 = options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing) !== null && _options$tableOptions3 !== void 0 ? _options$tableOptions3 : false);
|
|
343
340
|
}
|
|
344
341
|
}, {
|
|
345
342
|
name: 'tableAnalyticsPlugin',
|
|
@@ -506,7 +503,7 @@ const tablesPlugin = ({
|
|
|
506
503
|
isNumberColumnEnabled: tableNode && tableNode.attrs.isNumberColumnEnabled,
|
|
507
504
|
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
508
505
|
api: api
|
|
509
|
-
}), ((options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) || (options === null || options === void 0 ? void 0 : options.
|
|
506
|
+
}), ((options === null || options === void 0 ? void 0 : options.isTableScalingEnabled) || (options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing) && options.isCommentEditor) && isTableResizing && widthToWidest && resizingTableLocalId && resizingTableRef && widthToWidest[resizingTableLocalId] && /*#__PURE__*/React.createElement(FloatingToolbarLabel, {
|
|
510
507
|
target: resizingTableRef,
|
|
511
508
|
content: /*#__PURE__*/React.createElement(FullWidthDisplay, null),
|
|
512
509
|
alignX: 'center',
|
|
@@ -536,11 +533,11 @@ const tablesPlugin = ({
|
|
|
536
533
|
const tableState = api === null || api === void 0 ? void 0 : (_api$table = api.table) === null || _api$table === void 0 ? void 0 : _api$table.sharedState.currentState();
|
|
537
534
|
const tableNode = createTableWithWidth({
|
|
538
535
|
isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
|
|
539
|
-
isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.
|
|
536
|
+
isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
|
|
540
537
|
isFullWidthModeEnabled: tableState === null || tableState === void 0 ? void 0 : tableState.isFullWidthModeEnabled,
|
|
541
538
|
isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
|
|
542
539
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
|
|
543
|
-
isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.
|
|
540
|
+
isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing
|
|
544
541
|
})(state.schema);
|
|
545
542
|
let {
|
|
546
543
|
tr
|
|
@@ -19,7 +19,7 @@ import { isHeaderRowRequired, transformSliceTableLayoutDefaultToCenter } from '.
|
|
|
19
19
|
import { defaultHoveredCell, defaultTableSelection } from './default-table-selection';
|
|
20
20
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
21
21
|
import { pluginKey } from './plugin-key';
|
|
22
|
-
export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, getIntl,
|
|
22
|
+
export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI, nodeViewPortalProviderAPI, eventDispatcher, pluginConfig, getEditorContainerWidth, getEditorFeatureFlags, getIntl, fullWidthModeEnabled, previousFullWidthModeEnabled, dragAndDropEnabled, editorAnalyticsAPI, pluginInjectionApi, isTableScalingEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor) => {
|
|
23
23
|
var _accessibilityUtils;
|
|
24
24
|
const state = createPluginState(dispatch, {
|
|
25
25
|
pluginConfig,
|
|
@@ -28,7 +28,6 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
28
28
|
insertRowButtonIndex: undefined,
|
|
29
29
|
isFullWidthModeEnabled: fullWidthModeEnabled,
|
|
30
30
|
wasFullWidthModeEnabled: previousFullWidthModeEnabled,
|
|
31
|
-
isTableResizingEnabled: tableResizingEnabled,
|
|
32
31
|
isHeaderRowEnabled: !!pluginConfig.allowHeaderRow,
|
|
33
32
|
isHeaderColumnEnabled: false,
|
|
34
33
|
isDragAndDropEnabled: dragAndDropEnabled,
|
|
@@ -168,7 +167,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
168
167
|
|
|
169
168
|
// fix for when pasting a table with default layout into comment editor
|
|
170
169
|
// table lose width and expand to full width
|
|
171
|
-
if (!insideTable(editorState) && isCommentEditor &&
|
|
170
|
+
if (!insideTable(editorState) && isCommentEditor && pluginConfig.allowTableAlignment && isTableScalingEnabled) {
|
|
172
171
|
slice = transformSliceTableLayoutDefaultToCenter(slice, schema);
|
|
173
172
|
}
|
|
174
173
|
slice = transformSliceToFixHardBreakProblemOnCopyFromCell(slice, schema);
|
|
@@ -262,7 +261,6 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
262
261
|
getEditorFeatureFlags,
|
|
263
262
|
dispatchAnalyticsEvent,
|
|
264
263
|
pluginInjectionApi,
|
|
265
|
-
isTableAlignmentEnabled,
|
|
266
264
|
isCommentEditor,
|
|
267
265
|
isChromelessEditor
|
|
268
266
|
}),
|
|
@@ -283,7 +281,7 @@ export const createPlugin = (dispatchAnalyticsEvent, dispatch, portalProviderAPI
|
|
|
283
281
|
blur: handleBlur,
|
|
284
282
|
mousedown: withCellTracking(handleMouseDown),
|
|
285
283
|
mouseleave: handleMouseLeave,
|
|
286
|
-
mousemove: whenTableInFocus(handleMouseMove(nodeViewPortalProviderAPI)),
|
|
284
|
+
mousemove: whenTableInFocus(handleMouseMove(nodeViewPortalProviderAPI), pluginInjectionApi),
|
|
287
285
|
mouseenter: handleMouseEnter,
|
|
288
286
|
mouseup: whenTableInFocus(handleMouseUp),
|
|
289
287
|
click: withCellTracking(whenTableInFocus(handleClick))
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -366,7 +366,7 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
|
|
|
366
366
|
return element;
|
|
367
367
|
};
|
|
368
368
|
const menu = getToolbarMenuConfig(config, pluginState, intl, editorAnalyticsAPI, isTableScalingWithFixedColumnWidthsOptionShown, areTableColumWidthsFixed);
|
|
369
|
-
const alignmentMenu =
|
|
369
|
+
const alignmentMenu = config.allowTableAlignment && !isNested ? getAlignmentOptionsConfig(state, intl, editorAnalyticsAPI, getEditorContainerWidth, getDomRef, editorView, shouldUseIncreasedScalingPercent, options === null || options === void 0 ? void 0 : options.fullWidthEnabled, options === null || options === void 0 ? void 0 : options.isCommentEditor) : [];
|
|
370
370
|
const cellItems = pluginState.isDragAndDropEnabled ? [] : getCellItems(state, editorView, intl, getEditorContainerWidth, api, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, options === null || options === void 0 ? void 0 : options.isCommentEditor);
|
|
371
371
|
const columnSettingsItems = pluginState.isDragAndDropEnabled ? getColumnSettingItems(state, editorView, intl, getEditorContainerWidth, api, editorAnalyticsAPI, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, options === null || options === void 0 ? void 0 : options.isCommentEditor) : [];
|
|
372
372
|
const colorPicker = getColorPicker(state, menu, intl, editorAnalyticsAPI, getEditorView);
|
package/dist/es2019/types.js
CHANGED
|
@@ -150,6 +150,8 @@ export const TableCssClassName = {
|
|
|
150
150
|
WITH_LAST_COLUMN_INSERT_LINE_INACTIVE: `${tablePrefixSelector}-last-column-insert-line__inactive`,
|
|
151
151
|
WITH_RESIZE_LINE: `${tablePrefixSelector}-column-resize-line`,
|
|
152
152
|
WITH_RESIZE_LINE_LAST_COLUMN: `${tablePrefixSelector}-column-resize-line-last-column`,
|
|
153
|
+
WITH_DRAG_RESIZE_LINE: `${tablePrefixSelector}-drag-column--resize-line`,
|
|
154
|
+
WITH_DRAG_RESIZE_LINE_LAST_COLUMN: `${tablePrefixSelector}-drag-column-resize-line-last-column`,
|
|
153
155
|
WITH_ROW_INSERT_LINE: `${tablePrefixSelector}-row-insert-line`,
|
|
154
156
|
WITH_ROW_INSERT_LINE_INACTIVE: `${tablePrefixSelector}-row-insert-line__inactive`,
|
|
155
157
|
WITH_LAST_ROW_INSERT_LINE: `${tablePrefixSelector}-last-row-insert-line`,
|
|
@@ -193,7 +193,7 @@ const tableStickyHeaderFirefoxFixStyle = () => {
|
|
|
193
193
|
|
|
194
194
|
// re-exporting these styles to use in Gemini test when table node view is rendered outside of PM
|
|
195
195
|
export const baseTableStyles = props => {
|
|
196
|
-
var _props$featureFlags, _props$featureFlags2
|
|
196
|
+
var _props$featureFlags, _props$featureFlags2;
|
|
197
197
|
return css`
|
|
198
198
|
${tableSharedStyle()};
|
|
199
199
|
${columnControlsLineMarker()};
|
|
@@ -201,7 +201,7 @@ export const baseTableStyles = props => {
|
|
|
201
201
|
${hoveredCell()};
|
|
202
202
|
${hoveredWarningCell};
|
|
203
203
|
${insertLine()};
|
|
204
|
-
${resizeHandle(
|
|
204
|
+
${resizeHandle()};
|
|
205
205
|
${rangeSelectionStyles};
|
|
206
206
|
${viewModeSortStyles()};
|
|
207
207
|
|
|
@@ -400,7 +400,7 @@ export const baseTableStyles = props => {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
${sentinelStyles}
|
|
403
|
-
${OverflowShadow((_props$
|
|
403
|
+
${OverflowShadow((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableDragAndDrop)}
|
|
404
404
|
${stickyScrollbarStyles}
|
|
405
405
|
|
|
406
406
|
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
@@ -755,7 +755,7 @@ export const baseTableStyles = props => {
|
|
|
755
755
|
position: relative;
|
|
756
756
|
float: right;
|
|
757
757
|
margin-left: ${akEditorTableToolbarSize}px;
|
|
758
|
-
top: ${(_props$
|
|
758
|
+
top: ${(_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.tableDragAndDrop || editorExperiment('support_table_in_comment_jira', true) ? 0 : akEditorTableToolbarSize}px;
|
|
759
759
|
width: ${akEditorTableNumberColumnWidth + 1}px;
|
|
760
760
|
box-sizing: border-box;
|
|
761
761
|
}
|
|
@@ -582,34 +582,32 @@ export const hoveredWarningCell = css`
|
|
|
582
582
|
|
|
583
583
|
// Explicit pixel values required here to ensure correct positioning and sizes of column resize handle
|
|
584
584
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
585
|
-
const
|
|
586
|
-
if (isDragAndDropEnabled) {
|
|
587
|
-
return css`
|
|
588
|
-
th.${ClassName.WITH_RESIZE_LINE}::before, td.${ClassName.WITH_RESIZE_LINE}::before {
|
|
589
|
-
content: ' ';
|
|
590
|
-
position: absolute;
|
|
591
|
-
left: ${"var(--ds-space-negative-025, -2px)"};
|
|
592
|
-
top: -1px;
|
|
593
|
-
width: ${resizeLineWidth}px;
|
|
594
|
-
height: calc(100% + 2px);
|
|
595
|
-
background-color: ${tableBorderSelectedColor};
|
|
596
|
-
z-index: ${columnControlsZIndex * 2};
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
th.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before,
|
|
600
|
-
td.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
|
|
601
|
-
content: ' ';
|
|
602
|
-
position: absolute;
|
|
603
|
-
right: -1px;
|
|
604
|
-
top: -1px;
|
|
605
|
-
width: ${resizeLineWidth}px;
|
|
606
|
-
height: calc(100% + 2px);
|
|
607
|
-
background-color: ${tableBorderSelectedColor};
|
|
608
|
-
z-index: ${columnControlsZIndex * 2};
|
|
609
|
-
}
|
|
610
|
-
`;
|
|
611
|
-
}
|
|
585
|
+
const resizeLineStyles = () => {
|
|
612
586
|
return css`
|
|
587
|
+
th.${ClassName.WITH_DRAG_RESIZE_LINE}::before, td.${ClassName.WITH_DRAG_RESIZE_LINE}::before {
|
|
588
|
+
content: ' ';
|
|
589
|
+
position: absolute;
|
|
590
|
+
left: ${"var(--ds-space-negative-025, -2px)"};
|
|
591
|
+
top: -1px;
|
|
592
|
+
width: ${resizeLineWidth}px;
|
|
593
|
+
height: calc(100% + 2px);
|
|
594
|
+
background-color: ${tableBorderSelectedColor};
|
|
595
|
+
z-index: ${columnControlsZIndex * 2};
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
th.${ClassName.WITH_DRAG_RESIZE_LINE_LAST_COLUMN}::before,
|
|
599
|
+
td.${ClassName.WITH_DRAG_RESIZE_LINE_LAST_COLUMN}::before {
|
|
600
|
+
content: ' ';
|
|
601
|
+
position: absolute;
|
|
602
|
+
right: -1px;
|
|
603
|
+
top: -1px;
|
|
604
|
+
width: ${resizeLineWidth}px;
|
|
605
|
+
height: calc(100% + 2px);
|
|
606
|
+
background-color: ${tableBorderSelectedColor};
|
|
607
|
+
z-index: ${columnControlsZIndex * 2};
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Styles when drag and drop is disabled - will be removed
|
|
613
611
|
td.${ClassName.WITH_RESIZE_LINE}::before {
|
|
614
612
|
content: ' ';
|
|
615
613
|
position: absolute;
|
|
@@ -655,7 +653,7 @@ const resizeHandleOverrides = isDragAndDropEnabled => {
|
|
|
655
653
|
}
|
|
656
654
|
`;
|
|
657
655
|
};
|
|
658
|
-
export const resizeHandle =
|
|
656
|
+
export const resizeHandle = () => css`
|
|
659
657
|
.${ClassName.TABLE_CONTAINER} {
|
|
660
658
|
.${ClassName.RESIZE_HANDLE_DECORATION} {
|
|
661
659
|
background-color: transparent;
|
|
@@ -684,10 +682,19 @@ export const resizeHandle = isDragAndDropEnabled => css`
|
|
|
684
682
|
z-index: ${resizeHandlerZIndex};
|
|
685
683
|
}
|
|
686
684
|
|
|
687
|
-
${
|
|
685
|
+
${resizeLineStyles()}
|
|
688
686
|
|
|
689
687
|
table
|
|
690
688
|
tr:first-of-type
|
|
689
|
+
th.${ClassName.WITH_DRAG_RESIZE_LINE}
|
|
690
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after,
|
|
691
|
+
table
|
|
692
|
+
tr:first-of-type
|
|
693
|
+
td.${ClassName.WITH_DRAG_RESIZE_LINE}
|
|
694
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after,
|
|
695
|
+
// Styles when drag and drop is disabled - will be removed
|
|
696
|
+
table
|
|
697
|
+
tr:first-of-type
|
|
691
698
|
th.${ClassName.WITH_RESIZE_LINE}
|
|
692
699
|
.${ClassName.RESIZE_HANDLE_DECORATION}::after,
|
|
693
700
|
table
|
|
@@ -368,7 +368,7 @@ export const createResizeHandleDecoration = (tr, rowIndexTarget, columnEndIndexT
|
|
|
368
368
|
* this function will return two decorations applying a new class `ClassName.WITH_RESIZE_LINE`
|
|
369
369
|
* only on the cells: `C1` and `D1`.
|
|
370
370
|
*/
|
|
371
|
-
export const createColumnLineResize = (selection, cellColumnPositioning) => {
|
|
371
|
+
export const createColumnLineResize = (selection, cellColumnPositioning, isDragAndDropEnabled) => {
|
|
372
372
|
const table = findTable(selection);
|
|
373
373
|
if (!table || cellColumnPositioning.right === null) {
|
|
374
374
|
return [];
|
|
@@ -379,7 +379,7 @@ export const createColumnLineResize = (selection, cellColumnPositioning) => {
|
|
|
379
379
|
if (isLastColumn) {
|
|
380
380
|
columnIndex -= 1;
|
|
381
381
|
}
|
|
382
|
-
const decorationClassName = isLastColumn ? ClassName.WITH_RESIZE_LINE_LAST_COLUMN : ClassName.WITH_RESIZE_LINE;
|
|
382
|
+
const decorationClassName = isDragAndDropEnabled ? isLastColumn ? ClassName.WITH_DRAG_RESIZE_LINE_LAST_COLUMN : ClassName.WITH_DRAG_RESIZE_LINE : isLastColumn ? ClassName.WITH_RESIZE_LINE_LAST_COLUMN : ClassName.WITH_RESIZE_LINE;
|
|
383
383
|
const cellPositions = makeArray(map.height).map(rowIndex => map.map[map.width * rowIndex + columnIndex]).filter((cellPosition, rowIndex) => {
|
|
384
384
|
if (isLastColumn) {
|
|
385
385
|
return true; // If is the last column no filter applied
|
|
@@ -24,7 +24,8 @@ var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosi
|
|
|
24
24
|
var customTr = state.tr;
|
|
25
25
|
var _getPluginState = getPluginState(state),
|
|
26
26
|
allowColumnResizing = _getPluginState.pluginConfig.allowColumnResizing,
|
|
27
|
-
getIntl = _getPluginState.getIntl
|
|
27
|
+
getIntl = _getPluginState.getIntl,
|
|
28
|
+
isDragAndDropEnabled = _getPluginState.isDragAndDropEnabled;
|
|
28
29
|
var fakeDispatch = function fakeDispatch(tr) {
|
|
29
30
|
customTr = tr;
|
|
30
31
|
};
|
|
@@ -37,7 +38,7 @@ var updateResizeHandleAndStatePosition = function updateResizeHandleAndStatePosi
|
|
|
37
38
|
});
|
|
38
39
|
var decorationsWithWidgetAndHandle = updateDecorations(customTr.doc, decorationsWithWidget, createColumnLineResize(state.selection, {
|
|
39
40
|
right: columnIndex
|
|
40
|
-
}), TableDecorations.COLUMN_RESIZING_HANDLE_LINE);
|
|
41
|
+
}, isDragAndDropEnabled), TableDecorations.COLUMN_RESIZING_HANDLE_LINE);
|
|
41
42
|
getTablePluginCommand({
|
|
42
43
|
type: 'START_KEYBOARD_COLUMN_RESIZE',
|
|
43
44
|
data: {
|
|
@@ -121,10 +121,12 @@ export var clearHoverSelection = function clearHoverSelection() {
|
|
|
121
121
|
};
|
|
122
122
|
export var showResizeHandleLine = function showResizeHandleLine(cellColumnPositioning) {
|
|
123
123
|
return createCommand(function (state) {
|
|
124
|
+
var _getPluginState4 = getPluginState(state),
|
|
125
|
+
isDragAndDropEnabled = _getPluginState4.isDragAndDropEnabled;
|
|
124
126
|
return {
|
|
125
127
|
type: 'SHOW_RESIZE_HANDLE_LINE',
|
|
126
128
|
data: {
|
|
127
|
-
decorationSet: updatePluginStateDecorations(state, createColumnLineResize(state.selection, cellColumnPositioning), TableDecorations.COLUMN_RESIZING_HANDLE_LINE)
|
|
129
|
+
decorationSet: updatePluginStateDecorations(state, createColumnLineResize(state.selection, cellColumnPositioning, isDragAndDropEnabled), TableDecorations.COLUMN_RESIZING_HANDLE_LINE)
|
|
128
130
|
}
|
|
129
131
|
};
|
|
130
132
|
});
|
|
@@ -153,8 +155,8 @@ export var setTableHovered = function setTableHovered(hovered) {
|
|
|
153
155
|
};
|
|
154
156
|
export var hoverCell = function hoverCell(rowIndex, colIndex) {
|
|
155
157
|
return createCommand(function (state) {
|
|
156
|
-
var
|
|
157
|
-
prevHoveredCell =
|
|
158
|
+
var _getPluginState5 = getPluginState(state),
|
|
159
|
+
prevHoveredCell = _getPluginState5.hoveredCell;
|
|
158
160
|
|
|
159
161
|
// If no arguments have been passed then the intention it to reset the hover cell data
|
|
160
162
|
var clear = rowIndex === undefined && colIndex === undefined;
|
|
@@ -398,11 +398,22 @@ export var isTableInFocus = function isTableInFocus(view) {
|
|
|
398
398
|
var _getPluginState10, _getResizePluginState;
|
|
399
399
|
return !!((_getPluginState10 = getPluginState(view.state)) !== null && _getPluginState10 !== void 0 && _getPluginState10.tableNode) && !((_getResizePluginState = getResizePluginState(view.state)) !== null && _getResizePluginState !== void 0 && _getResizePluginState.dragging);
|
|
400
400
|
};
|
|
401
|
-
export var whenTableInFocus = function whenTableInFocus(eventHandler) {
|
|
401
|
+
export var whenTableInFocus = function whenTableInFocus(eventHandler, pluginInjectionApi) {
|
|
402
402
|
return function (view, mouseEvent) {
|
|
403
|
+
var _pluginInjectionApi$e;
|
|
403
404
|
if (!isTableInFocus(view)) {
|
|
404
405
|
return false;
|
|
405
406
|
}
|
|
407
|
+
var isViewMode = (pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$e = pluginInjectionApi.editorViewMode) === null || _pluginInjectionApi$e === void 0 || (_pluginInjectionApi$e = _pluginInjectionApi$e.sharedState.currentState()) === null || _pluginInjectionApi$e === void 0 ? void 0 : _pluginInjectionApi$e.mode) === 'view';
|
|
408
|
+
/**
|
|
409
|
+
* Table cannot be in focus if we are in view mode.
|
|
410
|
+
* This will prevent an infinite flow of adding and removing
|
|
411
|
+
* resize handle decorations in view mode that causes unpredictable
|
|
412
|
+
* selections.
|
|
413
|
+
*/
|
|
414
|
+
if (isViewMode) {
|
|
415
|
+
return false;
|
|
416
|
+
}
|
|
406
417
|
return eventHandler(view, mouseEvent);
|
|
407
418
|
};
|
|
408
419
|
};
|