lkt-step-process 2.0.15 → 2.0.16
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
CHANGED
package/dist/build.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var n = (e, a,
|
|
4
|
-
import { ref as
|
|
1
|
+
var he = Object.defineProperty;
|
|
2
|
+
var Ae = (e, a, f) => a in e ? he(e, a, { enumerable: !0, configurable: !0, writable: !0, value: f }) : e[a] = f;
|
|
3
|
+
var n = (e, a, f) => Ae(e, typeof a != "symbol" ? a + "" : a, f);
|
|
4
|
+
import { ref as p, defineComponent as ue, useSlots as se, computed as b, resolveComponent as U, createElementBlock as D, createCommentVNode as g, unref as j, openBlock as y, withDirectives as Q, createBlock as V, mergeProps as F, vShow as Y, renderSlot as W, normalizeProps as X, Fragment as K, renderList as ce, mergeDefaults as Se, watch as z, onMounted as ge, normalizeClass as Be, createSlots as re, withCtx as oe, guardReactiveProps as le, createElementVNode as Ce } from "vue";
|
|
5
5
|
import "lkt-string-tools";
|
|
6
6
|
import "lkt-object-tools";
|
|
7
7
|
import "lkt-data-state";
|
|
8
|
-
var
|
|
8
|
+
var Ie = ((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.InvisibleWrapper = "invisible-wrapper", e.Menu = "menu", e.Tab = "tab", e))(Ie || {}), we = ((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.DayOfWeek = "day-of-week", e))(we || {}), Le = ["lktDateProps", "lktStrictItem", "lktExcludedProps"], S, Re = (S = class {
|
|
9
9
|
constructor(a) {
|
|
10
10
|
}
|
|
11
|
-
feed(a = {},
|
|
12
|
-
if (typeof a == "object") for (let [r,
|
|
11
|
+
feed(a = {}, f = this) {
|
|
12
|
+
if (typeof a == "object") for (let [r, R] of Object.entries(a)) f.assignProp(r, R);
|
|
13
13
|
}
|
|
14
|
-
assignProp(a,
|
|
15
|
-
if (!(
|
|
16
|
-
if (
|
|
17
|
-
this[a] = new Date(
|
|
14
|
+
assignProp(a, f) {
|
|
15
|
+
if (!(Le.includes(a) || S.lktExcludedProps.includes(a))) {
|
|
16
|
+
if (S.lktDateProps.includes(a)) {
|
|
17
|
+
this[a] = new Date(f);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
this[a] =
|
|
20
|
+
this[a] = f;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
}, n(
|
|
23
|
+
}, n(S, "lktAllowUndefinedProps", []), n(S, "lktExcludedProps", []), n(S, "lktDateProps", []), n(S, "lktStrictItem", !1), n(S, "lktDefaultValues", []), S), Te = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(Te || {}), De = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(De || {}), Me = ((e) => (e.Href = "href", e.RouterLink = "router-link", e.RouterLinkReplace = "router-link-replace", e.RouterLinkBack = "router-link-back", e.Mail = "mail", e.Tel = "tel", e.Tab = "tab", e.Download = "download", e.Action = "action", e.Legacy = "", e))(Me || {}), Ne = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(Ne || {}), Pe = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e.Content = "content", e.InlineDrop = "inline-drop", e.ColumnIndex = "column-index", e))(Pe || {}), Ve = ((e) => (e.Date = "date", e.Number = "number", e.Timer = "timer", e.Chrono = "chrono", e))(Ve || {}), Fe = ((e) => (e.Auto = "auto", e.Progress = "progress", e))(Fe || {}), Oe = ((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))(Oe || {}), Ee = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e.Table = "table", e))(Ee || {}), He = ((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))(He || {}), je = ((e) => (e.Ok = "ok", e.Ko = "ko", e.Info = "info", e))(je || {}), ze = ((e) => (e.StorageUnit = "unit", e.Directory = "dir", e.Image = "img", e.Video = "vid", e.File = "file", e))(ze || {}), We = ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(We || {}), Xe = ((e) => (e.NotDefined = "", e.Button = "button", e))(Xe || {}), Ue = ((e) => (e.Start = "start", e.End = "end", e))(Ue || {}), $e = ((e) => (e[e.NotDefined = 0] = "NotDefined", e[e.SwapIconAndDot = 1] = "SwapIconAndDot", e))($e || {}), Je = ((e) => (e.Create = "create", e.Update = "update", e.Read = "read", e))(Je || {}), qe = ((e) => (e.Inline = "inline", e.Modal = "modal", e))(qe || {}), Z = ((e) => (e.Top = "top", e.Bottom = "bottom", e.Hidden = "hidden", e))(Z || {}), _ = ((e) => (e.Changed = "changed", e.Always = "always", e.Never = "never", e))(_ || {}), Ge = ((e) => (e.Manual = "manual", e.Auto = "auto", e.Delay = "delay", e))(Ge || {}), Qe = ((e) => (e.Toast = "toast", e.Inline = "inline", e.Silent = "silent", e))(Qe || {}), Ye = ((e) => (e.Current = "current", e.Modifications = "modifications", e.SplitView = "split-view", e.Differences = "differences", e))(Ye || {}), Ke = ((e) => (e.Hidden = "hidden", e.Always = "always", e.TabList = "tablist", e))(Ke || {}), Ze = ((e) => (e.Anchor = "anchor", e.Button = "button", e.Header = "header", e.Entry = "entry", e))(Ze || {}), _e = ((e) => (e.Modal = "modal", e.Confirm = "confirm", e))(_e || {}), et = ((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.TimelineAsc = "timeline-asc", e.TimelineDesc = "timeline-desc", e.TimelineAscDesc = "timeline-asc-desc", e))(et || {}), tt = ((e) => (e.None = "", e.Incremental = "incremental", e.Decremental = "decremental", e))(tt || {}), at = ((e) => (e.NotDefined = "", e.Hidden = "hidden", e.Integer = "integer", e.Decimal = "decimal", e.Auto = "auto", e))(at || {}), nt = ((e) => (e.Bar = "bar", e.Circle = "circle", e))(nt || {}), G, rt = (G = class extends Re {
|
|
24
24
|
constructor(a = {}) {
|
|
25
25
|
super();
|
|
26
26
|
n(this, "modelValue", "");
|
|
@@ -33,39 +33,39 @@ var Se = ((e) => (e.Button = "button", e.Submit = "submit", e.Reset = "reset", e
|
|
|
33
33
|
n(this, "buttonNavVisibility", "always");
|
|
34
34
|
this.feed(a);
|
|
35
35
|
}
|
|
36
|
-
}, n(
|
|
36
|
+
}, n(G, "lktDefaultValues", ["modelValue", "loading", "steps", "header", "nextButton", "prevButton", "buttonNavPosition", "buttonNavVisibility"]), G), ot = ((e) => (e.Table = "table", e.Item = "item", e.Ul = "ul", e.Ol = "ol", e.Carousel = "carousel", e.Accordion = "accordion", e.Calendar = "calendar", e))(ot || {}), lt = ((e) => (e[e.Auto = 0] = "Auto", e[e.PreferItem = 1] = "PreferItem", e[e.PreferCustomItem = 2] = "PreferCustomItem", e[e.PreferColumns = 3] = "PreferColumns", e))(lt || {}), it = ((e) => (e.NotDefined = "", e.ActionIcon = "action-icon", e))(it || {}), ut = ((e) => (e.Message = "message", e.Button = "button", e))(ut || {}), st = ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(st || {}), ct = ((e) => (e.Fixed = "fixed", e.Absolute = "absolute", e))(ct || {}), dt = ((e) => (e.Top = "top", e.Bottom = "bottom", e.Center = "center", e.ReferrerCenter = "referrer-center", e))(dt || {}), vt = ((e) => (e.Left = "left", e.Right = "right", e.Center = "center", e.LeftCorner = "left-corner", e.RightCorner = "right-corner", e))(vt || {}), ft = ((e) => (e.Relative = "relative", e.Full = "full", e))(ft || {}), pt = ((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))(pt || {}), mt = ((e) => (e.Grid = "grid", e.FlexRow = "flex-row", e.FlexRows = "flex-rows", e.FlexColumn = "flex-column", e))(mt || {}), yt = ((e) => (e.Draft = "draft", e.Public = "public", e.Scheduled = "scheduled", e))(yt || {}), xt = ((e) => (e[e.NeverLoaded = 0] = "NeverLoaded", e[e.Ready = 1] = "Ready", e[e.Loading = 2] = "Loading", e[e.Failed = 3] = "Failed", e[e.RequiredRefresh = 4] = "RequiredRefresh", e))(xt || {}), kt = ((e) => (e[e.XXS = 1] = "XXS", e[e.XS = 2] = "XS", e[e.SM = 3] = "SM", e[e.MD = 4] = "MD", e[e.LG = 5] = "LG", e[e.XL = 6] = "XL", e[e.XXL = 7] = "XXL", e))(kt || {}), bt = ((e) => (e.PrevButton = "prev", e.NextButton = "next", e.DatePicker = "datePicker", e.GoToCurrent = "goToCurrent", e))(bt || {}), ht = ((e) => (e[e.Sunday = 0] = "Sunday", e[e.Monday = 1] = "Monday", e[e.Tuesday = 2] = "Tuesday", e[e.Wednesday = 3] = "Wednesday", e[e.Thursday = 4] = "Thursday", e[e.Friday = 5] = "Friday", e[e.Saturday = 6] = "Saturday", e))(ht || {}), At = ((e) => (e.None = "", e.Focus = "focus", e.Blur = "blur", e.Always = "always", e))(At || {}), St = ((e) => (e.Error = "error", e.Errors = "errors", e.All = "all", e))(St || {}), gt = ((e) => (e.Message = "message", e.Inline = "inline", e))(gt || {}), Bt = ((e) => (e.Auto = "auto", e.Local = "local", e.Remote = "remote", e.External = "external", e))(Bt || {}), Ct = ((e) => (e.Text = "text", e.Textarea = "textarea", e.Html = "html", e.Many = "many", e))(Ct || {}), It = ((e) => (e.Refresh = "refresh", e.Close = "close", e.ReOpen = "reOpen", e.Exec = "exec", e.Open = "open", e))(It || {}), wt = ((e) => (e.Asc = "asc", e.Desc = "desc", e))(wt || {}), L = ((e) => (e[e.RendersAndVisibleIfActive = 1] = "RendersAndVisibleIfActive", e[e.AlwaysRendersVisibleIfActive = 2] = "AlwaysRendersVisibleIfActive", e[e.AlwaysRendersVisibleAfterFirstActive = 3] = "AlwaysRendersVisibleAfterFirstActive", e[e.AlwaysRendersAlwaysVisible = 4] = "AlwaysRendersAlwaysVisible", e[e.RendersAfterFirstActiveVisibleIfActive = 5] = "RendersAfterFirstActiveVisibleIfActive", e))(L || {}), Lt = ((e) => (e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(Lt || {}), Rt = ((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))(Rt || {}), Tt = ((e) => (e[e.Auto = 0] = "Auto", e[e.Light = 1] = "Light", e[e.Dark = 2] = "Dark", e))(Tt || {}), Dt = ((e) => (e.Lazy = "lazy", e.Ever = "ever", e))(Dt || {}), Mt = ((e) => (e.Page = "page", e.Element = "element", e))(Mt || {}), d;
|
|
37
37
|
d = class {
|
|
38
|
-
}, n(d, "lktAppSize",
|
|
38
|
+
}, n(d, "lktAppSize", p(4)), n(d, "lktAdminEnabled", p(!0)), n(d, "lktAppLoading", p(!0)), n(d, "lktAppReady", p(!1)), n(d, "lktAppSetup", p({})), n(d, "appSetupChangedCallback"), n(d, "lktMainMenu"), n(d, "lktBottomBar"), n(d, "hasMainHeader", !0), n(d, "hasMainMenu", !0), n(d, "hasBottomBar", !0), n(d, "replaceMainMenuButtonWithBack", !1), n(d, "setup"), n(d, "i18nStatus", p(0)), n(d, "setupStatus", p(0)), n(d, "mainHeader", p(void 0)), n(d, "lktAppThemeModeConfig", p(0)), n(d, "lktAppThemeModeDetected", p("light")), n(d, "lktAppThemeMode", p("light"));
|
|
39
39
|
var m;
|
|
40
40
|
m = class {
|
|
41
41
|
static setup(a) {
|
|
42
42
|
a.firstDayOfWeek && (m.firstDayOfWeek.value = a.firstDayOfWeek), a.days && (m.days = a.days), a.months && (m.months = a.months), a.smDays && (m.smDays = a.smDays), a.smMonths && (m.smMonths = a.smMonths);
|
|
43
43
|
}
|
|
44
44
|
static getDaysAsOptions() {
|
|
45
|
-
let a = [],
|
|
46
|
-
for (let r =
|
|
47
|
-
--
|
|
48
|
-
for (let r =
|
|
45
|
+
let a = [], f = m.firstDayOfWeek.value;
|
|
46
|
+
for (let r = f; r < 7; ++r) a.push({ value: r, label: m.days[r] });
|
|
47
|
+
--f;
|
|
48
|
+
for (let r = f; r >= 0; --r) a.push({ value: r, label: m.days[r] });
|
|
49
49
|
return a;
|
|
50
50
|
}
|
|
51
|
-
}, n(m, "firstDayOfWeek",
|
|
52
|
-
var
|
|
53
|
-
function
|
|
54
|
-
let a = new e(),
|
|
51
|
+
}, n(m, "firstDayOfWeek", p(0)), n(m, "days", ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]), n(m, "months", ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]), n(m, "smDays", ["Sun", "Mon", "Tu", "Wed", "Th", "Fri", "Sat"]), n(m, "smMonths", ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]);
|
|
52
|
+
var Nt = ((e) => (e.Quick = "quick", e.Full = "full", e.Static = "static", e))(Nt || {});
|
|
53
|
+
function Pt(e) {
|
|
54
|
+
let a = new e(), f = {};
|
|
55
55
|
if (!Array.isArray(e.lktDefaultValues)) throw new Error("lktDefaultValues must be a keys array.");
|
|
56
|
-
for (let r of e.lktDefaultValues) r in a && (
|
|
57
|
-
return
|
|
56
|
+
for (let r of e.lktDefaultValues) r in a && (f[r] = a[r]);
|
|
57
|
+
return f;
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const Vt = {
|
|
60
60
|
key: 0,
|
|
61
61
|
class: "lkt-step-process--nav"
|
|
62
|
-
},
|
|
62
|
+
}, Ft = {
|
|
63
63
|
key: 1,
|
|
64
64
|
class: "lkt-step-process--nav-info"
|
|
65
|
-
},
|
|
65
|
+
}, Ot = {
|
|
66
66
|
key: 1,
|
|
67
67
|
class: "lkt-step-process--dots"
|
|
68
|
-
},
|
|
68
|
+
}, ie = /* @__PURE__ */ ue({
|
|
69
69
|
__name: "ButtonNav",
|
|
70
70
|
props: {
|
|
71
71
|
prevButton: { type: [Object, Boolean] },
|
|
@@ -80,60 +80,60 @@ const Dt = {
|
|
|
80
80
|
dotsNumbers: { type: Boolean }
|
|
81
81
|
},
|
|
82
82
|
emits: ["prev", "next"],
|
|
83
|
-
setup(e, { expose: a, emit:
|
|
84
|
-
const r = e,
|
|
83
|
+
setup(e, { expose: a, emit: f }) {
|
|
84
|
+
const r = e, R = se(), M = p(null), T = p(null);
|
|
85
85
|
a({
|
|
86
86
|
goNext: () => {
|
|
87
|
-
|
|
87
|
+
T.value.click();
|
|
88
88
|
},
|
|
89
89
|
goPrev: () => {
|
|
90
|
-
|
|
90
|
+
M.value.click();
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
const
|
|
94
|
-
var
|
|
95
|
-
return typeof ((
|
|
93
|
+
const v = b(() => {
|
|
94
|
+
var u, N;
|
|
95
|
+
return typeof ((u = r.currentStepConfig) == null ? void 0 : u.excludedFromTotalCount) == "function" ? !r.currentStepConfig.excludedFromTotalCount() : typeof ((N = r.currentStepConfig) == null ? void 0 : N.excludedFromTotalCount) == "boolean" ? !r.currentStepConfig.excludedFromTotalCount : !0;
|
|
96
96
|
});
|
|
97
|
-
return (
|
|
98
|
-
const
|
|
99
|
-
return e.prevButton || e.nextButton ||
|
|
100
|
-
e.prevButton ?
|
|
97
|
+
return (u, N) => {
|
|
98
|
+
const P = U("lkt-button"), $ = U("lkt-dot");
|
|
99
|
+
return e.prevButton || e.nextButton || v.value && (j(R)["nav-info"] || e.dots && e.amountOfSteps > 0) ? (y(), D("div", Vt, [
|
|
100
|
+
e.prevButton ? Q((y(), V(P, F({
|
|
101
101
|
key: 0,
|
|
102
102
|
ref_key: "prevButtonRef",
|
|
103
|
-
ref:
|
|
103
|
+
ref: M
|
|
104
104
|
}, e.prevButton, { class: "is-prev-button" }), null, 16)), [
|
|
105
|
-
[
|
|
106
|
-
]) :
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
[Y, !e.isLoading]
|
|
106
|
+
]) : g("", !0),
|
|
107
|
+
v.value && (j(R)["nav-info"] || e.dots && e.amountOfSteps > 0) ? (y(), D("div", Ft, [
|
|
108
|
+
j(R)["nav-info"] ? W(u.$slots, "nav-info", X(F({ key: 0 }, {
|
|
109
109
|
visibleStep: e.visibleStepIndex,
|
|
110
110
|
currentStep: e.currentStep,
|
|
111
111
|
currentStepIndex: e.currentStepIndex,
|
|
112
112
|
amountOfSteps: e.amountOfSteps
|
|
113
|
-
}))) :
|
|
114
|
-
e.dots && e.amountOfSteps > 0 &&
|
|
115
|
-
(y(!0),
|
|
116
|
-
text: e.dotsNumbers ?
|
|
117
|
-
class:
|
|
113
|
+
}))) : g("", !0),
|
|
114
|
+
e.dots && e.amountOfSteps > 0 && v.value ? (y(), D("div", Ot, [
|
|
115
|
+
(y(!0), D(K, null, ce(e.amountOfSteps, (B) => (y(), V($, F({ ref_for: !0 }, {
|
|
116
|
+
text: e.dotsNumbers ? B : "",
|
|
117
|
+
class: B === e.visibleStepIndex ? "is-active" : ""
|
|
118
118
|
}), null, 16))), 256))
|
|
119
|
-
])) :
|
|
120
|
-
])) :
|
|
121
|
-
e.nextButton ?
|
|
119
|
+
])) : g("", !0)
|
|
120
|
+
])) : g("", !0),
|
|
121
|
+
e.nextButton ? Q((y(), V(P, F({
|
|
122
122
|
key: 2,
|
|
123
123
|
ref_key: "nextButtonRef",
|
|
124
|
-
ref:
|
|
124
|
+
ref: T
|
|
125
125
|
}, e.nextButton, { class: "is-next-button" }), null, 16)), [
|
|
126
|
-
[
|
|
127
|
-
]) :
|
|
128
|
-
])) :
|
|
126
|
+
[Y, !e.isLoading]
|
|
127
|
+
]) : g("", !0)
|
|
128
|
+
])) : g("", !0);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
131
|
+
}), Et = {
|
|
132
132
|
key: 2,
|
|
133
133
|
class: "lkt-step-process--content"
|
|
134
|
-
},
|
|
134
|
+
}, Ht = { class: "lkt-grid-1" }, jt = { key: 0 }, zt = /* @__PURE__ */ ue({
|
|
135
135
|
__name: "LktStepProcess",
|
|
136
|
-
props: /* @__PURE__ */
|
|
136
|
+
props: /* @__PURE__ */ Se({
|
|
137
137
|
modelValue: {},
|
|
138
138
|
loading: { type: Boolean },
|
|
139
139
|
steps: {},
|
|
@@ -144,7 +144,7 @@ const Dt = {
|
|
|
144
144
|
buttonNavVisibility: {},
|
|
145
145
|
dots: { type: Boolean },
|
|
146
146
|
dotsNumbers: { type: Boolean }
|
|
147
|
-
},
|
|
147
|
+
}, Pt(rt)),
|
|
148
148
|
emits: [
|
|
149
149
|
"next",
|
|
150
150
|
"prev",
|
|
@@ -152,196 +152,198 @@ const Dt = {
|
|
|
152
152
|
"update:modelValue",
|
|
153
153
|
"update:loading"
|
|
154
154
|
],
|
|
155
|
-
setup(e, { expose: a, emit:
|
|
156
|
-
const r = e,
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
setup(e, { expose: a, emit: f }) {
|
|
156
|
+
const r = e, R = se(), M = f, T = p(r.loading), v = p(r.modelValue), u = p(r.steps), N = p({}), P = p(null);
|
|
157
|
+
z(() => r.loading, (t) => T.value = t), z(() => r.modelValue, (t) => v.value = t), z(T, (t) => M("update:loading", t)), z(v, (t) => {
|
|
158
|
+
N.value[t] = !0, M("update:modelValue", t);
|
|
159
159
|
});
|
|
160
|
-
const
|
|
160
|
+
const $ = b(() => {
|
|
161
161
|
let t = [];
|
|
162
|
-
for (let
|
|
162
|
+
for (let i in R) i.indexOf("step-") !== -1 && t.push(i.substring(5));
|
|
163
163
|
return t;
|
|
164
|
-
}),
|
|
165
|
-
let t =
|
|
166
|
-
for (let
|
|
167
|
-
let
|
|
168
|
-
typeof s == "function" ?
|
|
164
|
+
}), B = b(() => u.value.findIndex((t) => t.key === v.value)), de = b(() => {
|
|
165
|
+
let t = u.value.findIndex((o) => o.key === v.value), i = t;
|
|
166
|
+
for (let o = 0; o < t; ++o) {
|
|
167
|
+
let c = !1, s = u.value[o].excludedFromTotalCount;
|
|
168
|
+
typeof s == "function" ? c = s() === !0 : typeof s == "boolean" && (c = s === !0), c && --i;
|
|
169
169
|
}
|
|
170
|
-
return
|
|
171
|
-
}),
|
|
172
|
-
var
|
|
173
|
-
if (((
|
|
170
|
+
return i + 1;
|
|
171
|
+
}), l = b(() => u.value[B.value]), ve = b(() => B.value === 0), ee = b(() => {
|
|
172
|
+
var o, c, s, x, h, k, C, I;
|
|
173
|
+
if (((o = l.value) == null ? void 0 : o.prevButton) === !1 || r.prevButton === !1 && !((c = l.value) != null && c.prevButton) || typeof l.value == "object" && (typeof ((s = l.value) == null ? void 0 : s.prevHidden) == "function" && l.value.prevHidden(l.value, u.value) || typeof ((x = l.value) == null ? void 0 : x.prevHidden) == "boolean" && ((h = l.value) == null ? void 0 : h.prevHidden) === !0))
|
|
174
174
|
return !1;
|
|
175
175
|
let t = { ...r.prevButton };
|
|
176
|
-
typeof ((
|
|
177
|
-
const
|
|
176
|
+
typeof ((k = l.value) == null ? void 0 : k.prevButton) == "object" && (t = { ...t, ...(C = l.value) == null ? void 0 : C.prevButton }), typeof t.disabled > "u" && (t.disabled = ve.value);
|
|
177
|
+
const i = (I = t.events) == null ? void 0 : I.click;
|
|
178
178
|
return {
|
|
179
179
|
...t,
|
|
180
180
|
events: {
|
|
181
181
|
...t.events,
|
|
182
|
-
click: (
|
|
183
|
-
var
|
|
184
|
-
typeof
|
|
182
|
+
click: (A) => {
|
|
183
|
+
var w;
|
|
184
|
+
typeof i == "function" && i(A), ((w = A.httpResponse) == null ? void 0 : w.success) !== !1 && xe(A);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
}),
|
|
189
|
-
var
|
|
190
|
-
if (((
|
|
188
|
+
}), te = b(() => {
|
|
189
|
+
var o, c, s, x, h, k, C, I;
|
|
190
|
+
if (((o = l.value) == null ? void 0 : o.nextButton) === !1 || r.nextButton === !1 && !((c = l.value) != null && c.nextButton) || typeof l.value == "object" && (typeof ((s = l.value) == null ? void 0 : s.nextHidden) == "function" && l.value.nextHidden(l.value, u.value) || typeof ((x = l.value) == null ? void 0 : x.nextHidden) == "boolean" && ((h = l.value) == null ? void 0 : h.nextHidden) === !0))
|
|
191
191
|
return !1;
|
|
192
192
|
let t = { ...r.nextButton };
|
|
193
|
-
typeof ((
|
|
194
|
-
const
|
|
193
|
+
typeof ((k = l.value) == null ? void 0 : k.nextButton) == "object" && (t = { ...t, ...(C = l.value) == null ? void 0 : C.nextButton });
|
|
194
|
+
const i = (I = t.events) == null ? void 0 : I.click;
|
|
195
195
|
return {
|
|
196
196
|
...t,
|
|
197
197
|
events: {
|
|
198
198
|
...t.events,
|
|
199
|
-
click: (
|
|
200
|
-
var
|
|
201
|
-
typeof
|
|
199
|
+
click: (A) => {
|
|
200
|
+
var w;
|
|
201
|
+
typeof i == "function" && i(A), ((w = A.httpResponse) == null ? void 0 : w.success) !== !1 && ye(A);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
|
-
}),
|
|
205
|
+
}), fe = b(() => {
|
|
206
206
|
const t = [];
|
|
207
|
-
return
|
|
208
|
-
}),
|
|
207
|
+
return v.value && t.push(`step-${v.value}`), t.join(" ");
|
|
208
|
+
}), pe = b(() => r.buttonNavVisibility === _.Never ? !1 : !r.buttonNavPosition || r.buttonNavPosition === Z.Top), me = b(() => r.buttonNavVisibility === _.Never ? !1 : r.buttonNavPosition === Z.Bottom), J = b(() => {
|
|
209
209
|
let t = 0;
|
|
210
|
-
return
|
|
211
|
-
let
|
|
212
|
-
typeof
|
|
210
|
+
return u.value.forEach((i) => {
|
|
211
|
+
let o = !1;
|
|
212
|
+
typeof i.excludedFromTotalCount == "function" ? o = i.excludedFromTotalCount() === !0 : typeof i.excludedFromTotalCount == "boolean" && (o = i.excludedFromTotalCount === !0), o || ++t;
|
|
213
213
|
}), t;
|
|
214
|
-
}),
|
|
215
|
-
isLoading:
|
|
216
|
-
prevButton:
|
|
217
|
-
nextButton:
|
|
218
|
-
currentStep:
|
|
219
|
-
currentStepConfig:
|
|
220
|
-
currentStepIndex:
|
|
221
|
-
visibleStepIndex:
|
|
222
|
-
amountOfSteps:
|
|
214
|
+
}), ae = b(() => ({
|
|
215
|
+
isLoading: T.value,
|
|
216
|
+
prevButton: ee.value,
|
|
217
|
+
nextButton: te.value,
|
|
218
|
+
currentStep: v.value,
|
|
219
|
+
currentStepConfig: l.value,
|
|
220
|
+
currentStepIndex: B.value,
|
|
221
|
+
visibleStepIndex: de.value,
|
|
222
|
+
amountOfSteps: J.value,
|
|
223
223
|
dots: r.dots,
|
|
224
224
|
dotsNumbers: r.dotsNumbers
|
|
225
|
-
})),
|
|
226
|
-
var
|
|
227
|
-
let o = (
|
|
225
|
+
})), ne = b(() => typeof ee.value == "object" || typeof te.value == "object" || r.dots || typeof R["nav-info"] < "u"), ye = (t) => {
|
|
226
|
+
var x, h, k, C, I, A, w, O, E;
|
|
227
|
+
let i = v.value, o = (x = u.value[B.value]) == null ? void 0 : x.nextKey, c = B.value + 1;
|
|
228
228
|
if (typeof o == "function" && (o = o()), typeof o == "string") {
|
|
229
|
-
let
|
|
230
|
-
|
|
229
|
+
let H = u.value.findIndex((q) => q.key === o);
|
|
230
|
+
H > -1 && (c = H);
|
|
231
231
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
let s = u.value[c].key;
|
|
233
|
+
typeof ((k = (h = l.value) == null ? void 0 : h.events) == null ? void 0 : k.leave) == "function" && ((I = (C = l.value) == null ? void 0 : C.events) == null || I.leave({ to: s })), v.value = s, typeof ((w = (A = l.value) == null ? void 0 : A.events) == null ? void 0 : w.enter) == "function" && ((E = (O = l.value) == null ? void 0 : O.events) == null || E.enter({ from: i })), B.value === u.value.length - 1 ? M("finish", t) : M("next", t);
|
|
234
|
+
}, xe = (t) => {
|
|
235
|
+
var x, h, k, C, I, A, w, O, E;
|
|
236
|
+
let i = v.value, o = (x = u.value[B.value]) == null ? void 0 : x.prevKey, c = B.value - 1;
|
|
236
237
|
if (typeof o == "function" && (o = o()), typeof o == "string") {
|
|
237
|
-
let
|
|
238
|
-
|
|
238
|
+
let H = u.value.findIndex((q) => q.key === o);
|
|
239
|
+
H > -1 && (c = H);
|
|
239
240
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
case
|
|
248
|
-
case
|
|
241
|
+
let s = u.value[c].key;
|
|
242
|
+
typeof ((k = (h = l.value) == null ? void 0 : h.events) == null ? void 0 : k.leave) == "function" && ((I = (C = l.value) == null ? void 0 : C.events) == null || I.leave({ to: s })), v.value = s, typeof ((w = (A = l.value) == null ? void 0 : A.events) == null ? void 0 : w.enter) == "function" && ((E = (O = l.value) == null ? void 0 : O.events) == null || E.enter({ from: i })), M("prev", t);
|
|
243
|
+
}, ke = (t) => {
|
|
244
|
+
var o, c;
|
|
245
|
+
const i = u.value.findIndex((s) => s.key === t);
|
|
246
|
+
if (i > -1 && ((o = u.value[i]) != null && o.renderType))
|
|
247
|
+
switch ((c = u.value[i]) == null ? void 0 : c.renderType) {
|
|
248
|
+
case L.AlwaysRendersAlwaysVisible:
|
|
249
|
+
case L.AlwaysRendersVisibleAfterFirstActive:
|
|
250
|
+
case L.AlwaysRendersVisibleIfActive:
|
|
249
251
|
return !0;
|
|
250
|
-
case
|
|
251
|
-
return t ===
|
|
252
|
-
case
|
|
253
|
-
return
|
|
252
|
+
case L.RendersAndVisibleIfActive:
|
|
253
|
+
return t === v.value;
|
|
254
|
+
case L.RendersAfterFirstActiveVisibleIfActive:
|
|
255
|
+
return N.value[t] === !0;
|
|
254
256
|
}
|
|
255
|
-
return t ===
|
|
256
|
-
},
|
|
257
|
-
var
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
260
|
-
switch ((
|
|
261
|
-
case
|
|
257
|
+
return t === v.value;
|
|
258
|
+
}, be = (t) => {
|
|
259
|
+
var o, c;
|
|
260
|
+
const i = u.value.findIndex((s) => s.key === t);
|
|
261
|
+
if (i > -1 && ((o = u.value[i]) != null && o.renderType))
|
|
262
|
+
switch ((c = u.value[i]) == null ? void 0 : c.renderType) {
|
|
263
|
+
case L.AlwaysRendersAlwaysVisible:
|
|
262
264
|
return !0;
|
|
263
|
-
case
|
|
264
|
-
return
|
|
265
|
-
case
|
|
266
|
-
case
|
|
267
|
-
case
|
|
268
|
-
return t ===
|
|
265
|
+
case L.AlwaysRendersVisibleAfterFirstActive:
|
|
266
|
+
return N.value[t] === !0;
|
|
267
|
+
case L.AlwaysRendersVisibleIfActive:
|
|
268
|
+
case L.RendersAndVisibleIfActive:
|
|
269
|
+
case L.RendersAfterFirstActiveVisibleIfActive:
|
|
270
|
+
return t === v.value;
|
|
269
271
|
}
|
|
270
272
|
return !0;
|
|
271
273
|
};
|
|
272
274
|
return a({
|
|
273
275
|
goNext: () => {
|
|
274
|
-
|
|
276
|
+
P.value.goNext();
|
|
275
277
|
},
|
|
276
278
|
goPrev: () => {
|
|
277
|
-
|
|
279
|
+
P.value.goPrev();
|
|
278
280
|
},
|
|
279
|
-
startLoader: () =>
|
|
280
|
-
stopLoader: () =>
|
|
281
|
-
}),
|
|
282
|
-
!
|
|
283
|
-
}), (t,
|
|
284
|
-
const
|
|
285
|
-
return y(),
|
|
286
|
-
class:
|
|
281
|
+
startLoader: () => T.value = !0,
|
|
282
|
+
stopLoader: () => T.value = !1
|
|
283
|
+
}), ge(() => {
|
|
284
|
+
!v.value && u.value.length > 0 && (v.value = u.value[0].key);
|
|
285
|
+
}), (t, i) => {
|
|
286
|
+
const o = U("lkt-header"), c = U("lkt-loader");
|
|
287
|
+
return y(), D("article", {
|
|
288
|
+
class: Be(["lkt-step-process", fe.value])
|
|
287
289
|
}, [
|
|
288
|
-
e.header && Object.keys(e.header).length > 0 ? (y(),
|
|
289
|
-
|
|
290
|
+
e.header && Object.keys(e.header).length > 0 ? (y(), V(o, X(F({ key: 0 }, e.header)), null, 16)) : g("", !0),
|
|
291
|
+
pe.value && ne.value ? (y(), V(ie, F({
|
|
290
292
|
key: 1,
|
|
291
293
|
ref_key: "navRef",
|
|
292
|
-
ref:
|
|
293
|
-
},
|
|
294
|
-
|
|
294
|
+
ref: P
|
|
295
|
+
}, ae.value), re({ _: 2 }, [
|
|
296
|
+
j(R)["nav-info"] ? {
|
|
295
297
|
name: "nav-info",
|
|
296
|
-
fn:
|
|
297
|
-
|
|
298
|
-
visibleStep:
|
|
298
|
+
fn: oe(({ currentStep: s, currentStepIndex: x, amountOfSteps: h, visibleStep: k }) => [
|
|
299
|
+
W(t.$slots, "nav-info", X(le({
|
|
300
|
+
visibleStep: k,
|
|
299
301
|
currentStep: s,
|
|
300
|
-
currentStepIndex:
|
|
301
|
-
amountOfSteps:
|
|
302
|
+
currentStepIndex: x,
|
|
303
|
+
amountOfSteps: J.value
|
|
302
304
|
})))
|
|
303
305
|
]),
|
|
304
306
|
key: "0"
|
|
305
307
|
} : void 0
|
|
306
|
-
]), 1040)) :
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
(y(!0),
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
]), 1040)) : g("", !0),
|
|
309
|
+
T.value ? g("", !0) : (y(), D("div", Et, [
|
|
310
|
+
Ce("div", Ht, [
|
|
311
|
+
(y(!0), D(K, null, ce($.value, (s) => (y(), D(K, null, [
|
|
312
|
+
ke(s) ? Q((y(), D("div", jt, [
|
|
313
|
+
W(t.$slots, "step-" + s, { config: u.value })
|
|
312
314
|
], 512)), [
|
|
313
|
-
[
|
|
314
|
-
]) :
|
|
315
|
+
[Y, be(s)]
|
|
316
|
+
]) : g("", !0)
|
|
315
317
|
], 64))), 256))
|
|
316
318
|
])
|
|
317
319
|
])),
|
|
318
|
-
|
|
319
|
-
|
|
320
|
+
T.value ? (y(), V(c, { key: 3 })) : g("", !0),
|
|
321
|
+
me.value && ne.value ? (y(), V(ie, F({
|
|
320
322
|
key: 4,
|
|
321
323
|
ref_key: "navRef",
|
|
322
|
-
ref:
|
|
323
|
-
},
|
|
324
|
-
|
|
324
|
+
ref: P
|
|
325
|
+
}, ae.value), re({ _: 2 }, [
|
|
326
|
+
j(R)["nav-info"] ? {
|
|
325
327
|
name: "nav-info",
|
|
326
|
-
fn:
|
|
327
|
-
|
|
328
|
-
visibleStep:
|
|
328
|
+
fn: oe(({ currentStep: s, currentStepIndex: x, amountOfSteps: h, visibleStep: k }) => [
|
|
329
|
+
W(t.$slots, "nav-info", X(le({
|
|
330
|
+
visibleStep: k,
|
|
329
331
|
currentStep: s,
|
|
330
|
-
currentStepIndex:
|
|
331
|
-
amountOfSteps:
|
|
332
|
+
currentStepIndex: x,
|
|
333
|
+
amountOfSteps: J.value
|
|
332
334
|
})))
|
|
333
335
|
]),
|
|
334
336
|
key: "0"
|
|
335
337
|
} : void 0
|
|
336
|
-
]), 1040)) :
|
|
338
|
+
]), 1040)) : g("", !0)
|
|
337
339
|
], 2);
|
|
338
340
|
};
|
|
339
341
|
}
|
|
340
|
-
}),
|
|
342
|
+
}), qt = {
|
|
341
343
|
install: (e, a = {}) => {
|
|
342
|
-
e.component("lkt-step-process",
|
|
344
|
+
e.component("lkt-step-process", zt);
|
|
343
345
|
}
|
|
344
346
|
};
|
|
345
347
|
export {
|
|
346
|
-
|
|
348
|
+
qt as default
|
|
347
349
|
};
|
|
@@ -15977,6 +15977,14 @@ declare var __VLS_10: {
|
|
|
15977
15977
|
} | undefined;
|
|
15978
15978
|
prevHidden?: boolean | ((currentStep: StepProcessStepConfig, steps: StepProcessStepConfig[]) => boolean) | undefined;
|
|
15979
15979
|
excludedFromTotalCount?: boolean | (() => boolean) | undefined;
|
|
15980
|
+
events?: {
|
|
15981
|
+
enter: (args: {
|
|
15982
|
+
from: string;
|
|
15983
|
+
}) => void;
|
|
15984
|
+
leave: (args: {
|
|
15985
|
+
to: string;
|
|
15986
|
+
}) => void;
|
|
15987
|
+
} | undefined;
|
|
15980
15988
|
}[];
|
|
15981
15989
|
}, __VLS_25: {
|
|
15982
15990
|
visibleStep: any;
|
package/package.json
CHANGED
|
@@ -192,6 +192,8 @@
|
|
|
192
192
|
});
|
|
193
193
|
|
|
194
194
|
const onNext = (data: any) => {
|
|
195
|
+
let fromStep = currentStep.value;
|
|
196
|
+
|
|
195
197
|
let nextKey = stepsHaystack.value[currentStepIndex.value]?.nextKey;
|
|
196
198
|
let nextIndex = currentStepIndex.value + 1;
|
|
197
199
|
|
|
@@ -204,7 +206,16 @@
|
|
|
204
206
|
if (needle > -1) nextIndex = needle;
|
|
205
207
|
}
|
|
206
208
|
|
|
207
|
-
|
|
209
|
+
let toStep = stepsHaystack.value[nextIndex].key;
|
|
210
|
+
|
|
211
|
+
if (typeof currentStepConfig.value?.events?.leave === 'function') {
|
|
212
|
+
currentStepConfig.value?.events?.leave({to: toStep})
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
currentStep.value = toStep;
|
|
216
|
+
if (typeof currentStepConfig.value?.events?.enter === 'function') {
|
|
217
|
+
currentStepConfig.value?.events?.enter({from: fromStep})
|
|
218
|
+
}
|
|
208
219
|
if (currentStepIndex.value === (stepsHaystack.value.length - 1)) {
|
|
209
220
|
emit('finish', data);
|
|
210
221
|
|
|
@@ -213,6 +224,8 @@
|
|
|
213
224
|
}
|
|
214
225
|
},
|
|
215
226
|
onPrev = (data: any) => {
|
|
227
|
+
let fromStep = currentStep.value;
|
|
228
|
+
|
|
216
229
|
let prevKey = stepsHaystack.value[currentStepIndex.value]?.prevKey;
|
|
217
230
|
let nextIndex = currentStepIndex.value - 1;
|
|
218
231
|
|
|
@@ -225,7 +238,16 @@
|
|
|
225
238
|
if (needle > -1) nextIndex = needle;
|
|
226
239
|
}
|
|
227
240
|
|
|
228
|
-
|
|
241
|
+
let toStep = stepsHaystack.value[nextIndex].key;
|
|
242
|
+
|
|
243
|
+
if (typeof currentStepConfig.value?.events?.leave === 'function') {
|
|
244
|
+
currentStepConfig.value?.events?.leave({to: toStep})
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
currentStep.value = toStep;
|
|
248
|
+
if (typeof currentStepConfig.value?.events?.enter === 'function') {
|
|
249
|
+
currentStepConfig.value?.events?.enter({from: fromStep})
|
|
250
|
+
}
|
|
229
251
|
emit('prev', data);
|
|
230
252
|
},
|
|
231
253
|
canRenderStep = (stepKey:string) => {
|