@knime/scripting-editor 0.0.149 → 0.0.150
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/{AnyOfTwinlist-DdcxtAjb-CaN_HwzO.js → AnyOfTwinlist-DdcxtAjb-QRuNcffK.js} +3 -3
- package/dist/{ArrayLayout-Cqct4YS3.js → ArrayLayout-CiNvK2R8.js} +204 -193
- package/dist/ButtonControl-XAPpl7GY.js +116 -0
- package/dist/{CheckboxControl-C99OdmDL-CDrrcyc8.js → CheckboxControl-C99OdmDL-Do7Fm1Hf.js} +12 -12
- package/dist/{CheckboxesControl-BZhMhT9x-DX6Wv2OC.js → CheckboxesControl-BZhMhT9x-Pc8YrIvQ.js} +3 -3
- package/dist/{CodeEditorControl-C0nEU4Bk.js → CodeEditorControl-BZlds1_z.js} +1 -1
- package/dist/{ColorControl-D1dNnNbO-ZnPFuKHS.js → ColorControl-D1dNnNbO-D2ewwNgx.js} +1 -1
- package/dist/{ColorPreviewControl-B4zix2kb-lDW3LcbF.js → ColorPreviewControl-B4zix2kb-C8iUsUfi.js} +10 -10
- package/dist/{ComboBoxControl-BGWAD9IW-CYGoHz_u.js → ComboBoxControl-BGWAD9IW-Dqnlk__Q.js} +2 -2
- package/dist/{ConfigurationNodeNotSupported-D-Rxn0Gi.js → ConfigurationNodeNotSupported-CGclvYAj.js} +6 -6
- package/dist/{ControlWithSubParameters-C3O8tagW.js → ControlWithSubParameters-D_0dvLqM.js} +10 -10
- package/dist/{CredentialsControl-DaEBQpvd.js → CredentialsControl-uYcyYidL.js} +2 -2
- package/dist/{CredentialsControlBase-BivCOrno.js → CredentialsControlBase-u4DXxRC0.js} +7 -7
- package/dist/{DateControl-D0HfVrtz-9eE4B_fe.js → DateControl-D0HfVrtz-Bt1CkhVc.js} +3 -3
- package/dist/{DateTimeControl-kTQZI9JC-DmnFBKmN.js → DateTimeControl-kTQZI9JC-DT157PDM.js} +3 -3
- package/dist/{DateTimeFormatPickerControl-BiYcsKSn-xVSLrwBl.js → DateTimeFormatPickerControl-BiYcsKSn-CMda9u5J.js} +5 -5
- package/dist/{DirtyTrackerRenderer-DMDmrGOs.js → DirtyTrackerRenderer-BePhAn76.js} +3 -3
- package/dist/{DropdownControl-jsayV3N5-8v3EQUz3.js → DropdownControl-jsayV3N5-Dsha5hge.js} +3 -3
- package/dist/{ExecutorCoresControl-DNo2SaC6-BoEm-W4r.js → ExecutorCoresControl-DNo2SaC6-BkcAA9UN.js} +2 -2
- package/dist/{ExecutorMemoryControl-C8RLYQdd-B8ZEGYAX.js → ExecutorMemoryControl-C8RLYQdd-Cedm5trN.js} +2 -2
- package/dist/{FileChooserControl-DNfgbEr3.js → FileChooserControl-Ct51fY7Z.js} +1 -1
- package/dist/{FileChooserControlBase-BozmAfJW.js → FileChooserControlBase-CGo0zU3e.js} +35 -35
- package/dist/{FileChooserControlForMultiFile-B21mwjMa.js → FileChooserControlForMultiFile-Dh_WXtgn.js} +1 -1
- package/dist/{FileUploadControl-D5QfM3Wa-DXqlNHXY.js → FileUploadControl-D5QfM3Wa-7kqQRO4-.js} +1 -1
- package/dist/FlowVariableButtonWrapper-mLnms8yQ.js +466 -0
- package/dist/FlowVariableSelector-C4IiVzue.js +162 -0
- package/dist/{GridSelectionControl-RKdnWWGk-CqxxipH6.js → GridSelectionControl-RKdnWWGk-naGGUZCh.js} +13 -13
- package/dist/{HorizontalLayout-B_lETfCu-CQVlABjY.js → HorizontalLayout-B_lETfCu-BZK7jH4z.js} +2 -2
- package/dist/{IntegerControl-Cr8SO0xH-DmFardsB.js → IntegerControl-Cr8SO0xH-lclR3djp.js} +2 -2
- package/dist/{IntervalControl-BdjKEwLy-CRGsrkTU.js → IntervalControl-BdjKEwLy-C_LCaU8r.js} +6 -6
- package/dist/{LabeledGroup-BSlRYaIO.js → LabeledGroup-C4WOU_qE.js} +1 -1
- package/dist/{LegacyCredentialsControl-DDppdKDf.js → LegacyCredentialsControl-CuFuBunJ.js} +11 -11
- package/dist/{LinkControl-QMwkCJlj-D7KOgNqO.js → LinkControl-QMwkCJlj-DZRZvKsJ.js} +8 -8
- package/dist/{LoadingDropdown-BpU4Uiin-DDrrGAtm.js → LoadingDropdown-BpU4Uiin-DpT8YNnA.js} +1 -1
- package/dist/{ManualTwinlistControl-5dfnmQZ--BLDAtepu.js → ManualTwinlistControl-5dfnmQZ--9BVHFNRR.js} +5 -5
- package/dist/{MultiFileChooserControl-yLU6lVm6.js → MultiFileChooserControl-Buzeme6N.js} +54 -54
- package/dist/{NameFilter-DzqgrcaF-BHDDEtD7.js → NameFilter-DzqgrcaF-Cl38kTPw.js} +2 -2
- package/dist/{NumberControl-ODy5GAlR-DqeFhQlG.js → NumberControl-ODy5GAlR-IQBNh99B.js} +2 -2
- package/dist/{NumberControlBase-Cl3QcvzB-CLt8mpCC.js → NumberControlBase-Cl3QcvzB-DLl4RMsa.js} +5 -5
- package/dist/{OneOfDropdown-CMPRAraI-D0fD0jJG.js → OneOfDropdown-CMPRAraI-DyOs4qXq.js} +2 -2
- package/dist/{ProgressButtonControl-hlI6JZ-z-iW0cQ79f.js → ProgressButtonControl-hlI6JZ-z-C3y7IOhk.js} +12 -12
- package/dist/{RadioButtonsWithDescriptionControl-DJu3ODo7-BVxmFTjy.js → RadioButtonsWithDescriptionControl-DJu3ODo7-BvOWhYc3.js} +9 -9
- package/dist/{RadioControl-D_NE5s4n-CBhjB07g.js → RadioControl-D_NE5s4n-DQ3orr8G.js} +2 -2
- package/dist/{RadioControlBase-knF86px0-M-iKdCgZ.js → RadioControlBase-knF86px0-CNYDwFjA.js} +3 -3
- package/dist/{ResourceControlBase-BVMVVYns-CCmfdMoZ.js → ResourceControlBase-BVMVVYns-DHo4NA_m.js} +17 -17
- package/dist/{RichTextControl-JIM904_P-Cz7wPLpv.js → RichTextControl-JIM904_P-CCTpWWMW.js} +2717 -2697
- package/dist/{SectionLayout-Ca6XH3w3-C31MJtZ9.js → SectionLayout-Ca6XH3w3-Civ901Ea.js} +3 -3
- package/dist/{SettingsSubPanelLayout-B7QJ7YhZ-BVhurigk.js → SettingsSubPanelLayout-B7QJ7YhZ-Dmgm0Ir9.js} +20 -20
- package/dist/{SimpleTwinlistControl-CQ4tSh0c-D-AFsdOr.js → SimpleTwinlistControl-CQ4tSh0c-Ce_hUVf7.js} +3 -3
- package/dist/{SingleSelectControl-CJV9VMZm-jwZqt2tP.js → SingleSelectControl-CJV9VMZm-Bk8t6TSw.js} +3 -3
- package/dist/{SortListControl-D-ifoRva-VjNJfqzM.js → SortListControl-D-ifoRva-CJZ3kNt9.js} +5 -5
- package/dist/{StringFileChooserControl-BWoTwYp2.js → StringFileChooserControl-HEpT7Ip7.js} +8 -8
- package/dist/{TeamAndSpacesControl-D1FvyeCV-QFi264Nj.js → TeamAndSpacesControl-D1FvyeCV-DnRJHhj4.js} +9 -9
- package/dist/{TeamResourceControl-DyCO6-Nk-DHNrRSMY.js → TeamResourceControl-DyCO6-Nk-BI-LwsIM.js} +2 -2
- package/dist/{TextAreaControl-7QziyTgn-BniXqehe.js → TextAreaControl-7QziyTgn-BtBO7YNu.js} +1 -1
- package/dist/{TimeControl-B29iTlhP-eYfkjPai.js → TimeControl-B29iTlhP-e7HifMYl.js} +3 -3
- package/dist/{TimeframesControl-Wvu--J0V-DhhqpxZS.js → TimeframesControl-Wvu--J0V-BuY4sciw.js} +9 -9
- package/dist/{TwinlistControlBase-CaRdq20R-BspKBwDU.js → TwinlistControlBase-CaRdq20R-Dc80qJgM.js} +3 -3
- package/dist/{TypedStringFilter-B3ZMqGIC-D3eyvWTQ.js → TypedStringFilter-B3ZMqGIC-ByKsSSQ4.js} +2 -2
- package/dist/{ValueSwitchControl-H2t2Wgo6-Dkr6ED74.js → ValueSwitchControl-H2t2Wgo6-CQw22eR0.js} +2 -2
- package/dist/{VennDiagramLayout-rZsnxKb8.js → VennDiagramLayout-BiBLF_be.js} +15 -15
- package/dist/{VerticalLayout-sPAmI_XK-BHSQFbh5.js → VerticalLayout-sPAmI_XK-BZz3aVLy.js} +2 -2
- package/dist/{ZonedDateTimeControl-Co3v2EVv-fcHef5TR.js → ZonedDateTimeControl-Co3v2EVv-mFgzT9ZR.js} +2 -2
- package/dist/{_plugin-vue_export-helper-B3ysoDQm-C4BqYrqY.js → _plugin-vue_export-helper-B3ysoDQm-jCLY2oWQ.js} +1 -1
- package/dist/elementCheckboxRenderer-BTDQ1ITf.js +117 -0
- package/dist/{fileChooserRenderer-CqIzTlME.js → fileChooserRenderer-C9ULvJjo.js} +3 -3
- package/dist/{inject-DEsHVs5q-zP4nUeAa.js → inject-DEsHVs5q-ChUMe45j.js} +1 -1
- package/dist/lib/main.d.ts +5 -3
- package/dist/main.js +764 -692
- package/dist/parameters.js +469 -647
- package/dist/{paths-DH9g52IX.js → paths-daLajhdU.js} +9 -6
- package/dist/{plainDateTimeUtils-5uOCJ4N5-DRHKOepZ.js → plainDateTimeUtils-5uOCJ4N5-3VUpuprJ.js} +2 -2
- package/dist/{rolldown-runtime-Dy4uBu1J-Cwht8A8-.js → rolldown-runtime-Dy4uBu1J-DiUrVT6I.js} +1 -1
- package/dist/settings-service-browser-mock.js +13 -5
- package/dist/src/components/MainEditorPane.vue.d.ts +74 -7
- package/dist/src/components/ScriptingEditor.vue.d.ts +0 -23
- package/dist/src/editor.d.ts +1 -1
- package/dist/src/settings-service-browser-mock.d.ts +3 -4
- package/dist/src/settings-service.d.ts +3 -35
- package/dist/src/store/settings.d.ts +52 -0
- package/dist/src-pw1LRAdm-uu-I1-YX.js +1246 -0
- package/dist/{temporal-polyfill-D4u1I_Z--enRiDjrC.js → temporal-polyfill-D4u1I_Z--B8F1flcx.js} +1 -1
- package/dist/{toKdsPossibleValues-BAEvyJCk-COlZpol8.js → toKdsPossibleValues-BAEvyJCk-Dww9tu-1.js} +1 -1
- package/dist/useArrayIds-CpJmT5_d.js +28 -0
- package/dist/{useBuiltinValidations-B_Drc2y--BIe8Vj_8.js → useBuiltinValidations-B_Drc2y--vtgmNI5H.js} +2 -2
- package/dist/{useDirtySettings-C_JB8Tb9.js → useDirtySettings-DVDbAZgX.js} +1 -1
- package/dist/{useFileChooserBrowseOptions-l1i9z66C.js → useFileChooserBrowseOptions-ClAKTcw1.js} +16 -16
- package/dist/{useFlowVariables-BFaB9PV-.js → useFlowVariables-BPi2ZpWk.js} +8 -8
- package/dist/{usePossibleValues-Cx6iSt_X-BlD7PZcJ.js → usePossibleValues-Cx6iSt_X-Ch5oJkDE.js} +2 -2
- package/dist/{useProvideForFlowVariables-AgNwtMFv.js → useProvideForFlowVariables-Ck3YUR2C.js} +2 -2
- package/dist/{useProvidedState-478_KXOe-KGpEF13j.js → useProvidedState-478_KXOe-Dpb35s5s.js} +2 -2
- package/dist/{useSideDrawerContent-Bl7nrXfr.js → useSideDrawerContent-BKwzHoq0.js} +2 -2
- package/dist/{useUnknownValuesInTwinlist-CHB8kt9t-Bak4ZAxt.js → useUnknownValuesInTwinlist-CHB8kt9t-C4bjDxVB.js} +30 -30
- package/dist/{useUpdates-Binc_B7h.js → useUpdates-Db1ELMwP.js} +60 -60
- package/dist/{utils-DmZLgn8X-D9PS3NK4.js → utils-DmZLgn8X-yDkNNqcu.js} +1 -1
- package/package.json +2 -2
- package/dist/ButtonControl-JfX5cPMH.js +0 -117
- package/dist/ai-bar-DEyz4yf0.js +0 -332
- package/dist/elementCheckboxRenderer-CfYz9-5L.js +0 -214
- package/dist/src-pw1LRAdm-BUOXZfmX.js +0 -1246
- package/dist/useArrayIds-CvcfiogC.js +0 -29
- package/dist/v4-Dd9glBki.js +0 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./FileChooserControlBase-
|
|
1
|
+
import { t as e } from "./FileChooserControlBase-CGo0zU3e.js";
|
|
2
2
|
import { createBlock as t, defineComponent as n, mergeProps as r, openBlock as i } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region ../core-ui/src/nodeDialog/uiComponents/fileChooser/withTabs/FileChooserControlForMultiFile.vue
|
package/dist/{FileUploadControl-D5QfM3Wa-DXqlNHXY.js → FileUploadControl-D5QfM3Wa-7kqQRO4-.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./dist-iAFUw6uq.js";
|
|
2
2
|
import { computed as t, createBlock as n, defineComponent as r, openBlock as i, unref as a, useTemplateRef as o } from "vue";
|
|
3
|
-
//#region ../../node_modules/.pnpm/@knime+jsonforms@5.1.1_@knime+kds-components@11.0.0_@vueuse+core@14.4.0_vue@3.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/@knime+jsonforms@5.1.1_@knime+kds-components@11.0.0_@vueuse+core@14.4.0_vue@3.5.18_type_8d51cc9ea2721872177fa4b0010b5104/node_modules/@knime/jsonforms/dist/FileUploadControl-D5QfM3Wa.js
|
|
4
4
|
var s = /* @__PURE__ */ r({
|
|
5
5
|
__name: "FileUploadControl",
|
|
6
6
|
props: {
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./knime-io-B5eFG9KP.js";
|
|
3
|
+
import { n as i, s as a } from "./useFlowVariables-BPi2ZpWk.js";
|
|
4
|
+
import { a as o } from "./paths-daLajhdU.js";
|
|
5
|
+
import { G as s, L as c } from "./dist-iAFUw6uq.js";
|
|
6
|
+
import { i as ee, n as l, r as te, s as ne, t as u } from "./FlowVariableSelector-C4IiVzue.js";
|
|
7
|
+
import { t as d } from "./useProvideForFlowVariables-Ck3YUR2C.js";
|
|
8
|
+
import { KdsCodeEditor as f, setupMonacoEnvironment as p } from "@knime/kds-code-editor";
|
|
9
|
+
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createVNode as y, defineComponent as b, getCurrentInstance as re, h as ie, nextTick as ae, onMounted as x, onUnmounted as S, openBlock as C, provide as oe, reactive as w, readonly as se, ref as T, render as ce, renderList as le, shallowRef as E, unref as D, watch as O, watchEffect as ue, withCtx as de } from "vue";
|
|
10
|
+
import * as k from "monaco-editor";
|
|
11
|
+
import { AlertingService as fe, DialogService as pe, JsonDataService as me } from "@knime/ui-extension-service";
|
|
12
|
+
//#region src/editor.ts
|
|
13
|
+
p();
|
|
14
|
+
var A = {
|
|
15
|
+
glyphMargin: !1,
|
|
16
|
+
lightbulb: { enabled: k.editor.ShowLightbulbIconMode.OnCode },
|
|
17
|
+
scrollBeyondLastLine: !0,
|
|
18
|
+
suggest: {
|
|
19
|
+
showWords: !1,
|
|
20
|
+
snippetsPreventQuickSuggestions: !1
|
|
21
|
+
},
|
|
22
|
+
lineDecorationsWidth: "0.0ch"
|
|
23
|
+
}, he = {
|
|
24
|
+
minimap: { enabled: !1 },
|
|
25
|
+
automaticLayout: !0,
|
|
26
|
+
fixedOverflowWidgets: !0,
|
|
27
|
+
fontFamily: "\"Roboto Mono\", serif",
|
|
28
|
+
fontWeight: "400",
|
|
29
|
+
lineNumbersMinChars: 3,
|
|
30
|
+
scrollbar: { alwaysConsumeMouseWheel: !1 },
|
|
31
|
+
...A,
|
|
32
|
+
renderOverviewRuler: !1,
|
|
33
|
+
overviewRulerBorder: !1,
|
|
34
|
+
originalEditable: !1
|
|
35
|
+
}, ge = "Script", j = (e, t) => t === void 0 ? e === "plaintext" ? ge : e.toUpperCase() : t, M = /* @__PURE__ */ new WeakMap(), _e = (e) => {
|
|
36
|
+
let t = M.get(e);
|
|
37
|
+
if (t !== void 0) {
|
|
38
|
+
if (t > 1) {
|
|
39
|
+
M.set(e, t - 1);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
M.delete(e), e.dispose();
|
|
43
|
+
}
|
|
44
|
+
}, ve = (e) => {
|
|
45
|
+
if ("editorModel" in e) return {
|
|
46
|
+
model: e.editorModel,
|
|
47
|
+
release: () => {}
|
|
48
|
+
};
|
|
49
|
+
let t = k.Uri.parse(`inmemory://model/${e.fileName}`), n = k.editor.getModel(t), r = n ?? k.editor.createModel("", e.language, t), i = M.get(r);
|
|
50
|
+
return (!n || i !== void 0) && M.set(r, (i ?? 0) + 1), {
|
|
51
|
+
model: r,
|
|
52
|
+
release: () => _e(r)
|
|
53
|
+
};
|
|
54
|
+
}, N = (e) => {
|
|
55
|
+
let t = T(e.getValue()), n = e.onDidChangeContent(() => {
|
|
56
|
+
t.value = e.getValue();
|
|
57
|
+
});
|
|
58
|
+
return S(() => n.dispose()), {
|
|
59
|
+
text: h({
|
|
60
|
+
get: () => t.value,
|
|
61
|
+
set: (t) => {
|
|
62
|
+
e.pushStackElement(), e.pushEditOperations([], [{
|
|
63
|
+
range: e.getFullModelRange(),
|
|
64
|
+
text: t
|
|
65
|
+
}], () => null);
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
setInitialText: (t) => e.setValue(t)
|
|
69
|
+
};
|
|
70
|
+
}, P = (e) => {
|
|
71
|
+
if (e.value === void 0) throw Error("Could not create code editor because no element was provided.");
|
|
72
|
+
}, ye = (e, t) => () => {
|
|
73
|
+
e.value && e.value.dispose();
|
|
74
|
+
for (let e of t) e.isAttachedToEditor() || e.dispose();
|
|
75
|
+
}, be = (e) => (t, n) => {
|
|
76
|
+
if (e.value?.getOption(k.editor.EditorOption.readOnly)) return;
|
|
77
|
+
let r = [];
|
|
78
|
+
n && !e.value?.getModel()?.getValue().includes(n) && r.push({
|
|
79
|
+
range: new k.Selection(1, 1, 1, 1),
|
|
80
|
+
text: `${n}\n`,
|
|
81
|
+
forceMoveMarkers: !0
|
|
82
|
+
}), r.push({
|
|
83
|
+
range: e.value?.getSelection(),
|
|
84
|
+
text: t,
|
|
85
|
+
forceMoveMarkers: !0
|
|
86
|
+
}), e.value?.getModel()?.pushEditOperations([], r, () => null), e.value?.getModel()?.pushStackElement();
|
|
87
|
+
}, xe = (e) => (t) => {
|
|
88
|
+
if (e.value?.getOption(k.editor.EditorOption.readOnly)) return;
|
|
89
|
+
let n = [{
|
|
90
|
+
range: e.value?.getSelection(),
|
|
91
|
+
text: t,
|
|
92
|
+
forceMoveMarkers: !0
|
|
93
|
+
}];
|
|
94
|
+
e.value?.getModel()?.pushEditOperations([], n, () => null), e.value?.getModel()?.pushStackElement();
|
|
95
|
+
}, F = (e, t, n, { selection: r, selectedLines: i }) => {
|
|
96
|
+
let a = e.getModel();
|
|
97
|
+
a !== t && (e.setModel(t), a?.dispose()), e.updateOptions({
|
|
98
|
+
...A,
|
|
99
|
+
...n.extraEditorOptions ?? {}
|
|
100
|
+
}), e.onDidChangeCursorSelection((e) => {
|
|
101
|
+
r.value = t.getValueInRange(e.selection), i.value = t.getValueInRange({
|
|
102
|
+
startLineNumber: e.selection.startLineNumber,
|
|
103
|
+
startColumn: 0,
|
|
104
|
+
endLineNumber: e.selection.endLineNumber,
|
|
105
|
+
endColumn: t.getLineLastNonWhitespaceColumn(e.selection.endLineNumber)
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}, I = (e) => {
|
|
109
|
+
let t = E(), { model: n, release: r } = ve(e), i = T(""), a = T("");
|
|
110
|
+
return {
|
|
111
|
+
editor: t,
|
|
112
|
+
editorModel: n,
|
|
113
|
+
releaseEditorModel: r,
|
|
114
|
+
selection: i,
|
|
115
|
+
selectedLines: a,
|
|
116
|
+
returnValue: {
|
|
117
|
+
editor: t,
|
|
118
|
+
editorModel: n,
|
|
119
|
+
selection: se(i),
|
|
120
|
+
selectedLines: se(a),
|
|
121
|
+
insertColumnReference: be(t),
|
|
122
|
+
insertText: xe(t),
|
|
123
|
+
...N(n)
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}, Se = (e) => {
|
|
127
|
+
let { editor: t, editorModel: n, releaseEditorModel: r, selection: i, selectedLines: a, returnValue: o } = I(e), s = re()?.appContext ?? null;
|
|
128
|
+
return x(() => {
|
|
129
|
+
P(e.container);
|
|
130
|
+
let r = ie(f, {
|
|
131
|
+
overviewRuler: !0,
|
|
132
|
+
language: n.getLanguageId(),
|
|
133
|
+
languageLabel: j(n.getLanguageId(), e.languageLabel),
|
|
134
|
+
onVnodeMounted: () => {
|
|
135
|
+
let o = r.component.exposed.getEditor();
|
|
136
|
+
F(o, n, e, {
|
|
137
|
+
selection: i,
|
|
138
|
+
selectedLines: a
|
|
139
|
+
}), t.value = o;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
r.appContext = s, ce(r, e.container.value);
|
|
143
|
+
}), S(() => {
|
|
144
|
+
e.container.value && ce(null, e.container.value), ae(r);
|
|
145
|
+
}), o;
|
|
146
|
+
}, L = (e, t) => {
|
|
147
|
+
let { editor: n, editorModel: r, releaseEditorModel: i, selection: a, selectedLines: o, returnValue: s } = I(t), c = h(() => ({
|
|
148
|
+
modelValue: s.text.value,
|
|
149
|
+
language: r.getLanguageId(),
|
|
150
|
+
languageLabel: j(r.getLanguageId(), t.languageLabel),
|
|
151
|
+
overviewRuler: !0
|
|
152
|
+
}));
|
|
153
|
+
return O(e, (e) => {
|
|
154
|
+
let i = e?.getEditor();
|
|
155
|
+
if (!i) {
|
|
156
|
+
n.value = void 0, a.value = "", o.value = "";
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
i !== n.value && (F(i, r, t, {
|
|
160
|
+
selection: a,
|
|
161
|
+
selectedLines: o
|
|
162
|
+
}), n.value = i);
|
|
163
|
+
}, { immediate: !0 }), S(() => {
|
|
164
|
+
i();
|
|
165
|
+
}), {
|
|
166
|
+
...s,
|
|
167
|
+
kdsCodeEditorProps: c
|
|
168
|
+
};
|
|
169
|
+
}, Ce = (e) => {
|
|
170
|
+
let t = E(), n = e.originalModel, r = k.editor.createModel("", n.getLanguageId(), k.Uri.parse(`inmemory://model/${e.modifiedFileName}`)), i = {
|
|
171
|
+
original: n,
|
|
172
|
+
modified: r
|
|
173
|
+
};
|
|
174
|
+
x(() => {
|
|
175
|
+
P(e.container), t.value = k.editor.createDiffEditor(e.container.value, {
|
|
176
|
+
...he,
|
|
177
|
+
...e.extraEditorOptions ?? {}
|
|
178
|
+
}), t.value.setModel(i);
|
|
179
|
+
}), S(ye(t, [n, r]));
|
|
180
|
+
let { text: a, setInitialText: o } = N(r);
|
|
181
|
+
return {
|
|
182
|
+
editor: t,
|
|
183
|
+
editorModel: i,
|
|
184
|
+
modifiedText: a,
|
|
185
|
+
setInitialModifiedText: o
|
|
186
|
+
};
|
|
187
|
+
}, R = E(), z = () => R, we = (e, t) => {
|
|
188
|
+
let n = L(e, t);
|
|
189
|
+
return R.value = n, n;
|
|
190
|
+
}, Te = {
|
|
191
|
+
useCodeEditor: Se,
|
|
192
|
+
useDiffEditor: Ce,
|
|
193
|
+
useKdsCodeEditor: L,
|
|
194
|
+
useMainCodeEditorStore: z
|
|
195
|
+
}, B = {
|
|
196
|
+
writeln: (e) => consola.error("Console not yet initialized", e),
|
|
197
|
+
write: (e) => consola.error("Console not yet initialized", e),
|
|
198
|
+
clear: () => consola.error("Console not yet initialized")
|
|
199
|
+
}, Ee = (e) => {
|
|
200
|
+
B = e;
|
|
201
|
+
}, V = T("small"), De = class {
|
|
202
|
+
jsonDataService;
|
|
203
|
+
_eventHandlers = {};
|
|
204
|
+
constructor(e) {
|
|
205
|
+
this.jsonDataService = e, this.startPolling().catch(() => {});
|
|
206
|
+
}
|
|
207
|
+
async startPolling() {
|
|
208
|
+
for (;;) {
|
|
209
|
+
let e = await this.jsonDataService.data({ method: "ScriptingService.getEvent" });
|
|
210
|
+
if (e) {
|
|
211
|
+
if (e.type in this._eventHandlers) this._eventHandlers[e.type](e.data);
|
|
212
|
+
else throw Error(`Got unexpected event from Java with type ${e.type}`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
registerEventHandler(e, t) {
|
|
217
|
+
this._eventHandlers[e] = t;
|
|
218
|
+
}
|
|
219
|
+
}, Oe = class {
|
|
220
|
+
jsonDataService;
|
|
221
|
+
alertingService;
|
|
222
|
+
eventPoller;
|
|
223
|
+
constructor(e, t) {
|
|
224
|
+
this.jsonDataService = e, this.alertingService = t, this.eventPoller = new De(this.jsonDataService);
|
|
225
|
+
}
|
|
226
|
+
sendToService(e, t) {
|
|
227
|
+
return this.jsonDataService.data({
|
|
228
|
+
method: `ScriptingService.${e}`,
|
|
229
|
+
options: t
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
callRpcMethod(e) {
|
|
233
|
+
return this.jsonDataService.data(e);
|
|
234
|
+
}
|
|
235
|
+
getOutputPreviewTableInitialData() {
|
|
236
|
+
return this.jsonDataService.data({ method: "OutputPreviewTableInitialDataRpcSupplier.getInitialData" });
|
|
237
|
+
}
|
|
238
|
+
registerEventHandler(e, t) {
|
|
239
|
+
this.eventPoller.registerEventHandler(e, t);
|
|
240
|
+
}
|
|
241
|
+
async connectToLanguageServer(e) {
|
|
242
|
+
let i = e ?? z().value?.editorModel;
|
|
243
|
+
if (i === void 0) throw Error("Editor model has not yet been initialized");
|
|
244
|
+
let a = await this.sendToService("connectToLanguageServer");
|
|
245
|
+
if (a.status === "RUNNING") return n.create(i, new r((e) => this.registerEventHandler("language-server", e)), new t((e) => this.sendToService("sendLanguageServerMessage", [e])));
|
|
246
|
+
throw Error(a.message ?? "Starting the language server failed");
|
|
247
|
+
}
|
|
248
|
+
async isCallKnimeUiApiAvailable(e) {
|
|
249
|
+
let t = this.jsonDataService.baseService;
|
|
250
|
+
return t !== null && (await t.callKnimeUiApi("PortService.getPortView", {
|
|
251
|
+
nodeId: e.nodeId,
|
|
252
|
+
portIdx: e.portIdx,
|
|
253
|
+
viewIdx: e.portViewConfigs[0]?.portViewIdx
|
|
254
|
+
})).isSome;
|
|
255
|
+
}
|
|
256
|
+
isKaiEnabled() {
|
|
257
|
+
return this.sendToService("isKaiEnabled");
|
|
258
|
+
}
|
|
259
|
+
isLoggedIntoHub() {
|
|
260
|
+
return this.sendToService("isLoggedIntoHub");
|
|
261
|
+
}
|
|
262
|
+
getAiDisclaimer() {
|
|
263
|
+
return this.sendToService("getAiDisclaimer");
|
|
264
|
+
}
|
|
265
|
+
sendAlert(e) {
|
|
266
|
+
this.alertingService?.sendAlert(e);
|
|
267
|
+
}
|
|
268
|
+
}, ke = class {
|
|
269
|
+
settingsInitialData;
|
|
270
|
+
dialogService;
|
|
271
|
+
jsonDataService;
|
|
272
|
+
constructor(e, t, n) {
|
|
273
|
+
this.settingsInitialData = e, this.dialogService = t, this.jsonDataService = n;
|
|
274
|
+
}
|
|
275
|
+
getSettingsInitialData() {
|
|
276
|
+
return this.settingsInitialData;
|
|
277
|
+
}
|
|
278
|
+
registerSettingsGetterForApply(e) {
|
|
279
|
+
this.dialogService.setApplyListener(async () => {
|
|
280
|
+
let t = e();
|
|
281
|
+
try {
|
|
282
|
+
return await this.jsonDataService.applyData(t), { isApplied: !0 };
|
|
283
|
+
} catch (e) {
|
|
284
|
+
return consola.warn("Failed to apply settings", e), { isApplied: !1 };
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
registerSettings(e) {
|
|
289
|
+
return this.dialogService.registerSettings(e);
|
|
290
|
+
}
|
|
291
|
+
}, H, U = () => H, W, G = () => W, K, q = () => K, Ae = async () => {
|
|
292
|
+
let e = await me.getInstance(), t = await pe.getInstance();
|
|
293
|
+
H = new Oe(e, await fe.getInstance());
|
|
294
|
+
let n = await e.initialData();
|
|
295
|
+
if (!n.settingsInitialData) throw Error("The initial data does not contain settingsInitialData. The node must use DefaultScriptingNodeSettingsService.");
|
|
296
|
+
W = n.initialData, K = new ke(JSON.parse(n.settingsInitialData), t, e), V.value = t.getInitialDisplayMode(), t.addOnDisplayModeChangeCallback(({ mode: e }) => {
|
|
297
|
+
V.value = e;
|
|
298
|
+
}), Be();
|
|
299
|
+
}, je = (e) => {
|
|
300
|
+
e.scriptingService && (H = e.scriptingService), e.initialData && (W = e.initialData), e.settingsService && (K = e.settingsService), e.displayMode && (V.value = e.displayMode), Be();
|
|
301
|
+
}, Me = () => {
|
|
302
|
+
U().registerEventHandler("console", B.write);
|
|
303
|
+
}, J = w({}), Ne = () => J, Pe = () => {
|
|
304
|
+
J.promptResponse !== void 0 && delete J.promptResponse;
|
|
305
|
+
}, Fe = (e, t = null) => {
|
|
306
|
+
let n = window?.localStorage?.getItem(e);
|
|
307
|
+
if (n === null) return t;
|
|
308
|
+
try {
|
|
309
|
+
return JSON.parse(n);
|
|
310
|
+
} catch {
|
|
311
|
+
return consola.warn(`Could not parse "${e}" from local storage.`), t;
|
|
312
|
+
}
|
|
313
|
+
}, Ie = (e, t) => {
|
|
314
|
+
window?.localStorage?.setItem(e, JSON.stringify(t));
|
|
315
|
+
}, Le = () => {
|
|
316
|
+
let e = G().kAiConfig.hubId ?? "";
|
|
317
|
+
return `ai-disclaimer-do-not-show-again-${encodeURIComponent(e.trim().toLowerCase())}`;
|
|
318
|
+
}, Re = (e) => {
|
|
319
|
+
Ie(Le(), e);
|
|
320
|
+
}, ze = T(!0), Be = () => {
|
|
321
|
+
ze.value = !Fe(Le(), !1);
|
|
322
|
+
}, Ve = E(), He = (e) => {
|
|
323
|
+
Ve.value = e;
|
|
324
|
+
};
|
|
325
|
+
O(() => z().value, He);
|
|
326
|
+
var Ue = T([]), We = (e, t, n) => e({
|
|
327
|
+
method: "flowVariables.getAvailableFlowVariables",
|
|
328
|
+
options: [JSON.stringify(n), t.split(".")]
|
|
329
|
+
}), Ge = (e, t, n) => e({
|
|
330
|
+
method: "flowVariables.getFlowVariableOverrideValue",
|
|
331
|
+
options: [JSON.stringify(n), t.split(".")]
|
|
332
|
+
}), Ke = ({ callRpcMethod: e, getCurrentData: t, flowVariablesMap: n }) => {
|
|
333
|
+
let { flowVariablesMap: r, setInitialFlowVariablesMap: i } = a(n), o = () => ({
|
|
334
|
+
data: t(),
|
|
335
|
+
flowVariableSettings: r
|
|
336
|
+
});
|
|
337
|
+
return oe("flowVariablesApi", {
|
|
338
|
+
getAvailableFlowVariables: (t) => We(e, t, o()),
|
|
339
|
+
getFlowVariableOverrideValue: (t, n) => Ge(e, n, o()),
|
|
340
|
+
clearControllingFlowVariable: () => {}
|
|
341
|
+
}), {
|
|
342
|
+
flowVariablesMap: r,
|
|
343
|
+
setInitialFlowVariablesMap: i
|
|
344
|
+
};
|
|
345
|
+
}, Y = null, X = () => (Y === null && (Y = w({ ...q().getSettingsInitialData().flowVariableSettings })), Y), Z = null, Q = /* @__PURE__ */ new Map(), qe = (e) => {
|
|
346
|
+
Z = e;
|
|
347
|
+
}, Je = (e, t) => (Q.set(e, t), () => {
|
|
348
|
+
Q.get(e) === t && Q.delete(e);
|
|
349
|
+
}), Ye = (e, [t, ...n], r) => {
|
|
350
|
+
let i = Array.isArray(e) ? [...e] : { ...e };
|
|
351
|
+
return i[t] = n.length === 0 ? r : Ye(e[t] ?? {}, n, r), i;
|
|
352
|
+
}, $ = () => {
|
|
353
|
+
let e = Z?.() ?? q().getSettingsInitialData().data;
|
|
354
|
+
return Q.forEach((t, n) => {
|
|
355
|
+
let r = t();
|
|
356
|
+
r !== void 0 && (e = Ye(e, n.split("."), r));
|
|
357
|
+
}), e;
|
|
358
|
+
}, Xe = () => ({
|
|
359
|
+
data: $(),
|
|
360
|
+
flowVariableSettings: { ...X() }
|
|
361
|
+
}), Ze = () => {
|
|
362
|
+
let e = U();
|
|
363
|
+
q().registerSettingsGetterForApply(Xe), Ke({
|
|
364
|
+
callRpcMethod: e.callRpcMethod.bind(e),
|
|
365
|
+
getCurrentData: $,
|
|
366
|
+
flowVariablesMap: X()
|
|
367
|
+
});
|
|
368
|
+
}, Qe = /* @__PURE__ */ b({
|
|
369
|
+
__name: "FlowVariableExposer",
|
|
370
|
+
props: {
|
|
371
|
+
label: {},
|
|
372
|
+
persistPath: {}
|
|
373
|
+
},
|
|
374
|
+
setup(e) {
|
|
375
|
+
let t = e, { setExposedFlowVariable: n, exposedFlowVariableName: r } = te(t.persistPath), i = T("");
|
|
376
|
+
ue(() => {
|
|
377
|
+
(r.value !== "" || i.value.trim() !== "") && (i.value = r.value);
|
|
378
|
+
});
|
|
379
|
+
let a = h(() => i.value === "" || !!i.value.trim()), o = (e) => {
|
|
380
|
+
i.value = e, n({
|
|
381
|
+
path: t.persistPath,
|
|
382
|
+
flowVariableName: e
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
return (e, n) => (C(), g(D(c), {
|
|
386
|
+
"model-value": i.value,
|
|
387
|
+
error: !a.value,
|
|
388
|
+
"sub-text": a.value ? void 0 : "Flow variable name must not be blank.",
|
|
389
|
+
label: t.label,
|
|
390
|
+
placeholder: "No flow variable set",
|
|
391
|
+
"onUpdate:modelValue": o
|
|
392
|
+
}, null, 8, [
|
|
393
|
+
"model-value",
|
|
394
|
+
"error",
|
|
395
|
+
"sub-text",
|
|
396
|
+
"label"
|
|
397
|
+
]));
|
|
398
|
+
}
|
|
399
|
+
}), $e = {
|
|
400
|
+
key: 1,
|
|
401
|
+
class: "popover"
|
|
402
|
+
}, et = {
|
|
403
|
+
key: 0,
|
|
404
|
+
class: "variable-group"
|
|
405
|
+
}, tt = /*#__PURE__*/ e(/* @__PURE__ */ b({
|
|
406
|
+
__name: "FlowVariablePopover",
|
|
407
|
+
emits: ["controllingFlowVariableSet"],
|
|
408
|
+
setup(e, { emit: t }) {
|
|
409
|
+
let { configPaths: n } = i(), { deprecatedSetConfigPaths: r } = ee(), a = h(() => o(n.value.map((e) => e.configPath).filter((e) => e !== null)).length), s = (e) => e.slice(a.value).replace(/<dot>/g, "."), c = t;
|
|
410
|
+
return (e, t) => D(r).length ? (C(), g(l, { key: 0 })) : (C(), v("div", $e, [(C(!0), v(m, null, le(D(n), (e) => (C(), v(m, { key: e.configPath }, [e.configPath ? (C(), v("div", et, [e.exposeOnly ? _("", !0) : (C(), g(u, {
|
|
411
|
+
key: 0,
|
|
412
|
+
label: D(n).length === 1 ? "Overwrite with flow variable" : `Overwrite ${s(e.configPath)}`,
|
|
413
|
+
"data-path": e.dataPath,
|
|
414
|
+
"persist-path": e.configPath,
|
|
415
|
+
onControllingFlowVariableSet: t[0] ||= (e, t, n) => c("controllingFlowVariableSet", e, t, n)
|
|
416
|
+
}, null, 8, [
|
|
417
|
+
"label",
|
|
418
|
+
"data-path",
|
|
419
|
+
"persist-path"
|
|
420
|
+
])), y(Qe, {
|
|
421
|
+
label: D(n).length === 1 ? "Output as flow variable" : `Output ${s(e.configPath)}`,
|
|
422
|
+
"persist-path": e.configPath
|
|
423
|
+
}, null, 8, ["label", "persist-path"])])) : _("", !0)], 64))), 128))]));
|
|
424
|
+
}
|
|
425
|
+
}), [["__scopeId", "data-v-dea485b5"]]), nt = /* @__PURE__ */ b({
|
|
426
|
+
__name: "FlowVariableButton",
|
|
427
|
+
props: { hover: { type: Boolean } },
|
|
428
|
+
emits: ["controllingFlowVariableSet"],
|
|
429
|
+
setup(e, { emit: t }) {
|
|
430
|
+
let n = t, { configPaths: r, flowSettings: a } = i(), o = h(() => !!a.value?.controllingFlowVariableName), c = h(() => !!a.value?.exposedFlowVariableName), l = h(() => !!a.value?.controllingFlowVariableName && a.value?.controllingFlowVariableAvailable === !1), te = h(() => !!a.value?.controllingFlowVariableName && a.value?.controllingFlowVariableOfCorrectType === !1), u = h(() => l.value || te.value), { deprecatedSetConfigPaths: d } = ee(), f = h(() => r.value.filter((e) => e.configPath !== null)), p = ne(), m = h(() => p?.value ?? !1);
|
|
431
|
+
return (e, t) => !m.value && (f.value.length > 0 || D(d).length > 0) ? (C(), g(D(s), {
|
|
432
|
+
key: 0,
|
|
433
|
+
"in-set": o.value,
|
|
434
|
+
"out-set": c.value,
|
|
435
|
+
error: u.value,
|
|
436
|
+
hidden: !e.hover && !o.value && !c.value && !u.value
|
|
437
|
+
}, {
|
|
438
|
+
default: de(() => [y(tt, { onControllingFlowVariableSet: t[0] ||= (e, t, r) => n("controllingFlowVariableSet", e, t, r) })]),
|
|
439
|
+
_: 1
|
|
440
|
+
}, 8, [
|
|
441
|
+
"in-set",
|
|
442
|
+
"out-set",
|
|
443
|
+
"error",
|
|
444
|
+
"hidden"
|
|
445
|
+
])) : _("", !0);
|
|
446
|
+
}
|
|
447
|
+
}), rt = /* @__PURE__ */ b({
|
|
448
|
+
__name: "FlowVariableButtonWrapper",
|
|
449
|
+
props: {
|
|
450
|
+
hover: { type: Boolean },
|
|
451
|
+
dataPath: {},
|
|
452
|
+
configPaths: {},
|
|
453
|
+
flowSettings: {},
|
|
454
|
+
flowVariablesForSettings: {}
|
|
455
|
+
},
|
|
456
|
+
emits: ["controllingFlowVariableSet"],
|
|
457
|
+
setup(e, { emit: t }) {
|
|
458
|
+
let n = e, r = t;
|
|
459
|
+
return d(n), (e, t) => (C(), g(nt, {
|
|
460
|
+
hover: e.hover,
|
|
461
|
+
onControllingFlowVariableSet: t[0] ||= (e, t, n) => r("controllingFlowVariableSet", e, t, n)
|
|
462
|
+
}, null, 8, ["hover"]));
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
//#endregion
|
|
466
|
+
export { B as C, z as D, we as E, V as S, Te as T, U as _, qe as a, Me as b, Ge as c, Ue as d, He as f, G as g, Ne as h, Je as i, Ve as l, ze as m, $ as n, X as o, Re as p, Ze as r, We as s, rt as t, Pe as u, q as v, Ee as w, je as x, Ae as y };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { n as t, o as n, t as r } from "./useFlowVariables-BPi2ZpWk.js";
|
|
3
|
+
import { t as i } from "./inject-DGoSf00A.js";
|
|
4
|
+
import { r as a } from "./paths-daLajhdU.js";
|
|
5
|
+
import { f as o, n as s, o as c } from "./dist-iAFUw6uq.js";
|
|
6
|
+
import { r as l } from "./useProvideForFlowVariables-Ck3YUR2C.js";
|
|
7
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, inject as y, normalizeClass as b, onMounted as x, openBlock as S, provide as C, ref as w, renderList as T, toDisplayString as E, unref as D, withCtx as O } from "vue";
|
|
8
|
+
//#region ../core-ui/src/nodeDialog/composables/components/useArrayFlowVariables.ts
|
|
9
|
+
var k = Symbol("hideFlowVariableButtonsInArrayFlowVariablesPreview"), A = (e) => C(k, e), j = () => y(k, null), M = (e) => {
|
|
10
|
+
let t = i("getPersistSchema")?.() ?? {}, o = n(), s = d(() => a({
|
|
11
|
+
persistSchema: t,
|
|
12
|
+
path: e.value
|
|
13
|
+
})), c = d(() => s.value?.specs.map((e) => ({
|
|
14
|
+
...e,
|
|
15
|
+
controllingFlowVariableName: o?.[e.configPath]?.controllingFlowVariableName ?? null
|
|
16
|
+
})) ?? null), l = d(() => s.value?.deprecatedConfigPaths ?? []), u = d(() => {
|
|
17
|
+
if (!o) return !1;
|
|
18
|
+
let e = r(o);
|
|
19
|
+
return l.value.some((t) => e(t).length > 0);
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
arrayFlowVariables: c,
|
|
23
|
+
arrayFlowVariablesSet: d(() => !!c.value?.some(({ controllingFlowVariableName: e }) => e !== null)),
|
|
24
|
+
deprecatedConfigPaths: l,
|
|
25
|
+
deprecatedVariablesSet: u,
|
|
26
|
+
missingRequiredVariables: d(() => c.value?.filter((e) => e.required && !e.controllingFlowVariableName) ?? [])
|
|
27
|
+
};
|
|
28
|
+
}, N = (e) => {
|
|
29
|
+
let i = e ?? t().configPaths, a = n(), o = r(a), s = d(() => {
|
|
30
|
+
let e = i.value.flatMap(({ deprecatedConfigPaths: e }) => e || []);
|
|
31
|
+
return [...new Set(e)];
|
|
32
|
+
});
|
|
33
|
+
return { deprecatedSetConfigPaths: d(() => {
|
|
34
|
+
let e = s.value.flatMap(o);
|
|
35
|
+
return [...new Set(e)];
|
|
36
|
+
}) };
|
|
37
|
+
}, P = (e) => {
|
|
38
|
+
let r = n(), { getSettingStateFlowVariables: i } = t(), { exposed: { get: a } } = i(), o = d(() => r[e]), s = d(() => o.value?.exposedFlowVariableName ?? ""), c = (e, t) => {
|
|
39
|
+
let n = a(e);
|
|
40
|
+
t === null ? n?.unset() : n?.set(t);
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
exposedFlowVariableName: s,
|
|
44
|
+
setExposedFlowVariable: ({ path: e, flowVariableName: t }) => {
|
|
45
|
+
let n = t.trim() ? t : null;
|
|
46
|
+
if (c(e, n), n === null && !r[e]?.controllingFlowVariableName) delete r[e];
|
|
47
|
+
else {
|
|
48
|
+
let t = r[e] || {};
|
|
49
|
+
t.exposedFlowVariableName = n, r[e] = t;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, F = /* @__PURE__ */ v({
|
|
54
|
+
__name: "UnsetDeprecatedFlowVariableButton",
|
|
55
|
+
props: { path: {} },
|
|
56
|
+
setup(e) {
|
|
57
|
+
let t = e, { controllingFlowVariableName: r, unsetControllingFlowVariable: i } = l(t.path), { exposedFlowVariableName: a, setExposedFlowVariable: o } = P(t.path), c = n(), u = () => {
|
|
58
|
+
r.value && i(t), a.value && o({
|
|
59
|
+
path: t.path,
|
|
60
|
+
flowVariableName: ""
|
|
61
|
+
}), delete c[t.path];
|
|
62
|
+
};
|
|
63
|
+
return (e, t) => (S(), f(D(s), {
|
|
64
|
+
label: "Unset",
|
|
65
|
+
variant: "outlined",
|
|
66
|
+
size: "small",
|
|
67
|
+
onClick: u
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}), I = ["value"], L = /*#__PURE__*/ e(/* @__PURE__ */ v({
|
|
71
|
+
__name: "DeprecatedFlowVariables",
|
|
72
|
+
setup(e) {
|
|
73
|
+
let { deprecatedSetConfigPaths: t } = N(), r = n(), i = (e) => r[e].controllingFlowVariableName ?? r[e].exposedFlowVariableName, a = (e) => e.replace(/<dot>/g, ".");
|
|
74
|
+
return (e, n) => (S(), m(u, null, [n[0] ||= h("p", null, "The following set flow variables are deprecated:", -1), (S(!0), m(u, null, T(D(t), (e) => (S(), m("div", { key: e }, [h("ul", null, [h("li", null, [h("p", null, [g(" \"" + E(a(e)) + "\": ", 1), h("input", {
|
|
75
|
+
disabled: "",
|
|
76
|
+
value: i(e)
|
|
77
|
+
}, null, 8, I)]), _(F, { path: e }, null, 8, ["path"])])])]))), 128))], 64));
|
|
78
|
+
}
|
|
79
|
+
}), [["__scopeId", "data-v-70e7b98f"]]), R = /* @__PURE__ */ v({
|
|
80
|
+
__name: "FlowVariableSelector",
|
|
81
|
+
props: {
|
|
82
|
+
label: {},
|
|
83
|
+
errorSubText: {},
|
|
84
|
+
persistPath: {},
|
|
85
|
+
dataPath: {},
|
|
86
|
+
skipOverrideValueFetch: { type: Boolean },
|
|
87
|
+
arrayVariablesOnly: { type: Boolean }
|
|
88
|
+
},
|
|
89
|
+
emits: ["controllingFlowVariableSet"],
|
|
90
|
+
setup(e, { emit: t }) {
|
|
91
|
+
let n = e, { setControllingFlowVariable: r, unsetControllingFlowVariable: a, controllingFlowVariableName: s, invalidateSetFlowVariable: v } = l(n.persistPath), { getAvailableFlowVariables: y, getFlowVariableOverrideValue: C, clearControllingFlowVariable: T } = i("flowVariablesApi"), k = w([]), A = w({}), j = {
|
|
92
|
+
id: "",
|
|
93
|
+
text: "None",
|
|
94
|
+
title: "No flow variable selected"
|
|
95
|
+
}, M = (e) => [j, ...e.map((e) => ({
|
|
96
|
+
id: e.name,
|
|
97
|
+
text: e.name,
|
|
98
|
+
accessory: {
|
|
99
|
+
type: "dataType",
|
|
100
|
+
name: e.type.id
|
|
101
|
+
},
|
|
102
|
+
title: `${e.name} (currently "${e.value}")`
|
|
103
|
+
}))], N = (e) => e.type.id.endsWith("ARRAY"), P = async (e) => {
|
|
104
|
+
let t = await y(e), r = Object.values(t).flat();
|
|
105
|
+
return n.arrayVariablesOnly ? r.filter(N) : r;
|
|
106
|
+
}, F = w(!1);
|
|
107
|
+
x(async () => {
|
|
108
|
+
let e = await P(n.persistPath);
|
|
109
|
+
A.value = e.reduce((e, t) => (e[t.name] = t, e), {}), k.value = M(e), F.value = !0;
|
|
110
|
+
});
|
|
111
|
+
let I = t, L = async (e) => {
|
|
112
|
+
if (e === j.id) {
|
|
113
|
+
a({ path: n.persistPath }), T(n.persistPath);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
let t = A.value[e], i = {
|
|
117
|
+
path: n.persistPath,
|
|
118
|
+
flowVariableName: t.name
|
|
119
|
+
};
|
|
120
|
+
if (r(i), n.skipOverrideValueFetch) return;
|
|
121
|
+
let o = await C([n.persistPath], n.dataPath);
|
|
122
|
+
o === void 0 ? v(i) : I("controllingFlowVariableSet", n.dataPath, o, t.name);
|
|
123
|
+
}, R = d(() => k.value.length === 1 && !s.value), z = d(() => F.value ? R.value ? "No suitable flow variable present" : "No flow variable selected" : "Fetching available flow variables...");
|
|
124
|
+
return (e, t) => (S(), f(D(o), {
|
|
125
|
+
label: e.label,
|
|
126
|
+
error: !!e.errorSubText,
|
|
127
|
+
"sub-text": e.errorSubText,
|
|
128
|
+
"preserve-sub-text-space": !0,
|
|
129
|
+
"possible-values": k.value,
|
|
130
|
+
"model-value": F.value ? D(s) : "",
|
|
131
|
+
placeholder: z.value,
|
|
132
|
+
disabled: !F.value || R.value,
|
|
133
|
+
"onUpdate:modelValue": L
|
|
134
|
+
}, {
|
|
135
|
+
option: O(({ slotData: e, selectedValue: t, isMissing: n, expanded: r } = {
|
|
136
|
+
slotData: {},
|
|
137
|
+
selectedValue: "",
|
|
138
|
+
isMissing: !1,
|
|
139
|
+
expanded: !1
|
|
140
|
+
}) => [r || t !== "" || n ? (S(), m("div", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: b(["data-type-entry", { "with-type": n || e.typeId }])
|
|
143
|
+
}, [n ? (S(), m(u, { key: 0 }, [_(D(c), { size: "small" }), h("span", null, "(MISSING) " + E(t), 1)], 64)) : (S(), m(u, { key: 1 }, [e.typeId ? (S(), f(D(c), {
|
|
144
|
+
key: 0,
|
|
145
|
+
"icon-name": e.typeId,
|
|
146
|
+
"icon-title": e.typeText,
|
|
147
|
+
size: "small"
|
|
148
|
+
}, null, 8, ["icon-name", "icon-title"])) : p("", !0), h("span", null, E(e.text), 1)], 64))], 2)) : (S(), m(u, { key: 1 }, [g(E(z.value), 1)], 64))]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, [
|
|
151
|
+
"label",
|
|
152
|
+
"error",
|
|
153
|
+
"sub-text",
|
|
154
|
+
"possible-values",
|
|
155
|
+
"model-value",
|
|
156
|
+
"placeholder",
|
|
157
|
+
"disabled"
|
|
158
|
+
]));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
//#endregion
|
|
162
|
+
export { A as a, N as i, L as n, M as o, P as r, j as s, R as t };
|