lkt-vue-kernel 1.0.4 → 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 +210 -62
- package/dist/index.js +241 -23
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare class Option extends LktItem implements OptionConfig {
|
|
|
60
60
|
group: string;
|
|
61
61
|
icon: string;
|
|
62
62
|
modal: ValidModalName;
|
|
63
|
-
constructor(data?:
|
|
63
|
+
constructor(data?: Partial<OptionConfig>);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
type ValidFieldValue = string | number | boolean | LktObject | Option[];
|
|
@@ -246,11 +246,14 @@ interface AnchorConfig {
|
|
|
246
246
|
confirmModalKey?: ValidModalKey;
|
|
247
247
|
confirmData?: ModalConfig;
|
|
248
248
|
imposter?: boolean;
|
|
249
|
+
external?: boolean;
|
|
249
250
|
}
|
|
250
251
|
|
|
252
|
+
type ValidDrag = boolean | ((item: LktObject) => boolean);
|
|
253
|
+
|
|
251
254
|
interface DragConfig {
|
|
252
|
-
isDraggable?:
|
|
253
|
-
isValid?:
|
|
255
|
+
isDraggable?: ValidDrag;
|
|
256
|
+
isValid?: ValidDrag;
|
|
254
257
|
canRender?: boolean | Function;
|
|
255
258
|
dragKey?: string;
|
|
256
259
|
}
|
|
@@ -290,8 +293,9 @@ declare class Anchor extends LktItem implements AnchorConfig {
|
|
|
290
293
|
confirmModalKey: ValidModalKey;
|
|
291
294
|
confirmData: LktObject;
|
|
292
295
|
imposter: boolean;
|
|
293
|
-
|
|
296
|
+
external: boolean;
|
|
294
297
|
getHref(): string;
|
|
298
|
+
constructor(data?: Partial<AnchorConfig>);
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
interface ButtonConfig {
|
|
@@ -335,20 +339,37 @@ interface ButtonConfig {
|
|
|
335
339
|
splitClass?: string;
|
|
336
340
|
clickRef?: Element | VueElement;
|
|
337
341
|
tabindex?: ValidTabIndex;
|
|
338
|
-
isAnchor?: boolean;
|
|
339
|
-
onClickTo?: string;
|
|
340
|
-
onClickToExternal?: boolean;
|
|
341
|
-
download?: boolean;
|
|
342
|
-
downloadFileName?: string;
|
|
343
|
-
newTab?: boolean;
|
|
344
|
-
showSwitch?: boolean;
|
|
345
|
-
hiddenSwitch?: boolean;
|
|
346
342
|
}
|
|
347
343
|
|
|
348
|
-
declare
|
|
349
|
-
|
|
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"
|
|
350
361
|
}
|
|
351
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
|
+
|
|
352
373
|
declare class Field extends LktItem implements FieldConfig {
|
|
353
374
|
modelValue: ValidFieldValue;
|
|
354
375
|
type: FieldType;
|
|
@@ -425,45 +446,15 @@ declare class Field extends LktItem implements FieldConfig {
|
|
|
425
446
|
modalKey: string | number | Function;
|
|
426
447
|
modalData: LktObject;
|
|
427
448
|
data: LktObject;
|
|
428
|
-
constructor(data?: FieldConfig);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
declare enum ColumnType {
|
|
432
|
-
None = "",
|
|
433
|
-
Field = "field",
|
|
434
|
-
Button = "button",
|
|
435
|
-
Anchor = "anchor",
|
|
436
|
-
Text = "text",
|
|
437
|
-
Number = "number",
|
|
438
|
-
Check = "check",
|
|
439
|
-
Switch = "switch",
|
|
440
|
-
Select = "select",
|
|
441
|
-
Email = "email",
|
|
442
|
-
Tel = "tel",
|
|
443
|
-
File = "file",
|
|
444
|
-
Link = "link",
|
|
445
|
-
Action = "action",
|
|
446
|
-
Integer = "int",
|
|
447
|
-
Float = "float"
|
|
449
|
+
constructor(data?: Partial<FieldConfig>);
|
|
448
450
|
}
|
|
449
451
|
|
|
450
|
-
type ValidSafeStringValue = string | ((...args: any[]) => string) | undefined | SafeString;
|
|
451
|
-
|
|
452
|
-
declare class SafeString {
|
|
453
|
-
private readonly value;
|
|
454
|
-
constructor(input: ValidSafeStringValue);
|
|
455
|
-
getValue(...args: any[]): string;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
type ValidColSpan = Function | boolean | number | undefined;
|
|
459
|
-
|
|
460
452
|
declare class Button extends LktItem implements ButtonConfig {
|
|
461
453
|
lktAllowUndefinedProps: string[];
|
|
454
|
+
static lktDefaultValues: (keyof ButtonConfig)[];
|
|
462
455
|
type: ButtonType;
|
|
463
456
|
name: string;
|
|
464
457
|
palette: string;
|
|
465
|
-
onClickTo: string;
|
|
466
|
-
onClickToExternal: boolean;
|
|
467
458
|
class: string;
|
|
468
459
|
containerClass: string;
|
|
469
460
|
value: string;
|
|
@@ -472,7 +463,6 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
472
463
|
wrapContent: boolean;
|
|
473
464
|
split: boolean;
|
|
474
465
|
splitIcon: string;
|
|
475
|
-
isAnchor: boolean;
|
|
476
466
|
resource: string;
|
|
477
467
|
resourceData: LktObject;
|
|
478
468
|
modal: ValidModalName;
|
|
@@ -486,9 +476,6 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
486
476
|
iconDot: boolean;
|
|
487
477
|
iconEnd: string;
|
|
488
478
|
img: string;
|
|
489
|
-
newTab: boolean;
|
|
490
|
-
download: boolean;
|
|
491
|
-
downloadFileName: string;
|
|
492
479
|
tooltip: boolean;
|
|
493
480
|
showTooltipOnHoverDelay: number;
|
|
494
481
|
tooltipWindowMargin: number;
|
|
@@ -505,7 +492,7 @@ declare class Button extends LktItem implements ButtonConfig {
|
|
|
505
492
|
hideTooltipOnLeave?: boolean;
|
|
506
493
|
tooltipClass?: string;
|
|
507
494
|
splitClass?: string;
|
|
508
|
-
constructor(data?: ButtonConfig);
|
|
495
|
+
constructor(data?: Partial<ButtonConfig>);
|
|
509
496
|
}
|
|
510
497
|
|
|
511
498
|
interface ColumnConfig {
|
|
@@ -529,9 +516,17 @@ interface ColumnConfig {
|
|
|
529
516
|
action?: Function;
|
|
530
517
|
}
|
|
531
518
|
|
|
519
|
+
declare enum TableType {
|
|
520
|
+
Table = "table",
|
|
521
|
+
Item = "item",
|
|
522
|
+
Ul = "ul",
|
|
523
|
+
Ol = "ol"
|
|
524
|
+
}
|
|
525
|
+
|
|
532
526
|
declare class Column extends LktItem implements ColumnConfig {
|
|
533
527
|
lktExcludedProps: string[];
|
|
534
528
|
lktAllowUndefinedProps: string[];
|
|
529
|
+
static lktDefaultValues: (keyof ColumnConfig)[];
|
|
535
530
|
type: ColumnType;
|
|
536
531
|
key: string;
|
|
537
532
|
label: string;
|
|
@@ -550,11 +545,103 @@ declare class Column extends LktItem implements ColumnConfig {
|
|
|
550
545
|
button: Button | ButtonConfig | undefined;
|
|
551
546
|
link: ValidSafeStringValue | SafeString | undefined;
|
|
552
547
|
action?: Function;
|
|
553
|
-
constructor(data
|
|
548
|
+
constructor(data?: Partial<ColumnConfig>);
|
|
554
549
|
getHref(item: LktObject): string;
|
|
555
550
|
doAction(item: LktObject): any;
|
|
556
551
|
}
|
|
557
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
|
+
|
|
558
645
|
declare class Tooltip extends LktItem implements TooltipConfig {
|
|
559
646
|
static lktDefaultValues: (keyof TooltipConfig)[];
|
|
560
647
|
modelValue: boolean;
|
|
@@ -570,7 +657,7 @@ declare class Tooltip extends LktItem implements TooltipConfig {
|
|
|
570
657
|
referrer: HTMLElement | undefined;
|
|
571
658
|
locationY: TooltipLocationY;
|
|
572
659
|
locationX: TooltipLocationX;
|
|
573
|
-
constructor(data?:
|
|
660
|
+
constructor(data?: Partial<TooltipConfig>);
|
|
574
661
|
}
|
|
575
662
|
|
|
576
663
|
declare class Modal extends LktItem implements ModalConfig {
|
|
@@ -591,7 +678,75 @@ declare class Modal extends LktItem implements ModalConfig {
|
|
|
591
678
|
zIndex: number;
|
|
592
679
|
beforeClose: Function | undefined;
|
|
593
680
|
item: LktObject;
|
|
594
|
-
constructor(data?:
|
|
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>);
|
|
595
750
|
}
|
|
596
751
|
|
|
597
752
|
declare enum ModalType {
|
|
@@ -604,13 +759,6 @@ declare enum SortDirection {
|
|
|
604
759
|
Desc = "desc"
|
|
605
760
|
}
|
|
606
761
|
|
|
607
|
-
declare enum TableType {
|
|
608
|
-
Table = "table",
|
|
609
|
-
Item = "item",
|
|
610
|
-
Ul = "ul",
|
|
611
|
-
Ol = "ol"
|
|
612
|
-
}
|
|
613
|
-
|
|
614
762
|
/**
|
|
615
763
|
* Export common interfaces
|
|
616
764
|
*/
|
|
@@ -620,4 +768,4 @@ declare function getDefaultValues<T>(cls: {
|
|
|
620
768
|
lktDefaultValues: (keyof T)[];
|
|
621
769
|
}): Partial<T>;
|
|
622
770
|
|
|
623
|
-
export { Anchor, type AnchorConfig, AnchorType, Button, type ButtonConfig, ButtonType, Column, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, LktItem, type LktObject, LktStrictItem, Modal, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, SafeString, SortDirection, 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 };
|
|
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
|
@@ -243,7 +243,8 @@ var Anchor = class extends LktItem {
|
|
|
243
243
|
"confirmModal",
|
|
244
244
|
"confirmModalKey",
|
|
245
245
|
"confirmData",
|
|
246
|
-
"imposter"
|
|
246
|
+
"imposter",
|
|
247
|
+
"external"
|
|
247
248
|
];
|
|
248
249
|
type = "router-link" /* RouterLink */;
|
|
249
250
|
to = "";
|
|
@@ -256,10 +257,7 @@ var Anchor = class extends LktItem {
|
|
|
256
257
|
confirmModalKey = "_";
|
|
257
258
|
confirmData = {};
|
|
258
259
|
imposter = false;
|
|
259
|
-
|
|
260
|
-
super();
|
|
261
|
-
this.feed(data);
|
|
262
|
-
}
|
|
260
|
+
external = false;
|
|
263
261
|
getHref() {
|
|
264
262
|
let href = "";
|
|
265
263
|
if (typeof this.to === "string") href = this.to;
|
|
@@ -277,6 +275,10 @@ var Anchor = class extends LktItem {
|
|
|
277
275
|
if (typeof this.to === "string" && this.to !== "") return this.to;
|
|
278
276
|
return "";
|
|
279
277
|
}
|
|
278
|
+
constructor(data = {}) {
|
|
279
|
+
super();
|
|
280
|
+
this.feed(data);
|
|
281
|
+
}
|
|
280
282
|
};
|
|
281
283
|
|
|
282
284
|
// src/enums/ButtonType.ts
|
|
@@ -316,11 +318,51 @@ var Button = class extends LktItem {
|
|
|
316
318
|
"showTooltipOnHover",
|
|
317
319
|
"hideTooltipOnLeave"
|
|
318
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
|
+
];
|
|
319
363
|
type = "button" /* Button */;
|
|
320
364
|
name = generateRandomString2(10);
|
|
321
365
|
palette = "";
|
|
322
|
-
onClickTo = "";
|
|
323
|
-
onClickToExternal = false;
|
|
324
366
|
class = "";
|
|
325
367
|
containerClass = "";
|
|
326
368
|
value = "";
|
|
@@ -329,23 +371,19 @@ var Button = class extends LktItem {
|
|
|
329
371
|
wrapContent = false;
|
|
330
372
|
split = false;
|
|
331
373
|
splitIcon = "";
|
|
332
|
-
isAnchor = false;
|
|
333
374
|
resource = "";
|
|
334
|
-
resourceData =
|
|
375
|
+
resourceData = {};
|
|
335
376
|
modal = "";
|
|
336
377
|
modalKey = "_";
|
|
337
|
-
modalData =
|
|
378
|
+
modalData = {};
|
|
338
379
|
confirmModal = "";
|
|
339
380
|
confirmModalKey = "_";
|
|
340
|
-
confirmData =
|
|
381
|
+
confirmData = {};
|
|
341
382
|
text = "";
|
|
342
383
|
icon = "";
|
|
343
384
|
iconDot = false;
|
|
344
385
|
iconEnd = "";
|
|
345
386
|
img = "";
|
|
346
|
-
newTab = false;
|
|
347
|
-
download = false;
|
|
348
|
-
downloadFileName = "";
|
|
349
387
|
tooltip = false;
|
|
350
388
|
showTooltipOnHoverDelay = 0;
|
|
351
389
|
tooltipWindowMargin = 0;
|
|
@@ -382,6 +420,26 @@ var Column = class extends LktItem {
|
|
|
382
420
|
"link",
|
|
383
421
|
"action"
|
|
384
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
|
+
];
|
|
385
443
|
type = "" /* None */;
|
|
386
444
|
key = "";
|
|
387
445
|
label = "";
|
|
@@ -400,7 +458,7 @@ var Column = class extends LktItem {
|
|
|
400
458
|
button = void 0;
|
|
401
459
|
link = void 0;
|
|
402
460
|
action = void 0;
|
|
403
|
-
constructor(data) {
|
|
461
|
+
constructor(data = {}) {
|
|
404
462
|
super();
|
|
405
463
|
this.feed(data);
|
|
406
464
|
switch (this.type) {
|
|
@@ -525,6 +583,159 @@ var Modal = class extends LktItem {
|
|
|
525
583
|
}
|
|
526
584
|
};
|
|
527
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
|
+
|
|
528
739
|
// src/enums/ModalType.ts
|
|
529
740
|
var ModalType = /* @__PURE__ */ ((ModalType2) => {
|
|
530
741
|
ModalType2["Modal"] = "modal";
|
|
@@ -539,14 +750,19 @@ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
|
|
|
539
750
|
return SortDirection2;
|
|
540
751
|
})(SortDirection || {});
|
|
541
752
|
|
|
542
|
-
// src/enums/
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
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 || {});
|
|
550
766
|
|
|
551
767
|
// src/enums/ToggleMode.ts
|
|
552
768
|
var ToggleMode = /* @__PURE__ */ ((ToggleMode2) => {
|
|
@@ -587,6 +803,8 @@ export {
|
|
|
587
803
|
Option,
|
|
588
804
|
SafeString,
|
|
589
805
|
SortDirection,
|
|
806
|
+
Table,
|
|
807
|
+
TablePermission,
|
|
590
808
|
TableType,
|
|
591
809
|
ToggleMode,
|
|
592
810
|
Tooltip,
|