lkt-vue-kernel 1.0.21 → 1.0.22

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
@@ -184,24 +184,30 @@ interface TooltipConfig {
184
184
  locationX?: TooltipLocationX;
185
185
  }
186
186
 
187
+ type ValidButtonDot = boolean | string | number;
188
+
187
189
  interface ButtonConfig {
188
190
  type?: ButtonType;
189
- openTooltip?: boolean;
190
191
  name?: string;
191
- text?: string | number;
192
- icon?: string;
193
- class?: string;
194
- containerClass?: string;
195
- palette?: string;
196
192
  value?: string;
197
193
  disabled?: ValidIsDisabledValue;
194
+ openTooltip?: boolean;
198
195
  loading?: boolean;
196
+ class?: string;
197
+ containerClass?: string;
199
198
  wrapContent?: boolean;
199
+ text?: string | number;
200
+ icon?: string;
201
+ iconEnd?: string;
202
+ img?: string;
200
203
  checked?: boolean;
201
204
  textOn?: string | number | undefined;
202
205
  textOff?: string | number | undefined;
203
206
  iconOn?: string | number | undefined;
204
207
  iconOff?: string | number | undefined;
208
+ iconEndOn?: string | number | undefined;
209
+ iconEndOff?: string | number | undefined;
210
+ dot?: ValidButtonDot;
205
211
  anchor?: AnchorConfig | Anchor;
206
212
  resource?: string;
207
213
  resourceData?: LktObject;
@@ -212,20 +218,16 @@ interface ButtonConfig {
212
218
  confirmModalKey?: ValidModalKey;
213
219
  confirmData?: Partial<ModalConfig>;
214
220
  modalCallbacks?: Array<ModalCallbackConfig>;
215
- iconDot?: boolean | string | number;
216
- iconEnd?: string;
217
- img?: string;
221
+ tooltip?: TooltipConfig;
218
222
  splitIcon?: string;
219
223
  showTooltipOnHover?: boolean;
220
224
  showTooltipOnHoverDelay?: number;
221
225
  hideTooltipOnLeave?: boolean;
222
- tooltip?: TooltipConfig;
223
226
  splitClass?: string;
224
- clickRef?: Element | VueElement;
225
227
  tabindex?: ValidTabIndex;
226
228
  prop?: LktObject;
229
+ clickRef?: Element | VueElement;
227
230
  onClick?: Function | undefined;
228
- onConfirm?: Function | undefined;
229
231
  }
230
232
 
231
233
  declare class LktSettings {
@@ -245,6 +247,8 @@ declare class LktSettings {
245
247
  static setDefaultDropButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
246
248
  static defaultEditModeButton: Partial<ButtonConfig>;
247
249
  static setDefaultEditModeButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
250
+ static defaultToggleButton: Partial<ButtonConfig>;
251
+ static setDefaultToggleButton(button: Partial<ButtonConfig>, override?: boolean): typeof LktSettings;
248
252
  }
249
253
 
250
254
  declare enum FieldType {
@@ -304,7 +308,6 @@ interface AccordionConfig {
304
308
  contentClass?: string;
305
309
  iconRotation?: '90' | '180' | '-90' | '-180';
306
310
  minHeight?: number | undefined;
307
- toggleIconAtEnd?: boolean;
308
311
  iconAtEnd?: boolean;
309
312
  }
310
313
 
@@ -583,8 +586,10 @@ declare class Button extends LktItem implements ButtonConfig {
583
586
  textOff: string | number | undefined;
584
587
  iconOn: string | number | undefined;
585
588
  iconOff: string | number | undefined;
589
+ iconEndOn: string | number | undefined;
590
+ iconEndOff: string | number | undefined;
586
591
  icon: string;
587
- iconDot: boolean;
592
+ dot: ValidButtonDot;
588
593
  iconEnd: string;
589
594
  img: string;
590
595
  showTooltipOnHoverDelay: number;
@@ -599,7 +604,6 @@ declare class Button extends LktItem implements ButtonConfig {
599
604
  tooltip?: TooltipConfig;
600
605
  prop?: LktObject;
601
606
  onClick?: Function | undefined;
602
- onConfirm?: Function | undefined;
603
607
  constructor(data?: Partial<ButtonConfig>);
604
608
  isDisabled(): boolean | undefined;
605
609
  }
@@ -890,6 +894,26 @@ declare class FieldValidation {
890
894
  static createEqualTo(value: number | string, status?: ValidationStatus): FieldValidation;
891
895
  }
892
896
 
897
+ declare class Accordion extends LktItem implements AccordionConfig {
898
+ static lktAllowUndefinedProps: string[];
899
+ static lktDefaultValues: (keyof AccordionConfig)[];
900
+ modelValue?: boolean;
901
+ type?: AccordionType;
902
+ toggleMode?: AccordionToggleMode;
903
+ actionButton?: ButtonConfig;
904
+ toggleButton?: ButtonConfig;
905
+ toggleOnClickIntro?: boolean;
906
+ toggleTimeout?: number;
907
+ title?: string;
908
+ icon?: string;
909
+ class?: string;
910
+ contentClass?: string;
911
+ iconRotation?: '90' | '180' | '-90' | '-180';
912
+ minHeight?: number | undefined;
913
+ iconAtEnd?: boolean;
914
+ constructor(data?: Partial<AnchorConfig>);
915
+ }
916
+
893
917
  declare class Tooltip extends LktItem implements TooltipConfig {
894
918
  static lktDefaultValues: (keyof TooltipConfig)[];
895
919
  modelValue: boolean;
@@ -1055,4 +1079,4 @@ declare function getDefaultValues<T>(cls: {
1055
1079
  lktDefaultValues: (keyof T)[];
1056
1080
  }): Partial<T>;
1057
1081
 
1058
- export { type AccordionConfig, AccordionToggleMode, AccordionType, Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, FieldValidation, type FieldValidationConfig, 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, ValidationCode, ValidationStatus, booleanFieldTypes, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, fieldTypesWithOptions, fieldTypesWithoutClear, fieldTypesWithoutUndo, fieldsWithMultipleMode, getDefaultValues, lktDebug, textFieldTypes, textFieldTypesWithOptions };
1082
+ export { Accordion, type AccordionConfig, AccordionToggleMode, AccordionType, Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, FieldValidation, type FieldValidationConfig, 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 ValidButtonDot, 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, ValidationCode, ValidationStatus, booleanFieldTypes, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, fieldTypesWithOptions, fieldTypesWithoutClear, fieldTypesWithoutUndo, fieldsWithMultipleMode, getDefaultValues, lktDebug, textFieldTypes, textFieldTypesWithOptions };
package/dist/index.js CHANGED
@@ -110,6 +110,20 @@ var LktSettings = class _LktSettings {
110
110
  }
111
111
  return _LktSettings;
112
112
  }
113
+ static defaultToggleButton = {
114
+ text: "Toggle",
115
+ textOn: "Close",
116
+ textOff: "Show more",
117
+ type: "hidden-switch" /* HiddenSwitch */
118
+ };
119
+ static setDefaultToggleButton(button, override = true) {
120
+ if (override) {
121
+ _LktSettings.defaultToggleButton = button;
122
+ } else {
123
+ _LktSettings.defaultToggleButton = ensureButtonConfig(button, _LktSettings.defaultToggleButton);
124
+ }
125
+ return _LktSettings;
126
+ }
113
127
  };
114
128
 
115
129
  // src/enums/FieldType.ts
@@ -542,7 +556,6 @@ var Button = class extends LktItem {
542
556
  static lktDefaultValues = [
543
557
  "type",
544
558
  "name",
545
- "palette",
546
559
  "class",
547
560
  "containerClass",
548
561
  "value",
@@ -565,7 +578,9 @@ var Button = class extends LktItem {
565
578
  "icon",
566
579
  "iconOn",
567
580
  "iconOff",
568
- "iconDot",
581
+ "iconEndOn",
582
+ "iconEndOff",
583
+ "dot",
569
584
  "iconEnd",
570
585
  "img",
571
586
  "showTooltipOnHoverDelay",
@@ -579,8 +594,7 @@ var Button = class extends LktItem {
579
594
  "hideTooltipOnLeave",
580
595
  "splitClass",
581
596
  "prop",
582
- "onClick",
583
- "onConfirm"
597
+ "onClick"
584
598
  ];
585
599
  type = "button" /* Button */;
586
600
  name = generateRandomString2(10);
@@ -606,8 +620,10 @@ var Button = class extends LktItem {
606
620
  textOff = void 0;
607
621
  iconOn = void 0;
608
622
  iconOff = void 0;
623
+ iconEndOn = void 0;
624
+ iconEndOff = void 0;
609
625
  icon = "";
610
- iconDot = false;
626
+ dot = false;
611
627
  iconEnd = "";
612
628
  img = "";
613
629
  showTooltipOnHoverDelay = 0;
@@ -623,7 +639,6 @@ var Button = class extends LktItem {
623
639
  prop = {};
624
640
  // Event management
625
641
  onClick = void 0;
626
- onConfirm = void 0;
627
642
  constructor(data = {}) {
628
643
  super();
629
644
  this.feed(data);
@@ -714,6 +729,68 @@ var Column = class extends LktItem {
714
729
  }
715
730
  };
716
731
 
732
+ // src/enums/AccordionType.ts
733
+ var AccordionType = /* @__PURE__ */ ((AccordionType2) => {
734
+ AccordionType2["Auto"] = "auto";
735
+ AccordionType2["Always"] = "always";
736
+ AccordionType2["Lazy"] = "lazy";
737
+ AccordionType2["Ever"] = "ever";
738
+ return AccordionType2;
739
+ })(AccordionType || {});
740
+
741
+ // src/enums/AccordionToggleMode.ts
742
+ var AccordionToggleMode = /* @__PURE__ */ ((AccordionToggleMode2) => {
743
+ AccordionToggleMode2["Transform"] = "transform";
744
+ AccordionToggleMode2["Height"] = "height";
745
+ AccordionToggleMode2["Display"] = "display";
746
+ return AccordionToggleMode2;
747
+ })(AccordionToggleMode || {});
748
+
749
+ // src/instances/Accordion.ts
750
+ var Accordion = class extends LktItem {
751
+ static lktAllowUndefinedProps = [
752
+ "onClick"
753
+ ];
754
+ static lktDefaultValues = [
755
+ "modelValue",
756
+ "type",
757
+ "toggleMode",
758
+ "actionButton",
759
+ "toggleButton",
760
+ "toggleOnClickIntro",
761
+ "toggleTimeout",
762
+ "title",
763
+ "icon",
764
+ "class",
765
+ "contentClass",
766
+ "iconRotation",
767
+ "minHeight",
768
+ "iconAtEnd"
769
+ ];
770
+ // Main config
771
+ modelValue = false;
772
+ type = "auto" /* Auto */;
773
+ toggleMode = "height" /* Height */;
774
+ // Buttons config
775
+ actionButton = {};
776
+ toggleButton = {};
777
+ // Toggle config
778
+ toggleOnClickIntro = false;
779
+ toggleTimeout = 0;
780
+ // Visuals
781
+ title = "";
782
+ icon = "";
783
+ class = "";
784
+ contentClass = "";
785
+ iconRotation = "90";
786
+ minHeight = void 0;
787
+ iconAtEnd = false;
788
+ constructor(data = {}) {
789
+ super();
790
+ this.feed(data);
791
+ }
792
+ };
793
+
717
794
  // src/enums/TooltipPositionEngine.ts
718
795
  var TooltipPositionEngine = /* @__PURE__ */ ((TooltipPositionEngine2) => {
719
796
  TooltipPositionEngine2["Fixed"] = "fixed";
@@ -1084,23 +1161,6 @@ var Table = class extends LktItem {
1084
1161
  }
1085
1162
  };
1086
1163
 
1087
- // src/enums/AccordionToggleMode.ts
1088
- var AccordionToggleMode = /* @__PURE__ */ ((AccordionToggleMode2) => {
1089
- AccordionToggleMode2["Transform"] = "transform";
1090
- AccordionToggleMode2["Height"] = "height";
1091
- AccordionToggleMode2["Display"] = "display";
1092
- return AccordionToggleMode2;
1093
- })(AccordionToggleMode || {});
1094
-
1095
- // src/enums/AccordionType.ts
1096
- var AccordionType = /* @__PURE__ */ ((AccordionType2) => {
1097
- AccordionType2["Auto"] = "auto";
1098
- AccordionType2["Always"] = "always";
1099
- AccordionType2["Lazy"] = "lazy";
1100
- AccordionType2["Ever"] = "ever";
1101
- return AccordionType2;
1102
- })(AccordionType || {});
1103
-
1104
1164
  // src/enums/ModalCallbackAction.ts
1105
1165
  var ModalCallbackAction = /* @__PURE__ */ ((ModalCallbackAction2) => {
1106
1166
  ModalCallbackAction2["Refresh"] = "refresh";
@@ -1188,6 +1248,7 @@ function getDefaultValues(cls) {
1188
1248
  return result;
1189
1249
  }
1190
1250
  export {
1251
+ Accordion,
1191
1252
  AccordionToggleMode,
1192
1253
  AccordionType,
1193
1254
  Anchor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-vue-kernel",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "LKT Vue Kernel",
5
5
  "keywords": [
6
6
  "lkt",