lkt-vue-kernel 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VueElement, Component } from 'vue';
2
2
  import { RouteLocationRaw } from 'vue-router';
3
- import { DataState } from 'lkt-data-state';
3
+ import { DataState, DataStateConfig } from 'lkt-data-state';
4
4
 
5
5
  interface LktObject {
6
6
  [key: string | number]: any;
@@ -44,6 +44,7 @@ type BeforeCloseModalData = {
44
44
  modalName: ValidModalKey;
45
45
  modalKey: ValidModalKey;
46
46
  item?: LktObject;
47
+ itemCreated?: boolean;
47
48
  };
48
49
 
49
50
  type ValidBeforeCloseModal = Function | undefined | ((data: BeforeCloseModalData) => void);
@@ -136,6 +137,22 @@ type IsDisabledChecker = ((args?: IsDisabledCheckerArgs) => boolean);
136
137
 
137
138
  type ValidIsDisabledValue = boolean | undefined | IsDisabledChecker;
138
139
 
140
+ declare enum ModalCallbackAction {
141
+ Refresh = "refresh",
142
+ Close = "close",
143
+ ReOpen = "reOpen",
144
+ Exec = "exec",
145
+ Open = "open"
146
+ }
147
+
148
+ interface ModalCallbackConfig {
149
+ modalName: ValidModalName;
150
+ modalKey?: ValidModalKey;
151
+ action: ModalCallbackAction;
152
+ method?: string;
153
+ args?: LktObject;
154
+ }
155
+
139
156
  interface ButtonConfig {
140
157
  type?: ButtonType;
141
158
  checked?: boolean;
@@ -159,6 +176,7 @@ interface ButtonConfig {
159
176
  confirmModal?: ValidModalName;
160
177
  confirmModalKey?: ValidModalKey;
161
178
  confirmData?: Partial<ModalConfig>;
179
+ modalCallbacks?: Array<ModalCallbackConfig>;
162
180
  iconDot?: boolean | string | number;
163
181
  iconEnd?: string;
164
182
  img?: string;
@@ -187,6 +205,14 @@ declare class LktSettings {
187
205
  static setDefaultConfirmButton(button: Partial<ButtonConfig>): typeof LktSettings;
188
206
  static defaultCancelButton: Partial<ButtonConfig>;
189
207
  static setDefaultCancelButton(button: Partial<ButtonConfig>): typeof LktSettings;
208
+ static defaultCreateButton: Partial<ButtonConfig>;
209
+ static setDefaultCreateButton(button: Partial<ButtonConfig>): typeof LktSettings;
210
+ static defaultUpdateButton: Partial<ButtonConfig>;
211
+ static setDefaultUpdateButton(button: Partial<ButtonConfig>): typeof LktSettings;
212
+ static defaultDropButton: Partial<ButtonConfig>;
213
+ static setDefaultDropButton(button: Partial<ButtonConfig>): typeof LktSettings;
214
+ static defaultEditModeButton: Partial<ButtonConfig>;
215
+ static setDefaultEditModeButton(button: Partial<ButtonConfig>): typeof LktSettings;
190
216
  }
191
217
 
192
218
  declare enum FieldType {
@@ -337,25 +363,9 @@ declare enum ItemCrudView {
337
363
  Modal = "modal"
338
364
  }
339
365
 
340
- declare enum ModalCallbackAction {
341
- Refresh = "refresh",
342
- Close = "close",
343
- ReOpen = "reOpen",
344
- Exec = "exec",
345
- Open = "open"
346
- }
347
-
348
- interface ModalCallbackConfig {
349
- modalName: ValidModalName;
350
- modalKey?: ValidModalKey;
351
- action: ModalCallbackAction;
352
- method?: string;
353
- args?: LktObject;
354
- }
355
-
356
- declare enum ItemCrudType {
366
+ declare enum ItemCrudMode {
357
367
  Create = "create",
358
- Edit = "edit",
368
+ Update = "update",
359
369
  Read = "read"
360
370
  }
361
371
 
@@ -366,7 +376,8 @@ declare enum ItemCrudButtonNavPosition {
366
376
 
367
377
  declare enum ItemCrudButtonNavVisibility {
368
378
  Changed = "changed",
369
- Always = "always"
379
+ Always = "always",
380
+ Never = "never"
370
381
  }
371
382
 
372
383
  declare enum SaveType {
@@ -383,64 +394,21 @@ interface SaveConfig {
383
394
  interface ItemCrudConfig {
384
395
  modelValue: LktObject;
385
396
  editing: boolean;
386
- type: ItemCrudType;
397
+ mode: ItemCrudMode;
387
398
  view: ItemCrudView;
388
- editButton: ButtonConfig;
399
+ editModeButton: ButtonConfig;
389
400
  dropButton: ButtonConfig;
390
401
  createButton: ButtonConfig;
391
402
  updateButton: ButtonConfig;
403
+ buttonNavPosition?: ItemCrudButtonNavPosition;
404
+ buttonNavVisibility?: ItemCrudButtonNavVisibility;
392
405
  modalConfig: ModalConfig;
393
406
  saveConfig: SaveConfig;
394
- title: string;
395
- hiddenSave: boolean;
396
- hiddenDrop: boolean;
397
- hiddenButtons: boolean;
398
- hideSwitchEdition: boolean;
407
+ dataStateConfig: DataStateConfig;
399
408
  readResource: string;
400
409
  readData: LktObject;
401
- saveValidator: Function;
410
+ title: string;
402
411
  beforeEmitUpdate: Function | undefined;
403
- dataStateConfig: LktObject;
404
- buttonNavPosition?: ItemCrudButtonNavPosition;
405
- buttonNavVisibility?: ItemCrudButtonNavVisibility;
406
- insideModal: boolean;
407
- saveText: string;
408
- saveIcon: string;
409
- dropText: string;
410
- dropIcon: string;
411
- createResource: string;
412
- updateResource: string;
413
- dropResource: string;
414
- createConfirm: string;
415
- updateConfirm: string;
416
- dropConfirm: string;
417
- createConfirmData: LktObject;
418
- updateConfirmData: LktObject;
419
- dropConfirmData: LktObject;
420
- createDisabled: boolean;
421
- updateDisabled: boolean;
422
- dropDisabled: boolean;
423
- createData: LktObject;
424
- updateData: LktObject;
425
- dropData: LktObject;
426
- editModeText: string;
427
- onCreate: Function | undefined;
428
- onUpdate: Function | undefined;
429
- onCreateModalCallbacks: ModalCallbackConfig[];
430
- onUpdateModalCallbacks: ModalCallbackConfig[];
431
- onDropModalCallbacks: ModalCallbackConfig[];
432
- isCreate: boolean;
433
- size: string;
434
- preTitle: string;
435
- showClose: boolean;
436
- disabledClose: boolean;
437
- disabledVeilClick: boolean;
438
- modalName: string;
439
- modalKey: string;
440
- zIndex: number;
441
- editedCloseConfirm: string;
442
- editedCloseConfirmKey: string | number;
443
- beforeClose: Function | undefined;
444
412
  }
445
413
 
446
414
  declare enum PaginatorType {
@@ -633,6 +601,7 @@ declare class Button extends LktItem implements ButtonConfig {
633
601
  confirmModal: ValidModalName;
634
602
  confirmModalKey: ValidModalKey;
635
603
  confirmData: Partial<ModalConfig>;
604
+ modalCallbacks?: Array<ModalCallbackConfig>;
636
605
  text: string;
637
606
  icon: string;
638
607
  iconDot: boolean;
@@ -657,6 +626,7 @@ declare class Button extends LktItem implements ButtonConfig {
657
626
  onClick?: Function | undefined;
658
627
  onConfirm?: Function | undefined;
659
628
  constructor(data?: Partial<ButtonConfig>);
629
+ isDisabled(): boolean | undefined;
660
630
  }
661
631
 
662
632
  interface ColumnConfig {
@@ -720,6 +690,7 @@ declare enum TablePermission {
720
690
  Edit = "edit",// Displays edit button
721
691
  Drop = "drop",// Displays drop button
722
692
  Sort = "sort",// Sort
693
+ SwitchEditMode = "switch-edit-mode",
723
694
  InlineEdit = "inline-edit",// Be able to edit columns inside the table
724
695
  InlineCreate = "inline-create",// Be able to append a new editable row (needs InlineEdit in order to be editable)
725
696
  ModalCreate = "modal-create",// Be able to append a new row after save a modal form
@@ -823,6 +794,28 @@ declare class Tooltip extends LktItem implements TooltipConfig {
823
794
  constructor(data?: Partial<TooltipConfig>);
824
795
  }
825
796
 
797
+ declare class ItemCrud extends LktItem implements ItemCrudConfig {
798
+ static lktDefaultValues: (keyof ItemCrudConfig)[];
799
+ modelValue: LktObject;
800
+ editing: boolean;
801
+ mode: ItemCrudMode;
802
+ view: ItemCrudView;
803
+ editModeButton: ButtonConfig;
804
+ dropButton: ButtonConfig;
805
+ createButton: ButtonConfig;
806
+ updateButton: ButtonConfig;
807
+ modalConfig: ModalConfig;
808
+ saveConfig: SaveConfig;
809
+ title: string;
810
+ readResource: string;
811
+ readData: LktObject;
812
+ beforeEmitUpdate: Function | undefined;
813
+ dataStateConfig: DataStateConfig;
814
+ buttonNavPosition?: ItemCrudButtonNavPosition;
815
+ buttonNavVisibility?: ItemCrudButtonNavVisibility;
816
+ constructor(data?: Partial<ItemCrudConfig>);
817
+ }
818
+
826
819
  declare class Modal extends LktItem implements ModalConfig {
827
820
  static lktDefaultValues: (keyof ModalConfig)[];
828
821
  size: string;
@@ -933,6 +926,8 @@ type ValidScanPropTarget = ScanPropTarget | ((...args: any[]) => ScanPropTarget)
933
926
  declare const extractPropValue: (needle: ValidScanPropTarget, haystack: LktObject) => ValidScanPropTarget;
934
927
  declare const extractI18nValue: (needle: string | number) => any;
935
928
 
929
+ declare const ensureButtonConfig: (buttonConfig: Partial<ButtonConfig> | undefined, settingsConfig: Partial<ButtonConfig>) => Partial<ButtonConfig>;
930
+
936
931
  declare const lktDebug: (component: string, ...args: any[]) => void;
937
932
 
938
933
  /**
@@ -944,4 +939,4 @@ declare function getDefaultValues<T>(cls: {
944
939
  lktDefaultValues: (keyof T)[];
945
940
  }): Partial<T>;
946
941
 
947
- 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, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudType, 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, extractI18nValue, extractPropValue, getDefaultValues, lktDebug };
942
+ 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, ensureButtonConfig, extractI18nValue, extractPropValue, getDefaultValues, lktDebug };
package/dist/index.js CHANGED
@@ -1,3 +1,21 @@
1
+ // src/enums/ButtonType.ts
2
+ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
3
+ ButtonType2["Button"] = "button";
4
+ ButtonType2["Submit"] = "submit";
5
+ ButtonType2["Reset"] = "reset";
6
+ ButtonType2["Anchor"] = "anchor";
7
+ ButtonType2["Content"] = "content";
8
+ ButtonType2["Switch"] = "switch";
9
+ ButtonType2["HiddenSwitch"] = "hidden-switch";
10
+ ButtonType2["Split"] = "split";
11
+ ButtonType2["SplitLazy"] = "split-lazy";
12
+ ButtonType2["SplitEver"] = "split-ever";
13
+ ButtonType2["Tooltip"] = "tooltip";
14
+ ButtonType2["TooltipLazy"] = "tooltip-lazy";
15
+ ButtonType2["TooltipEver"] = "tooltip-ever";
16
+ return ButtonType2;
17
+ })(ButtonType || {});
18
+
1
19
  // src/settings/LktSettings.ts
2
20
  var LktSettings = class _LktSettings {
3
21
  static debugEnabled = false;
@@ -19,6 +37,35 @@ var LktSettings = class _LktSettings {
19
37
  _LktSettings.defaultCancelButton = button;
20
38
  return _LktSettings;
21
39
  }
40
+ static defaultCreateButton = {
41
+ text: "Create"
42
+ };
43
+ static setDefaultCreateButton(button) {
44
+ _LktSettings.defaultCreateButton = button;
45
+ return _LktSettings;
46
+ }
47
+ static defaultUpdateButton = {
48
+ text: "Update"
49
+ };
50
+ static setDefaultUpdateButton(button) {
51
+ _LktSettings.defaultUpdateButton = button;
52
+ return _LktSettings;
53
+ }
54
+ static defaultDropButton = {
55
+ text: "Drop"
56
+ };
57
+ static setDefaultDropButton(button) {
58
+ _LktSettings.defaultDropButton = button;
59
+ return _LktSettings;
60
+ }
61
+ static defaultEditModeButton = {
62
+ text: "Edit mode",
63
+ type: "switch" /* Switch */
64
+ };
65
+ static setDefaultEditModeButton(button) {
66
+ _LktSettings.defaultEditModeButton = button;
67
+ return _LktSettings;
68
+ }
22
69
  };
23
70
 
24
71
  // src/instances/LktItem.ts
@@ -304,24 +351,6 @@ var Anchor = class extends LktItem {
304
351
  }
305
352
  };
306
353
 
307
- // src/enums/ButtonType.ts
308
- var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
309
- ButtonType2["Button"] = "button";
310
- ButtonType2["Submit"] = "submit";
311
- ButtonType2["Reset"] = "reset";
312
- ButtonType2["Anchor"] = "anchor";
313
- ButtonType2["Content"] = "content";
314
- ButtonType2["Switch"] = "switch";
315
- ButtonType2["HiddenSwitch"] = "hidden-switch";
316
- ButtonType2["Split"] = "split";
317
- ButtonType2["SplitLazy"] = "split-lazy";
318
- ButtonType2["SplitEver"] = "split-ever";
319
- ButtonType2["Tooltip"] = "tooltip";
320
- ButtonType2["TooltipLazy"] = "tooltip-lazy";
321
- ButtonType2["TooltipEver"] = "tooltip-ever";
322
- return ButtonType2;
323
- })(ButtonType || {});
324
-
325
354
  // src/instances/Button.ts
326
355
  import { generateRandomString as generateRandomString2 } from "lkt-string-tools";
327
356
 
@@ -360,6 +389,7 @@ var Button = class extends LktItem {
360
389
  "confirmModal",
361
390
  "confirmModalKey",
362
391
  "confirmData",
392
+ "modalCallbacks",
363
393
  "text",
364
394
  "icon",
365
395
  "iconDot",
@@ -402,6 +432,7 @@ var Button = class extends LktItem {
402
432
  confirmModal = "";
403
433
  confirmModalKey = "_";
404
434
  confirmData = {};
435
+ modalCallbacks = [];
405
436
  text = "";
406
437
  icon = "";
407
438
  iconDot = false;
@@ -431,6 +462,10 @@ var Button = class extends LktItem {
431
462
  this.feed(data);
432
463
  this.anchor = new Anchor(data.anchor);
433
464
  }
465
+ isDisabled() {
466
+ if (typeof this.disabled === "function") return this.disabled();
467
+ return this.disabled;
468
+ }
434
469
  };
435
470
 
436
471
  // src/instances/Column.ts
@@ -567,6 +602,98 @@ var Tooltip = class extends LktItem {
567
602
  }
568
603
  };
569
604
 
605
+ // src/enums/ItemCrudMode.ts
606
+ var ItemCrudMode = /* @__PURE__ */ ((ItemCrudMode2) => {
607
+ ItemCrudMode2["Create"] = "create";
608
+ ItemCrudMode2["Update"] = "update";
609
+ ItemCrudMode2["Read"] = "read";
610
+ return ItemCrudMode2;
611
+ })(ItemCrudMode || {});
612
+
613
+ // src/enums/ItemCrudView.ts
614
+ var ItemCrudView = /* @__PURE__ */ ((ItemCrudView2) => {
615
+ ItemCrudView2["Inline"] = "inline";
616
+ ItemCrudView2["Modal"] = "modal";
617
+ return ItemCrudView2;
618
+ })(ItemCrudView || {});
619
+
620
+ // src/enums/ItemCrudButtonNavPosition.ts
621
+ var ItemCrudButtonNavPosition = /* @__PURE__ */ ((ItemCrudButtonNavPosition2) => {
622
+ ItemCrudButtonNavPosition2["Top"] = "top";
623
+ ItemCrudButtonNavPosition2["Bottom"] = "bottom";
624
+ return ItemCrudButtonNavPosition2;
625
+ })(ItemCrudButtonNavPosition || {});
626
+
627
+ // src/enums/ItemCrudButtonNavVisibility.ts
628
+ var ItemCrudButtonNavVisibility = /* @__PURE__ */ ((ItemCrudButtonNavVisibility2) => {
629
+ ItemCrudButtonNavVisibility2["Changed"] = "changed";
630
+ ItemCrudButtonNavVisibility2["Always"] = "always";
631
+ ItemCrudButtonNavVisibility2["Never"] = "never";
632
+ return ItemCrudButtonNavVisibility2;
633
+ })(ItemCrudButtonNavVisibility || {});
634
+
635
+ // src/enums/SaveType.ts
636
+ var SaveType = /* @__PURE__ */ ((SaveType2) => {
637
+ SaveType2["Manual"] = "manual";
638
+ SaveType2["Auto"] = "auto";
639
+ SaveType2["Delay"] = "delay";
640
+ return SaveType2;
641
+ })(SaveType || {});
642
+
643
+ // src/instances/ItemCrud.ts
644
+ var ItemCrud = class extends LktItem {
645
+ // static lktAllowUndefinedProps: string[] = [
646
+ // ];
647
+ //
648
+ static lktDefaultValues = [
649
+ "modelValue",
650
+ "editing",
651
+ "mode",
652
+ "view",
653
+ "editModeButton",
654
+ "dropButton",
655
+ "createButton",
656
+ "updateButton",
657
+ "modalConfig",
658
+ "saveConfig",
659
+ "title",
660
+ "readResource",
661
+ "readData",
662
+ "beforeEmitUpdate",
663
+ "dataStateConfig",
664
+ "buttonNavPosition",
665
+ "buttonNavVisibility"
666
+ ];
667
+ modelValue = {};
668
+ editing = false;
669
+ // Global config
670
+ mode = "read" /* Read */;
671
+ view = "inline" /* Inline */;
672
+ // Buttons
673
+ editModeButton = {};
674
+ // Not sure, should test
675
+ dropButton = {};
676
+ createButton = {};
677
+ updateButton = {};
678
+ // Config if type === modal
679
+ modalConfig = {};
680
+ // Save config
681
+ saveConfig = {
682
+ type: "manual" /* Manual */
683
+ };
684
+ title = "";
685
+ readResource = "";
686
+ readData = {};
687
+ beforeEmitUpdate = void 0;
688
+ dataStateConfig = {};
689
+ buttonNavPosition = "top" /* Top */;
690
+ buttonNavVisibility = "always" /* Always */;
691
+ constructor(data = {}) {
692
+ super();
693
+ this.feed(data);
694
+ }
695
+ };
696
+
570
697
  // src/instances/Modal.ts
571
698
  var Modal = class extends LktItem {
572
699
  static lktDefaultValues = [
@@ -783,35 +910,6 @@ var Table = class extends LktItem {
783
910
  }
784
911
  };
785
912
 
786
- // src/enums/ItemCrudButtonNavPosition.ts
787
- var ItemCrudButtonNavPosition = /* @__PURE__ */ ((ItemCrudButtonNavPosition2) => {
788
- ItemCrudButtonNavPosition2["Top"] = "top";
789
- ItemCrudButtonNavPosition2["Bottom"] = "bottom";
790
- return ItemCrudButtonNavPosition2;
791
- })(ItemCrudButtonNavPosition || {});
792
-
793
- // src/enums/ItemCrudButtonNavVisibility.ts
794
- var ItemCrudButtonNavVisibility = /* @__PURE__ */ ((ItemCrudButtonNavVisibility2) => {
795
- ItemCrudButtonNavVisibility2["Changed"] = "changed";
796
- ItemCrudButtonNavVisibility2["Always"] = "always";
797
- return ItemCrudButtonNavVisibility2;
798
- })(ItemCrudButtonNavVisibility || {});
799
-
800
- // src/enums/ItemCrudType.ts
801
- var ItemCrudType = /* @__PURE__ */ ((ItemCrudType2) => {
802
- ItemCrudType2["Create"] = "create";
803
- ItemCrudType2["Edit"] = "edit";
804
- ItemCrudType2["Read"] = "read";
805
- return ItemCrudType2;
806
- })(ItemCrudType || {});
807
-
808
- // src/enums/ItemCrudView.ts
809
- var ItemCrudView = /* @__PURE__ */ ((ItemCrudView2) => {
810
- ItemCrudView2["Inline"] = "inline";
811
- ItemCrudView2["Modal"] = "modal";
812
- return ItemCrudView2;
813
- })(ItemCrudView || {});
814
-
815
913
  // src/enums/ModalCallbackAction.ts
816
914
  var ModalCallbackAction = /* @__PURE__ */ ((ModalCallbackAction2) => {
817
915
  ModalCallbackAction2["Refresh"] = "refresh";
@@ -829,14 +927,6 @@ var ModalType = /* @__PURE__ */ ((ModalType2) => {
829
927
  return ModalType2;
830
928
  })(ModalType || {});
831
929
 
832
- // src/enums/SaveType.ts
833
- var SaveType = /* @__PURE__ */ ((SaveType2) => {
834
- SaveType2["Manual"] = "manual";
835
- SaveType2["Auto"] = "auto";
836
- SaveType2["Delay"] = "delay";
837
- return SaveType2;
838
- })(SaveType || {});
839
-
840
930
  // src/enums/SortDirection.ts
841
931
  var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
842
932
  SortDirection2["Asc"] = "asc";
@@ -851,6 +941,7 @@ var TablePermission = /* @__PURE__ */ ((TablePermission2) => {
851
941
  TablePermission2["Edit"] = "edit";
852
942
  TablePermission2["Drop"] = "drop";
853
943
  TablePermission2["Sort"] = "sort";
944
+ TablePermission2["SwitchEditMode"] = "switch-edit-mode";
854
945
  TablePermission2["InlineEdit"] = "inline-edit";
855
946
  TablePermission2["InlineCreate"] = "inline-create";
856
947
  TablePermission2["ModalCreate"] = "modal-create";
@@ -881,6 +972,15 @@ var extractI18nValue = (needle) => {
881
972
  return txt;
882
973
  };
883
974
 
975
+ // src/functions/ensure-data-functions.ts
976
+ var ensureButtonConfig = (buttonConfig, settingsConfig) => {
977
+ if (typeof buttonConfig === "undefined") return settingsConfig;
978
+ return {
979
+ ...settingsConfig,
980
+ ...buttonConfig
981
+ };
982
+ };
983
+
884
984
  // src/functions/debug-functions.ts
885
985
  var lktDebug = (component, ...args) => {
886
986
  if (LktSettings.debugEnabled) console.info("::lkt::", `[${component}] `, ...args);
@@ -910,9 +1010,10 @@ export {
910
1010
  Field,
911
1011
  FieldAutoValidationTrigger,
912
1012
  FieldType,
1013
+ ItemCrud,
913
1014
  ItemCrudButtonNavPosition,
914
1015
  ItemCrudButtonNavVisibility,
915
- ItemCrudType,
1016
+ ItemCrudMode,
916
1017
  ItemCrudView,
917
1018
  LktItem,
918
1019
  LktSettings,
@@ -936,6 +1037,7 @@ export {
936
1037
  TooltipLocationX,
937
1038
  TooltipLocationY,
938
1039
  TooltipPositionEngine,
1040
+ ensureButtonConfig,
939
1041
  extractI18nValue,
940
1042
  extractPropValue,
941
1043
  getDefaultValues,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-vue-kernel",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "LKT Vue Kernel",
5
5
  "keywords": [
6
6
  "lkt",