sprintify-ui 0.6.68 → 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
|
@@ -31132,7 +31132,6 @@ const hI = ["onClick"], pI = { class: "px-2 flex items-center" }, mI = { class:
|
|
|
31132
31132
|
},
|
|
31133
31133
|
currentModels: {
|
|
31134
31134
|
default() {
|
|
31135
|
-
return [];
|
|
31136
31135
|
},
|
|
31137
31136
|
type: Array
|
|
31138
31137
|
},
|
|
@@ -31143,21 +31142,23 @@ const hI = ["onClick"], pI = { class: "px-2 flex items-center" }, mI = { class:
|
|
|
31143
31142
|
},
|
|
31144
31143
|
emits: ["update:modelValue"],
|
|
31145
31144
|
setup(n, { expose: t, emit: e }) {
|
|
31146
|
-
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 ?? []);
|
|
31147
31146
|
ut(
|
|
31148
31147
|
() => r.currentModels,
|
|
31149
31148
|
(s, d) => {
|
|
31150
|
-
rm(s, d) || (a.value = s);
|
|
31149
|
+
rm(s, d) || (a.value = s ?? []);
|
|
31151
31150
|
},
|
|
31152
31151
|
{ deep: !0 }
|
|
31153
31152
|
), ut(
|
|
31154
31153
|
() => r.modelValue,
|
|
31155
31154
|
(s, d) => {
|
|
31155
|
+
if (r.currentModels !== void 0 || r.showRouteUrl == null)
|
|
31156
|
+
return;
|
|
31156
31157
|
if (!r.modelValue) {
|
|
31157
31158
|
a.value = [];
|
|
31158
31159
|
return;
|
|
31159
31160
|
}
|
|
31160
|
-
if (s == d
|
|
31161
|
+
if (s == d)
|
|
31161
31162
|
return;
|
|
31162
31163
|
const c = r.modelValue.map((p) => p.toString());
|
|
31163
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
|
|