lkt-vue-kernel 1.0.17 → 1.0.18

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
@@ -123,11 +123,6 @@ declare class Anchor extends LktItem implements AnchorConfig {
123
123
  constructor(data?: Partial<AnchorConfig>);
124
124
  }
125
125
 
126
- declare enum TooltipPositionEngine {
127
- Fixed = "fixed",
128
- Absolute = "absolute"
129
- }
130
-
131
126
  interface IsDisabledCheckerArgs {
132
127
  value?: any;
133
128
  dataState?: DataState;
@@ -153,6 +148,42 @@ interface ModalCallbackConfig {
153
148
  args?: LktObject;
154
149
  }
155
150
 
151
+ declare enum TooltipLocationY {
152
+ Top = "top",
153
+ Bottom = "bottom",
154
+ Center = "center",
155
+ ReferrerCenter = "referrer-center"
156
+ }
157
+
158
+ declare enum TooltipLocationX {
159
+ Left = "left",
160
+ Right = "right",
161
+ Center = "center",
162
+ LeftCorner = "left-corner",
163
+ RightCorner = "right-corner"
164
+ }
165
+
166
+ declare enum TooltipPositionEngine {
167
+ Fixed = "fixed",
168
+ Absolute = "absolute"
169
+ }
170
+
171
+ interface TooltipConfig {
172
+ modelValue?: boolean;
173
+ alwaysOpen?: boolean;
174
+ class?: string;
175
+ text?: string;
176
+ icon?: string;
177
+ iconAtEnd?: boolean;
178
+ engine?: TooltipPositionEngine;
179
+ referrerMargin?: number | string;
180
+ windowMargin?: number | string;
181
+ referrerWidth?: boolean;
182
+ referrer?: HTMLElement | undefined;
183
+ locationY?: TooltipLocationY;
184
+ locationX?: TooltipLocationX;
185
+ }
186
+
156
187
  interface ButtonConfig {
157
188
  type?: ButtonType;
158
189
  checked?: boolean;
@@ -181,15 +212,10 @@ interface ButtonConfig {
181
212
  iconEnd?: string;
182
213
  img?: string;
183
214
  splitIcon?: string;
184
- tooltipEngine?: TooltipPositionEngine;
185
215
  showTooltipOnHover?: boolean;
186
216
  showTooltipOnHoverDelay?: number;
187
217
  hideTooltipOnLeave?: boolean;
188
- tooltipWindowMargin?: number;
189
- tooltipReferrerMargin?: number;
190
- tooltipClass?: string;
191
- tooltipLocationY?: string;
192
- tooltipLocationX?: string;
218
+ tooltip?: TooltipConfig;
193
219
  splitClass?: string;
194
220
  clickRef?: Element | VueElement;
195
221
  tabindex?: ValidTabIndex;
@@ -201,6 +227,8 @@ interface ButtonConfig {
201
227
  declare class LktSettings {
202
228
  static debugEnabled: boolean;
203
229
  static debugMode(enabled?: boolean): typeof LktSettings;
230
+ static defaultSaveButton: Partial<ButtonConfig>;
231
+ static setDefaultSaveButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
204
232
  static defaultConfirmButton: Partial<ButtonConfig>;
205
233
  static setDefaultConfirmButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
206
234
  static defaultCancelButton: Partial<ButtonConfig>;
@@ -430,37 +458,6 @@ interface PaginatorConfig {
430
458
  filters?: LktObject;
431
459
  }
432
460
 
433
- declare enum TooltipLocationY {
434
- Top = "top",
435
- Bottom = "bottom",
436
- Center = "center",
437
- ReferrerCenter = "referrer-center"
438
- }
439
-
440
- declare enum TooltipLocationX {
441
- Left = "left",
442
- Right = "right",
443
- Center = "center",
444
- LeftCorner = "left-corner",
445
- RightCorner = "right-corner"
446
- }
447
-
448
- interface TooltipConfig {
449
- modelValue?: boolean;
450
- alwaysOpen?: boolean;
451
- class?: string;
452
- text?: string;
453
- icon?: string;
454
- iconAtEnd?: boolean;
455
- engine?: TooltipPositionEngine;
456
- referrerMargin?: number | string;
457
- windowMargin?: number | string;
458
- referrerWidth?: boolean;
459
- referrer?: HTMLElement | undefined;
460
- locationY?: TooltipLocationY;
461
- locationX?: TooltipLocationX;
462
- }
463
-
464
461
  type ValidDrag = boolean | ((item: LktObject) => boolean);
465
462
 
466
463
  interface DragConfig {
@@ -608,20 +605,15 @@ declare class Button extends LktItem implements ButtonConfig {
608
605
  iconEnd: string;
609
606
  img: string;
610
607
  showTooltipOnHoverDelay: number;
611
- tooltipWindowMargin: number;
612
- tooltipReferrerMargin: number;
613
- tooltipLocationY: string;
614
- tooltipLocationX: string;
615
608
  checked: boolean;
616
609
  clickRef?: Element | VueElement;
617
610
  openTooltip: boolean;
618
611
  tabindex: ValidTabIndex;
619
612
  anchor?: AnchorConfig | Anchor;
620
- tooltipEngine?: TooltipPositionEngine;
621
613
  showTooltipOnHover?: boolean;
622
614
  hideTooltipOnLeave?: boolean;
623
- tooltipClass?: string;
624
615
  splitClass?: string;
616
+ tooltip?: TooltipConfig;
625
617
  prop?: LktObject;
626
618
  onClick?: Function | undefined;
627
619
  onConfirm?: Function | undefined;
@@ -930,6 +922,8 @@ declare const ensureButtonConfig: (buttonConfig: Partial<ButtonConfig> | undefin
930
922
 
931
923
  declare const lktDebug: (component: string, ...args: any[]) => void;
932
924
 
925
+ declare const createColumn: (data: ColumnConfig) => Column;
926
+
933
927
  /**
934
928
  * Export common interfaces
935
929
  */
@@ -939,4 +933,4 @@ declare function getDefaultValues<T>(cls: {
939
933
  lktDefaultValues: (keyof T)[];
940
934
  }): Partial<T>;
941
935
 
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 };
936
+ export { Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, Modal, ModalCallbackAction, type ModalCallbackConfig, type ModalConfig, ModalType, MultipleOptionsDisplay, Option, type OptionConfig, Paginator, type PaginatorConfig, PaginatorType, SafeString, type SaveConfig, SaveType, type ScanPropTarget, SortDirection, Table, type TableConfig, TablePermission, TableRowType, TableType, ToggleMode, Tooltip, type TooltipConfig, TooltipLocationX, TooltipLocationY, TooltipPositionEngine, type ValidBeforeCloseModal, type ValidColSpan, type ValidCustomSlot, type ValidDragConfig, type ValidFieldMinMax, type ValidFieldValue, type ValidIsDisabledValue, type ValidModalKey, type ValidModalName, type ValidOptionValue, type ValidPaginatorConfig, type ValidSafeStringValue, type ValidScanPropTarget, type ValidTabIndex, type ValidTablePermission, type ValidTableRowTypeValue, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, getDefaultValues, lktDebug };
package/dist/index.js CHANGED
@@ -32,6 +32,17 @@ var LktSettings = class _LktSettings {
32
32
  _LktSettings.debugEnabled = enabled;
33
33
  return _LktSettings;
34
34
  }
35
+ static defaultSaveButton = {
36
+ text: "Save"
37
+ };
38
+ static setDefaultSaveButton(button, override = true) {
39
+ if (override) {
40
+ _LktSettings.defaultSaveButton = button;
41
+ } else {
42
+ _LktSettings.defaultSaveButton = ensureButtonConfig(button, _LktSettings.defaultSaveButton);
43
+ }
44
+ return _LktSettings;
45
+ }
35
46
  static defaultConfirmButton = {
36
47
  text: "Confirm"
37
48
  };
@@ -386,15 +397,6 @@ var Anchor = class extends LktItem {
386
397
 
387
398
  // src/instances/Button.ts
388
399
  import { generateRandomString as generateRandomString2 } from "lkt-string-tools";
389
-
390
- // src/enums/TooltipPositionEngine.ts
391
- var TooltipPositionEngine = /* @__PURE__ */ ((TooltipPositionEngine2) => {
392
- TooltipPositionEngine2["Fixed"] = "fixed";
393
- TooltipPositionEngine2["Absolute"] = "absolute";
394
- return TooltipPositionEngine2;
395
- })(TooltipPositionEngine || {});
396
-
397
- // src/instances/Button.ts
398
400
  var Button = class extends LktItem {
399
401
  lktAllowUndefinedProps = [
400
402
  "clickRef",
@@ -429,19 +431,14 @@ var Button = class extends LktItem {
429
431
  "iconEnd",
430
432
  "img",
431
433
  "showTooltipOnHoverDelay",
432
- "tooltipWindowMargin",
433
- "tooltipReferrerMargin",
434
- "tooltipLocationY",
435
- "tooltipLocationX",
434
+ "tooltip",
436
435
  "checked",
437
436
  "clickRef",
438
437
  "openTooltip",
439
438
  "tabindex",
440
439
  "anchor",
441
- "tooltipEngine",
442
440
  "showTooltipOnHover",
443
441
  "hideTooltipOnLeave",
444
- "tooltipClass",
445
442
  "splitClass",
446
443
  "prop",
447
444
  "onClick",
@@ -472,20 +469,15 @@ var Button = class extends LktItem {
472
469
  iconEnd = "";
473
470
  img = "";
474
471
  showTooltipOnHoverDelay = 0;
475
- tooltipWindowMargin = 0;
476
- tooltipReferrerMargin = 0;
477
- tooltipLocationY = "bottom";
478
- tooltipLocationX = "left-corner";
479
472
  checked = false;
480
473
  clickRef = void 0;
481
474
  openTooltip = false;
482
475
  tabindex = void 0;
483
476
  anchor = void 0;
484
- tooltipEngine = "fixed" /* Fixed */;
485
477
  showTooltipOnHover = void 0;
486
478
  hideTooltipOnLeave = void 0;
487
- tooltipClass = "";
488
479
  splitClass = "";
480
+ tooltip = {};
489
481
  prop = {};
490
482
  // Event management
491
483
  onClick = void 0;
@@ -580,6 +572,13 @@ var Column = class extends LktItem {
580
572
  }
581
573
  };
582
574
 
575
+ // src/enums/TooltipPositionEngine.ts
576
+ var TooltipPositionEngine = /* @__PURE__ */ ((TooltipPositionEngine2) => {
577
+ TooltipPositionEngine2["Fixed"] = "fixed";
578
+ TooltipPositionEngine2["Absolute"] = "absolute";
579
+ return TooltipPositionEngine2;
580
+ })(TooltipPositionEngine || {});
581
+
583
582
  // src/enums/TooltipLocationY.ts
584
583
  var TooltipLocationY = /* @__PURE__ */ ((TooltipLocationY2) => {
585
584
  TooltipLocationY2["Top"] = "top";
@@ -1010,6 +1009,11 @@ var lktDebug = (component, ...args) => {
1010
1009
  if (LktSettings.debugEnabled) console.info("::lkt::", `[${component}] `, ...args);
1011
1010
  };
1012
1011
 
1012
+ // src/functions/table-functions.ts
1013
+ var createColumn = (data) => {
1014
+ return new Column(data);
1015
+ };
1016
+
1013
1017
  // src/index.ts
1014
1018
  function getDefaultValues(cls) {
1015
1019
  const instance = new cls();
@@ -1061,6 +1065,7 @@ export {
1061
1065
  TooltipLocationX,
1062
1066
  TooltipLocationY,
1063
1067
  TooltipPositionEngine,
1068
+ createColumn,
1064
1069
  ensureButtonConfig,
1065
1070
  extractI18nValue,
1066
1071
  extractPropValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-vue-kernel",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "LKT Vue Kernel",
5
5
  "keywords": [
6
6
  "lkt",