lkt-vue-kernel 1.0.24 → 1.0.26
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 +72 -19
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -186,7 +186,7 @@ interface TooltipConfig {
|
|
|
186
186
|
|
|
187
187
|
type ValidButtonDot = boolean | string | number;
|
|
188
188
|
|
|
189
|
-
type ValidTextValue = string | number;
|
|
189
|
+
type ValidTextValue = string | number | undefined;
|
|
190
190
|
|
|
191
191
|
interface ButtonConfig {
|
|
192
192
|
type?: ButtonType;
|
|
@@ -643,6 +643,14 @@ interface DragConfig {
|
|
|
643
643
|
dragKey?: string;
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
+
interface IconConfig {
|
|
647
|
+
icon?: ValidTextValue;
|
|
648
|
+
text?: ValidTextValue;
|
|
649
|
+
class?: ValidTextValue;
|
|
650
|
+
pack?: ValidTextValue;
|
|
651
|
+
type?: string;
|
|
652
|
+
}
|
|
653
|
+
|
|
646
654
|
declare enum ItemCrudView {
|
|
647
655
|
Inline = "inline",
|
|
648
656
|
Modal = "modal"
|
|
@@ -676,24 +684,30 @@ interface SaveConfig {
|
|
|
676
684
|
delay?: number;
|
|
677
685
|
}
|
|
678
686
|
|
|
687
|
+
declare enum NotificationType {
|
|
688
|
+
Toast = "toast",
|
|
689
|
+
Inline = "inline"
|
|
690
|
+
}
|
|
691
|
+
|
|
679
692
|
interface ItemCrudConfig {
|
|
680
|
-
modelValue
|
|
681
|
-
editing
|
|
682
|
-
mode
|
|
683
|
-
view
|
|
684
|
-
editModeButton
|
|
685
|
-
dropButton
|
|
686
|
-
createButton
|
|
687
|
-
updateButton
|
|
693
|
+
modelValue?: LktObject;
|
|
694
|
+
editing?: boolean;
|
|
695
|
+
mode?: ItemCrudMode;
|
|
696
|
+
view?: ItemCrudView;
|
|
697
|
+
editModeButton?: ButtonConfig;
|
|
698
|
+
dropButton?: ButtonConfig;
|
|
699
|
+
createButton?: ButtonConfig;
|
|
700
|
+
updateButton?: ButtonConfig;
|
|
688
701
|
buttonNavPosition?: ItemCrudButtonNavPosition;
|
|
689
702
|
buttonNavVisibility?: ItemCrudButtonNavVisibility;
|
|
690
|
-
modalConfig
|
|
691
|
-
saveConfig
|
|
692
|
-
dataStateConfig
|
|
693
|
-
readResource
|
|
694
|
-
readData
|
|
695
|
-
title
|
|
696
|
-
beforeEmitUpdate
|
|
703
|
+
modalConfig?: ModalConfig;
|
|
704
|
+
saveConfig?: SaveConfig;
|
|
705
|
+
dataStateConfig?: DataStateConfig;
|
|
706
|
+
readResource?: string;
|
|
707
|
+
readData?: LktObject;
|
|
708
|
+
title?: string;
|
|
709
|
+
beforeEmitUpdate?: Function | undefined;
|
|
710
|
+
notificationType?: NotificationType;
|
|
697
711
|
}
|
|
698
712
|
|
|
699
713
|
declare enum PaginatorType {
|
|
@@ -715,6 +729,30 @@ interface PaginatorConfig {
|
|
|
715
729
|
filters?: LktObject;
|
|
716
730
|
}
|
|
717
731
|
|
|
732
|
+
declare enum ProgressType {
|
|
733
|
+
None = "",
|
|
734
|
+
Incremental = "incremental",
|
|
735
|
+
Decremental = "decremental"
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
declare enum ProgressValueFormat {
|
|
739
|
+
NotDefined = "",
|
|
740
|
+
Hidden = "hidden",
|
|
741
|
+
Integer = "integer",
|
|
742
|
+
Decimal = "decimal",
|
|
743
|
+
Auto = "auto"
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
interface ProgressConfig {
|
|
747
|
+
modelValue?: number;
|
|
748
|
+
type?: ProgressType;
|
|
749
|
+
duration?: number;
|
|
750
|
+
pauseOnHover?: boolean;
|
|
751
|
+
header?: string;
|
|
752
|
+
valueFormat?: ProgressValueFormat;
|
|
753
|
+
palette?: string;
|
|
754
|
+
}
|
|
755
|
+
|
|
718
756
|
declare enum TableType {
|
|
719
757
|
Table = "table",
|
|
720
758
|
Item = "item",
|
|
@@ -851,9 +889,11 @@ declare enum ToastPositionX {
|
|
|
851
889
|
interface ToastConfig {
|
|
852
890
|
type?: ToastType;
|
|
853
891
|
text?: ValidTextValue;
|
|
892
|
+
icon?: ValidTextValue;
|
|
854
893
|
positionX?: ToastPositionX;
|
|
855
894
|
duration?: number;
|
|
856
|
-
buttonConfig?: ButtonConfig;
|
|
895
|
+
buttonConfig?: ButtonConfig | undefined;
|
|
896
|
+
zIndex?: number | undefined;
|
|
857
897
|
}
|
|
858
898
|
|
|
859
899
|
declare class LktStrictItem extends LktItem {
|
|
@@ -937,6 +977,18 @@ declare class Accordion extends LktItem implements AccordionConfig {
|
|
|
937
977
|
constructor(data?: Partial<AnchorConfig>);
|
|
938
978
|
}
|
|
939
979
|
|
|
980
|
+
declare class Toast extends LktItem implements ToastConfig {
|
|
981
|
+
static lktDefaultValues: (keyof ToastConfig)[];
|
|
982
|
+
type?: ToastType;
|
|
983
|
+
text?: ValidTextValue;
|
|
984
|
+
icon?: ValidTextValue;
|
|
985
|
+
positionX?: ToastPositionX;
|
|
986
|
+
duration?: number | undefined;
|
|
987
|
+
buttonConfig?: ButtonConfig | undefined;
|
|
988
|
+
zIndex?: number;
|
|
989
|
+
constructor(data?: Partial<ToastConfig>);
|
|
990
|
+
}
|
|
991
|
+
|
|
940
992
|
declare class Tooltip extends LktItem implements TooltipConfig {
|
|
941
993
|
static lktDefaultValues: (keyof TooltipConfig)[];
|
|
942
994
|
modelValue: boolean;
|
|
@@ -974,6 +1026,7 @@ declare class ItemCrud extends LktItem implements ItemCrudConfig {
|
|
|
974
1026
|
dataStateConfig: DataStateConfig;
|
|
975
1027
|
buttonNavPosition?: ItemCrudButtonNavPosition;
|
|
976
1028
|
buttonNavVisibility?: ItemCrudButtonNavVisibility;
|
|
1029
|
+
notificationType?: NotificationType;
|
|
977
1030
|
constructor(data?: Partial<ItemCrudConfig>);
|
|
978
1031
|
}
|
|
979
1032
|
|
|
@@ -1085,7 +1138,7 @@ type ValidCustomSlot = string | Component | undefined;
|
|
|
1085
1138
|
type ValidScanPropTarget = ScanPropTarget | ((...args: any[]) => ScanPropTarget);
|
|
1086
1139
|
|
|
1087
1140
|
declare const extractPropValue: (needle: ValidScanPropTarget, haystack: LktObject) => ValidScanPropTarget;
|
|
1088
|
-
declare const extractI18nValue: (needle:
|
|
1141
|
+
declare const extractI18nValue: (needle: ValidTextValue) => any;
|
|
1089
1142
|
|
|
1090
1143
|
declare const ensureButtonConfig: (buttonConfig: Partial<ButtonConfig> | undefined, settingsConfig: Partial<ButtonConfig>) => Partial<ButtonConfig>;
|
|
1091
1144
|
|
|
@@ -1102,4 +1155,4 @@ declare function getDefaultValues<T>(cls: {
|
|
|
1102
1155
|
lktDefaultValues: (keyof T)[];
|
|
1103
1156
|
}): Partial<T>;
|
|
1104
1157
|
|
|
1105
|
-
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, type ToastConfig, ToastPositionX, ToastType, 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, type ValidTextValue, ValidationCode, ValidationStatus, booleanFieldTypes, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, fieldTypesWithOptions, fieldTypesWithoutClear, fieldTypesWithoutUndo, fieldsWithMultipleMode, getDefaultValues, lktDebug, textFieldTypes, textFieldTypesWithOptions };
|
|
1158
|
+
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 IconConfig, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, Modal, ModalCallbackAction, type ModalCallbackConfig, type ModalConfig, ModalType, MultipleOptionsDisplay, NotificationType, Option, type OptionConfig, Paginator, type PaginatorConfig, PaginatorType, type ProgressConfig, ProgressType, ProgressValueFormat, SafeString, type SaveConfig, SaveType, type ScanPropTarget, SortDirection, Table, type TableConfig, TablePermission, TableRowType, TableType, Toast, type ToastConfig, ToastPositionX, ToastType, 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, type ValidTextValue, ValidationCode, ValidationStatus, booleanFieldTypes, createColumn, ensureButtonConfig, extractI18nValue, extractPropValue, fieldTypesWithOptions, fieldTypesWithoutClear, fieldTypesWithoutUndo, fieldsWithMultipleMode, getDefaultValues, lktDebug, textFieldTypes, textFieldTypesWithOptions };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var L=(s=>(s.Button="button",s.Submit="submit",s.Reset="reset",s.Anchor="anchor",s.Content="content",s.Switch="switch",s.HiddenSwitch="hidden-switch",s.Split="split",s.SplitLazy="split-lazy",s.SplitEver="split-ever",s.Tooltip="tooltip",s.TooltipLazy="tooltip-lazy",s.TooltipEver="tooltip-ever",s))(L||{});var u=(e,t)=>typeof e>"u"?t:{...t,...e};var g=class e{static debugEnabled=!1;static debugMode(t=!0){return e.debugEnabled=t,e}static defaultSaveButton={text:"Save"};static setDefaultSaveButton(t,o=!0){return o?e.defaultSaveButton=t:e.defaultSaveButton=u(t,e.defaultSaveButton),e}static defaultConfirmButton={text:"Confirm"};static setDefaultConfirmButton(t,o=!0){return o?e.defaultConfirmButton=t:e.defaultConfirmButton=u(t,e.defaultConfirmButton),e}static defaultCancelButton={text:"Cancel"};static setDefaultCancelButton(t,o=!0){return o?e.defaultCancelButton=t:e.defaultCancelButton=u(t,e.defaultCancelButton),e}static defaultCreateButton={text:"Create"};static setDefaultCreateButton(t,o=!0){return o?e.defaultCreateButton=t:e.defaultCreateButton=u(t,e.defaultCreateButton),e}static defaultUpdateButton={text:"Update"};static setDefaultUpdateButton(t,o=!0){return o?e.defaultUpdateButton=t:e.defaultUpdateButton=u(t,e.defaultUpdateButton),e}static defaultDropButton={text:"Drop"};static setDefaultDropButton(t,o=!0){return o?e.defaultDropButton=t:e.defaultDropButton=u(t,e.defaultDropButton),e}static defaultEditModeButton={text:"Edit mode",type:"switch"};static setDefaultEditModeButton(t,o=!0){return o?e.defaultEditModeButton=t:e.defaultEditModeButton=u(t,e.defaultEditModeButton),e}static defaultToggleButton={text:"Toggle",textOn:"Close",textOff:"Show more",type:"hidden-switch"};static setDefaultToggleButton(t,o=!0){return o?e.defaultToggleButton=t:e.defaultToggleButton=u(t,e.defaultToggleButton),e}};var I=(a=>(a.Text="text",a.Email="email",a.Tel="tel",a.Password="password",a.Search="search",a.Number="number",a.Color="color",a.Range="range",a.Textarea="textarea",a.Html="html",a.Date="date",a.File="file",a.Image="image",a.Select="select",a.Check="check",a.Switch="switch",a.Calc="calc",a.Card="card",a.Elements="elements",a))(I||{});var rt=["text","search","select"],nt=["switch","check"],it=["switch","check"],at=["text","search"],lt=["switch","check"],st=["select","color","card"],ft=["text","email","password"];var dt=["lktDateProps","lktStrictItem","lktExcludedProps"],i=class e{static lktAllowUndefinedProps=[];static lktExcludedProps=[];static lktDateProps=[];static lktStrictItem=!1;static lktDefaultValues=[];constructor(t){}feed(t={},o=this){if(typeof t=="object")for(let[r,n]of Object.entries(t))o.assignProp(r,n)}assignProp(t,o){if(!(dt.includes(t)||e.lktExcludedProps.includes(t))&&!(e.lktStrictItem&&!this.hasOwnProperty(t))){if(e.lktDateProps.includes(t)){this[t]=new Date(o);return}this[t]=o}}};var M=class extends i{lktStrictItem=!0};var V=class extends i{value=void 0;label="";data={};disabled=!1;group="";icon="";modal="";constructor(t={}){super(),this.feed(t)}};import{generateRandomString as ut}from"lkt-string-tools";var P=(r=>(r.List="list",r.Inline="inline",r.Count="count",r))(P||{});var v=(n=>(n.None="",n.Focus="focus",n.Blur="blur",n.Always="always",n))(v||{});var x=class extends i{modelValue="";type="text";valid=void 0;placeholder="";searchPlaceholder="";label="";labelIcon="";labelIconAtEnd=!1;name=ut(16);autocomplete=!1;disabled=!1;readonly=!1;readMode=!1;allowReadModeSwitch=!1;tabindex=void 0;mandatory=!1;showPassword=!1;canClear=!1;canUndo=!1;canI18n=!1;canStep=!0;canTag=!0;mandatoryMessage="";infoMessage="";errorMessage="";min=void 0;max=void 0;step=1;enableAutoNumberFix=!0;emptyValueSlot="";optionSlot=void 0;valueSlot=void 0;editSlot=void 0;slotData={};resource="";resourceData={};validationResource="";validationResourceData={};autoValidation=!1;autoValidationType="blur";validationStack="default";minNumbers=void 0;maxNumbers=void 0;minChars=void 0;maxChars=void 0;minUpperChars=void 0;maxUpperChars=void 0;minLowerChars=void 0;maxLowerChars=void 0;minSpecialChars=void 0;maxSpecialChars=void 0;checkEqualTo=void 0;featuredButton="";infoButtonEllipsis=!1;fileName="";customButtonText="";customButtonClass="";options=[];multiple=!1;multipleDisplay="list";multipleDisplayEdition="inline";searchable=!1;autoloadOptionsResource=!1;optionsDownload="";optionsModal="";optionsModalData={};optionsText="";optionsIcon="";optionsClass="";optionsLabelFormatter=void 0;optionsResource="";optionsResourceData={};icon="";download="";modal="";modalKey="";modalData={};data={};validation={};constructor(t={}){super(),this.feed(t)}};var E=(l=>(l.MinStringLength="min-str",l.MinNumber="min-num",l.MaxStringLength="max-str",l.MaxNumber="max-num",l.Email="email",l.Empty="empty",l.EqualTo="equal-to",l.MinNumbers="min-numbers",l.MaxNumbers="max-numbers",l.MinChars="min-chars",l.MaxChars="max-chars",l.MinUpperChars="min-upper-chars",l.MaxUpperChars="max-upper-chars",l.MinLowerChars="min-lower-chars",l.MaxLowerChars="max-lower-chars",l.MinSpecialChars="min-special-chars",l.MaxSpecialChars="max-special-chars",l))(E||{});var F=(r=>(r.Ok="ok",r.Ko="ko",r.Info="info",r))(F||{});var k=class e{code=void 0;status="info";min=0;max=0;equalToValue=void 0;constructor(t,o){this.code=t,this.status=o}setMin(t){return this.min=t,this}setMax(t){return this.max=t,this}setEqualToValue(t){return this.equalToValue=t,this}static createEmpty(t="ko"){return new e("empty",t)}static createEmail(t="ko"){return new e("email",t)}static createMinStr(t,o="ko"){return new e("min-str",o).setMin(t)}static createMaxStr(t,o="ko"){return new e("max-str",o).setMax(t)}static createMinNum(t,o="ko"){return new e("min-num",o).setMin(t)}static createMaxNum(t,o="ko"){return new e("max-num",o).setMax(t)}static createNumBetween(t,o,r="ko"){return new e("max-num",r).setMin(t).setMax(o)}static createMinNumbers(t,o="ko"){return new e("min-numbers",o).setMin(t)}static createMaxNumbers(t,o="ko"){return new e("max-numbers",o).setMax(t)}static createMinUpperChars(t,o="ko"){return new e("min-upper-chars",o).setMin(t)}static createMaxUpperChars(t,o="ko"){return new e("max-upper-chars",o).setMax(t)}static createMinLowerChars(t,o="ko"){return new e("min-lower-chars",o).setMin(t)}static createMaxLowerChars(t,o="ko"){return new e("max-lower-chars",o).setMax(t)}static createMinSpecialChars(t,o="ko"){return new e("min-special-chars",o).setMin(t)}static createMaxSpecialChars(t,o="ko"){return new e("max-special-chars",o).setMax(t)}static createMinChars(t,o="ko"){return new e("min-chars",o).setMin(t)}static createMaxChars(t,o="ko"){return new e("max-chars",o).setMax(t)}static createEqualTo(t,o="ko"){return new e("equal-to",o).setEqualToValue(t)}};var T=(n=>(n.None="",n.Field="field",n.Button="button",n.Anchor="anchor",n))(T||{});var C=class e{value;constructor(t){this.value=t}getValue(...t){return typeof this.value=="function"?this.value(...t):typeof this.value=="object"&&typeof this.value==typeof e?this.value.getValue(...t):typeof this.value=="string"?this.value:""}};var N=(m=>(m.Href="href",m.RouterLink="router-link",m.RouterLinkBack="router-link-back",m.Mail="mail",m.Tel="tel",m.Tab="tab",m.Download="download",m.Action="action",m.Legacy="",m))(N||{});var p=class extends i{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["type","to","class","isActive","downloadFileName","disabled","onClick","confirmModal","confirmModalKey","confirmData","imposter","external"];type="router-link";to="";class="";isActive=!1;downloadFileName="";disabled=!1;onClick=void 0;confirmModal="";confirmModalKey="_";confirmData={};imposter=!1;external=!1;getHref(){let t="";return typeof this.to=="string"&&(t=this.to),"mail"===this.type?`mailto:${t}`:"tel"===this.type?`tel:${t}`:["href","mail","tel","tab","download"].includes(this.type)?t:typeof this.to=="string"&&this.to!==""?this.to:""}constructor(t={}){super(),this.feed(t)}};import{generateRandomString as mt}from"lkt-string-tools";var b=class extends i{lktAllowUndefinedProps=["clickRef","tabindex","anchor","showTooltipOnHover","hideTooltipOnLeave"];static lktDefaultValues=["type","name","class","containerClass","value","disabled","loading","wrapContent","splitIcon","resource","resourceData","modal","modalKey","modalData","confirmModal","confirmModalKey","confirmData","modalCallbacks","text","textOn","textOff","icon","iconOn","iconOff","iconEndOn","iconEndOff","dot","iconEnd","img","showTooltipOnHoverDelay","tooltip","checked","clickRef","openTooltip","tabindex","anchor","showTooltipOnHover","hideTooltipOnLeave","splitClass","prop","onClick"];type="button";name=mt(10);palette="";class="";containerClass="";value="";disabled=!1;loading=!1;wrapContent=!1;splitIcon="";resource="";resourceData={};modal="";modalKey="_";modalData={};confirmModal="";confirmModalKey="_";confirmData={};modalCallbacks=[];text="";textOn=void 0;textOff=void 0;iconOn=void 0;iconOff=void 0;iconEndOn=void 0;iconEndOff=void 0;icon="";dot=!1;iconEnd="";img="";showTooltipOnHoverDelay=0;checked=!1;clickRef=void 0;openTooltip=!1;tabindex=void 0;anchor=void 0;showTooltipOnHover=void 0;hideTooltipOnLeave=void 0;splitClass="";tooltip={};prop={};onClick=void 0;constructor(t={}){super(),this.feed(t),this.anchor=new p(t.anchor)}isDisabled(){return typeof this.disabled=="function"?this.disabled():this.disabled}};var h=class extends i{lktExcludedProps=["link","field","anchor","button"];lktAllowUndefinedProps=["formatter","checkEmpty","colspan","field","anchor","button","link","action"];static lktDefaultValues=["type","key","label","sortable","hidden","editable","formatter","checkEmpty","colspan","preferSlot","isForRowKey","extractTitleFromColumn","slotData","field","anchor","button","link","action"];type="";key="";label="";sortable=!0;hidden=!1;editable=!1;formatter=void 0;checkEmpty=void 0;colspan=void 0;preferSlot=!0;isForRowKey=!1;extractTitleFromColumn="";slotData={};field=void 0;anchor=void 0;button=void 0;link=void 0;action=void 0;constructor(t={}){switch(super(),this.feed(t),this.type){case"field":this.field=new x(t.field);break;case"anchor":this.anchor=new p(t.anchor);break;case"button":this.button=new b(t.button);break}this.link=new C(t.link)}getHref(t){return typeof this.link!="object"?"":this.link.getValue(t)}doAction(t){if(typeof this.action=="function")return this.action(t);console.warn("No action defined")}};var A=(n=>(n.Auto="auto",n.Always="always",n.Lazy="lazy",n.Ever="ever",n))(A||{});var j=(r=>(r.Transform="transform",r.Height="height",r.Display="display",r))(j||{});var B=class extends i{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["modelValue","type","toggleMode","actionButton","toggleButton","toggleOnClickIntro","toggleTimeout","title","icon","class","contentClass","iconRotation","minHeight","iconAtEnd","toggleIconAtEnd"];modelValue=!1;type="auto";toggleMode="height";actionButton={};toggleButton={};toggleOnClickIntro=!1;toggleTimeout=0;title="";icon="";class="";contentClass="";iconRotation="90";minHeight=void 0;iconAtEnd=!1;toggleIconAtEnd=!1;constructor(t={}){super(),this.feed(t)}};var K=(o=>(o.Fixed="fixed",o.Absolute="absolute",o))(K||{});var R=(n=>(n.Top="top",n.Bottom="bottom",n.Center="center",n.ReferrerCenter="referrer-center",n))(R||{});var U=(f=>(f.Left="left",f.Right="right",f.Center="center",f.LeftCorner="left-corner",f.RightCorner="right-corner",f))(U||{});var S=class extends i{static lktDefaultValues=["modelValue","alwaysOpen","class","text","icon","iconAtEnd","engine","referrerWidth","referrerMargin","windowMargin","referrer","locationY","locationX"];modelValue=!1;alwaysOpen=!1;class="";text="";icon="";iconAtEnd=!1;engine="fixed";referrerWidth=!1;referrerMargin=0;windowMargin=0;referrer=void 0;locationY="bottom";locationX="left-corner";constructor(t={}){super(),this.feed(t)}};var H=(r=>(r.Create="create",r.Update="update",r.Read="read",r))(H||{});var W=(o=>(o.Inline="inline",o.Modal="modal",o))(W||{});var q=(o=>(o.Top="top",o.Bottom="bottom",o))(q||{});var z=(r=>(r.Changed="changed",r.Always="always",r.Never="never",r))(z||{});var $=(r=>(r.Manual="manual",r.Auto="auto",r.Delay="delay",r))($||{});var w=class extends i{static lktDefaultValues=["modelValue","editing","mode","view","editModeButton","dropButton","createButton","updateButton","modalConfig","saveConfig","title","readResource","readData","beforeEmitUpdate","dataStateConfig","buttonNavPosition","buttonNavVisibility"];modelValue={};editing=!1;mode="read";view="inline";editModeButton={};dropButton={};createButton={};updateButton={};modalConfig={};saveConfig={type:"manual"};title="";readResource="";readData={};beforeEmitUpdate=void 0;dataStateConfig={};buttonNavPosition="top";buttonNavVisibility="always";constructor(t={}){super(),this.feed(t)}};var y=class extends i{static lktDefaultValues=["size","preTitle","preTitleIcon","title","closeIcon","closeConfirm","closeConfirmKey","showClose","disabledClose","disabledVeilClick","hiddenFooter","modalName","modalKey","zIndex","beforeClose","item"];size="";preTitle="";preTitleIcon="";title="";closeIcon="";closeConfirm="";closeConfirmKey="_";showClose=!0;disabledClose=!1;disabledVeilClick=!1;hiddenFooter=!1;modalName="";modalKey="_";zIndex=500;beforeClose=void 0;item={};confirmButton={};cancelButton={};constructor(t={}){super(),this.feed(t)}};var G=(c=>(c.Pages="pages",c.PrevNext="prev-next",c.PagesPrevNext="pages-prev-next",c.PagesPrevNextFirstLast="pages-prev-next-first-last",c.LoadMore="load-more",c.Infinite="infinite",c))(G||{});var O=class extends i{static lktAllowUndefinedProps=[];static lktDefaultValues=["type","modelValue","class","resource","readOnly","loading","filters"];type="pages-prev-next";modelValue=1;class="";resource="";readOnly=!1;loading=!1;filters={};constructor(t={}){super(),this.feed(t)}};var Y=(n=>(n.Table="table",n.Item="item",n.Ul="ul",n.Ol="ol",n))(Y||{});var J=(n=>(n[n.Auto=0]="Auto",n[n.PreferItem=1]="PreferItem",n[n.PreferCustomItem=2]="PreferCustomItem",n[n.PreferColumns=3]="PreferColumns",n))(J||{});var D=class extends i{static lktDefaultValues=["modelValue","type","columns","resource","noResultsText","filters","hideEmptyColumns","itemDisplayChecker","loading","page","perms","editMode","dataStateConfig","sortable","sorter","initialSorting","drag","paginator","header","title","titleTag","titleIcon","headerClass","saveButton","createButton","dropButton","wrapContentTag","wrapContentClass","itemsContainerClass","hiddenSave","createText","createIcon","createRoute","dropText","dropIcon","editText","editIcon","editLink","editModeText","switchEditionEnabled","createDisabled","dropConfirm","dropResource","addNavigation","createEnabledValidator","newValueGenerator","requiredItemsForTopCreate","requiredItemsForBottomCreate","slotItemVar"];modelValue=[];type="table";columns=[];resource="";noResultsText="";filters=[];hideEmptyColumns=!1;itemDisplayChecker=void 0;rowDisplayType=0;loading=!1;page=1;perms=[];editMode=!1;dataStateConfig={};sortable=!1;sorter=void 0;initialSorting=!1;drag=void 0;paginator=void 0;header;title="";titleTag="h2";titleIcon="";headerClass="";saveButton={};createButton={};dropButton={};hiddenSave=!1;wrapContentTag="div";wrapContentClass="";itemsContainerClass="";createText="";createIcon="";createRoute="";dropText="";dropIcon="";editText="";editIcon="";editLink="";editModeText="";switchEditionEnabled=!1;createDisabled=!1;dropConfirm="";dropResource="";addNavigation=!1;createEnabledValidator=void 0;newValueGenerator=void 0;requiredItemsForTopCreate=0;requiredItemsForBottomCreate=0;slotItemVar="item";constructor(t={}){super(),this.feed(t)}};var Q=(f=>(f.Refresh="refresh",f.Close="close",f.ReOpen="reOpen",f.Exec="exec",f.Open="open",f))(Q||{});var Z=(o=>(o.Modal="modal",o.Confirm="confirm",o))(Z||{});var X=(o=>(o.Asc="asc",o.Desc="desc",o))(X||{});var _=(d=>(d.Create="create",d.Update="update",d.Edit="edit",d.Drop="drop",d.Sort="sort",d.SwitchEditMode="switch-edit-mode",d.InlineEdit="inline-edit",d.InlineCreate="inline-create",d.ModalCreate="modal-create",d.InlineCreateEver="inline-create-ever",d))(_||{});var tt=(r=>(r.Left="left",r.Center="center",r.Right="right",r))(tt||{});var et=(o=>(o.Message="message",o.Button="button",o))(et||{});var ot=(o=>(o.Lazy="lazy",o.Ever="ever",o))(ot||{});import{__ as pt}from"lkt-i18n";var ct=(e,t)=>typeof e=="string"&&e.startsWith("prop:")?t[e.substring(5)]:e,gt=e=>{let t=String(e);return t.startsWith("__:")?pt(t.substring(3)):t};var xt=(e,...t)=>{g.debugEnabled&&console.info("::lkt::",`[${e}] `,...t)};var Ct=e=>new h(e);function Ne(e){let t=new e,o={};if(!Array.isArray(e.lktDefaultValues))throw new Error("lktDefaultValues must be a keys array.");for(let r of e.lktDefaultValues)r in t&&(o[r]=t[r]);return o}export{B as Accordion,j as AccordionToggleMode,A as AccordionType,p as Anchor,N as AnchorType,b as Button,L as ButtonType,h as Column,T as ColumnType,x as Field,v as FieldAutoValidationTrigger,I as FieldType,k as FieldValidation,w as ItemCrud,q as ItemCrudButtonNavPosition,z as ItemCrudButtonNavVisibility,H as ItemCrudMode,W as ItemCrudView,i as LktItem,g as LktSettings,M as LktStrictItem,y as Modal,Q as ModalCallbackAction,Z as ModalType,P as MultipleOptionsDisplay,V as Option,O as Paginator,G as PaginatorType,C as SafeString,$ as SaveType,X as SortDirection,D as Table,_ as TablePermission,J as TableRowType,Y as TableType,tt as ToastPositionX,et as ToastType,ot as ToggleMode,S as Tooltip,U as TooltipLocationX,R as TooltipLocationY,K as TooltipPositionEngine,E as ValidationCode,F as ValidationStatus,lt as booleanFieldTypes,Ct as createColumn,u as ensureButtonConfig,gt as extractI18nValue,ct as extractPropValue,rt as fieldTypesWithOptions,nt as fieldTypesWithoutClear,it as fieldTypesWithoutUndo,st as fieldsWithMultipleMode,Ne as getDefaultValues,xt as lktDebug,ft as textFieldTypes,at as textFieldTypesWithOptions};
|
|
1
|
+
var L=(f=>(f.Button="button",f.Submit="submit",f.Reset="reset",f.Anchor="anchor",f.Content="content",f.Switch="switch",f.HiddenSwitch="hidden-switch",f.Split="split",f.SplitLazy="split-lazy",f.SplitEver="split-ever",f.Tooltip="tooltip",f.TooltipLazy="tooltip-lazy",f.TooltipEver="tooltip-ever",f))(L||{});var u=(e,t)=>typeof e>"u"?t:{...t,...e};var g=class e{static debugEnabled=!1;static debugMode(t=!0){return e.debugEnabled=t,e}static defaultSaveButton={text:"Save"};static setDefaultSaveButton(t,o=!0){return o?e.defaultSaveButton=t:e.defaultSaveButton=u(t,e.defaultSaveButton),e}static defaultConfirmButton={text:"Confirm"};static setDefaultConfirmButton(t,o=!0){return o?e.defaultConfirmButton=t:e.defaultConfirmButton=u(t,e.defaultConfirmButton),e}static defaultCancelButton={text:"Cancel"};static setDefaultCancelButton(t,o=!0){return o?e.defaultCancelButton=t:e.defaultCancelButton=u(t,e.defaultCancelButton),e}static defaultCreateButton={text:"Create"};static setDefaultCreateButton(t,o=!0){return o?e.defaultCreateButton=t:e.defaultCreateButton=u(t,e.defaultCreateButton),e}static defaultUpdateButton={text:"Update"};static setDefaultUpdateButton(t,o=!0){return o?e.defaultUpdateButton=t:e.defaultUpdateButton=u(t,e.defaultUpdateButton),e}static defaultDropButton={text:"Drop"};static setDefaultDropButton(t,o=!0){return o?e.defaultDropButton=t:e.defaultDropButton=u(t,e.defaultDropButton),e}static defaultEditModeButton={text:"Edit mode",type:"switch"};static setDefaultEditModeButton(t,o=!0){return o?e.defaultEditModeButton=t:e.defaultEditModeButton=u(t,e.defaultEditModeButton),e}static defaultToggleButton={text:"Toggle",textOn:"Close",textOff:"Show more",type:"hidden-switch"};static setDefaultToggleButton(t,o=!0){return o?e.defaultToggleButton=t:e.defaultToggleButton=u(t,e.defaultToggleButton),e}};var T=(a=>(a.Text="text",a.Email="email",a.Tel="tel",a.Password="password",a.Search="search",a.Number="number",a.Color="color",a.Range="range",a.Textarea="textarea",a.Html="html",a.Date="date",a.File="file",a.Image="image",a.Select="select",a.Check="check",a.Switch="switch",a.Calc="calc",a.Card="card",a.Elements="elements",a))(T||{});var lt=["text","search","select"],st=["switch","check"],ft=["switch","check"],dt=["text","search"],ut=["switch","check"],mt=["select","color","card"],pt=["text","email","password"];var ct=["lktDateProps","lktStrictItem","lktExcludedProps"],i=class e{static lktAllowUndefinedProps=[];static lktExcludedProps=[];static lktDateProps=[];static lktStrictItem=!1;static lktDefaultValues=[];constructor(t){}feed(t={},o=this){if(typeof t=="object")for(let[n,r]of Object.entries(t))o.assignProp(n,r)}assignProp(t,o){if(!(ct.includes(t)||e.lktExcludedProps.includes(t))&&!(e.lktStrictItem&&!this.hasOwnProperty(t))){if(e.lktDateProps.includes(t)){this[t]=new Date(o);return}this[t]=o}}};var M=class extends i{lktStrictItem=!0};var V=class extends i{value=void 0;label="";data={};disabled=!1;group="";icon="";modal="";constructor(t={}){super(),this.feed(t)}};import{generateRandomString as gt}from"lkt-string-tools";var P=(n=>(n.List="list",n.Inline="inline",n.Count="count",n))(P||{});var v=(r=>(r.None="",r.Focus="focus",r.Blur="blur",r.Always="always",r))(v||{});var x=class extends i{modelValue="";type="text";valid=void 0;placeholder="";searchPlaceholder="";label="";labelIcon="";labelIconAtEnd=!1;name=gt(16);autocomplete=!1;disabled=!1;readonly=!1;readMode=!1;allowReadModeSwitch=!1;tabindex=void 0;mandatory=!1;showPassword=!1;canClear=!1;canUndo=!1;canI18n=!1;canStep=!0;canTag=!0;mandatoryMessage="";infoMessage="";errorMessage="";min=void 0;max=void 0;step=1;enableAutoNumberFix=!0;emptyValueSlot="";optionSlot=void 0;valueSlot=void 0;editSlot=void 0;slotData={};resource="";resourceData={};validationResource="";validationResourceData={};autoValidation=!1;autoValidationType="blur";validationStack="default";minNumbers=void 0;maxNumbers=void 0;minChars=void 0;maxChars=void 0;minUpperChars=void 0;maxUpperChars=void 0;minLowerChars=void 0;maxLowerChars=void 0;minSpecialChars=void 0;maxSpecialChars=void 0;checkEqualTo=void 0;featuredButton="";infoButtonEllipsis=!1;fileName="";customButtonText="";customButtonClass="";options=[];multiple=!1;multipleDisplay="list";multipleDisplayEdition="inline";searchable=!1;autoloadOptionsResource=!1;optionsDownload="";optionsModal="";optionsModalData={};optionsText="";optionsIcon="";optionsClass="";optionsLabelFormatter=void 0;optionsResource="";optionsResourceData={};icon="";download="";modal="";modalKey="";modalData={};data={};validation={};constructor(t={}){super(),this.feed(t)}};var E=(s=>(s.MinStringLength="min-str",s.MinNumber="min-num",s.MaxStringLength="max-str",s.MaxNumber="max-num",s.Email="email",s.Empty="empty",s.EqualTo="equal-to",s.MinNumbers="min-numbers",s.MaxNumbers="max-numbers",s.MinChars="min-chars",s.MaxChars="max-chars",s.MinUpperChars="min-upper-chars",s.MaxUpperChars="max-upper-chars",s.MinLowerChars="min-lower-chars",s.MaxLowerChars="max-lower-chars",s.MinSpecialChars="min-special-chars",s.MaxSpecialChars="max-special-chars",s))(E||{});var F=(n=>(n.Ok="ok",n.Ko="ko",n.Info="info",n))(F||{});var k=class e{code=void 0;status="info";min=0;max=0;equalToValue=void 0;constructor(t,o){this.code=t,this.status=o}setMin(t){return this.min=t,this}setMax(t){return this.max=t,this}setEqualToValue(t){return this.equalToValue=t,this}static createEmpty(t="ko"){return new e("empty",t)}static createEmail(t="ko"){return new e("email",t)}static createMinStr(t,o="ko"){return new e("min-str",o).setMin(t)}static createMaxStr(t,o="ko"){return new e("max-str",o).setMax(t)}static createMinNum(t,o="ko"){return new e("min-num",o).setMin(t)}static createMaxNum(t,o="ko"){return new e("max-num",o).setMax(t)}static createNumBetween(t,o,n="ko"){return new e("max-num",n).setMin(t).setMax(o)}static createMinNumbers(t,o="ko"){return new e("min-numbers",o).setMin(t)}static createMaxNumbers(t,o="ko"){return new e("max-numbers",o).setMax(t)}static createMinUpperChars(t,o="ko"){return new e("min-upper-chars",o).setMin(t)}static createMaxUpperChars(t,o="ko"){return new e("max-upper-chars",o).setMax(t)}static createMinLowerChars(t,o="ko"){return new e("min-lower-chars",o).setMin(t)}static createMaxLowerChars(t,o="ko"){return new e("max-lower-chars",o).setMax(t)}static createMinSpecialChars(t,o="ko"){return new e("min-special-chars",o).setMin(t)}static createMaxSpecialChars(t,o="ko"){return new e("max-special-chars",o).setMax(t)}static createMinChars(t,o="ko"){return new e("min-chars",o).setMin(t)}static createMaxChars(t,o="ko"){return new e("max-chars",o).setMax(t)}static createEqualTo(t,o="ko"){return new e("equal-to",o).setEqualToValue(t)}};var N=(r=>(r.None="",r.Field="field",r.Button="button",r.Anchor="anchor",r))(N||{});var C=class e{value;constructor(t){this.value=t}getValue(...t){return typeof this.value=="function"?this.value(...t):typeof this.value=="object"&&typeof this.value==typeof e?this.value.getValue(...t):typeof this.value=="string"?this.value:""}};var A=(m=>(m.Href="href",m.RouterLink="router-link",m.RouterLinkBack="router-link-back",m.Mail="mail",m.Tel="tel",m.Tab="tab",m.Download="download",m.Action="action",m.Legacy="",m))(A||{});var p=class extends i{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["type","to","class","isActive","downloadFileName","disabled","onClick","confirmModal","confirmModalKey","confirmData","imposter","external"];type="router-link";to="";class="";isActive=!1;downloadFileName="";disabled=!1;onClick=void 0;confirmModal="";confirmModalKey="_";confirmData={};imposter=!1;external=!1;getHref(){let t="";return typeof this.to=="string"&&(t=this.to),"mail"===this.type?`mailto:${t}`:"tel"===this.type?`tel:${t}`:["href","mail","tel","tab","download"].includes(this.type)?t:typeof this.to=="string"&&this.to!==""?this.to:""}constructor(t={}){super(),this.feed(t)}};import{generateRandomString as xt}from"lkt-string-tools";var b=class extends i{lktAllowUndefinedProps=["clickRef","tabindex","anchor","showTooltipOnHover","hideTooltipOnLeave"];static lktDefaultValues=["type","name","class","containerClass","value","disabled","loading","wrapContent","splitIcon","resource","resourceData","modal","modalKey","modalData","confirmModal","confirmModalKey","confirmData","modalCallbacks","text","textOn","textOff","icon","iconOn","iconOff","iconEndOn","iconEndOff","dot","iconEnd","img","showTooltipOnHoverDelay","tooltip","checked","clickRef","openTooltip","tabindex","anchor","showTooltipOnHover","hideTooltipOnLeave","splitClass","prop","onClick"];type="button";name=xt(10);palette="";class="";containerClass="";value="";disabled=!1;loading=!1;wrapContent=!1;splitIcon="";resource="";resourceData={};modal="";modalKey="_";modalData={};confirmModal="";confirmModalKey="_";confirmData={};modalCallbacks=[];text="";textOn=void 0;textOff=void 0;iconOn=void 0;iconOff=void 0;iconEndOn=void 0;iconEndOff=void 0;icon="";dot=!1;iconEnd="";img="";showTooltipOnHoverDelay=0;checked=!1;clickRef=void 0;openTooltip=!1;tabindex=void 0;anchor=void 0;showTooltipOnHover=void 0;hideTooltipOnLeave=void 0;splitClass="";tooltip={};prop={};onClick=void 0;constructor(t={}){super(),this.feed(t),this.anchor=new p(t.anchor)}isDisabled(){return typeof this.disabled=="function"?this.disabled():this.disabled}};var h=class extends i{lktExcludedProps=["link","field","anchor","button"];lktAllowUndefinedProps=["formatter","checkEmpty","colspan","field","anchor","button","link","action"];static lktDefaultValues=["type","key","label","sortable","hidden","editable","formatter","checkEmpty","colspan","preferSlot","isForRowKey","extractTitleFromColumn","slotData","field","anchor","button","link","action"];type="";key="";label="";sortable=!0;hidden=!1;editable=!1;formatter=void 0;checkEmpty=void 0;colspan=void 0;preferSlot=!0;isForRowKey=!1;extractTitleFromColumn="";slotData={};field=void 0;anchor=void 0;button=void 0;link=void 0;action=void 0;constructor(t={}){switch(super(),this.feed(t),this.type){case"field":this.field=new x(t.field);break;case"anchor":this.anchor=new p(t.anchor);break;case"button":this.button=new b(t.button);break}this.link=new C(t.link)}getHref(t){return typeof this.link!="object"?"":this.link.getValue(t)}doAction(t){if(typeof this.action=="function")return this.action(t);console.warn("No action defined")}};var j=(r=>(r.Auto="auto",r.Always="always",r.Lazy="lazy",r.Ever="ever",r))(j||{});var K=(n=>(n.Transform="transform",n.Height="height",n.Display="display",n))(K||{});var B=class extends i{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["modelValue","type","toggleMode","actionButton","toggleButton","toggleOnClickIntro","toggleTimeout","title","icon","class","contentClass","iconRotation","minHeight","iconAtEnd","toggleIconAtEnd"];modelValue=!1;type="auto";toggleMode="height";actionButton={};toggleButton={};toggleOnClickIntro=!1;toggleTimeout=0;title="";icon="";class="";contentClass="";iconRotation="90";minHeight=void 0;iconAtEnd=!1;toggleIconAtEnd=!1;constructor(t={}){super(),this.feed(t)}};var R=(o=>(o.Message="message",o.Button="button",o))(R||{});var U=(n=>(n.Left="left",n.Center="center",n.Right="right",n))(U||{});var S=class extends i{static lktDefaultValues=["type","text","icon","positionX","duration","buttonConfig","zIndex"];type="message";text="";icon="";positionX="right";duration=void 0;buttonConfig=void 0;zIndex=1e3;constructor(t={}){super(),this.feed(t)}};var H=(o=>(o.Fixed="fixed",o.Absolute="absolute",o))(H||{});var z=(r=>(r.Top="top",r.Bottom="bottom",r.Center="center",r.ReferrerCenter="referrer-center",r))(z||{});var W=(l=>(l.Left="left",l.Right="right",l.Center="center",l.LeftCorner="left-corner",l.RightCorner="right-corner",l))(W||{});var w=class extends i{static lktDefaultValues=["modelValue","alwaysOpen","class","text","icon","iconAtEnd","engine","referrerWidth","referrerMargin","windowMargin","referrer","locationY","locationX"];modelValue=!1;alwaysOpen=!1;class="";text="";icon="";iconAtEnd=!1;engine="fixed";referrerWidth=!1;referrerMargin=0;windowMargin=0;referrer=void 0;locationY="bottom";locationX="left-corner";constructor(t={}){super(),this.feed(t)}};var q=(n=>(n.Create="create",n.Update="update",n.Read="read",n))(q||{});var $=(o=>(o.Inline="inline",o.Modal="modal",o))($||{});var G=(o=>(o.Top="top",o.Bottom="bottom",o))(G||{});var X=(n=>(n.Changed="changed",n.Always="always",n.Never="never",n))(X||{});var Y=(n=>(n.Manual="manual",n.Auto="auto",n.Delay="delay",n))(Y||{});var J=(o=>(o.Toast="toast",o.Inline="inline",o))(J||{});var y=class extends i{static lktDefaultValues=["modelValue","editing","mode","view","editModeButton","dropButton","createButton","updateButton","modalConfig","saveConfig","title","readResource","readData","beforeEmitUpdate","dataStateConfig","buttonNavPosition","buttonNavVisibility","notificationType"];modelValue={};editing=!1;mode="read";view="inline";editModeButton={};dropButton={};createButton={};updateButton={};modalConfig={};saveConfig={type:"manual"};title="";readResource="";readData={};beforeEmitUpdate=void 0;dataStateConfig={};buttonNavPosition="top";buttonNavVisibility="always";notificationType="toast";constructor(t={}){super(),this.feed(t)}};var D=class extends i{static lktDefaultValues=["size","preTitle","preTitleIcon","title","closeIcon","closeConfirm","closeConfirmKey","showClose","disabledClose","disabledVeilClick","hiddenFooter","modalName","modalKey","zIndex","beforeClose","item"];size="";preTitle="";preTitleIcon="";title="";closeIcon="";closeConfirm="";closeConfirmKey="_";showClose=!0;disabledClose=!1;disabledVeilClick=!1;hiddenFooter=!1;modalName="";modalKey="_";zIndex=500;beforeClose=void 0;item={};confirmButton={};cancelButton={};constructor(t={}){super(),this.feed(t)}};var Q=(c=>(c.Pages="pages",c.PrevNext="prev-next",c.PagesPrevNext="pages-prev-next",c.PagesPrevNextFirstLast="pages-prev-next-first-last",c.LoadMore="load-more",c.Infinite="infinite",c))(Q||{});var O=class extends i{static lktAllowUndefinedProps=[];static lktDefaultValues=["type","modelValue","class","resource","readOnly","loading","filters"];type="pages-prev-next";modelValue=1;class="";resource="";readOnly=!1;loading=!1;filters={};constructor(t={}){super(),this.feed(t)}};var Z=(r=>(r.Table="table",r.Item="item",r.Ul="ul",r.Ol="ol",r))(Z||{});var _=(r=>(r[r.Auto=0]="Auto",r[r.PreferItem=1]="PreferItem",r[r.PreferCustomItem=2]="PreferCustomItem",r[r.PreferColumns=3]="PreferColumns",r))(_||{});var I=class extends i{static lktDefaultValues=["modelValue","type","columns","resource","noResultsText","filters","hideEmptyColumns","itemDisplayChecker","loading","page","perms","editMode","dataStateConfig","sortable","sorter","initialSorting","drag","paginator","header","title","titleTag","titleIcon","headerClass","saveButton","createButton","dropButton","wrapContentTag","wrapContentClass","itemsContainerClass","hiddenSave","createText","createIcon","createRoute","dropText","dropIcon","editText","editIcon","editLink","editModeText","switchEditionEnabled","createDisabled","dropConfirm","dropResource","addNavigation","createEnabledValidator","newValueGenerator","requiredItemsForTopCreate","requiredItemsForBottomCreate","slotItemVar"];modelValue=[];type="table";columns=[];resource="";noResultsText="";filters=[];hideEmptyColumns=!1;itemDisplayChecker=void 0;rowDisplayType=0;loading=!1;page=1;perms=[];editMode=!1;dataStateConfig={};sortable=!1;sorter=void 0;initialSorting=!1;drag=void 0;paginator=void 0;header;title="";titleTag="h2";titleIcon="";headerClass="";saveButton={};createButton={};dropButton={};hiddenSave=!1;wrapContentTag="div";wrapContentClass="";itemsContainerClass="";createText="";createIcon="";createRoute="";dropText="";dropIcon="";editText="";editIcon="";editLink="";editModeText="";switchEditionEnabled=!1;createDisabled=!1;dropConfirm="";dropResource="";addNavigation=!1;createEnabledValidator=void 0;newValueGenerator=void 0;requiredItemsForTopCreate=0;requiredItemsForBottomCreate=0;slotItemVar="item";constructor(t={}){super(),this.feed(t)}};var tt=(l=>(l.Refresh="refresh",l.Close="close",l.ReOpen="reOpen",l.Exec="exec",l.Open="open",l))(tt||{});var et=(o=>(o.Modal="modal",o.Confirm="confirm",o))(et||{});var ot=(n=>(n.None="",n.Incremental="incremental",n.Decremental="decremental",n))(ot||{});var nt=(l=>(l.NotDefined="",l.Hidden="hidden",l.Integer="integer",l.Decimal="decimal",l.Auto="auto",l))(nt||{});var rt=(o=>(o.Asc="asc",o.Desc="desc",o))(rt||{});var it=(d=>(d.Create="create",d.Update="update",d.Edit="edit",d.Drop="drop",d.Sort="sort",d.SwitchEditMode="switch-edit-mode",d.InlineEdit="inline-edit",d.InlineCreate="inline-create",d.ModalCreate="modal-create",d.InlineCreateEver="inline-create-ever",d))(it||{});var at=(o=>(o.Lazy="lazy",o.Ever="ever",o))(at||{});import{__ as Ct}from"lkt-i18n";var bt=(e,t)=>typeof e=="string"&&e.startsWith("prop:")?t[e.substring(5)]:e,ht=e=>{let t=String(e);return t.startsWith("__:")?Ct(t.substring(3)):t};var Mt=(e,...t)=>{g.debugEnabled&&console.info("::lkt::",`[${e}] `,...t)};var Vt=e=>new h(e);function qe(e){let t=new e,o={};if(!Array.isArray(e.lktDefaultValues))throw new Error("lktDefaultValues must be a keys array.");for(let n of e.lktDefaultValues)n in t&&(o[n]=t[n]);return o}export{B as Accordion,K as AccordionToggleMode,j as AccordionType,p as Anchor,A as AnchorType,b as Button,L as ButtonType,h as Column,N as ColumnType,x as Field,v as FieldAutoValidationTrigger,T as FieldType,k as FieldValidation,y as ItemCrud,G as ItemCrudButtonNavPosition,X as ItemCrudButtonNavVisibility,q as ItemCrudMode,$ as ItemCrudView,i as LktItem,g as LktSettings,M as LktStrictItem,D as Modal,tt as ModalCallbackAction,et as ModalType,P as MultipleOptionsDisplay,J as NotificationType,V as Option,O as Paginator,Q as PaginatorType,ot as ProgressType,nt as ProgressValueFormat,C as SafeString,Y as SaveType,rt as SortDirection,I as Table,it as TablePermission,_ as TableRowType,Z as TableType,S as Toast,U as ToastPositionX,R as ToastType,at as ToggleMode,w as Tooltip,W as TooltipLocationX,z as TooltipLocationY,H as TooltipPositionEngine,E as ValidationCode,F as ValidationStatus,ut as booleanFieldTypes,Vt as createColumn,u as ensureButtonConfig,ht as extractI18nValue,bt as extractPropValue,lt as fieldTypesWithOptions,st as fieldTypesWithoutClear,ft as fieldTypesWithoutUndo,mt as fieldsWithMultipleMode,qe as getDefaultValues,Mt as lktDebug,pt as textFieldTypes,dt as textFieldTypesWithOptions};
|