@atlaskit/editor-plugin-table 7.6.10 → 7.6.12
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 +14 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/nodeviews/TableContainer.js +7 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/toolbar.js +18 -4
- package/dist/cjs/ui/DragHandle/index.js +9 -0
- package/dist/es2019/nodeviews/TableContainer.js +8 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/toolbar.js +18 -4
- package/dist/es2019/ui/DragHandle/index.js +9 -0
- package/dist/esm/nodeviews/TableContainer.js +7 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/toolbar.js +18 -4
- package/dist/esm/ui/DragHandle/index.js +9 -0
- package/dist/types/plugin.d.ts +3 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +90 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +180 -4
- package/dist/types/ui/TableFloatingControls/index.d.ts +90 -2
- package/dist/types-ts4.5/plugin.d.ts +3 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +106 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +212 -4
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +106 -2
- package/package.json +6 -2
- package/src/nodeviews/TableContainer.tsx +12 -2
- package/src/plugin.tsx +2 -0
- package/src/pm-plugins/main.ts +4 -1
- package/src/toolbar.tsx +12 -0
- package/src/ui/DragHandle/index.tsx +9 -0
- package/tsconfig.app.json +3 -0
|
@@ -85,7 +85,59 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
85
85
|
dependencies: any;
|
|
86
86
|
sharedState: any;
|
|
87
87
|
actions: any;
|
|
88
|
-
}, any
|
|
88
|
+
}, any>>,
|
|
89
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
90
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
91
|
+
dependencies: [
|
|
92
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
93
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
94
|
+
dependencies: [
|
|
95
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
96
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
97
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
98
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
99
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
100
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
101
|
+
sharedState: {
|
|
102
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
103
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
104
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
105
|
+
};
|
|
106
|
+
dependencies: [
|
|
107
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
108
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
109
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
110
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
111
|
+
];
|
|
112
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
113
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
114
|
+
];
|
|
115
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
116
|
+
actions: {
|
|
117
|
+
getAvatarColor: (str: string) => {
|
|
118
|
+
index: number;
|
|
119
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
120
|
+
};
|
|
121
|
+
addInlineCommentMark: (props: {
|
|
122
|
+
from: number;
|
|
123
|
+
to: number;
|
|
124
|
+
mark: import("prosemirror-model").Mark;
|
|
125
|
+
}) => boolean;
|
|
126
|
+
};
|
|
127
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
128
|
+
];
|
|
129
|
+
pluginConfiguration?: {
|
|
130
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
commands: {
|
|
133
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
134
|
+
};
|
|
135
|
+
actions: {
|
|
136
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
137
|
+
};
|
|
138
|
+
}, {
|
|
139
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
140
|
+
} | undefined>>
|
|
89
141
|
];
|
|
90
142
|
}, import("../../../plugin").TablePluginOptions | undefined>,
|
|
91
143
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
|
|
@@ -160,7 +212,59 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
160
212
|
dependencies: any;
|
|
161
213
|
sharedState: any;
|
|
162
214
|
actions: any;
|
|
163
|
-
}, any
|
|
215
|
+
}, any>>,
|
|
216
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
217
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
218
|
+
dependencies: [
|
|
219
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
220
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
221
|
+
dependencies: [
|
|
222
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
223
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
224
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
225
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
226
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
227
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
228
|
+
sharedState: {
|
|
229
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
230
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
231
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
232
|
+
};
|
|
233
|
+
dependencies: [
|
|
234
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
235
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
236
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
237
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
238
|
+
];
|
|
239
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
240
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
241
|
+
];
|
|
242
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
243
|
+
actions: {
|
|
244
|
+
getAvatarColor: (str: string) => {
|
|
245
|
+
index: number;
|
|
246
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
247
|
+
};
|
|
248
|
+
addInlineCommentMark: (props: {
|
|
249
|
+
from: number;
|
|
250
|
+
to: number;
|
|
251
|
+
mark: import("prosemirror-model").Mark;
|
|
252
|
+
}) => boolean;
|
|
253
|
+
};
|
|
254
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
255
|
+
];
|
|
256
|
+
pluginConfiguration?: {
|
|
257
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
258
|
+
} | undefined;
|
|
259
|
+
commands: {
|
|
260
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
261
|
+
};
|
|
262
|
+
actions: {
|
|
263
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
264
|
+
};
|
|
265
|
+
}, {
|
|
266
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
267
|
+
} | undefined>>
|
|
164
268
|
]> | undefined;
|
|
165
269
|
}>> & {
|
|
166
270
|
WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
|
|
@@ -247,7 +351,59 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
247
351
|
dependencies: any;
|
|
248
352
|
sharedState: any;
|
|
249
353
|
actions: any;
|
|
250
|
-
}, any
|
|
354
|
+
}, any>>,
|
|
355
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
356
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
357
|
+
dependencies: [
|
|
358
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
359
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
360
|
+
dependencies: [
|
|
361
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
362
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
363
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
364
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
365
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
366
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
367
|
+
sharedState: {
|
|
368
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
369
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
370
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
371
|
+
};
|
|
372
|
+
dependencies: [
|
|
373
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
374
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
375
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
376
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
377
|
+
];
|
|
378
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
379
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
380
|
+
];
|
|
381
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
382
|
+
actions: {
|
|
383
|
+
getAvatarColor: (str: string) => {
|
|
384
|
+
index: number;
|
|
385
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
386
|
+
};
|
|
387
|
+
addInlineCommentMark: (props: {
|
|
388
|
+
from: number;
|
|
389
|
+
to: number;
|
|
390
|
+
mark: import("prosemirror-model").Mark;
|
|
391
|
+
}) => boolean;
|
|
392
|
+
};
|
|
393
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
394
|
+
];
|
|
395
|
+
pluginConfiguration?: {
|
|
396
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
397
|
+
} | undefined;
|
|
398
|
+
commands: {
|
|
399
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
400
|
+
};
|
|
401
|
+
actions: {
|
|
402
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
403
|
+
};
|
|
404
|
+
}, {
|
|
405
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
406
|
+
} | undefined>>
|
|
251
407
|
];
|
|
252
408
|
}, import("../../../plugin").TablePluginOptions | undefined>,
|
|
253
409
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
|
|
@@ -322,7 +478,59 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
|
|
|
322
478
|
dependencies: any;
|
|
323
479
|
sharedState: any;
|
|
324
480
|
actions: any;
|
|
325
|
-
}, any
|
|
481
|
+
}, any>>,
|
|
482
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
483
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
484
|
+
dependencies: [
|
|
485
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
486
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
487
|
+
dependencies: [
|
|
488
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
489
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
490
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
491
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
492
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
493
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
494
|
+
sharedState: {
|
|
495
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
496
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
497
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
498
|
+
};
|
|
499
|
+
dependencies: [
|
|
500
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
501
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
502
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
503
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
504
|
+
];
|
|
505
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
506
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
507
|
+
];
|
|
508
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
509
|
+
actions: {
|
|
510
|
+
getAvatarColor: (str: string) => {
|
|
511
|
+
index: number;
|
|
512
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
513
|
+
};
|
|
514
|
+
addInlineCommentMark: (props: {
|
|
515
|
+
from: number;
|
|
516
|
+
to: number;
|
|
517
|
+
mark: import("prosemirror-model").Mark;
|
|
518
|
+
}) => boolean;
|
|
519
|
+
};
|
|
520
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
521
|
+
];
|
|
522
|
+
pluginConfiguration?: {
|
|
523
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
524
|
+
} | undefined;
|
|
525
|
+
commands: {
|
|
526
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
527
|
+
};
|
|
528
|
+
actions: {
|
|
529
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
530
|
+
};
|
|
531
|
+
}, {
|
|
532
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
533
|
+
} | undefined>>
|
|
326
534
|
]> | undefined;
|
|
327
535
|
}>;
|
|
328
536
|
};
|
|
@@ -113,7 +113,59 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
113
113
|
dependencies: any;
|
|
114
114
|
sharedState: any;
|
|
115
115
|
actions: any;
|
|
116
|
-
}, any
|
|
116
|
+
}, any>>,
|
|
117
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
118
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
119
|
+
dependencies: [
|
|
120
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
121
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
122
|
+
dependencies: [
|
|
123
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
124
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
125
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
126
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
127
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
128
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
129
|
+
sharedState: {
|
|
130
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
131
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
132
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
133
|
+
};
|
|
134
|
+
dependencies: [
|
|
135
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
136
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
137
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
138
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
139
|
+
];
|
|
140
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
141
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
142
|
+
];
|
|
143
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
144
|
+
actions: {
|
|
145
|
+
getAvatarColor: (str: string) => {
|
|
146
|
+
index: number;
|
|
147
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
148
|
+
};
|
|
149
|
+
addInlineCommentMark: (props: {
|
|
150
|
+
from: number;
|
|
151
|
+
to: number;
|
|
152
|
+
mark: import("prosemirror-model").Mark;
|
|
153
|
+
}) => boolean;
|
|
154
|
+
};
|
|
155
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
156
|
+
];
|
|
157
|
+
pluginConfiguration?: {
|
|
158
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
commands: {
|
|
161
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
162
|
+
};
|
|
163
|
+
actions: {
|
|
164
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
165
|
+
};
|
|
166
|
+
}, {
|
|
167
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
168
|
+
} | undefined>>
|
|
117
169
|
];
|
|
118
170
|
}, import("../../plugin").TablePluginOptions | undefined>,
|
|
119
171
|
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
|
|
@@ -188,7 +240,59 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
|
|
|
188
240
|
dependencies: any;
|
|
189
241
|
sharedState: any;
|
|
190
242
|
actions: any;
|
|
191
|
-
}, any
|
|
243
|
+
}, any>>,
|
|
244
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"editorViewMode", {
|
|
245
|
+
sharedState: import("@atlaskit/editor-plugin-editor-viewmode").EditorViewModePluginState | null;
|
|
246
|
+
dependencies: [
|
|
247
|
+
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
248
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
249
|
+
dependencies: [
|
|
250
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
251
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
252
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
253
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
254
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
255
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
256
|
+
sharedState: {
|
|
257
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
258
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
259
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
260
|
+
};
|
|
261
|
+
dependencies: [
|
|
262
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
263
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
264
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
265
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
266
|
+
];
|
|
267
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
268
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
269
|
+
];
|
|
270
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
271
|
+
actions: {
|
|
272
|
+
getAvatarColor: (str: string) => {
|
|
273
|
+
index: number;
|
|
274
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
275
|
+
};
|
|
276
|
+
addInlineCommentMark: (props: {
|
|
277
|
+
from: number;
|
|
278
|
+
to: number;
|
|
279
|
+
mark: import("prosemirror-model").Mark;
|
|
280
|
+
}) => boolean;
|
|
281
|
+
};
|
|
282
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>
|
|
283
|
+
];
|
|
284
|
+
pluginConfiguration?: {
|
|
285
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
286
|
+
} | undefined;
|
|
287
|
+
commands: {
|
|
288
|
+
updateViewMode: (mode: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
|
|
289
|
+
};
|
|
290
|
+
actions: {
|
|
291
|
+
applyViewModeStepAt: (tr: import("prosemirror-state").Transaction) => boolean;
|
|
292
|
+
};
|
|
293
|
+
}, {
|
|
294
|
+
mode?: import("@atlaskit/editor-plugin-editor-viewmode").ViewMode | undefined;
|
|
295
|
+
} | undefined>>
|
|
192
296
|
]> | undefined;
|
|
193
297
|
}) => JSX.Element | null;
|
|
194
298
|
export default TableFloatingControls;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.12",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^35.8.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.0.17",
|
|
33
|
-
"@atlaskit/editor-common": "^78.
|
|
33
|
+
"@atlaskit/editor-common": "^78.24.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.5.3",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-content-insertion": "^1.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^1.0.0",
|
|
38
39
|
"@atlaskit/editor-plugin-guideline": "^1.0.0",
|
|
39
40
|
"@atlaskit/editor-plugin-selection": "^1.1.0",
|
|
40
41
|
"@atlaskit/editor-plugin-width": "^1.0.0",
|
|
@@ -140,6 +141,9 @@
|
|
|
140
141
|
},
|
|
141
142
|
"platform.editor.table.use-shared-state-hook": {
|
|
142
143
|
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33": {
|
|
146
|
+
"type": "boolean"
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
}
|
|
@@ -5,6 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
|
|
6
6
|
import type { TableEventPayload } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
8
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
8
9
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
9
10
|
import { calcTableWidth } from '@atlaskit/editor-common/styles';
|
|
10
11
|
import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
|
|
@@ -180,6 +181,9 @@ export const ResizableTableContainer = React.memo(
|
|
|
180
181
|
);
|
|
181
182
|
|
|
182
183
|
const tableWidth = getTableContainerWidth(node);
|
|
184
|
+
const { editorViewModeState } = useSharedPluginState(pluginInjectionApi, [
|
|
185
|
+
'editorViewMode',
|
|
186
|
+
]);
|
|
183
187
|
|
|
184
188
|
// 76 is currently an accepted padding value considering the spacing for resizer handle
|
|
185
189
|
const responsiveContainerWidth = isTableScalingEnabled
|
|
@@ -239,11 +243,17 @@ export const ResizableTableContainer = React.memo(
|
|
|
239
243
|
className={ClassName.TABLE_RESIZER_CONTAINER}
|
|
240
244
|
ref={containerRef}
|
|
241
245
|
>
|
|
242
|
-
|
|
246
|
+
{editorViewModeState?.mode === 'view' ? (
|
|
243
247
|
<InnerContainer className={className} node={node}>
|
|
244
248
|
{children}
|
|
245
249
|
</InnerContainer>
|
|
246
|
-
|
|
250
|
+
) : (
|
|
251
|
+
<TableResizer {...tableResizerProps}>
|
|
252
|
+
<InnerContainer className={className} node={node}>
|
|
253
|
+
{children}
|
|
254
|
+
</InnerContainer>
|
|
255
|
+
</TableResizer>
|
|
256
|
+
)}
|
|
247
257
|
</div>
|
|
248
258
|
</div>
|
|
249
259
|
);
|
package/src/plugin.tsx
CHANGED
|
@@ -35,6 +35,7 @@ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
|
35
35
|
import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
36
36
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
37
37
|
import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
38
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
38
39
|
import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
39
40
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
40
41
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
@@ -141,6 +142,7 @@ export type TablePlugin = NextEditorPlugin<
|
|
|
141
142
|
GuidelinePlugin,
|
|
142
143
|
SelectionPlugin,
|
|
143
144
|
OptionalPlugin<MediaPlugin>,
|
|
145
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
144
146
|
];
|
|
145
147
|
}
|
|
146
148
|
>;
|
package/src/pm-plugins/main.ts
CHANGED
|
@@ -352,7 +352,10 @@ export const createPlugin = (
|
|
|
352
352
|
|
|
353
353
|
if (
|
|
354
354
|
targetClassList.contains(ClassName.CONTROLS_BUTTON) ||
|
|
355
|
-
targetClassList.contains(ClassName.CONTEXTUAL_MENU_BUTTON)
|
|
355
|
+
targetClassList.contains(ClassName.CONTEXTUAL_MENU_BUTTON) ||
|
|
356
|
+
targetClassList.contains(
|
|
357
|
+
ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE,
|
|
358
|
+
)
|
|
356
359
|
) {
|
|
357
360
|
return true;
|
|
358
361
|
}
|
package/src/toolbar.tsx
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import commonMessages, {
|
|
14
14
|
tableMessages as messages,
|
|
15
15
|
} from '@atlaskit/editor-common/messages';
|
|
16
|
+
import type { typeOption } from '@atlaskit/editor-common/src/types/floating-toolbar';
|
|
16
17
|
import type {
|
|
17
18
|
Command,
|
|
18
19
|
CommandDispatch,
|
|
@@ -51,6 +52,7 @@ import {
|
|
|
51
52
|
import DistributeColumnIcon from '@atlaskit/icon/glyph/editor/layout-three-equal';
|
|
52
53
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
53
54
|
import TableOptionsIcon from '@atlaskit/icon/glyph/preferences';
|
|
55
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
54
56
|
|
|
55
57
|
import {
|
|
56
58
|
clearHoverSelection,
|
|
@@ -102,6 +104,12 @@ export const getToolbarMenuConfig = (
|
|
|
102
104
|
{ formatMessage }: ToolbarMenuContext,
|
|
103
105
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
104
106
|
): FloatingToolbarItem<Command> => {
|
|
107
|
+
const optionItem: typeOption = getBooleanFF(
|
|
108
|
+
'platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33',
|
|
109
|
+
)
|
|
110
|
+
? 'item-checkbox'
|
|
111
|
+
: 'item';
|
|
112
|
+
|
|
105
113
|
const options = [
|
|
106
114
|
{
|
|
107
115
|
id: 'editor.table.headerRow',
|
|
@@ -109,6 +117,7 @@ export const getToolbarMenuConfig = (
|
|
|
109
117
|
onClick: toggleHeaderRowWithAnalytics(editorAnalyticsAPI),
|
|
110
118
|
selected: state.isHeaderRowEnabled,
|
|
111
119
|
hidden: !config.allowHeaderRow,
|
|
120
|
+
domItemOptions: { type: optionItem },
|
|
112
121
|
},
|
|
113
122
|
{
|
|
114
123
|
id: 'editor.table.headerColumn',
|
|
@@ -116,6 +125,7 @@ export const getToolbarMenuConfig = (
|
|
|
116
125
|
onClick: toggleHeaderColumnWithAnalytics(editorAnalyticsAPI),
|
|
117
126
|
selected: state.isHeaderColumnEnabled,
|
|
118
127
|
hidden: !config.allowHeaderColumn,
|
|
128
|
+
domItemOptions: { type: optionItem },
|
|
119
129
|
},
|
|
120
130
|
{
|
|
121
131
|
id: 'editor.table.numberedColumn',
|
|
@@ -123,6 +133,7 @@ export const getToolbarMenuConfig = (
|
|
|
123
133
|
onClick: toggleNumberColumnWithAnalytics(editorAnalyticsAPI),
|
|
124
134
|
selected: state.isNumberColumnEnabled,
|
|
125
135
|
hidden: !config.allowNumberColumn,
|
|
136
|
+
domItemOptions: { type: optionItem },
|
|
126
137
|
},
|
|
127
138
|
{
|
|
128
139
|
id: 'editor.table.collapseTable',
|
|
@@ -131,6 +142,7 @@ export const getToolbarMenuConfig = (
|
|
|
131
142
|
selected: !!state.isTableCollapsed,
|
|
132
143
|
disabled: !state.canCollapseTable,
|
|
133
144
|
hidden: !config.allowCollapse,
|
|
145
|
+
domItemOptions: { type: optionItem },
|
|
134
146
|
},
|
|
135
147
|
];
|
|
136
148
|
|
|
@@ -227,6 +227,15 @@ const DragHandleComponent = ({
|
|
|
227
227
|
alignSelf: isColumn ? 'none' : 'center',
|
|
228
228
|
zIndex: isColumn ? '-1' : 'auto',
|
|
229
229
|
}}
|
|
230
|
+
onMouseUp={(e) => {
|
|
231
|
+
// should toggle menu if current drag menu open.
|
|
232
|
+
// return focus to editor so copying table selections whilst still works, i cannot call e.preventDefault in a mousemove event as this stops dragstart events from firing
|
|
233
|
+
// -> this is bad for a11y but is the current standard new copy/paste keyboard shortcuts should be introduced instead
|
|
234
|
+
editorView.focus();
|
|
235
|
+
if (isDragMenuOpen) {
|
|
236
|
+
toggleDragMenu && toggleDragMenu('mouse', e);
|
|
237
|
+
}
|
|
238
|
+
}}
|
|
230
239
|
onClick={onClick}
|
|
231
240
|
/>
|
|
232
241
|
<button
|