lkt-step-process 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.d.ts +3 -3
- package/dist/build.js +38 -37
- package/dist/lib-components/LktStepProcess.vue.d.ts +129 -21
- package/dist/types/Step.d.ts +1 -1
- package/dist/types/StepProcess.d.ts +1 -1
- package/package.json +20 -21
- package/src/lib-components/LktStepProcess.vue +10 -12
- /package/dist/{style.css → build.css} +0 -0
package/dist/build.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
declare namespace
|
|
3
|
-
function install(v: any,
|
|
1
|
+
export { ie as default };
|
|
2
|
+
declare namespace ie {
|
|
3
|
+
function install(v: any, h?: {}): void;
|
|
4
4
|
}
|
package/dist/build.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as K, useSlots as M, ref as c, computed as
|
|
1
|
+
import { defineComponent as K, useSlots as M, ref as c, computed as n, resolveComponent as S, createElementBlock as o, openBlock as u, normalizeClass as Q, createCommentVNode as y, createElementVNode as f, createBlock as U, toDisplayString as W, renderSlot as m, withDirectives as _, createVNode as H, withCtx as N, unref as B, vShow as g, Fragment as X, renderList as Y } from "vue";
|
|
2
2
|
const Z = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "lkt-step-process_header"
|
|
5
|
-
}, ee = { class: "lkt-step-process_header-title" }, te = { class: "lkt-step-process_header-slot" }, re = { class: "lkt-step-process-buttons" },
|
|
5
|
+
}, ee = { class: "lkt-step-process_header-title" }, te = { class: "lkt-step-process_header-slot" }, re = { class: "lkt-step-process-buttons" }, ne = { key: 1 }, le = { key: 1 }, ae = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "lkt-step-process_content"
|
|
8
|
-
}, ue = { class: "lkt-grid-1" }, oe =
|
|
9
|
-
|
|
8
|
+
}, ue = { class: "lkt-grid-1" }, oe = /* @__PURE__ */ K({
|
|
9
|
+
__name: "LktStepProcess",
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: { type: Object, required: !1, default: () => ({ step: 1, steps: [], data: {} }) },
|
|
12
12
|
title: { type: String, default: "" },
|
|
@@ -15,100 +15,101 @@ const Z = {
|
|
|
15
15
|
nextValidator: { type: Function, required: !1, default: () => !0 },
|
|
16
16
|
prevValidator: { type: Function, required: !1, default: () => !0 }
|
|
17
17
|
},
|
|
18
|
-
emits: [
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
emits: [
|
|
19
|
+
"next",
|
|
20
|
+
"prev",
|
|
21
|
+
"finish"
|
|
22
|
+
],
|
|
23
|
+
setup(v, { expose: h, emit: D }) {
|
|
24
|
+
const s = v, p = M(), x = D, l = c(!1), e = c(s.modelValue), V = c(null), b = c(null), L = n(() => l.value ? !1 : s.title || !!p["post-title"]), R = n(() => {
|
|
21
25
|
let r = [];
|
|
22
|
-
for (let k in p)
|
|
23
|
-
k.indexOf("step-") !== -1 && r.push(k.substring(5));
|
|
26
|
+
for (let k in p) k.indexOf("step-") !== -1 && r.push(k.substring(5));
|
|
24
27
|
return r;
|
|
25
|
-
}), d =
|
|
28
|
+
}), d = n(() => e.value.step ? e.value.step : !e.value.steps || !e.value.steps[0] ? null : e.value.steps[0].name), a = n(() => e.value.steps.findIndex((r) => r.name === d.value)), t = n(() => e.value.steps[a.value]), $ = n(() => typeof t.value.prevValidator == "function" ? t.value.prevValidator(e.value) : typeof t.value.prevValidator == "boolean" ? t.value.prevValidator : typeof s.prevValidator == "function" ? s.prevValidator(e.value) : !0), P = n(() => typeof t.value.nextValidator == "function" ? t.value.nextValidator(e.value) : typeof t.value.nextValidator == "boolean" ? t.value.nextValidator : typeof s.nextValidator == "function" ? s.nextValidator(e.value) : !0), j = n(() => a.value === 0 || !$.value), q = n(() => a.value === e.value.steps.length - 1 || !P.value), w = n(() => typeof t.value.prevHidden == "function" ? t.value.prevHidden(e.value) : typeof t.value.prevHidden == "boolean" ? t.value.prevHidden : a.value === 0), F = n(() => typeof t.value.nextHidden == "function" ? t.value.nextHidden(e.value) : typeof t.value.nextHidden == "boolean" ? t.value.nextHidden : a.value === e.value.steps.length - 1), E = n(() => typeof t.value.prevConfirm == "string" ? t.value.prevConfirm : ""), I = n(() => typeof t.value.nextConfirm == "string" ? t.value.nextConfirm : ""), O = n(() => typeof t.value.nextResource == "string" ? t.value.nextResource : ""), T = n(() => typeof t.value.nextResourceData == "object" ? t.value.nextResourceData : {}), z = n(() => {
|
|
26
29
|
const r = ["lkt-step-process"];
|
|
27
30
|
return d.value && r.push(`step-${d.value}`), r.join(" ");
|
|
28
31
|
}), A = (r) => {
|
|
29
|
-
e.value.step = e.value.steps[a.value + 1].name, a.value === e.value.steps.length - 1 ? x("finish", r) : x("next", r);
|
|
32
|
+
console.log("onNext: ", r), e.value.step = e.value.steps[a.value + 1].name, a.value === e.value.steps.length - 1 ? x("finish", r) : x("next", r);
|
|
30
33
|
}, G = (r) => {
|
|
31
34
|
e.value.step = e.value.steps[a.value - 1].name, x("prev", r);
|
|
32
35
|
};
|
|
33
|
-
return
|
|
36
|
+
return h({
|
|
34
37
|
goNext: () => {
|
|
35
38
|
b.value.click();
|
|
36
39
|
},
|
|
37
40
|
goPrev: () => {
|
|
38
41
|
V.value.click();
|
|
39
42
|
},
|
|
40
|
-
startLoader: () =>
|
|
41
|
-
stopLoader: () =>
|
|
43
|
+
startLoader: () => l.value = !0,
|
|
44
|
+
stopLoader: () => l.value = !1
|
|
42
45
|
}), (r, k) => {
|
|
43
46
|
const C = S("lkt-button"), J = S("lkt-loader");
|
|
44
47
|
return u(), o("article", {
|
|
45
48
|
class: Q(z.value)
|
|
46
49
|
}, [
|
|
47
50
|
L.value ? (u(), o("header", Z, [
|
|
48
|
-
f("h1", ee,
|
|
51
|
+
f("h1", ee, W(v.title), 1),
|
|
49
52
|
f("div", te, [
|
|
50
53
|
m(r.$slots, "post-title", {
|
|
51
54
|
config: e.value,
|
|
52
|
-
loading:
|
|
55
|
+
loading: l.value
|
|
53
56
|
})
|
|
54
57
|
])
|
|
55
|
-
])) :
|
|
58
|
+
])) : y("", !0),
|
|
56
59
|
f("div", re, [
|
|
57
|
-
|
|
60
|
+
_(H(C, {
|
|
58
61
|
ref: (i) => V.value = i,
|
|
59
|
-
palette: "danger",
|
|
60
62
|
disabled: j.value,
|
|
61
63
|
"confirm-modal": E.value,
|
|
62
64
|
onClick: G
|
|
63
65
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
+
default: N(() => [
|
|
67
|
+
B(p)["button-prev"] ? m(r.$slots, "button-prev", {
|
|
66
68
|
key: 0,
|
|
67
69
|
config: e.value
|
|
68
|
-
}) : (u(), o("span",
|
|
70
|
+
}) : (u(), o("span", ne, "Back"))
|
|
69
71
|
]),
|
|
70
72
|
_: 3
|
|
71
73
|
}, 8, ["disabled", "confirm-modal"]), [
|
|
72
|
-
[
|
|
74
|
+
[g, !l.value && !w.value]
|
|
73
75
|
]),
|
|
74
|
-
|
|
76
|
+
_(H(C, {
|
|
75
77
|
ref: (i) => b.value = i,
|
|
76
|
-
palette: "success",
|
|
77
78
|
disabled: q.value,
|
|
78
79
|
"confirm-modal": I.value,
|
|
79
80
|
resource: O.value,
|
|
80
81
|
"resource-data": T.value,
|
|
81
82
|
onClick: A
|
|
82
83
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
84
|
+
default: N(() => [
|
|
85
|
+
B(p)["button-next"] ? m(r.$slots, "button-next", {
|
|
85
86
|
key: 0,
|
|
86
87
|
config: e.value
|
|
87
|
-
}) : (u(), o("span",
|
|
88
|
+
}) : (u(), o("span", le, "Next"))
|
|
88
89
|
]),
|
|
89
90
|
_: 3
|
|
90
91
|
}, 8, ["disabled", "confirm-modal", "resource", "resource-data"]), [
|
|
91
|
-
[
|
|
92
|
+
[g, !l.value && !F.value]
|
|
92
93
|
])
|
|
93
94
|
]),
|
|
94
|
-
|
|
95
|
+
l.value ? y("", !0) : (u(), o("div", ae, [
|
|
95
96
|
f("div", ue, [
|
|
96
|
-
(u(!0), o(
|
|
97
|
+
(u(!0), o(X, null, Y(R.value, (i) => _((u(), o("div", null, [
|
|
97
98
|
m(r.$slots, "step-" + i, { config: e.value })
|
|
98
99
|
], 512)), [
|
|
99
|
-
[
|
|
100
|
+
[g, i === d.value]
|
|
100
101
|
])), 256))
|
|
101
102
|
])
|
|
102
103
|
])),
|
|
103
|
-
|
|
104
|
+
l.value ? (u(), U(J, { key: 2 })) : y("", !0)
|
|
104
105
|
], 2);
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
|
-
}),
|
|
108
|
-
install: (v,
|
|
109
|
-
v.component("lkt-step-process",
|
|
108
|
+
}), ie = {
|
|
109
|
+
install: (v, h = {}) => {
|
|
110
|
+
v.component("lkt-step-process", oe);
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
+
ie as default
|
|
114
115
|
};
|
|
@@ -1,5 +1,125 @@
|
|
|
1
1
|
import { StepProcess } from "../types/StepProcess";
|
|
2
|
-
declare const
|
|
2
|
+
declare const slots: Readonly<{
|
|
3
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
declare const isLoading: import("vue").Ref<boolean, boolean>, config: import("vue").Ref<Record<string, any>, Record<string, any>>, prevButton: import("vue").Ref<null, null>, nextButton: import("vue").Ref<null, null>;
|
|
6
|
+
declare const displayHeader: import("vue").ComputedRef<string | boolean>;
|
|
7
|
+
declare const slotsSteps: import("vue").ComputedRef<string[]>;
|
|
8
|
+
declare const currentStep: import("vue").ComputedRef<any>, prevDisabled: import("vue").ComputedRef<boolean>, nextDisabled: import("vue").ComputedRef<boolean>, prevHidden: import("vue").ComputedRef<any>, nextHidden: import("vue").ComputedRef<any>, prevConfirm: import("vue").ComputedRef<any>, nextConfirm: import("vue").ComputedRef<any>, nextResource: import("vue").ComputedRef<any>, nextResourceData: import("vue").ComputedRef<any>, classes: import("vue").ComputedRef<string>;
|
|
9
|
+
declare const onNext: (data: any) => void, onPrev: (data: any) => void;
|
|
10
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
11
|
+
declare var __VLS_1: {
|
|
12
|
+
config: Record<string, any>;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
}, __VLS_10: {
|
|
15
|
+
config: Record<string, any>;
|
|
16
|
+
}, __VLS_19: {
|
|
17
|
+
config: Record<string, any>;
|
|
18
|
+
}, __VLS_22: string, __VLS_23: {
|
|
19
|
+
config: Record<string, any>;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
22
|
+
[K in NonNullable<typeof __VLS_22>]?: (props: typeof __VLS_23) => any;
|
|
23
|
+
} & {
|
|
24
|
+
'post-title'?: (props: typeof __VLS_1) => any;
|
|
25
|
+
} & {
|
|
26
|
+
'button-prev'?: (props: typeof __VLS_10) => any;
|
|
27
|
+
} & {
|
|
28
|
+
'button-next'?: (props: typeof __VLS_19) => any;
|
|
29
|
+
}>;
|
|
30
|
+
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
31
|
+
modelValue: {
|
|
32
|
+
type: ObjectConstructor;
|
|
33
|
+
required: false;
|
|
34
|
+
default: () => StepProcess;
|
|
35
|
+
};
|
|
36
|
+
title: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
nextText: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
prevText: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
nextValidator: {
|
|
49
|
+
type: FunctionConstructor;
|
|
50
|
+
required: false;
|
|
51
|
+
default: () => boolean;
|
|
52
|
+
};
|
|
53
|
+
prevValidator: {
|
|
54
|
+
type: FunctionConstructor;
|
|
55
|
+
required: false;
|
|
56
|
+
default: () => boolean;
|
|
57
|
+
};
|
|
58
|
+
}>, {
|
|
59
|
+
slots: typeof slots;
|
|
60
|
+
isLoading: typeof isLoading;
|
|
61
|
+
config: typeof config;
|
|
62
|
+
prevButton: typeof prevButton;
|
|
63
|
+
nextButton: typeof nextButton;
|
|
64
|
+
displayHeader: typeof displayHeader;
|
|
65
|
+
slotsSteps: typeof slotsSteps;
|
|
66
|
+
currentStep: typeof currentStep;
|
|
67
|
+
prevDisabled: typeof prevDisabled;
|
|
68
|
+
nextDisabled: typeof nextDisabled;
|
|
69
|
+
prevHidden: typeof prevHidden;
|
|
70
|
+
nextHidden: typeof nextHidden;
|
|
71
|
+
prevConfirm: typeof prevConfirm;
|
|
72
|
+
nextConfirm: typeof nextConfirm;
|
|
73
|
+
nextResource: typeof nextResource;
|
|
74
|
+
nextResourceData: typeof nextResourceData;
|
|
75
|
+
classes: typeof classes;
|
|
76
|
+
onNext: typeof onNext;
|
|
77
|
+
onPrev: typeof onPrev;
|
|
78
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
79
|
+
finish: (...args: any[]) => void;
|
|
80
|
+
next: (...args: any[]) => void;
|
|
81
|
+
prev: (...args: any[]) => void;
|
|
82
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
83
|
+
modelValue: {
|
|
84
|
+
type: ObjectConstructor;
|
|
85
|
+
required: false;
|
|
86
|
+
default: () => StepProcess;
|
|
87
|
+
};
|
|
88
|
+
title: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
nextText: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
prevText: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
nextValidator: {
|
|
101
|
+
type: FunctionConstructor;
|
|
102
|
+
required: false;
|
|
103
|
+
default: () => boolean;
|
|
104
|
+
};
|
|
105
|
+
prevValidator: {
|
|
106
|
+
type: FunctionConstructor;
|
|
107
|
+
required: false;
|
|
108
|
+
default: () => boolean;
|
|
109
|
+
};
|
|
110
|
+
}>> & Readonly<{
|
|
111
|
+
onFinish?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
}>, {
|
|
115
|
+
title: string;
|
|
116
|
+
modelValue: Record<string, any>;
|
|
117
|
+
nextText: string;
|
|
118
|
+
prevText: string;
|
|
119
|
+
nextValidator: Function;
|
|
120
|
+
prevValidator: Function;
|
|
121
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
122
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
123
|
modelValue: {
|
|
4
124
|
type: ObjectConstructor;
|
|
5
125
|
required: false;
|
|
@@ -27,12 +147,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
27
147
|
required: false;
|
|
28
148
|
default: () => boolean;
|
|
29
149
|
};
|
|
30
|
-
}
|
|
150
|
+
}>, {
|
|
31
151
|
goNext: () => void;
|
|
32
152
|
goPrev: () => void;
|
|
33
153
|
startLoader: () => boolean;
|
|
34
154
|
stopLoader: () => boolean;
|
|
35
|
-
},
|
|
155
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
156
|
finish: (...args: any[]) => void;
|
|
37
157
|
next: (...args: any[]) => void;
|
|
38
158
|
prev: (...args: any[]) => void;
|
|
@@ -64,33 +184,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
64
184
|
required: false;
|
|
65
185
|
default: () => boolean;
|
|
66
186
|
};
|
|
67
|
-
}>> & {
|
|
68
|
-
onNext?: ((...args: any[]) => any) | undefined;
|
|
187
|
+
}>> & Readonly<{
|
|
69
188
|
onFinish?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
70
190
|
onPrev?: ((...args: any[]) => any) | undefined;
|
|
71
|
-
}
|
|
191
|
+
}>, {
|
|
72
192
|
title: string;
|
|
73
193
|
modelValue: Record<string, any>;
|
|
74
194
|
nextText: string;
|
|
75
195
|
prevText: string;
|
|
76
196
|
nextValidator: Function;
|
|
77
197
|
prevValidator: Function;
|
|
78
|
-
}, {}
|
|
79
|
-
|
|
80
|
-
}) => any>> & {
|
|
81
|
-
"post-title"?(_: {
|
|
82
|
-
config: Record<string, any>;
|
|
83
|
-
loading: boolean;
|
|
84
|
-
}): any;
|
|
85
|
-
"button-prev"?(_: {
|
|
86
|
-
config: Record<string, any>;
|
|
87
|
-
}): any;
|
|
88
|
-
"button-next"?(_: {
|
|
89
|
-
config: Record<string, any>;
|
|
90
|
-
}): any;
|
|
91
|
-
}>;
|
|
198
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
199
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
92
200
|
export default _default;
|
|
93
|
-
type
|
|
201
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
94
202
|
new (): {
|
|
95
203
|
$slots: S;
|
|
96
204
|
};
|
package/dist/types/Step.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lkt-step-process",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/build.js",
|
|
@@ -8,40 +8,39 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"import": "./dist/build.js"
|
|
10
10
|
},
|
|
11
|
-
"./styles": "./dist/
|
|
11
|
+
"./styles": "./dist/build.css"
|
|
12
12
|
},
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"files": ["dist/*", "src/**/*.vue"],
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "
|
|
18
|
+
"build": "vue-tsc --declaration --emitDeclarationOnly; vite build; tsc --project tsconfig.build.json; cp build/* dist/",
|
|
19
|
+
"rebuild": "rm -rf dist/*; vue-tsc --declaration --emitDeclarationOnly; vite build; tsc --project tsconfig.build.json; cp build/* dist/"
|
|
19
20
|
},
|
|
20
21
|
"author": "Antonio Ibáñez",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=18"
|
|
24
|
+
},
|
|
21
25
|
"devDependencies": {
|
|
22
26
|
"@babel/types": "^7.23.6",
|
|
23
27
|
"@types/node": "^20.11.19",
|
|
24
28
|
"@types/rollup": "^0.54.0",
|
|
25
|
-
"@vitejs/plugin-vue": "^5.
|
|
26
|
-
"rollup": "^4.
|
|
27
|
-
"typescript": "^5.
|
|
28
|
-
"vite": "^
|
|
29
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
30
|
+
"rollup": "^4.34.8",
|
|
31
|
+
"typescript": "^5.7.3",
|
|
32
|
+
"vite": "^6.1.1",
|
|
29
33
|
"vue": "^3.3.0",
|
|
30
|
-
"vue-tsc": "^
|
|
31
|
-
},
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18"
|
|
34
|
+
"vue-tsc": "^2.2.0"
|
|
34
35
|
},
|
|
35
|
-
"
|
|
36
|
-
"lkt-button": "^
|
|
37
|
-
"lkt-data-state": "^1.0.
|
|
38
|
-
"lkt-
|
|
39
|
-
"lkt-
|
|
40
|
-
"lkt-
|
|
41
|
-
"lkt-
|
|
42
|
-
"lkt-
|
|
43
|
-
"lkt-string-tools": "^1.0.2",
|
|
44
|
-
"lkt-ts-interfaces": "^1.0.2",
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"lkt-button": "^2.0.7",
|
|
38
|
+
"lkt-data-state": "^1.0.11",
|
|
39
|
+
"lkt-http-client": "^1.0.34",
|
|
40
|
+
"lkt-http-info": "^1.1.1",
|
|
41
|
+
"lkt-loader": "^1.2.0",
|
|
42
|
+
"lkt-string-tools": "^1.0.8",
|
|
43
|
+
"lkt-vue-kernel": "^1.0.33",
|
|
45
44
|
"path": "^0.12.7",
|
|
46
45
|
"vue": "^3.3.0"
|
|
47
46
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export default {name: "LktStepProcess", inheritAttrs: false}
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
1
|
<script setup lang="ts">
|
|
6
2
|
import {ref, useSlots, computed} from "vue";
|
|
7
3
|
import {StepProcess} from "../types/StepProcess";
|
|
@@ -20,7 +16,11 @@ const props = defineProps({
|
|
|
20
16
|
|
|
21
17
|
const slots = useSlots();
|
|
22
18
|
|
|
23
|
-
const emit = defineEmits([
|
|
19
|
+
const emit = defineEmits([
|
|
20
|
+
'next',
|
|
21
|
+
'prev',
|
|
22
|
+
'finish'
|
|
23
|
+
]);
|
|
24
24
|
|
|
25
25
|
const isLoading = ref(false),
|
|
26
26
|
config = ref(props.modelValue),
|
|
@@ -169,31 +169,29 @@ defineExpose({
|
|
|
169
169
|
<header class="lkt-step-process_header" v-if="displayHeader">
|
|
170
170
|
<h1 class="lkt-step-process_header-title">{{ title }}</h1>
|
|
171
171
|
<div class="lkt-step-process_header-slot">
|
|
172
|
-
<slot name="post-title" v-bind:config="config" v-bind:loading="isLoading"
|
|
172
|
+
<slot name="post-title" v-bind:config="config" v-bind:loading="isLoading"/>
|
|
173
173
|
</div>
|
|
174
174
|
</header>
|
|
175
175
|
<div class="lkt-step-process-buttons">
|
|
176
176
|
<lkt-button
|
|
177
177
|
:ref="(el:any) => prevButton = el"
|
|
178
178
|
v-show="!isLoading && !prevHidden"
|
|
179
|
-
palette="danger"
|
|
180
179
|
v-bind:disabled="prevDisabled"
|
|
181
180
|
v-bind:confirm-modal="prevConfirm"
|
|
182
181
|
v-on:click="onPrev">
|
|
183
|
-
<slot v-if="!!slots['button-prev']" name="button-prev" v-bind:config="config"
|
|
182
|
+
<slot v-if="!!slots['button-prev']" name="button-prev" v-bind:config="config"/>
|
|
184
183
|
<span v-else>Back</span>
|
|
185
184
|
</lkt-button>
|
|
186
185
|
|
|
187
186
|
<lkt-button
|
|
188
187
|
:ref="(el:any) => nextButton = el"
|
|
189
188
|
v-show="!isLoading && !nextHidden"
|
|
190
|
-
palette="success"
|
|
191
189
|
v-bind:disabled="nextDisabled"
|
|
192
190
|
v-bind:confirm-modal="nextConfirm"
|
|
193
191
|
v-bind:resource="nextResource"
|
|
194
192
|
v-bind:resource-data="nextResourceData"
|
|
195
193
|
v-on:click="onNext">
|
|
196
|
-
<slot v-if="!!slots['button-next']" name="button-next" v-bind:config="config"
|
|
194
|
+
<slot v-if="!!slots['button-next']" name="button-next" v-bind:config="config"/>
|
|
197
195
|
<span v-else>Next</span>
|
|
198
196
|
</lkt-button>
|
|
199
197
|
</div>
|
|
@@ -201,10 +199,10 @@ defineExpose({
|
|
|
201
199
|
<div class="lkt-step-process_content" v-if="!isLoading">
|
|
202
200
|
<div class="lkt-grid-1">
|
|
203
201
|
<div v-for="step in slotsSteps" v-show="step === currentStep">
|
|
204
|
-
<slot :name="'step-'+step" v-bind:config="config"
|
|
202
|
+
<slot :name="'step-'+step" v-bind:config="config"/>
|
|
205
203
|
</div>
|
|
206
204
|
</div>
|
|
207
205
|
</div>
|
|
208
|
-
<lkt-loader v-if="isLoading"
|
|
206
|
+
<lkt-loader v-if="isLoading"/>
|
|
209
207
|
</article>
|
|
210
208
|
</template>
|
|
File without changes
|