lkt-vue-kernel 1.0.3 → 1.0.5
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 +263 -71
- package/dist/index.js +372 -51
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -40,10 +40,11 @@ interface OptionConfig {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
declare class LktItem implements LktObject {
|
|
43
|
-
lktAllowUndefinedProps: string[];
|
|
44
|
-
lktExcludedProps: string[];
|
|
45
|
-
lktDateProps: string[];
|
|
46
|
-
lktStrictItem: boolean;
|
|
43
|
+
static lktAllowUndefinedProps: string[];
|
|
44
|
+
static lktExcludedProps: string[];
|
|
45
|
+
static lktDateProps: string[];
|
|
46
|
+
static lktStrictItem: boolean;
|
|
47
|
+
static lktDefaultValues: (keyof LktObject)[];
|
|
47
48
|
constructor(data?: LktObject);
|
|
48
49
|
feed(data?: LktObject, target?: this): void;
|
|
49
50
|
assignProp(key: string, value: any): void;
|
|
@@ -59,7 +60,7 @@ declare class Option extends LktItem implements OptionConfig {
|
|
|
59
60
|
group: string;
|
|
60
61
|
icon: string;
|
|
61
62
|
modal: ValidModalName;
|
|
62
|
-
constructor(data?:
|
|
63
|
+
constructor(data?: Partial<OptionConfig>);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
type ValidFieldValue = string | number | boolean | LktObject | Option[];
|
|
@@ -172,16 +173,16 @@ interface ModalConfig extends LktObject {
|
|
|
172
173
|
preTitleIcon?: string;
|
|
173
174
|
title?: string;
|
|
174
175
|
closeIcon?: string;
|
|
175
|
-
closeConfirm?:
|
|
176
|
-
closeConfirmKey?:
|
|
176
|
+
closeConfirm?: ValidModalName;
|
|
177
|
+
closeConfirmKey?: ValidModalKey;
|
|
177
178
|
showClose?: boolean;
|
|
178
179
|
disabledClose?: boolean;
|
|
179
180
|
disabledVeilClick?: boolean;
|
|
180
181
|
hiddenFooter?: boolean;
|
|
181
|
-
modalName?:
|
|
182
|
+
modalName?: ValidModalName;
|
|
182
183
|
modalKey?: ValidModalKey;
|
|
183
184
|
zIndex?: number;
|
|
184
|
-
beforeClose?: Function;
|
|
185
|
+
beforeClose?: Function | undefined;
|
|
185
186
|
item?: LktObject;
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -216,7 +217,7 @@ interface TooltipConfig {
|
|
|
216
217
|
referrerMargin?: number | string;
|
|
217
218
|
windowMargin?: number | string;
|
|
218
219
|
referrerWidth?: boolean;
|
|
219
|
-
referrer
|
|
220
|
+
referrer?: HTMLElement | undefined;
|
|
220
221
|
locationY?: TooltipLocationY;
|
|
221
222
|
locationX?: TooltipLocationX;
|
|
222
223
|
}
|
|
@@ -245,11 +246,14 @@ interface AnchorConfig {
|
|
|
245
246
|
confirmModalKey?: ValidModalKey;
|
|
246
247
|
confirmData?: ModalConfig;
|
|
247
248
|
imposter?: boolean;
|
|
249
|
+
external?: boolean;
|
|
248
250
|
}
|
|
249
251
|
|
|
252
|
+
type ValidDrag = boolean | ((item: LktObject) => boolean);
|
|
253
|
+
|
|
250
254
|
interface DragConfig {
|
|
251
|
-
isDraggable?:
|
|
252
|
-
isValid?:
|
|
255
|
+
isDraggable?: ValidDrag;
|
|
256
|
+
isValid?: ValidDrag;
|
|
253
257
|
canRender?: boolean | Function;
|
|
254
258
|
dragKey?: string;
|
|
255
259
|
}
|
|
@@ -276,7 +280,8 @@ declare enum ToggleMode {
|
|
|
276
280
|
}
|
|
277
281
|
|
|
278
282
|
declare class Anchor extends LktItem implements AnchorConfig {
|
|
279
|
-
lktAllowUndefinedProps: string[];
|
|
283
|
+
static lktAllowUndefinedProps: string[];
|
|
284
|
+
static lktDefaultValues: (keyof AnchorConfig)[];
|
|
280
285
|
type: AnchorType;
|
|
281
286
|
to?: RouteLocationRaw | string;
|
|
282
287
|
class: string;
|
|
@@ -288,8 +293,9 @@ declare class Anchor extends LktItem implements AnchorConfig {
|
|
|
288
293
|
confirmModalKey: ValidModalKey;
|
|
289
294
|
confirmData: LktObject;
|
|
290
295
|
imposter: boolean;
|
|
291
|
-
|
|
296
|
+
external: boolean;
|
|
292
297
|
getHref(): string;
|
|
298
|
+
constructor(data?: Partial<AnchorConfig>);
|
|
293
299
|
}
|
|
294
300
|
|
|
295
301
|
interface ButtonConfig {
|
|
@@ -333,20 +339,37 @@ interface ButtonConfig {
|
|
|
333
339
|
splitClass?: string;
|
|
334
340
|
clickRef?: Element | VueElement;
|
|
335
341
|
tabindex?: ValidTabIndex;
|
|
336
|
-
isAnchor?: boolean;
|
|
337
|
-
onClickTo?: string;
|
|
338
|
-
onClickToExternal?: boolean;
|
|
339
|
-
download?: boolean;
|
|
340
|
-
downloadFileName?: string;
|
|
341
|
-
newTab?: boolean;
|
|
342
|
-
showSwitch?: boolean;
|
|
343
|
-
hiddenSwitch?: boolean;
|
|
344
342
|
}
|
|
345
343
|
|
|
346
|
-
declare
|
|
347
|
-
|
|
344
|
+
declare enum ColumnType {
|
|
345
|
+
None = "",
|
|
346
|
+
Field = "field",
|
|
347
|
+
Button = "button",
|
|
348
|
+
Anchor = "anchor",
|
|
349
|
+
Text = "text",
|
|
350
|
+
Number = "number",
|
|
351
|
+
Check = "check",
|
|
352
|
+
Switch = "switch",
|
|
353
|
+
Select = "select",
|
|
354
|
+
Email = "email",
|
|
355
|
+
Tel = "tel",
|
|
356
|
+
File = "file",
|
|
357
|
+
Link = "link",
|
|
358
|
+
Action = "action",
|
|
359
|
+
Integer = "int",
|
|
360
|
+
Float = "float"
|
|
348
361
|
}
|
|
349
362
|
|
|
363
|
+
type ValidColSpan = Function | boolean | number | undefined;
|
|
364
|
+
|
|
365
|
+
declare class SafeString {
|
|
366
|
+
private readonly value;
|
|
367
|
+
constructor(input: ValidSafeStringValue);
|
|
368
|
+
getValue(...args: any[]): string;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type ValidSafeStringValue = string | ((...args: any[]) => string) | undefined | SafeString;
|
|
372
|
+
|
|
350
373
|
declare class Field extends LktItem implements FieldConfig {
|
|
351
374
|
modelValue: ValidFieldValue;
|
|
352
375
|
type: FieldType;
|
|
@@ -423,45 +446,15 @@ declare class Field extends LktItem implements FieldConfig {
|
|
|
423
446
|
modalKey: string | number | Function;
|
|
424
447
|
modalData: LktObject;
|
|
425
448
|
data: LktObject;
|
|
426
|
-
constructor(data?: FieldConfig);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
declare enum ColumnType {
|
|
430
|
-
None = "",
|
|
431
|
-
Field = "field",
|
|
432
|
-
Button = "button",
|
|
433
|
-
Anchor = "anchor",
|
|
434
|
-
Text = "text",
|
|
435
|
-
Number = "number",
|
|
436
|
-
Check = "check",
|
|
437
|
-
Switch = "switch",
|
|
438
|
-
Select = "select",
|
|
439
|
-
Email = "email",
|
|
440
|
-
Tel = "tel",
|
|
441
|
-
File = "file",
|
|
442
|
-
Link = "link",
|
|
443
|
-
Action = "action",
|
|
444
|
-
Integer = "int",
|
|
445
|
-
Float = "float"
|
|
449
|
+
constructor(data?: Partial<FieldConfig>);
|
|
446
450
|
}
|
|
447
451
|
|
|
448
|
-
type ValidSafeStringValue = string | ((...args: any[]) => string) | undefined | SafeString;
|
|
449
|
-
|
|
450
|
-
declare class SafeString {
|
|
451
|
-
private readonly value;
|
|
452
|
-
constructor(input: ValidSafeStringValue);
|
|
453
|
-
getValue(...args: any[]): string;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
type ValidColSpan = Function | boolean | number | undefined;
|
|
457
|
-
|
|
458
452
|
declare class Button extends LktItem implements ButtonConfig {
|
|
459
453
|
lktAllowUndefinedProps: string[];
|
|
454
|
+
static lktDefaultValues: (keyof ButtonConfig)[];
|
|
460
455
|
type: ButtonType;
|
|
461
456
|
name: string;
|
|
462
457
|
palette: string;
|
|
463
|
-
onClickTo: string;
|
|
464
|
-
onClickToExternal: boolean;
|
|
465
458
|
class: string;
|
|
466
459
|
containerClass: string;
|
|
467
460
|
value: string;
|
|
@@ -470,7 +463,6 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
470
463
|
wrapContent: boolean;
|
|
471
464
|
split: boolean;
|
|
472
465
|
splitIcon: string;
|
|
473
|
-
isAnchor: boolean;
|
|
474
466
|
resource: string;
|
|
475
467
|
resourceData: LktObject;
|
|
476
468
|
modal: ValidModalName;
|
|
@@ -484,9 +476,6 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
484
476
|
iconDot: boolean;
|
|
485
477
|
iconEnd: string;
|
|
486
478
|
img: string;
|
|
487
|
-
newTab: boolean;
|
|
488
|
-
download: boolean;
|
|
489
|
-
downloadFileName: string;
|
|
490
479
|
tooltip: boolean;
|
|
491
480
|
showTooltipOnHoverDelay: number;
|
|
492
481
|
tooltipWindowMargin: number;
|
|
@@ -503,7 +492,7 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
503
492
|
hideTooltipOnLeave?: boolean;
|
|
504
493
|
tooltipClass?: string;
|
|
505
494
|
splitClass?: string;
|
|
506
|
-
constructor(data?: ButtonConfig);
|
|
495
|
+
constructor(data?: Partial<ButtonConfig>);
|
|
507
496
|
}
|
|
508
497
|
|
|
509
498
|
interface ColumnConfig {
|
|
@@ -527,9 +516,17 @@ interface ColumnConfig {
|
|
|
527
516
|
action?: Function;
|
|
528
517
|
}
|
|
529
518
|
|
|
519
|
+
declare enum TableType {
|
|
520
|
+
Table = "table",
|
|
521
|
+
Item = "item",
|
|
522
|
+
Ul = "ul",
|
|
523
|
+
Ol = "ol"
|
|
524
|
+
}
|
|
525
|
+
|
|
530
526
|
declare class Column extends LktItem implements ColumnConfig {
|
|
531
527
|
lktExcludedProps: string[];
|
|
532
528
|
lktAllowUndefinedProps: string[];
|
|
529
|
+
static lktDefaultValues: (keyof ColumnConfig)[];
|
|
533
530
|
type: ColumnType;
|
|
534
531
|
key: string;
|
|
535
532
|
label: string;
|
|
@@ -548,11 +545,210 @@ declare class Column extends LktItem implements ColumnConfig {
|
|
|
548
545
|
button: Button | ButtonConfig | undefined;
|
|
549
546
|
link: ValidSafeStringValue | SafeString | undefined;
|
|
550
547
|
action?: Function;
|
|
551
|
-
constructor(data
|
|
548
|
+
constructor(data?: Partial<ColumnConfig>);
|
|
552
549
|
getHref(item: LktObject): string;
|
|
553
550
|
doAction(item: LktObject): any;
|
|
554
551
|
}
|
|
555
552
|
|
|
553
|
+
declare enum TablePermission {
|
|
554
|
+
Create = "create",
|
|
555
|
+
Update = "update",// Save changes
|
|
556
|
+
Edit = "edit",// Displays edit button
|
|
557
|
+
Drop = "drop",// Displays drop button
|
|
558
|
+
Sort = "sort",// Sort
|
|
559
|
+
InlineEdit = "inline-edit",// Be able to edit columns inside the table
|
|
560
|
+
InlineCreate = "inline-create",// Be able to append a new editable row (needs InlineEdit in order to be editable)
|
|
561
|
+
ModalCreate = "modal-create",// Be able to append a new row after save a modal form
|
|
562
|
+
InlineCreateEver = "inline-create-ever"
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
type ValidTablePermission = TablePermission | string;
|
|
566
|
+
|
|
567
|
+
interface HeaderConfig {
|
|
568
|
+
tag?: string;
|
|
569
|
+
class?: string;
|
|
570
|
+
text?: string;
|
|
571
|
+
icon?: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
interface TableConfig {
|
|
575
|
+
modelValue: LktObject[];
|
|
576
|
+
type?: TableType;
|
|
577
|
+
columns: Column[];
|
|
578
|
+
resource?: string;
|
|
579
|
+
noResultsText?: string;
|
|
580
|
+
filters?: LktObject[];
|
|
581
|
+
hideEmptyColumns?: boolean;
|
|
582
|
+
itemDisplayChecker?: Function;
|
|
583
|
+
loading?: boolean;
|
|
584
|
+
page?: number;
|
|
585
|
+
perms?: ValidTablePermission[];
|
|
586
|
+
editMode?: boolean;
|
|
587
|
+
dataStateConfig?: LktObject;
|
|
588
|
+
sortable?: boolean;
|
|
589
|
+
sorter?: Function;
|
|
590
|
+
initialSorting?: boolean;
|
|
591
|
+
draggableChecker?: Function;
|
|
592
|
+
checkValidDrag?: Function;
|
|
593
|
+
renderDrag?: boolean | Function;
|
|
594
|
+
disabledDrag?: boolean | Function;
|
|
595
|
+
draggableItemKey?: string;
|
|
596
|
+
header?: HeaderConfig;
|
|
597
|
+
title?: string;
|
|
598
|
+
titleTag?: string;
|
|
599
|
+
titleIcon?: string;
|
|
600
|
+
headerClass?: string;
|
|
601
|
+
saveButton?: ButtonConfig;
|
|
602
|
+
createButton?: ButtonConfig;
|
|
603
|
+
dropButton?: ButtonConfig;
|
|
604
|
+
wrapContentTag?: string;
|
|
605
|
+
wrapContentClass?: string;
|
|
606
|
+
itemsContainerClass?: string;
|
|
607
|
+
hiddenSave?: boolean;
|
|
608
|
+
saveDisabled?: boolean;
|
|
609
|
+
saveValidator?: Function;
|
|
610
|
+
saveConfirm?: string;
|
|
611
|
+
confirmData?: LktObject;
|
|
612
|
+
saveResource?: string;
|
|
613
|
+
saveResourceData?: LktObject;
|
|
614
|
+
saveTooltipEngine?: string;
|
|
615
|
+
splitSave?: boolean;
|
|
616
|
+
saveText?: string;
|
|
617
|
+
createText?: string;
|
|
618
|
+
createIcon?: string;
|
|
619
|
+
createRoute?: string;
|
|
620
|
+
dropText?: string;
|
|
621
|
+
dropIcon?: string;
|
|
622
|
+
editText?: string;
|
|
623
|
+
editIcon?: string;
|
|
624
|
+
editLink?: string;
|
|
625
|
+
editModeText?: string;
|
|
626
|
+
switchEditionEnabled?: boolean;
|
|
627
|
+
createDisabled?: boolean;
|
|
628
|
+
dropConfirm?: string;
|
|
629
|
+
dropResource?: string;
|
|
630
|
+
addNavigation?: boolean;
|
|
631
|
+
createEnabledValidator?: Function;
|
|
632
|
+
newValueGenerator?: Function;
|
|
633
|
+
requiredItemsForTopCreate?: number;
|
|
634
|
+
requiredItemsForBottomCreate?: number;
|
|
635
|
+
slotItemVar?: string;
|
|
636
|
+
modal?: string;
|
|
637
|
+
modalData?: LktObject;
|
|
638
|
+
itemMode?: boolean;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
declare class LktStrictItem extends LktItem {
|
|
642
|
+
lktStrictItem: boolean;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
declare class Tooltip extends LktItem implements TooltipConfig {
|
|
646
|
+
static lktDefaultValues: (keyof TooltipConfig)[];
|
|
647
|
+
modelValue: boolean;
|
|
648
|
+
alwaysOpen: boolean;
|
|
649
|
+
class: string;
|
|
650
|
+
text: string;
|
|
651
|
+
icon: string;
|
|
652
|
+
iconAtEnd: boolean;
|
|
653
|
+
engine: TooltipPositionEngine;
|
|
654
|
+
referrerWidth: boolean;
|
|
655
|
+
referrerMargin: number | string;
|
|
656
|
+
windowMargin: number | string;
|
|
657
|
+
referrer: HTMLElement | undefined;
|
|
658
|
+
locationY: TooltipLocationY;
|
|
659
|
+
locationX: TooltipLocationX;
|
|
660
|
+
constructor(data?: Partial<TooltipConfig>);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
declare class Modal extends LktItem implements ModalConfig {
|
|
664
|
+
static lktDefaultValues: (keyof ModalConfig)[];
|
|
665
|
+
size: string;
|
|
666
|
+
preTitle: string;
|
|
667
|
+
preTitleIcon: string;
|
|
668
|
+
title: string;
|
|
669
|
+
closeIcon: string;
|
|
670
|
+
closeConfirm: ValidModalName;
|
|
671
|
+
closeConfirmKey: ValidModalKey;
|
|
672
|
+
showClose: boolean;
|
|
673
|
+
disabledClose: boolean;
|
|
674
|
+
disabledVeilClick: boolean;
|
|
675
|
+
hiddenFooter: boolean;
|
|
676
|
+
modalName: ValidModalName;
|
|
677
|
+
modalKey: ValidModalKey;
|
|
678
|
+
zIndex: number;
|
|
679
|
+
beforeClose: Function | undefined;
|
|
680
|
+
item: LktObject;
|
|
681
|
+
constructor(data?: Partial<ModalConfig>);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
declare class Table extends LktItem implements TableConfig {
|
|
685
|
+
static lktDefaultValues: (keyof TableConfig)[];
|
|
686
|
+
modelValue: LktObject[];
|
|
687
|
+
type?: TableType;
|
|
688
|
+
columns: Column[];
|
|
689
|
+
resource?: string;
|
|
690
|
+
noResultsText?: string;
|
|
691
|
+
filters?: LktObject[];
|
|
692
|
+
hideEmptyColumns?: boolean;
|
|
693
|
+
itemDisplayChecker?: Function;
|
|
694
|
+
loading?: boolean;
|
|
695
|
+
page?: number;
|
|
696
|
+
perms?: ValidTablePermission[];
|
|
697
|
+
editMode?: boolean;
|
|
698
|
+
dataStateConfig?: LktObject;
|
|
699
|
+
sortable?: boolean;
|
|
700
|
+
sorter?: Function;
|
|
701
|
+
initialSorting?: boolean;
|
|
702
|
+
draggableChecker?: Function;
|
|
703
|
+
checkValidDrag?: Function;
|
|
704
|
+
renderDrag?: boolean | Function;
|
|
705
|
+
disabledDrag?: boolean | Function;
|
|
706
|
+
draggableItemKey?: string;
|
|
707
|
+
header?: HeaderConfig;
|
|
708
|
+
title?: string;
|
|
709
|
+
titleTag?: string;
|
|
710
|
+
titleIcon?: string;
|
|
711
|
+
headerClass?: string;
|
|
712
|
+
saveButton?: ButtonConfig;
|
|
713
|
+
createButton?: ButtonConfig;
|
|
714
|
+
dropButton?: ButtonConfig;
|
|
715
|
+
wrapContentTag?: string;
|
|
716
|
+
wrapContentClass?: string;
|
|
717
|
+
itemsContainerClass?: string;
|
|
718
|
+
hiddenSave?: boolean;
|
|
719
|
+
saveDisabled?: boolean;
|
|
720
|
+
saveValidator?: Function;
|
|
721
|
+
saveConfirm?: string;
|
|
722
|
+
confirmData?: LktObject;
|
|
723
|
+
saveResource?: string;
|
|
724
|
+
saveResourceData?: LktObject;
|
|
725
|
+
saveTooltipEngine?: string;
|
|
726
|
+
splitSave?: boolean;
|
|
727
|
+
saveText?: string;
|
|
728
|
+
createText?: string;
|
|
729
|
+
createIcon?: string;
|
|
730
|
+
createRoute?: string;
|
|
731
|
+
dropText?: string;
|
|
732
|
+
dropIcon?: string;
|
|
733
|
+
editText?: string;
|
|
734
|
+
editIcon?: string;
|
|
735
|
+
editLink?: string;
|
|
736
|
+
editModeText?: string;
|
|
737
|
+
switchEditionEnabled?: boolean;
|
|
738
|
+
createDisabled?: boolean;
|
|
739
|
+
dropConfirm?: string;
|
|
740
|
+
dropResource?: string;
|
|
741
|
+
addNavigation?: boolean;
|
|
742
|
+
createEnabledValidator?: Function;
|
|
743
|
+
newValueGenerator?: Function;
|
|
744
|
+
requiredItemsForTopCreate?: number;
|
|
745
|
+
requiredItemsForBottomCreate?: number;
|
|
746
|
+
slotItemVar?: string;
|
|
747
|
+
modal?: string;
|
|
748
|
+
modalData?: LktObject;
|
|
749
|
+
constructor(data?: Partial<TableConfig>);
|
|
750
|
+
}
|
|
751
|
+
|
|
556
752
|
declare enum ModalType {
|
|
557
753
|
Modal = "modal",
|
|
558
754
|
Confirm = "confirm"
|
|
@@ -563,17 +759,13 @@ declare enum SortDirection {
|
|
|
563
759
|
Desc = "desc"
|
|
564
760
|
}
|
|
565
761
|
|
|
566
|
-
declare enum TableType {
|
|
567
|
-
Table = "table",
|
|
568
|
-
Item = "item",
|
|
569
|
-
Ul = "ul",
|
|
570
|
-
Ol = "ol"
|
|
571
|
-
}
|
|
572
|
-
|
|
573
762
|
/**
|
|
574
763
|
* Export common interfaces
|
|
575
764
|
*/
|
|
576
765
|
|
|
577
|
-
declare function getDefaultValues<T>(cls:
|
|
766
|
+
declare function getDefaultValues<T>(cls: {
|
|
767
|
+
new (): T;
|
|
768
|
+
lktDefaultValues: (keyof T)[];
|
|
769
|
+
}): Partial<T>;
|
|
578
770
|
|
|
579
|
-
export { Anchor, type AnchorConfig, AnchorType, Button, type ButtonConfig, ButtonType, Column, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, LktItem, type LktObject, LktStrictItem, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, SafeString, SortDirection, TableType, ToggleMode, type TooltipConfig, TooltipLocationX, TooltipLocationY, TooltipPositionEngine, type ValidColSpan, type ValidFieldMinMax, type ValidFieldValue, type ValidModalKey, type ValidModalName, type ValidOptionValue, type ValidSafeStringValue, type ValidTabIndex, getDefaultValues };
|
|
771
|
+
export { Anchor, type AnchorConfig, AnchorType, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, LktItem, type LktObject, LktStrictItem, Modal, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, SafeString, SortDirection, Table, type TableConfig, TablePermission, TableType, ToggleMode, Tooltip, type TooltipConfig, TooltipLocationX, TooltipLocationY, TooltipPositionEngine, type ValidColSpan, type ValidFieldMinMax, type ValidFieldValue, type ValidModalKey, type ValidModalName, type ValidOptionValue, type ValidSafeStringValue, type ValidTabIndex, getDefaultValues };
|
package/dist/index.js
CHANGED
|
@@ -4,11 +4,12 @@ var skipDataProps = [
|
|
|
4
4
|
"lktStrictItem",
|
|
5
5
|
"lktExcludedProps"
|
|
6
6
|
];
|
|
7
|
-
var LktItem = class {
|
|
8
|
-
lktAllowUndefinedProps = [];
|
|
9
|
-
lktExcludedProps = [];
|
|
10
|
-
lktDateProps = [];
|
|
11
|
-
lktStrictItem = false;
|
|
7
|
+
var LktItem = class _LktItem {
|
|
8
|
+
static lktAllowUndefinedProps = [];
|
|
9
|
+
static lktExcludedProps = [];
|
|
10
|
+
static lktDateProps = [];
|
|
11
|
+
static lktStrictItem = false;
|
|
12
|
+
static lktDefaultValues = [];
|
|
12
13
|
constructor(data) {
|
|
13
14
|
}
|
|
14
15
|
feed(data = {}, target = this) {
|
|
@@ -16,9 +17,9 @@ var LktItem = class {
|
|
|
16
17
|
for (const [key, value] of Object.entries(data)) target.assignProp(key, value);
|
|
17
18
|
}
|
|
18
19
|
assignProp(key, value) {
|
|
19
|
-
if (skipDataProps.includes(key) ||
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
20
|
+
if (skipDataProps.includes(key) || _LktItem.lktExcludedProps.includes(key)) return;
|
|
21
|
+
if (_LktItem.lktStrictItem && !this.hasOwnProperty(key)) return;
|
|
22
|
+
if (_LktItem.lktDateProps.includes(key)) {
|
|
22
23
|
this[key] = new Date(value);
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
@@ -228,9 +229,23 @@ var AnchorType = /* @__PURE__ */ ((AnchorType2) => {
|
|
|
228
229
|
|
|
229
230
|
// src/instances/Anchor.ts
|
|
230
231
|
var Anchor = class extends LktItem {
|
|
231
|
-
lktAllowUndefinedProps = [
|
|
232
|
+
static lktAllowUndefinedProps = [
|
|
232
233
|
"onClick"
|
|
233
234
|
];
|
|
235
|
+
static lktDefaultValues = [
|
|
236
|
+
"type",
|
|
237
|
+
"to",
|
|
238
|
+
"class",
|
|
239
|
+
"isActive",
|
|
240
|
+
"downloadFileName",
|
|
241
|
+
"disabled",
|
|
242
|
+
"onClick",
|
|
243
|
+
"confirmModal",
|
|
244
|
+
"confirmModalKey",
|
|
245
|
+
"confirmData",
|
|
246
|
+
"imposter",
|
|
247
|
+
"external"
|
|
248
|
+
];
|
|
234
249
|
type = "router-link" /* RouterLink */;
|
|
235
250
|
to = "";
|
|
236
251
|
class = "";
|
|
@@ -242,10 +257,7 @@ var Anchor = class extends LktItem {
|
|
|
242
257
|
confirmModalKey = "_";
|
|
243
258
|
confirmData = {};
|
|
244
259
|
imposter = false;
|
|
245
|
-
|
|
246
|
-
super();
|
|
247
|
-
this.feed(data);
|
|
248
|
-
}
|
|
260
|
+
external = false;
|
|
249
261
|
getHref() {
|
|
250
262
|
let href = "";
|
|
251
263
|
if (typeof this.to === "string") href = this.to;
|
|
@@ -263,6 +275,10 @@ var Anchor = class extends LktItem {
|
|
|
263
275
|
if (typeof this.to === "string" && this.to !== "") return this.to;
|
|
264
276
|
return "";
|
|
265
277
|
}
|
|
278
|
+
constructor(data = {}) {
|
|
279
|
+
super();
|
|
280
|
+
this.feed(data);
|
|
281
|
+
}
|
|
266
282
|
};
|
|
267
283
|
|
|
268
284
|
// src/enums/ButtonType.ts
|
|
@@ -302,11 +318,51 @@ var Button = class extends LktItem {
|
|
|
302
318
|
"showTooltipOnHover",
|
|
303
319
|
"hideTooltipOnLeave"
|
|
304
320
|
];
|
|
321
|
+
static lktDefaultValues = [
|
|
322
|
+
"type",
|
|
323
|
+
"name",
|
|
324
|
+
"palette",
|
|
325
|
+
"class",
|
|
326
|
+
"containerClass",
|
|
327
|
+
"value",
|
|
328
|
+
"disabled",
|
|
329
|
+
"loading",
|
|
330
|
+
"wrapContent",
|
|
331
|
+
"split",
|
|
332
|
+
"splitIcon",
|
|
333
|
+
"resource",
|
|
334
|
+
"resourceData",
|
|
335
|
+
"modal",
|
|
336
|
+
"modalKey",
|
|
337
|
+
"modalData",
|
|
338
|
+
"confirmModal",
|
|
339
|
+
"confirmModalKey",
|
|
340
|
+
"confirmData",
|
|
341
|
+
"text",
|
|
342
|
+
"icon",
|
|
343
|
+
"iconDot",
|
|
344
|
+
"iconEnd",
|
|
345
|
+
"img",
|
|
346
|
+
"tooltip",
|
|
347
|
+
"showTooltipOnHoverDelay",
|
|
348
|
+
"tooltipWindowMargin",
|
|
349
|
+
"tooltipReferrerMargin",
|
|
350
|
+
"tooltipLocationY",
|
|
351
|
+
"tooltipLocationX",
|
|
352
|
+
"checked",
|
|
353
|
+
"clickRef",
|
|
354
|
+
"openTooltip",
|
|
355
|
+
"tabindex",
|
|
356
|
+
"anchor",
|
|
357
|
+
"tooltipEngine",
|
|
358
|
+
"showTooltipOnHover",
|
|
359
|
+
"hideTooltipOnLeave",
|
|
360
|
+
"tooltipClass",
|
|
361
|
+
"splitClass"
|
|
362
|
+
];
|
|
305
363
|
type = "button" /* Button */;
|
|
306
364
|
name = generateRandomString2(10);
|
|
307
365
|
palette = "";
|
|
308
|
-
onClickTo = "";
|
|
309
|
-
onClickToExternal = false;
|
|
310
366
|
class = "";
|
|
311
367
|
containerClass = "";
|
|
312
368
|
value = "";
|
|
@@ -315,23 +371,19 @@ var Button = class extends LktItem {
|
|
|
315
371
|
wrapContent = false;
|
|
316
372
|
split = false;
|
|
317
373
|
splitIcon = "";
|
|
318
|
-
isAnchor = false;
|
|
319
374
|
resource = "";
|
|
320
|
-
resourceData =
|
|
375
|
+
resourceData = {};
|
|
321
376
|
modal = "";
|
|
322
377
|
modalKey = "_";
|
|
323
|
-
modalData =
|
|
378
|
+
modalData = {};
|
|
324
379
|
confirmModal = "";
|
|
325
380
|
confirmModalKey = "_";
|
|
326
|
-
confirmData =
|
|
381
|
+
confirmData = {};
|
|
327
382
|
text = "";
|
|
328
383
|
icon = "";
|
|
329
384
|
iconDot = false;
|
|
330
385
|
iconEnd = "";
|
|
331
386
|
img = "";
|
|
332
|
-
newTab = false;
|
|
333
|
-
download = false;
|
|
334
|
-
downloadFileName = "";
|
|
335
387
|
tooltip = false;
|
|
336
388
|
showTooltipOnHoverDelay = 0;
|
|
337
389
|
tooltipWindowMargin = 0;
|
|
@@ -368,6 +420,26 @@ var Column = class extends LktItem {
|
|
|
368
420
|
"link",
|
|
369
421
|
"action"
|
|
370
422
|
];
|
|
423
|
+
static lktDefaultValues = [
|
|
424
|
+
"type",
|
|
425
|
+
"key",
|
|
426
|
+
"label",
|
|
427
|
+
"sortable",
|
|
428
|
+
"hidden",
|
|
429
|
+
"editable",
|
|
430
|
+
"formatter",
|
|
431
|
+
"checkEmpty",
|
|
432
|
+
"colspan",
|
|
433
|
+
"preferSlot",
|
|
434
|
+
"isForRowKey",
|
|
435
|
+
"extractTitleFromColumn",
|
|
436
|
+
"slotData",
|
|
437
|
+
"field",
|
|
438
|
+
"anchor",
|
|
439
|
+
"button",
|
|
440
|
+
"link",
|
|
441
|
+
"action"
|
|
442
|
+
];
|
|
371
443
|
type = "" /* None */;
|
|
372
444
|
key = "";
|
|
373
445
|
label = "";
|
|
@@ -386,7 +458,7 @@ var Column = class extends LktItem {
|
|
|
386
458
|
button = void 0;
|
|
387
459
|
link = void 0;
|
|
388
460
|
action = void 0;
|
|
389
|
-
constructor(data) {
|
|
461
|
+
constructor(data = {}) {
|
|
390
462
|
super();
|
|
391
463
|
this.feed(data);
|
|
392
464
|
switch (this.type) {
|
|
@@ -414,6 +486,256 @@ var Column = class extends LktItem {
|
|
|
414
486
|
}
|
|
415
487
|
};
|
|
416
488
|
|
|
489
|
+
// src/enums/TooltipLocationY.ts
|
|
490
|
+
var TooltipLocationY = /* @__PURE__ */ ((TooltipLocationY2) => {
|
|
491
|
+
TooltipLocationY2["Top"] = "top";
|
|
492
|
+
TooltipLocationY2["Bottom"] = "bottom";
|
|
493
|
+
TooltipLocationY2["Center"] = "center";
|
|
494
|
+
TooltipLocationY2["ReferrerCenter"] = "referrer-center";
|
|
495
|
+
return TooltipLocationY2;
|
|
496
|
+
})(TooltipLocationY || {});
|
|
497
|
+
|
|
498
|
+
// src/enums/TooltipLocationX.ts
|
|
499
|
+
var TooltipLocationX = /* @__PURE__ */ ((TooltipLocationX2) => {
|
|
500
|
+
TooltipLocationX2["Left"] = "left";
|
|
501
|
+
TooltipLocationX2["Right"] = "right";
|
|
502
|
+
TooltipLocationX2["Center"] = "center";
|
|
503
|
+
TooltipLocationX2["LeftCorner"] = "left-corner";
|
|
504
|
+
TooltipLocationX2["RightCorner"] = "right-corner";
|
|
505
|
+
return TooltipLocationX2;
|
|
506
|
+
})(TooltipLocationX || {});
|
|
507
|
+
|
|
508
|
+
// src/instances/Tooltip.ts
|
|
509
|
+
var Tooltip = class extends LktItem {
|
|
510
|
+
static lktDefaultValues = [
|
|
511
|
+
"modelValue",
|
|
512
|
+
"alwaysOpen",
|
|
513
|
+
"class",
|
|
514
|
+
"text",
|
|
515
|
+
"icon",
|
|
516
|
+
"iconAtEnd",
|
|
517
|
+
"engine",
|
|
518
|
+
"referrerWidth",
|
|
519
|
+
"referrerMargin",
|
|
520
|
+
"windowMargin",
|
|
521
|
+
"referrer",
|
|
522
|
+
"locationY",
|
|
523
|
+
"locationX"
|
|
524
|
+
];
|
|
525
|
+
modelValue = false;
|
|
526
|
+
alwaysOpen = false;
|
|
527
|
+
class = "";
|
|
528
|
+
text = "";
|
|
529
|
+
icon = "";
|
|
530
|
+
iconAtEnd = false;
|
|
531
|
+
engine = "fixed" /* Fixed */;
|
|
532
|
+
referrerWidth = false;
|
|
533
|
+
referrerMargin = 0;
|
|
534
|
+
windowMargin = 0;
|
|
535
|
+
referrer = void 0;
|
|
536
|
+
locationY = "bottom" /* Bottom */;
|
|
537
|
+
locationX = "left-corner" /* LeftCorner */;
|
|
538
|
+
constructor(data = {}) {
|
|
539
|
+
super();
|
|
540
|
+
this.feed(data);
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
// src/instances/Modal.ts
|
|
545
|
+
var Modal = class extends LktItem {
|
|
546
|
+
static lktDefaultValues = [
|
|
547
|
+
"size",
|
|
548
|
+
"preTitle",
|
|
549
|
+
"preTitleIcon",
|
|
550
|
+
"title",
|
|
551
|
+
"closeIcon",
|
|
552
|
+
"closeConfirm",
|
|
553
|
+
"closeConfirmKey",
|
|
554
|
+
"showClose",
|
|
555
|
+
"disabledClose",
|
|
556
|
+
"disabledVeilClick",
|
|
557
|
+
"hiddenFooter",
|
|
558
|
+
"modalName",
|
|
559
|
+
"modalKey",
|
|
560
|
+
"zIndex",
|
|
561
|
+
"beforeClose",
|
|
562
|
+
"item"
|
|
563
|
+
];
|
|
564
|
+
size = "";
|
|
565
|
+
preTitle = "";
|
|
566
|
+
preTitleIcon = "";
|
|
567
|
+
title = "";
|
|
568
|
+
closeIcon = "";
|
|
569
|
+
closeConfirm = "";
|
|
570
|
+
closeConfirmKey = "_";
|
|
571
|
+
showClose = true;
|
|
572
|
+
disabledClose = false;
|
|
573
|
+
disabledVeilClick = false;
|
|
574
|
+
hiddenFooter = false;
|
|
575
|
+
modalName = "";
|
|
576
|
+
modalKey = "_";
|
|
577
|
+
zIndex = 500;
|
|
578
|
+
beforeClose = void 0;
|
|
579
|
+
item = {};
|
|
580
|
+
constructor(data = {}) {
|
|
581
|
+
super();
|
|
582
|
+
this.feed(data);
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
// src/enums/TableType.ts
|
|
587
|
+
var TableType = /* @__PURE__ */ ((TableType2) => {
|
|
588
|
+
TableType2["Table"] = "table";
|
|
589
|
+
TableType2["Item"] = "item";
|
|
590
|
+
TableType2["Ul"] = "ul";
|
|
591
|
+
TableType2["Ol"] = "ol";
|
|
592
|
+
return TableType2;
|
|
593
|
+
})(TableType || {});
|
|
594
|
+
|
|
595
|
+
// src/instances/Table.ts
|
|
596
|
+
var Table = class extends LktItem {
|
|
597
|
+
static lktDefaultValues = [
|
|
598
|
+
"modelValue",
|
|
599
|
+
"type",
|
|
600
|
+
"columns",
|
|
601
|
+
"resource",
|
|
602
|
+
"noResultsText",
|
|
603
|
+
"filters",
|
|
604
|
+
"hideEmptyColumns",
|
|
605
|
+
"itemDisplayChecker",
|
|
606
|
+
"loading",
|
|
607
|
+
"page",
|
|
608
|
+
"perms",
|
|
609
|
+
"editMode",
|
|
610
|
+
"dataStateConfig",
|
|
611
|
+
"sortable",
|
|
612
|
+
"sorter",
|
|
613
|
+
"initialSorting",
|
|
614
|
+
"draggableChecker",
|
|
615
|
+
"checkValidDrag",
|
|
616
|
+
"renderDrag",
|
|
617
|
+
"disabledDrag",
|
|
618
|
+
"draggableItemKey",
|
|
619
|
+
"header",
|
|
620
|
+
"title",
|
|
621
|
+
"titleTag",
|
|
622
|
+
"titleIcon",
|
|
623
|
+
"headerClass",
|
|
624
|
+
"saveButton",
|
|
625
|
+
"createButton",
|
|
626
|
+
"dropButton",
|
|
627
|
+
"wrapContentTag",
|
|
628
|
+
"wrapContentClass",
|
|
629
|
+
"itemsContainerClass",
|
|
630
|
+
"hiddenSave",
|
|
631
|
+
"saveDisabled",
|
|
632
|
+
"saveValidator",
|
|
633
|
+
"saveConfirm",
|
|
634
|
+
"confirmData",
|
|
635
|
+
"saveResource",
|
|
636
|
+
"saveResourceData",
|
|
637
|
+
"saveTooltipEngine",
|
|
638
|
+
"splitSave",
|
|
639
|
+
"saveText",
|
|
640
|
+
"createText",
|
|
641
|
+
"createIcon",
|
|
642
|
+
"createRoute",
|
|
643
|
+
"dropText",
|
|
644
|
+
"dropIcon",
|
|
645
|
+
"editText",
|
|
646
|
+
"editIcon",
|
|
647
|
+
"editLink",
|
|
648
|
+
"editModeText",
|
|
649
|
+
"switchEditionEnabled",
|
|
650
|
+
"createDisabled",
|
|
651
|
+
"dropConfirm",
|
|
652
|
+
"dropResource",
|
|
653
|
+
"addNavigation",
|
|
654
|
+
"createEnabledValidator",
|
|
655
|
+
"newValueGenerator",
|
|
656
|
+
"requiredItemsForTopCreate",
|
|
657
|
+
"requiredItemsForBottomCreate",
|
|
658
|
+
"slotItemVar",
|
|
659
|
+
"modal",
|
|
660
|
+
"modalData"
|
|
661
|
+
];
|
|
662
|
+
// Data
|
|
663
|
+
modelValue = [];
|
|
664
|
+
type = "table" /* Table */;
|
|
665
|
+
columns = [];
|
|
666
|
+
resource = "";
|
|
667
|
+
noResultsText = "";
|
|
668
|
+
filters = [];
|
|
669
|
+
// Data visualization
|
|
670
|
+
hideEmptyColumns = false;
|
|
671
|
+
itemDisplayChecker = void 0;
|
|
672
|
+
// State
|
|
673
|
+
loading = false;
|
|
674
|
+
page = 1;
|
|
675
|
+
perms = [];
|
|
676
|
+
editMode = false;
|
|
677
|
+
dataStateConfig = {};
|
|
678
|
+
// Sort
|
|
679
|
+
sortable = false;
|
|
680
|
+
sorter = void 0;
|
|
681
|
+
initialSorting = false;
|
|
682
|
+
// Drag (Old)
|
|
683
|
+
draggableChecker;
|
|
684
|
+
checkValidDrag;
|
|
685
|
+
renderDrag;
|
|
686
|
+
disabledDrag;
|
|
687
|
+
draggableItemKey;
|
|
688
|
+
// New proposed prop: header
|
|
689
|
+
header;
|
|
690
|
+
// Replaces:
|
|
691
|
+
title = "";
|
|
692
|
+
titleTag = "h2";
|
|
693
|
+
titleIcon = "";
|
|
694
|
+
headerClass = "";
|
|
695
|
+
// New proposed prop: saveButton
|
|
696
|
+
saveButton = {};
|
|
697
|
+
createButton = {};
|
|
698
|
+
dropButton = {};
|
|
699
|
+
wrapContentTag = "div";
|
|
700
|
+
wrapContentClass = "";
|
|
701
|
+
itemsContainerClass = "";
|
|
702
|
+
hiddenSave = false;
|
|
703
|
+
saveDisabled = false;
|
|
704
|
+
saveValidator = void 0;
|
|
705
|
+
saveConfirm = "";
|
|
706
|
+
confirmData = {};
|
|
707
|
+
saveResource = "";
|
|
708
|
+
saveResourceData = {};
|
|
709
|
+
saveTooltipEngine = "absolute" /* Absolute */;
|
|
710
|
+
splitSave = false;
|
|
711
|
+
saveText = "";
|
|
712
|
+
createText = "";
|
|
713
|
+
createIcon = "";
|
|
714
|
+
createRoute = "";
|
|
715
|
+
dropText = "";
|
|
716
|
+
dropIcon = "";
|
|
717
|
+
editText = "";
|
|
718
|
+
editIcon = "";
|
|
719
|
+
editLink = "";
|
|
720
|
+
editModeText = "";
|
|
721
|
+
switchEditionEnabled = false;
|
|
722
|
+
createDisabled = false;
|
|
723
|
+
dropConfirm = "";
|
|
724
|
+
dropResource = "";
|
|
725
|
+
addNavigation = false;
|
|
726
|
+
createEnabledValidator = void 0;
|
|
727
|
+
newValueGenerator = void 0;
|
|
728
|
+
requiredItemsForTopCreate = 0;
|
|
729
|
+
requiredItemsForBottomCreate = 0;
|
|
730
|
+
slotItemVar = "item";
|
|
731
|
+
modal = "";
|
|
732
|
+
modalData = {};
|
|
733
|
+
constructor(data = {}) {
|
|
734
|
+
super();
|
|
735
|
+
this.feed(data);
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
|
|
417
739
|
// src/enums/ModalType.ts
|
|
418
740
|
var ModalType = /* @__PURE__ */ ((ModalType2) => {
|
|
419
741
|
ModalType2["Modal"] = "modal";
|
|
@@ -428,14 +750,19 @@ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
|
|
|
428
750
|
return SortDirection2;
|
|
429
751
|
})(SortDirection || {});
|
|
430
752
|
|
|
431
|
-
// src/enums/
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
753
|
+
// src/enums/TablePermission.ts
|
|
754
|
+
var TablePermission = /* @__PURE__ */ ((TablePermission2) => {
|
|
755
|
+
TablePermission2["Create"] = "create";
|
|
756
|
+
TablePermission2["Update"] = "update";
|
|
757
|
+
TablePermission2["Edit"] = "edit";
|
|
758
|
+
TablePermission2["Drop"] = "drop";
|
|
759
|
+
TablePermission2["Sort"] = "sort";
|
|
760
|
+
TablePermission2["InlineEdit"] = "inline-edit";
|
|
761
|
+
TablePermission2["InlineCreate"] = "inline-create";
|
|
762
|
+
TablePermission2["ModalCreate"] = "modal-create";
|
|
763
|
+
TablePermission2["InlineCreateEver"] = "inline-create-ever";
|
|
764
|
+
return TablePermission2;
|
|
765
|
+
})(TablePermission || {});
|
|
439
766
|
|
|
440
767
|
// src/enums/ToggleMode.ts
|
|
441
768
|
var ToggleMode = /* @__PURE__ */ ((ToggleMode2) => {
|
|
@@ -444,29 +771,19 @@ var ToggleMode = /* @__PURE__ */ ((ToggleMode2) => {
|
|
|
444
771
|
return ToggleMode2;
|
|
445
772
|
})(ToggleMode || {});
|
|
446
773
|
|
|
447
|
-
// src/enums/TooltipLocationY.ts
|
|
448
|
-
var TooltipLocationY = /* @__PURE__ */ ((TooltipLocationY2) => {
|
|
449
|
-
TooltipLocationY2["Top"] = "top";
|
|
450
|
-
TooltipLocationY2["Bottom"] = "bottom";
|
|
451
|
-
TooltipLocationY2["Center"] = "center";
|
|
452
|
-
TooltipLocationY2["ReferrerCenter"] = "referrer-center";
|
|
453
|
-
return TooltipLocationY2;
|
|
454
|
-
})(TooltipLocationY || {});
|
|
455
|
-
|
|
456
|
-
// src/enums/TooltipLocationX.ts
|
|
457
|
-
var TooltipLocationX = /* @__PURE__ */ ((TooltipLocationX2) => {
|
|
458
|
-
TooltipLocationX2["Left"] = "left";
|
|
459
|
-
TooltipLocationX2["Right"] = "right";
|
|
460
|
-
TooltipLocationX2["Center"] = "center";
|
|
461
|
-
TooltipLocationX2["LeftCorner"] = "left-corner";
|
|
462
|
-
TooltipLocationX2["RightCorner"] = "right-corner";
|
|
463
|
-
return TooltipLocationX2;
|
|
464
|
-
})(TooltipLocationX || {});
|
|
465
|
-
|
|
466
774
|
// src/index.ts
|
|
467
775
|
function getDefaultValues(cls) {
|
|
468
776
|
const instance = new cls();
|
|
469
|
-
|
|
777
|
+
const result = {};
|
|
778
|
+
if (!Array.isArray(cls.lktDefaultValues)) {
|
|
779
|
+
throw new Error("lktDefaultValues must be a keys array.");
|
|
780
|
+
}
|
|
781
|
+
for (const key of cls.lktDefaultValues) {
|
|
782
|
+
if (key in instance) {
|
|
783
|
+
result[key] = instance[key];
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
return result;
|
|
470
787
|
}
|
|
471
788
|
export {
|
|
472
789
|
Anchor,
|
|
@@ -480,13 +797,17 @@ export {
|
|
|
480
797
|
FieldType,
|
|
481
798
|
LktItem,
|
|
482
799
|
LktStrictItem,
|
|
800
|
+
Modal,
|
|
483
801
|
ModalType,
|
|
484
802
|
MultipleOptionsDisplay,
|
|
485
803
|
Option,
|
|
486
804
|
SafeString,
|
|
487
805
|
SortDirection,
|
|
806
|
+
Table,
|
|
807
|
+
TablePermission,
|
|
488
808
|
TableType,
|
|
489
809
|
ToggleMode,
|
|
810
|
+
Tooltip,
|
|
490
811
|
TooltipLocationX,
|
|
491
812
|
TooltipLocationY,
|
|
492
813
|
TooltipPositionEngine,
|