@wordpress/editor 14.35.1-next.16d95556a.0 → 14.36.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.
Files changed (121) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/bindings/post-data.js +15 -15
  3. package/build/bindings/post-data.js.map +2 -2
  4. package/build/bindings/term-data.js +97 -95
  5. package/build/bindings/term-data.js.map +2 -2
  6. package/build/components/collab-sidebar/comments.js +69 -18
  7. package/build/components/collab-sidebar/comments.js.map +2 -2
  8. package/build/components/collab-sidebar/hooks.js +9 -1
  9. package/build/components/collab-sidebar/hooks.js.map +2 -2
  10. package/build/components/global-styles/index.js +8 -8
  11. package/build/components/global-styles/index.js.map +2 -2
  12. package/build/components/post-featured-image/index.js +1 -32
  13. package/build/components/post-featured-image/index.js.map +3 -3
  14. package/build/components/post-schedule/panel.js +1 -7
  15. package/build/components/post-schedule/panel.js.map +2 -2
  16. package/build/components/post-status/index.js +1 -7
  17. package/build/components/post-status/index.js.map +2 -2
  18. package/build/components/post-template/block-theme.js +1 -1
  19. package/build/components/post-template/block-theme.js.map +2 -2
  20. package/build/components/post-template/hooks.js +1 -1
  21. package/build/components/post-template/hooks.js.map +2 -2
  22. package/build/components/provider/index.js +3 -1
  23. package/build/components/provider/index.js.map +2 -2
  24. package/build/components/provider/use-block-editor-settings.js +9 -1
  25. package/build/components/provider/use-block-editor-settings.js.map +2 -2
  26. package/build/components/visual-editor/index.js +1 -7
  27. package/build/components/visual-editor/index.js.map +2 -2
  28. package/build/components/visual-editor/use-edit-content-only-section-exit.js +5 -6
  29. package/build/components/visual-editor/use-edit-content-only-section-exit.js.map +2 -2
  30. package/build/dataviews/store/private-actions.js +5 -1
  31. package/build/dataviews/store/private-actions.js.map +2 -2
  32. package/build/hooks/media-upload.js +89 -6
  33. package/build/hooks/media-upload.js.map +3 -3
  34. package/build/hooks/template-part-navigation-edit-button.js +8 -11
  35. package/build/hooks/template-part-navigation-edit-button.js.map +3 -3
  36. package/build/store/actions.js +1 -1
  37. package/build/store/actions.js.map +2 -2
  38. package/build/store/constants.js +8 -0
  39. package/build/store/constants.js.map +2 -2
  40. package/build-module/bindings/post-data.js +15 -15
  41. package/build-module/bindings/post-data.js.map +2 -2
  42. package/build-module/bindings/term-data.js +93 -95
  43. package/build-module/bindings/term-data.js.map +2 -2
  44. package/build-module/components/collab-sidebar/comments.js +69 -18
  45. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  46. package/build-module/components/collab-sidebar/hooks.js +9 -1
  47. package/build-module/components/collab-sidebar/hooks.js.map +2 -2
  48. package/build-module/components/global-styles/index.js +8 -8
  49. package/build-module/components/global-styles/index.js.map +2 -2
  50. package/build-module/components/post-featured-image/index.js +3 -35
  51. package/build-module/components/post-featured-image/index.js.map +2 -2
  52. package/build-module/components/post-schedule/panel.js +1 -12
  53. package/build-module/components/post-schedule/panel.js.map +2 -2
  54. package/build-module/components/post-status/index.js +1 -12
  55. package/build-module/components/post-status/index.js.map +2 -2
  56. package/build-module/components/post-template/block-theme.js +1 -1
  57. package/build-module/components/post-template/block-theme.js.map +2 -2
  58. package/build-module/components/post-template/hooks.js +1 -1
  59. package/build-module/components/post-template/hooks.js.map +2 -2
  60. package/build-module/components/provider/index.js +3 -1
  61. package/build-module/components/provider/index.js.map +2 -2
  62. package/build-module/components/provider/use-block-editor-settings.js +9 -1
  63. package/build-module/components/provider/use-block-editor-settings.js.map +2 -2
  64. package/build-module/components/visual-editor/index.js +2 -7
  65. package/build-module/components/visual-editor/index.js.map +2 -2
  66. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js +5 -6
  67. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js.map +2 -2
  68. package/build-module/dataviews/store/private-actions.js +5 -1
  69. package/build-module/dataviews/store/private-actions.js.map +2 -2
  70. package/build-module/hooks/media-upload.js +67 -6
  71. package/build-module/hooks/media-upload.js.map +2 -2
  72. package/build-module/hooks/template-part-navigation-edit-button.js +10 -17
  73. package/build-module/hooks/template-part-navigation-edit-button.js.map +2 -2
  74. package/build-module/store/actions.js +1 -1
  75. package/build-module/store/actions.js.map +2 -2
  76. package/build-module/store/constants.js +7 -0
  77. package/build-module/store/constants.js.map +2 -2
  78. package/build-style/style-rtl.css +309 -40
  79. package/build-style/style.css +309 -40
  80. package/build-types/bindings/post-data.d.ts +2 -1
  81. package/build-types/bindings/term-data.d.ts +86 -8
  82. package/build-types/bindings/term-data.d.ts.map +1 -1
  83. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  84. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  85. package/build-types/components/global-styles/index.d.ts.map +1 -1
  86. package/build-types/components/post-schedule/panel.d.ts.map +1 -1
  87. package/build-types/components/post-status/index.d.ts.map +1 -1
  88. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  89. package/build-types/components/provider/index.d.ts.map +1 -1
  90. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  91. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  92. package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts.map +1 -1
  93. package/build-types/dataviews/store/private-actions.d.ts +5 -0
  94. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  95. package/build-types/store/actions.d.ts.map +1 -1
  96. package/build-types/store/constants.d.ts +1 -0
  97. package/build-types/store/constants.d.ts.map +1 -1
  98. package/package.json +40 -40
  99. package/src/bindings/post-data.js +21 -20
  100. package/src/bindings/term-data.js +124 -151
  101. package/src/bindings/test/post-data.js +210 -0
  102. package/src/bindings/test/term-data.js +406 -0
  103. package/src/components/collab-sidebar/comments.js +90 -24
  104. package/src/components/collab-sidebar/hooks.js +12 -1
  105. package/src/components/global-styles/index.js +8 -9
  106. package/src/components/global-styles-sidebar/style.scss +7 -0
  107. package/src/components/post-featured-image/index.js +1 -44
  108. package/src/components/post-schedule/panel.js +1 -13
  109. package/src/components/post-status/index.js +1 -13
  110. package/src/components/post-template/block-theme.js +4 -1
  111. package/src/components/post-template/hooks.js +1 -1
  112. package/src/components/provider/index.js +7 -2
  113. package/src/components/provider/use-block-editor-settings.js +8 -0
  114. package/src/components/visual-editor/index.js +1 -6
  115. package/src/components/visual-editor/use-edit-content-only-section-exit.js +9 -10
  116. package/src/dataviews/store/private-actions.ts +17 -1
  117. package/src/hooks/media-upload.js +75 -7
  118. package/src/hooks/template-part-navigation-edit-button.js +4 -15
  119. package/src/store/actions.js +2 -0
  120. package/src/store/constants.ts +6 -0
  121. package/tsconfig.tsbuildinfo +1 -1
