builder-settings-types 0.0.219 → 0.0.223

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.ts CHANGED
@@ -4,6 +4,9 @@ export declare type AddItemConfig<T> = {
4
4
  keyPrefix: string;
5
5
  createItem: (index: number) => Setting<any, any> | SettingGroup<any>;
6
6
  expandNewItem?: boolean;
7
+ showDeleteButton?: boolean;
8
+ deleteButtonLabel?: string;
9
+ deleteButtonIconSvg?: string;
7
10
  };
8
11
 
9
12
  declare class AlignSetting_2 extends Setting<AlignValue, AlignSettingProps> {
@@ -183,6 +186,13 @@ export declare type DeepPartial<T> = {
183
186
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
184
187
  };
185
188
 
189
+ export declare type DeleteItemConfig<T> = {
190
+ keyPrefix?: string;
191
+ showDeleteButton?: boolean;
192
+ deleteButtonLabel?: string;
193
+ deleteButtonIconSvg?: string;
194
+ };
195
+
186
196
  export declare class DimensionSetting extends Setting<DimensionValue, DimensionSettingProps> {
187
197
  inputType: {
188
198
  readonly width: "number";
@@ -609,6 +619,7 @@ export declare class SettingGroup<T extends Record<string, Setting<any, any> | S
609
619
  private nestingLevel;
610
620
  private parentNestingLevel;
611
621
  private addItemCfg?;
622
+ private deleteItemCfg?;
612
623
  constructor(groupProps: SettingGroupProps<T>);
613
624
  private propagateNestingLevel;
614
625
  getNestingLevel(): number;
@@ -627,6 +638,9 @@ export declare class SettingGroup<T extends Record<string, Setting<any, any> | S
627
638
  /** Attach change/blur bubbling for a newly added child */
628
639
  private wireChild;
629
640
  addSetting(key: string, setting: Setting<any, any> | SettingGroup<any>): void;
641
+ removeSetting(key: string): void;
642
+ private addDeleteButtonToElement;
643
+ private showDeleteConfirmation;
630
644
  private getNextIndexFromPrefix;
631
645
  calculateChanges(oldValues: Record<string, any>, newValues: Record<string, any>): Record<string, any>;
632
646
  hide(): void;
@@ -660,6 +674,7 @@ export declare type SettingGroupProps<T> = {
660
674
  parentNestingLevel?: number;
661
675
  includeGetJson?: boolean;
662
676
  addItem?: AddItemConfig<T>;
677
+ deleteItem?: DeleteItemConfig<T>;
663
678
  };
664
679
 
665
680
  export declare type SettingGroupWithSettings<T extends Record<string, Setting<any, any> | SettingGroup<any>>> = SettingGroup<T> & T;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "builder-settings-types",
3
3
  "description": "builder settings",
4
- "version": "0.0.219",
4
+ "version": "0.0.223",
5
5
  "type": "module",
6
6
  "main": "dist/builder-settings-types.cjs.js",
7
7
  "module": "dist/builder-settings-types.es.js",