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