lkt-vue-kernel 1.0.13 → 1.0.14

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,22 @@ 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;
392
403
  modalConfig: ModalConfig;
393
404
  saveConfig: SaveConfig;
394
405
  title: string;
395
- hiddenSave: boolean;
396
- hiddenDrop: boolean;
397
- hiddenButtons: boolean;
398
- hideSwitchEdition: boolean;
399
406
  readResource: string;
400
407
  readData: LktObject;
401
408
  saveValidator: Function;
402
409
  beforeEmitUpdate: Function | undefined;
403
- dataStateConfig: LktObject;
410
+ dataStateConfig: DataStateConfig;
404
411
  buttonNavPosition?: ItemCrudButtonNavPosition;
405
412
  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
413
  }
445
414
 
446
415
  declare enum PaginatorType {
@@ -633,6 +602,7 @@ declare class Button extends LktItem implements ButtonConfig {
633
602
  confirmModal: ValidModalName;
634
603
  confirmModalKey: ValidModalKey;
635
604
  confirmData: Partial<ModalConfig>;
605
+ modalCallbacks?: Array<ModalCallbackConfig>;
636
606
  text: string;
637
607
  icon: string;
638
608
  iconDot: boolean;
@@ -657,6 +627,7 @@ declare class Button extends LktItem implements ButtonConfig {
657
627
  onClick?: Function | undefined;
658
628
  onConfirm?: Function | undefined;
659
629
  constructor(data?: Partial<ButtonConfig>);
630
+ isDisabled(): boolean | undefined;
660
631
  }
661
632
 
662
633
  interface ColumnConfig {
@@ -720,6 +691,7 @@ declare enum TablePermission {
720
691
  Edit = "edit",// Displays edit button
721
692
  Drop = "drop",// Displays drop button
722
693
  Sort = "sort",// Sort
694
+ SwitchEditMode = "switch-edit-mode",
723
695
  InlineEdit = "inline-edit",// Be able to edit columns inside the table
724
696
  InlineCreate = "inline-create",// Be able to append a new editable row (needs InlineEdit in order to be editable)
725
697
  ModalCreate = "modal-create",// Be able to append a new row after save a modal form
@@ -823,6 +795,29 @@ declare class Tooltip extends LktItem implements TooltipConfig {
823
795
  constructor(data?: Partial<TooltipConfig>);
824
796
  }
825
797
 
798
+ declare class ItemCrud extends LktItem implements ItemCrudConfig {
799
+ static lktDefaultValues: (keyof ItemCrudConfig)[];
800
+ modelValue: LktObject;
801
+ editing: boolean;
802
+ mode: ItemCrudMode;
803
+ view: ItemCrudView;
804
+ editModeButton: ButtonConfig;
805
+ dropButton: ButtonConfig;
806
+ createButton: ButtonConfig;
807
+ updateButton: ButtonConfig;
808
+ modalConfig: ModalConfig;
809
+ saveConfig: SaveConfig;
810
+ title: string;
811
+ readResource: string;
812
+ readData: LktObject;
813
+ saveValidator: Function;
814
+ beforeEmitUpdate: Function | undefined;
815
+ dataStateConfig: DataStateConfig;
816
+ buttonNavPosition?: ItemCrudButtonNavPosition;
817
+ buttonNavVisibility?: ItemCrudButtonNavVisibility;
818
+ constructor(data?: Partial<ItemCrudConfig>);
819
+ }
820
+
826
821
  declare class Modal extends LktItem implements ModalConfig {
827
822
  static lktDefaultValues: (keyof ModalConfig)[];
828
823
  size: string;
@@ -933,6 +928,8 @@ type ValidScanPropTarget = ScanPropTarget | ((...args: any[]) => ScanPropTarget)
933
928
  declare const extractPropValue: (needle: ValidScanPropTarget, haystack: LktObject) => ValidScanPropTarget;
934
929
  declare const extractI18nValue: (needle: string | number) => any;
935
930
 
931
+ declare const ensureButtonConfig: (buttonConfig: Partial<ButtonConfig> | undefined, settingsConfig: Partial<ButtonConfig>) => Partial<ButtonConfig>;
932
+
936
933
  declare const lktDebug: (component: string, ...args: any[]) => void;
937
934
 
938
935
  /**
@@ -944,4 +941,4 @@ declare function getDefaultValues<T>(cls: {
944
941
  lktDefaultValues: (keyof T)[];
945
942
  }): Partial<T>;
946
943
 
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 };
944
+ 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,100 @@ 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
+ "saveValidator",
663
+ "beforeEmitUpdate",
664
+ "dataStateConfig",
665
+ "buttonNavPosition",
666
+ "buttonNavVisibility"
667
+ ];
668
+ modelValue = {};
669
+ editing = false;
670
+ // Global config
671
+ mode = "read" /* Read */;
672
+ view = "inline" /* Inline */;
673
+ // Buttons
674
+ editModeButton = {};
675
+ // Not sure, should test
676
+ dropButton = {};
677
+ createButton = {};
678
+ updateButton = {};
679
+ // Config if type === modal
680
+ modalConfig = {};
681
+ // Save config
682
+ saveConfig = {
683
+ type: "manual" /* Manual */
684
+ };
685
+ title = "";
686
+ readResource = "";
687
+ readData = {};
688
+ saveValidator = () => true;
689
+ beforeEmitUpdate = void 0;
690
+ dataStateConfig = {};
691
+ buttonNavPosition = "top" /* Top */;
692
+ buttonNavVisibility = "always" /* Always */;
693
+ constructor(data = {}) {
694
+ super();
695
+ this.feed(data);
696
+ }
697
+ };
698
+
570
699
  // src/instances/Modal.ts
571
700
  var Modal = class extends LktItem {
572
701
  static lktDefaultValues = [
@@ -783,35 +912,6 @@ var Table = class extends LktItem {
783
912
  }
784
913
  };
785
914
 
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
915
  // src/enums/ModalCallbackAction.ts
816
916
  var ModalCallbackAction = /* @__PURE__ */ ((ModalCallbackAction2) => {
817
917
  ModalCallbackAction2["Refresh"] = "refresh";
@@ -829,14 +929,6 @@ var ModalType = /* @__PURE__ */ ((ModalType2) => {
829
929
  return ModalType2;
830
930
  })(ModalType || {});
831
931
 
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
932
  // src/enums/SortDirection.ts
841
933
  var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
842
934
  SortDirection2["Asc"] = "asc";
@@ -851,6 +943,7 @@ var TablePermission = /* @__PURE__ */ ((TablePermission2) => {
851
943
  TablePermission2["Edit"] = "edit";
852
944
  TablePermission2["Drop"] = "drop";
853
945
  TablePermission2["Sort"] = "sort";
946
+ TablePermission2["SwitchEditMode"] = "switch-edit-mode";
854
947
  TablePermission2["InlineEdit"] = "inline-edit";
855
948
  TablePermission2["InlineCreate"] = "inline-create";
856
949
  TablePermission2["ModalCreate"] = "modal-create";
@@ -881,6 +974,15 @@ var extractI18nValue = (needle) => {
881
974
  return txt;
882
975
  };
883
976
 
977
+ // src/functions/ensure-data-functions.ts
978
+ var ensureButtonConfig = (buttonConfig, settingsConfig) => {
979
+ if (typeof buttonConfig === "undefined") return settingsConfig;
980
+ return {
981
+ ...settingsConfig,
982
+ ...buttonConfig
983
+ };
984
+ };
985
+
884
986
  // src/functions/debug-functions.ts
885
987
  var lktDebug = (component, ...args) => {
886
988
  if (LktSettings.debugEnabled) console.info("::lkt::", `[${component}] `, ...args);
@@ -910,9 +1012,10 @@ export {
910
1012
  Field,
911
1013
  FieldAutoValidationTrigger,
912
1014
  FieldType,
1015
+ ItemCrud,
913
1016
  ItemCrudButtonNavPosition,
914
1017
  ItemCrudButtonNavVisibility,
915
- ItemCrudType,
1018
+ ItemCrudMode,
916
1019
  ItemCrudView,
917
1020
  LktItem,
918
1021
  LktSettings,
@@ -936,6 +1039,7 @@ export {
936
1039
  TooltipLocationX,
937
1040
  TooltipLocationY,
938
1041
  TooltipPositionEngine,
1042
+ ensureButtonConfig,
939
1043
  extractI18nValue,
940
1044
  extractPropValue,
941
1045
  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.14",
4
4
  "description": "LKT Vue Kernel",
5
5
  "keywords": [
6
6
  "lkt",