@@ -6,91 +6,85 @@ var NAVIGATION_BLOCK_TYPES = [
6
6
  "core/navigation-link",
7
7
  "core/navigation-submenu"
8
8
  ];
9
- function createDataFields(termDataValues, idValue) {
10
- return {
11
- id: {
12
- label: __("Term ID"),
13
- value: idValue,
14
- type: "string"
15
- },
16
- name: {
17
- label: __("Name"),
18
- value: termDataValues?.name,
19
- type: "string"
20
- },
21
- slug: {
22
- label: __("Slug"),
23
- value: termDataValues?.slug,
24
- type: "string"
25
- },
26
- link: {
27
- label: __("Link"),
28
- value: termDataValues?.link,
29
- type: "string"
30
- },
31
- description: {
32
- label: __("Description"),
33
- value: termDataValues?.description,
34
- type: "string"
35
- },
36
- parent: {
37
- label: __("Parent ID"),
38
- value: termDataValues?.parent,
39
- type: "string"
40
- },
41
- count: {
42
- label: __("Count"),
43
- value: `(${termDataValues?.count ?? 0})`,
44
- type: "string"
45
- }
46
- };
47
- }
48
- function getTermDataFields(select, context, clientId) {
49
- const { getEntityRecord } = select(coreDataStore);
50
- const { getBlockAttributes, getBlockName } = select(blockEditorStore);
51
- let termDataValues, dataFields;
52
- const blockName = getBlockName?.(clientId);
53
- const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
54
- let termId, taxonomy;
55
- if (isNavigationBlock) {
56
- const blockAttributes = getBlockAttributes?.(clientId);
57
- termId = blockAttributes?.id;
58
- const typeFromAttributes = blockAttributes?.type;
59
- taxonomy = typeFromAttributes === "tag" ? "post_tag" : typeFromAttributes;
60
- } else {
61
- termId = context?.termId;
62
- taxonomy = context?.taxonomy;
63
- }
64
- if (taxonomy && termId) {
65
- termDataValues = getEntityRecord("taxonomy", taxonomy, termId);
66
- if (!termDataValues && context?.termData) {
67
- termDataValues = context.termData;
68
- }
69
- if (termDataValues) {
70
- dataFields = createDataFields(termDataValues, termId);
71
- }
72
- } else if (context?.termData) {
73
- termDataValues = context.termData;
74
- dataFields = createDataFields(
75
- termDataValues,
76
- termDataValues?.term_id
77
- );
78
- }
79
- if (!dataFields || !Object.keys(dataFields).length) {
80
- return null;
9
+ var termDataFields = [
10
+ {
11
+ label: __("Term ID"),
12
+ args: { field: "id" },
13
+ type: "string"
14
+ },
15
+ {
16
+ label: __("Name"),
17
+ args: { field: "name" },
18
+ type: "string"
19
+ },
20
+ {
21
+ label: __("Slug"),
22
+ args: { field: "slug" },
23
+ type: "string"
24
+ },
25
+ {
26
+ label: __("Link"),
27
+ args: { field: "link" },
28
+ type: "string"
29
+ },
30
+ {
31
+ label: __("Description"),
32
+ args: { field: "description" },
33
+ type: "string"
34
+ },
35
+ {
36
+ label: __("Parent ID"),
37
+ args: { field: "parent" },
38
+ type: "string"
39
+ },
40
+ {
41
+ label: __("Count"),
42
+ args: { field: "count" },
43
+ type: "string"
81
44
  }
82
- return dataFields;
83
- }
45
+ ];
84
46
  var term_data_default = {
85
47
  name: "core/term-data",
86
48
  usesContext: ["taxonomy", "termId", "termData"],
87
49
  getValues({ select, context, bindings, clientId }) {
88
- const dataFields = getTermDataFields(select, context, clientId);
50
+ const { getEntityRecord } = select(coreDataStore);
51
+ const { getBlockAttributes, getBlockName } = select(blockEditorStore);
52
+ const blockName = getBlockName(clientId);
53
+ const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
54
+ let termDataValues;
55
+ if (isNavigationBlock) {
56
+ const blockAttributes = getBlockAttributes(clientId);
57
+ const typeFromAttributes = blockAttributes?.type;
58
+ const taxonomy = typeFromAttributes === "tag" ? "post_tag" : typeFromAttributes;
59
+ termDataValues = getEntityRecord(
60
+ "taxonomy",
61
+ taxonomy,
62
+ blockAttributes?.id
63
+ );
64
+ } else if (context.termId && context.taxonomy) {
65
+ termDataValues = getEntityRecord(
66
+ "taxonomy",
67
+ context.taxonomy,
68
+ context.termId
69
+ );
70
+ }
71
+ if (!termDataValues && context?.termData && !isNavigationBlock) {
72
+ termDataValues = context.termData;
73
+ }
89
74
  const newValues = {};
90
- for (const [attributeName, source] of Object.entries(bindings)) {
91
- const fieldKey = source.args.field;
92
- const { value: fieldValue, label: fieldLabel } = dataFields?.[fieldKey] || {};
93
- newValues[attributeName] = fieldValue ?? fieldLabel ?? fieldKey;
75
+ for (const [attributeName, binding] of Object.entries(bindings)) {
76
+ const termDataField = termDataFields.find(
77
+ (field) => field.args.field === binding.args.field
78
+ );
79
+ if (!termDataField) {
80
+ newValues[attributeName] = binding.args.field;
81
+ } else if (!termDataValues || termDataValues[binding.args.field] === void 0) {
82
+ newValues[attributeName] = termDataField.label;
83
+ } else if (binding.args.field === "count") {
84
+ newValues[attributeName] = "(" + termDataValues[binding.args.field] + ")";
85
+ } else {
86
+ newValues[attributeName] = termDataValues[binding.args.field];
87
+ }
94
88
  }
95
89
  return newValues;
96
90
  },
@@ -98,10 +92,10 @@ var term_data_default = {
98
92
  setValues({ dispatch, context, bindings }) {
99
93
  return false;
100
94
  },
101
- canUserEditValue({ select, context, args }) {
95
+ canUserEditValue({ select, context }) {
102
96
  const { getBlockName, getSelectedBlockClientId } = select(blockEditorStore);
103
97
  const clientId = getSelectedBlockClientId();
104
- const blockName = getBlockName?.(clientId);
98
+ const blockName = getBlockName(clientId);
105
99
  if (NAVIGATION_BLOCK_TYPES.includes(blockName)) {
106
100
  return false;
107
101
  }
@@ -111,26 +105,30 @@ var term_data_default = {
111
105
  if (!context?.taxonomy || !context?.termId) {
112
106
  return false;
113
107
  }
114
- const fieldValue = getTermDataFields(select, context, void 0)?.[args.field]?.value;
115
- if (fieldValue === void 0) {
116
- return false;
117
- }
118
108
  return false;
119
109
  },
120
- getFieldsList({ select, context }) {
121
- const clientId = select(blockEditorStore).getSelectedBlockClientId();
122
- const termDataFields = getTermDataFields(select, context, clientId);
123
- if (!termDataFields) {
110
+ getFieldsList({ context, select }) {
111
+ const { getBlockAttributes, getBlockName, getSelectedBlockClientId } = select(blockEditorStore);
112
+ const clientId = getSelectedBlockClientId();
113
+ const blockName = getBlockName(clientId);
114
+ if (NAVIGATION_BLOCK_TYPES.includes(blockName)) {
115
+ const blockAttributes = getBlockAttributes(clientId);
116
+ if (!blockAttributes || !blockAttributes.id || !blockAttributes.type) {
117
+ return [];
118
+ }
119
+ return termDataFields;
120
+ }
121
+ if (!context) {
124
122
  return [];
125
123
  }
126
- return Object.entries(termDataFields).map(([key, field]) => ({
127
- label: field.label,
128
- type: field.type,
129
- args: { field: key }
130
- }));
124
+ if (context.taxonomy && context.termId || context.termData) {
125
+ return termDataFields;
126
+ }
127
+ return [];
131
128
  }
132
129
  };
133
130
  export {
134
- term_data_default as default
131
+ term_data_default as default,
132
+ termDataFields
135
133
  };
136
134
  //# sourceMappingURL=term-data.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/bindings/term-data.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\n/**\n * Creates the data fields object with the given term data values and ID value.\n *\n * @param {Object} termDataValues The term data values.\n * @param {string|number} idValue The ID value to use.\n * @return {Object} The data fields object.\n */\nfunction createDataFields( termDataValues, idValue ) {\n\treturn {\n\t\tid: {\n\t\t\tlabel: __( 'Term ID' ),\n\t\t\tvalue: idValue,\n\t\t\ttype: 'string',\n\t\t},\n\t\tname: {\n\t\t\tlabel: __( 'Name' ),\n\t\t\tvalue: termDataValues?.name,\n\t\t\ttype: 'string',\n\t\t},\n\t\tslug: {\n\t\t\tlabel: __( 'Slug' ),\n\t\t\tvalue: termDataValues?.slug,\n\t\t\ttype: 'string',\n\t\t},\n\t\tlink: {\n\t\t\tlabel: __( 'Link' ),\n\t\t\tvalue: termDataValues?.link,\n\t\t\ttype: 'string',\n\t\t},\n\t\tdescription: {\n\t\t\tlabel: __( 'Description' ),\n\t\t\tvalue: termDataValues?.description,\n\t\t\ttype: 'string',\n\t\t},\n\t\tparent: {\n\t\t\tlabel: __( 'Parent ID' ),\n\t\t\tvalue: termDataValues?.parent,\n\t\t\ttype: 'string',\n\t\t},\n\t\tcount: {\n\t\t\tlabel: __( 'Count' ),\n\t\t\tvalue: `(${ termDataValues?.count ?? 0 })`,\n\t\t\ttype: 'string',\n\t\t},\n\t};\n}\n\n/**\n * Gets a list of term data fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @param {string} clientId The block client ID used to read attributes.\n * @return {Object} List of term data fields with their value and label.\n *\n * @example\n * ```js\n * {\n * name: {\n * label: 'Term Name',\n * value: 'Category Name',\n * },\n * count: {\n * label: 'Term Count',\n * value: 5,\n * },\n * ...\n * }\n * ```\n */\nfunction getTermDataFields( select, context, clientId ) {\n\tconst { getEntityRecord } = select( coreDataStore );\n\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\n\tlet termDataValues, dataFields;\n\n\t/*\n\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t */\n\tconst blockName = getBlockName?.( clientId );\n\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\tlet termId, taxonomy;\n\n\tif ( isNavigationBlock ) {\n\t\t// Navigation blocks: read from block attributes\n\t\tconst blockAttributes = getBlockAttributes?.( clientId );\n\t\ttermId = blockAttributes?.id;\n\t\tconst typeFromAttributes = blockAttributes?.type;\n\t\ttaxonomy =\n\t\t\ttypeFromAttributes === 'tag' ? 'post_tag' : typeFromAttributes;\n\t} else {\n\t\t// All other blocks: use context\n\t\ttermId = context?.termId;\n\t\ttaxonomy = context?.taxonomy;\n\t}\n\n\tif ( taxonomy && termId ) {\n\t\ttermDataValues = getEntityRecord( 'taxonomy', taxonomy, termId );\n\n\t\tif ( ! termDataValues && context?.termData ) {\n\t\t\ttermDataValues = context.termData;\n\t\t}\n\n\t\tif ( termDataValues ) {\n\t\t\tdataFields = createDataFields( termDataValues, termId );\n\t\t}\n\t} else if ( context?.termData ) {\n\t\ttermDataValues = context.termData;\n\t\tdataFields = createDataFields(\n\t\t\ttermDataValues,\n\t\t\ttermDataValues?.term_id\n\t\t);\n\t}\n\n\tif ( ! dataFields || ! Object.keys( dataFields ).length ) {\n\t\treturn null;\n\t}\n\n\treturn dataFields;\n}\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/term-data',\n\tusesContext: [ 'taxonomy', 'termId', 'termData' ],\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\tconst dataFields = getTermDataFields( select, context, clientId );\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, source ] of Object.entries( bindings ) ) {\n\t\t\t// Use the value, the field label, or the field key.\n\t\t\tconst fieldKey = source.args.field;\n\t\t\tconst { value: fieldValue, label: fieldLabel } =\n\t\t\t\tdataFields?.[ fieldKey ] || {};\n\t\t\tnewValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;\n\t\t}\n\t\treturn newValues;\n\t},\n\t// eslint-disable-next-line no-unused-vars\n\tsetValues( { dispatch, context, bindings } ) {\n\t\t// Terms are typically not editable through block bindings in most contexts.\n\t\treturn false;\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName?.( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Terms are typically read-only when displayed.\n\t\tif ( context?.termQuery ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `taxonomy` or `termId` is not defined.\n\t\tif ( ! context?.taxonomy || ! context?.termId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst fieldValue = getTermDataFields( select, context, undefined )?.[\n\t\t\targs.field\n\t\t]?.value;\n\t\t// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.\n\t\tif ( fieldValue === undefined ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\tconst clientId = select( blockEditorStore ).getSelectedBlockClientId();\n\t\tconst termDataFields = getTermDataFields( select, context, clientId );\n\t\tif ( ! termDataFields ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn Object.entries( termDataFields ).map( ( [ key, field ] ) => ( {\n\t\t\tlabel: field.label,\n\t\t\ttype: field.type,\n\t\t\targs: { field: key },\n\t\t} ) );\n\t},\n};\n"],
5
- "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,SAAS,qBAAqB;AACvC,SAAS,SAAS,wBAAwB;AAG1C,IAAM,yBAAyB;AAAA,EAC9B;AAAA,EACA;AACD;AASA,SAAS,iBAAkB,gBAAgB,SAAU;AACpD,SAAO;AAAA,IACN,IAAI;AAAA,MACH,OAAO,GAAI,SAAU;AAAA,MACrB,OAAO;AAAA,MACP,MAAM;AAAA,IACP;AAAA,IACA,MAAM;AAAA,MACL,OAAO,GAAI,MAAO;AAAA,MAClB,OAAO,gBAAgB;AAAA,MACvB,MAAM;AAAA,IACP;AAAA,IACA,MAAM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,GAAI;AACpC,UAAM,WAAW,OAAQ,gBAAiB,EAAE,yBAAyB;AACrE,UAAM,iBAAiB,kBAAmB,QAAQ,SAAS,QAAS;AACpE,QAAK,CAAE,gBAAiB;AACvB,aAAO,CAAC;AAAA,IACT;AACA,WAAO,OAAO,QAAS,cAAe,EAAE,IAAK,CAAE,CAAE,KAAK,KAAM,OAAS;AAAA,MACpE,OAAO,MAAM;AAAA,MACb,MAAM,MAAM;AAAA,MACZ,MAAM,EAAE,OAAO,IAAI;AAAA,IACpB,EAAI;AAAA,EACL;AACD;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\nexport const termDataFields = [\n\t{\n\t\tlabel: __( 'Term ID' ),\n\t\targs: { field: 'id' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Name' ),\n\t\targs: { field: 'name' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Slug' ),\n\t\targs: { field: 'slug' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Link' ),\n\t\targs: { field: 'link' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Description' ),\n\t\targs: { field: 'description' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Parent ID' ),\n\t\targs: { field: 'parent' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Count' ),\n\t\targs: { field: 'count' },\n\t\ttype: 'string',\n\t},\n];\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/term-data',\n\tusesContext: [ 'taxonomy', 'termId', 'termData' ],\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\n\t\t/*\n\t\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t\t */\n\t\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\t\tconst blockName = getBlockName( clientId );\n\t\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\t\tlet termDataValues;\n\n\t\tif ( isNavigationBlock ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\t\tconst typeFromAttributes = blockAttributes?.type;\n\t\t\tconst taxonomy =\n\t\t\t\ttypeFromAttributes === 'tag' ? 'post_tag' : typeFromAttributes;\n\t\t\ttermDataValues = getEntityRecord(\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy,\n\t\t\t\tblockAttributes?.id\n\t\t\t);\n\t\t} else if ( context.termId && context.taxonomy ) {\n\t\t\t// All other blocks: use context\n\t\t\ttermDataValues = getEntityRecord(\n\t\t\t\t'taxonomy',\n\t\t\t\tcontext.taxonomy,\n\t\t\t\tcontext.termId\n\t\t\t);\n\t\t}\n\n\t\t// Fall back to context termData if available.\n\t\tif ( ! termDataValues && context?.termData && ! isNavigationBlock ) {\n\t\t\ttermDataValues = context.termData;\n\t\t}\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tconst termDataField = termDataFields.find(\n\t\t\t\t( field ) => field.args.field === binding.args.field\n\t\t\t);\n\n\t\t\tif ( ! termDataField ) {\n\t\t\t\t// If the field is unknown, return the field name.\n\t\t\t\tnewValues[ attributeName ] = binding.args.field;\n\t\t\t} else if (\n\t\t\t\t! termDataValues ||\n\t\t\t\ttermDataValues[ binding.args.field ] === undefined\n\t\t\t) {\n\t\t\t\t// If the term data does not exist, return the field label.\n\t\t\t\tnewValues[ attributeName ] = termDataField.label;\n\t\t\t} else if ( binding.args.field === 'count' ) {\n\t\t\t\t// Return the term count value in parentheses.\n\t\t\t\tnewValues[ attributeName ] =\n\t\t\t\t\t'(' + termDataValues[ binding.args.field ] + ')';\n\t\t\t} else {\n\t\t\t\t// If the term data exists, return the term data value.\n\t\t\t\tnewValues[ attributeName ] =\n\t\t\t\t\ttermDataValues[ binding.args.field ];\n\t\t\t}\n\t\t}\n\t\treturn newValues;\n\t},\n\t// eslint-disable-next-line no-unused-vars\n\tsetValues( { dispatch, context, bindings } ) {\n\t\t// Terms are typically not editable through block bindings in most contexts.\n\t\treturn false;\n\t},\n\tcanUserEditValue( { select, context } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Terms are typically read-only when displayed.\n\t\tif ( context?.termQuery ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `taxonomy` or `termId` is not defined.\n\t\tif ( ! context?.taxonomy || ! context?.termId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetFieldsList( { context, select } ) {\n\t\tconst { getBlockAttributes, getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName( clientId );\n\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\t\tif (\n\t\t\t\t! blockAttributes ||\n\t\t\t\t! blockAttributes.id ||\n\t\t\t\t! blockAttributes.type\n\t\t\t) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn termDataFields;\n\t\t}\n\n\t\tif ( ! context ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( ( context.taxonomy && context.termId ) || context.termData ) {\n\t\t\treturn termDataFields;\n\t\t}\n\n\t\treturn [];\n\t},\n};\n"],
5
+ "mappings": ";AAGA,SAAS,UAAU;AACnB,SAAS,SAAS,qBAAqB;AACvC,SAAS,SAAS,wBAAwB;AAG1C,IAAM,yBAAyB;AAAA,EAC9B;AAAA,EACA;AACD;AAEO,IAAM,iBAAiB;AAAA,EAC7B;AAAA,IACC,OAAO,GAAI,SAAU;AAAA,IACrB,MAAM,EAAE,OAAO,KAAK;AAAA,IACpB,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,MAAO;AAAA,IAClB,MAAM,EAAE,OAAO,OAAO;AAAA,IACtB,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,MAAO;AAAA,IAClB,MAAM,EAAE,OAAO,OAAO;AAAA,IACtB,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,MAAO;AAAA,IAClB,MAAM,EAAE,OAAO,OAAO;AAAA,IACtB,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,aAAc;AAAA,IACzB,MAAM,EAAE,OAAO,cAAc;AAAA,IAC7B,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,WAAY;AAAA,IACvB,MAAM,EAAE,OAAO,SAAS;AAAA,IACxB,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,OAAO,GAAI,OAAQ;AAAA,IACnB,MAAM,EAAE,OAAO,QAAQ;AAAA,IACvB,MAAM;AAAA,EACP;AACD;AAKA,IAAO,oBAAQ;AAAA,EACd,MAAM;AAAA,EACN,aAAa,CAAE,YAAY,UAAU,UAAW;AAAA,EAChD,UAAW,EAAE,QAAQ,SAAS,UAAU,SAAS,GAAI;AACpD,UAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAMlD,UAAM,EAA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AAM,EAAE,cAAc,yBAAyB,IAC9C,OAAQ,gBAAiB;AAE1B,UAAM,WAAW,yBAAyB;AAC1C,UAAM,YAAY,aAAc,QAAS;AAIzC,QAAK,uBAAuB,SAAU,SAAU,GAAI;AACnD,aAAO;AAAA,IACR;AAGA,QAAK,SAAS,WAAY;AACzB,aAAO;AAAA,IACR;AAGA,QAAK,CAAE,SAAS,YAAY,CAAE,SAAS,QAAS;AAC/C,aAAO;AAAA,IACR;AAEA,WAAO;AAAA,EACR;AAAA,EACA,cAAe,EAAE,SAAS,OAAO,GAAI;AACpC,UAAM,EAAE,oBAAoB,cAAc,yBAAyB,IAClE,OAAQ,gBAAiB;AAC1B,UAAM,WAAW,yBAAyB;AAC1C,UAAM,YAAY,aAAc,QAAS;AAEzC,QAAK,uBAAuB,SAAU,SAAU,GAAI;AAEnD,YAAM,kBAAkB,mBAAoB,QAAS;AACrD,UACC,CAAE,mBACF,CAAE,gBAAgB,MAClB,CAAE,gBAAgB,MACjB;AACD,eAAO,CAAC;AAAA,MACT;AACA,aAAO;AAAA,IACR;AAEA,QAAK,CAAE,SAAU;AAChB,aAAO,CAAC;AAAA,IACT;AAEA,QAAO,QAAQ,YAAY,QAAQ,UAAY,QAAQ,UAAW;AACjE,aAAO;AAAA,IACR;AAEA,WAAO,CAAC;AAAA,EACT;AACD;",
6
6
  "names": []
7
7
  }
@@ -56,17 +56,24 @@ function Comments({
56
56
  const { selectBlock, toggleBlockSpotlight } = unlock(
57
57
  useDispatch(blockEditorStore)
58
58
  );
59
- const { blockCommentId, selectedBlockClientId, orderedBlockIds } = useSelect((select) => {
59
+ const {
60
+ blockCommentId,
61
+ selectedBlockClientId,
62
+ orderedBlockIds,
63
+ blockMode
64
+ } = useSelect((select) => {
60
65
  const {
61
66
  getBlockAttributes,
62
67
  getSelectedBlockClientId,
63
- getClientIdsWithDescendants
68
+ getClientIdsWithDescendants,
69
+ getBlockMode
64
70
  } = select(blockEditorStore);
65
71
  const clientId = getSelectedBlockClientId();
66
72
  return {
67
73
  blockCommentId: clientId ? getBlockAttributes(clientId)?.metadata?.noteId : null,
68
74
  selectedBlockClientId: clientId,
69
- orderedBlockIds: getClientIdsWithDescendants()
75
+ orderedBlockIds: getClientIdsWithDescendants(),
76
+ blockMode: clientId ? getBlockMode(clientId) : null
70
77
  };
71
78
  }, []);
72
79
  const relatedBlockElement = useBlockElement(selectedBlockClientId);
@@ -219,7 +226,8 @@ function Comments({
219
226
  isFloating,
220
227
  threads,
221
228
  selectedThread,
222
- setCanvasMinHeight
229
+ setCanvasMinHeight,
230
+ blockMode
223
231
  ]);
224
232
  const handleThreadNavigation = (event, thread, isSelected) => {
225
233
  if (event.defaultPrevented) {
@@ -341,18 +349,40 @@ function Thread({
341
349
  selectedThread,
342
350
  commentLastUpdated
343
351
  });
352
+ const isKeyboardTabbingRef = useRef(false);
344
353
  const onMouseEnter = () => {
345
354
  debouncedToggleBlockHighlight(thread.blockClientId, true);
346
355
  };
347
356
  const onMouseLeave = () => {
348
357
  debouncedToggleBlockHighlight(thread.blockClientId, false);
349
358
  };
359
+ const onFocus = () => {
360
+ toggleBlockHighlight(thread.blockClientId, true);
361
+ };
362
+ const onBlur = (event) => {
363
+ const isNoteFocused = event.relatedTarget?.closest(
364
+ ".editor-collab-sidebar-panel__thread"
365
+ );
366
+ const isDialogFocused = event.relatedTarget?.closest('[role="dialog"]');
367
+ const isTabbing = isKeyboardTabbingRef.current;
368
+ if (isNoteFocused && !isTabbing) {
369
+ return;
370
+ }
371
+ if (isDialogFocused) {
372
+ return;
373
+ }
374
+ if (isTabbing && event.currentTarget.contains(event.relatedTarget)) {
375
+ return;
376
+ }
377
+ toggleBlockHighlight(thread.blockClientId, false);
378
+ unselectThread();
379
+ };
350
380
  const handleCommentSelect = () => {
351
381
  setNewNoteFormState("closed");
352
382
  setSelectedThread(thread.id);
383
+ toggleBlockSpotlight(thread.blockClientId, true);
353
384
  if (!!thread.blockClientId) {
354
385
  selectBlock(thread.blockClientId, null);
355
- toggleBlockSpotlight(thread.blockClientId, true);
356
386
  }
357
387
  };
358
388
  const unselectThread = () => {
@@ -403,9 +433,20 @@ function Thread({
403
433
  onClick: handleCommentSelect,
404
434
  onMouseEnter,
405
435
  onMouseLeave,
406
- onFocus: onMouseEnter,
407
- onBlur: onMouseLeave,
408
- onKeyDown,
436
+ onFocus,
437
+ onBlur,
438
+ onKeyUp: (event) => {
439
+ if (event.key === "Tab") {
440
+ isKeyboardTabbingRef.current = false;
441
+ }
442
+ },
443
+ onKeyDown: (event) => {
444
+ if (event.key === "Tab") {
445
+ isKeyboardTabbingRef.current = true;
446
+ } else {
447
+ onKeyDown(event);
448
+ }
449
+ },
409
450
  tabIndex: 0,
410
451
  role: "treeitem",
411
452
  "aria-label": ariaLabel,
@@ -607,6 +648,12 @@ var CommentBoard = ({
607
648
  ];
608
649
  const canResolve = thread.parent === 0;
609
650
  const moreActions = parent?.status !== "approved" ? actions.filter((item) => item.isEligible(thread)) : [];
651
+ const deleteConfirmMessage = (
652
+ // When deleting a top level note, descendants will also be deleted.
653
+ thread.parent === 0 ? __(
654
+ "Are you sure you want to delete this note? This will also delete all of this note's replies."
655
+ ) : __("Are you sure you want to delete this reply?")
656
+ );
610
657
  return /* @__PURE__ */ jsxs(
611
658
  VStack,
612
659
  {
@@ -667,14 +714,20 @@ var CommentBoard = ({
667
714
  )
668
715
  }
669
716
  ),
670
- /* @__PURE__ */ jsx(Menu.Popover, { children: moreActions.map((action) => /* @__PURE__ */ jsx(
671
- Menu.Item,
717
+ /* @__PURE__ */ jsx(
718
+ Menu.Popover,
672
719
  {
673
- onClick: () => action.onClick(),
674
- children: /* @__PURE__ */ jsx(Menu.ItemLabel, { children: action.title })
675
- },
676
- action.id
677
- )) })
720
+ modal: false,
721
+ children: moreActions.map((action) => /* @__PURE__ */ jsx(
722
+ Menu.Item,
723
+ {
724
+ onClick: () => action.onClick(),
725
+ children: /* @__PURE__ */ jsx(Menu.ItemLabel, { children: action.title })
726
+ },
727
+ action.id
728
+ ))
729
+ }
730
+ )
678
731
  ] })
679
732
  ] })
680
733
  }
@@ -733,9 +786,7 @@ var CommentBoard = ({
733
786
  onConfirm: handleConfirmDelete,
734
787
  onCancel: handleCancel,
735
788
  confirmButtonText: __("Delete"),
736
- children: __(
737
- "Are you sure you want to delete this note? This will also delete all of this note's replies."
738
- )
789
+ children: deleteConfirmMessage
739
790
  }
740
791
  )
741
792
  ]