lkt-step-process 1.2.1 → 2.0.0
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.d.ts +3 -3
- package/dist/build.js +110 -88
- package/dist/lib-components/LktStepProcess.vue.d.ts +2691 -185
- package/package.json +5 -5
- package/src/lib-components/LktStepProcess.vue +131 -186
package/dist/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
declare namespace
|
|
3
|
-
function install(
|
|
1
|
+
export { at as default };
|
|
2
|
+
declare namespace at {
|
|
3
|
+
function install(e: any, a?: {}): void;
|
|
4
4
|
}
|
package/dist/build.js
CHANGED
|
@@ -1,115 +1,137 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var G = (e, a, n) => a in e ? $(e, a, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[a] = n;
|
|
3
|
+
var i = (e, a, n) => G(e, typeof a != "symbol" ? a + "" : a, n);
|
|
4
|
+
import { defineComponent as K, mergeDefaults as Q, useSlots as W, ref as f, watch as x, computed as c, resolveComponent as b, createElementBlock as g, openBlock as h, normalizeClass as X, createBlock as E, createCommentVNode as L, createElementVNode as H, normalizeProps as Y, mergeProps as C, withDirectives as w, createVNode as M, vShow as B, Fragment as Z, renderList as J, renderSlot as ee } from "vue";
|
|
5
|
+
import "lkt-string-tools";
|
|
6
|
+
var te = ((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))(te || {}), ae = ((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.File = "file", e.Image = "image", e.Select = "select", e.Check = "check", e.Switch = "switch", e.Calc = "calc", e.Card = "card", e.Elements = "elements", e))(ae || {}), re = ["lktDateProps", "lktStrictItem", "lktExcludedProps"], s, ne = (s = class {
|
|
7
|
+
constructor(a) {
|
|
8
|
+
}
|
|
9
|
+
feed(a = {}, n = this) {
|
|
10
|
+
if (typeof a == "object") for (let [o, y] of Object.entries(a)) n.assignProp(o, y);
|
|
11
|
+
}
|
|
12
|
+
assignProp(a, n) {
|
|
13
|
+
if (!(re.includes(a) || s.lktExcludedProps.includes(a))) {
|
|
14
|
+
if (s.lktDateProps.includes(a)) {
|
|
15
|
+
this[a] = new Date(n);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this[a] = n;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, i(s, "lktAllowUndefinedProps", []), i(s, "lktExcludedProps", []), i(s, "lktDateProps", []), i(s, "lktStrictItem", !1), i(s, "lktDefaultValues", []), s), le = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(le || {}), oe = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(oe || {}), ie = ((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))(ie || {}), se = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(se || {}), ue = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e))(ue || {}), ce = ((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))(ce || {}), de = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e))(de || {}), ve = ((e) => (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))(ve || {}), pe = ((e) => (e.Ok = "ok", e.Ko = "ko", e.Info = "info", e))(pe || {}), me = ((e) => (e.StorageUnit = "unit", e.Directory = "dir", e.Image = "img", e.Video = "vid", e.File = "file", e))(me || {}), he = ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(he || {}), ke = ((e) => (e.NotDefined = "", e.Button = "button", e))(ke || {}), fe = ((e) => (e.Start = "start", e.End = "end", e))(fe || {}), xe = ((e) => (e.Create = "create", e.Update = "update", e.Read = "read", e))(xe || {}), ge = ((e) => (e.Inline = "inline", e.Modal = "modal", e))(ge || {}), ye = ((e) => (e.Top = "top", e.Bottom = "bottom", e))(ye || {}), be = ((e) => (e.Changed = "changed", e.Always = "always", e.Never = "never", e))(be || {}), Le = ((e) => (e.Manual = "manual", e.Auto = "auto", e.Delay = "delay", e))(Le || {}), Ce = ((e) => (e.Toast = "toast", e.Inline = "inline", e))(Ce || {}), we = ((e) => (e.Anchor = "anchor", e.Button = "button", e.Entry = "entry", e))(we || {}), Be = ((e) => (e.Modal = "modal", e.Confirm = "confirm", e))(Be || {}), Ae = ((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))(Ae || {}), Pe = ((e) => (e.None = "", e.Incremental = "incremental", e.Decremental = "decremental", e))(Pe || {}), Se = ((e) => (e.NotDefined = "", e.Hidden = "hidden", e.Integer = "integer", e.Decimal = "decimal", e.Auto = "auto", e))(Se || {}), A, Ie = (A = class extends ne {
|
|
22
|
+
constructor(a = {}) {
|
|
23
|
+
super();
|
|
24
|
+
i(this, "modelValue", "");
|
|
25
|
+
i(this, "loading", !1);
|
|
26
|
+
i(this, "steps", []);
|
|
27
|
+
i(this, "header", {});
|
|
28
|
+
i(this, "nextButton", {});
|
|
29
|
+
i(this, "prevButton", {});
|
|
30
|
+
this.feed(a);
|
|
31
|
+
}
|
|
32
|
+
}, i(A, "lktDefaultValues", ["modelValue", "loading", "steps", "header"]), A), De = ((e) => (e.Table = "table", e.Item = "item", e.Ul = "ul", e.Ol = "ol", e.Carousel = "carousel", e.Accordion = "accordion", e))(De || {}), Ee = ((e) => (e[e.Auto = 0] = "Auto", e[e.PreferItem = 1] = "PreferItem", e[e.PreferCustomItem = 2] = "PreferCustomItem", e[e.PreferColumns = 3] = "PreferColumns", e))(Ee || {}), He = ((e) => (e.NotDefined = "", e.ActionIcon = "action-icon", e))(He || {}), Me = ((e) => (e.Message = "message", e.Button = "button", e))(Me || {}), Ne = ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(Ne || {}), Te = ((e) => (e.Fixed = "fixed", e.Absolute = "absolute", e))(Te || {}), Re = ((e) => (e.Top = "top", e.Bottom = "bottom", e.Center = "center", e.ReferrerCenter = "referrer-center", e))(Re || {}), _e = ((e) => (e.Left = "left", e.Right = "right", e.Center = "center", e.LeftCorner = "left-corner", e.RightCorner = "right-corner", e))(_e || {}), Ve = ((e) => (e.LktAnchor = "lkt-anchor", e.LktLayoutAccordion = "lkt-layout-accordion", e.LktTextAccordion = "lkt-text-accordion", e.LktLayoutBox = "lkt-layout-box", e.LktTextBox = "lkt-text-box", e.LktLayoutBanner = "lkt-layout-banner", e.LktTextBanner = "lkt-text-banner", e.LktButton = "lkt-button", e.LktLayout = "lkt-layout", e.LktHeader = "lkt-header", e.LktIcon = "lkt-icon", e.LktIcons = "lkt-icons", e.LktImage = "lkt-image", e.LktText = "lkt-text", e))(Ve || {}), Fe = ((e) => (e.Grid = "grid", e.FlexRow = "flex-row", e.FlexRows = "flex-rows", e.FlexColumn = "flex-column", e))(Fe || {}), ze = ((e) => (e.None = "", e.Focus = "focus", e.Blur = "blur", e.Always = "always", e))(ze || {}), Ue = ((e) => (e.Auto = "auto", e.Local = "local", e.Remote = "remote", e))(Ue || {}), Oe = ((e) => (e.Refresh = "refresh", e.Close = "close", e.ReOpen = "reOpen", e.Exec = "exec", e.Open = "open", e))(Oe || {}), je = ((e) => (e.Asc = "asc", e.Desc = "desc", e))(je || {}), qe = ((e) => (e.Create = "create", e.Update = "update", e.Edit = "edit", e.Drop = "drop", e.Sort = "sort", e.SwitchEditMode = "switch-edit-mode", e.InlineEdit = "inline-edit", e.InlineCreate = "inline-create", e.ModalCreate = "modal-create", e.InlineCreateEver = "inline-create-ever", e))(qe || {}), $e = ((e) => (e.Lazy = "lazy", e.Ever = "ever", e))($e || {}), Ge = ((e) => (e.Page = "page", e.Element = "element", e))(Ge || {}), Ke = ((e) => (e.Quick = "quick", e.Full = "full", e))(Ke || {});
|
|
33
|
+
function Qe(e) {
|
|
34
|
+
let a = new e(), n = {};
|
|
35
|
+
if (!Array.isArray(e.lktDefaultValues)) throw new Error("lktDefaultValues must be a keys array.");
|
|
36
|
+
for (let o of e.lktDefaultValues) o in a && (n[o] = a[o]);
|
|
37
|
+
return n;
|
|
38
|
+
}
|
|
39
|
+
const We = { class: "lkt-step-process-buttons" }, Xe = {
|
|
6
40
|
key: 1,
|
|
7
41
|
class: "lkt-step-process_content"
|
|
8
|
-
},
|
|
42
|
+
}, Ye = { class: "lkt-grid-1" }, Ze = /* @__PURE__ */ K({
|
|
9
43
|
__name: "LktStepProcess",
|
|
10
|
-
props: {
|
|
11
|
-
modelValue: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
44
|
+
props: /* @__PURE__ */ Q({
|
|
45
|
+
modelValue: {},
|
|
46
|
+
loading: { type: Boolean },
|
|
47
|
+
steps: {},
|
|
48
|
+
header: {},
|
|
49
|
+
nextButton: {},
|
|
50
|
+
prevButton: {}
|
|
51
|
+
}, Qe(Ie)),
|
|
18
52
|
emits: [
|
|
19
53
|
"next",
|
|
20
54
|
"prev",
|
|
21
|
-
"finish"
|
|
55
|
+
"finish",
|
|
56
|
+
"update:modelValue",
|
|
57
|
+
"update:loading"
|
|
22
58
|
],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
59
|
+
setup(e, { expose: a, emit: n }) {
|
|
60
|
+
const o = e, y = W(), k = n, d = f(o.loading), v = f(o.modelValue), u = f(o.steps), P = f(null), S = f(null);
|
|
61
|
+
x(() => o.loading, (t) => d.value = t), x(() => o.modelValue, (t) => v.value = t), x(d, (t) => k("update:loading", t)), x(v, (t) => k("update:modelValue", t));
|
|
62
|
+
const N = c(() => {
|
|
63
|
+
let t = [];
|
|
64
|
+
for (let r in y) r.indexOf("step-") !== -1 && t.push(r.substring(5));
|
|
65
|
+
return t;
|
|
66
|
+
}), p = c(() => u.value.findIndex((t) => t.key === v.value)), l = c(() => u.value[p.value]), T = c(() => p.value === 0), R = c(() => p.value === u.value.length - 1), _ = c(() => {
|
|
67
|
+
var r, m;
|
|
68
|
+
let t = { ...o.prevButton };
|
|
69
|
+
return (r = l.value) != null && r.prevButton && (t = { ...t, ...(m = l.value) == null ? void 0 : m.prevButton }), typeof t.disabled > "u" && (t.disabled = T.value), t;
|
|
70
|
+
}), V = c(() => {
|
|
71
|
+
var r, m;
|
|
72
|
+
let t = { ...o.nextButton };
|
|
73
|
+
return (r = l.value) != null && r.nextButton && (t = { ...t, ...(m = l.value) == null ? void 0 : m.nextButton }), typeof t.disabled > "u" && (t.disabled = R.value), t;
|
|
74
|
+
}), F = c(() => {
|
|
75
|
+
var t, r;
|
|
76
|
+
return typeof ((t = l.value) == null ? void 0 : t.prevHidden) == "function" ? l.value.prevHidden(l.value, u.value) : typeof ((r = l.value) == null ? void 0 : r.prevHidden) == "boolean" ? l.value.prevHidden : p.value === 0;
|
|
77
|
+
}), z = c(() => {
|
|
78
|
+
var t, r;
|
|
79
|
+
return typeof ((t = l.value) == null ? void 0 : t.nextHidden) == "function" ? l.value.nextHidden(l.value, u.value) : typeof ((r = l.value) == null ? void 0 : r.nextHidden) == "boolean" ? l.value.nextHidden : p.value === u.value.length - 1;
|
|
80
|
+
}), U = c(() => {
|
|
81
|
+
const t = [];
|
|
82
|
+
return v.value && t.push(`step-${v.value}`), t.join(" ");
|
|
83
|
+
}), O = (t) => {
|
|
84
|
+
v.value = u.value[p.value + 1].key, p.value === u.value.length - 1 ? k("finish", t) : k("next", t);
|
|
85
|
+
}, j = (t) => {
|
|
86
|
+
v.value = u.value[p.value - 1].key, k("prev", t);
|
|
35
87
|
};
|
|
36
|
-
return
|
|
88
|
+
return a({
|
|
37
89
|
goNext: () => {
|
|
38
|
-
|
|
90
|
+
S.value.click();
|
|
39
91
|
},
|
|
40
92
|
goPrev: () => {
|
|
41
|
-
|
|
93
|
+
P.value.click();
|
|
42
94
|
},
|
|
43
|
-
startLoader: () =>
|
|
44
|
-
stopLoader: () =>
|
|
45
|
-
}), (
|
|
46
|
-
const
|
|
47
|
-
return
|
|
48
|
-
class:
|
|
95
|
+
startLoader: () => d.value = !0,
|
|
96
|
+
stopLoader: () => d.value = !1
|
|
97
|
+
}), (t, r) => {
|
|
98
|
+
const m = b("lkt-header"), I = b("lkt-button"), q = b("lkt-loader");
|
|
99
|
+
return h(), g("article", {
|
|
100
|
+
class: X(["lkt-step-process", U.value])
|
|
49
101
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
])
|
|
58
|
-
])) : y("", !0),
|
|
59
|
-
f("div", re, [
|
|
60
|
-
_(H(C, {
|
|
61
|
-
ref: (i) => V.value = i,
|
|
62
|
-
disabled: j.value,
|
|
63
|
-
"confirm-modal": E.value,
|
|
64
|
-
onClick: G
|
|
65
|
-
}, {
|
|
66
|
-
default: N(() => [
|
|
67
|
-
B(p)["button-prev"] ? m(r.$slots, "button-prev", {
|
|
68
|
-
key: 0,
|
|
69
|
-
config: e.value
|
|
70
|
-
}) : (u(), o("span", ne, "Back"))
|
|
71
|
-
]),
|
|
72
|
-
_: 3
|
|
73
|
-
}, 8, ["disabled", "confirm-modal"]), [
|
|
74
|
-
[g, !l.value && !w.value]
|
|
102
|
+
t.header && Object.keys(t.header).length > 0 ? (h(), E(m, Y(C({ key: 0 }, t.header)), null, 16)) : L("", !0),
|
|
103
|
+
H("div", We, [
|
|
104
|
+
w(M(I, C({
|
|
105
|
+
ref_key: "prevButtonRef",
|
|
106
|
+
ref: P
|
|
107
|
+
}, _.value, { onClick: j }), null, 16), [
|
|
108
|
+
[B, !d.value && !F.value]
|
|
75
109
|
]),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"resource-data": T.value,
|
|
82
|
-
onClick: A
|
|
83
|
-
}, {
|
|
84
|
-
default: N(() => [
|
|
85
|
-
B(p)["button-next"] ? m(r.$slots, "button-next", {
|
|
86
|
-
key: 0,
|
|
87
|
-
config: e.value
|
|
88
|
-
}) : (u(), o("span", le, "Next"))
|
|
89
|
-
]),
|
|
90
|
-
_: 3
|
|
91
|
-
}, 8, ["disabled", "confirm-modal", "resource", "resource-data"]), [
|
|
92
|
-
[g, !l.value && !F.value]
|
|
110
|
+
w(M(I, C({
|
|
111
|
+
ref_key: "nextButtonRef",
|
|
112
|
+
ref: S
|
|
113
|
+
}, V.value, { onClick: O }), null, 16), [
|
|
114
|
+
[B, !d.value && !z.value]
|
|
93
115
|
])
|
|
94
116
|
]),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
(
|
|
98
|
-
|
|
117
|
+
d.value ? L("", !0) : (h(), g("div", Xe, [
|
|
118
|
+
H("div", Ye, [
|
|
119
|
+
(h(!0), g(Z, null, J(N.value, (D) => w((h(), g("div", null, [
|
|
120
|
+
ee(t.$slots, "step-" + D, { config: u.value })
|
|
99
121
|
], 512)), [
|
|
100
|
-
[
|
|
122
|
+
[B, D === v.value]
|
|
101
123
|
])), 256))
|
|
102
124
|
])
|
|
103
125
|
])),
|
|
104
|
-
|
|
126
|
+
d.value ? (h(), E(q, { key: 2 })) : L("", !0)
|
|
105
127
|
], 2);
|
|
106
128
|
};
|
|
107
129
|
}
|
|
108
|
-
}),
|
|
109
|
-
install: (
|
|
110
|
-
|
|
130
|
+
}), at = {
|
|
131
|
+
install: (e, a = {}) => {
|
|
132
|
+
e.component("lkt-step-process", Ze);
|
|
111
133
|
}
|
|
112
134
|
};
|
|
113
135
|
export {
|
|
114
|
-
|
|
136
|
+
at as default
|
|
115
137
|
};
|