sprintify-ui 0.6.67 → 0.6.69
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/sprintify-ui.es.js
CHANGED
|
@@ -6838,6 +6838,7 @@ const Ex = {
|
|
|
6838
6838
|
class: de(C(l)),
|
|
6839
6839
|
style: it(C(s)),
|
|
6840
6840
|
to: h.to,
|
|
6841
|
+
href: h.href,
|
|
6841
6842
|
disabled: h.disabled,
|
|
6842
6843
|
type: h.type,
|
|
6843
6844
|
onClick: g[0] || (g[0] = (m) => h.$emit("click"))
|
|
@@ -6861,7 +6862,7 @@ const Ex = {
|
|
|
6861
6862
|
h.loading ? (B(), K("div", Ex, _x)) : ke("", !0)
|
|
6862
6863
|
]),
|
|
6863
6864
|
_: 3
|
|
6864
|
-
}, 8, ["class", "style", "to", "disabled", "type"]));
|
|
6865
|
+
}, 8, ["class", "style", "to", "href", "disabled", "type"]));
|
|
6865
6866
|
}
|
|
6866
6867
|
}), kx = { class: "relative transform overflow-hidden rounded-lg bg-white ring-1 ring-black ring-opacity-10 p-4 text-left shadow-xl transition-all || sm:my-8 sm:w-full sm:max-w-lg" }, Ax = { class: "sm:flex sm:items-start || sm:gap-4" }, Cx = { class: "mt-3 text-center || sm:mt-0 sm:text-left" }, Tx = {
|
|
6867
6868
|
id: "modal-title",
|
|
@@ -31131,7 +31132,6 @@ const hI = ["onClick"], pI = { class: "px-2 flex items-center" }, mI = { class:
|
|
|
31131
31132
|
},
|
|
31132
31133
|
currentModels: {
|
|
31133
31134
|
default() {
|
|
31134
|
-
return [];
|
|
31135
31135
|
},
|
|
31136
31136
|
type: Array
|
|
31137
31137
|
},
|
|
@@ -31142,21 +31142,23 @@ const hI = ["onClick"], pI = { class: "px-2 flex items-center" }, mI = { class:
|
|
|
31142
31142
|
},
|
|
31143
31143
|
emits: ["update:modelValue"],
|
|
31144
31144
|
setup(n, { expose: t, emit: e }) {
|
|
31145
|
-
const r = n, i = $t.http, o = oe(null), a = oe(r.currentModels);
|
|
31145
|
+
const r = n, i = $t.http, o = oe(null), a = oe(r.currentModels ?? []);
|
|
31146
31146
|
ut(
|
|
31147
31147
|
() => r.currentModels,
|
|
31148
31148
|
(s, d) => {
|
|
31149
|
-
rm(s, d) || (a.value = s);
|
|
31149
|
+
rm(s, d) || (a.value = s ?? []);
|
|
31150
31150
|
},
|
|
31151
31151
|
{ deep: !0 }
|
|
31152
31152
|
), ut(
|
|
31153
31153
|
() => r.modelValue,
|
|
31154
31154
|
(s, d) => {
|
|
31155
|
+
if (r.currentModels !== void 0 || r.showRouteUrl == null)
|
|
31156
|
+
return;
|
|
31155
31157
|
if (!r.modelValue) {
|
|
31156
31158
|
a.value = [];
|
|
31157
31159
|
return;
|
|
31158
31160
|
}
|
|
31159
|
-
if (s == d
|
|
31161
|
+
if (s == d)
|
|
31160
31162
|
return;
|
|
31161
31163
|
const c = r.modelValue.map((p) => p.toString());
|
|
31162
31164
|
i.get(r.showRouteUrl(c)).then((p) => {
|
|
@@ -42,8 +42,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
42
42
|
type: StringConstructor;
|
|
43
43
|
};
|
|
44
44
|
currentModels: {
|
|
45
|
-
default():
|
|
46
|
-
type: PropType<Option[]>;
|
|
45
|
+
default(): undefined;
|
|
46
|
+
type: PropType<Option[] | undefined>;
|
|
47
47
|
};
|
|
48
48
|
hasError: {
|
|
49
49
|
default: boolean;
|
|
@@ -99,8 +99,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
99
99
|
type: StringConstructor;
|
|
100
100
|
};
|
|
101
101
|
currentModels: {
|
|
102
|
-
default():
|
|
103
|
-
type: PropType<Option[]>;
|
|
102
|
+
default(): undefined;
|
|
103
|
+
type: PropType<Option[] | undefined>;
|
|
104
104
|
};
|
|
105
105
|
hasError: {
|
|
106
106
|
default: boolean;
|
|
@@ -118,7 +118,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
118
118
|
queryKey: string;
|
|
119
119
|
primaryKey: string;
|
|
120
120
|
showRouteUrl: ((ids: (string | number)[]) => string) | undefined;
|
|
121
|
-
currentModels: Option[];
|
|
121
|
+
currentModels: Option[] | undefined;
|
|
122
122
|
}, {}>, {
|
|
123
123
|
items?(_: {
|
|
124
124
|
items: import("@/types").NormalizedOption[];
|
package/package.json
CHANGED
|
@@ -19,6 +19,10 @@ export default {
|
|
|
19
19
|
url: 'https://effettandem.com/api/content/articles',
|
|
20
20
|
field: 'title',
|
|
21
21
|
primaryKey: 'id',
|
|
22
|
+
showRouteUrl: (ids) => {
|
|
23
|
+
const params = QueryString.stringify({ filter: { id: ids } });
|
|
24
|
+
return `https://effettandem.com/api/content/articles?${params}`;
|
|
25
|
+
}
|
|
22
26
|
},
|
|
23
27
|
decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
|
|
24
28
|
};
|
|
@@ -28,7 +32,8 @@ const Template = (args) => {
|
|
|
28
32
|
components: { BaseHasMany, ShowValue, BaseAppNotifications },
|
|
29
33
|
setup() {
|
|
30
34
|
const value = ref([
|
|
31
|
-
"9acd34f6-ecf3-43e3-b84e-d8fcf5382bf4"
|
|
35
|
+
"9acd34f6-ecf3-43e3-b84e-d8fcf5382bf4",
|
|
36
|
+
"994ecd49-0796-402d-ab1a-63d4e5c2a68a",
|
|
32
37
|
]);
|
|
33
38
|
return { args, value };
|
|
34
39
|
},
|
|
@@ -48,10 +53,10 @@ Demo.args = {};
|
|
|
48
53
|
|
|
49
54
|
export const Disabled = (args) => {
|
|
50
55
|
return {
|
|
51
|
-
components: { BaseHasMany },
|
|
56
|
+
components: { BaseHasMany, ShowValue },
|
|
52
57
|
setup() {
|
|
53
|
-
const
|
|
54
|
-
const
|
|
58
|
+
const currentModel = options[1];
|
|
59
|
+
const value = ref([currentModel.value]);
|
|
55
60
|
return { args, value, currentModel };
|
|
56
61
|
},
|
|
57
62
|
template: `<BaseHasMany
|
|
@@ -61,7 +66,8 @@ export const Disabled = (args) => {
|
|
|
61
66
|
:disabled="true"
|
|
62
67
|
primaryKey="value"
|
|
63
68
|
field="label"
|
|
64
|
-
></BaseHasMany
|
|
69
|
+
></BaseHasMany>
|
|
70
|
+
<ShowValue :value="value" />`,
|
|
65
71
|
};
|
|
66
72
|
};
|
|
67
73
|
|
|
@@ -94,9 +94,9 @@ const props = defineProps({
|
|
|
94
94
|
},
|
|
95
95
|
currentModels: {
|
|
96
96
|
default() {
|
|
97
|
-
return
|
|
97
|
+
return undefined;
|
|
98
98
|
},
|
|
99
|
-
type: Array as PropType<Option[]>,
|
|
99
|
+
type: Array as PropType<Option[] | undefined>,
|
|
100
100
|
},
|
|
101
101
|
hasError: {
|
|
102
102
|
default: false,
|
|
@@ -112,7 +112,7 @@ const tagAutocompleteFetch = ref<InstanceType<
|
|
|
112
112
|
typeof BaseTagAutocompleteFetch
|
|
113
113
|
> | null>(null);
|
|
114
114
|
|
|
115
|
-
const models = ref(props.currentModels);
|
|
115
|
+
const models = ref(props.currentModels ?? []);
|
|
116
116
|
|
|
117
117
|
watch(
|
|
118
118
|
() => props.currentModels,
|
|
@@ -121,7 +121,7 @@ watch(
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
models.value = newValue;
|
|
124
|
+
models.value = newValue ?? [];
|
|
125
125
|
},
|
|
126
126
|
{ deep: true }
|
|
127
127
|
);
|
|
@@ -129,16 +129,21 @@ watch(
|
|
|
129
129
|
watch(
|
|
130
130
|
() => props.modelValue,
|
|
131
131
|
(newValue, oldValue) => {
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
|
|
133
|
+
if (props.currentModels !== undefined) {
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
if (
|
|
137
|
+
if (props.showRouteUrl == null) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
if (props.
|
|
141
|
+
if (!props.modelValue) {
|
|
142
|
+
models.value = [];
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (newValue == oldValue) {
|
|
142
147
|
return;
|
|
143
148
|
}
|
|
144
149
|
|