lkt-step-process 2.0.2 → 2.0.4

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
@@ -1,4 +1,4 @@
1
- export { tt as default };
2
- declare namespace tt {
1
+ export { pt as default };
2
+ declare namespace pt {
3
3
  function install(e: any, a?: {}): void;
4
4
  }
package/dist/build.js CHANGED
@@ -1,24 +1,25 @@
1
- var O = Object.defineProperty;
2
- var q = (e, a, o) => a in e ? O(e, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[a] = o;
3
- var u = (e, a, o) => q(e, typeof a != "symbol" ? a + "" : a, o);
4
- import { defineComponent as $, mergeDefaults as G, useSlots as K, ref as g, watch as b, computed as v, onMounted as Q, resolveComponent as w, createElementBlock as L, openBlock as f, normalizeClass as W, createBlock as B, createCommentVNode as y, createElementVNode as T, normalizeProps as X, mergeProps as A, withDirectives as P, vShow as S, Fragment as Y, renderList as Z, renderSlot as J } from "vue";
1
+ var Z = Object.defineProperty;
2
+ var ee = (e, a, o) => a in e ? Z(e, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[a] = o;
3
+ var u = (e, a, o) => ee(e, typeof a != "symbol" ? a + "" : a, o);
4
+ import { defineComponent as _, useSlots as j, resolveComponent as N, createElementBlock as L, openBlock as c, withDirectives as A, createCommentVNode as b, renderSlot as P, createBlock as B, mergeProps as w, vShow as D, unref as H, mergeDefaults as te, ref as g, watch as C, computed as d, onMounted as ae, normalizeClass as re, normalizeProps as ne, createSlots as V, withCtx as F, createElementVNode as oe, Fragment as le, renderList as ie } from "vue";
5
5
  import "lkt-string-tools";
6
- var ee = ((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))(ee || {}), te = ((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))(te || {}), ae = ["lktDateProps", "lktStrictItem", "lktExcludedProps"], i, re = (i = class {
6
+ import "lkt-data-state";
7
+ var ue = ((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))(ue || {}), se = ((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))(se || {}), de = ["lktDateProps", "lktStrictItem", "lktExcludedProps"], v, ve = (v = class {
7
8
  constructor(a) {
8
9
  }
9
10
  feed(a = {}, o = this) {
10
- if (typeof a == "object") for (let [n, C] of Object.entries(a)) o.assignProp(n, C);
11
+ if (typeof a == "object") for (let [r, l] of Object.entries(a)) o.assignProp(r, l);
11
12
  }
12
13
  assignProp(a, o) {
13
- if (!(ae.includes(a) || i.lktExcludedProps.includes(a))) {
14
- if (i.lktDateProps.includes(a)) {
14
+ if (!(de.includes(a) || v.lktExcludedProps.includes(a))) {
15
+ if (v.lktDateProps.includes(a)) {
15
16
  this[a] = new Date(o);
16
17
  return;
17
18
  }
18
19
  this[a] = o;
19
20
  }
20
21
  }
21
- }, u(i, "lktAllowUndefinedProps", []), u(i, "lktExcludedProps", []), u(i, "lktDateProps", []), u(i, "lktStrictItem", !1), u(i, "lktDefaultValues", []), i), ne = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(ne || {}), le = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(le || {}), oe = ((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))(oe || {}), ue = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(ue || {}), ie = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e))(ie || {}), se = ((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))(se || {}), ce = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e))(ce || {}), de = ((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))(de || {}), ve = ((e) => (e.Ok = "ok", e.Ko = "ko", e.Info = "info", e))(ve || {}), pe = ((e) => (e.StorageUnit = "unit", e.Directory = "dir", e.Image = "img", e.Video = "vid", e.File = "file", e))(pe || {}), me = ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(me || {}), fe = ((e) => (e.NotDefined = "", e.Button = "button", e))(fe || {}), he = ((e) => (e.Start = "start", e.End = "end", e))(he || {}), ke = ((e) => (e.Create = "create", e.Update = "update", e.Read = "read", e))(ke || {}), xe = ((e) => (e.Inline = "inline", e.Modal = "modal", e))(xe || {}), ge = ((e) => (e.Top = "top", e.Bottom = "bottom", e))(ge || {}), ye = ((e) => (e.Changed = "changed", e.Always = "always", e.Never = "never", e))(ye || {}), be = ((e) => (e.Manual = "manual", e.Auto = "auto", e.Delay = "delay", e))(be || {}), Le = ((e) => (e.Toast = "toast", e.Inline = "inline", e))(Le || {}), Be = ((e) => (e.Anchor = "anchor", e.Button = "button", e.Entry = "entry", e))(Be || {}), Ce = ((e) => (e.Modal = "modal", e.Confirm = "confirm", e))(Ce || {}), we = ((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))(we || {}), Ae = ((e) => (e.None = "", e.Incremental = "incremental", e.Decremental = "decremental", e))(Ae || {}), Pe = ((e) => (e.NotDefined = "", e.Hidden = "hidden", e.Integer = "integer", e.Decimal = "decimal", e.Auto = "auto", e))(Pe || {}), I, Se = (I = class extends re {
22
+ }, u(v, "lktAllowUndefinedProps", []), u(v, "lktExcludedProps", []), u(v, "lktDateProps", []), u(v, "lktStrictItem", !1), u(v, "lktDefaultValues", []), v), ce = ((e) => (e.Auto = "auto", e.Always = "always", e.Lazy = "lazy", e.Ever = "ever", e))(ce || {}), pe = ((e) => (e.Transform = "transform", e.Height = "height", e.Display = "display", e))(pe || {}), me = ((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))(me || {}), fe = ((e) => (e.Static = "static", e.Parallax = "parallax", e))(fe || {}), ke = ((e) => (e.None = "", e.Field = "field", e.Button = "button", e.Anchor = "anchor", e.InlineDrop = "inline-drop", e.ColumnIndex = "column-index", e))(ke || {}), he = ((e) => (e.Date = "date", e.Number = "number", e.Timer = "timer", e))(he || {}), 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 || {}), xe = ((e) => (e.List = "list", e.Inline = "inline", e.Count = "count", e.Table = "table", e))(xe || {}), ye = ((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))(ye || {}), Be = ((e) => (e.Ok = "ok", e.Ko = "ko", e.Info = "info", e))(Be || {}), ge = ((e) => (e.StorageUnit = "unit", e.Directory = "dir", e.Image = "img", e.Video = "vid", e.File = "file", e))(ge || {}), Le = ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e))(Le || {}), we = ((e) => (e.NotDefined = "", e.Button = "button", e))(we || {}), Ce = ((e) => (e.Start = "start", e.End = "end", e))(Ce || {}), Pe = ((e) => (e.Create = "create", e.Update = "update", e.Read = "read", e))(Pe || {}), Se = ((e) => (e.Inline = "inline", e.Modal = "modal", e))(Se || {}), I = ((e) => (e.Top = "top", e.Bottom = "bottom", e))(I || {}), M = ((e) => (e.Changed = "changed", e.Always = "always", e.Never = "never", e))(M || {}), Ne = ((e) => (e.Manual = "manual", e.Auto = "auto", e.Delay = "delay", e))(Ne || {}), Ae = ((e) => (e.Toast = "toast", e.Inline = "inline", e))(Ae || {}), De = ((e) => (e.Current = "current", e.Modifications = "modifications", e.SplitView = "split-view", e.Differences = "differences", e))(De || {}), He = ((e) => (e.Anchor = "anchor", e.Button = "button", e.Header = "header", e.Entry = "entry", e))(He || {}), Ie = ((e) => (e.Modal = "modal", e.Confirm = "confirm", e))(Ie || {}), Me = ((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))(Me || {}), Te = ((e) => (e.None = "", e.Incremental = "incremental", e.Decremental = "decremental", e))(Te || {}), Ee = ((e) => (e.NotDefined = "", e.Hidden = "hidden", e.Integer = "integer", e.Decimal = "decimal", e.Auto = "auto", e))(Ee || {}), S, Re = (S = class extends ve {
22
23
  constructor(a = {}) {
23
24
  super();
24
25
  u(this, "modelValue", "");
@@ -27,28 +28,67 @@ var ee = ((e) => (e.Button = "button", e.Submit = "submit", e.Reset = "reset", e
27
28
  u(this, "header", {});
28
29
  u(this, "nextButton", {});
29
30
  u(this, "prevButton", {});
31
+ u(this, "buttonNavPosition", "top");
32
+ u(this, "buttonNavVisibility", "always");
30
33
  this.feed(a);
31
34
  }
32
- }, u(I, "lktDefaultValues", ["modelValue", "loading", "steps", "header"]), I), Ie = ((e) => (e.Table = "table", e.Item = "item", e.Ul = "ul", e.Ol = "ol", e.Carousel = "carousel", e.Accordion = "accordion", e))(Ie || {}), De = ((e) => (e[e.Auto = 0] = "Auto", e[e.PreferItem = 1] = "PreferItem", e[e.PreferCustomItem = 2] = "PreferCustomItem", e[e.PreferColumns = 3] = "PreferColumns", e))(De || {}), Ee = ((e) => (e.NotDefined = "", e.ActionIcon = "action-icon", e))(Ee || {}), He = ((e) => (e.Message = "message", e.Button = "button", e))(He || {}), Me = ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(Me || {}), Ne = ((e) => (e.Fixed = "fixed", e.Absolute = "absolute", e))(Ne || {}), Te = ((e) => (e.Top = "top", e.Bottom = "bottom", e.Center = "center", e.ReferrerCenter = "referrer-center", e))(Te || {}), Re = ((e) => (e.Left = "left", e.Right = "right", e.Center = "center", e.LeftCorner = "left-corner", e.RightCorner = "right-corner", e))(Re || {}), _e = ((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))(_e || {}), Ve = ((e) => (e.Grid = "grid", e.FlexRow = "flex-row", e.FlexRows = "flex-rows", e.FlexColumn = "flex-column", e))(Ve || {}), Fe = ((e) => (e.None = "", e.Focus = "focus", e.Blur = "blur", e.Always = "always", e))(Fe || {}), ze = ((e) => (e.Auto = "auto", e.Local = "local", e.Remote = "remote", e))(ze || {}), Ue = ((e) => (e.Refresh = "refresh", e.Close = "close", e.ReOpen = "reOpen", e.Exec = "exec", e.Open = "open", e))(Ue || {}), je = ((e) => (e.Asc = "asc", e.Desc = "desc", e))(je || {}), Oe = ((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))(Oe || {}), qe = ((e) => (e.Lazy = "lazy", e.Ever = "ever", e))(qe || {}), $e = ((e) => (e.Page = "page", e.Element = "element", e))($e || {}), Ge = ((e) => (e.Quick = "quick", e.Full = "full", e))(Ge || {});
33
- function Ke(e) {
35
+ }, u(S, "lktDefaultValues", ["modelValue", "loading", "steps", "header"]), S), Ve = ((e) => (e.Table = "table", e.Item = "item", e.Ul = "ul", e.Ol = "ol", e.Carousel = "carousel", e.Accordion = "accordion", e))(Ve || {}), Fe = ((e) => (e[e.Auto = 0] = "Auto", e[e.PreferItem = 1] = "PreferItem", e[e.PreferCustomItem = 2] = "PreferCustomItem", e[e.PreferColumns = 3] = "PreferColumns", e))(Fe || {}), Xe = ((e) => (e.NotDefined = "", e.ActionIcon = "action-icon", e))(Xe || {}), _e = ((e) => (e.Message = "message", e.Button = "button", e))(_e || {}), je = ((e) => (e.Left = "left", e.Center = "center", e.Right = "right", e))(je || {}), ze = ((e) => (e.Fixed = "fixed", e.Absolute = "absolute", e))(ze || {}), Oe = ((e) => (e.Top = "top", e.Bottom = "bottom", e.Center = "center", e.ReferrerCenter = "referrer-center", e))(Oe || {}), Ue = ((e) => (e.Left = "left", e.Right = "right", e.Center = "center", e.LeftCorner = "left-corner", e.RightCorner = "right-corner", e))(Ue || {}), $e = ((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))($e || {}), Ge = ((e) => (e.Grid = "grid", e.FlexRow = "flex-row", e.FlexRows = "flex-rows", e.FlexColumn = "flex-column", e))(Ge || {}), qe = ((e) => (e.Draft = "draft", e.Public = "public", e.Scheduled = "scheduled", e))(qe || {}), Ke = ((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))(Ke || {}), Qe = ((e) => (e.None = "", e.Focus = "focus", e.Blur = "blur", e.Always = "always", e))(Qe || {}), Je = ((e) => (e.Message = "message", e.Inline = "inline", e))(Je || {}), We = ((e) => (e.Auto = "auto", e.Local = "local", e.Remote = "remote", e))(We || {}), Ye = ((e) => (e.Refresh = "refresh", e.Close = "close", e.ReOpen = "reOpen", e.Exec = "exec", e.Open = "open", e))(Ye || {}), Ze = ((e) => (e.Asc = "asc", e.Desc = "desc", e))(Ze || {}), et = ((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))(et || {}), tt = ((e) => (e.Lazy = "lazy", e.Ever = "ever", e))(tt || {}), at = ((e) => (e.Page = "page", e.Element = "element", e))(at || {}), rt = ((e) => (e.Quick = "quick", e.Full = "full", e))(rt || {});
36
+ function nt(e) {
34
37
  let a = new e(), o = {};
35
38
  if (!Array.isArray(e.lktDefaultValues)) throw new Error("lktDefaultValues must be a keys array.");
36
- for (let n of e.lktDefaultValues) n in a && (o[n] = a[n]);
39
+ for (let r of e.lktDefaultValues) r in a && (o[r] = a[r]);
37
40
  return o;
38
41
  }
39
- const Qe = { class: "lkt-step-process-buttons" }, We = {
40
- key: 1,
42
+ const ot = { class: "lkt-step-process-buttons" }, X = /* @__PURE__ */ _({
43
+ __name: "ButtonNav",
44
+ props: {
45
+ prevButton: { type: [Object, Boolean] },
46
+ nextButton: { type: [Object, Boolean] },
47
+ isLoading: { type: Boolean },
48
+ prevHidden: { type: Boolean },
49
+ nextHidden: { type: Boolean }
50
+ },
51
+ emits: ["prev", "next"],
52
+ setup(e, { emit: a }) {
53
+ const o = a, r = j();
54
+ return (l, p) => {
55
+ const m = N("lkt-button");
56
+ return c(), L("div", ot, [
57
+ l.prevButton ? A((c(), B(m, w({
58
+ key: 0,
59
+ ref: "prevButtonRef"
60
+ }, l.prevButton, {
61
+ onClick: p[0] || (p[0] = (s) => o("prev"))
62
+ }), null, 16)), [
63
+ [D, !l.isLoading && !l.prevHidden]
64
+ ]) : b("", !0),
65
+ H(r)["between-buttons-ever"] ? P(l.$slots, "between-buttons-ever", { key: 1 }) : b("", !0),
66
+ l.nextButton ? A((c(), B(m, w({
67
+ key: 2,
68
+ ref: "nextButtonRef"
69
+ }, l.nextButton, {
70
+ onClick: p[1] || (p[1] = (s) => o("next"))
71
+ }), null, 16)), [
72
+ [D, !l.isLoading && !l.nextHidden]
73
+ ]) : b("", !0)
74
+ ]);
75
+ };
76
+ }
77
+ }), lt = {
78
+ key: 2,
41
79
  class: "lkt-step-process_content"
42
- }, Xe = { class: "lkt-grid-1" }, Ye = /* @__PURE__ */ $({
80
+ }, it = { class: "lkt-grid-1" }, ut = /* @__PURE__ */ _({
43
81
  __name: "LktStepProcess",
44
- props: /* @__PURE__ */ G({
82
+ props: /* @__PURE__ */ te({
45
83
  modelValue: {},
46
84
  loading: { type: Boolean },
47
85
  steps: {},
48
86
  header: {},
49
87
  nextButton: {},
50
- prevButton: {}
51
- }, Ke(Se)),
88
+ prevButton: {},
89
+ buttonNavPosition: {},
90
+ buttonNavVisibility: {}
91
+ }, nt(Re)),
52
92
  emits: [
53
93
  "next",
54
94
  "prev",
@@ -57,95 +97,109 @@ const Qe = { class: "lkt-step-process-buttons" }, We = {
57
97
  "update:loading"
58
98
  ],
59
99
  setup(e, { expose: a, emit: o }) {
60
- const n = e, C = K(), x = o, p = g(n.loading), s = g(n.modelValue), c = g(n.steps), D = g(null), E = g(null);
61
- b(() => n.loading, (t) => p.value = t), b(() => n.modelValue, (t) => s.value = t), b(p, (t) => x("update:loading", t)), b(s, (t) => x("update:modelValue", t));
62
- const R = v(() => {
100
+ const r = e, l = j(), p = o, m = g(r.loading), s = g(r.modelValue), f = g(r.steps), z = g(null), O = g(null);
101
+ C(() => r.loading, (t) => m.value = t), C(() => r.modelValue, (t) => s.value = t), C(m, (t) => p("update:loading", t)), C(s, (t) => p("update:modelValue", t));
102
+ const U = d(() => {
63
103
  let t = [];
64
- for (let l in C) l.indexOf("step-") !== -1 && t.push(l.substring(5));
104
+ for (let i in l) i.indexOf("step-") !== -1 && t.push(i.substring(5));
65
105
  return t;
66
- }), k = v(() => c.value.findIndex((t) => t.key === s.value)), r = v(() => c.value[k.value]), _ = v(() => k.value === 0), H = v(() => {
67
- var l, d, m, h;
68
- if (((l = r.value) == null ? void 0 : l.prevButton) === !1 || n.prevButton === !1 && !((d = r.value) != null && d.prevButton))
106
+ }), y = d(() => f.value.findIndex((t) => t.key === s.value)), n = d(() => f.value[y.value]), $ = d(() => y.value === 0), G = d(() => {
107
+ var i, k, x, h;
108
+ if (((i = n.value) == null ? void 0 : i.prevButton) === !1 || r.prevButton === !1 && !((k = n.value) != null && k.prevButton))
69
109
  return !1;
70
- let t = { ...n.prevButton };
71
- return typeof ((m = r.value) == null ? void 0 : m.prevButton) == "object" && (t = { ...t, ...(h = r.value) == null ? void 0 : h.prevButton }), typeof t.disabled > "u" && (t.disabled = _.value), t;
72
- }), M = v(() => {
73
- var l, d, m, h;
74
- if (((l = r.value) == null ? void 0 : l.nextButton) === !1 || n.nextButton === !1 && !((d = r.value) != null && d.nextButton))
110
+ let t = { ...r.prevButton };
111
+ return typeof ((x = n.value) == null ? void 0 : x.prevButton) == "object" && (t = { ...t, ...(h = n.value) == null ? void 0 : h.prevButton }), typeof t.disabled > "u" && (t.disabled = $.value), t;
112
+ }), q = d(() => {
113
+ var i, k, x, h;
114
+ if (((i = n.value) == null ? void 0 : i.nextButton) === !1 || r.nextButton === !1 && !((k = n.value) != null && k.nextButton))
75
115
  return !1;
76
- let t = { ...n.nextButton };
77
- return typeof ((m = r.value) == null ? void 0 : m.nextButton) == "object" && (t = { ...t, ...(h = r.value) == null ? void 0 : h.nextButton }), t;
78
- }), V = v(() => {
79
- var t, l;
80
- if (typeof r.value == "object") {
81
- if (typeof ((t = r.value) == null ? void 0 : t.prevHidden) == "function")
82
- return r.value.prevHidden(r.value, c.value);
83
- if (typeof ((l = r.value) == null ? void 0 : l.prevHidden) == "boolean")
84
- return r.value.prevHidden;
116
+ let t = { ...r.nextButton };
117
+ return typeof ((x = n.value) == null ? void 0 : x.nextButton) == "object" && (t = { ...t, ...(h = n.value) == null ? void 0 : h.nextButton }), t;
118
+ }), K = d(() => {
119
+ var t, i;
120
+ if (typeof n.value == "object") {
121
+ if (typeof ((t = n.value) == null ? void 0 : t.prevHidden) == "function")
122
+ return n.value.prevHidden(n.value, f.value);
123
+ if (typeof ((i = n.value) == null ? void 0 : i.prevHidden) == "boolean")
124
+ return n.value.prevHidden;
85
125
  }
86
- return k.value === 0;
87
- }), F = v(() => {
88
- var t, l, d;
89
- return typeof r.value == "object" ? typeof ((t = r.value) == null ? void 0 : t.nextHidden) == "function" ? r.value.nextHidden(r.value, c.value) : typeof ((l = r.value) == null ? void 0 : l.nextHidden) == "boolean" ? r.value.nextHidden : ((d = r.value) == null ? void 0 : d.nextButton) === !1 : !0;
90
- }), z = v(() => {
126
+ return y.value === 0;
127
+ }), Q = d(() => {
128
+ var t, i, k;
129
+ return typeof n.value == "object" ? typeof ((t = n.value) == null ? void 0 : t.nextHidden) == "function" ? n.value.nextHidden(n.value, f.value) : typeof ((i = n.value) == null ? void 0 : i.nextHidden) == "boolean" ? n.value.nextHidden : ((k = n.value) == null ? void 0 : k.nextButton) === !1 : !0;
130
+ }), J = d(() => {
91
131
  const t = [];
92
132
  return s.value && t.push(`step-${s.value}`), t.join(" ");
93
- }), U = (t) => {
94
- s.value = c.value[k.value + 1].key, k.value === c.value.length - 1 ? x("finish", t) : x("next", t);
95
- }, j = (t) => {
96
- s.value = c.value[k.value - 1].key, x("prev", t);
133
+ }), W = d(() => r.buttonNavVisibility === M.Never ? !1 : !r.buttonNavPosition || r.buttonNavPosition === I.Top), Y = d(() => r.buttonNavVisibility === M.Never ? !1 : r.buttonNavPosition === I.Bottom), T = d(() => ({
134
+ isLoading: m.value,
135
+ prevHidden: K.value,
136
+ nextHidden: Q.value,
137
+ prevButton: G.value,
138
+ nextButton: q.value
139
+ })), E = (t) => {
140
+ s.value = f.value[y.value + 1].key, y.value === f.value.length - 1 ? p("finish", t) : p("next", t);
141
+ }, R = (t) => {
142
+ s.value = f.value[y.value - 1].key, p("prev", t);
97
143
  };
98
144
  return a({
99
145
  goNext: () => {
100
- E.value.click();
146
+ O.value.click();
101
147
  },
102
148
  goPrev: () => {
103
- D.value.click();
149
+ z.value.click();
104
150
  },
105
- startLoader: () => p.value = !0,
106
- stopLoader: () => p.value = !1
107
- }), Q(() => {
108
- !s.value && c.value.length > 0 && (s.value = c.value[0].key);
109
- }), (t, l) => {
110
- const d = w("lkt-header"), m = w("lkt-button"), h = w("lkt-loader");
111
- return f(), L("article", {
112
- class: W(["lkt-step-process", z.value])
151
+ startLoader: () => m.value = !0,
152
+ stopLoader: () => m.value = !1
153
+ }), ae(() => {
154
+ !s.value && f.value.length > 0 && (s.value = f.value[0].key);
155
+ }), (t, i) => {
156
+ const k = N("lkt-header"), x = N("lkt-loader");
157
+ return c(), L("article", {
158
+ class: re(["lkt-step-process", J.value])
113
159
  }, [
114
- t.header && Object.keys(t.header).length > 0 ? (f(), B(d, X(A({ key: 0 }, t.header)), null, 16)) : y("", !0),
115
- T("div", Qe, [
116
- H.value ? P((f(), B(m, A({
117
- key: 0,
118
- ref_key: "prevButtonRef",
119
- ref: D
120
- }, H.value, { onClick: j }), null, 16)), [
121
- [S, !p.value && !V.value]
122
- ]) : y("", !0),
123
- M.value ? P((f(), B(m, A({
124
- key: 1,
125
- ref_key: "nextButtonRef",
126
- ref: E
127
- }, M.value, { onClick: U }), null, 16)), [
128
- [S, !p.value && !F.value]
129
- ]) : y("", !0)
130
- ]),
131
- p.value ? y("", !0) : (f(), L("div", We, [
132
- T("div", Xe, [
133
- (f(!0), L(Y, null, Z(R.value, (N) => P((f(), L("div", null, [
134
- J(t.$slots, "step-" + N, { config: c.value })
160
+ t.header && Object.keys(t.header).length > 0 ? (c(), B(k, ne(w({ key: 0 }, t.header)), null, 16)) : b("", !0),
161
+ W.value ? (c(), B(X, w({ key: 1 }, T.value, {
162
+ onPrev: R,
163
+ onNext: E
164
+ }), V({ _: 2 }, [
165
+ H(l)["between-buttons-ever"] ? {
166
+ name: "between-buttons-ever",
167
+ fn: F(({}) => [
168
+ P(t.$slots, "between-buttons-ever")
169
+ ]),
170
+ key: "0"
171
+ } : void 0
172
+ ]), 1040)) : b("", !0),
173
+ m.value ? b("", !0) : (c(), L("div", lt, [
174
+ oe("div", it, [
175
+ (c(!0), L(le, null, ie(U.value, (h) => A((c(), L("div", null, [
176
+ P(t.$slots, "step-" + h, { config: f.value })
135
177
  ], 512)), [
136
- [S, N === s.value]
178
+ [D, h === s.value]
137
179
  ])), 256))
138
180
  ])
139
181
  ])),
140
- p.value ? (f(), B(h, { key: 2 })) : y("", !0)
182
+ m.value ? (c(), B(x, { key: 3 })) : b("", !0),
183
+ Y.value ? (c(), B(X, w({ key: 4 }, T.value, {
184
+ onPrev: R,
185
+ onNext: E
186
+ }), V({ _: 2 }, [
187
+ H(l)["between-buttons-ever"] ? {
188
+ name: "between-buttons-ever",
189
+ fn: F(({}) => [
190
+ P(t.$slots, "between-buttons-ever")
191
+ ]),
192
+ key: "0"
193
+ } : void 0
194
+ ]), 1040)) : b("", !0)
141
195
  ], 2);
142
196
  };
143
197
  }
144
- }), tt = {
198
+ }), pt = {
145
199
  install: (e, a = {}) => {
146
- e.component("lkt-step-process", Ye);
200
+ e.component("lkt-step-process", ut);
147
201
  }
148
202
  };
149
203
  export {
150
- tt as default
204
+ pt as default
151
205
  };
@@ -0,0 +1,19 @@
1
+ import { ButtonNavProps } from '../config/ButtonNavProps';
2
+ declare var __VLS_11: {};
3
+ type __VLS_Slots = {} & {
4
+ 'between-buttons-ever'?: (props: typeof __VLS_11) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<ButtonNavProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ next: (...args: any[]) => void;
8
+ prev: (...args: any[]) => void;
9
+ }, string, import("vue").PublicProps, Readonly<ButtonNavProps> & Readonly<{
10
+ onNext?: ((...args: any[]) => any) | undefined;
11
+ onPrev?: ((...args: any[]) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,8 @@
1
+ import { ButtonConfig } from 'lkt-vue-kernel';
2
+ export interface ButtonNavProps {
3
+ prevButton: ButtonConfig | false;
4
+ nextButton: ButtonConfig | false;
5
+ isLoading: boolean;
6
+ prevHidden: boolean;
7
+ nextHidden: boolean;
8
+ }