lkt-step-process 2.0.9 → 2.0.10
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/build.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var oe = Object.defineProperty;
|
|
2
2
|
var le = (e, a, l) => a in e ? oe(e, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[a] = l;
|
|
3
3
|
var i = (e, a, l) => le(e, typeof a != "symbol" ? a + "" : a, l);
|
|
4
|
-
import { defineComponent as Q, useSlots as J, ref as
|
|
4
|
+
import { defineComponent as Q, useSlots as J, ref as P, resolveComponent as M, createElementBlock as y, openBlock as s, withDirectives as j, createCommentVNode as f, createElementVNode as W, createBlock as N, mergeProps as C, vShow as z, renderSlot as A, unref as E, normalizeProps as D, Fragment as O, renderList as Y, mergeDefaults as ue, watch as I, computed as p, onMounted as ie, normalizeClass as se, createSlots as U, withCtx as G, guardReactiveProps as q } from "vue";
|
|
5
5
|
import "lkt-string-tools";
|
|
6
6
|
import "lkt-data-state";
|
|
7
7
|
var de = ((e) => (e.Button = "button", e.Submit = "submit", e.Reset = "reset", e.Anchor = "anchor", e.Content = "content", e.Switch = "switch", e.HiddenSwitch = "hidden-switch", e.Split = "split", e.SplitLazy = "split-lazy", e.SplitEver = "split-ever", e.Tooltip = "tooltip", e.TooltipLazy = "tooltip-lazy", e.TooltipEver = "tooltip-ever", e.FileUpload = "file-upload", e.ImageUpload = "image-upload", e))(de || {}), ve = ((e) => (e.Text = "text", e.Email = "email", e.Tel = "tel", e.Password = "password", e.Search = "search", e.Number = "number", e.Color = "color", e.Range = "range", e.Textarea = "textarea", e.Html = "html", e.Date = "date", e.Time = "time", e.DateTime = "datetime", e.File = "file", e.Image = "image", e.Select = "select", e.Check = "check", e.Switch = "switch", e.Calc = "calc", e.Card = "card", e.Table = "table", e.Radio = "radio", e.ToggleButtonGroup = "toggle-button-group", e))(ve || {}), ce = ["lktDateProps", "lktStrictItem", "lktExcludedProps"], v, pe = (v = class {
|
|
@@ -19,7 +19,7 @@ var de = ((e) => (e.Button = "button", e.Submit = "submit", e.Reset = "reset", e
|
|
|
19
19
|
this[a] = l;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
}, i(v, "lktAllowUndefinedProps", []), i(v, "lktExcludedProps", []), i(v, "lktDateProps", []), i(v, "lktStrictItem", !1), i(v, "lktDefaultValues", []), v), me = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(me || {}), fe = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(fe || {}), ke = ((e) => (e.Href = "href", e.RouterLink = "router-link", e.RouterLinkBack = "router-link-back", e.Mail = "mail", e.Tel = "tel", e.Tab = "tab", e.Download = "download", e.Action = "action", e.Legacy = "", e))(ke || {}), he = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(he || {}), xe = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e.InlineDrop = "inline-drop", e.ColumnIndex = "column-index", e))(xe || {}), ye = ((e) => (e.Date = "date", e.Number = "number", e.Timer = "timer", e))(ye || {}), be = ((e) => (e.A0 = "a0", e.A1 = "a1", e.A2 = "a2", e.A3 = "a3", e.A4 = "a4", e.A5 = "a5", e.A6 = "a6", e.A7 = "a7", e.A8 = "a8", e.A9 = "a9", e))(be || {}), Se = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e.Table = "table", e))(Se || {}),
|
|
22
|
+
}, i(v, "lktAllowUndefinedProps", []), i(v, "lktExcludedProps", []), i(v, "lktDateProps", []), i(v, "lktStrictItem", !1), i(v, "lktDefaultValues", []), v), me = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(me || {}), fe = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(fe || {}), ke = ((e) => (e.Href = "href", e.RouterLink = "router-link", e.RouterLinkBack = "router-link-back", e.Mail = "mail", e.Tel = "tel", e.Tab = "tab", e.Download = "download", e.Action = "action", e.Legacy = "", e))(ke || {}), he = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(he || {}), xe = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e.InlineDrop = "inline-drop", e.ColumnIndex = "column-index", e))(xe || {}), ye = ((e) => (e.Date = "date", e.Number = "number", e.Timer = "timer", e))(ye || {}), be = ((e) => (e.A0 = "a0", e.A1 = "a1", e.A2 = "a2", e.A3 = "a3", e.A4 = "a4", e.A5 = "a5", e.A6 = "a6", e.A7 = "a7", e.A8 = "a8", e.A9 = "a9", e))(be || {}), Se = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e.Table = "table", e))(Se || {}), ge = ((e) => (e.HTTPResponse = "http-response", e.MinStringLength = "min-str", e.MinNumber = "min-num", e.MaxStringLength = "max-str", e.MaxNumber = "max-num", e.Email = "email", e.Empty = "empty", e.EqualTo = "equal-to", e.MinNumbers = "min-numbers", e.MaxNumbers = "max-numbers", e.MinChars = "min-chars", e.MaxChars = "max-chars", e.MinUpperChars = "min-upper-chars", e.MaxUpperChars = "max-upper-chars", e.MinLowerChars = "min-lower-chars", e.MaxLowerChars = "max-lower-chars", e.MinSpecialChars = "min-special-chars", e.MaxSpecialChars = "max-special-chars", e))(ge || {}), Be = ((e) => (e.Ok = "ok", e.Ko = "ko", e.Info = "info", e))(Be || {}), Le = ((e) => (e.StorageUnit = "unit", e.Directory = "dir", e.Image = "img", e.Video = "vid", e.File = "file", e))(Le || {}), Ne = ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(Ne || {}), Ce = ((e) => (e.NotDefined = "", e.Button = "button", e))(Ce || {}), Pe = ((e) => (e.Start = "start", e.End = "end", e))(Pe || {}), we = ((e) => (e.Create = "create", e.Update = "update", e.Read = "read", e))(we || {}), Ie = ((e) => (e.Inline = "inline", e.Modal = "modal", e))(Ie || {}), V = ((e) => (e.Top = "top", e.Bottom = "bottom", e))(V || {}), _ = ((e) => (e.Changed = "changed", e.Always = "always", e.Never = "never", e))(_ || {}), Ae = ((e) => (e.Manual = "manual", e.Auto = "auto", e.Delay = "delay", e))(Ae || {}), De = ((e) => (e.Toast = "toast", e.Inline = "inline", e))(De || {}), Me = ((e) => (e.Current = "current", e.Modifications = "modifications", e.SplitView = "split-view", e.Differences = "differences", e))(Me || {}), Te = ((e) => (e.Anchor = "anchor", e.Button = "button", e.Header = "header", e.Entry = "entry", e))(Te || {}), Re = ((e) => (e.Modal = "modal", e.Confirm = "confirm", e))(Re || {}), He = ((e) => (e.Pages = "pages", e.PrevNext = "prev-next", e.PagesPrevNext = "pages-prev-next", e.PagesPrevNextFirstLast = "pages-prev-next-first-last", e.LoadMore = "load-more", e.Infinite = "infinite", e))(He || {}), Ee = ((e) => (e.None = "", e.Incremental = "incremental", e.Decremental = "decremental", e))(Ee || {}), Oe = ((e) => (e.NotDefined = "", e.Hidden = "hidden", e.Integer = "integer", e.Decimal = "decimal", e.Auto = "auto", e))(Oe || {}), H, Ve = (H = class extends pe {
|
|
23
23
|
constructor(a = {}) {
|
|
24
24
|
super();
|
|
25
25
|
i(this, "modelValue", "");
|
|
@@ -56,7 +56,7 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
56
56
|
},
|
|
57
57
|
emits: ["prev", "next"],
|
|
58
58
|
setup(e, { expose: a, emit: l }) {
|
|
59
|
-
const n = l, b = J(), x =
|
|
59
|
+
const n = l, b = J(), x = P(null), m = P(null);
|
|
60
60
|
return a({
|
|
61
61
|
goNext: () => {
|
|
62
62
|
m.value.click();
|
|
@@ -65,9 +65,9 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
65
65
|
x.value.click();
|
|
66
66
|
}
|
|
67
67
|
}), (r, u) => {
|
|
68
|
-
const
|
|
68
|
+
const S = M("lkt-button"), T = M("lkt-dot");
|
|
69
69
|
return s(), y("div", ut, [
|
|
70
|
-
r.prevButton ? j((s(),
|
|
70
|
+
r.prevButton ? j((s(), N(S, C({
|
|
71
71
|
key: 0,
|
|
72
72
|
ref_key: "prevButtonRef",
|
|
73
73
|
ref: x
|
|
@@ -84,13 +84,13 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
84
84
|
amountOfSteps: r.amountOfSteps
|
|
85
85
|
}))) : f("", !0),
|
|
86
86
|
r.dots && r.amountOfSteps > 0 ? (s(), y("div", st, [
|
|
87
|
-
(s(!0), y(O, null, Y(r.amountOfSteps, (c) => (s(),
|
|
87
|
+
(s(!0), y(O, null, Y(r.amountOfSteps, (c) => (s(), N(T, C({ ref_for: !0 }, {
|
|
88
88
|
text: r.dotsNumbers ? c : "",
|
|
89
89
|
class: c === r.currentStepIndex + 1 ? "is-active" : ""
|
|
90
90
|
}), null, 16))), 256))
|
|
91
91
|
])) : f("", !0)
|
|
92
92
|
]),
|
|
93
|
-
r.nextButton ? j((s(),
|
|
93
|
+
r.nextButton ? j((s(), N(S, C({
|
|
94
94
|
key: 1,
|
|
95
95
|
ref_key: "nextButtonRef",
|
|
96
96
|
ref: m
|
|
@@ -128,24 +128,24 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
128
128
|
"update:loading"
|
|
129
129
|
],
|
|
130
130
|
setup(e, { expose: a, emit: l }) {
|
|
131
|
-
const n = e, b = J(), x = l, m =
|
|
131
|
+
const n = e, b = J(), x = l, m = P(n.loading), r = P(n.modelValue), u = P(n.steps), S = P(null);
|
|
132
132
|
I(() => n.loading, (t) => m.value = t), I(() => n.modelValue, (t) => r.value = t), I(m, (t) => x("update:loading", t)), I(r, (t) => x("update:modelValue", t));
|
|
133
133
|
const T = p(() => {
|
|
134
134
|
let t = [];
|
|
135
135
|
for (let k in b) k.indexOf("step-") !== -1 && t.push(k.substring(5));
|
|
136
136
|
return t;
|
|
137
137
|
}), c = p(() => u.value.findIndex((t) => t.key === r.value)), o = p(() => u.value[c.value]), Z = p(() => c.value === 0), ee = p(() => {
|
|
138
|
-
var k,
|
|
139
|
-
if (((k = o.value) == null ? void 0 : k.prevButton) === !1 || n.prevButton === !1 && !((
|
|
138
|
+
var k, g, B, d, h, L, w;
|
|
139
|
+
if (((k = o.value) == null ? void 0 : k.prevButton) === !1 || n.prevButton === !1 && !((g = o.value) != null && g.prevButton) || typeof o.value == "object" && (typeof ((B = o.value) == null ? void 0 : B.prevHidden) == "function" && o.value.prevHidden(o.value, u.value) || typeof ((d = o.value) == null ? void 0 : d.prevHidden) == "boolean" && ((h = o.value) == null ? void 0 : h.prevHidden) === !0))
|
|
140
140
|
return !1;
|
|
141
141
|
let t = { ...n.prevButton };
|
|
142
|
-
return typeof ((
|
|
142
|
+
return typeof ((L = o.value) == null ? void 0 : L.prevButton) == "object" && (t = { ...t, ...(w = o.value) == null ? void 0 : w.prevButton }), typeof t.disabled > "u" && (t.disabled = Z.value), t;
|
|
143
143
|
}), te = p(() => {
|
|
144
|
-
var k,
|
|
145
|
-
if (((k = o.value) == null ? void 0 : k.nextButton) === !1 || n.nextButton === !1 && !((
|
|
144
|
+
var k, g, B, d, h, L, w;
|
|
145
|
+
if (((k = o.value) == null ? void 0 : k.nextButton) === !1 || n.nextButton === !1 && !((g = o.value) != null && g.nextButton) || typeof o.value == "object" && (typeof ((B = o.value) == null ? void 0 : B.nextHidden) == "function" && o.value.nextHidden(o.value, u.value) || typeof ((d = o.value) == null ? void 0 : d.nextHidden) == "boolean" && ((h = o.value) == null ? void 0 : h.nextHidden) === !0))
|
|
146
146
|
return !1;
|
|
147
147
|
let t = { ...n.nextButton };
|
|
148
|
-
return typeof ((
|
|
148
|
+
return typeof ((L = o.value) == null ? void 0 : L.nextButton) == "object" && (t = { ...t, ...(w = o.value) == null ? void 0 : w.nextButton }), t;
|
|
149
149
|
}), ae = p(() => {
|
|
150
150
|
const t = [];
|
|
151
151
|
return r.value && t.push(`step-${r.value}`), t.join(" ");
|
|
@@ -165,28 +165,32 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
165
165
|
};
|
|
166
166
|
return a({
|
|
167
167
|
goNext: () => {
|
|
168
|
-
|
|
168
|
+
S.value.goNext();
|
|
169
169
|
},
|
|
170
170
|
goPrev: () => {
|
|
171
|
-
|
|
171
|
+
S.value.goPrev();
|
|
172
172
|
},
|
|
173
173
|
startLoader: () => m.value = !0,
|
|
174
174
|
stopLoader: () => m.value = !1
|
|
175
175
|
}), ie(() => {
|
|
176
176
|
!r.value && u.value.length > 0 && (r.value = u.value[0].key);
|
|
177
177
|
}), (t, k) => {
|
|
178
|
-
const
|
|
178
|
+
const g = M("lkt-header"), B = M("lkt-loader");
|
|
179
179
|
return s(), y("article", {
|
|
180
180
|
class: se(["lkt-step-process", ae.value])
|
|
181
181
|
}, [
|
|
182
|
-
t.header && Object.keys(t.header).length > 0 ? (s(),
|
|
183
|
-
re.value ? (s(),
|
|
182
|
+
t.header && Object.keys(t.header).length > 0 ? (s(), N(g, D(C({ key: 0 }, t.header)), null, 16)) : f("", !0),
|
|
183
|
+
re.value ? (s(), N(K, C({
|
|
184
|
+
key: 1,
|
|
185
|
+
ref_key: "navRef",
|
|
186
|
+
ref: S
|
|
187
|
+
}, F.value, {
|
|
184
188
|
onPrev: $,
|
|
185
189
|
onNext: X
|
|
186
190
|
}), U({ _: 2 }, [
|
|
187
191
|
E(b)["nav-info"] ? {
|
|
188
192
|
name: "nav-info",
|
|
189
|
-
fn: G(({ currentStep: d, currentStepIndex: h, amountOfSteps:
|
|
193
|
+
fn: G(({ currentStep: d, currentStepIndex: h, amountOfSteps: L }) => [
|
|
190
194
|
A(t.$slots, "nav-info", D(q({
|
|
191
195
|
currentStep: d,
|
|
192
196
|
currentStepIndex: h,
|
|
@@ -205,14 +209,18 @@ const ut = { class: "lkt-step-process--nav" }, it = { class: "lkt-step-process--
|
|
|
205
209
|
], 64))), 256))
|
|
206
210
|
])
|
|
207
211
|
])),
|
|
208
|
-
m.value ? (s(),
|
|
209
|
-
ne.value ? (s(),
|
|
212
|
+
m.value ? (s(), N(B, { key: 3 })) : f("", !0),
|
|
213
|
+
ne.value ? (s(), N(K, C({
|
|
214
|
+
key: 4,
|
|
215
|
+
ref_key: "navRef",
|
|
216
|
+
ref: S
|
|
217
|
+
}, F.value, {
|
|
210
218
|
onPrev: $,
|
|
211
219
|
onNext: X
|
|
212
220
|
}), U({ _: 2 }, [
|
|
213
221
|
E(b)["nav-info"] ? {
|
|
214
222
|
name: "nav-info",
|
|
215
|
-
fn: G(({ currentStep: d, currentStepIndex: h, amountOfSteps:
|
|
223
|
+
fn: G(({ currentStep: d, currentStepIndex: h, amountOfSteps: L }) => [
|
|
216
224
|
A(t.$slots, "nav-info", D(q({
|
|
217
225
|
currentStep: d,
|
|
218
226
|
currentStepIndex: h,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ButtonConfig, ItemCrudButtonNavPosition, ItemCrudButtonNavVisibility, StepProcessConfig, StepProcessStepConfig } from 'lkt-vue-kernel';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_15: {
|
|
3
3
|
currentStep: any;
|
|
4
4
|
currentStepIndex: any;
|
|
5
5
|
amountOfSteps: number;
|
|
6
|
-
},
|
|
6
|
+
}, __VLS_18: string, __VLS_19: {
|
|
7
7
|
config: {
|
|
8
8
|
key: string;
|
|
9
9
|
nextButton?: false | {
|
|
@@ -4059,17 +4059,17 @@ declare var __VLS_13: {
|
|
|
4059
4059
|
} | undefined;
|
|
4060
4060
|
prevHidden?: boolean | ((currentStep: StepProcessStepConfig, steps: StepProcessStepConfig[]) => boolean) | undefined;
|
|
4061
4061
|
}[];
|
|
4062
|
-
},
|
|
4062
|
+
}, __VLS_35: {
|
|
4063
4063
|
currentStep: any;
|
|
4064
4064
|
currentStepIndex: any;
|
|
4065
4065
|
amountOfSteps: number;
|
|
4066
4066
|
};
|
|
4067
4067
|
type __VLS_Slots = {} & {
|
|
4068
|
-
[K in NonNullable<typeof
|
|
4068
|
+
[K in NonNullable<typeof __VLS_18>]?: (props: typeof __VLS_19) => any;
|
|
4069
4069
|
} & {
|
|
4070
|
-
'nav-info'?: (props: typeof
|
|
4070
|
+
'nav-info'?: (props: typeof __VLS_15) => any;
|
|
4071
4071
|
} & {
|
|
4072
|
-
'nav-info'?: (props: typeof
|
|
4072
|
+
'nav-info'?: (props: typeof __VLS_35) => any;
|
|
4073
4073
|
};
|
|
4074
4074
|
declare const __VLS_component: import("vue").DefineComponent<StepProcessConfig, {
|
|
4075
4075
|
goNext: () => void;
|
package/package.json
CHANGED
|
@@ -139,11 +139,11 @@
|
|
|
139
139
|
defineExpose({
|
|
140
140
|
goNext: () => {
|
|
141
141
|
// @ts-ignore
|
|
142
|
-
navRef.value.
|
|
142
|
+
navRef.value.goNext();
|
|
143
143
|
},
|
|
144
144
|
goPrev: () => {
|
|
145
145
|
// @ts-ignore
|
|
146
|
-
navRef.value.
|
|
146
|
+
navRef.value.goPrev();
|
|
147
147
|
},
|
|
148
148
|
startLoader: () => isLoading.value = true,
|
|
149
149
|
stopLoader: () => isLoading.value = false,
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
|
|
161
161
|
<button-nav
|
|
162
162
|
v-if="computedRenderTopButtonNav"
|
|
163
|
+
ref="navRef"
|
|
163
164
|
v-bind="computedButtonNavProps"
|
|
164
165
|
@prev="onPrev"
|
|
165
166
|
@next="onNext"
|
|
@@ -189,6 +190,7 @@
|
|
|
189
190
|
|
|
190
191
|
<button-nav
|
|
191
192
|
v-if="computedRenderBottomButtonNav"
|
|
193
|
+
ref="navRef"
|
|
192
194
|
v-bind="computedButtonNavProps"
|
|
193
195
|
@prev="onPrev"
|
|
194
196
|
@next="onNext"
|