@knime/jsonforms 0.1.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/CHANGELOG.md +37 -0
- package/LICENSE +710 -0
- package/README.md +125 -0
- package/dist/AnyOfTwinlist-GJ6LGkM1.js +17 -0
- package/dist/ArrayLayout-CbpSgf0X.js +487 -0
- package/dist/ButtonControl-CVu36jz8.js +127 -0
- package/dist/CheckboxControl-DYFLb-qW.js +50 -0
- package/dist/Checkboxes-DlhdiWWA.js +103 -0
- package/dist/CheckboxesControl-DYV72Aua.js +39 -0
- package/dist/ColumnFilter-BbweAsmq.js +17 -0
- package/dist/ColumnSelect-aw7cYcWC.js +60 -0
- package/dist/ComboBoxControl-BqVUWz4q.js +600 -0
- package/dist/CredentialsControl-Ci6ZEuKM.js +20 -0
- package/dist/CredentialsControlBase-CxYOD3ne.js +110 -0
- package/dist/DateControl-ZyQ_vmOW.js +30 -0
- package/dist/DateTimeControl-anye7xvC.js +4 -0
- package/dist/DropdownControl-JX1LF5Tk.js +4 -0
- package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-B5dPfH3x.js +171 -0
- package/dist/DynamicValuesControl-CFubOaRb.js +127 -0
- package/dist/FileChooserControl-Cf_UaWqV.js +605 -0
- package/dist/FileExplorerTab-Ba76jD3y.js +3951 -0
- package/dist/HorizontalLayout-5irQmhXp.js +39 -0
- package/dist/IntegerControl-CqHJWRgn.js +13 -0
- package/dist/IntervalControl-BUhs5_lc.js +549 -0
- package/dist/LayoutComponentWrapper-CDw9BDq5.js +36 -0
- package/dist/LegacyCredentialsControl-DxRZcRVo.js +62 -0
- package/dist/LocalFileChooserControl-DxSeiKxg.js +57 -0
- package/dist/MenuItems.vue_vue_type_style_index_0_lang-qMVpH9oC.js +464 -0
- package/dist/MultiselectListBox-C4ZnJvJJ.js +579 -0
- package/dist/NameFilter-D6EI_V08.js +17 -0
- package/dist/NodeDialog.vue.d.ts +8 -0
- package/dist/NumberControl-DLo0LCsi.js +13 -0
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-B69hrnY1.js +43 -0
- package/dist/NumberInput-BdL-jZ-i.js +219 -0
- package/dist/OneOfDropdown-BmbbuaZk.js +15 -0
- package/dist/RadioControl-GbwpOdAy.js +13 -0
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BlImm9is.js +128 -0
- package/dist/RichTextControl-CGY3rdM7.js +16895 -0
- package/dist/SectionLayout-CqSFyj1K.js +54 -0
- package/dist/SimpleButtonControl-BgOrTGEP.js +59 -0
- package/dist/SimpleTwinlistControl-ByOlLGIN.js +68 -0
- package/dist/SortListControl-Dege54Dj.js +316 -0
- package/dist/TextAreaControl-CKviHabr.js +111 -0
- package/dist/TextControl-CPL48j4B.js +49 -0
- package/dist/TimeControl-CGsLRgR3.js +842 -0
- package/dist/TwinlistControl-C4XaH_Xc.js +587 -0
- package/dist/TwinlistLoadingInfo-CFlSBQXn.js +1057 -0
- package/dist/ValueSwitch-B9oWSkM_.js +138 -0
- package/dist/ValueSwitchControl-4ODpL58f.js +13 -0
- package/dist/VennDiagramLayout-CabCs-fX.js +104 -0
- package/dist/VerticalLayout-D5HeZyKY.js +39 -0
- package/dist/VerticalLayoutBase-C0PZ-y5d.js +20 -0
- package/dist/arrow-next-CvdR0-WC.js +17 -0
- package/dist/arrow-up-Dsq3EgtE.js +30 -0
- package/dist/createMissingItem-B00Kg95q.js +4 -0
- package/dist/floating-ui.vue.esm-CIFBDytk.js +94 -0
- package/dist/getFlattenedSettings-D64OwqpI.js +7 -0
- package/dist/index-ZDm2GXeD.js +32714 -0
- package/dist/index.d.ts +3 -0
- package/dist/knime-jsonforms.js +5 -0
- package/dist/layoutComponents/Form.vue.d.ts +2 -0
- package/dist/link-BA69Hfx6.js +17 -0
- package/dist/loading/LoadingDialog.vue.d.ts +2 -0
- package/dist/navigator-BYUFe-z3.js +8 -0
- package/dist/style.css +1 -0
- package/dist/useHideOnNull-CCfNP3O7.js +42 -0
- package/package.json +74 -0
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
import { openBlock as S, createElementBlock as z, createElementVNode as Q, toRef as X, resolveComponent as b, normalizeClass as Y, createBlock as _, withCtx as C, createVNode as w, createCommentVNode as M, mergeProps as N, ref as x, watch as k, defineComponent as Z, computed as m, markRaw as $, unref as h } from "vue";
|
|
2
|
+
import { g as ee, aK as B, _ as q, aL as D, aM as te, r as ae, a as le, V as se, p as ne, q as ie, L as oe, W as de, a1 as ue } from "./index-ZDm2GXeD.js";
|
|
3
|
+
import { S as re, a as ce, u as pe, T as me } from "./TwinlistLoadingInfo-CFlSBQXn.js";
|
|
4
|
+
import { C as he } from "./Checkboxes-DlhdiWWA.js";
|
|
5
|
+
import { V as ve } from "./ValueSwitch-B9oWSkM_.js";
|
|
6
|
+
const ye = {
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
fill: "none",
|
|
9
|
+
stroke: "#000",
|
|
10
|
+
"stroke-linejoin": "round",
|
|
11
|
+
viewBox: "0 0 32 32"
|
|
12
|
+
}, fe = /* @__PURE__ */ Q("path", { d: "m13.31 27.81 5.11-3.19v-9.15L28.95 4.19H3.05l10.26 11.28z" }, null, -1), be = [
|
|
13
|
+
fe
|
|
14
|
+
];
|
|
15
|
+
function we(t, s) {
|
|
16
|
+
return S(), z("svg", ye, [...be]);
|
|
17
|
+
}
|
|
18
|
+
const Se = { render: we }, ge = {
|
|
19
|
+
manual: "Manual",
|
|
20
|
+
wildcard: "Wildcard",
|
|
21
|
+
regex: "Regex",
|
|
22
|
+
type: "Type"
|
|
23
|
+
}, Te = {
|
|
24
|
+
name: "MultiModeTwinlist",
|
|
25
|
+
components: {
|
|
26
|
+
Label: ee,
|
|
27
|
+
FilterIcon: Se,
|
|
28
|
+
SearchInput: re,
|
|
29
|
+
Checkboxes: he,
|
|
30
|
+
ValueSwitch: ve,
|
|
31
|
+
Twinlist: ce
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
/**
|
|
35
|
+
* initial values
|
|
36
|
+
*/
|
|
37
|
+
mode: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: !1,
|
|
40
|
+
default: "manual"
|
|
41
|
+
},
|
|
42
|
+
manualSelection: {
|
|
43
|
+
type: [Object, Array, null],
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
46
|
+
pattern: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
caseSensitivePattern: {
|
|
51
|
+
default: !1,
|
|
52
|
+
type: Boolean
|
|
53
|
+
},
|
|
54
|
+
inversePattern: {
|
|
55
|
+
default: !1,
|
|
56
|
+
type: Boolean
|
|
57
|
+
},
|
|
58
|
+
withTypes: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !0
|
|
61
|
+
},
|
|
62
|
+
selectedTypes: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => []
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Hiding and disabling
|
|
68
|
+
*/
|
|
69
|
+
showMode: {
|
|
70
|
+
default: !1,
|
|
71
|
+
type: Boolean
|
|
72
|
+
},
|
|
73
|
+
// enable search in case of manual selection
|
|
74
|
+
showSearch: {
|
|
75
|
+
default: !0,
|
|
76
|
+
type: Boolean
|
|
77
|
+
},
|
|
78
|
+
disabled: {
|
|
79
|
+
default: !1,
|
|
80
|
+
type: Boolean
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Labels
|
|
84
|
+
*/
|
|
85
|
+
withModeLabel: {
|
|
86
|
+
default: !1,
|
|
87
|
+
type: Boolean
|
|
88
|
+
},
|
|
89
|
+
modeLabel: {
|
|
90
|
+
type: String,
|
|
91
|
+
required: !1,
|
|
92
|
+
default: "Selection mode"
|
|
93
|
+
},
|
|
94
|
+
withPatternLabel: {
|
|
95
|
+
default: !1,
|
|
96
|
+
type: Boolean
|
|
97
|
+
},
|
|
98
|
+
patternLabel: {
|
|
99
|
+
type: String,
|
|
100
|
+
required: !1,
|
|
101
|
+
default: "Pattern"
|
|
102
|
+
},
|
|
103
|
+
withTypesLabel: {
|
|
104
|
+
default: !1,
|
|
105
|
+
type: Boolean
|
|
106
|
+
},
|
|
107
|
+
typesLabel: {
|
|
108
|
+
type: String,
|
|
109
|
+
required: !1,
|
|
110
|
+
default: "Selected types"
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* List of possible values. Each item must have an `id` and a `text` property
|
|
114
|
+
* @example
|
|
115
|
+
* [{
|
|
116
|
+
* id: 'pdf',
|
|
117
|
+
* text: 'PDF'
|
|
118
|
+
* }, {
|
|
119
|
+
* id: 'XLS',
|
|
120
|
+
* text: 'Excel',
|
|
121
|
+
* }]
|
|
122
|
+
* For type selection, additionally, an element has to have a property `type` wich itself has properties
|
|
123
|
+
* `id` and `text`, e.g.
|
|
124
|
+
* [{
|
|
125
|
+
* id: 'pdf',
|
|
126
|
+
* text: 'PDF',
|
|
127
|
+
* type: {
|
|
128
|
+
* id: 'StringValue',
|
|
129
|
+
* text: 'String'
|
|
130
|
+
* }]
|
|
131
|
+
*/
|
|
132
|
+
possibleValues: {
|
|
133
|
+
type: Array,
|
|
134
|
+
default: () => []
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* List of possible types which should be selectable but are not necessarily present in the possible values.
|
|
138
|
+
*/
|
|
139
|
+
additionalPossibleTypes: {
|
|
140
|
+
type: Array,
|
|
141
|
+
default: () => []
|
|
142
|
+
},
|
|
143
|
+
compact: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: !1
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
emits: [
|
|
149
|
+
// Prop updates
|
|
150
|
+
"update:manualSelection",
|
|
151
|
+
"update:pattern",
|
|
152
|
+
"update:selectedTypes",
|
|
153
|
+
"update:mode",
|
|
154
|
+
"update:caseSensitivePattern",
|
|
155
|
+
"update:inversePattern",
|
|
156
|
+
// Non-prop update
|
|
157
|
+
"update:selected"
|
|
158
|
+
],
|
|
159
|
+
setup(t) {
|
|
160
|
+
const { includedValues: s } = pe(
|
|
161
|
+
X(t, "manualSelection")
|
|
162
|
+
);
|
|
163
|
+
return { manuallySelected: s };
|
|
164
|
+
},
|
|
165
|
+
data() {
|
|
166
|
+
return {
|
|
167
|
+
invalidPossibleValueIds: /* @__PURE__ */ new Set()
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
computed: {
|
|
171
|
+
possibleValueIds() {
|
|
172
|
+
return this.possibleValues.map(({ id: t }) => t);
|
|
173
|
+
},
|
|
174
|
+
possibleTypes() {
|
|
175
|
+
const t = this.possibleValues.map(({ type: o }) => o).filter(Boolean), s = t.map((o) => o.id);
|
|
176
|
+
return [...this.additionalPossibleTypes.filter(
|
|
177
|
+
(o) => o && !s.includes(o.id)
|
|
178
|
+
), ...t].filter((o) => o && o.id !== "").filter(
|
|
179
|
+
// remove duplicates
|
|
180
|
+
(o, i, l) => i === l.findIndex((u) => u.id === o.id && u.text === o.text)
|
|
181
|
+
);
|
|
182
|
+
},
|
|
183
|
+
matchingValueIds() {
|
|
184
|
+
return this.possibleValues.filter((t) => this.itemMatches(t)).map((t) => t.id);
|
|
185
|
+
},
|
|
186
|
+
twinlistModelValue() {
|
|
187
|
+
return this.mode === "manual" ? this.manualSelection : this.matchingValueIds;
|
|
188
|
+
},
|
|
189
|
+
selectedValues() {
|
|
190
|
+
return this.mode === "manual" ? this.manuallySelected : this.matchingValueIds;
|
|
191
|
+
},
|
|
192
|
+
selectionDisabled() {
|
|
193
|
+
return this.disabled || this.mode !== "manual";
|
|
194
|
+
},
|
|
195
|
+
normalizedSearchTerm() {
|
|
196
|
+
return this.mode === "manual" ? null : B[this.mode].normalize(
|
|
197
|
+
this.mode === "type" ? this.selectedTypes : this.pattern,
|
|
198
|
+
this.caseSensitivePattern
|
|
199
|
+
);
|
|
200
|
+
},
|
|
201
|
+
possibleModes() {
|
|
202
|
+
let t = Object.entries(ge).map(([s, a]) => ({ id: s, text: a }));
|
|
203
|
+
return this.withTypes || (t = t.filter((s) => s.id !== "type")), t;
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
watch: {
|
|
207
|
+
selectedValues: {
|
|
208
|
+
immediate: !0,
|
|
209
|
+
handler(t, s) {
|
|
210
|
+
!s || t === null || (t.length !== s.length || s.some((a, d) => a !== t[d])) && this.$emit("update:selected", this.selectedValues);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
methods: {
|
|
215
|
+
onManualInput(t) {
|
|
216
|
+
this.mode === "manual" && this.$emit("update:manualSelection", t);
|
|
217
|
+
},
|
|
218
|
+
onPatternInput(t) {
|
|
219
|
+
this.$emit("update:pattern", t);
|
|
220
|
+
},
|
|
221
|
+
onTypeInput(t) {
|
|
222
|
+
this.$emit("update:selectedTypes", t, this.possibleTypes);
|
|
223
|
+
},
|
|
224
|
+
onModeChange(t) {
|
|
225
|
+
this.$emit("update:mode", t);
|
|
226
|
+
},
|
|
227
|
+
onToggleCaseSensitivePattern(t) {
|
|
228
|
+
this.$emit("update:caseSensitivePattern", t);
|
|
229
|
+
},
|
|
230
|
+
onToggleInversePattern(t) {
|
|
231
|
+
this.$emit("update:inversePattern", t);
|
|
232
|
+
},
|
|
233
|
+
validate() {
|
|
234
|
+
return this.$refs.twinlist.validate();
|
|
235
|
+
},
|
|
236
|
+
hasSelection() {
|
|
237
|
+
var t;
|
|
238
|
+
return !!((t = this.selectedValues) != null && t.length);
|
|
239
|
+
},
|
|
240
|
+
itemMatches(t) {
|
|
241
|
+
var a;
|
|
242
|
+
return B[this.mode].test(
|
|
243
|
+
this.mode === "type" ? (a = t.type) == null ? void 0 : a.id : t.text,
|
|
244
|
+
this.normalizedSearchTerm,
|
|
245
|
+
this.caseSensitivePattern,
|
|
246
|
+
this.inversePattern
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
function Ce(t, s, a, d, o, i) {
|
|
252
|
+
const l = b("ValueSwitch"), u = b("Label"), r = b("FilterIcon"), g = b("SearchInput"), y = b("Checkboxes"), f = b("Twinlist");
|
|
253
|
+
return S(), z("div", {
|
|
254
|
+
class: Y(["multi-mode-twinlist", { disabled: a.disabled }])
|
|
255
|
+
}, [
|
|
256
|
+
a.showMode ? (S(), _(u, {
|
|
257
|
+
key: 0,
|
|
258
|
+
active: a.withModeLabel,
|
|
259
|
+
text: a.modeLabel,
|
|
260
|
+
class: "label"
|
|
261
|
+
}, {
|
|
262
|
+
default: C(({ labelForId: v }) => [
|
|
263
|
+
w(l, {
|
|
264
|
+
id: v,
|
|
265
|
+
ref: "mode",
|
|
266
|
+
compact: a.compact,
|
|
267
|
+
"model-value": a.mode,
|
|
268
|
+
disabled: a.disabled,
|
|
269
|
+
"possible-values": i.possibleModes,
|
|
270
|
+
"onUpdate:modelValue": i.onModeChange
|
|
271
|
+
}, null, 8, ["id", "compact", "model-value", "disabled", "possible-values", "onUpdate:modelValue"])
|
|
272
|
+
]),
|
|
273
|
+
_: 1
|
|
274
|
+
}, 8, ["active", "text"])) : M("", !0),
|
|
275
|
+
a.mode === "regex" || a.mode === "wildcard" ? (S(), _(u, {
|
|
276
|
+
key: 1,
|
|
277
|
+
active: a.withPatternLabel,
|
|
278
|
+
text: a.patternLabel,
|
|
279
|
+
class: "label"
|
|
280
|
+
}, {
|
|
281
|
+
default: C(({ labelForId: v }) => [
|
|
282
|
+
w(g, {
|
|
283
|
+
id: v,
|
|
284
|
+
ref: "search",
|
|
285
|
+
"model-value": a.pattern,
|
|
286
|
+
label: a.patternLabel,
|
|
287
|
+
"initial-case-sensitive-search": a.caseSensitivePattern,
|
|
288
|
+
"initial-inverse-search": a.inversePattern,
|
|
289
|
+
placeholder: "Pattern",
|
|
290
|
+
"show-case-sensitive-search-button": "",
|
|
291
|
+
"show-inverse-search-button": "",
|
|
292
|
+
disabled: a.disabled,
|
|
293
|
+
tooltips: {
|
|
294
|
+
inverseSearch: "Move matching to other side"
|
|
295
|
+
},
|
|
296
|
+
compact: a.compact,
|
|
297
|
+
"onUpdate:modelValue": i.onPatternInput,
|
|
298
|
+
onToggleCaseSensitiveSearch: i.onToggleCaseSensitivePattern,
|
|
299
|
+
onToggleInverseSearch: i.onToggleInversePattern
|
|
300
|
+
}, {
|
|
301
|
+
icon: C(() => [
|
|
302
|
+
w(r)
|
|
303
|
+
]),
|
|
304
|
+
_: 2
|
|
305
|
+
}, 1032, ["id", "model-value", "label", "initial-case-sensitive-search", "initial-inverse-search", "disabled", "compact", "onUpdate:modelValue", "onToggleCaseSensitiveSearch", "onToggleInverseSearch"])
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}, 8, ["active", "text"])) : M("", !0),
|
|
309
|
+
a.mode === "type" && i.possibleTypes.length > 0 ? (S(), _(u, {
|
|
310
|
+
key: 2,
|
|
311
|
+
active: a.withTypesLabel,
|
|
312
|
+
text: a.typesLabel,
|
|
313
|
+
class: "label"
|
|
314
|
+
}, {
|
|
315
|
+
default: C(() => [
|
|
316
|
+
w(y, {
|
|
317
|
+
"model-value": a.selectedTypes,
|
|
318
|
+
"possible-values": i.possibleTypes,
|
|
319
|
+
disabled: a.disabled,
|
|
320
|
+
"onUpdate:modelValue": i.onTypeInput
|
|
321
|
+
}, null, 8, ["model-value", "possible-values", "disabled", "onUpdate:modelValue"])
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
324
|
+
}, 8, ["active", "text"])) : M("", !0),
|
|
325
|
+
w(f, N(t.$attrs, {
|
|
326
|
+
ref: "twinlist",
|
|
327
|
+
disabled: i.selectionDisabled,
|
|
328
|
+
"show-search": a.mode === "manual" && a.showSearch,
|
|
329
|
+
"model-value": i.twinlistModelValue,
|
|
330
|
+
"possible-values": a.possibleValues,
|
|
331
|
+
compact: a.compact,
|
|
332
|
+
"onUpdate:modelValue": i.onManualInput
|
|
333
|
+
}), null, 16, ["disabled", "show-search", "model-value", "possible-values", "compact", "onUpdate:modelValue"])
|
|
334
|
+
], 2);
|
|
335
|
+
}
|
|
336
|
+
const Ve = /* @__PURE__ */ q(Te, [["render", Ce], ["__scopeId", "data-v-06592f92"]]), _e = ({
|
|
337
|
+
knownValuesSide: t,
|
|
338
|
+
possibleValueIds: s,
|
|
339
|
+
unknownValuesSide: a
|
|
340
|
+
}) => {
|
|
341
|
+
const d = new Set(t.previous), o = new Set(s), i = (l) => D(l, o);
|
|
342
|
+
a.setNext([
|
|
343
|
+
...i(a.previous),
|
|
344
|
+
...D(s, d)
|
|
345
|
+
]), t.setNext([
|
|
346
|
+
...i(t.previous),
|
|
347
|
+
...te(s, d)
|
|
348
|
+
]);
|
|
349
|
+
}, Pe = ({
|
|
350
|
+
data: t,
|
|
351
|
+
possibleValueIds: s
|
|
352
|
+
}) => {
|
|
353
|
+
const a = x({
|
|
354
|
+
selected: null,
|
|
355
|
+
deselected: null
|
|
356
|
+
}), d = x(null), o = (l) => {
|
|
357
|
+
d.value = l;
|
|
358
|
+
}, i = () => {
|
|
359
|
+
if (!d.value || !s.value)
|
|
360
|
+
return;
|
|
361
|
+
let l, u;
|
|
362
|
+
const { manuallyDeselected: r, manuallySelected: g, includeUnknownColumns: y } = d.value, f = {
|
|
363
|
+
previous: r,
|
|
364
|
+
setNext: (T) => {
|
|
365
|
+
l = T;
|
|
366
|
+
}
|
|
367
|
+
}, v = {
|
|
368
|
+
previous: g,
|
|
369
|
+
setNext: (T) => {
|
|
370
|
+
u = T;
|
|
371
|
+
}
|
|
372
|
+
}, P = y ? f : v, I = y ? v : f;
|
|
373
|
+
_e({
|
|
374
|
+
possibleValueIds: s.value,
|
|
375
|
+
knownValuesSide: P,
|
|
376
|
+
unknownValuesSide: I
|
|
377
|
+
}), a.value = {
|
|
378
|
+
selected: u,
|
|
379
|
+
deselected: l
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
return k(
|
|
383
|
+
() => t.value.manualFilter,
|
|
384
|
+
(l) => {
|
|
385
|
+
Object.is(d.value, l) ? a.value = {
|
|
386
|
+
selected: l.manuallySelected,
|
|
387
|
+
deselected: l.manuallyDeselected
|
|
388
|
+
} : (d.value = l, i());
|
|
389
|
+
},
|
|
390
|
+
{ immediate: !0 }
|
|
391
|
+
), k(() => s.value, i, {
|
|
392
|
+
immediate: !0
|
|
393
|
+
}), { selectedAndDeselected: a, setCurrentManualFilter: o };
|
|
394
|
+
}, Ie = /* @__PURE__ */ Z({
|
|
395
|
+
__name: "TwinlistControl",
|
|
396
|
+
props: {
|
|
397
|
+
...ae(),
|
|
398
|
+
twinlistSize: {
|
|
399
|
+
type: Number,
|
|
400
|
+
required: !1,
|
|
401
|
+
default: 10
|
|
402
|
+
},
|
|
403
|
+
twinlistLeftLabel: {
|
|
404
|
+
type: String,
|
|
405
|
+
required: !1,
|
|
406
|
+
default: "Excludes"
|
|
407
|
+
},
|
|
408
|
+
showUnknownValues: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !1
|
|
411
|
+
},
|
|
412
|
+
twinlistRightLabel: {
|
|
413
|
+
type: String,
|
|
414
|
+
required: !1,
|
|
415
|
+
default: "Includes"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
setup(t) {
|
|
419
|
+
const s = t;
|
|
420
|
+
class a extends de {
|
|
421
|
+
toInternalState(n) {
|
|
422
|
+
return JSON.stringify(
|
|
423
|
+
n,
|
|
424
|
+
(c, p) => c === "selected" ? void 0 : p
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
equals(n, c) {
|
|
428
|
+
return n === c;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
const {
|
|
432
|
+
control: d,
|
|
433
|
+
disabled: o,
|
|
434
|
+
onChange: i
|
|
435
|
+
} = le({
|
|
436
|
+
props: s,
|
|
437
|
+
valueComparator: new a()
|
|
438
|
+
}), l = d;
|
|
439
|
+
let u;
|
|
440
|
+
const r = (e) => {
|
|
441
|
+
const n = ue(l.value.data, e);
|
|
442
|
+
i(n), u == null || u(n.manualFilter);
|
|
443
|
+
}, g = (e) => {
|
|
444
|
+
r({ selected: e });
|
|
445
|
+
}, y = (e) => {
|
|
446
|
+
if (e !== null)
|
|
447
|
+
if ("includedValues" in e) {
|
|
448
|
+
const { includedValues: n, excludedValues: c, includeUnknownValues: p } = e;
|
|
449
|
+
if (!n || !c)
|
|
450
|
+
return;
|
|
451
|
+
r({
|
|
452
|
+
manualFilter: {
|
|
453
|
+
manuallySelected: n,
|
|
454
|
+
manuallyDeselected: c,
|
|
455
|
+
includeUnknownColumns: p
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
} else
|
|
459
|
+
r({ manualFilter: { manuallySelected: e } });
|
|
460
|
+
}, f = (e) => {
|
|
461
|
+
r({ patternFilter: { pattern: e } });
|
|
462
|
+
}, v = (e) => {
|
|
463
|
+
r({ mode: e.toUpperCase() });
|
|
464
|
+
}, P = (e, n) => {
|
|
465
|
+
r({ typeFilter: { selectedTypes: e, typeDisplays: n } });
|
|
466
|
+
}, I = (e) => {
|
|
467
|
+
r({ patternFilter: { isInverted: e } });
|
|
468
|
+
}, T = (e) => {
|
|
469
|
+
r({ patternFilter: { isCaseSensitive: e } });
|
|
470
|
+
}, L = m(
|
|
471
|
+
() => {
|
|
472
|
+
var e;
|
|
473
|
+
return (e = l.value.uischema.options) == null ? void 0 : e.choicesProvider;
|
|
474
|
+
}
|
|
475
|
+
), V = se(
|
|
476
|
+
ne(L, null),
|
|
477
|
+
l.value
|
|
478
|
+
), U = x([]), { selectedAndDeselected: F, setCurrentManualFilter: j } = Pe({
|
|
479
|
+
data: m(() => l.value.data),
|
|
480
|
+
possibleValueIds: m(
|
|
481
|
+
() => {
|
|
482
|
+
var e;
|
|
483
|
+
return ((e = V.value) == null ? void 0 : e.map(({ id: n }) => n)) ?? null;
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
});
|
|
487
|
+
u = j;
|
|
488
|
+
const A = m(() => {
|
|
489
|
+
const { selected: e, deselected: n } = F.value;
|
|
490
|
+
return s.showUnknownValues ? {
|
|
491
|
+
includedValues: e,
|
|
492
|
+
excludedValues: n,
|
|
493
|
+
includeUnknownValues: l.value.data.manualFilter.includeUnknownColumns
|
|
494
|
+
} : e;
|
|
495
|
+
}), R = m(
|
|
496
|
+
() => F.value.selected === null ? $(me) : null
|
|
497
|
+
), O = (e) => typeof e > "u" ? {} : e.reduce(
|
|
498
|
+
(n, { id: c, text: p }) => ({ ...n, [c]: p }),
|
|
499
|
+
{}
|
|
500
|
+
), E = () => {
|
|
501
|
+
const e = l.value.data.typeFilter;
|
|
502
|
+
if (!e)
|
|
503
|
+
return [];
|
|
504
|
+
const n = e.selectedTypes, c = O(
|
|
505
|
+
e.typeDisplays
|
|
506
|
+
);
|
|
507
|
+
return n.map((p) => ({
|
|
508
|
+
id: p,
|
|
509
|
+
text: c[p] || p
|
|
510
|
+
}));
|
|
511
|
+
};
|
|
512
|
+
U.value = E(), L.value || ie("getPossibleValuesFromUiSchema")(l.value).then((e) => {
|
|
513
|
+
V.value = e;
|
|
514
|
+
});
|
|
515
|
+
const K = m(
|
|
516
|
+
() => {
|
|
517
|
+
var e, n;
|
|
518
|
+
return !!((n = (e = V.value) == null ? void 0 : e[0]) != null && n.hasOwnProperty("type"));
|
|
519
|
+
}
|
|
520
|
+
), W = m(
|
|
521
|
+
() => {
|
|
522
|
+
var e;
|
|
523
|
+
return ((e = l.value.uischema.options) == null ? void 0 : e.showMode) ?? !0;
|
|
524
|
+
}
|
|
525
|
+
), H = m(
|
|
526
|
+
() => {
|
|
527
|
+
var e;
|
|
528
|
+
return ((e = l.value.uischema.options) == null ? void 0 : e.showSearch) ?? !0;
|
|
529
|
+
}
|
|
530
|
+
), J = m(
|
|
531
|
+
() => {
|
|
532
|
+
var e;
|
|
533
|
+
return ((e = l.value.uischema.options) == null ? void 0 : e.excludedLabel) ?? s.twinlistLeftLabel;
|
|
534
|
+
}
|
|
535
|
+
), G = m(
|
|
536
|
+
() => {
|
|
537
|
+
var e;
|
|
538
|
+
return ((e = l.value.uischema.options) == null ? void 0 : e.includedLabel) ?? s.twinlistRightLabel;
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
return (e, n) => (S(), _(oe, {
|
|
542
|
+
control: h(l),
|
|
543
|
+
onControllingFlowVariableSet: r
|
|
544
|
+
}, {
|
|
545
|
+
default: C(({ labelForId: c }) => {
|
|
546
|
+
var p;
|
|
547
|
+
return [
|
|
548
|
+
w(h(Ve), N(e.$attrs, {
|
|
549
|
+
id: c,
|
|
550
|
+
"show-mode": W.value,
|
|
551
|
+
"show-search": H.value,
|
|
552
|
+
disabled: h(o),
|
|
553
|
+
"with-types": K.value,
|
|
554
|
+
"selected-types": (p = h(l).data.typeFilter) == null ? void 0 : p.selectedTypes,
|
|
555
|
+
"additional-possible-types": U.value,
|
|
556
|
+
pattern: h(l).data.patternFilter.pattern,
|
|
557
|
+
mode: h(l).data.mode.toLowerCase(),
|
|
558
|
+
"case-sensitive-pattern": h(l).data.patternFilter.isCaseSensitive,
|
|
559
|
+
"empty-state-component": R.value,
|
|
560
|
+
"inverse-pattern": h(l).data.patternFilter.isInverted,
|
|
561
|
+
"manual-selection": A.value,
|
|
562
|
+
"include-unknown-values": h(l).data.manualFilter.includeUnknownColumns,
|
|
563
|
+
"filter-chosen-values-on-possible-values-change": !1,
|
|
564
|
+
"mode-label": "Selection mode",
|
|
565
|
+
"possible-values": h(V) ?? [],
|
|
566
|
+
size: t.twinlistSize,
|
|
567
|
+
"left-label": J.value,
|
|
568
|
+
"right-label": G.value,
|
|
569
|
+
compact: "",
|
|
570
|
+
"show-resize-handle": "",
|
|
571
|
+
"onUpdate:selected": g,
|
|
572
|
+
"onUpdate:manualSelection": y,
|
|
573
|
+
"onUpdate:pattern": f,
|
|
574
|
+
"onUpdate:mode": v,
|
|
575
|
+
"onUpdate:selectedTypes": P,
|
|
576
|
+
"onUpdate:inversePattern": I,
|
|
577
|
+
"onUpdate:caseSensitivePattern": T
|
|
578
|
+
}), null, 16, ["id", "show-mode", "show-search", "disabled", "with-types", "selected-types", "additional-possible-types", "pattern", "mode", "case-sensitive-pattern", "empty-state-component", "inverse-pattern", "manual-selection", "include-unknown-values", "possible-values", "size", "left-label", "right-label"])
|
|
579
|
+
];
|
|
580
|
+
}),
|
|
581
|
+
_: 1
|
|
582
|
+
}, 8, ["control"]));
|
|
583
|
+
}
|
|
584
|
+
}), ke = /* @__PURE__ */ q(Ie, [["__scopeId", "data-v-968c3096"]]);
|
|
585
|
+
export {
|
|
586
|
+
ke as default
|
|
587
|
+
};
|