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