@elementor/editor-editing-panel 3.33.0-202 → 3.33.0-204

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.d.mts CHANGED
@@ -380,7 +380,7 @@ declare const controlTypes: {
380
380
  };
381
381
  };
382
382
  readonly size: {
383
- readonly component: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, }: Omit<({
383
+ readonly component: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, isRepeaterControl, }: Omit<({
384
384
  placeholder?: string;
385
385
  startIcon?: react.ReactNode;
386
386
  extendedOptions?: _elementor_editor_controls.ExtendedOption[];
@@ -390,6 +390,7 @@ declare const controlTypes: {
390
390
  enablePropTypeUnits?: boolean;
391
391
  id?: string;
392
392
  ariaLabel?: string;
393
+ isRepeaterControl?: boolean;
393
394
  } & {
394
395
  units?: ("em" | "px" | "%" | "rem" | "vw" | "vh")[] | undefined;
395
396
  defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | undefined;
@@ -405,6 +406,7 @@ declare const controlTypes: {
405
406
  enablePropTypeUnits?: boolean;
406
407
  id?: string;
407
408
  ariaLabel?: string;
409
+ isRepeaterControl?: boolean;
408
410
  } & {
409
411
  units?: ("deg" | "rad" | "grad" | "turn")[] | undefined;
410
412
  defaultUnit?: "deg" | "rad" | "grad" | "turn" | undefined;
@@ -420,6 +422,7 @@ declare const controlTypes: {
420
422
  enablePropTypeUnits?: boolean;
421
423
  id?: string;
422
424
  ariaLabel?: string;
425
+ isRepeaterControl?: boolean;
423
426
  } & {
424
427
  units?: ("s" | "ms")[] | undefined;
425
428
  defaultUnit?: "s" | "ms" | undefined;
package/dist/index.d.ts CHANGED
@@ -380,7 +380,7 @@ declare const controlTypes: {
380
380
  };
381
381
  };
382
382
  readonly size: {
383
- readonly component: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, }: Omit<({
383
+ readonly component: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, enablePropTypeUnits, id, ariaLabel, isRepeaterControl, }: Omit<({
384
384
  placeholder?: string;
385
385
  startIcon?: react.ReactNode;
386
386
  extendedOptions?: _elementor_editor_controls.ExtendedOption[];
@@ -390,6 +390,7 @@ declare const controlTypes: {
390
390
  enablePropTypeUnits?: boolean;
391
391
  id?: string;
392
392
  ariaLabel?: string;
393
+ isRepeaterControl?: boolean;
393
394
  } & {
394
395
  units?: ("em" | "px" | "%" | "rem" | "vw" | "vh")[] | undefined;
395
396
  defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | undefined;
@@ -405,6 +406,7 @@ declare const controlTypes: {
405
406
  enablePropTypeUnits?: boolean;
406
407
  id?: string;
407
408
  ariaLabel?: string;
409
+ isRepeaterControl?: boolean;
408
410
  } & {
409
411
  units?: ("deg" | "rad" | "grad" | "turn")[] | undefined;
410
412
  defaultUnit?: "deg" | "rad" | "grad" | "turn" | undefined;
@@ -420,6 +422,7 @@ declare const controlTypes: {
420
422
  enablePropTypeUnits?: boolean;
421
423
  id?: string;
422
424
  ariaLabel?: string;
425
+ isRepeaterControl?: boolean;
423
426
  } & {
424
427
  units?: ("s" | "ms")[] | undefined;
425
428
  defaultUnit?: "s" | "ms" | undefined;
package/dist/index.js CHANGED
@@ -4841,11 +4841,21 @@ var StyledContainer = (0, import_ui42.styled)(import_ui42.Box, {
4841
4841
  }));
4842
4842
  var getGridLayout = (layout) => ({
4843
4843
  justifyContent: "space-between",
4844
- gridTemplateColumns: {
4845
- full: "minmax(0, 1fr)",
4846
- "two-columns": "repeat(2, minmax(0, 1fr))"
4847
- }[layout]
4844
+ ...getStyleByLayout(layout)
4848
4845
  });
4846
+ var getStyleByLayout = (layout) => {
4847
+ if (layout === "full") {
4848
+ return {
4849
+ gridTemplateColumns: "minmax(0, 1fr)"
4850
+ };
4851
+ }
4852
+ if (layout === "two-columns") {
4853
+ return {
4854
+ alignItems: "center",
4855
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))"
4856
+ };
4857
+ }
4858
+ };
4849
4859
 
4850
4860
  // src/controls-registry/settings-field.tsx
4851
4861
  var React87 = __toESM(require("react"));
@@ -5257,31 +5267,31 @@ var import_editor_elements16 = require("@elementor/editor-elements");
5257
5267
  var import_editor_props16 = require("@elementor/editor-props");
5258
5268
  var import_i18n63 = require("@wordpress/i18n");
5259
5269
  var TAB_ELEMENT_TYPE = "e-tab";
5260
- var TAB_PANEL_ELEMENT_TYPE = "e-tab-panel";
5270
+ var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
5261
5271
  var duplicateItem = ({ items: items3 }) => {
5262
5272
  items3.forEach(({ item }) => {
5263
5273
  const tabId = item.id;
5264
- const { value: tabPanelId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-panel-id") ?? {};
5265
- if (!tabPanelId) {
5266
- throw new Error("Original panel ID is required for duplication");
5274
+ const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-content-id") ?? {};
5275
+ if (!tabContentId) {
5276
+ throw new Error("Original content ID is required for duplication");
5267
5277
  }
5268
5278
  (0, import_editor_elements16.duplicateElements)({
5269
- elementIds: [tabId, tabPanelId],
5279
+ elementIds: [tabId, tabContentId],
5270
5280
  title: (0, import_i18n63.__)("Duplicate Tab", "elementor"),
5271
5281
  onCreate: (duplicatedElements) => {
5272
5282
  const tab = duplicatedElements.find((element) => element.originalElementId === tabId);
5273
- const tabPanel = duplicatedElements.find((element) => element.originalElementId === tabPanelId);
5274
- if (tabPanel && tab) {
5283
+ const tabContent = duplicatedElements.find((element) => element.originalElementId === tabContentId);
5284
+ if (tabContent && tab) {
5275
5285
  (0, import_editor_elements16.updateElementSettings)({
5276
5286
  withHistory: false,
5277
5287
  id: tab.id,
5278
5288
  props: {
5279
- "tab-panel-id": import_editor_props16.stringPropTypeUtil.create(tabPanel.id)
5289
+ "tab-content-id": import_editor_props16.stringPropTypeUtil.create(tabContent.id)
5280
5290
  }
5281
5291
  });
5282
5292
  (0, import_editor_elements16.updateElementSettings)({
5283
5293
  withHistory: false,
5284
- id: tabPanel.id,
5294
+ id: tabContent.id,
5285
5295
  props: {
5286
5296
  "tab-id": import_editor_props16.stringPropTypeUtil.create(tab.id)
5287
5297
  }
@@ -5293,12 +5303,12 @@ var duplicateItem = ({ items: items3 }) => {
5293
5303
  };
5294
5304
  var moveItem = ({
5295
5305
  toIndex,
5296
- tabListId,
5297
- tabContentId,
5306
+ tabsMenuId,
5307
+ tabContentAreaId,
5298
5308
  movedElementId
5299
5309
  }) => {
5300
- const { value: tabPanelId } = (0, import_editor_elements16.getElementSetting)(movedElementId, "tab-panel-id") ?? {};
5301
- if (!tabPanelId) {
5310
+ const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(movedElementId, "tab-content-id") ?? {};
5311
+ if (!tabContentId) {
5302
5312
  throw new Error("Required tab elements not found for reordering");
5303
5313
  }
5304
5314
  (0, import_editor_elements16.moveElements)({
@@ -5306,12 +5316,12 @@ var moveItem = ({
5306
5316
  moves: [
5307
5317
  {
5308
5318
  elementId: movedElementId,
5309
- targetContainerId: tabListId,
5319
+ targetContainerId: tabsMenuId,
5310
5320
  options: { at: toIndex }
5311
5321
  },
5312
5322
  {
5313
- elementId: tabPanelId,
5314
- targetContainerId: tabContentId,
5323
+ elementId: tabContentId,
5324
+ targetContainerId: tabContentAreaId,
5315
5325
  options: { at: toIndex }
5316
5326
  }
5317
5327
  ]
@@ -5322,46 +5332,46 @@ var removeItem = ({ items: items3 }) => {
5322
5332
  title: (0, import_i18n63.__)("Tabs", "elementor"),
5323
5333
  elementIds: items3.flatMap(({ item }) => {
5324
5334
  const tabId = item.id;
5325
- const { value: panelId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-panel-id") ?? {};
5326
- if (!panelId) {
5327
- throw new Error("Pane ID is required");
5335
+ const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-content-id") ?? {};
5336
+ if (!tabContentId) {
5337
+ throw new Error("Content ID is required");
5328
5338
  }
5329
- return [tabId, panelId];
5339
+ return [tabId, tabContentId];
5330
5340
  })
5331
5341
  });
5332
5342
  };
5333
5343
  var addItem = ({
5334
- tabContentId,
5335
- tabListId,
5344
+ tabContentAreaId,
5345
+ tabsMenuId,
5336
5346
  items: items3
5337
5347
  }) => {
5338
5348
  items3.forEach(({ item, index }) => {
5339
- const newTabPanelId = (0, import_editor_elements16.generateElementId)();
5349
+ const newTabContentId = (0, import_editor_elements16.generateElementId)();
5340
5350
  const newTabId = (0, import_editor_elements16.generateElementId)();
5341
5351
  (0, import_editor_elements16.createElements)({
5342
5352
  title: (0, import_i18n63.__)("Tabs", "elementor"),
5343
5353
  elements: [
5344
5354
  {
5345
- containerId: tabContentId,
5355
+ containerId: tabContentAreaId,
5346
5356
  model: {
5347
- id: newTabPanelId,
5348
- elType: TAB_PANEL_ELEMENT_TYPE,
5357
+ id: newTabContentId,
5358
+ elType: TAB_CONTENT_ELEMENT_TYPE,
5349
5359
  settings: {
5350
5360
  "tab-id": import_editor_props16.stringPropTypeUtil.create(newTabId)
5351
5361
  },
5352
- editor_settings: { title: `Tab ${index + 1} panel` }
5362
+ editor_settings: { title: `Tab ${index + 1} content` }
5353
5363
  }
5354
5364
  },
5355
5365
  {
5356
- containerId: tabListId,
5366
+ containerId: tabsMenuId,
5357
5367
  model: {
5358
5368
  id: newTabId,
5359
5369
  elType: TAB_ELEMENT_TYPE,
5360
5370
  settings: {
5361
5371
  ...item,
5362
- "tab-panel-id": import_editor_props16.stringPropTypeUtil.create(newTabPanelId)
5372
+ "tab-content-id": import_editor_props16.stringPropTypeUtil.create(newTabContentId)
5363
5373
  },
5364
- editor_settings: { title: `Tab ${index + 1}` }
5374
+ editor_settings: { title: `Tab ${index + 1} trigger` }
5365
5375
  }
5366
5376
  }
5367
5377
  ]
@@ -5370,16 +5380,16 @@ var addItem = ({
5370
5380
  };
5371
5381
 
5372
5382
  // src/controls-registry/element-controls/tabs-control/tabs-control.tsx
5373
- var TAB_LIST_ELEMENT_TYPE = "e-tabs-list";
5374
- var TAB_CONTENT_ELEMENT_TYPE = "e-tabs-content";
5383
+ var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
5384
+ var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
5375
5385
  var TabsControl = ({ label }) => {
5376
5386
  const { element } = useElement();
5377
5387
  const { [TAB_ELEMENT_TYPE]: tabLinks } = (0, import_editor_elements17.useElementChildren)(element.id, [
5378
5388
  TAB_ELEMENT_TYPE,
5379
- TAB_PANEL_ELEMENT_TYPE
5389
+ TAB_CONTENT_ELEMENT_TYPE
5380
5390
  ]);
5381
- const tabList = getElementByType(element.id, TAB_LIST_ELEMENT_TYPE);
5382
- const tabContent = getElementByType(element.id, TAB_CONTENT_ELEMENT_TYPE);
5391
+ const tabList = getElementByType(element.id, TAB_MENU_ELEMENT_TYPE);
5392
+ const tabContentArea = getElementByType(element.id, TAB_CONTENT_AREA_ELEMENT_TYPE);
5383
5393
  const repeaterValues = tabLinks.map((tabLink) => {
5384
5394
  const { title: titleSetting } = (0, import_editor_elements17.getElementEditorSettings)(tabLink.id) ?? {};
5385
5395
  return {
@@ -5390,7 +5400,7 @@ var TabsControl = ({ label }) => {
5390
5400
  const setValue = (_newValues, _options, meta) => {
5391
5401
  if (meta?.action?.type === "add") {
5392
5402
  const items3 = meta.action.payload;
5393
- return addItem({ tabContentId: tabContent.id, items: items3, tabListId: tabList.id });
5403
+ return addItem({ tabContentAreaId: tabContentArea.id, items: items3, tabsMenuId: tabList.id });
5394
5404
  }
5395
5405
  if (meta?.action?.type === "remove") {
5396
5406
  const items3 = meta.action.payload;
@@ -5404,8 +5414,8 @@ var TabsControl = ({ label }) => {
5404
5414
  const { from, to } = meta.action.payload;
5405
5415
  return moveItem({
5406
5416
  toIndex: to,
5407
- tabListId: tabList.id,
5408
- tabContentId: tabContent.id,
5417
+ tabsMenuId: tabList.id,
5418
+ tabContentAreaId: tabContentArea.id,
5409
5419
  movedElementId: tabLinks[from].id
5410
5420
  });
5411
5421
  }