@knime/jsonforms 1.21.0 → 1.21.2
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 +13 -0
- package/README.md +6 -0
- package/dist/AnyOfTwinlist-BaKgX8A7.js +22 -0
- package/dist/{Checkbox-uBRF2ZKG.js → Checkbox-BnKpZFTE.js} +1 -1
- package/dist/{CheckboxControl-B9Sd2LLd.js → CheckboxControl-5w7zlrdd.js} +1 -1
- package/dist/{CheckboxesControl-CTaoagZv.js → CheckboxesControl-0al-vEKC.js} +2 -2
- package/dist/{ColorControl-DxCjpcHn.js → ColorControl-Dzp0Qztx.js} +1 -1
- package/dist/{ColorPreviewControl-C7MmFIpq.js → ColorPreviewControl-DD9oq2kB.js} +5 -5
- package/dist/{ComboBoxControl-CV4SCOo7.js → ComboBoxControl-BOoPDajP.js} +14 -15
- package/dist/{DateControl-9d_SPymX.js → DateControl-BqYwfkTb.js} +1 -1
- package/dist/{DateTimeControl-nxVjz31-.js → DateTimeControl-CNkPjqie.js} +1 -1
- package/dist/{DateTimeFormatPickerControl-CMgXr7tA.js → DateTimeFormatPickerControl-BawKiO92.js} +1 -1
- package/dist/DateTimeFormatPickerWithTypeControl-BZhGNGGy.js +464 -0
- package/dist/{DropdownControl-BXbRH5G-.js → DropdownControl-C5dZUtMO.js} +2 -2
- package/dist/{ExecutorCoresControl-B04lAS0W.js → ExecutorCoresControl-D_f2Ii7P.js} +2 -2
- package/dist/{ExecutorMemoryControl-CraHGxVJ.js → ExecutorMemoryControl-Bi5ddlwR.js} +2 -2
- package/dist/FileUploadControl-Bpc7-Tjx.js +210 -0
- package/dist/{GridSelectionControl-Cqrr0vTk.js → GridSelectionControl-DS8kT_Nx.js} +17 -17
- package/dist/{HorizontalLayout-BRxOESz6.js → HorizontalLayout-CIcEcUaB.js} +1 -1
- package/dist/{IntegerControl-BG7i8ix-.js → IntegerControl-CNd2Zml6.js} +1 -1
- package/dist/{IntervalControl-YdZin9Wi.js → IntervalControl-BPiRezHq.js} +11 -11
- package/dist/{LinkControl-Ntwn3ko5.js → LinkControl-Bp2h1jSd.js} +3 -3
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-CiYSPKlk.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-BRmvlIKr.js} +5 -5
- package/dist/ManualTwinlistControl-Dtx1Qiz7.js +72 -0
- package/dist/{MultiselectListBox-DE0QC--O.js → MultiSelectListBoxControl-DXLGhCNi.js} +103 -78
- package/dist/MultimodeTwinlistControl-CKRsC015.js +4 -0
- package/dist/MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-CV2htSnA.js +157 -0
- package/dist/{NameFilter-dUTC31qA.js → NameFilter-BGJOxdjr.js} +4 -4
- package/dist/{NumberControl-Bi9ixtTO.js → NumberControl-B05C6ECd.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-BkEh0Ykh.js → NumberControlBase.vue_vue_type_script_setup_true_lang-B64ImWmo.js} +2 -2
- package/dist/{OneOfDropdown-BR4WCua4.js → OneOfDropdown-DFr8wkfK.js} +4 -4
- package/dist/{RadioButtonsWithDescriptionControl-C69ZDGN4.js → RadioButtonsWithDescriptionControl-FxnrFURa.js} +1 -1
- package/dist/{RadioControl-DnF-ishb.js → RadioControl-B3Wse8Ra.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-DvfaMgRR.js → RadioControlBase.vue_vue_type_script_setup_true_lang-B6fvhFpH.js} +2 -2
- package/dist/{ResourceControlBase-OgchIcbA.js → ResourceControlBase-CS-UW4Kt.js} +2 -2
- package/dist/{RichTextControl-sy7UyTn8.js → RichTextControl-BYuWpXlC.js} +1629 -1489
- package/dist/{SectionHeading-Dfcyl0Yz.js → SectionHeading-DH9g1jBv.js} +1 -1
- package/dist/{SectionLayout-CqIHiM2R.js → SectionLayout-DrSBiXd-.js} +3 -3
- package/dist/SettingsSubPanel-CZu70rLw.js +5 -0
- package/dist/{SettingsSubPanelLayout-DNEqHncD.js → SettingsSubPanelLayout-CR7zIFEo.js} +7 -7
- package/dist/{SimpleButtonControl-BKV86mQ0.js → SimpleButtonControl-B2fHLn6i.js} +8 -8
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-CwE6CdU-.js +28169 -0
- package/dist/SimpleTwinlistControl-BeebhKhJ.js +22 -0
- package/dist/{SingleSelectControl-CMEjgiNY.js → SingleSelectControl-W6KYjtSP.js} +2 -2
- package/dist/{SingleSelectListBoxControl-zUEWoGd8.js → SingleSelectListBoxControl-Cp_vbfKc.js} +3 -3
- package/dist/SortListControl-b3lDXyoN.js +103 -0
- package/dist/{StyledListItem-Dmiasg50.js → StyledListItem-B97G9CDY.js} +1 -1
- package/dist/{TeamAndSpacesControl-2B_pTWqM.js → TeamAndSpacesControl-BaOQSDum.js} +1 -1
- package/dist/{TeamResourceControl-BFCZeFBI.js → TeamResourceControl-DdB1fE3C.js} +2 -2
- package/dist/{TextAreaControl-DWtOmv7O.js → TextAreaControl-CVRPcJt8.js} +1 -1
- package/dist/{TextControl-DwAc1Lgx.js → TextControl-BqJncTor.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-BvSRuAqp.js → TextControl.vue_vue_type_script_setup_true_lang-C-5QWuaO.js} +2 -2
- package/dist/{TimeControl-n4lsWwMk.js → TimeControl-DvCOb5wo.js} +1 -1
- package/dist/{TimePartInput-DTxykHkb.js → TimePartInput-DGfV6WeZ.js} +1 -1
- package/dist/{TimeframesControl-CPnnV-IY.js → TimeframesControl-7oW8Nb-d.js} +2 -2
- package/dist/{Tooltip-CQD85sdp.js → Tooltip-ZO6iIct2.js} +1 -1
- package/dist/TwinlistControlBase.vue_vue_type_script_setup_true_lang-Ck66siqL.js +42 -0
- package/dist/{TypedStringFilter-7TKnShae.js → TypedStringFilter-cQS5GH50.js} +8 -9
- package/dist/{ValueSwitch-BuQf-fpg.js → ValueSwitch-BXc_PE8P.js} +6 -6
- package/dist/{ValueSwitchControl-DUWpTxo1.js → ValueSwitchControl-CZStDbmJ.js} +1 -1
- package/dist/{VerticalLayout-BR0nc-T3.js → VerticalLayout-BsGmnjxN.js} +2 -2
- package/dist/{VerticalLayoutBase-BmUvz2xm.js → VerticalLayoutBase-CEM6gzmm.js} +1 -1
- package/dist/{ZonedDateTimeControl-4Zlm92zJ.js → ZonedDateTimeControl-BrhYGJwr.js} +2 -2
- package/dist/{_Uint8Array-CgOaNCk1.js → _Uint8Array-DDNG27um.js} +14 -14
- package/dist/{_baseIteratee-B7GNekaD.js → _baseIteratee-CpLcQZ3B.js} +9 -9
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +113 -102
- package/dist/{localTimeUtils-GW01Jwt9.js → localTimeUtils-DA3ktTUE.js} +1671 -1579
- package/dist/{popper-D54JdmBM.js → popper-70nckCW_.js} +53 -53
- package/dist/src/renderers/defaultRenderers.d.ts +1 -930
- package/dist/src/renderers/sortListRenderer.d.ts +1 -930
- package/dist/src/uiComponents/SortListControl.vue.d.ts +2 -918
- package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +1 -1
- package/dist/src/uiComponents/twinlist/ManualTwinlistControl.vue.d.ts +2 -2
- package/dist/src/uiComponents/twinlist/MultimodeTwinlistControl.vue.d.ts +2 -8
- package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +1 -1
- package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/twinlist/TwinlistControlBase.vue.d.ts +2 -5
- package/dist/src/uiComponents/twinlist/TypedStringFilter.vue.d.ts +1 -1
- package/dist/src/uiComponents/twinlist/toKdsPossibleValues.d.ts +9 -0
- package/dist/testing.js +2 -2
- package/dist/toKdsPossibleValues-BklBg3gG.js +14 -0
- package/dist/{toString-EJiXsCqP.js → toString-N4qKgUAY.js} +1 -1
- package/dist/{useBuiltinValidations-C-jX-GU7.js → useBuiltinValidations-C3nXdk7R.js} +1 -1
- package/dist/{usePossibleValues-CdNvUspy.js → usePossibleValues-CdZtv_zD.js} +1 -1
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-De2_vatY.js → useUnknownValuesInTwinlist-BANpCttu.js} +6 -7
- package/package.json +5 -5
- package/dist/AnyOfTwinlist-BXOiwhPe.js +0 -22
- package/dist/DateTimeFormatPickerWithTypeControl-TpmjEZVL.js +0 -442
- package/dist/FileUploadControl-D3Awi7rK.js +0 -197
- package/dist/InputField-BPW3gcOb.js +0 -148
- package/dist/LoadingIcon-DWlZH7u-.js +0 -29
- package/dist/ManualTwinlistControl-Ag2U5qFU.js +0 -79
- package/dist/MultiSelectListBoxControl-yIxxGB8U.js +0 -31
- package/dist/MultimodeTwinlistControl-Cx8g1mbI.js +0 -598
- package/dist/SettingsSubPanel-B5IVsvuc.js +0 -5
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-D4snRy74.js +0 -26292
- package/dist/SimpleTwinlistControl-5zMN3nHL.js +0 -25
- package/dist/SortListControl-Rh42JVSy.js +0 -389
- package/dist/TwinlistControlBase-DpODIPuw.js +0 -57
- package/dist/TwinlistLoadingInfo-BwuYp151.js +0 -956
- package/dist/_baseAssignValue-DAm2gl_N.js +0 -19
- package/dist/_baseEach-CpynTt09.js +0 -30
- package/dist/createMissingItem-B00Kg95q.js +0 -4
- package/dist/navigator-e30QQMkl.js +0 -4
- package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +0 -2
- package/dist/useSearch-hpyYQ_6y.js +0 -74
|
@@ -1,598 +0,0 @@
|
|
|
1
|
-
import { resolveComponent as f, openBlock as m, createElementBlock as S, normalizeClass as M, Fragment as J, renderList as Q, createBlock as g, withCtx as c, renderSlot as k, createTextVNode as X, toDisplayString as I, createElementVNode as V, toRef as L, createVNode as b, createCommentVNode as P, normalizeProps as _, guardReactiveProps as B, mergeProps as A, defineComponent as Y, ref as Z, computed as y, markRaw as $, unref as T, createSlots as ee } from "vue";
|
|
2
|
-
import { _ as U, a5 as te, a3 as z } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-D4snRy74.js";
|
|
3
|
-
import { m as ae } from "./index-Blg1O3Fz.js";
|
|
4
|
-
import { u as le, a as ne } from "./usePossibleValues-CdNvUspy.js";
|
|
5
|
-
import { a as se, S as ie, u as oe, T as de } from "./TwinlistLoadingInfo-BwuYp151.js";
|
|
6
|
-
import { u as re } from "./MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-De2_vatY.js";
|
|
7
|
-
import { f as D } from "./useSearch-hpyYQ_6y.js";
|
|
8
|
-
import { C as ue } from "./Checkbox-uBRF2ZKG.js";
|
|
9
|
-
import { V as ce } from "./ValueSwitch-BuQf-fpg.js";
|
|
10
|
-
const me = {
|
|
11
|
-
name: "Checkboxes",
|
|
12
|
-
components: {
|
|
13
|
-
Checkbox: ue
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
/**
|
|
17
|
-
* List of possible values. Each item must have an `id` and a `text` property.
|
|
18
|
-
* @example
|
|
19
|
-
* [{
|
|
20
|
-
* id: 'pdf',
|
|
21
|
-
* text: 'PDF'
|
|
22
|
-
* }, {
|
|
23
|
-
* id: 'XLS',
|
|
24
|
-
* text: 'Excel',
|
|
25
|
-
* }]
|
|
26
|
-
*/
|
|
27
|
-
possibleValues: {
|
|
28
|
-
type: Array,
|
|
29
|
-
default: () => [],
|
|
30
|
-
validator(e) {
|
|
31
|
-
return Array.isArray(e) ? e.every(
|
|
32
|
-
(a) => a.hasOwnProperty("id") && a.hasOwnProperty("text")
|
|
33
|
-
) : !1;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* Controls the alignment
|
|
38
|
-
*/
|
|
39
|
-
alignment: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "horizontal",
|
|
42
|
-
validator(e) {
|
|
43
|
-
return ["horizontal", "vertical"].includes(e);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
disabled: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: !1
|
|
49
|
-
},
|
|
50
|
-
isValid: {
|
|
51
|
-
default: !0,
|
|
52
|
-
type: Boolean
|
|
53
|
-
},
|
|
54
|
-
/**
|
|
55
|
-
* selected value (which is a list of ids of entries)
|
|
56
|
-
*/
|
|
57
|
-
modelValue: {
|
|
58
|
-
type: Array,
|
|
59
|
-
default: () => []
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
emits: ["update:modelValue"],
|
|
63
|
-
methods: {
|
|
64
|
-
validate() {
|
|
65
|
-
const e = !this.possibleValues.some((a) => a.invalid);
|
|
66
|
-
return {
|
|
67
|
-
isValid: e,
|
|
68
|
-
errorMessage: e ? null : "One or more of the selected items is invalid."
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
onUpdateModelValue(e, a) {
|
|
72
|
-
let t = Array.from(this.modelValue);
|
|
73
|
-
a ? t.indexOf(e) === -1 && t.push(e) : t = t.filter((o) => o !== e), consola.trace("Checkboxes value changed to", t), this.$emit("update:modelValue", t);
|
|
74
|
-
},
|
|
75
|
-
/**
|
|
76
|
-
* Is at least one checkbox checked?
|
|
77
|
-
* @returns {boolean}
|
|
78
|
-
*/
|
|
79
|
-
hasSelection() {
|
|
80
|
-
return this.$refs.boxes.some((e) => e.isChecked());
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
function pe(e, a, t, o, s, n) {
|
|
85
|
-
const p = f("Checkbox");
|
|
86
|
-
return m(), S("div", {
|
|
87
|
-
class: M(["checkboxes", t.alignment])
|
|
88
|
-
}, [
|
|
89
|
-
(m(!0), S(J, null, Q(t.possibleValues, (i) => (m(), g(p, {
|
|
90
|
-
ref_for: !0,
|
|
91
|
-
ref: "boxes",
|
|
92
|
-
key: `checkboxes-${i.id}`,
|
|
93
|
-
"model-value": t.modelValue.indexOf(i.id) > -1,
|
|
94
|
-
title: i.text,
|
|
95
|
-
invalid: i.invalid,
|
|
96
|
-
disabled: t.disabled,
|
|
97
|
-
class: "box",
|
|
98
|
-
"onUpdate:modelValue": (v) => n.onUpdateModelValue(i.id, v)
|
|
99
|
-
}, {
|
|
100
|
-
default: c(() => [
|
|
101
|
-
k(e.$slots, "label", { slotItem: i }, () => [
|
|
102
|
-
X(I(i.text), 1)
|
|
103
|
-
], !0)
|
|
104
|
-
]),
|
|
105
|
-
_: 2
|
|
106
|
-
}, 1032, ["model-value", "title", "invalid", "disabled", "onUpdate:modelValue"]))), 128))
|
|
107
|
-
], 2);
|
|
108
|
-
}
|
|
109
|
-
const he = /* @__PURE__ */ U(me, [["render", pe], ["__scopeId", "data-v-c83ea4f7"]]), ye = {
|
|
110
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
111
|
-
fill: "none",
|
|
112
|
-
stroke: "#000",
|
|
113
|
-
"stroke-linejoin": "round",
|
|
114
|
-
viewBox: "0 0 32 32"
|
|
115
|
-
};
|
|
116
|
-
function fe(e, a) {
|
|
117
|
-
return m(), S("svg", ye, [...a[0] || (a[0] = [
|
|
118
|
-
V("path", { d: "m13.31 27.81 5.11-3.19v-9.15L28.95 4.19H3.05l10.26 11.28z" }, null, -1)
|
|
119
|
-
])]);
|
|
120
|
-
}
|
|
121
|
-
const be = { render: fe }, ve = {
|
|
122
|
-
manual: "Manual",
|
|
123
|
-
wildcard: "Wildcard",
|
|
124
|
-
regex: "Regex",
|
|
125
|
-
type: "Type"
|
|
126
|
-
}, we = {
|
|
127
|
-
name: "MultiModeTwinlist",
|
|
128
|
-
components: {
|
|
129
|
-
Label: te,
|
|
130
|
-
FilterIcon: be,
|
|
131
|
-
SearchInput: ie,
|
|
132
|
-
Checkboxes: he,
|
|
133
|
-
ValueSwitch: ce,
|
|
134
|
-
Twinlist: se
|
|
135
|
-
},
|
|
136
|
-
props: {
|
|
137
|
-
/**
|
|
138
|
-
* initial values
|
|
139
|
-
*/
|
|
140
|
-
mode: {
|
|
141
|
-
type: String,
|
|
142
|
-
required: !1,
|
|
143
|
-
default: "manual"
|
|
144
|
-
},
|
|
145
|
-
manualSelection: {
|
|
146
|
-
type: [Object, Array, null],
|
|
147
|
-
default: () => []
|
|
148
|
-
},
|
|
149
|
-
pattern: {
|
|
150
|
-
type: String,
|
|
151
|
-
default: ""
|
|
152
|
-
},
|
|
153
|
-
caseSensitivePattern: {
|
|
154
|
-
default: !1,
|
|
155
|
-
type: Boolean
|
|
156
|
-
},
|
|
157
|
-
inversePattern: {
|
|
158
|
-
default: !1,
|
|
159
|
-
type: Boolean
|
|
160
|
-
},
|
|
161
|
-
withTypes: {
|
|
162
|
-
type: Boolean,
|
|
163
|
-
default: !0
|
|
164
|
-
},
|
|
165
|
-
selectedTypes: {
|
|
166
|
-
type: Array,
|
|
167
|
-
default: () => []
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* Hiding and disabling
|
|
171
|
-
*/
|
|
172
|
-
showMode: {
|
|
173
|
-
default: !0,
|
|
174
|
-
type: Boolean
|
|
175
|
-
},
|
|
176
|
-
// enable search in case of manual selection
|
|
177
|
-
showSearch: {
|
|
178
|
-
default: !0,
|
|
179
|
-
type: Boolean
|
|
180
|
-
},
|
|
181
|
-
disabled: {
|
|
182
|
-
default: !1,
|
|
183
|
-
type: Boolean
|
|
184
|
-
},
|
|
185
|
-
/**
|
|
186
|
-
* Labels
|
|
187
|
-
*/
|
|
188
|
-
withModeLabel: {
|
|
189
|
-
default: !1,
|
|
190
|
-
type: Boolean
|
|
191
|
-
},
|
|
192
|
-
modeLabel: {
|
|
193
|
-
type: String,
|
|
194
|
-
required: !1,
|
|
195
|
-
default: "Selection mode"
|
|
196
|
-
},
|
|
197
|
-
withPatternLabel: {
|
|
198
|
-
default: !1,
|
|
199
|
-
type: Boolean
|
|
200
|
-
},
|
|
201
|
-
patternLabel: {
|
|
202
|
-
type: String,
|
|
203
|
-
required: !1,
|
|
204
|
-
default: "Pattern"
|
|
205
|
-
},
|
|
206
|
-
withTypesLabel: {
|
|
207
|
-
default: !1,
|
|
208
|
-
type: Boolean
|
|
209
|
-
},
|
|
210
|
-
typesLabel: {
|
|
211
|
-
type: String,
|
|
212
|
-
required: !1,
|
|
213
|
-
default: "Selected types"
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* List of possible values. Each item must have an `id` and a `text` property
|
|
217
|
-
* @example
|
|
218
|
-
* [{
|
|
219
|
-
* id: 'pdf',
|
|
220
|
-
* text: 'PDF'
|
|
221
|
-
* }, {
|
|
222
|
-
* id: 'XLS',
|
|
223
|
-
* text: 'Excel',
|
|
224
|
-
* }]
|
|
225
|
-
* For type selection, additionally, an element has to have a property `type` wich itself has properties
|
|
226
|
-
* `id` and `text`, e.g.
|
|
227
|
-
* [{
|
|
228
|
-
* id: 'pdf',
|
|
229
|
-
* text: 'PDF',
|
|
230
|
-
* type: {
|
|
231
|
-
* id: 'StringValue',
|
|
232
|
-
* text: 'String'
|
|
233
|
-
* }]
|
|
234
|
-
*/
|
|
235
|
-
possibleValues: {
|
|
236
|
-
type: Array,
|
|
237
|
-
default: () => []
|
|
238
|
-
},
|
|
239
|
-
/**
|
|
240
|
-
* List of possible types which should be selectable but are not necessarily present in the possible values.
|
|
241
|
-
*/
|
|
242
|
-
additionalPossibleTypes: {
|
|
243
|
-
type: Array,
|
|
244
|
-
default: () => []
|
|
245
|
-
},
|
|
246
|
-
compact: {
|
|
247
|
-
type: Boolean,
|
|
248
|
-
default: !1
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
emits: [
|
|
252
|
-
// Prop updates
|
|
253
|
-
"update:manualSelection",
|
|
254
|
-
"update:pattern",
|
|
255
|
-
"update:selectedTypes",
|
|
256
|
-
"update:mode",
|
|
257
|
-
"update:caseSensitivePattern",
|
|
258
|
-
"update:inversePattern",
|
|
259
|
-
// Non-prop update
|
|
260
|
-
"update:selected"
|
|
261
|
-
],
|
|
262
|
-
setup(e) {
|
|
263
|
-
const { includedValues: a } = oe(
|
|
264
|
-
L(e, "manualSelection")
|
|
265
|
-
);
|
|
266
|
-
return { manuallySelected: a };
|
|
267
|
-
},
|
|
268
|
-
data() {
|
|
269
|
-
return {
|
|
270
|
-
invalidPossibleValueIds: /* @__PURE__ */ new Set()
|
|
271
|
-
};
|
|
272
|
-
},
|
|
273
|
-
computed: {
|
|
274
|
-
possibleValueIds() {
|
|
275
|
-
return this.possibleValues.map(({ id: e }) => e);
|
|
276
|
-
},
|
|
277
|
-
possibleTypes() {
|
|
278
|
-
const e = this.possibleValues.map(({ type: s }) => s).filter(Boolean), a = e.map((s) => s.id);
|
|
279
|
-
return [...this.additionalPossibleTypes.filter(
|
|
280
|
-
(s) => s && !a.includes(s.id)
|
|
281
|
-
), ...e].filter((s) => s && s.id !== "").filter(
|
|
282
|
-
// remove duplicates
|
|
283
|
-
(s, n, p) => n === p.findIndex((i) => i.id === s.id && i.text === s.text)
|
|
284
|
-
);
|
|
285
|
-
},
|
|
286
|
-
matchingValueIds() {
|
|
287
|
-
return this.possibleValues.filter((e) => this.itemMatches(e)).map((e) => e.id);
|
|
288
|
-
},
|
|
289
|
-
twinlistModelValue() {
|
|
290
|
-
return this.mode === "manual" ? this.manualSelection : this.matchingValueIds;
|
|
291
|
-
},
|
|
292
|
-
selectedValues() {
|
|
293
|
-
return this.mode === "manual" ? this.manuallySelected : this.matchingValueIds;
|
|
294
|
-
},
|
|
295
|
-
selectionDisabled() {
|
|
296
|
-
return this.disabled || this.mode !== "manual";
|
|
297
|
-
},
|
|
298
|
-
normalizedSearchTerm() {
|
|
299
|
-
return this.mode === "manual" ? null : D[this.mode].normalize(
|
|
300
|
-
this.mode === "type" ? this.selectedTypes : this.pattern,
|
|
301
|
-
this.caseSensitivePattern
|
|
302
|
-
);
|
|
303
|
-
},
|
|
304
|
-
possibleModes() {
|
|
305
|
-
let e = Object.entries(ve).map(([a, t]) => ({ id: a, text: t }));
|
|
306
|
-
return this.withTypes || (e = e.filter((a) => a.id !== "type")), e;
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
watch: {
|
|
310
|
-
selectedValues: {
|
|
311
|
-
immediate: !0,
|
|
312
|
-
handler(e, a) {
|
|
313
|
-
!a || e === null || (e.length !== a.length || a.some((t, o) => t !== e[o])) && this.$emit("update:selected", this.selectedValues);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
methods: {
|
|
318
|
-
onManualInput(e) {
|
|
319
|
-
this.mode === "manual" && this.$emit("update:manualSelection", e);
|
|
320
|
-
},
|
|
321
|
-
onPatternInput(e) {
|
|
322
|
-
this.$emit("update:pattern", e);
|
|
323
|
-
},
|
|
324
|
-
onTypeInput(e) {
|
|
325
|
-
this.$emit("update:selectedTypes", e, this.possibleTypes);
|
|
326
|
-
},
|
|
327
|
-
onModeChange(e) {
|
|
328
|
-
this.$emit("update:mode", e);
|
|
329
|
-
},
|
|
330
|
-
onToggleCaseSensitivePattern(e) {
|
|
331
|
-
this.$emit("update:caseSensitivePattern", e);
|
|
332
|
-
},
|
|
333
|
-
onToggleInversePattern(e) {
|
|
334
|
-
this.$emit("update:inversePattern", e);
|
|
335
|
-
},
|
|
336
|
-
validate() {
|
|
337
|
-
return this.$refs.twinlist.validate();
|
|
338
|
-
},
|
|
339
|
-
hasSelection() {
|
|
340
|
-
return !!this.selectedValues?.length;
|
|
341
|
-
},
|
|
342
|
-
itemMatches(e) {
|
|
343
|
-
return D[this.mode].test(
|
|
344
|
-
this.mode === "type" ? e.type?.id : e.text,
|
|
345
|
-
this.normalizedSearchTerm,
|
|
346
|
-
this.caseSensitivePattern,
|
|
347
|
-
this.inversePattern
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
function ge(e, a, t, o, s, n) {
|
|
353
|
-
const p = f("ValueSwitch"), i = f("Label"), v = f("FilterIcon"), x = f("SearchInput"), C = f("Checkboxes"), w = f("Twinlist");
|
|
354
|
-
return m(), S("div", {
|
|
355
|
-
class: M(["multi-mode-twinlist", { disabled: t.disabled }])
|
|
356
|
-
}, [
|
|
357
|
-
t.showMode ? (m(), g(i, {
|
|
358
|
-
key: 0,
|
|
359
|
-
active: t.withModeLabel,
|
|
360
|
-
text: t.modeLabel,
|
|
361
|
-
class: "label"
|
|
362
|
-
}, {
|
|
363
|
-
default: c(({ labelForId: u }) => [
|
|
364
|
-
b(p, {
|
|
365
|
-
id: u,
|
|
366
|
-
ref: "mode",
|
|
367
|
-
compact: t.compact,
|
|
368
|
-
"model-value": t.mode,
|
|
369
|
-
disabled: t.disabled,
|
|
370
|
-
"possible-values": n.possibleModes,
|
|
371
|
-
"onUpdate:modelValue": n.onModeChange
|
|
372
|
-
}, null, 8, ["id", "compact", "model-value", "disabled", "possible-values", "onUpdate:modelValue"])
|
|
373
|
-
]),
|
|
374
|
-
_: 1
|
|
375
|
-
}, 8, ["active", "text"])) : P("", !0),
|
|
376
|
-
t.mode === "regex" || t.mode === "wildcard" ? (m(), g(i, {
|
|
377
|
-
key: 1,
|
|
378
|
-
active: t.withPatternLabel,
|
|
379
|
-
text: t.patternLabel,
|
|
380
|
-
class: "label"
|
|
381
|
-
}, {
|
|
382
|
-
default: c(({ labelForId: u }) => [
|
|
383
|
-
b(x, {
|
|
384
|
-
id: u,
|
|
385
|
-
ref: "search",
|
|
386
|
-
"model-value": t.pattern,
|
|
387
|
-
label: t.patternLabel,
|
|
388
|
-
"initial-case-sensitive-search": t.caseSensitivePattern,
|
|
389
|
-
"initial-inverse-search": t.inversePattern,
|
|
390
|
-
placeholder: "Pattern",
|
|
391
|
-
"show-case-sensitive-search-button": "",
|
|
392
|
-
"show-inverse-search-button": "",
|
|
393
|
-
disabled: t.disabled,
|
|
394
|
-
tooltips: {
|
|
395
|
-
inverseSearch: "Move matching to other side"
|
|
396
|
-
},
|
|
397
|
-
compact: t.compact,
|
|
398
|
-
"onUpdate:modelValue": n.onPatternInput,
|
|
399
|
-
onToggleCaseSensitiveSearch: n.onToggleCaseSensitivePattern,
|
|
400
|
-
onToggleInverseSearch: n.onToggleInversePattern
|
|
401
|
-
}, {
|
|
402
|
-
icon: c(() => [
|
|
403
|
-
b(v)
|
|
404
|
-
]),
|
|
405
|
-
_: 1
|
|
406
|
-
}, 8, ["id", "model-value", "label", "initial-case-sensitive-search", "initial-inverse-search", "disabled", "compact", "onUpdate:modelValue", "onToggleCaseSensitiveSearch", "onToggleInverseSearch"])
|
|
407
|
-
]),
|
|
408
|
-
_: 1
|
|
409
|
-
}, 8, ["active", "text"])) : P("", !0),
|
|
410
|
-
t.mode === "type" && n.possibleTypes.length > 0 ? (m(), g(i, {
|
|
411
|
-
key: 2,
|
|
412
|
-
active: t.withTypesLabel,
|
|
413
|
-
text: t.typesLabel,
|
|
414
|
-
class: "label"
|
|
415
|
-
}, {
|
|
416
|
-
default: c(() => [
|
|
417
|
-
b(C, {
|
|
418
|
-
"model-value": t.selectedTypes,
|
|
419
|
-
"possible-values": n.possibleTypes,
|
|
420
|
-
disabled: t.disabled,
|
|
421
|
-
"onUpdate:modelValue": n.onTypeInput
|
|
422
|
-
}, {
|
|
423
|
-
label: c((u) => [
|
|
424
|
-
k(e.$slots, "type", _(B(u)), void 0, !0)
|
|
425
|
-
]),
|
|
426
|
-
_: 3
|
|
427
|
-
}, 8, ["model-value", "possible-values", "disabled", "onUpdate:modelValue"])
|
|
428
|
-
]),
|
|
429
|
-
_: 3
|
|
430
|
-
}, 8, ["active", "text"])) : P("", !0),
|
|
431
|
-
b(w, A(e.$attrs, {
|
|
432
|
-
ref: "twinlist",
|
|
433
|
-
disabled: n.selectionDisabled,
|
|
434
|
-
"show-search": t.mode === "manual" && t.showSearch,
|
|
435
|
-
"model-value": n.twinlistModelValue,
|
|
436
|
-
"possible-values": t.possibleValues,
|
|
437
|
-
compact: t.compact,
|
|
438
|
-
"onUpdate:modelValue": n.onManualInput
|
|
439
|
-
}), {
|
|
440
|
-
option: c((u) => [
|
|
441
|
-
k(e.$slots, "option", _(B(u)), void 0, !0)
|
|
442
|
-
]),
|
|
443
|
-
_: 3
|
|
444
|
-
}, 16, ["disabled", "show-search", "model-value", "possible-values", "compact", "onUpdate:modelValue"])
|
|
445
|
-
], 2);
|
|
446
|
-
}
|
|
447
|
-
const Te = /* @__PURE__ */ U(we, [["render", ge], ["__scopeId", "data-v-a4487686"]]), Ve = { class: "data-type-text" }, Se = /* @__PURE__ */ Y({
|
|
448
|
-
__name: "MultimodeTwinlistControl",
|
|
449
|
-
props: {
|
|
450
|
-
control: {},
|
|
451
|
-
handleChange: {},
|
|
452
|
-
changeValue: {},
|
|
453
|
-
disabled: { type: Boolean },
|
|
454
|
-
isValid: { type: Boolean },
|
|
455
|
-
onRegisterValidation: {},
|
|
456
|
-
labelForId: {},
|
|
457
|
-
twinlistSize: { default: 10 },
|
|
458
|
-
twinlistLeftLabel: { default: "Excludes" },
|
|
459
|
-
showUnknownValues: { type: Boolean, default: !1 },
|
|
460
|
-
twinlistRightLabel: { default: "Includes" },
|
|
461
|
-
showTypeFilter: { type: Boolean, default: !1 }
|
|
462
|
-
},
|
|
463
|
-
setup(e) {
|
|
464
|
-
const a = e;
|
|
465
|
-
let t = () => {
|
|
466
|
-
};
|
|
467
|
-
const o = (l) => {
|
|
468
|
-
const r = ae(a.control.data, l);
|
|
469
|
-
a.changeValue(r), t?.(r.manualFilter);
|
|
470
|
-
}, s = (l) => {
|
|
471
|
-
o({ selected: l });
|
|
472
|
-
}, n = (l) => {
|
|
473
|
-
if (l !== null)
|
|
474
|
-
if ("includedValues" in l) {
|
|
475
|
-
const { includedValues: r, excludedValues: d, includeUnknownValues: h } = l;
|
|
476
|
-
if (!r || !d)
|
|
477
|
-
return;
|
|
478
|
-
o({
|
|
479
|
-
manualFilter: {
|
|
480
|
-
manuallySelected: r,
|
|
481
|
-
manuallyDeselected: d,
|
|
482
|
-
includeUnknownColumns: h
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
|
-
} else
|
|
486
|
-
o({ manualFilter: { manuallySelected: l } });
|
|
487
|
-
}, p = (l) => {
|
|
488
|
-
o({ patternFilter: { pattern: l } });
|
|
489
|
-
}, i = (l) => {
|
|
490
|
-
o({ mode: l.toUpperCase() });
|
|
491
|
-
}, v = (l, r) => {
|
|
492
|
-
o({ typeFilter: { selectedTypes: l, typeDisplays: r } });
|
|
493
|
-
}, x = (l) => {
|
|
494
|
-
o({ patternFilter: { isInverted: l } });
|
|
495
|
-
}, C = (l) => {
|
|
496
|
-
o({ patternFilter: { isCaseSensitive: l } });
|
|
497
|
-
}, { possibleValues: w } = le(
|
|
498
|
-
L(a, "control")
|
|
499
|
-
), u = Z([]), { selectedAndDeselected: F, setCurrentManualFilter: O } = re({
|
|
500
|
-
data: y(() => a.control.data),
|
|
501
|
-
possibleValueIds: y(
|
|
502
|
-
() => w.value?.map(({ id: l }) => l) ?? null
|
|
503
|
-
)
|
|
504
|
-
});
|
|
505
|
-
t = O;
|
|
506
|
-
const R = y(() => {
|
|
507
|
-
const { selected: l, deselected: r } = F.value;
|
|
508
|
-
return a.showUnknownValues ? {
|
|
509
|
-
includedValues: l,
|
|
510
|
-
excludedValues: r,
|
|
511
|
-
includeUnknownValues: a.control.data.manualFilter.includeUnknownColumns
|
|
512
|
-
} : l;
|
|
513
|
-
}), q = y(
|
|
514
|
-
() => F.value.selected === null ? $(de) : null
|
|
515
|
-
), E = (l) => typeof l > "u" ? {} : l.reduce(
|
|
516
|
-
(r, { id: d, text: h }) => ({ ...r, [d]: h }),
|
|
517
|
-
{}
|
|
518
|
-
), N = () => {
|
|
519
|
-
const l = a.control.data.typeFilter;
|
|
520
|
-
if (!l)
|
|
521
|
-
return [];
|
|
522
|
-
const r = l.selectedTypes, d = E(
|
|
523
|
-
l.typeDisplays
|
|
524
|
-
);
|
|
525
|
-
return r.map((h) => ({
|
|
526
|
-
id: h,
|
|
527
|
-
text: d[h] || h
|
|
528
|
-
}));
|
|
529
|
-
};
|
|
530
|
-
u.value = N();
|
|
531
|
-
const j = y(
|
|
532
|
-
() => !!w.value?.[0]?.hasOwnProperty("type")
|
|
533
|
-
), { excludedLabel: H, includedLabel: K } = ne(
|
|
534
|
-
L(a, "control")
|
|
535
|
-
), W = y(() => H ?? a.twinlistLeftLabel), G = y(() => K ?? a.twinlistRightLabel);
|
|
536
|
-
return (l, r) => (m(), g(T(Te), A(l.$attrs, {
|
|
537
|
-
id: e.labelForId,
|
|
538
|
-
disabled: e.disabled,
|
|
539
|
-
"with-types": e.showTypeFilter,
|
|
540
|
-
"selected-types": e.control.data.typeFilter?.selectedTypes,
|
|
541
|
-
"additional-possible-types": u.value,
|
|
542
|
-
pattern: e.control.data.patternFilter.pattern,
|
|
543
|
-
mode: e.control.data.mode.toLowerCase(),
|
|
544
|
-
"case-sensitive-pattern": e.control.data.patternFilter.isCaseSensitive,
|
|
545
|
-
"empty-state-component": q.value,
|
|
546
|
-
"inverse-pattern": e.control.data.patternFilter.isInverted,
|
|
547
|
-
"manual-selection": R.value,
|
|
548
|
-
"include-unknown-values": e.control.data.manualFilter.includeUnknownColumns,
|
|
549
|
-
"mode-label": "Selection mode",
|
|
550
|
-
"possible-values": T(w) ?? [],
|
|
551
|
-
size: e.twinlistSize,
|
|
552
|
-
"left-label": W.value,
|
|
553
|
-
"right-label": G.value,
|
|
554
|
-
"is-valid": e.isValid,
|
|
555
|
-
compact: "",
|
|
556
|
-
"show-resize-handle": "",
|
|
557
|
-
"onUpdate:selected": s,
|
|
558
|
-
"onUpdate:manualSelection": n,
|
|
559
|
-
"onUpdate:pattern": p,
|
|
560
|
-
"onUpdate:mode": i,
|
|
561
|
-
"onUpdate:selectedTypes": v,
|
|
562
|
-
"onUpdate:inversePattern": x,
|
|
563
|
-
"onUpdate:caseSensitivePattern": C
|
|
564
|
-
}), ee({ _: 2 }, [
|
|
565
|
-
j.value ? {
|
|
566
|
-
name: "option",
|
|
567
|
-
fn: c(({ slotItem: d }) => [
|
|
568
|
-
V("div", {
|
|
569
|
-
class: M(["data-type-entry", { invalid: d.invalid }])
|
|
570
|
-
}, [
|
|
571
|
-
b(T(z), {
|
|
572
|
-
"icon-name": d?.type?.id,
|
|
573
|
-
"icon-title": d?.type?.text,
|
|
574
|
-
size: "small"
|
|
575
|
-
}, null, 8, ["icon-name", "icon-title"]),
|
|
576
|
-
V("span", null, I(d.text), 1)
|
|
577
|
-
], 2)
|
|
578
|
-
]),
|
|
579
|
-
key: "0"
|
|
580
|
-
} : void 0,
|
|
581
|
-
e.showTypeFilter ? {
|
|
582
|
-
name: "type",
|
|
583
|
-
fn: c(({ slotItem: d }) => [
|
|
584
|
-
b(T(z), {
|
|
585
|
-
"icon-name": d.id,
|
|
586
|
-
"icon-title": d.text,
|
|
587
|
-
size: "small"
|
|
588
|
-
}, null, 8, ["icon-name", "icon-title"]),
|
|
589
|
-
V("span", Ve, I(d.text), 1)
|
|
590
|
-
]),
|
|
591
|
-
key: "1"
|
|
592
|
-
} : void 0
|
|
593
|
-
]), 1040, ["id", "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", "is-valid"]));
|
|
594
|
-
}
|
|
595
|
-
}), _e = /* @__PURE__ */ U(Se, [["__scopeId", "data-v-0aa76d2b"]]);
|
|
596
|
-
export {
|
|
597
|
-
_e as default
|
|
598
|
-
};
|