lkt-vue-kernel 1.0.20 → 1.0.22
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 +285 -127
- package/dist/index.js +275 -31
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -184,20 +184,30 @@ interface TooltipConfig {
|
|
|
184
184
|
locationX?: TooltipLocationX;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
type ValidButtonDot = boolean | string | number;
|
|
188
|
+
|
|
187
189
|
interface ButtonConfig {
|
|
188
190
|
type?: ButtonType;
|
|
189
|
-
checked?: boolean;
|
|
190
|
-
openTooltip?: boolean;
|
|
191
191
|
name?: string;
|
|
192
|
-
text?: string | number;
|
|
193
|
-
icon?: string;
|
|
194
|
-
class?: string;
|
|
195
|
-
containerClass?: string;
|
|
196
|
-
palette?: string;
|
|
197
192
|
value?: string;
|
|
198
193
|
disabled?: ValidIsDisabledValue;
|
|
194
|
+
openTooltip?: boolean;
|
|
199
195
|
loading?: boolean;
|
|
196
|
+
class?: string;
|
|
197
|
+
containerClass?: string;
|
|
200
198
|
wrapContent?: boolean;
|
|
199
|
+
text?: string | number;
|
|
200
|
+
icon?: string;
|
|
201
|
+
iconEnd?: string;
|
|
202
|
+
img?: string;
|
|
203
|
+
checked?: boolean;
|
|
204
|
+
textOn?: string | number | undefined;
|
|
205
|
+
textOff?: string | number | undefined;
|
|
206
|
+
iconOn?: string | number | undefined;
|
|
207
|
+
iconOff?: string | number | undefined;
|
|
208
|
+
iconEndOn?: string | number | undefined;
|
|
209
|
+
iconEndOff?: string | number | undefined;
|
|
210
|
+
dot?: ValidButtonDot;
|
|
201
211
|
anchor?: AnchorConfig | Anchor;
|
|
202
212
|
resource?: string;
|
|
203
213
|
resourceData?: LktObject;
|
|
@@ -208,20 +218,16 @@ interface ButtonConfig {
|
|
|
208
218
|
confirmModalKey?: ValidModalKey;
|
|
209
219
|
confirmData?: Partial<ModalConfig>;
|
|
210
220
|
modalCallbacks?: Array<ModalCallbackConfig>;
|
|
211
|
-
|
|
212
|
-
iconEnd?: string;
|
|
213
|
-
img?: string;
|
|
221
|
+
tooltip?: TooltipConfig;
|
|
214
222
|
splitIcon?: string;
|
|
215
223
|
showTooltipOnHover?: boolean;
|
|
216
224
|
showTooltipOnHoverDelay?: number;
|
|
217
225
|
hideTooltipOnLeave?: boolean;
|
|
218
|
-
tooltip?: TooltipConfig;
|
|
219
226
|
splitClass?: string;
|
|
220
|
-
clickRef?: Element | VueElement;
|
|
221
227
|
tabindex?: ValidTabIndex;
|
|
222
228
|
prop?: LktObject;
|
|
229
|
+
clickRef?: Element | VueElement;
|
|
223
230
|
onClick?: Function | undefined;
|
|
224
|
-
onConfirm?: Function | undefined;
|
|
225
231
|
}
|
|
226
232
|
|
|
227
233
|
declare class LktSettings {
|
|
@@ -241,6 +247,8 @@ declare class LktSettings {
|
|
|
241
247
|
static setDefaultDropButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
|
|
242
248
|
static defaultEditModeButton: Partial<ButtonConfig>;
|
|
243
249
|
static setDefaultEditModeButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
|
|
250
|
+
static defaultToggleButton: Partial<ButtonConfig>;
|
|
251
|
+
static setDefaultToggleButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
|
|
244
252
|
}
|
|
245
253
|
|
|
246
254
|
declare enum FieldType {
|
|
@@ -265,6 +273,53 @@ declare enum FieldType {
|
|
|
265
273
|
Elements = "elements"
|
|
266
274
|
}
|
|
267
275
|
|
|
276
|
+
declare const fieldTypesWithOptions: FieldType[];
|
|
277
|
+
declare const fieldTypesWithoutClear: FieldType[];
|
|
278
|
+
declare const fieldTypesWithoutUndo: FieldType[];
|
|
279
|
+
declare const textFieldTypesWithOptions: FieldType[];
|
|
280
|
+
declare const booleanFieldTypes: FieldType[];
|
|
281
|
+
declare const fieldsWithMultipleMode: FieldType[];
|
|
282
|
+
declare const textFieldTypes: FieldType[];
|
|
283
|
+
|
|
284
|
+
declare enum AccordionToggleMode {
|
|
285
|
+
Transform = "transform",
|
|
286
|
+
Height = "height",
|
|
287
|
+
Display = "display"
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
declare enum AccordionType {
|
|
291
|
+
Auto = "auto",// Default accordion flow
|
|
292
|
+
Always = "always",// Always opened
|
|
293
|
+
Lazy = "lazy",// Lazy content, only after fist open
|
|
294
|
+
Ever = "ever"
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface AccordionConfig {
|
|
298
|
+
modelValue?: boolean;
|
|
299
|
+
type?: AccordionType;
|
|
300
|
+
toggleMode?: AccordionToggleMode;
|
|
301
|
+
actionButton?: ButtonConfig;
|
|
302
|
+
toggleButton?: ButtonConfig;
|
|
303
|
+
toggleOnClickIntro?: boolean;
|
|
304
|
+
toggleTimeout?: number;
|
|
305
|
+
title?: string;
|
|
306
|
+
icon?: string;
|
|
307
|
+
class?: string;
|
|
308
|
+
contentClass?: string;
|
|
309
|
+
iconRotation?: '90' | '180' | '-90' | '-180';
|
|
310
|
+
minHeight?: number | undefined;
|
|
311
|
+
iconAtEnd?: boolean;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
declare enum ColumnType {
|
|
315
|
+
None = "",
|
|
316
|
+
Field = "field",
|
|
317
|
+
Button = "button",
|
|
318
|
+
Anchor = "anchor"
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
type ValidColSpan = Function | boolean | number | undefined;
|
|
322
|
+
|
|
268
323
|
type ValidOptionValue = string | number | undefined;
|
|
269
324
|
|
|
270
325
|
interface OptionConfig {
|
|
@@ -305,6 +360,30 @@ declare enum FieldAutoValidationTrigger {
|
|
|
305
360
|
|
|
306
361
|
type ValidFieldMinMax = number | string | undefined;
|
|
307
362
|
|
|
363
|
+
declare enum FieldValidationType {
|
|
364
|
+
Auto = "auto",
|
|
365
|
+
Remote = "remote"
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface FieldValidationConfig {
|
|
369
|
+
type?: FieldValidationType;
|
|
370
|
+
trigger?: FieldAutoValidationTrigger;
|
|
371
|
+
stack?: string;
|
|
372
|
+
resource?: string;
|
|
373
|
+
resourceData?: LktObject;
|
|
374
|
+
minNumbers?: ValidFieldMinMax;
|
|
375
|
+
maxNumbers?: ValidFieldMinMax;
|
|
376
|
+
minChars?: ValidFieldMinMax;
|
|
377
|
+
maxChars?: ValidFieldMinMax;
|
|
378
|
+
minUpperChars?: ValidFieldMinMax;
|
|
379
|
+
maxUpperChars?: ValidFieldMinMax;
|
|
380
|
+
minLowerChars?: ValidFieldMinMax;
|
|
381
|
+
maxLowerChars?: ValidFieldMinMax;
|
|
382
|
+
minSpecialChars?: ValidFieldMinMax;
|
|
383
|
+
maxSpecialChars?: ValidFieldMinMax;
|
|
384
|
+
checkEqualTo?: ValidFieldMinMax;
|
|
385
|
+
}
|
|
386
|
+
|
|
308
387
|
interface FieldConfig {
|
|
309
388
|
modelValue?: ValidFieldValue;
|
|
310
389
|
type?: FieldType;
|
|
@@ -342,27 +421,9 @@ interface FieldConfig {
|
|
|
342
421
|
slotData?: LktObject;
|
|
343
422
|
resource?: string;
|
|
344
423
|
resourceData?: LktObject;
|
|
345
|
-
validationResource?: string;
|
|
346
|
-
validationResourceData?: LktObject;
|
|
347
|
-
autoValidation?: boolean;
|
|
348
|
-
autoValidationType?: FieldAutoValidationTrigger;
|
|
349
|
-
validationStack?: string;
|
|
350
|
-
minNumbers?: ValidFieldMinMax;
|
|
351
|
-
maxNumbers?: ValidFieldMinMax;
|
|
352
|
-
minChars?: ValidFieldMinMax;
|
|
353
|
-
maxChars?: ValidFieldMinMax;
|
|
354
|
-
minUpperChars?: ValidFieldMinMax;
|
|
355
|
-
maxUpperChars?: ValidFieldMinMax;
|
|
356
|
-
minLowerChars?: ValidFieldMinMax;
|
|
357
|
-
maxLowerChars?: ValidFieldMinMax;
|
|
358
|
-
minSpecialChars?: ValidFieldMinMax;
|
|
359
|
-
maxSpecialChars?: ValidFieldMinMax;
|
|
360
|
-
checkEqualTo?: ValidFieldMinMax;
|
|
361
424
|
featuredButton?: string;
|
|
362
425
|
infoButtonEllipsis?: boolean;
|
|
363
426
|
fileName?: string;
|
|
364
|
-
customButtonText?: string;
|
|
365
|
-
customButtonClass?: string;
|
|
366
427
|
options?: string | Option[];
|
|
367
428
|
multiple?: boolean;
|
|
368
429
|
multipleDisplay?: MultipleOptionsDisplay;
|
|
@@ -372,7 +433,9 @@ interface FieldConfig {
|
|
|
372
433
|
optionsDownload?: string | Function;
|
|
373
434
|
optionsModal?: string | Function;
|
|
374
435
|
optionsModalData?: LktObject | Function;
|
|
436
|
+
optionsText?: string | Function;
|
|
375
437
|
optionsIcon?: string | Function;
|
|
438
|
+
optionsClass?: string | Function;
|
|
376
439
|
optionsLabelFormatter?: Function | undefined;
|
|
377
440
|
optionsResource?: string;
|
|
378
441
|
optionsResourceData?: LktObject;
|
|
@@ -384,100 +447,27 @@ interface FieldConfig {
|
|
|
384
447
|
itemType?: string;
|
|
385
448
|
optionValueType?: string;
|
|
386
449
|
prop?: LktObject;
|
|
450
|
+
validation?: FieldValidationConfig;
|
|
451
|
+
validationResource?: string;
|
|
452
|
+
validationResourceData?: LktObject;
|
|
453
|
+
autoValidation?: boolean;
|
|
454
|
+
autoValidationType?: FieldAutoValidationTrigger;
|
|
455
|
+
validationStack?: string;
|
|
456
|
+
minNumbers?: ValidFieldMinMax;
|
|
457
|
+
maxNumbers?: ValidFieldMinMax;
|
|
458
|
+
minChars?: ValidFieldMinMax;
|
|
459
|
+
maxChars?: ValidFieldMinMax;
|
|
460
|
+
minUpperChars?: ValidFieldMinMax;
|
|
461
|
+
maxUpperChars?: ValidFieldMinMax;
|
|
462
|
+
minLowerChars?: ValidFieldMinMax;
|
|
463
|
+
maxLowerChars?: ValidFieldMinMax;
|
|
464
|
+
minSpecialChars?: ValidFieldMinMax;
|
|
465
|
+
maxSpecialChars?: ValidFieldMinMax;
|
|
466
|
+
checkEqualTo?: ValidFieldMinMax;
|
|
467
|
+
customButtonText?: string;
|
|
468
|
+
customButtonClass?: string;
|
|
387
469
|
}
|
|
388
470
|
|
|
389
|
-
declare enum ItemCrudView {
|
|
390
|
-
Inline = "inline",
|
|
391
|
-
Modal = "modal"
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
declare enum ItemCrudMode {
|
|
395
|
-
Create = "create",
|
|
396
|
-
Update = "update",
|
|
397
|
-
Read = "read"
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
declare enum ItemCrudButtonNavPosition {
|
|
401
|
-
Top = "top",
|
|
402
|
-
Bottom = "bottom"
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
declare enum ItemCrudButtonNavVisibility {
|
|
406
|
-
Changed = "changed",
|
|
407
|
-
Always = "always",
|
|
408
|
-
Never = "never"
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
declare enum SaveType {
|
|
412
|
-
Manual = "manual",
|
|
413
|
-
Auto = "auto",
|
|
414
|
-
Delay = "delay"
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
interface SaveConfig {
|
|
418
|
-
type?: SaveType;
|
|
419
|
-
delay?: number;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
interface ItemCrudConfig {
|
|
423
|
-
modelValue: LktObject;
|
|
424
|
-
editing: boolean;
|
|
425
|
-
mode: ItemCrudMode;
|
|
426
|
-
view: ItemCrudView;
|
|
427
|
-
editModeButton: ButtonConfig;
|
|
428
|
-
dropButton: ButtonConfig;
|
|
429
|
-
createButton: ButtonConfig;
|
|
430
|
-
updateButton: ButtonConfig;
|
|
431
|
-
buttonNavPosition?: ItemCrudButtonNavPosition;
|
|
432
|
-
buttonNavVisibility?: ItemCrudButtonNavVisibility;
|
|
433
|
-
modalConfig: ModalConfig;
|
|
434
|
-
saveConfig: SaveConfig;
|
|
435
|
-
dataStateConfig: DataStateConfig;
|
|
436
|
-
readResource: string;
|
|
437
|
-
readData: LktObject;
|
|
438
|
-
title: string;
|
|
439
|
-
beforeEmitUpdate: Function | undefined;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
declare enum PaginatorType {
|
|
443
|
-
Pages = "pages",
|
|
444
|
-
PrevNext = "prev-next",
|
|
445
|
-
PagesPrevNext = "pages-prev-next",
|
|
446
|
-
PagesPrevNextFirstLast = "pages-prev-next-first-last",
|
|
447
|
-
LoadMore = "load-more",
|
|
448
|
-
Infinite = "infinite"
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
interface PaginatorConfig {
|
|
452
|
-
type?: PaginatorType;
|
|
453
|
-
modelValue?: number;
|
|
454
|
-
class?: string;
|
|
455
|
-
resource?: string;
|
|
456
|
-
readOnly?: boolean;
|
|
457
|
-
loading?: boolean;
|
|
458
|
-
filters?: LktObject;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
type ValidDrag = boolean | ((item: LktObject) => boolean);
|
|
462
|
-
|
|
463
|
-
interface DragConfig {
|
|
464
|
-
enabled: boolean;
|
|
465
|
-
isDraggable?: ValidDrag;
|
|
466
|
-
isValid?: ValidDrag;
|
|
467
|
-
isDisabled?: boolean | Function;
|
|
468
|
-
canRender?: boolean | Function;
|
|
469
|
-
dragKey?: string;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
declare enum ColumnType {
|
|
473
|
-
None = "",
|
|
474
|
-
Field = "field",
|
|
475
|
-
Button = "button",
|
|
476
|
-
Anchor = "anchor"
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
type ValidColSpan = Function | boolean | number | undefined;
|
|
480
|
-
|
|
481
471
|
declare class SafeString {
|
|
482
472
|
private readonly value;
|
|
483
473
|
constructor(input: ValidSafeStringValue);
|
|
@@ -508,6 +498,7 @@ declare class Field extends LktItem implements FieldConfig {
|
|
|
508
498
|
canUndo: boolean;
|
|
509
499
|
canI18n: boolean;
|
|
510
500
|
canStep: boolean;
|
|
501
|
+
canTag: boolean;
|
|
511
502
|
mandatoryMessage: string;
|
|
512
503
|
infoMessage: string;
|
|
513
504
|
errorMessage: string;
|
|
@@ -552,7 +543,9 @@ declare class Field extends LktItem implements FieldConfig {
|
|
|
552
543
|
optionsDownload: string | Function;
|
|
553
544
|
optionsModal: string | Function;
|
|
554
545
|
optionsModalData: LktObject | Function;
|
|
546
|
+
optionsText: string | Function;
|
|
555
547
|
optionsIcon: string | Function;
|
|
548
|
+
optionsClass: string | Function;
|
|
556
549
|
optionsLabelFormatter: undefined;
|
|
557
550
|
optionsResource: string;
|
|
558
551
|
optionsResourceData: LktObject;
|
|
@@ -562,6 +555,7 @@ declare class Field extends LktItem implements FieldConfig {
|
|
|
562
555
|
modalKey: string | number | Function;
|
|
563
556
|
modalData: LktObject;
|
|
564
557
|
data: LktObject;
|
|
558
|
+
validation: FieldValidationConfig;
|
|
565
559
|
constructor(data?: Partial<FieldConfig>);
|
|
566
560
|
}
|
|
567
561
|
|
|
@@ -587,9 +581,15 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
587
581
|
confirmModalKey: ValidModalKey;
|
|
588
582
|
confirmData: Partial<ModalConfig>;
|
|
589
583
|
modalCallbacks?: Array<ModalCallbackConfig>;
|
|
590
|
-
text: string;
|
|
584
|
+
text: string | number;
|
|
585
|
+
textOn: string | number | undefined;
|
|
586
|
+
textOff: string | number | undefined;
|
|
587
|
+
iconOn: string | number | undefined;
|
|
588
|
+
iconOff: string | number | undefined;
|
|
589
|
+
iconEndOn: string | number | undefined;
|
|
590
|
+
iconEndOff: string | number | undefined;
|
|
591
591
|
icon: string;
|
|
592
|
-
|
|
592
|
+
dot: ValidButtonDot;
|
|
593
593
|
iconEnd: string;
|
|
594
594
|
img: string;
|
|
595
595
|
showTooltipOnHoverDelay: number;
|
|
@@ -604,7 +604,6 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
604
604
|
tooltip?: TooltipConfig;
|
|
605
605
|
prop?: LktObject;
|
|
606
606
|
onClick?: Function | undefined;
|
|
607
|
-
onConfirm?: Function | undefined;
|
|
608
607
|
constructor(data?: Partial<ButtonConfig>);
|
|
609
608
|
isDisabled(): boolean | undefined;
|
|
610
609
|
}
|
|
@@ -630,6 +629,89 @@ interface ColumnConfig {
|
|
|
630
629
|
action?: Function;
|
|
631
630
|
}
|
|
632
631
|
|
|
632
|
+
type ValidDrag = boolean | ((item: LktObject) => boolean);
|
|
633
|
+
|
|
634
|
+
interface DragConfig {
|
|
635
|
+
enabled: boolean;
|
|
636
|
+
isDraggable?: ValidDrag;
|
|
637
|
+
isValid?: ValidDrag;
|
|
638
|
+
isDisabled?: boolean | Function;
|
|
639
|
+
canRender?: boolean | Function;
|
|
640
|
+
dragKey?: string;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
declare enum ItemCrudView {
|
|
644
|
+
Inline = "inline",
|
|
645
|
+
Modal = "modal"
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare enum ItemCrudMode {
|
|
649
|
+
Create = "create",
|
|
650
|
+
Update = "update",
|
|
651
|
+
Read = "read"
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
declare enum ItemCrudButtonNavPosition {
|
|
655
|
+
Top = "top",
|
|
656
|
+
Bottom = "bottom"
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
declare enum ItemCrudButtonNavVisibility {
|
|
660
|
+
Changed = "changed",
|
|
661
|
+
Always = "always",
|
|
662
|
+
Never = "never"
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
declare enum SaveType {
|
|
666
|
+
Manual = "manual",
|
|
667
|
+
Auto = "auto",
|
|
668
|
+
Delay = "delay"
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
interface SaveConfig {
|
|
672
|
+
type?: SaveType;
|
|
673
|
+
delay?: number;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
interface ItemCrudConfig {
|
|
677
|
+
modelValue: LktObject;
|
|
678
|
+
editing: boolean;
|
|
679
|
+
mode: ItemCrudMode;
|
|
680
|
+
view: ItemCrudView;
|
|
681
|
+
editModeButton: ButtonConfig;
|
|
682
|
+
dropButton: ButtonConfig;
|
|
683
|
+
createButton: ButtonConfig;
|
|
684
|
+
updateButton: ButtonConfig;
|
|
685
|
+
buttonNavPosition?: ItemCrudButtonNavPosition;
|
|
686
|
+
buttonNavVisibility?: ItemCrudButtonNavVisibility;
|
|
687
|
+
modalConfig: ModalConfig;
|
|
688
|
+
saveConfig: SaveConfig;
|
|
689
|
+
dataStateConfig: DataStateConfig;
|
|
690
|
+
readResource: string;
|
|
691
|
+
readData: LktObject;
|
|
692
|
+
title: string;
|
|
693
|
+
beforeEmitUpdate: Function | undefined;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
declare enum PaginatorType {
|
|
697
|
+
Pages = "pages",
|
|
698
|
+
PrevNext = "prev-next",
|
|
699
|
+
PagesPrevNext = "pages-prev-next",
|
|
700
|
+
PagesPrevNextFirstLast = "pages-prev-next-first-last",
|
|
701
|
+
LoadMore = "load-more",
|
|
702
|
+
Infinite = "infinite"
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
interface PaginatorConfig {
|
|
706
|
+
type?: PaginatorType;
|
|
707
|
+
modelValue?: number;
|
|
708
|
+
class?: string;
|
|
709
|
+
resource?: string;
|
|
710
|
+
readOnly?: boolean;
|
|
711
|
+
loading?: boolean;
|
|
712
|
+
filters?: LktObject;
|
|
713
|
+
}
|
|
714
|
+
|
|
633
715
|
declare enum TableType {
|
|
634
716
|
Table = "table",
|
|
635
717
|
Item = "item",
|
|
@@ -756,6 +838,82 @@ declare class LktStrictItem extends LktItem {
|
|
|
756
838
|
lktStrictItem: boolean;
|
|
757
839
|
}
|
|
758
840
|
|
|
841
|
+
declare enum ValidationCode {
|
|
842
|
+
MinStringLength = "min-str",
|
|
843
|
+
MinNumber = "min-num",
|
|
844
|
+
MaxStringLength = "max-str",
|
|
845
|
+
MaxNumber = "max-num",
|
|
846
|
+
Email = "email",
|
|
847
|
+
Empty = "empty",
|
|
848
|
+
EqualTo = "equal-to",
|
|
849
|
+
MinNumbers = "min-numbers",
|
|
850
|
+
MaxNumbers = "max-numbers",
|
|
851
|
+
MinChars = "min-chars",
|
|
852
|
+
MaxChars = "max-chars",
|
|
853
|
+
MinUpperChars = "min-upper-chars",
|
|
854
|
+
MaxUpperChars = "max-upper-chars",
|
|
855
|
+
MinLowerChars = "min-lower-chars",
|
|
856
|
+
MaxLowerChars = "max-lower-chars",
|
|
857
|
+
MinSpecialChars = "min-special-chars",
|
|
858
|
+
MaxSpecialChars = "max-special-chars"
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
declare enum ValidationStatus {
|
|
862
|
+
Ok = "ok",
|
|
863
|
+
Ko = "ko",
|
|
864
|
+
Info = "info"
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
declare class FieldValidation {
|
|
868
|
+
code?: ValidationCode | string;
|
|
869
|
+
status: ValidationStatus;
|
|
870
|
+
min: number;
|
|
871
|
+
max: number;
|
|
872
|
+
equalToValue: number | string | undefined;
|
|
873
|
+
constructor(code: ValidationCode, status: ValidationStatus);
|
|
874
|
+
setMin(n: number): this;
|
|
875
|
+
setMax(n: number): this;
|
|
876
|
+
setEqualToValue(val: number | string): this;
|
|
877
|
+
static createEmpty(status?: ValidationStatus): FieldValidation;
|
|
878
|
+
static createEmail(status?: ValidationStatus): FieldValidation;
|
|
879
|
+
static createMinStr(min: number, status?: ValidationStatus): FieldValidation;
|
|
880
|
+
static createMaxStr(max: number, status?: ValidationStatus): FieldValidation;
|
|
881
|
+
static createMinNum(min: number, status?: ValidationStatus): FieldValidation;
|
|
882
|
+
static createMaxNum(max: number, status?: ValidationStatus): FieldValidation;
|
|
883
|
+
static createNumBetween(min: number, max: number, status?: ValidationStatus): FieldValidation;
|
|
884
|
+
static createMinNumbers(min: number, status?: ValidationStatus): FieldValidation;
|
|
885
|
+
static createMaxNumbers(max: number, status?: ValidationStatus): FieldValidation;
|
|
886
|
+
static createMinUpperChars(min: number, status?: ValidationStatus): FieldValidation;
|
|
887
|
+
static createMaxUpperChars(max: number, status?: ValidationStatus): FieldValidation;
|
|
888
|
+
static createMinLowerChars(min: number, status?: ValidationStatus): FieldValidation;
|
|
889
|
+
static createMaxLowerChars(max: number, status?: ValidationStatus): FieldValidation;
|
|
890
|
+
static createMinSpecialChars(min: number, status?: ValidationStatus): FieldValidation;
|
|
891
|
+
static createMaxSpecialChars(max: number, status?: ValidationStatus): FieldValidation;
|
|
892
|
+
static createMinChars(min: number, status?: ValidationStatus): FieldValidation;
|
|
893
|
+
static createMaxChars(max: number, status?: ValidationStatus): FieldValidation;
|
|
894
|
+
static createEqualTo(value: number | string, status?: ValidationStatus): FieldValidation;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
declare class Accordion extends LktItem implements AccordionConfig {
|
|
898
|
+
static lktAllowUndefinedProps: string[];
|
|
899
|
+
static lktDefaultValues: (keyof AccordionConfig)[];
|
|
900
|
+
modelValue?: boolean;
|
|
901
|
+
type?: AccordionType;
|
|
902
|
+
toggleMode?: AccordionToggleMode;
|
|
903
|
+
actionButton?: ButtonConfig;
|
|
904
|
+
toggleButton?: ButtonConfig;
|
|
905
|
+
toggleOnClickIntro?: boolean;
|
|
906
|
+
toggleTimeout?: number;
|
|
907
|
+
title?: string;
|
|
908
|
+
icon?: string;
|
|
909
|
+
class?: string;
|
|
910
|
+
contentClass?: string;
|
|
911
|
+
iconRotation?: '90' | '180' | '-90' | '-180';
|
|
912
|
+
minHeight?: number | undefined;
|
|
913
|
+
iconAtEnd?: boolean;
|
|
914
|
+
constructor(data?: Partial<AnchorConfig>);
|
|
915
|
+
}
|
|
916
|
+
|
|
759
917
|
declare class Tooltip extends LktItem implements TooltipConfig {
|
|
760
918
|
static lktDefaultValues: (keyof TooltipConfig)[];
|
|
761
919
|
modelValue: boolean;
|
|
@@ -921,4 +1079,4 @@ declare function getDefaultValues<T>(cls: {
|
|
|
921
1079
|
lktDefaultValues: (keyof T)[];
|
|
922
1080
|
}): Partial<T>;
|
|
923
1081
|
|
|
924
|
-
export { Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, Modal, ModalCallbackAction, type ModalCallbackConfig, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, Paginator, type PaginatorConfig, PaginatorType, SafeString, type SaveConfig, SaveType, type ScanPropTarget, SortDirection, Table, type TableConfig, TablePermission, TableRowType, TableType, ToggleMode, Tooltip, type TooltipConfig, TooltipLocationX, TooltipLocationY, TooltipPositionEngine, type ValidBeforeCloseModal, type ValidColSpan, type ValidCustomSlot, type ValidDragConfig, type ValidFieldMinMax, type ValidFieldValue, type ValidIsDisabledValue, type ValidModalKey, type ValidModalName, type ValidOptionValue, type ValidPaginatorConfig, type ValidSafeStringValue, type ValidScanPropTarget, type ValidTabIndex, type ValidTablePermission, type ValidTableRowTypeValue, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, getDefaultValues, lktDebug };
|
|
1082
|
+
export { Accordion, type AccordionConfig, AccordionToggleMode, AccordionType, Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, FieldValidation, type FieldValidationConfig, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, Modal, ModalCallbackAction, type ModalCallbackConfig, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, Paginator, type PaginatorConfig, PaginatorType, SafeString, type SaveConfig, SaveType, type ScanPropTarget, SortDirection, Table, type TableConfig, TablePermission, TableRowType, TableType, ToggleMode, Tooltip, type TooltipConfig, TooltipLocationX, TooltipLocationY, TooltipPositionEngine, type ValidBeforeCloseModal, type ValidButtonDot, type ValidColSpan, type ValidCustomSlot, type ValidDragConfig, type ValidFieldMinMax, type ValidFieldValue, type ValidIsDisabledValue, type ValidModalKey, type ValidModalName, type ValidOptionValue, type ValidPaginatorConfig, type ValidSafeStringValue, type ValidScanPropTarget, type ValidTabIndex, type ValidTablePermission, type ValidTableRowTypeValue, ValidationCode, ValidationStatus, booleanFieldTypes, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, fieldTypesWithOptions, fieldTypesWithoutClear, fieldTypesWithoutUndo, fieldsWithMultipleMode, getDefaultValues, lktDebug, textFieldTypes, textFieldTypesWithOptions };
|
package/dist/index.js
CHANGED
|
@@ -110,8 +110,79 @@ var LktSettings = class _LktSettings {
|
|
|
110
110
|
}
|
|
111
111
|
return _LktSettings;
|
|
112
112
|
}
|
|
113
|
+
static defaultToggleButton = {
|
|
114
|
+
text: "Toggle",
|
|
115
|
+
textOn: "Close",
|
|
116
|
+
textOff: "Show more",
|
|
117
|
+
type: "hidden-switch" /* HiddenSwitch */
|
|
118
|
+
};
|
|
119
|
+
static setDefaultToggleButton(button, override = true) {
|
|
120
|
+
if (override) {
|
|
121
|
+
_LktSettings.defaultToggleButton = button;
|
|
122
|
+
} else {
|
|
123
|
+
_LktSettings.defaultToggleButton = ensureButtonConfig(button, _LktSettings.defaultToggleButton);
|
|
124
|
+
}
|
|
125
|
+
return _LktSettings;
|
|
126
|
+
}
|
|
113
127
|
};
|
|
114
128
|
|
|
129
|
+
// src/enums/FieldType.ts
|
|
130
|
+
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
131
|
+
FieldType2["Text"] = "text";
|
|
132
|
+
FieldType2["Email"] = "email";
|
|
133
|
+
FieldType2["Tel"] = "tel";
|
|
134
|
+
FieldType2["Password"] = "password";
|
|
135
|
+
FieldType2["Search"] = "search";
|
|
136
|
+
FieldType2["Number"] = "number";
|
|
137
|
+
FieldType2["Color"] = "color";
|
|
138
|
+
FieldType2["Range"] = "range";
|
|
139
|
+
FieldType2["Textarea"] = "textarea";
|
|
140
|
+
FieldType2["Html"] = "html";
|
|
141
|
+
FieldType2["Date"] = "date";
|
|
142
|
+
FieldType2["File"] = "file";
|
|
143
|
+
FieldType2["Image"] = "image";
|
|
144
|
+
FieldType2["Select"] = "select";
|
|
145
|
+
FieldType2["Check"] = "check";
|
|
146
|
+
FieldType2["Switch"] = "switch";
|
|
147
|
+
FieldType2["Calc"] = "calc";
|
|
148
|
+
FieldType2["Card"] = "card";
|
|
149
|
+
FieldType2["Elements"] = "elements";
|
|
150
|
+
return FieldType2;
|
|
151
|
+
})(FieldType || {});
|
|
152
|
+
|
|
153
|
+
// src/constants/field-constants.ts
|
|
154
|
+
var fieldTypesWithOptions = [
|
|
155
|
+
"text" /* Text */,
|
|
156
|
+
"search" /* Search */,
|
|
157
|
+
"select" /* Select */
|
|
158
|
+
];
|
|
159
|
+
var fieldTypesWithoutClear = [
|
|
160
|
+
"switch" /* Switch */,
|
|
161
|
+
"check" /* Check */
|
|
162
|
+
];
|
|
163
|
+
var fieldTypesWithoutUndo = [
|
|
164
|
+
"switch" /* Switch */,
|
|
165
|
+
"check" /* Check */
|
|
166
|
+
];
|
|
167
|
+
var textFieldTypesWithOptions = [
|
|
168
|
+
"text" /* Text */,
|
|
169
|
+
"search" /* Search */
|
|
170
|
+
];
|
|
171
|
+
var booleanFieldTypes = [
|
|
172
|
+
"switch" /* Switch */,
|
|
173
|
+
"check" /* Check */
|
|
174
|
+
];
|
|
175
|
+
var fieldsWithMultipleMode = [
|
|
176
|
+
"select" /* Select */,
|
|
177
|
+
"color" /* Color */,
|
|
178
|
+
"card" /* Card */
|
|
179
|
+
];
|
|
180
|
+
var textFieldTypes = [
|
|
181
|
+
"text" /* Text */,
|
|
182
|
+
"email" /* Email */,
|
|
183
|
+
"password" /* Password */
|
|
184
|
+
];
|
|
185
|
+
|
|
115
186
|
// src/instances/LktItem.ts
|
|
116
187
|
var skipDataProps = [
|
|
117
188
|
"lktDateProps",
|
|
@@ -161,30 +232,6 @@ var Option = class extends LktItem {
|
|
|
161
232
|
}
|
|
162
233
|
};
|
|
163
234
|
|
|
164
|
-
// src/enums/FieldType.ts
|
|
165
|
-
var FieldType = /* @__PURE__ */ ((FieldType2) => {
|
|
166
|
-
FieldType2["Text"] = "text";
|
|
167
|
-
FieldType2["Email"] = "email";
|
|
168
|
-
FieldType2["Tel"] = "tel";
|
|
169
|
-
FieldType2["Password"] = "password";
|
|
170
|
-
FieldType2["Search"] = "search";
|
|
171
|
-
FieldType2["Number"] = "number";
|
|
172
|
-
FieldType2["Color"] = "color";
|
|
173
|
-
FieldType2["Range"] = "range";
|
|
174
|
-
FieldType2["Textarea"] = "textarea";
|
|
175
|
-
FieldType2["Html"] = "html";
|
|
176
|
-
FieldType2["Date"] = "date";
|
|
177
|
-
FieldType2["File"] = "file";
|
|
178
|
-
FieldType2["Image"] = "image";
|
|
179
|
-
FieldType2["Select"] = "select";
|
|
180
|
-
FieldType2["Check"] = "check";
|
|
181
|
-
FieldType2["Switch"] = "switch";
|
|
182
|
-
FieldType2["Calc"] = "calc";
|
|
183
|
-
FieldType2["Card"] = "card";
|
|
184
|
-
FieldType2["Elements"] = "elements";
|
|
185
|
-
return FieldType2;
|
|
186
|
-
})(FieldType || {});
|
|
187
|
-
|
|
188
235
|
// src/instances/Field.ts
|
|
189
236
|
import { generateRandomString } from "lkt-string-tools";
|
|
190
237
|
|
|
@@ -228,6 +275,7 @@ var Field = class extends LktItem {
|
|
|
228
275
|
canUndo = false;
|
|
229
276
|
canI18n = false;
|
|
230
277
|
canStep = true;
|
|
278
|
+
canTag = true;
|
|
231
279
|
mandatoryMessage = "";
|
|
232
280
|
infoMessage = "";
|
|
233
281
|
errorMessage = "";
|
|
@@ -272,7 +320,9 @@ var Field = class extends LktItem {
|
|
|
272
320
|
optionsDownload = "";
|
|
273
321
|
optionsModal = "";
|
|
274
322
|
optionsModalData = {};
|
|
323
|
+
optionsText = "";
|
|
275
324
|
optionsIcon = "";
|
|
325
|
+
optionsClass = "";
|
|
276
326
|
optionsLabelFormatter = void 0;
|
|
277
327
|
optionsResource = "";
|
|
278
328
|
optionsResourceData = {};
|
|
@@ -282,12 +332,122 @@ var Field = class extends LktItem {
|
|
|
282
332
|
modalKey = "";
|
|
283
333
|
modalData = {};
|
|
284
334
|
data = {};
|
|
335
|
+
validation = {};
|
|
285
336
|
constructor(data = {}) {
|
|
286
337
|
super();
|
|
287
338
|
this.feed(data);
|
|
288
339
|
}
|
|
289
340
|
};
|
|
290
341
|
|
|
342
|
+
// src/enums/ValidationCode.ts
|
|
343
|
+
var ValidationCode = /* @__PURE__ */ ((ValidationCode2) => {
|
|
344
|
+
ValidationCode2["MinStringLength"] = "min-str";
|
|
345
|
+
ValidationCode2["MinNumber"] = "min-num";
|
|
346
|
+
ValidationCode2["MaxStringLength"] = "max-str";
|
|
347
|
+
ValidationCode2["MaxNumber"] = "max-num";
|
|
348
|
+
ValidationCode2["Email"] = "email";
|
|
349
|
+
ValidationCode2["Empty"] = "empty";
|
|
350
|
+
ValidationCode2["EqualTo"] = "equal-to";
|
|
351
|
+
ValidationCode2["MinNumbers"] = "min-numbers";
|
|
352
|
+
ValidationCode2["MaxNumbers"] = "max-numbers";
|
|
353
|
+
ValidationCode2["MinChars"] = "min-chars";
|
|
354
|
+
ValidationCode2["MaxChars"] = "max-chars";
|
|
355
|
+
ValidationCode2["MinUpperChars"] = "min-upper-chars";
|
|
356
|
+
ValidationCode2["MaxUpperChars"] = "max-upper-chars";
|
|
357
|
+
ValidationCode2["MinLowerChars"] = "min-lower-chars";
|
|
358
|
+
ValidationCode2["MaxLowerChars"] = "max-lower-chars";
|
|
359
|
+
ValidationCode2["MinSpecialChars"] = "min-special-chars";
|
|
360
|
+
ValidationCode2["MaxSpecialChars"] = "max-special-chars";
|
|
361
|
+
return ValidationCode2;
|
|
362
|
+
})(ValidationCode || {});
|
|
363
|
+
|
|
364
|
+
// src/enums/ValidationStatus.ts
|
|
365
|
+
var ValidationStatus = /* @__PURE__ */ ((ValidationStatus2) => {
|
|
366
|
+
ValidationStatus2["Ok"] = "ok";
|
|
367
|
+
ValidationStatus2["Ko"] = "ko";
|
|
368
|
+
ValidationStatus2["Info"] = "info";
|
|
369
|
+
return ValidationStatus2;
|
|
370
|
+
})(ValidationStatus || {});
|
|
371
|
+
|
|
372
|
+
// src/instances/FieldValidation.ts
|
|
373
|
+
var FieldValidation = class _FieldValidation {
|
|
374
|
+
code = void 0;
|
|
375
|
+
status = "info" /* Info */;
|
|
376
|
+
min = 0;
|
|
377
|
+
max = 0;
|
|
378
|
+
equalToValue = void 0;
|
|
379
|
+
constructor(code, status) {
|
|
380
|
+
this.code = code;
|
|
381
|
+
this.status = status;
|
|
382
|
+
}
|
|
383
|
+
setMin(n) {
|
|
384
|
+
this.min = n;
|
|
385
|
+
return this;
|
|
386
|
+
}
|
|
387
|
+
setMax(n) {
|
|
388
|
+
this.max = n;
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
setEqualToValue(val) {
|
|
392
|
+
this.equalToValue = val;
|
|
393
|
+
return this;
|
|
394
|
+
}
|
|
395
|
+
static createEmpty(status = "ko" /* Ko */) {
|
|
396
|
+
return new _FieldValidation("empty" /* Empty */, status);
|
|
397
|
+
}
|
|
398
|
+
static createEmail(status = "ko" /* Ko */) {
|
|
399
|
+
return new _FieldValidation("email" /* Email */, status);
|
|
400
|
+
}
|
|
401
|
+
static createMinStr(min, status = "ko" /* Ko */) {
|
|
402
|
+
return new _FieldValidation("min-str" /* MinStringLength */, status).setMin(min);
|
|
403
|
+
}
|
|
404
|
+
static createMaxStr(max, status = "ko" /* Ko */) {
|
|
405
|
+
return new _FieldValidation("max-str" /* MaxStringLength */, status).setMax(max);
|
|
406
|
+
}
|
|
407
|
+
static createMinNum(min, status = "ko" /* Ko */) {
|
|
408
|
+
return new _FieldValidation("min-num" /* MinNumber */, status).setMin(min);
|
|
409
|
+
}
|
|
410
|
+
static createMaxNum(max, status = "ko" /* Ko */) {
|
|
411
|
+
return new _FieldValidation("max-num" /* MaxNumber */, status).setMax(max);
|
|
412
|
+
}
|
|
413
|
+
static createNumBetween(min, max, status = "ko" /* Ko */) {
|
|
414
|
+
return new _FieldValidation("max-num" /* MaxNumber */, status).setMin(min).setMax(max);
|
|
415
|
+
}
|
|
416
|
+
static createMinNumbers(min, status = "ko" /* Ko */) {
|
|
417
|
+
return new _FieldValidation("min-numbers" /* MinNumbers */, status).setMin(min);
|
|
418
|
+
}
|
|
419
|
+
static createMaxNumbers(max, status = "ko" /* Ko */) {
|
|
420
|
+
return new _FieldValidation("max-numbers" /* MaxNumbers */, status).setMax(max);
|
|
421
|
+
}
|
|
422
|
+
static createMinUpperChars(min, status = "ko" /* Ko */) {
|
|
423
|
+
return new _FieldValidation("min-upper-chars" /* MinUpperChars */, status).setMin(min);
|
|
424
|
+
}
|
|
425
|
+
static createMaxUpperChars(max, status = "ko" /* Ko */) {
|
|
426
|
+
return new _FieldValidation("max-upper-chars" /* MaxUpperChars */, status).setMax(max);
|
|
427
|
+
}
|
|
428
|
+
static createMinLowerChars(min, status = "ko" /* Ko */) {
|
|
429
|
+
return new _FieldValidation("min-lower-chars" /* MinLowerChars */, status).setMin(min);
|
|
430
|
+
}
|
|
431
|
+
static createMaxLowerChars(max, status = "ko" /* Ko */) {
|
|
432
|
+
return new _FieldValidation("max-lower-chars" /* MaxLowerChars */, status).setMax(max);
|
|
433
|
+
}
|
|
434
|
+
static createMinSpecialChars(min, status = "ko" /* Ko */) {
|
|
435
|
+
return new _FieldValidation("min-special-chars" /* MinSpecialChars */, status).setMin(min);
|
|
436
|
+
}
|
|
437
|
+
static createMaxSpecialChars(max, status = "ko" /* Ko */) {
|
|
438
|
+
return new _FieldValidation("max-special-chars" /* MaxSpecialChars */, status).setMax(max);
|
|
439
|
+
}
|
|
440
|
+
static createMinChars(min, status = "ko" /* Ko */) {
|
|
441
|
+
return new _FieldValidation("min-chars" /* MinChars */, status).setMin(min);
|
|
442
|
+
}
|
|
443
|
+
static createMaxChars(max, status = "ko" /* Ko */) {
|
|
444
|
+
return new _FieldValidation("max-chars" /* MaxChars */, status).setMax(max);
|
|
445
|
+
}
|
|
446
|
+
static createEqualTo(value, status = "ko" /* Ko */) {
|
|
447
|
+
return new _FieldValidation("equal-to" /* EqualTo */, status).setEqualToValue(value);
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
291
451
|
// src/enums/ColumnType.ts
|
|
292
452
|
var ColumnType = /* @__PURE__ */ ((ColumnType2) => {
|
|
293
453
|
ColumnType2["None"] = "";
|
|
@@ -396,7 +556,6 @@ var Button = class extends LktItem {
|
|
|
396
556
|
static lktDefaultValues = [
|
|
397
557
|
"type",
|
|
398
558
|
"name",
|
|
399
|
-
"palette",
|
|
400
559
|
"class",
|
|
401
560
|
"containerClass",
|
|
402
561
|
"value",
|
|
@@ -414,8 +573,14 @@ var Button = class extends LktItem {
|
|
|
414
573
|
"confirmData",
|
|
415
574
|
"modalCallbacks",
|
|
416
575
|
"text",
|
|
576
|
+
"textOn",
|
|
577
|
+
"textOff",
|
|
417
578
|
"icon",
|
|
418
|
-
"
|
|
579
|
+
"iconOn",
|
|
580
|
+
"iconOff",
|
|
581
|
+
"iconEndOn",
|
|
582
|
+
"iconEndOff",
|
|
583
|
+
"dot",
|
|
419
584
|
"iconEnd",
|
|
420
585
|
"img",
|
|
421
586
|
"showTooltipOnHoverDelay",
|
|
@@ -429,8 +594,7 @@ var Button = class extends LktItem {
|
|
|
429
594
|
"hideTooltipOnLeave",
|
|
430
595
|
"splitClass",
|
|
431
596
|
"prop",
|
|
432
|
-
"onClick"
|
|
433
|
-
"onConfirm"
|
|
597
|
+
"onClick"
|
|
434
598
|
];
|
|
435
599
|
type = "button" /* Button */;
|
|
436
600
|
name = generateRandomString2(10);
|
|
@@ -452,8 +616,14 @@ var Button = class extends LktItem {
|
|
|
452
616
|
confirmData = {};
|
|
453
617
|
modalCallbacks = [];
|
|
454
618
|
text = "";
|
|
619
|
+
textOn = void 0;
|
|
620
|
+
textOff = void 0;
|
|
621
|
+
iconOn = void 0;
|
|
622
|
+
iconOff = void 0;
|
|
623
|
+
iconEndOn = void 0;
|
|
624
|
+
iconEndOff = void 0;
|
|
455
625
|
icon = "";
|
|
456
|
-
|
|
626
|
+
dot = false;
|
|
457
627
|
iconEnd = "";
|
|
458
628
|
img = "";
|
|
459
629
|
showTooltipOnHoverDelay = 0;
|
|
@@ -469,7 +639,6 @@ var Button = class extends LktItem {
|
|
|
469
639
|
prop = {};
|
|
470
640
|
// Event management
|
|
471
641
|
onClick = void 0;
|
|
472
|
-
onConfirm = void 0;
|
|
473
642
|
constructor(data = {}) {
|
|
474
643
|
super();
|
|
475
644
|
this.feed(data);
|
|
@@ -560,6 +729,68 @@ var Column = class extends LktItem {
|
|
|
560
729
|
}
|
|
561
730
|
};
|
|
562
731
|
|
|
732
|
+
// src/enums/AccordionType.ts
|
|
733
|
+
var AccordionType = /* @__PURE__ */ ((AccordionType2) => {
|
|
734
|
+
AccordionType2["Auto"] = "auto";
|
|
735
|
+
AccordionType2["Always"] = "always";
|
|
736
|
+
AccordionType2["Lazy"] = "lazy";
|
|
737
|
+
AccordionType2["Ever"] = "ever";
|
|
738
|
+
return AccordionType2;
|
|
739
|
+
})(AccordionType || {});
|
|
740
|
+
|
|
741
|
+
// src/enums/AccordionToggleMode.ts
|
|
742
|
+
var AccordionToggleMode = /* @__PURE__ */ ((AccordionToggleMode2) => {
|
|
743
|
+
AccordionToggleMode2["Transform"] = "transform";
|
|
744
|
+
AccordionToggleMode2["Height"] = "height";
|
|
745
|
+
AccordionToggleMode2["Display"] = "display";
|
|
746
|
+
return AccordionToggleMode2;
|
|
747
|
+
})(AccordionToggleMode || {});
|
|
748
|
+
|
|
749
|
+
// src/instances/Accordion.ts
|
|
750
|
+
var Accordion = class extends LktItem {
|
|
751
|
+
static lktAllowUndefinedProps = [
|
|
752
|
+
"onClick"
|
|
753
|
+
];
|
|
754
|
+
static lktDefaultValues = [
|
|
755
|
+
"modelValue",
|
|
756
|
+
"type",
|
|
757
|
+
"toggleMode",
|
|
758
|
+
"actionButton",
|
|
759
|
+
"toggleButton",
|
|
760
|
+
"toggleOnClickIntro",
|
|
761
|
+
"toggleTimeout",
|
|
762
|
+
"title",
|
|
763
|
+
"icon",
|
|
764
|
+
"class",
|
|
765
|
+
"contentClass",
|
|
766
|
+
"iconRotation",
|
|
767
|
+
"minHeight",
|
|
768
|
+
"iconAtEnd"
|
|
769
|
+
];
|
|
770
|
+
// Main config
|
|
771
|
+
modelValue = false;
|
|
772
|
+
type = "auto" /* Auto */;
|
|
773
|
+
toggleMode = "height" /* Height */;
|
|
774
|
+
// Buttons config
|
|
775
|
+
actionButton = {};
|
|
776
|
+
toggleButton = {};
|
|
777
|
+
// Toggle config
|
|
778
|
+
toggleOnClickIntro = false;
|
|
779
|
+
toggleTimeout = 0;
|
|
780
|
+
// Visuals
|
|
781
|
+
title = "";
|
|
782
|
+
icon = "";
|
|
783
|
+
class = "";
|
|
784
|
+
contentClass = "";
|
|
785
|
+
iconRotation = "90";
|
|
786
|
+
minHeight = void 0;
|
|
787
|
+
iconAtEnd = false;
|
|
788
|
+
constructor(data = {}) {
|
|
789
|
+
super();
|
|
790
|
+
this.feed(data);
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
|
|
563
794
|
// src/enums/TooltipPositionEngine.ts
|
|
564
795
|
var TooltipPositionEngine = /* @__PURE__ */ ((TooltipPositionEngine2) => {
|
|
565
796
|
TooltipPositionEngine2["Fixed"] = "fixed";
|
|
@@ -1017,6 +1248,9 @@ function getDefaultValues(cls) {
|
|
|
1017
1248
|
return result;
|
|
1018
1249
|
}
|
|
1019
1250
|
export {
|
|
1251
|
+
Accordion,
|
|
1252
|
+
AccordionToggleMode,
|
|
1253
|
+
AccordionType,
|
|
1020
1254
|
Anchor,
|
|
1021
1255
|
AnchorType,
|
|
1022
1256
|
Button,
|
|
@@ -1026,6 +1260,7 @@ export {
|
|
|
1026
1260
|
Field,
|
|
1027
1261
|
FieldAutoValidationTrigger,
|
|
1028
1262
|
FieldType,
|
|
1263
|
+
FieldValidation,
|
|
1029
1264
|
ItemCrud,
|
|
1030
1265
|
ItemCrudButtonNavPosition,
|
|
1031
1266
|
ItemCrudButtonNavVisibility,
|
|
@@ -1053,10 +1288,19 @@ export {
|
|
|
1053
1288
|
TooltipLocationX,
|
|
1054
1289
|
TooltipLocationY,
|
|
1055
1290
|
TooltipPositionEngine,
|
|
1291
|
+
ValidationCode,
|
|
1292
|
+
ValidationStatus,
|
|
1293
|
+
booleanFieldTypes,
|
|
1056
1294
|
createColumn,
|
|
1057
1295
|
ensureButtonConfig,
|
|
1058
1296
|
extractI18nValue,
|
|
1059
1297
|
extractPropValue,
|
|
1298
|
+
fieldTypesWithOptions,
|
|
1299
|
+
fieldTypesWithoutClear,
|
|
1300
|
+
fieldTypesWithoutUndo,
|
|
1301
|
+
fieldsWithMultipleMode,
|
|
1060
1302
|
getDefaultValues,
|
|
1061
|
-
lktDebug
|
|
1303
|
+
lktDebug,
|
|
1304
|
+
textFieldTypes,
|
|
1305
|
+
textFieldTypesWithOptions
|
|
1062
1306
|
};
|