@elementor/editor-editing-panel 4.4.0-1067 → 4.4.0-1069

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/dist/index.js CHANGED
@@ -6172,8 +6172,12 @@ var import_editor_elements20 = require("@elementor/editor-elements");
6172
6172
  var import_editor_props20 = require("@elementor/editor-props");
6173
6173
  var import_i18n71 = require("@wordpress/i18n");
6174
6174
  var LIST_ITEM_ELEMENT_TYPE = "e-list-item";
6175
+ var LIST_ITEM_MARKER_ELEMENT_TYPE = "e-list-item-marker";
6176
+ var LIST_ITEM_CONTENT_ELEMENT_TYPE = "e-list-item-content";
6177
+ var PARAGRAPH_WIDGET_TYPE2 = "e-paragraph";
6178
+ var SVG_WIDGET_TYPE = "e-svg";
6175
6179
  var TRAILING_NUMBER2 = /(\d+)\s*$/;
6176
- var getItemTitle2 = (position) => `Item ${position}`;
6180
+ var getItemTitle2 = (position) => `List item ${position}`;
6177
6181
  var getNextItemNumber2 = (existingTitles) => {
6178
6182
  const taken = new Set(existingTitles.filter((title) => Boolean(title)));
6179
6183
  const highest = existingTitles.reduce((max, title) => {
@@ -6187,6 +6191,55 @@ var getNextItemNumber2 = (existingTitles) => {
6187
6191
  }
6188
6192
  return next;
6189
6193
  };
6194
+ var buildItemModel2 = (position, showMarkers) => {
6195
+ const itemTitle = getItemTitle2(position);
6196
+ return {
6197
+ elType: LIST_ITEM_ELEMENT_TYPE,
6198
+ id: (0, import_editor_elements20.generateElementId)(),
6199
+ settings: {
6200
+ show_markers: import_editor_props20.booleanPropTypeUtil.create(showMarkers)
6201
+ },
6202
+ editor_settings: {
6203
+ title: itemTitle,
6204
+ initial_position: position
6205
+ },
6206
+ elements: [
6207
+ {
6208
+ elType: LIST_ITEM_MARKER_ELEMENT_TYPE,
6209
+ id: (0, import_editor_elements20.generateElementId)(),
6210
+ editor_settings: {
6211
+ title: (0, import_i18n71.__)("Marker", "elementor")
6212
+ },
6213
+ elements: [
6214
+ {
6215
+ elType: "widget",
6216
+ widgetType: SVG_WIDGET_TYPE,
6217
+ id: (0, import_editor_elements20.generateElementId)(),
6218
+ elements: []
6219
+ }
6220
+ ]
6221
+ },
6222
+ {
6223
+ elType: LIST_ITEM_CONTENT_ELEMENT_TYPE,
6224
+ id: (0, import_editor_elements20.generateElementId)(),
6225
+ editor_settings: {
6226
+ title: (0, import_i18n71.__)("Content", "elementor")
6227
+ },
6228
+ elements: [
6229
+ {
6230
+ elType: "widget",
6231
+ widgetType: PARAGRAPH_WIDGET_TYPE2,
6232
+ id: (0, import_editor_elements20.generateElementId)(),
6233
+ elements: [],
6234
+ settings: {
6235
+ paragraph: import_editor_props20.escapedHtmlPropTypeUtil.create(itemTitle)
6236
+ }
6237
+ }
6238
+ ]
6239
+ }
6240
+ ]
6241
+ };
6242
+ };
6190
6243
  var duplicateItem = ({ items: items3 }) => {
6191
6244
  (0, import_editor_elements20.duplicateElements)({
6192
6245
  elementIds: items3.map(({ item }) => item.id),
@@ -6238,17 +6291,7 @@ var addItem = ({
6238
6291
  elements: [
6239
6292
  {
6240
6293
  container: listContainer,
6241
- model: {
6242
- elType: LIST_ITEM_ELEMENT_TYPE,
6243
- settings: {
6244
- show_markers: import_editor_props20.booleanPropTypeUtil.create(showMarkers)
6245
- },
6246
- hydrateDefaultChildren: true,
6247
- editor_settings: {
6248
- title: getItemTitle2(position),
6249
- initial_position: position
6250
- }
6251
- },
6294
+ model: buildItemModel2(position, showMarkers),
6252
6295
  options: { at: index }
6253
6296
  }
6254
6297
  ]
@@ -6327,7 +6370,7 @@ var getEffectiveListItemLabel = (label, fallbackLabel) => {
6327
6370
  return label?.trim() ? label : fallbackLabel;
6328
6371
  };
6329
6372
  var getDefaultListItemLabel = (index) => {
6330
- return `Item ${index + 1}`;
6373
+ return `List item ${index + 1}`;
6331
6374
  };
6332
6375
  var ListItemsControl = ({ label }) => {
6333
6376
  return /* @__PURE__ */ React96.createElement(ListItemsControlContent, { label });
@@ -6381,7 +6424,7 @@ var ListItemsControlContent = ({ label }) => {
6381
6424
  adornment: () => null,
6382
6425
  itemSettings: {
6383
6426
  getId: ({ item }) => item.id,
6384
- initialValues: { id: "", title: "Item" },
6427
+ initialValues: { id: "", title: "List item" },
6385
6428
  Label: ItemLabel2,
6386
6429
  Content: ItemContent2,
6387
6430
  Icon: () => null