@elementor/editor-controls 4.1.0-781 → 4.1.0-782

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
@@ -358,9 +358,10 @@ type RepeatableControlProps = {
358
358
  patternLabel?: string;
359
359
  placeholder?: string;
360
360
  propKey?: string;
361
+ isSortable?: boolean;
361
362
  addItemTooltipProps?: TooltipAddItemActionProps;
362
363
  };
363
- declare const RepeatableControl: ControlComponent$1<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
364
+ declare const RepeatableControl: ControlComponent$1<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, isSortable, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
364
365
 
365
366
  type KeyValueControlProps = {
366
367
  keyName?: string;
package/dist/index.d.ts CHANGED
@@ -358,9 +358,10 @@ type RepeatableControlProps = {
358
358
  patternLabel?: string;
359
359
  placeholder?: string;
360
360
  propKey?: string;
361
+ isSortable?: boolean;
361
362
  addItemTooltipProps?: TooltipAddItemActionProps;
362
363
  };
363
- declare const RepeatableControl: ControlComponent$1<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
364
+ declare const RepeatableControl: ControlComponent$1<({ repeaterLabel, childControlConfig, showDuplicate, showToggle, initialValues, patternLabel, placeholder, propKey, isSortable, addItemTooltipProps, }: RepeatableControlProps) => React$1.JSX.Element | null>;
364
365
 
365
366
  type KeyValueControlProps = {
366
367
  keyName?: string;
package/dist/index.js CHANGED
@@ -5741,6 +5741,7 @@ var RepeatableControl = createControl(
5741
5741
  patternLabel,
5742
5742
  placeholder,
5743
5743
  propKey,
5744
+ isSortable,
5744
5745
  addItemTooltipProps
5745
5746
  }) => {
5746
5747
  const { propTypeUtil: childPropTypeUtil, isItemDisabled: isItemDisabled2 } = childControlConfig;
@@ -5760,6 +5761,7 @@ var RepeatableControl = createControl(
5760
5761
  [childControlConfig, placeholder, patternLabel]
5761
5762
  );
5762
5763
  const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
5764
+ const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
5763
5765
  return /* @__PURE__ */ React87.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React87.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React87.createElement(
5764
5766
  ControlRepeater,
5765
5767
  {
@@ -5771,11 +5773,11 @@ var RepeatableControl = createControl(
5771
5773
  TooltipAddItemAction,
5772
5774
  {
5773
5775
  ...addItemTooltipProps,
5774
- newItemIndex: 0,
5776
+ newItemIndex,
5775
5777
  ariaLabel: repeaterLabel
5776
5778
  }
5777
5779
  )),
5778
- /* @__PURE__ */ React87.createElement(ItemsContainer, { isSortable: false }, /* @__PURE__ */ React87.createElement(
5780
+ /* @__PURE__ */ React87.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React87.createElement(
5779
5781
  Item,
5780
5782
  {
5781
5783
  Icon: ItemIcon3,