@atlaskit/editor-presets 2.0.0 → 2.0.2

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 CHANGED
@@ -1,5 +1,52 @@
1
1
  # @atlaskit/editor-presets
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`acce33a5519e2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/acce33a5519e2) -
8
+ Clean up stale experiment `platform_editor_ai_quickstart_command` - enable the quickstart command
9
+ behaviour by default.
10
+ - Updated dependencies
11
+
12
+ ## 2.0.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`b47ee185c5ac4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b47ee185c5ac4) -
17
+ Remove deprecated dragAndDropEnabled plugin option Drag and drop table rows/ columns and advanced
18
+ table controls used to be toggled with dragAndDropEnabled table plugin option however we're
19
+ deprecating this prop to make this the default behaviour.
20
+
21
+ ```
22
+ // Before - to turn on drag and drop:
23
+
24
+ const createPreset = () =>
25
+ createDefaultPreset({ featureFlags: {}, paste: {} })
26
+ .add([tablePlugin, {tableOptions: {}, dragAndDropEnabled: true}])
27
+
28
+ const { preset } = usePreset(createPreset);
29
+
30
+ // Now - drag and drop enabled even without prop
31
+ const createPreset = () =>
32
+ createDefaultPreset({ featureFlags: {}, paste: {} })
33
+ .add([tablePlugin, {tableOptions: {}}])
34
+
35
+ const { preset } = usePreset(createPreset);
36
+ ```
37
+
38
+ The `dragAndDropEnabled` property has also been removed from the `TablePluginOptions` TypeScript
39
+ interface.
40
+
41
+ **Note:** If you previously set `dragAndDropEnabled: false` to explicitly disable drag and drop,
42
+ this is no longer supported — drag and drop is now always enabled and cannot be turned off via
43
+ this option.
44
+
45
+ If issues occur when bumping editor package, please check if dragAndDropEnabled is still present
46
+ in editor integration.
47
+
48
+ - Updated dependencies
49
+
3
50
  ## 2.0.0
4
51
 
5
52
  ### Major Changes
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.helpDialogPluginOptions = helpDialogPluginOptions;
7
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
8
7
  // Added aiEnabled to the options type to match the extended structure
9
8
 
10
9
  function helpDialogPluginOptions(_ref) {
11
10
  var options = _ref.options;
12
- if ((0, _experiments.editorExperiment)('platform_editor_ai_quickstart_command', true)) {
13
- return options;
14
- }
15
- return false;
11
+ return options;
16
12
  }
@@ -27,15 +27,12 @@ function placeholderPluginOptions(_ref) {
27
27
  }
28
28
 
29
29
  // SECTION: From confluence/next/packages/full-page-editor/src/FullPageEditorComponent.tsx `_getPlaceholderText()`
30
- if (!options.isAIEnabled && (0, _experiments.editorExperiment)('platform_editor_ai_quickstart_command', true)) {
30
+ if (!options.isAIEnabled) {
31
31
  return intl.formatMessage(_i18n.i18n.editorEmptyDocumentPlaceholderAI);
32
32
  }
33
33
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
34
34
  return intl.formatMessage(_i18n.i18n.defaultPlaceholder);
35
35
  }
36
- if (!options.isAIEnabled) {
37
- return intl.formatMessage(_i18n.i18n.aiPlaceholder);
38
- }
39
36
  return intl.formatMessage(_i18n.i18n.easyMentionsPlaceholder);
40
37
  // END SECTION
41
38
  }();
@@ -26,9 +26,6 @@ function tablePluginOptions(_ref) {
26
26
  stickyHeaders: true,
27
27
  allowAddColumnWithCustomStep: false
28
28
  },
29
- // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
30
- dragAndDropEnabled: true,
31
- // END SECTION
32
29
  isTableScalingEnabled: true,
33
30
  allowContextualMenu: true,
34
31
  fullWidthEnabled: options.editorAppearance === 'full-width',
