builder-settings-types 0.0.224 → 0.0.229
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/base/drawable.d.ts +6 -0
- package/dist/base/settings-base.d.ts +7 -0
- package/dist/base/settings-group/settingsGroup.d.ts +100 -0
- package/dist/base/settings.d.ts +49 -0
- package/dist/builder-settings-types.cjs.js +44 -54
- package/dist/builder-settings-types.es.js +506 -616
- package/dist/groups/background-setting-set/backgroundSettingsSet.d.ts +19 -0
- package/dist/groups/borderSettingsSet.d.ts +24 -0
- package/dist/groups/headerTypographySettingsSet.d.ts +34 -0
- package/dist/groups/margin-setting-group/marginSettingGroup.d.ts +17 -0
- package/dist/groups/margin-setting-group/marginSettings.d.ts +16 -0
- package/dist/index.d.ts +30 -811
- package/dist/main.d.ts +1 -0
- package/dist/settings/align-settings/alignSettings.d.ts +9 -0
- package/dist/settings/animation-settings/animationSettings.d.ts +12 -0
- package/dist/settings/button-settings/buttonSettings.d.ts +16 -0
- package/dist/settings/color-settings/colorSettings.d.ts +23 -0
- package/dist/settings/color-with-opacity-settings/colorWithOpacitySettings.d.ts +33 -0
- package/dist/settings/gap-settings/gapSettings.d.ts +26 -0
- package/dist/settings/height-setting/heightSettings.d.ts +12 -0
- package/dist/settings/html-settings/htmlSettings.d.ts +18 -0
- package/dist/settings/html-settings/index.d.ts +1 -0
- package/dist/settings/margin-bottom-settings/marginBottomSettings.d.ts +8 -0
- package/dist/settings/margin-top-settings/marginTopSettings.d.ts +8 -0
- package/dist/settings/multi-language-settings/multiLanguageSettings.d.ts +32 -0
- package/dist/settings/number-settings/numberSettings.d.ts +25 -0
- package/dist/settings/opacity-settings/opacitySettings.d.ts +12 -0
- package/dist/settings/select-api/select-api.d.ts +37 -0
- package/dist/settings/select-settings/selectSettings.d.ts +41 -0
- package/dist/settings/size-setting/dimensionSettings.d.ts +38 -0
- package/dist/settings/string-settings/stringSettings.d.ts +14 -0
- package/dist/settings/toggle-settings/index.d.ts +1 -0
- package/dist/settings/toggle-settings/toggleSettings.d.ts +21 -0
- package/dist/settings/upload-image-settings/uploadImageSettings.d.ts +31 -0
- package/dist/settings/width-setting/widthSettings.d.ts +12 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/utils/deepClone.d.ts +1 -0
- package/dist/utils/nestingCalculator.d.ts +96 -0
- package/dist/utils/settingsTypes.d.ts +13 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,811 +1,30 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare interface AnimationSettingProps extends SettingProps<AnimationValue> {
|
|
33
|
-
title?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export declare type AnimationValue = "fade" | "slide" | "zoom" | "bounce" | "pulse" | "none";
|
|
37
|
-
|
|
38
|
-
export declare function asSettingGroupWithSettings<T extends Record<string, Setting<any, any> | SettingGroup<any>>>(settingGroup: SettingGroup<T>): SettingGroupWithSettings<T>;
|
|
39
|
-
|
|
40
|
-
export declare class BackgroundSettingSet extends SettingGroup<{
|
|
41
|
-
backgroundImage: UploadSetting;
|
|
42
|
-
opacity: OpacitySetting;
|
|
43
|
-
backgroundColor: ColorWithOpacitySetting;
|
|
44
|
-
}> {
|
|
45
|
-
/**
|
|
46
|
-
* Constructs a new BackgroundSettingSet.
|
|
47
|
-
*
|
|
48
|
-
* @param props An object that may include default values for each setting and additional
|
|
49
|
-
* properties for the UploadSetting via `uploadProps`.
|
|
50
|
-
*
|
|
51
|
-
* Example:
|
|
52
|
-
* {
|
|
53
|
-
* backgroundImage: 'https://example.com/myimage.png',
|
|
54
|
-
* opacity: 80,
|
|
55
|
-
* backgroundColor: "0, 0, 30",
|
|
56
|
-
* uploadProps: {
|
|
57
|
-
* uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
|
|
58
|
-
* requestMethod: 'POST',
|
|
59
|
-
* requestHeaders: {
|
|
60
|
-
* accept: 'text/plain',
|
|
61
|
-
* Authorization: 'bearer <your-token-here>',
|
|
62
|
-
* },
|
|
63
|
-
* formFieldName: 'File',
|
|
64
|
-
* parseResponse: (data) => data.data.url,
|
|
65
|
-
* }
|
|
66
|
-
* }
|
|
67
|
-
*/
|
|
68
|
-
constructor(props?: {
|
|
69
|
-
backgroundImage?: string;
|
|
70
|
-
opacity?: number;
|
|
71
|
-
backgroundColor?: string;
|
|
72
|
-
uploadProps?: UploadSettingProps;
|
|
73
|
-
collapsed?: boolean;
|
|
74
|
-
hideCondition?: () => boolean;
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* Override draw() to reorder the child settings and insert an "OR" label between the two sections.
|
|
78
|
-
*/
|
|
79
|
-
draw(): HTMLElement;
|
|
80
|
-
/**
|
|
81
|
-
* Helper method to generate CSS based on the current settings.
|
|
82
|
-
*/
|
|
83
|
-
getCssCode(): string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* A SettingGroup for configuring "Border" settings.
|
|
88
|
-
* It includes child settings for color, opacity, radius, and size.
|
|
89
|
-
* You can pass default values to override the internal defaults.
|
|
90
|
-
*/
|
|
91
|
-
export declare class BorderSettingSet extends SettingGroup<{
|
|
92
|
-
color: ColorWithOpacitySetting;
|
|
93
|
-
radius: NumberSetting;
|
|
94
|
-
size: NumberSetting;
|
|
95
|
-
}> {
|
|
96
|
-
constructor(defaults?: {
|
|
97
|
-
color?: string;
|
|
98
|
-
radius?: number;
|
|
99
|
-
size?: number;
|
|
100
|
-
collapsed?: boolean;
|
|
101
|
-
hideCondition?: () => boolean;
|
|
102
|
-
});
|
|
103
|
-
/**
|
|
104
|
-
* Optional helper to generate CSS from the current settings.
|
|
105
|
-
*/
|
|
106
|
-
getCssCode(): string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export declare class ButtonSetting extends Setting<void, ButtonSettingProps> {
|
|
110
|
-
inputType: InputTypes;
|
|
111
|
-
constructor(props: ButtonSettingProps);
|
|
112
|
-
bgWithAlpha: string;
|
|
113
|
-
draw(): HTMLElement;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export declare interface ButtonSettingProps extends SettingProps<void> {
|
|
117
|
-
label: string;
|
|
118
|
-
onClick?: () => void;
|
|
119
|
-
className?: string;
|
|
120
|
-
wrapperClassName?: string;
|
|
121
|
-
backgroundColor?: string;
|
|
122
|
-
textColor?: string;
|
|
123
|
-
borderColor?: string;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export declare class ColorSetting extends StringSetting {
|
|
127
|
-
inputType: InputTypes;
|
|
128
|
-
detectChange?: (value: string | undefined) => void;
|
|
129
|
-
private element;
|
|
130
|
-
private colorInputEl;
|
|
131
|
-
private textInputEl;
|
|
132
|
-
constructor(props: ColorSettingProps);
|
|
133
|
-
private static normalizeColorValue;
|
|
134
|
-
private static normalizeHexValue;
|
|
135
|
-
private static rgbToHexStatic;
|
|
136
|
-
setValue(newValue: string | undefined): void;
|
|
137
|
-
private hexToRgb;
|
|
138
|
-
draw(): HTMLElement;
|
|
139
|
-
getElement(): HTMLElement | null;
|
|
140
|
-
getNormalizedValue(): string;
|
|
141
|
-
isValidHex(): boolean;
|
|
142
|
-
toRgb(): string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export declare interface ColorSettingProps extends StringSettingsProps {
|
|
146
|
-
detectChange?: (value: string | undefined) => void;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export declare class ColorWithOpacitySetting extends Setting<string, ColorWithOpacitySettingProps> {
|
|
150
|
-
inputType: InputTypes;
|
|
151
|
-
detectChange?: (value: string | undefined) => void;
|
|
152
|
-
private element;
|
|
153
|
-
private colorInputEl;
|
|
154
|
-
private textInputEl;
|
|
155
|
-
private opacityInputEl;
|
|
156
|
-
private colorPreviewEl;
|
|
157
|
-
constructor(props?: ColorWithOpacitySettingProps);
|
|
158
|
-
private static normalizeHexWithOpacity;
|
|
159
|
-
private getRgbColor;
|
|
160
|
-
private getOpacityPercent;
|
|
161
|
-
private static combineColorOpacity;
|
|
162
|
-
setValue(newValue: string | undefined): void;
|
|
163
|
-
private updateInputElements;
|
|
164
|
-
private updateColorPreview;
|
|
165
|
-
private handleColorChange;
|
|
166
|
-
private handleTextInput;
|
|
167
|
-
private handleOpacityChange;
|
|
168
|
-
draw(): HTMLElement;
|
|
169
|
-
getElement(): HTMLElement | null;
|
|
170
|
-
getValue(): string | undefined;
|
|
171
|
-
getRgbaValue(): string;
|
|
172
|
-
getColorAndOpacity(): {
|
|
173
|
-
color: string;
|
|
174
|
-
opacity: number;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export declare interface ColorWithOpacitySettingProps extends SettingProps<string> {
|
|
179
|
-
detectChange?: (value: string | undefined) => void;
|
|
180
|
-
wrapperClassName?: string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export declare function createSettingGroup<T extends Record<string, Setting<any, any> | SettingGroup<any>>>(groupProps: SettingGroupProps<T>): SettingGroupWithSettings<T>;
|
|
184
|
-
|
|
185
|
-
export declare type DeepPartial<T> = {
|
|
186
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export declare type DeleteItemConfig<T> = {
|
|
190
|
-
keyPrefix?: string;
|
|
191
|
-
showDeleteButton?: boolean;
|
|
192
|
-
deleteButtonLabel?: string;
|
|
193
|
-
deleteButtonIconSvg?: string;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export declare class DimensionSetting extends Setting<DimensionValue, DimensionSettingProps> {
|
|
197
|
-
inputType: {
|
|
198
|
-
readonly width: "number";
|
|
199
|
-
readonly height: "number";
|
|
200
|
-
};
|
|
201
|
-
private widthSetting;
|
|
202
|
-
private heightSetting;
|
|
203
|
-
private minWidth;
|
|
204
|
-
private maxWidth?;
|
|
205
|
-
private minHeight;
|
|
206
|
-
private maxHeight?;
|
|
207
|
-
private locked;
|
|
208
|
-
private aspectRatio;
|
|
209
|
-
private isUpdating;
|
|
210
|
-
constructor(props?: DimensionSettingProps);
|
|
211
|
-
private handleWidthChange;
|
|
212
|
-
private handleHeightChange;
|
|
213
|
-
private toggleLock;
|
|
214
|
-
private getLockSVG;
|
|
215
|
-
setValue(newValue: DimensionValue): void;
|
|
216
|
-
draw(): HTMLElement;
|
|
217
|
-
isLocked(): boolean;
|
|
218
|
-
setLocked(locked: boolean): void;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export declare interface DimensionSettingProps extends SettingProps<DimensionValue> {
|
|
222
|
-
locked?: boolean;
|
|
223
|
-
minWidth?: number;
|
|
224
|
-
maxWidth?: number;
|
|
225
|
-
minHeight?: number;
|
|
226
|
-
maxHeight?: number;
|
|
227
|
-
width?: number;
|
|
228
|
-
height?: number;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export declare interface DimensionValue {
|
|
232
|
-
width: number;
|
|
233
|
-
height: number;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
declare type ExtractSettingGroupValues<T> = T extends SettingGroup<infer S> ? {
|
|
237
|
-
[K in keyof S]?: S[K] extends Setting<infer V, any> ? V : S[K] extends SettingGroup<any> ? ExtractSettingGroupValues<S[K]> : any;
|
|
238
|
-
} : never;
|
|
239
|
-
|
|
240
|
-
export declare class GapSetting extends Setting<number, GapSettingsProps> {
|
|
241
|
-
inputType: InputTypes;
|
|
242
|
-
private inputValues;
|
|
243
|
-
mobileValue?: number;
|
|
244
|
-
constructor(props?: GapSettingsProps);
|
|
245
|
-
draw(): HTMLElement;
|
|
246
|
-
private createGapInput;
|
|
247
|
-
private validateValue;
|
|
248
|
-
getMobileValue(): number | undefined;
|
|
249
|
-
setMobileValue(value: number | undefined): void;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export declare interface GapSettingsProps extends SettingProps<number> {
|
|
253
|
-
minValue?: number;
|
|
254
|
-
maxValue?: number;
|
|
255
|
-
step?: number;
|
|
256
|
-
suffix?: GapSuffix;
|
|
257
|
-
className?: string;
|
|
258
|
-
inputClassName?: string;
|
|
259
|
-
wrapperClassName?: string;
|
|
260
|
-
rowGap?: boolean;
|
|
261
|
-
columnGap?: boolean;
|
|
262
|
-
onBlur?: () => void;
|
|
263
|
-
mobile?: number;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export declare type GapSuffix = "px" | "em" | "rem" | "%" | "vh" | "vw" | "pt" | "none";
|
|
267
|
-
|
|
268
|
-
export declare interface HeaderTypographySettings {
|
|
269
|
-
title?: string;
|
|
270
|
-
colorDefault?: string;
|
|
271
|
-
showAlign?: boolean;
|
|
272
|
-
colorOpacityDefault?: number;
|
|
273
|
-
fontFamilyDefault?: string;
|
|
274
|
-
fontFamilyOptions?: SelectOption[];
|
|
275
|
-
fontFamilyGetOptions?: () => SelectOption[];
|
|
276
|
-
fontFamilyGetOptionsAsync?: () => Promise<SelectOption[]>;
|
|
277
|
-
fontWeightDefault?: string;
|
|
278
|
-
fontWeightOptions?: SelectOption[];
|
|
279
|
-
fontWeightGetOptions?: () => SelectOption[];
|
|
280
|
-
fontWeightGetOptionsAsync?: () => Promise<SelectOption[]>;
|
|
281
|
-
fontSizeDefault?: number;
|
|
282
|
-
alignDefault?: AlignValue;
|
|
283
|
-
collapsed?: boolean;
|
|
284
|
-
hideCondition?: () => boolean;
|
|
285
|
-
fontSizeMobileDefault?: number;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export declare class HeaderTypographySettingSet extends SettingGroup<{
|
|
289
|
-
color: ColorWithOpacitySetting;
|
|
290
|
-
fontFamily: SelectSetting<string>;
|
|
291
|
-
fontWeight: SelectSetting<string>;
|
|
292
|
-
fontSize: NumberSetting;
|
|
293
|
-
align?: AlignSetting_2;
|
|
294
|
-
}> {
|
|
295
|
-
constructor(props?: HeaderTypographySettings);
|
|
296
|
-
getCssCode(): string;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export declare class HeightSetting extends NumberSetting {
|
|
300
|
-
inputType: InputTypes;
|
|
301
|
-
mobileValue?: number;
|
|
302
|
-
constructor(props?: HeightSettingProps);
|
|
303
|
-
getMobileValue(): number | undefined;
|
|
304
|
-
setMobileValue(value: number | undefined): void;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export declare type HeightSettingProps = NumberSettingsProps & {
|
|
308
|
-
mobile?: number;
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
export declare class HtmlSetting extends Setting<string, HtmlSettingsProps> {
|
|
312
|
-
inputType: InputTypes;
|
|
313
|
-
private textareaEl?;
|
|
314
|
-
constructor(props?: HtmlSettingsProps);
|
|
315
|
-
setValue(newValue: string): void;
|
|
316
|
-
draw(): HTMLElement;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export declare interface HtmlSettingsProps extends SettingProps<string> {
|
|
320
|
-
maxLength?: number;
|
|
321
|
-
value?: string;
|
|
322
|
-
className?: string;
|
|
323
|
-
textareaClassName?: string;
|
|
324
|
-
wrapperClassName?: string;
|
|
325
|
-
rows?: number;
|
|
326
|
-
placeholder?: string;
|
|
327
|
-
onChange?: (value: string) => void;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export declare interface IChangable<T> {
|
|
331
|
-
setOnChange(onChange: (value: T) => void): void;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export declare interface IDrawable {
|
|
335
|
-
draw(): HTMLElement;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export declare type InferSettingsProps<T> = T extends {
|
|
339
|
-
getValues(): infer R;
|
|
340
|
-
} ? R : never;
|
|
341
|
-
|
|
342
|
-
declare type InputProps = {
|
|
343
|
-
iconClassName?: string;
|
|
344
|
-
labelClassName?: string;
|
|
345
|
-
value: any;
|
|
346
|
-
inputType: InputTypes;
|
|
347
|
-
title?: string;
|
|
348
|
-
icon?: string;
|
|
349
|
-
inputCustomizer?: (input: HTMLInputElement) => void;
|
|
350
|
-
inputClassName?: string;
|
|
351
|
-
wrapperClassName?: string;
|
|
352
|
-
placeholder?: string;
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
export declare type InputTypes = "number" | "text" | "select" | "color" | "date" | "button";
|
|
356
|
-
|
|
357
|
-
export declare function isSetting(value: any): value is Setting<any, any>;
|
|
358
|
-
|
|
359
|
-
export declare function isSettingGroup(value: any): value is SettingGroup<any>;
|
|
360
|
-
|
|
361
|
-
export declare function iterateSettings<T extends Record<string, Setting<any, any> | SettingGroup<any>>>(settings: T, callback: (key: string, setting: Setting<any, any> | SettingGroup<any>) => void): void;
|
|
362
|
-
|
|
363
|
-
export declare class MarginBottomSetting extends NumberSetting {
|
|
364
|
-
inputType: InputTypes;
|
|
365
|
-
constructor(props?: MarginBottomSettingsProps);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
export declare interface MarginBottomSettingsProps extends NumberSettingsProps {
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
declare class MarginNumberSetting extends Setting<number | 'auto' | undefined, MarginNumberSettingsProps> {
|
|
372
|
-
inputType: InputTypes;
|
|
373
|
-
constructor(props: MarginNumberSettingsProps);
|
|
374
|
-
draw(): HTMLElement;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
declare interface MarginNumberSettingsProps extends SettingProps<number | 'auto'> {
|
|
378
|
-
minValue?: number;
|
|
379
|
-
maxValue?: number;
|
|
380
|
-
className?: string;
|
|
381
|
-
inputClassName?: string;
|
|
382
|
-
wrapperClassName?: string;
|
|
383
|
-
suffix?: NumberSuffix;
|
|
384
|
-
default: number | 'auto';
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export declare class MarginSettingGroup extends SettingGroup<{
|
|
388
|
-
marginTop: MarginNumberSetting;
|
|
389
|
-
marginRight: MarginNumberSetting;
|
|
390
|
-
marginBottom: MarginNumberSetting;
|
|
391
|
-
marginLeft: MarginNumberSetting;
|
|
392
|
-
}> {
|
|
393
|
-
constructor(defaults?: {
|
|
394
|
-
marginTop?: number | 'auto';
|
|
395
|
-
marginRight?: number | 'auto';
|
|
396
|
-
marginBottom?: number | 'auto';
|
|
397
|
-
marginLeft?: number | 'auto';
|
|
398
|
-
collapsed?: boolean;
|
|
399
|
-
hideCondition?: () => boolean;
|
|
400
|
-
});
|
|
401
|
-
getCssCode(): string;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
export declare class MarginTopSetting extends NumberSetting {
|
|
405
|
-
inputType: InputTypes;
|
|
406
|
-
constructor(props?: MarginTopSettingsProps);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
export declare interface MarginTopSettingsProps extends NumberSettingsProps {
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
export declare class MultiLanguageSetting extends Setting<MultiLanguageValue, MultiLanguageSettingsProps> {
|
|
413
|
-
inputType: Record<keyof MultiLanguageValue, "text">;
|
|
414
|
-
private container;
|
|
415
|
-
private languagesContainer;
|
|
416
|
-
private addLanguageSelect;
|
|
417
|
-
private addButton;
|
|
418
|
-
private defaultLanguages;
|
|
419
|
-
constructor(props?: MultiLanguageSettingsProps);
|
|
420
|
-
private get availableLanguages();
|
|
421
|
-
private get usedLanguageCodes();
|
|
422
|
-
private get availableLanguageOptions();
|
|
423
|
-
private updateAddLanguageSelect;
|
|
424
|
-
private createLanguageRow;
|
|
425
|
-
private updateLanguageValue;
|
|
426
|
-
private removeLanguage;
|
|
427
|
-
private addLanguage;
|
|
428
|
-
private createAddLanguageSection;
|
|
429
|
-
draw(): HTMLElement;
|
|
430
|
-
setValue(value: MultiLanguageValue): void;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
export declare interface MultiLanguageSettingsProps extends SettingProps<MultiLanguageValue> {
|
|
434
|
-
availableLanguages?: Array<{
|
|
435
|
-
code: string;
|
|
436
|
-
name: string;
|
|
437
|
-
}>;
|
|
438
|
-
maxLanguages?: number;
|
|
439
|
-
placeholder?: string;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export declare interface MultiLanguageValue {
|
|
443
|
-
[languageCode: string]: string;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
export declare class NumberSetting extends Setting<number, NumberSettingsProps> {
|
|
447
|
-
inputType: InputTypes;
|
|
448
|
-
private inputElement;
|
|
449
|
-
mobileValue?: number;
|
|
450
|
-
constructor(props: NumberSettingsProps);
|
|
451
|
-
draw(): HTMLElement;
|
|
452
|
-
setValue(value: number | undefined): void;
|
|
453
|
-
private validateValue;
|
|
454
|
-
getMobileValue(): number | undefined;
|
|
455
|
-
setMobileValue(value: number | undefined): void;
|
|
456
|
-
private validateProps;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
export declare interface NumberSettingsProps extends SettingProps<number> {
|
|
460
|
-
minValue?: number;
|
|
461
|
-
maxValue?: number;
|
|
462
|
-
step?: number;
|
|
463
|
-
className?: string;
|
|
464
|
-
inputClassName?: string;
|
|
465
|
-
wrapperClassName?: string;
|
|
466
|
-
suffix?: NumberSuffix;
|
|
467
|
-
mobile?: number;
|
|
468
|
-
onBlur?: () => void;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export declare type NumberSuffix = "px" | "em" | "rem" | "%" | "vh" | "vw" | "pt" | "none";
|
|
472
|
-
|
|
473
|
-
export declare class OpacitySetting extends NumberSetting {
|
|
474
|
-
inputType: InputTypes;
|
|
475
|
-
mobileValue?: number;
|
|
476
|
-
constructor(props?: OpacitySettingProps);
|
|
477
|
-
getMobileValue(): number | undefined;
|
|
478
|
-
setMobileValue(value: number | undefined): void;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
export declare type OpacitySettingProps = NumberSettingsProps & {
|
|
482
|
-
mobile?: number;
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
export declare type Primitive = string | number | boolean | symbol | bigint | null | undefined;
|
|
486
|
-
|
|
487
|
-
export declare interface SelectApiOption {
|
|
488
|
-
name: string;
|
|
489
|
-
value: string | object;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
export declare interface SelectApiSettingProps<T = any> extends SettingProps<T> {
|
|
493
|
-
options?: SelectApiOption[];
|
|
494
|
-
getOptions?: () => SelectApiOption[];
|
|
495
|
-
getOptionsAsync?: () => Promise<SelectApiOption[]>;
|
|
496
|
-
loadingText?: string;
|
|
497
|
-
errorText?: string;
|
|
498
|
-
onChange?: (value: T) => void;
|
|
499
|
-
detectChange?: (value: T | undefined) => void;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
export declare class SelectApiSettings<T = any> extends Setting<T, SelectApiSettingProps<T>> {
|
|
503
|
-
inputType: T extends Primitive ? InputTypes : Record<keyof T, InputTypes>;
|
|
504
|
-
private _options;
|
|
505
|
-
private isOpen;
|
|
506
|
-
private selectedOptionIndex;
|
|
507
|
-
private optionsListEl;
|
|
508
|
-
private svgContainer;
|
|
509
|
-
private buttonEl;
|
|
510
|
-
private isLoading;
|
|
511
|
-
private container;
|
|
512
|
-
private hasInitializedOptions;
|
|
513
|
-
private detectChangeCallback?;
|
|
514
|
-
constructor(props?: SelectApiSettingProps<T>);
|
|
515
|
-
private initializeOptions;
|
|
516
|
-
private createOption;
|
|
517
|
-
draw(): HTMLElement;
|
|
518
|
-
getJson(excludeSelectSettings?: boolean): string;
|
|
519
|
-
private selectApiOption;
|
|
520
|
-
private updateOptionsList;
|
|
521
|
-
private updateButtonText;
|
|
522
|
-
setDetectChange(callback: (value: T | undefined) => void): void;
|
|
523
|
-
setValue(value: T): void;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
export declare interface SelectOption {
|
|
527
|
-
name: string;
|
|
528
|
-
value: string | object;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
export declare class SelectSetting<T = any> extends Setting<T, SelectSettingProps<T>> {
|
|
532
|
-
inputType: T extends Primitive ? InputTypes : Record<keyof T, InputTypes>;
|
|
533
|
-
private _options;
|
|
534
|
-
private isOpen;
|
|
535
|
-
private selectedOptionIndex;
|
|
536
|
-
private optionsListEl;
|
|
537
|
-
private svgContainer;
|
|
538
|
-
private buttonEl;
|
|
539
|
-
private isLoading;
|
|
540
|
-
private container;
|
|
541
|
-
private clickOutsideListener;
|
|
542
|
-
private resizeListener;
|
|
543
|
-
constructor(props?: SelectSettingProps<T>);
|
|
544
|
-
setValue(newValue: T): void;
|
|
545
|
-
private createOption;
|
|
546
|
-
draw(): HTMLElement;
|
|
547
|
-
/**
|
|
548
|
-
* Check if dropdown should be positioned above the button
|
|
549
|
-
*/
|
|
550
|
-
private checkDropdownPosition;
|
|
551
|
-
private selectOption;
|
|
552
|
-
/**
|
|
553
|
-
* Clean up dropdown positioning when closed
|
|
554
|
-
*/
|
|
555
|
-
private cleanupDropdownPosition;
|
|
556
|
-
private updateOptionsList;
|
|
557
|
-
private updateButtonText;
|
|
558
|
-
destroy(): void;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
export declare interface SelectSettingProps<T = any> extends SettingProps<T> {
|
|
562
|
-
options?: SelectOption[];
|
|
563
|
-
getOptions?: () => SelectOption[];
|
|
564
|
-
getOptionsAsync?: () => Promise<SelectOption[]>;
|
|
565
|
-
loadingText?: string;
|
|
566
|
-
placeholder?: string;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
export declare abstract class Setting<T, P extends SettingProps<T>> implements IDrawable, IChangable<T> {
|
|
570
|
-
protected props: P;
|
|
571
|
-
static DefaultUploadUrl: string;
|
|
572
|
-
static SetUploadUrl(url: string): void;
|
|
573
|
-
destroy(): void;
|
|
574
|
-
protected inputEl?: HTMLInputElement;
|
|
575
|
-
id: string;
|
|
576
|
-
value: T | undefined;
|
|
577
|
-
title: string | undefined;
|
|
578
|
-
desktop: T | undefined;
|
|
579
|
-
includeGetJson: boolean;
|
|
580
|
-
abstract inputType: T extends Primitive ? InputTypes : Record<keyof T, InputTypes>;
|
|
581
|
-
onChange: ((value: T) => void) | undefined;
|
|
582
|
-
onBlur: ((value: T) => void) | undefined;
|
|
583
|
-
constructor(props?: P);
|
|
584
|
-
setOnChange(onChange: (value: T) => void): Setting<T, P>;
|
|
585
|
-
setOnBlur(onBlur: (value: T) => void): Setting<T, P>;
|
|
586
|
-
setValue(newValue: T): void;
|
|
587
|
-
clone(): Setting<T, P>;
|
|
588
|
-
abstract draw(): HTMLElement;
|
|
589
|
-
createInput(props: InputProps): HTMLElement;
|
|
590
|
-
createLabel(title: string, className?: string): HTMLSpanElement;
|
|
591
|
-
createIcon(icon: string, className?: string): HTMLSpanElement;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
export declare class SettingGroup<T extends Record<string, Setting<any, any> | SettingGroup<any>>> implements IDrawable, IChangable<T> {
|
|
595
|
-
title: string;
|
|
596
|
-
settings: T;
|
|
597
|
-
description?: string;
|
|
598
|
-
icon?: string;
|
|
599
|
-
id: string;
|
|
600
|
-
onChange?: ((value: T) => void) | undefined;
|
|
601
|
-
onBlur?: () => void;
|
|
602
|
-
private isCollapsed;
|
|
603
|
-
private isMain;
|
|
604
|
-
private includeGetJson;
|
|
605
|
-
private elementRef;
|
|
606
|
-
private hideCondition?;
|
|
607
|
-
private static hiddenElements;
|
|
608
|
-
private isHidden;
|
|
609
|
-
private custom;
|
|
610
|
-
initialValues: Record<string, any>;
|
|
611
|
-
private changeTimeout;
|
|
612
|
-
private isHandlingChange;
|
|
613
|
-
private changeHandlers;
|
|
614
|
-
private blurTimeout;
|
|
615
|
-
private lastChangeTime;
|
|
616
|
-
private handleBlur;
|
|
617
|
-
private pendingBlurHandler;
|
|
618
|
-
private originalDefaultValues;
|
|
619
|
-
private nestingLevel;
|
|
620
|
-
private parentNestingLevel;
|
|
621
|
-
private addItemCfg?;
|
|
622
|
-
private deleteItemCfg?;
|
|
623
|
-
constructor(groupProps: SettingGroupProps<T>);
|
|
624
|
-
private propagateNestingLevel;
|
|
625
|
-
getNestingLevel(): number;
|
|
626
|
-
setNestingLevel(level: number): void;
|
|
627
|
-
private updateNestingStyles;
|
|
628
|
-
static hide(): void;
|
|
629
|
-
static show(): void;
|
|
630
|
-
setOnChange(onChange: (value: T) => void): SettingGroup<T>;
|
|
631
|
-
setOnBlur(onBlur: () => void): SettingGroup<T>;
|
|
632
|
-
private setupBlurHandlers;
|
|
633
|
-
cleanup(): void;
|
|
634
|
-
clone(): SettingGroupWithSettings<T>;
|
|
635
|
-
setValue(values: Record<string, any>): void;
|
|
636
|
-
/** Force UI refresh for all child settings */
|
|
637
|
-
private forceChildUIRefresh;
|
|
638
|
-
/** Attach change/blur bubbling for a newly added child */
|
|
639
|
-
private wireChild;
|
|
640
|
-
addSetting(key: string, setting: Setting<any, any> | SettingGroup<any>): void;
|
|
641
|
-
removeSetting(key: string): void;
|
|
642
|
-
private addDeleteButtonToElement;
|
|
643
|
-
private showDeleteConfirmation;
|
|
644
|
-
private getNextIndexFromPrefix;
|
|
645
|
-
calculateChanges(oldValues: Record<string, any>, newValues: Record<string, any>): Record<string, any>;
|
|
646
|
-
hide(): void;
|
|
647
|
-
show(): void;
|
|
648
|
-
getValues<K extends keyof T>(childKey?: K): any;
|
|
649
|
-
private getValuesForJson;
|
|
650
|
-
getDefaultValues<K extends keyof T>(childKey?: K): any;
|
|
651
|
-
getMobileValues<K extends keyof T>(childKey?: K): any;
|
|
652
|
-
setMobileValues(values: Record<string, any>): void;
|
|
653
|
-
resetDefault(): void;
|
|
654
|
-
draw(): HTMLElement;
|
|
655
|
-
collapse(): void;
|
|
656
|
-
expand(): void;
|
|
657
|
-
updateVisibility(): void;
|
|
658
|
-
toggle(): void;
|
|
659
|
-
getJson(): string;
|
|
660
|
-
setJson(jsonString: string): void;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
export declare type SettingGroupProps<T> = {
|
|
664
|
-
title: string;
|
|
665
|
-
settings: T;
|
|
666
|
-
id?: string;
|
|
667
|
-
collapsed?: boolean;
|
|
668
|
-
main?: boolean;
|
|
669
|
-
description?: string;
|
|
670
|
-
icon?: string;
|
|
671
|
-
hideCondition?: () => boolean;
|
|
672
|
-
onBlur?: () => void;
|
|
673
|
-
custom?: boolean;
|
|
674
|
-
parentNestingLevel?: number;
|
|
675
|
-
includeGetJson?: boolean;
|
|
676
|
-
addItem?: AddItemConfig<T>;
|
|
677
|
-
deleteItem?: DeleteItemConfig<T>;
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
export declare type SettingGroupWithSettings<T extends Record<string, Setting<any, any> | SettingGroup<any>>> = SettingGroup<T> & T;
|
|
681
|
-
|
|
682
|
-
export declare interface SettingProps<T> {
|
|
683
|
-
default?: T;
|
|
684
|
-
title?: string;
|
|
685
|
-
placeholder?: string;
|
|
686
|
-
icon?: string;
|
|
687
|
-
inputProps?: InputProps;
|
|
688
|
-
id?: string;
|
|
689
|
-
detectChange?: (value: T | undefined) => void;
|
|
690
|
-
includeGetJson?: boolean;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
export declare type SettingsToProps<T> = T extends SettingGroup<infer S> ? {
|
|
694
|
-
[K in keyof S]?: S[K] extends Setting<infer V, any> ? V : S[K] extends SettingGroup<any> ? ExtractSettingGroupValues<S[K]> : any;
|
|
695
|
-
} : never;
|
|
696
|
-
|
|
697
|
-
export declare type SettingsToPropsOptional<T> = DeepPartial<SettingsToProps<T>>;
|
|
698
|
-
|
|
699
|
-
export declare class StringSetting extends Setting<string, StringSettingsProps> {
|
|
700
|
-
inputType: InputTypes;
|
|
701
|
-
constructor(props?: StringSettingsProps);
|
|
702
|
-
draw(): HTMLElement;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
export declare interface StringSettingsProps extends SettingProps<string> {
|
|
706
|
-
maxLength?: number;
|
|
707
|
-
value?: string;
|
|
708
|
-
className?: string;
|
|
709
|
-
inputClassName?: string;
|
|
710
|
-
wrapperClassName?: string;
|
|
711
|
-
onChange?: (value: string) => void;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
export declare type TabGroupProps<T> = {
|
|
715
|
-
title: string;
|
|
716
|
-
settings: T;
|
|
717
|
-
id?: string;
|
|
718
|
-
collapsed?: boolean;
|
|
719
|
-
main?: boolean;
|
|
720
|
-
description?: string;
|
|
721
|
-
icon?: string;
|
|
722
|
-
hideCondition?: () => boolean;
|
|
723
|
-
onBlur?: () => void;
|
|
724
|
-
custom?: boolean;
|
|
725
|
-
parentNestingLevel?: number;
|
|
726
|
-
includeGetJson?: boolean;
|
|
727
|
-
};
|
|
728
|
-
|
|
729
|
-
declare class TabSettingGroup<T extends TabSettingsGroupGenericType> extends SettingGroup<T> {
|
|
730
|
-
private activeTabId;
|
|
731
|
-
private tabsContainer?;
|
|
732
|
-
private contentContainers?;
|
|
733
|
-
constructor(groupProps: TabGroupProps<T>);
|
|
734
|
-
getActiveTabId(): string;
|
|
735
|
-
switchToTab(tabId: string): void;
|
|
736
|
-
private updateTabUI;
|
|
737
|
-
draw(): HTMLElement;
|
|
738
|
-
}
|
|
739
|
-
export { TabSettingGroup }
|
|
740
|
-
export { TabSettingGroup as TabsSettingGroup }
|
|
741
|
-
|
|
742
|
-
export declare type TabSettingsGroupGenericType = Record<string, SettingGroup<any>>;
|
|
743
|
-
|
|
744
|
-
export declare class Toggle extends Setting<string, ToggleSettingProps> {
|
|
745
|
-
inputType: InputTypes;
|
|
746
|
-
private detectChangeCallback?;
|
|
747
|
-
constructor(props: ToggleSettingProps);
|
|
748
|
-
draw(): HTMLElement;
|
|
749
|
-
setDetectChange(callback: (value: string | undefined) => void): void;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
export declare interface ToggleSettingProps extends SettingProps<string> {
|
|
753
|
-
title?: string;
|
|
754
|
-
icon?: string;
|
|
755
|
-
default?: string;
|
|
756
|
-
options?: ToggleValue[];
|
|
757
|
-
activeColor?: string;
|
|
758
|
-
inactiveColor?: string;
|
|
759
|
-
detectChange?: (value: string | undefined) => void;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
export declare interface ToggleValue {
|
|
763
|
-
value: string;
|
|
764
|
-
status: boolean;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
export declare class UploadSetting extends Setting<string, UploadSettingProps> {
|
|
768
|
-
inputType: InputTypes;
|
|
769
|
-
private previewWrapper;
|
|
770
|
-
private previewEl;
|
|
771
|
-
private emptyStateEl;
|
|
772
|
-
private errorContainer;
|
|
773
|
-
private messageListener;
|
|
774
|
-
private loadingSpinner;
|
|
775
|
-
constructor(props?: UploadSettingProps);
|
|
776
|
-
private setupMessageListener;
|
|
777
|
-
private cleanupMessageListener;
|
|
778
|
-
destroy(): void;
|
|
779
|
-
private showError;
|
|
780
|
-
private hideError;
|
|
781
|
-
private showLoading;
|
|
782
|
-
private hideLoading;
|
|
783
|
-
private validateFileSize;
|
|
784
|
-
private updatePreviewState;
|
|
785
|
-
draw(): HTMLElement;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
export declare interface UploadSettingProps extends SettingProps<string> {
|
|
789
|
-
defaultUrl?: string;
|
|
790
|
-
delete?: boolean;
|
|
791
|
-
uploadUrl?: string;
|
|
792
|
-
requestMethod?: string;
|
|
793
|
-
requestHeaders?: Record<string, string>;
|
|
794
|
-
formFieldName?: string;
|
|
795
|
-
parseResponse?: (responseData: any) => string;
|
|
796
|
-
maxFileSizeMB?: number;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
export declare class WidthSetting extends NumberSetting {
|
|
800
|
-
inputType: InputTypes;
|
|
801
|
-
mobileValue?: number;
|
|
802
|
-
constructor(props?: WidthSettingProps);
|
|
803
|
-
getMobileValue(): number | undefined;
|
|
804
|
-
setMobileValue(value: number | undefined): void;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
export declare type WidthSettingProps = NumberSettingsProps & {
|
|
808
|
-
mobile?: number;
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
export { }
|
|
1
|
+
export * from './base/settings-group/settingsGroup';
|
|
2
|
+
export { TabSettingGroup } from './base/settings-group/settingsGroup';
|
|
3
|
+
export { TabSettingGroup as TabsSettingGroup } from './base/settings-group/settingsGroup';
|
|
4
|
+
export * from './base/drawable';
|
|
5
|
+
export * from './base/settings';
|
|
6
|
+
export * from './settings/color-settings/colorSettings';
|
|
7
|
+
export * from './settings/color-with-opacity-settings/colorWithOpacitySettings';
|
|
8
|
+
export * from './settings/html-settings/htmlSettings';
|
|
9
|
+
export * from './settings/number-settings/numberSettings';
|
|
10
|
+
export * from './settings/string-settings/stringSettings';
|
|
11
|
+
export * from './settings/opacity-settings/opacitySettings';
|
|
12
|
+
export * from './settings/select-settings/selectSettings';
|
|
13
|
+
export * from './settings/align-settings/alignSettings';
|
|
14
|
+
export * from './settings/button-settings/buttonSettings';
|
|
15
|
+
export * from './settings/size-setting/dimensionSettings';
|
|
16
|
+
export * from './settings/upload-image-settings/uploadImageSettings';
|
|
17
|
+
export * from './settings/height-setting/heightSettings';
|
|
18
|
+
export * from './settings/width-setting/widthSettings';
|
|
19
|
+
export * from './settings/select-api/select-api';
|
|
20
|
+
export * from './settings/toggle-settings/toggleSettings';
|
|
21
|
+
export * from './settings/gap-settings/gapSettings';
|
|
22
|
+
export * from './settings/margin-bottom-settings/marginBottomSettings';
|
|
23
|
+
export * from './settings/margin-top-settings/marginTopSettings';
|
|
24
|
+
export * from './settings/multi-language-settings/multiLanguageSettings';
|
|
25
|
+
export * from './settings/animation-settings/animationSettings';
|
|
26
|
+
export * from './groups/borderSettingsSet';
|
|
27
|
+
export * from './groups/headerTypographySettingsSet';
|
|
28
|
+
export * from './groups/margin-setting-group/marginSettingGroup';
|
|
29
|
+
export * from './groups/background-setting-set/backgroundSettingsSet';
|
|
30
|
+
export * from './utils/settingsTypes';
|