lkt-vue-kernel 1.0.30 → 1.0.32
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 +50 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ declare enum ModalType {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
interface ModalConfig extends LktObject {
|
|
58
|
+
modalName?: ValidModalName;
|
|
59
|
+
modalKey?: ValidModalKey;
|
|
60
|
+
zIndex?: number;
|
|
58
61
|
type?: ModalType;
|
|
59
62
|
size?: string;
|
|
60
63
|
preTitle?: string;
|
|
@@ -67,9 +70,6 @@ interface ModalConfig extends LktObject {
|
|
|
67
70
|
disabledClose?: boolean;
|
|
68
71
|
disabledVeilClick?: boolean;
|
|
69
72
|
hiddenFooter?: boolean;
|
|
70
|
-
modalName?: ValidModalName;
|
|
71
|
-
modalKey?: ValidModalKey;
|
|
72
|
-
zIndex?: number;
|
|
73
73
|
beforeClose?: ValidBeforeCloseModal;
|
|
74
74
|
item?: LktObject;
|
|
75
75
|
confirmButton?: Partial<ButtonConfig>;
|
|
@@ -707,7 +707,6 @@ interface IconConfig {
|
|
|
707
707
|
icon?: ValidTextValue;
|
|
708
708
|
text?: ValidTextValue;
|
|
709
709
|
class?: ValidTextValue;
|
|
710
|
-
pack?: ValidTextValue;
|
|
711
710
|
type?: IconType;
|
|
712
711
|
events?: EventsConfig | undefined;
|
|
713
712
|
}
|
|
@@ -938,6 +937,7 @@ interface TableConfig {
|
|
|
938
937
|
saveButton?: ButtonConfig;
|
|
939
938
|
createButton?: ButtonConfig;
|
|
940
939
|
dropButton?: ButtonConfig;
|
|
940
|
+
editButton?: ButtonConfig;
|
|
941
941
|
hiddenSave?: boolean;
|
|
942
942
|
wrapContentTag?: string;
|
|
943
943
|
wrapContentClass?: string;
|
|
@@ -948,9 +948,6 @@ interface TableConfig {
|
|
|
948
948
|
requiredItemsForBottomCreate?: number;
|
|
949
949
|
slotItemVar?: string;
|
|
950
950
|
createEnabledValidator?: Function;
|
|
951
|
-
editText?: string;
|
|
952
|
-
editIcon?: string;
|
|
953
|
-
editLink?: string;
|
|
954
951
|
}
|
|
955
952
|
|
|
956
953
|
interface TabsConfig {
|
|
@@ -1081,12 +1078,10 @@ declare class FieldValidation {
|
|
|
1081
1078
|
}
|
|
1082
1079
|
|
|
1083
1080
|
declare class Icon extends LktItem implements IconConfig {
|
|
1084
|
-
static lktAllowUndefinedProps: string[];
|
|
1085
1081
|
static lktDefaultValues: (keyof IconConfig)[];
|
|
1086
1082
|
icon?: ValidTextValue;
|
|
1087
1083
|
text?: ValidTextValue;
|
|
1088
1084
|
class?: ValidTextValue;
|
|
1089
|
-
pack?: ValidTextValue;
|
|
1090
1085
|
type?: IconType;
|
|
1091
1086
|
events?: EventsConfig | undefined;
|
|
1092
1087
|
constructor(data?: Partial<IconConfig>);
|
|
@@ -1126,6 +1121,37 @@ declare class ItemCrud extends LktItem implements ItemCrudConfig {
|
|
|
1126
1121
|
constructor(data?: Partial<ItemCrudConfig>);
|
|
1127
1122
|
}
|
|
1128
1123
|
|
|
1124
|
+
declare class Menu extends LktItem implements MenuConfig {
|
|
1125
|
+
static lktDefaultValues: (keyof MenuConfig)[];
|
|
1126
|
+
modelValue?: MenuEntryConfig[];
|
|
1127
|
+
resource?: string;
|
|
1128
|
+
resourceData: LktObject;
|
|
1129
|
+
constructor(data?: Partial<MenuConfig>);
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
declare class MenuEntry extends LktItem implements MenuEntryConfig {
|
|
1133
|
+
static lktDefaultValues: (keyof MenuEntryConfig)[];
|
|
1134
|
+
key?: string;
|
|
1135
|
+
href?: string;
|
|
1136
|
+
label?: string;
|
|
1137
|
+
icon?: string;
|
|
1138
|
+
isActiveChecker?: Function | undefined;
|
|
1139
|
+
isOpened?: boolean;
|
|
1140
|
+
isActive?: boolean;
|
|
1141
|
+
parent?: MenuEntryConfig | undefined;
|
|
1142
|
+
children?: MenuEntryConfig[];
|
|
1143
|
+
events?: EventsConfig | undefined;
|
|
1144
|
+
onClick?: Function | undefined;
|
|
1145
|
+
constructor(data?: Partial<MenuEntryConfig>);
|
|
1146
|
+
setChildren(children: MenuEntry[]): this;
|
|
1147
|
+
setOnClick(fn: Function): this;
|
|
1148
|
+
setIsActiveChecker(fn: Function): this;
|
|
1149
|
+
setIsActive(enabled?: boolean): this;
|
|
1150
|
+
setLabel(str: string): this;
|
|
1151
|
+
setIcon(str: string): this;
|
|
1152
|
+
doClose(): void;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1129
1155
|
declare class Modal extends LktItem implements ModalConfig {
|
|
1130
1156
|
static lktDefaultValues: (keyof ModalConfig)[];
|
|
1131
1157
|
size: string;
|
|
@@ -1162,6 +1188,19 @@ declare class Paginator extends LktItem implements PaginatorConfig {
|
|
|
1162
1188
|
constructor(data?: Partial<PaginatorConfig>);
|
|
1163
1189
|
}
|
|
1164
1190
|
|
|
1191
|
+
declare class Progress extends LktItem implements ProgressConfig {
|
|
1192
|
+
static lktAllowUndefinedProps: string[];
|
|
1193
|
+
static lktDefaultValues: (keyof ProgressConfig)[];
|
|
1194
|
+
modelValue?: number;
|
|
1195
|
+
type?: ProgressType;
|
|
1196
|
+
duration?: number;
|
|
1197
|
+
pauseOnHover?: boolean;
|
|
1198
|
+
header?: string;
|
|
1199
|
+
valueFormat?: ProgressValueFormat;
|
|
1200
|
+
palette?: string;
|
|
1201
|
+
constructor(data?: Partial<ProgressConfig>);
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1165
1204
|
declare class Table extends LktItem implements TableConfig {
|
|
1166
1205
|
static lktDefaultValues: (keyof TableConfig)[];
|
|
1167
1206
|
modelValue: LktObject[];
|
|
@@ -1192,13 +1231,11 @@ declare class Table extends LktItem implements TableConfig {
|
|
|
1192
1231
|
saveButton?: ButtonConfig;
|
|
1193
1232
|
createButton?: ButtonConfig;
|
|
1194
1233
|
dropButton?: ButtonConfig;
|
|
1234
|
+
editButton?: ButtonConfig;
|
|
1195
1235
|
hiddenSave?: boolean;
|
|
1196
1236
|
wrapContentTag?: string;
|
|
1197
1237
|
wrapContentClass?: string;
|
|
1198
1238
|
itemsContainerClass?: string;
|
|
1199
|
-
editText?: string;
|
|
1200
|
-
editIcon?: string;
|
|
1201
|
-
editLink?: string;
|
|
1202
1239
|
addNavigation?: boolean;
|
|
1203
1240
|
createEnabledValidator?: Function;
|
|
1204
1241
|
newValueGenerator?: Function;
|
|
@@ -1286,4 +1323,4 @@ declare function getDefaultValues<T>(cls: {
|
|
|
1286
1323
|
lktDefaultValues: (keyof T)[];
|
|
1287
1324
|
}): Partial<T>;
|
|
1288
1325
|
|
|
1289
|
-
export { Accordion, type AccordionConfig, AccordionToggleMode, AccordionType, Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, type EventsConfig, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, FieldValidation, type FieldValidationConfig, Icon, type IconConfig, Image, type ImageConfig, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, type MenuConfig, type MenuEntryConfig, 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, type TabsConfig, Tag, type TagConfig, TagType, 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 };
|
|
1326
|
+
export { Accordion, type AccordionConfig, AccordionToggleMode, AccordionType, Anchor, type AnchorConfig, AnchorType, type BeforeCloseModalData, Button, type ButtonConfig, ButtonType, Column, type ColumnConfig, ColumnType, type DragConfig, type EmptyModalKey, type EventsConfig, Field, FieldAutoValidationTrigger, type FieldConfig, FieldType, FieldValidation, type FieldValidationConfig, Icon, type IconConfig, IconType, Image, type ImageConfig, type IsDisabledChecker, type IsDisabledCheckerArgs, ItemCrud, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, type ItemCrudConfig, ItemCrudMode, ItemCrudView, LktItem, type LktObject, LktSettings, LktStrictItem, Menu, type MenuConfig, MenuEntry, type MenuEntryConfig, Modal, ModalCallbackAction, type ModalCallbackConfig, type ModalConfig, ModalType, MultipleOptionsDisplay, NotificationType, Option, type OptionConfig, Paginator, type PaginatorConfig, PaginatorType, Progress, type ProgressConfig, ProgressType, ProgressValueFormat, SafeString, type SaveConfig, SaveType, type ScanPropTarget, SortDirection, Table, type TableConfig, TablePermission, TableRowType, TableType, type TabsConfig, Tag, type TagConfig, TagType, 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 v=(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))(v||{});var d=(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 defaultCreateErrorText="Creation failed";static defaultCreateErrorDetails="An error occurred while creating the item. Please try again.";static defaultCreateErrorIcon="";static setDefaultCreateError(t){e.defaultCreateErrorText=t.text??e.defaultCreateErrorText,e.defaultCreateErrorDetails=t.details??e.defaultCreateErrorDetails,e.defaultCreateErrorIcon=t.icon??e.defaultCreateErrorIcon}static defaultUpdateErrorText="Update failed";static defaultUpdateErrorDetails="An error occurred while updating the item. Please try again.";static defaultUpdateErrorIcon="";static setDefaultUpdateError(t){e.defaultUpdateErrorText=t.text??e.defaultUpdateErrorText,e.defaultUpdateErrorDetails=t.details??e.defaultUpdateErrorDetails,e.defaultUpdateErrorIcon=t.icon??e.defaultUpdateErrorIcon}static defaultDropErrorText="Drop failed";static defaultDropErrorDetails="An error occurred while removing the item. Please try again.";static defaultDropErrorIcon="";static setDefaultDropError(t){e.defaultDropErrorText=t.text??e.defaultDropErrorText,e.defaultDropErrorDetails=t.details??e.defaultDropErrorDetails,e.defaultDropErrorIcon=t.icon??e.defaultDropErrorIcon}static defaultCreateSuccessText="Item created";static defaultCreateSuccessDetails="";static defaultCreateSuccessIcon="";static setDefaultCreateSuccess(t){e.defaultCreateSuccessText=t.text??e.defaultCreateSuccessText,e.defaultCreateSuccessDetails=t.details??e.defaultCreateSuccessDetails,e.defaultCreateSuccessIcon=t.icon??e.defaultCreateSuccessIcon}static defaultUpdateSuccessText="Item updated";static defaultUpdateSuccessDetails="";static defaultUpdateSuccessIcon="";static setDefaultUpdateSuccess(t){e.defaultUpdateSuccessText=t.text??e.defaultUpdateSuccessText,e.defaultUpdateSuccessDetails=t.details??e.defaultUpdateSuccessDetails,e.defaultUpdateSuccessIcon=t.icon??e.defaultUpdateSuccessIcon}static defaultDropSuccessText="Item removed";static defaultDropSuccessDetails="";static defaultDropSuccessIcon="";static setDefaultDropSuccess(t){e.defaultDropSuccessText=t.text??e.defaultDropSuccessText,e.defaultDropSuccessDetails=t.details??e.defaultDropSuccessDetails,e.defaultDropSuccessIcon=t.icon??e.defaultDropSuccessIcon}static defaultSaveButton={text:"Save"};static setDefaultSaveButton(t,o=!0){return o?e.defaultSaveButton=t:e.defaultSaveButton=d(t,e.defaultSaveButton),e}static defaultConfirmButton={text:"Confirm"};static setDefaultConfirmButton(t,o=!0){return o?e.defaultConfirmButton=t:e.defaultConfirmButton=d(t,e.defaultConfirmButton),e}static defaultCancelButton={text:"Cancel"};static setDefaultCancelButton(t,o=!0){return o?e.defaultCancelButton=t:e.defaultCancelButton=d(t,e.defaultCancelButton),e}static defaultCreateButton={text:"Create"};static setDefaultCreateButton(t,o=!0){return o?e.defaultCreateButton=t:e.defaultCreateButton=d(t,e.defaultCreateButton),e}static defaultUpdateButton={text:"Update"};static setDefaultUpdateButton(t,o=!0){return o?e.defaultUpdateButton=t:e.defaultUpdateButton=d(t,e.defaultUpdateButton),e}static defaultDropButton={text:"Drop"};static setDefaultDropButton(t,o=!0){return o?e.defaultDropButton=t:e.defaultDropButton=d(t,e.defaultDropButton),e}static defaultEditModeButton={text:"Edit mode",type:"switch"};static setDefaultEditModeButton(t,o=!0){return o?e.defaultEditModeButton=t:e.defaultEditModeButton=d(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=d(t,e.defaultToggleButton),e}static defaultLoadMoreButton={text:"Load more",type:"hidden-switch"};static setDefaultLoadMoreButton(t,o=!0){return o?e.defaultLoadMoreButton=t:e.defaultLoadMoreButton=d(t,e.defaultLoadMoreButton),e}};var P=(i=>(i.Text="text",i.Email="email",i.Tel="tel",i.Password="password",i.Search="search",i.Number="number",i.Color="color",i.Range="range",i.Textarea="textarea",i.Html="html",i.Date="date",i.File="file",i.Image="image",i.Select="select",i.Check="check",i.Switch="switch",i.Calc="calc",i.Card="card",i.Elements="elements",i))(P||{});var ut=["text","search","select"],mt=["switch","check"],ct=["switch","check"],pt=["text","search"],gt=["switch","check"],xt=["select","color","card"],Ct=["text","email","password"];var bt=["lktDateProps","lktStrictItem","lktExcludedProps"],a=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(!(bt.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 V=class extends a{lktStrictItem=!0};var F=(n=>(n.Auto="auto",n.Always="always",n.Lazy="lazy",n.Ever="ever",n))(F||{});var N=(r=>(r.Transform="transform",r.Height="height",r.Display="display",r))(N||{});var M=class extends a{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 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 c=class extends a{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["type","to","class","isActive","downloadFileName","disabled","onClick","confirmModal","confirmModalKey","confirmData","imposter","external","events"];type="router-link";to="";class="";isActive=!1;downloadFileName="";disabled=!1;onClick=void 0;confirmModal="";confirmModalKey="_";confirmData={};imposter=!1;external=!1;events={};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 ht}from"lkt-string-tools";var x=class extends a{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","events"];type="button";name=ht(10);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={};events={};constructor(t={}){super(),this.feed(t),this.anchor=new c(t.anchor)}isDisabled(){return typeof this.disabled=="function"?this.disabled():this.disabled}};var U=(n=>(n.None="",n.Field="field",n.Button="button",n.Anchor="anchor",n))(U||{});import{generateRandomString as Vt}from"lkt-string-tools";var j=(r=>(r.List="list",r.Inline="inline",r.Count="count",r))(j||{});var K=(n=>(n.None="",n.Focus="focus",n.Blur="blur",n.Always="always",n))(K||{});var C=class extends a{modelValue="";type="text";valid=void 0;placeholder="";searchPlaceholder="";label="";labelIcon="";labelIconAtEnd=!1;name=Vt(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 b=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 h=class extends a{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 C(t.field);break;case"anchor":this.anchor=new c(t.anchor);break;case"button":this.button=new x(t.button);break}this.link=new b(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 R=(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))(R||{});var H=(r=>(r.Ok="ok",r.Ko="ko",r.Info="info",r))(H||{});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 S=class extends a{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["icon","text","class","pack","type","events"];icon="";text="";class="";pack="";type="";events={};constructor(t={}){super(),this.feed(t)}};var D=class extends a{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["src","alt","text","class","imageStyle"];src="";alt="";text="";class="";imageStyle="";constructor(t={}){super(),this.feed(t)}};var z=(r=>(r.Create="create",r.Update="update",r.Read="read",r))(z||{});var W=(o=>(o.Inline="inline",o.Modal="modal",o))(W||{});var q=(o=>(o.Top="top",o.Bottom="bottom",o))(q||{});var $=(r=>(r.Changed="changed",r.Always="always",r.Never="never",r))($||{});var G=(r=>(r.Manual="manual",r.Auto="auto",r.Delay="delay",r))(G||{});var X=(o=>(o.Toast="toast",o.Inline="inline",o))(X||{});var B=class extends a{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 y=class extends a{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 I=class extends a{value=void 0;label="";data={};disabled=!1;group="";icon="";modal="";constructor(t={}){super(),this.feed(t)}};var Y=(p=>(p.Pages="pages",p.PrevNext="prev-next",p.PagesPrevNext="pages-prev-next",p.PagesPrevNextFirstLast="pages-prev-next-first-last",p.LoadMore="load-more",p.Infinite="infinite",p))(Y||{});var w=class extends a{static lktAllowUndefinedProps=[];static lktDefaultValues=["type","modelValue","class","resource","readOnly","loading","resourceData"];type="pages-prev-next";modelValue=1;class="";resource="";readOnly=!1;loading=!1;resourceData={};constructor(t={}){super(),this.feed(t)}};var J=(n=>(n.Table="table",n.Item="item",n.Ul="ul",n.Ol="ol",n))(J||{});var Q=(n=>(n[n.Auto=0]="Auto",n[n.PreferItem=1]="PreferItem",n[n.PreferCustomItem=2]="PreferCustomItem",n[n.PreferColumns=3]="PreferColumns",n))(Q||{});var T=class extends a{static lktDefaultValues=["modelValue","type","columns","noResultsText","hideEmptyColumns","itemDisplayChecker","loading","page","perms","editMode","dataStateConfig","sortable","sorter","initialSorting","drag","paginator","header","title","titleTag","titleIcon","headerClass","editModeButton","saveButton","createButton","dropButton","wrapContentTag","wrapContentClass","itemsContainerClass","hiddenSave","editText","editIcon","editLink","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="";editModeButton={};saveButton={};createButton={};dropButton={};hiddenSave=!1;wrapContentTag="div";wrapContentClass="";itemsContainerClass="";editText="";editIcon="";editLink="";addNavigation=!1;createEnabledValidator=void 0;newValueGenerator=void 0;requiredItemsForTopCreate=0;requiredItemsForBottomCreate=0;slotItemVar="item";constructor(t={}){super(),this.feed(t)}};var Z=(o=>(o.NotDefined="",o.ActionIcon="action-icon",o))(Z||{});var E=class extends a{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["class","text","featuredText","icon","iconAtEnd","featuredAtStart","type"];class="";text="";featuredText="";icon="";iconAtEnd=!1;featuredAtStart=!1;type="";constructor(t={}){super(),this.feed(t)}};var _=(o=>(o.Message="message",o.Button="button",o))(_||{});var tt=(r=>(r.Left="left",r.Center="center",r.Right="right",r))(tt||{});var L=class extends a{static lktDefaultValues=["type","text","details","icon","positionX","duration","buttonConfig","zIndex"];type="message";text="";details="";icon="";positionX="right";duration=void 0;buttonConfig=void 0;zIndex=1e3;constructor(t={}){super(),this.feed(t)}};var et=(o=>(o.Fixed="fixed",o.Absolute="absolute",o))(et||{});var ot=(n=>(n.Top="top",n.Bottom="bottom",n.Center="center",n.ReferrerCenter="referrer-center",n))(ot||{});var rt=(l=>(l.Left="left",l.Right="right",l.Center="center",l.LeftCorner="left-corner",l.RightCorner="right-corner",l))(rt||{});var O=class extends a{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 nt=(l=>(l.Refresh="refresh",l.Close="close",l.ReOpen="reOpen",l.Exec="exec",l.Open="open",l))(nt||{});var at=(o=>(o.Modal="modal",o.Confirm="confirm",o))(at||{});var it=(r=>(r.None="",r.Incremental="incremental",r.Decremental="decremental",r))(it||{});var lt=(l=>(l.NotDefined="",l.Hidden="hidden",l.Integer="integer",l.Decimal="decimal",l.Auto="auto",l))(lt||{});var st=(o=>(o.Asc="asc",o.Desc="desc",o))(st||{});var ft=(u=>(u.Create="create",u.Update="update",u.Edit="edit",u.Drop="drop",u.Sort="sort",u.SwitchEditMode="switch-edit-mode",u.InlineEdit="inline-edit",u.InlineCreate="inline-create",u.ModalCreate="modal-create",u.InlineCreateEver="inline-create-ever",u))(ft||{});var dt=(o=>(o.Lazy="lazy",o.Ever="ever",o))(dt||{});import{__ as Mt}from"lkt-i18n";var kt=(e,t)=>typeof e=="string"&&e.startsWith("prop:")?t[e.substring(5)]:e,St=e=>{let t=String(e);return t.startsWith("__:")?Mt(t.substring(3)):t};var Dt=(e,...t)=>{g.debugEnabled&&console.info("::lkt::",`[${e}] `,...t)};var Bt=e=>new h(e);function oo(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{M as Accordion,N as AccordionToggleMode,F as AccordionType,c as Anchor,A as AnchorType,x as Button,v as ButtonType,h as Column,U as ColumnType,C as Field,K as FieldAutoValidationTrigger,P as FieldType,k as FieldValidation,S as Icon,D as Image,B as ItemCrud,q as ItemCrudButtonNavPosition,$ as ItemCrudButtonNavVisibility,z as ItemCrudMode,W as ItemCrudView,a as LktItem,g as LktSettings,V as LktStrictItem,y as Modal,nt as ModalCallbackAction,at as ModalType,j as MultipleOptionsDisplay,X as NotificationType,I as Option,w as Paginator,Y as PaginatorType,it as ProgressType,lt as ProgressValueFormat,b as SafeString,G as SaveType,st as SortDirection,T as Table,ft as TablePermission,Q as TableRowType,J as TableType,E as Tag,Z as TagType,L as Toast,tt as ToastPositionX,_ as ToastType,dt as ToggleMode,O as Tooltip,rt as TooltipLocationX,ot as TooltipLocationY,et as TooltipPositionEngine,R as ValidationCode,H as ValidationStatus,gt as booleanFieldTypes,Bt as createColumn,d as ensureButtonConfig,St as extractI18nValue,kt as extractPropValue,ut as fieldTypesWithOptions,mt as fieldTypesWithoutClear,ct as fieldTypesWithoutUndo,xt as fieldsWithMultipleMode,oo as getDefaultValues,Dt as lktDebug,Ct as textFieldTypes,pt as textFieldTypesWithOptions};
|
|
1
|
+
var A=(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))(A||{});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 defaultCreateErrorText="Creation failed";static defaultCreateErrorDetails="An error occurred while creating the item. Please try again.";static defaultCreateErrorIcon="";static setDefaultCreateError(t){e.defaultCreateErrorText=t.text??e.defaultCreateErrorText,e.defaultCreateErrorDetails=t.details??e.defaultCreateErrorDetails,e.defaultCreateErrorIcon=t.icon??e.defaultCreateErrorIcon}static defaultUpdateErrorText="Update failed";static defaultUpdateErrorDetails="An error occurred while updating the item. Please try again.";static defaultUpdateErrorIcon="";static setDefaultUpdateError(t){e.defaultUpdateErrorText=t.text??e.defaultUpdateErrorText,e.defaultUpdateErrorDetails=t.details??e.defaultUpdateErrorDetails,e.defaultUpdateErrorIcon=t.icon??e.defaultUpdateErrorIcon}static defaultDropErrorText="Drop failed";static defaultDropErrorDetails="An error occurred while removing the item. Please try again.";static defaultDropErrorIcon="";static setDefaultDropError(t){e.defaultDropErrorText=t.text??e.defaultDropErrorText,e.defaultDropErrorDetails=t.details??e.defaultDropErrorDetails,e.defaultDropErrorIcon=t.icon??e.defaultDropErrorIcon}static defaultCreateSuccessText="Item created";static defaultCreateSuccessDetails="";static defaultCreateSuccessIcon="";static setDefaultCreateSuccess(t){e.defaultCreateSuccessText=t.text??e.defaultCreateSuccessText,e.defaultCreateSuccessDetails=t.details??e.defaultCreateSuccessDetails,e.defaultCreateSuccessIcon=t.icon??e.defaultCreateSuccessIcon}static defaultUpdateSuccessText="Item updated";static defaultUpdateSuccessDetails="";static defaultUpdateSuccessIcon="";static setDefaultUpdateSuccess(t){e.defaultUpdateSuccessText=t.text??e.defaultUpdateSuccessText,e.defaultUpdateSuccessDetails=t.details??e.defaultUpdateSuccessDetails,e.defaultUpdateSuccessIcon=t.icon??e.defaultUpdateSuccessIcon}static defaultDropSuccessText="Item removed";static defaultDropSuccessDetails="";static defaultDropSuccessIcon="";static setDefaultDropSuccess(t){e.defaultDropSuccessText=t.text??e.defaultDropSuccessText,e.defaultDropSuccessDetails=t.details??e.defaultDropSuccessDetails,e.defaultDropSuccessIcon=t.icon??e.defaultDropSuccessIcon}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}static defaultLoadMoreButton={text:"Load more",type:"hidden-switch"};static setDefaultLoadMoreButton(t,o=!0){return o?e.defaultLoadMoreButton=t:e.defaultLoadMoreButton=u(t,e.defaultLoadMoreButton),e}};var N=(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))(N||{});var gt=["text","search","select"],xt=["switch","check"],Ct=["switch","check"],bt=["text","search"],ht=["switch","check"],Vt=["select","color","card"],Mt=["text","email","password"];var kt=["lktDateProps","lktStrictItem","lktExcludedProps"],r=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,i]of Object.entries(t))o.assignProp(n,i)}assignProp(t,o){if(!(kt.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 r{lktStrictItem=!0};var U=(i=>(i.Auto="auto",i.Always="always",i.Lazy="lazy",i.Ever="ever",i))(U||{});var j=(n=>(n.Transform="transform",n.Height="height",n.Display="display",n))(j||{});var k=class extends r{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=(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))(K||{});var c=class extends r{static lktAllowUndefinedProps=[];static lktDefaultValues=["type","to","class","isActive","downloadFileName","disabled","onClick","confirmModal","confirmModalKey","confirmData","imposter","external","events"];type="router-link";to="";class="";isActive=!1;downloadFileName="";disabled=!1;onClick=void 0;confirmModal="";confirmModalKey="_";confirmData={};imposter=!1;external=!1;events={};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 Dt}from"lkt-string-tools";var x=class extends r{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","events"];type="button";name=Dt(10);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={};events={};constructor(t={}){super(),this.feed(t),this.anchor=new c(t.anchor)}isDisabled(){return typeof this.disabled=="function"?this.disabled():this.disabled}};var R=(i=>(i.None="",i.Field="field",i.Button="button",i.Anchor="anchor",i))(R||{});import{generateRandomString as St}from"lkt-string-tools";var H=(n=>(n.List="list",n.Inline="inline",n.Count="count",n))(H||{});var z=(i=>(i.None="",i.Focus="focus",i.Blur="blur",i.Always="always",i))(z||{});var C=class extends r{modelValue="";type="text";valid=void 0;placeholder="";searchPlaceholder="";label="";labelIcon="";labelIconAtEnd=!1;name=St(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 b=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 h=class extends r{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 C(t.field);break;case"anchor":this.anchor=new c(t.anchor);break;case"button":this.button=new x(t.button);break}this.link=new b(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 W=(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))(W||{});var q=(n=>(n.Ok="ok",n.Ko="ko",n.Info="info",n))(q||{});var D=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 $=(o=>(o.NotDefined="",o.Button="button",o))($||{});var S=class extends r{static lktDefaultValues=["icon","text","class","type","events"];icon="";text="";class="";type="";events={};constructor(t={}){super(),this.feed(t)}};var B=class extends r{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["src","alt","text","class","imageStyle"];src="";alt="";text="";class="";imageStyle="";constructor(t={}){super(),this.feed(t)}};var G=(n=>(n.Create="create",n.Update="update",n.Read="read",n))(G||{});var X=(o=>(o.Inline="inline",o.Modal="modal",o))(X||{});var Y=(o=>(o.Top="top",o.Bottom="bottom",o))(Y||{});var J=(n=>(n.Changed="changed",n.Always="always",n.Never="never",n))(J||{});var Q=(n=>(n.Manual="manual",n.Auto="auto",n.Delay="delay",n))(Q||{});var Z=(o=>(o.Toast="toast",o.Inline="inline",o))(Z||{});var y=class extends r{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 V=class extends r{static lktDefaultValues=["key","href","label","icon","isActiveChecker","isOpened","isActive","parent","children","events","onClick"];key="";href="";label="";icon="";isActiveChecker=void 0;isOpened=!1;isActive=!1;parent=void 0;children;events={};onClick=void 0;constructor(t={}){super(),this.feed(t)}setChildren(t){return t.forEach(o=>o.parent=this),this.children=t,this}setOnClick(t){return this.onClick=t,this}setIsActiveChecker(t){return this.isActiveChecker=t,this}setIsActive(t=!0){return this.isActive=t,this}setLabel(t){return this.label=t,this}setIcon(t){return this.icon=t,this}doClose(){this.isOpened=!1}};var E=class extends r{static lktDefaultValues=["modelValue","resource","resourceData"];modelValue=[];resource="";resourceData={};constructor(t={}){super(),this.feed(t),this.modelValue=this.modelValue?.map(o=>new V(o))||[]}};var I=class extends r{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 w=class extends r{value=void 0;label="";data={};disabled=!1;group="";icon="";modal="";constructor(t={}){super(),this.feed(t)}};var _=(p=>(p.Pages="pages",p.PrevNext="prev-next",p.PagesPrevNext="pages-prev-next",p.PagesPrevNextFirstLast="pages-prev-next-first-last",p.LoadMore="load-more",p.Infinite="infinite",p))(_||{});var T=class extends r{static lktAllowUndefinedProps=[];static lktDefaultValues=["type","modelValue","class","resource","readOnly","loading","resourceData"];type="pages-prev-next";modelValue=1;class="";resource="";readOnly=!1;loading=!1;resourceData={};constructor(t={}){super(),this.feed(t)}};var tt=(n=>(n.None="",n.Incremental="incremental",n.Decremental="decremental",n))(tt||{});var et=(l=>(l.NotDefined="",l.Hidden="hidden",l.Integer="integer",l.Decimal="decimal",l.Auto="auto",l))(et||{});var v=class extends r{static lktAllowUndefinedProps=[];static lktDefaultValues=["modelValue","type","duration","pauseOnHover","header","valueFormat","palette"];modelValue=0;type="";duration=4e3;pauseOnHover=!1;header="";valueFormat="auto";palette="";constructor(t={}){super(),this.feed(t)}};var ot=(i=>(i.Table="table",i.Item="item",i.Ul="ul",i.Ol="ol",i))(ot||{});var rt=(i=>(i[i.Auto=0]="Auto",i[i.PreferItem=1]="PreferItem",i[i.PreferCustomItem=2]="PreferCustomItem",i[i.PreferColumns=3]="PreferColumns",i))(rt||{});var L=class extends r{static lktDefaultValues=["modelValue","type","columns","noResultsText","hideEmptyColumns","itemDisplayChecker","loading","page","perms","editMode","dataStateConfig","sortable","sorter","initialSorting","drag","paginator","header","title","titleTag","titleIcon","headerClass","editModeButton","saveButton","createButton","dropButton","editButton","wrapContentTag","wrapContentClass","itemsContainerClass","hiddenSave","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="";editModeButton={};saveButton={};createButton={};dropButton={};editButton={};hiddenSave=!1;wrapContentTag="div";wrapContentClass="";itemsContainerClass="";addNavigation=!1;createEnabledValidator=void 0;newValueGenerator=void 0;requiredItemsForTopCreate=0;requiredItemsForBottomCreate=0;slotItemVar="item";constructor(t={}){super(),this.feed(t)}};var nt=(o=>(o.NotDefined="",o.ActionIcon="action-icon",o))(nt||{});var O=class extends r{static lktAllowUndefinedProps=["onClick"];static lktDefaultValues=["class","text","featuredText","icon","iconAtEnd","featuredAtStart","type"];class="";text="";featuredText="";icon="";iconAtEnd=!1;featuredAtStart=!1;type="";constructor(t={}){super(),this.feed(t)}};var it=(o=>(o.Message="message",o.Button="button",o))(it||{});var at=(n=>(n.Left="left",n.Center="center",n.Right="right",n))(at||{});var P=class extends r{static lktDefaultValues=["type","text","details","icon","positionX","duration","buttonConfig","zIndex"];type="message";text="";details="";icon="";positionX="right";duration=void 0;buttonConfig=void 0;zIndex=1e3;constructor(t={}){super(),this.feed(t)}};var lt=(o=>(o.Fixed="fixed",o.Absolute="absolute",o))(lt||{});var st=(i=>(i.Top="top",i.Bottom="bottom",i.Center="center",i.ReferrerCenter="referrer-center",i))(st||{});var ft=(l=>(l.Left="left",l.Right="right",l.Center="center",l.LeftCorner="left-corner",l.RightCorner="right-corner",l))(ft||{});var F=class extends r{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 ut=(l=>(l.Refresh="refresh",l.Close="close",l.ReOpen="reOpen",l.Exec="exec",l.Open="open",l))(ut||{});var dt=(o=>(o.Modal="modal",o.Confirm="confirm",o))(dt||{});var mt=(o=>(o.Asc="asc",o.Desc="desc",o))(mt||{});var ct=(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))(ct||{});var pt=(o=>(o.Lazy="lazy",o.Ever="ever",o))(pt||{});import{__ as Bt}from"lkt-i18n";var yt=(e,t)=>typeof e=="string"&&e.startsWith("prop:")?t[e.substring(5)]:e,Et=e=>{let t=String(e);return t.startsWith("__:")?Bt(t.substring(3)):t};var It=(e,...t)=>{g.debugEnabled&&console.info("::lkt::",`[${e}] `,...t)};var wt=e=>new h(e);function go(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{k as Accordion,j as AccordionToggleMode,U as AccordionType,c as Anchor,K as AnchorType,x as Button,A as ButtonType,h as Column,R as ColumnType,C as Field,z as FieldAutoValidationTrigger,N as FieldType,D as FieldValidation,S as Icon,$ as IconType,B as Image,y as ItemCrud,Y as ItemCrudButtonNavPosition,J as ItemCrudButtonNavVisibility,G as ItemCrudMode,X as ItemCrudView,r as LktItem,g as LktSettings,M as LktStrictItem,E as Menu,V as MenuEntry,I as Modal,ut as ModalCallbackAction,dt as ModalType,H as MultipleOptionsDisplay,Z as NotificationType,w as Option,T as Paginator,_ as PaginatorType,v as Progress,tt as ProgressType,et as ProgressValueFormat,b as SafeString,Q as SaveType,mt as SortDirection,L as Table,ct as TablePermission,rt as TableRowType,ot as TableType,O as Tag,nt as TagType,P as Toast,at as ToastPositionX,it as ToastType,pt as ToggleMode,F as Tooltip,ft as TooltipLocationX,st as TooltipLocationY,lt as TooltipPositionEngine,W as ValidationCode,q as ValidationStatus,ht as booleanFieldTypes,wt as createColumn,u as ensureButtonConfig,Et as extractI18nValue,yt as extractPropValue,gt as fieldTypesWithOptions,xt as fieldTypesWithoutClear,Ct as fieldTypesWithoutUndo,Vt as fieldsWithMultipleMode,go as getDefaultValues,It as lktDebug,Mt as textFieldTypes,bt as textFieldTypesWithOptions};
|