@@ -39,7 +36,6 @@ function tablePluginOptions(_ref) {
39
36
  // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
40
37
  tableWithFixedColumnWidthsOption: (0, _platformFeatureFlags.fg)('platform_editor_table_fixed_column_width_prop') ? undefined : true,
41
38
  // END SECTION
42
-
43
39
  // SECTION: From confluence/next/packages/full-page-editor/src/hooks/useEditorFullPageExperiments.ts
44
40
  tableSelector: (0, _experiments.editorExperiment)('platform_editor_tables_table_selector', true)
45
41
  // END SECTION
@@ -1,12 +1,7 @@
1
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
-
3
1
  // Added aiEnabled to the options type to match the extended structure
4
2
 
5
3
  export function helpDialogPluginOptions({
6
4
  options
7
5
  }) {
8
- if (editorExperiment('platform_editor_ai_quickstart_command', true)) {
9
- return options;
10
- }
11
- return false;
6
+ return options;
12
7
  }
@@ -22,15 +22,12 @@ export function placeholderPluginOptions({
22
22
  }
23
23
 
24
24
  // SECTION: From confluence/next/packages/full-page-editor/src/FullPageEditorComponent.tsx `_getPlaceholderText()`
25
- if (!options.isAIEnabled && editorExperiment('platform_editor_ai_quickstart_command', true)) {
25
+ if (!options.isAIEnabled) {
26
26
  return intl.formatMessage(i18n.editorEmptyDocumentPlaceholderAI);
27
27
  }
28
28
  if (editorExperiment('platform_editor_controls', 'variant1')) {
29
29
  return intl.formatMessage(i18n.defaultPlaceholder);
30
30
  }
31
- if (!options.isAIEnabled) {
32
- return intl.formatMessage(i18n.aiPlaceholder);
33
- }
34
31
  return intl.formatMessage(i18n.easyMentionsPlaceholder);
35
32
  // END SECTION
36
33
  })();
@@ -21,9 +21,6 @@ export function tablePluginOptions({
21
21
  stickyHeaders: true,
22
22
  allowAddColumnWithCustomStep: false
23
23
  },
24
- // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
25
- dragAndDropEnabled: true,
26
- // END SECTION
27
24
  isTableScalingEnabled: true,
28
25
  allowContextualMenu: true,
29
26
  fullWidthEnabled: options.editorAppearance === 'full-width',
@@ -33,7 +30,6 @@ export function tablePluginOptions({
33
30
  // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
34
31
  tableWithFixedColumnWidthsOption: fg('platform_editor_table_fixed_column_width_prop') ? undefined : true,
35
32
  // END SECTION
36
-
37
33
  // SECTION: From confluence/next/packages/full-page-editor/src/hooks/useEditorFullPageExperiments.ts
38
34
  tableSelector: editorExperiment('platform_editor_tables_table_selector', true)
39
35
  // END SECTION
@@ -1,11 +1,6 @@
1
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
-
3
1
  // Added aiEnabled to the options type to match the extended structure
4
2
 
5
3
  export function helpDialogPluginOptions(_ref) {
6
4
  var options = _ref.options;
7
- if (editorExperiment('platform_editor_ai_quickstart_command', true)) {
8
- return options;
9
- }
10
- return false;
5
+ return options;
11
6
  }
@@ -21,15 +21,12 @@ export function placeholderPluginOptions(_ref) {
21
21
  }
22
22
 
23
23
  // SECTION: From confluence/next/packages/full-page-editor/src/FullPageEditorComponent.tsx `_getPlaceholderText()`
24
- if (!options.isAIEnabled && editorExperiment('platform_editor_ai_quickstart_command', true)) {
24
+ if (!options.isAIEnabled) {
25
25
  return intl.formatMessage(i18n.editorEmptyDocumentPlaceholderAI);
26
26
  }
27
27
  if (editorExperiment('platform_editor_controls', 'variant1')) {
28
28
  return intl.formatMessage(i18n.defaultPlaceholder);
29
29
  }
30
- if (!options.isAIEnabled) {
31
- return intl.formatMessage(i18n.aiPlaceholder);
32
- }
33
30
  return intl.formatMessage(i18n.easyMentionsPlaceholder);
34
31
  // END SECTION
35
32
  }();
@@ -20,9 +20,6 @@ export function tablePluginOptions(_ref) {
20
20
  stickyHeaders: true,
21
21
  allowAddColumnWithCustomStep: false
22
22
  },
23
- // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
24
- dragAndDropEnabled: true,
25
- // END SECTION
26
23
  isTableScalingEnabled: true,
27
24
  allowContextualMenu: true,
28
25
  fullWidthEnabled: options.editorAppearance === 'full-width',
@@ -33,7 +30,6 @@ export function tablePluginOptions(_ref) {
33
30
  // SECTION: From confluence/next/packages/editor-features/src/hooks/useEditorFeatureFlags.ts
34
31
  tableWithFixedColumnWidthsOption: fg('platform_editor_table_fixed_column_width_prop') ? undefined : true,
35
32
  // END SECTION
36
-
37
33
  // SECTION: From confluence/next/packages/full-page-editor/src/hooks/useEditorFullPageExperiments.ts
38
34
  tableSelector: editorExperiment('platform_editor_tables_table_selector', true)
39
35
  // END SECTION
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-presets",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Public editor presets for Atlassian Editor containing base configurations for Confluence and other products",
6
6
  "publishConfig": {
@@ -86,7 +86,7 @@
86
86
  "@atlaskit/editor-plugin-list": "^12.0.0",
87
87
  "@atlaskit/editor-plugin-local-id": "^8.0.0",
88
88
  "@atlaskit/editor-plugin-loom": "^12.0.0",
89
- "@atlaskit/editor-plugin-media": "^12.0.0",
89
+ "@atlaskit/editor-plugin-media": "^12.1.0",
90
90
  "@atlaskit/editor-plugin-media-insert": "^23.0.0",
91
91
  "@atlaskit/editor-plugin-mentions": "^12.0.0",
92
92
  "@atlaskit/editor-plugin-metrics": "^11.0.0",
@@ -103,11 +103,11 @@
103
103
  "@atlaskit/editor-plugin-selection-extension": "^13.0.0",
104
104
  "@atlaskit/editor-plugin-selection-marker": "^10.0.0",
105
105
  "@atlaskit/editor-plugin-selection-toolbar": "^11.0.0",
106
- "@atlaskit/editor-plugin-show-diff": "^8.0.0",
106
+ "@atlaskit/editor-plugin-show-diff": "^8.1.0",
107
107
  "@atlaskit/editor-plugin-status": "^11.0.0",
108
108
  "@atlaskit/editor-plugin-submit-editor": "^10.0.0",
109
109
  "@atlaskit/editor-plugin-synced-block": "^8.0.0",
110
- "@atlaskit/editor-plugin-table": "^21.0.0",
110
+ "@atlaskit/editor-plugin-table": "^22.1.0",
111
111
  "@atlaskit/editor-plugin-tasks-and-decisions": "^13.0.0",
112
112
  "@atlaskit/editor-plugin-text-color": "^10.0.0",
113
113
  "@atlaskit/editor-plugin-text-formatting": "^10.0.0",
@@ -123,11 +123,11 @@
123
123
  "@atlaskit/editor-plugin-user-preferences": "^8.0.0",
124
124
  "@atlaskit/editor-plugin-width": "^11.0.0",
125
125
  "@atlaskit/platform-feature-flags": "^1.1.0",
126
- "@atlaskit/tmp-editor-statsig": "^62.4.0",
126
+ "@atlaskit/tmp-editor-statsig": "^63.0.0",
127
127
  "@babel/runtime": "^7.0.0"
128
128
  },
129
129
  "peerDependencies": {
130
- "@atlaskit/editor-common": "^114.0.0",
130
+ "@atlaskit/editor-common": "^114.2.0",
131
131
  "react": "^18.2.0",
132
132
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
133
133
  },