@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.
Files changed (102) hide show
  1. package/dist/{AnyOfTwinlist-DdcxtAjb-CaN_HwzO.js → AnyOfTwinlist-DdcxtAjb-QRuNcffK.js} +3 -3
  2. package/dist/{ArrayLayout-Cqct4YS3.js → ArrayLayout-CiNvK2R8.js} +204 -193
  3. package/dist/ButtonControl-XAPpl7GY.js +116 -0
  4. package/dist/{CheckboxControl-C99OdmDL-CDrrcyc8.js → CheckboxControl-C99OdmDL-Do7Fm1Hf.js} +12 -12
  5. package/dist/{CheckboxesControl-BZhMhT9x-DX6Wv2OC.js → CheckboxesControl-BZhMhT9x-Pc8YrIvQ.js} +3 -3
  6. package/dist/{CodeEditorControl-C0nEU4Bk.js → CodeEditorControl-BZlds1_z.js} +1 -1
  7. package/dist/{ColorControl-D1dNnNbO-ZnPFuKHS.js → ColorControl-D1dNnNbO-D2ewwNgx.js} +1 -1
  8. package/dist/{ColorPreviewControl-B4zix2kb-lDW3LcbF.js → ColorPreviewControl-B4zix2kb-C8iUsUfi.js} +10 -10
  9. package/dist/{ComboBoxControl-BGWAD9IW-CYGoHz_u.js → ComboBoxControl-BGWAD9IW-Dqnlk__Q.js} +2 -2
  10. package/dist/{ConfigurationNodeNotSupported-D-Rxn0Gi.js → ConfigurationNodeNotSupported-CGclvYAj.js} +6 -6
  11. package/dist/{ControlWithSubParameters-C3O8tagW.js → ControlWithSubParameters-D_0dvLqM.js} +10 -10
  12. package/dist/{CredentialsControl-DaEBQpvd.js → CredentialsControl-uYcyYidL.js} +2 -2
  13. package/dist/{CredentialsControlBase-BivCOrno.js → CredentialsControlBase-u4DXxRC0.js} +7 -7
  14. package/dist/{DateControl-D0HfVrtz-9eE4B_fe.js → DateControl-D0HfVrtz-Bt1CkhVc.js} +3 -3
  15. package/dist/{DateTimeControl-kTQZI9JC-DmnFBKmN.js → DateTimeControl-kTQZI9JC-DT157PDM.js} +3 -3
  16. package/dist/{DateTimeFormatPickerControl-BiYcsKSn-xVSLrwBl.js → DateTimeFormatPickerControl-BiYcsKSn-CMda9u5J.js} +5 -5
  17. package/dist/{DirtyTrackerRenderer-DMDmrGOs.js → DirtyTrackerRenderer-BePhAn76.js} +3 -3
  18. package/dist/{DropdownControl-jsayV3N5-8v3EQUz3.js → DropdownControl-jsayV3N5-Dsha5hge.js} +3 -3
  19. package/dist/{ExecutorCoresControl-DNo2SaC6-BoEm-W4r.js → ExecutorCoresControl-DNo2SaC6-BkcAA9UN.js} +2 -2
  20. package/dist/{ExecutorMemoryControl-C8RLYQdd-B8ZEGYAX.js → ExecutorMemoryControl-C8RLYQdd-Cedm5trN.js} +2 -2
  21. package/dist/{FileChooserControl-DNfgbEr3.js → FileChooserControl-Ct51fY7Z.js} +1 -1
  22. package/dist/{FileChooserControlBase-BozmAfJW.js → FileChooserControlBase-CGo0zU3e.js} +35 -35
  23. package/dist/{FileChooserControlForMultiFile-B21mwjMa.js → FileChooserControlForMultiFile-Dh_WXtgn.js} +1 -1
  24. package/dist/{FileUploadControl-D5QfM3Wa-DXqlNHXY.js → FileUploadControl-D5QfM3Wa-7kqQRO4-.js} +1 -1
  25. package/dist/FlowVariableButtonWrapper-mLnms8yQ.js +466 -0
  26. package/dist/FlowVariableSelector-C4IiVzue.js +162 -0
  27. package/dist/{GridSelectionControl-RKdnWWGk-CqxxipH6.js → GridSelectionControl-RKdnWWGk-naGGUZCh.js} +13 -13
  28. package/dist/{HorizontalLayout-B_lETfCu-CQVlABjY.js → HorizontalLayout-B_lETfCu-BZK7jH4z.js} +2 -2
  29. package/dist/{IntegerControl-Cr8SO0xH-DmFardsB.js → IntegerControl-Cr8SO0xH-lclR3djp.js} +2 -2
  30. package/dist/{IntervalControl-BdjKEwLy-CRGsrkTU.js → IntervalControl-BdjKEwLy-C_LCaU8r.js} +6 -6
  31. package/dist/{LabeledGroup-BSlRYaIO.js → LabeledGroup-C4WOU_qE.js} +1 -1
  32. package/dist/{LegacyCredentialsControl-DDppdKDf.js → LegacyCredentialsControl-CuFuBunJ.js} +11 -11
  33. package/dist/{LinkControl-QMwkCJlj-D7KOgNqO.js → LinkControl-QMwkCJlj-DZRZvKsJ.js} +8 -8
  34. package/dist/{LoadingDropdown-BpU4Uiin-DDrrGAtm.js → LoadingDropdown-BpU4Uiin-DpT8YNnA.js} +1 -1
  35. package/dist/{ManualTwinlistControl-5dfnmQZ--BLDAtepu.js → ManualTwinlistControl-5dfnmQZ--9BVHFNRR.js} +5 -5
  36. package/dist/{MultiFileChooserControl-yLU6lVm6.js → MultiFileChooserControl-Buzeme6N.js} +54 -54
  37. package/dist/{NameFilter-DzqgrcaF-BHDDEtD7.js → NameFilter-DzqgrcaF-Cl38kTPw.js} +2 -2
  38. package/dist/{NumberControl-ODy5GAlR-DqeFhQlG.js → NumberControl-ODy5GAlR-IQBNh99B.js} +2 -2
  39. package/dist/{NumberControlBase-Cl3QcvzB-CLt8mpCC.js → NumberControlBase-Cl3QcvzB-DLl4RMsa.js} +5 -5
  40. package/dist/{OneOfDropdown-CMPRAraI-D0fD0jJG.js → OneOfDropdown-CMPRAraI-DyOs4qXq.js} +2 -2
  41. package/dist/{ProgressButtonControl-hlI6JZ-z-iW0cQ79f.js → ProgressButtonControl-hlI6JZ-z-C3y7IOhk.js} +12 -12
  42. package/dist/{RadioButtonsWithDescriptionControl-DJu3ODo7-BVxmFTjy.js → RadioButtonsWithDescriptionControl-DJu3ODo7-BvOWhYc3.js} +9 -9
  43. package/dist/{RadioControl-D_NE5s4n-CBhjB07g.js → RadioControl-D_NE5s4n-DQ3orr8G.js} +2 -2
  44. package/dist/{RadioControlBase-knF86px0-M-iKdCgZ.js → RadioControlBase-knF86px0-CNYDwFjA.js} +3 -3
  45. package/dist/{ResourceControlBase-BVMVVYns-CCmfdMoZ.js → ResourceControlBase-BVMVVYns-DHo4NA_m.js} +17 -17
  46. package/dist/{RichTextControl-JIM904_P-Cz7wPLpv.js → RichTextControl-JIM904_P-CCTpWWMW.js} +2717 -2697
  47. package/dist/{SectionLayout-Ca6XH3w3-C31MJtZ9.js → SectionLayout-Ca6XH3w3-Civ901Ea.js} +3 -3
  48. package/dist/{SettingsSubPanelLayout-B7QJ7YhZ-BVhurigk.js → SettingsSubPanelLayout-B7QJ7YhZ-Dmgm0Ir9.js} +20 -20
  49. package/dist/{SimpleTwinlistControl-CQ4tSh0c-D-AFsdOr.js → SimpleTwinlistControl-CQ4tSh0c-Ce_hUVf7.js} +3 -3
  50. package/dist/{SingleSelectControl-CJV9VMZm-jwZqt2tP.js → SingleSelectControl-CJV9VMZm-Bk8t6TSw.js} +3 -3
  51. package/dist/{SortListControl-D-ifoRva-VjNJfqzM.js → SortListControl-D-ifoRva-CJZ3kNt9.js} +5 -5
  52. package/dist/{StringFileChooserControl-BWoTwYp2.js → StringFileChooserControl-HEpT7Ip7.js} +8 -8
  53. package/dist/{TeamAndSpacesControl-D1FvyeCV-QFi264Nj.js → TeamAndSpacesControl-D1FvyeCV-DnRJHhj4.js} +9 -9
  54. package/dist/{TeamResourceControl-DyCO6-Nk-DHNrRSMY.js → TeamResourceControl-DyCO6-Nk-BI-LwsIM.js} +2 -2
  55. package/dist/{TextAreaControl-7QziyTgn-BniXqehe.js → TextAreaControl-7QziyTgn-BtBO7YNu.js} +1 -1
  56. package/dist/{TimeControl-B29iTlhP-eYfkjPai.js → TimeControl-B29iTlhP-e7HifMYl.js} +3 -3
  57. package/dist/{TimeframesControl-Wvu--J0V-DhhqpxZS.js → TimeframesControl-Wvu--J0V-BuY4sciw.js} +9 -9
  58. package/dist/{TwinlistControlBase-CaRdq20R-BspKBwDU.js → TwinlistControlBase-CaRdq20R-Dc80qJgM.js} +3 -3
  59. package/dist/{TypedStringFilter-B3ZMqGIC-D3eyvWTQ.js → TypedStringFilter-B3ZMqGIC-ByKsSSQ4.js} +2 -2
  60. package/dist/{ValueSwitchControl-H2t2Wgo6-Dkr6ED74.js → ValueSwitchControl-H2t2Wgo6-CQw22eR0.js} +2 -2
  61. package/dist/{VennDiagramLayout-rZsnxKb8.js → VennDiagramLayout-BiBLF_be.js} +15 -15
  62. package/dist/{VerticalLayout-sPAmI_XK-BHSQFbh5.js → VerticalLayout-sPAmI_XK-BZz3aVLy.js} +2 -2
  63. package/dist/{ZonedDateTimeControl-Co3v2EVv-fcHef5TR.js → ZonedDateTimeControl-Co3v2EVv-mFgzT9ZR.js} +2 -2
  64. package/dist/{_plugin-vue_export-helper-B3ysoDQm-C4BqYrqY.js → _plugin-vue_export-helper-B3ysoDQm-jCLY2oWQ.js} +1 -1
  65. package/dist/elementCheckboxRenderer-BTDQ1ITf.js +117 -0
  66. package/dist/{fileChooserRenderer-CqIzTlME.js → fileChooserRenderer-C9ULvJjo.js} +3 -3
  67. package/dist/{inject-DEsHVs5q-zP4nUeAa.js → inject-DEsHVs5q-ChUMe45j.js} +1 -1
  68. package/dist/lib/main.d.ts +5 -3
  69. package/dist/main.js +764 -692
  70. package/dist/parameters.js +469 -647
  71. package/dist/{paths-DH9g52IX.js → paths-daLajhdU.js} +9 -6
  72. package/dist/{plainDateTimeUtils-5uOCJ4N5-DRHKOepZ.js → plainDateTimeUtils-5uOCJ4N5-3VUpuprJ.js} +2 -2
  73. package/dist/{rolldown-runtime-Dy4uBu1J-Cwht8A8-.js → rolldown-runtime-Dy4uBu1J-DiUrVT6I.js} +1 -1
  74. package/dist/settings-service-browser-mock.js +13 -5
  75. package/dist/src/components/MainEditorPane.vue.d.ts +74 -7
  76. package/dist/src/components/ScriptingEditor.vue.d.ts +0 -23
  77. package/dist/src/editor.d.ts +1 -1
  78. package/dist/src/settings-service-browser-mock.d.ts +3 -4
  79. package/dist/src/settings-service.d.ts +3 -35
  80. package/dist/src/store/settings.d.ts +52 -0
  81. package/dist/src-pw1LRAdm-uu-I1-YX.js +1246 -0
  82. package/dist/{temporal-polyfill-D4u1I_Z--enRiDjrC.js → temporal-polyfill-D4u1I_Z--B8F1flcx.js} +1 -1
  83. package/dist/{toKdsPossibleValues-BAEvyJCk-COlZpol8.js → toKdsPossibleValues-BAEvyJCk-Dww9tu-1.js} +1 -1
  84. package/dist/useArrayIds-CpJmT5_d.js +28 -0
  85. package/dist/{useBuiltinValidations-B_Drc2y--BIe8Vj_8.js → useBuiltinValidations-B_Drc2y--vtgmNI5H.js} +2 -2
  86. package/dist/{useDirtySettings-C_JB8Tb9.js → useDirtySettings-DVDbAZgX.js} +1 -1
  87. package/dist/{useFileChooserBrowseOptions-l1i9z66C.js → useFileChooserBrowseOptions-ClAKTcw1.js} +16 -16
  88. package/dist/{useFlowVariables-BFaB9PV-.js → useFlowVariables-BPi2ZpWk.js} +8 -8
  89. package/dist/{usePossibleValues-Cx6iSt_X-BlD7PZcJ.js → usePossibleValues-Cx6iSt_X-Ch5oJkDE.js} +2 -2
  90. package/dist/{useProvideForFlowVariables-AgNwtMFv.js → useProvideForFlowVariables-Ck3YUR2C.js} +2 -2
  91. package/dist/{useProvidedState-478_KXOe-KGpEF13j.js → useProvidedState-478_KXOe-Dpb35s5s.js} +2 -2
  92. package/dist/{useSideDrawerContent-Bl7nrXfr.js → useSideDrawerContent-BKwzHoq0.js} +2 -2
  93. package/dist/{useUnknownValuesInTwinlist-CHB8kt9t-Bak4ZAxt.js → useUnknownValuesInTwinlist-CHB8kt9t-C4bjDxVB.js} +30 -30
  94. package/dist/{useUpdates-Binc_B7h.js → useUpdates-Db1ELMwP.js} +60 -60
  95. package/dist/{utils-DmZLgn8X-D9PS3NK4.js → utils-DmZLgn8X-yDkNNqcu.js} +1 -1
  96. package/package.json +2 -2
  97. package/dist/ButtonControl-JfX5cPMH.js +0 -117
  98. package/dist/ai-bar-DEyz4yf0.js +0 -332
  99. package/dist/elementCheckboxRenderer-CfYz9-5L.js +0 -214
  100. package/dist/src-pw1LRAdm-BUOXZfmX.js +0 -1246
  101. package/dist/useArrayIds-CvcfiogC.js +0 -29
  102. package/dist/v4-Dd9glBki.js +0 -30
@@ -1,117 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { t } from "./set-DhBYVp3B.js";
3
- import { C as n, n as r } from "./dist-iAFUw6uq.js";
4
- import { t as i } from "./v4-Dd9glBki.js";
5
- import { n as a } from "./inject-DGoSf00A.js";
6
- import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createVNode as u, defineComponent as d, onMounted as f, openBlock as p, ref as m, toDisplayString as h, unref as g } from "vue";
7
- //#region ../core-ui/src/nodeDialog/utils/getFlattenedSettings.ts
8
- var _ = ({ view: e, model: t }) => ({
9
- ...e,
10
- ...t
11
- }), v = { class: "button-wrapper" }, y = {
12
- key: 1,
13
- class: "error-message"
14
- }, b = /*#__PURE__*/ e(/* @__PURE__ */ d({
15
- __name: "ButtonControl",
16
- props: {
17
- control: {},
18
- handleChange: { type: Function },
19
- changeValue: { type: Function },
20
- disabled: { type: Boolean },
21
- labelForId: {},
22
- error: { type: Boolean },
23
- subText: {},
24
- onRegisterValidation: { type: Function }
25
- },
26
- setup(e) {
27
- let d = a("registerWatcher"), b = a("getData"), x = a("applyData"), S = e, C = m(null), w = () => {
28
- C.value = null;
29
- }, T = m({}), E = (e) => {
30
- T.value = _(e);
31
- }, D = m({}), O = o(() => S.control.uischema.options?.states ?? []), k = (e) => {
32
- w(), D.value = O.value.find(({ id: t }) => t === e);
33
- }, A = (e) => {
34
- setTimeout(() => S.changeValue(e));
35
- }, j = (e) => {
36
- if (e === null) return;
37
- let { settingValue: t, setSettingValue: n, buttonState: r } = e;
38
- n && A(t), k(r);
39
- }, M = (e, t = () => {}) => {
40
- let { state: n } = e;
41
- if (n === "SUCCESS") {
42
- j(e.result);
43
- return;
44
- }
45
- n === "FAIL" && (C.value = e.message?.[0]), t();
46
- }, N = m(0), P = i(), F = async ({ method: e, options: t, handler: n }, r = () => {}) => {
47
- N.value += 1;
48
- let i = await b({
49
- method: e,
50
- options: [
51
- P,
52
- n,
53
- ...t
54
- ]
55
- });
56
- --N.value, M(i, r);
57
- }, I = async (e) => {
58
- E(e), await F({
59
- method: "settings.initializeButton",
60
- options: [S.control.data],
61
- handler: S.control.uischema.options.actionHandler
62
- });
63
- }, L = (e) => {
64
- F({
65
- method: "settings.update",
66
- options: [_(e)],
67
- handler: S.control.uischema.options.updateOptions.updateHandler
68
- });
69
- }, R = async () => {
70
- if (x && S.control.uischema.options?.incrementAndApplyOnClick) {
71
- x((e) => t(e, S.control.path, S.control.data + 1));
72
- return;
73
- }
74
- let { id: e, nextState: n } = D.value, r = D.value;
75
- n !== void 0 && k(n), await F({
76
- method: "settings.invokeButtonAction",
77
- options: [e, T.value],
78
- handler: S.control.uischema.options.actionHandler
79
- }, () => {
80
- n === D.value.id && (D.value = r);
81
- });
82
- };
83
- f(() => {
84
- d({
85
- init: I,
86
- transformSettings: E,
87
- dependencies: S.control.uischema.options?.dependencies || []
88
- });
89
- let e = S.control.uischema?.options?.updateOptions;
90
- e !== void 0 && d({
91
- transformSettings: L,
92
- dependencies: e.dependencies
93
- });
94
- });
95
- let z = o(() => S.control.uischema.options?.displayErrorMessage ?? !0);
96
- return (e, t) => (p(), l("div", v, [
97
- u(g(r), {
98
- disabled: e.disabled || D.value.disabled,
99
- variant: D.value.primary ? "filled" : "outlined",
100
- size: "small",
101
- label: D.value.text,
102
- onClick: R
103
- }, null, 8, [
104
- "disabled",
105
- "variant",
106
- "label"
107
- ]),
108
- N.value > 0 ? (p(), s(g(n), {
109
- key: 0,
110
- size: "small"
111
- })) : c("", !0),
112
- C.value && z.value ? (p(), l("span", y, " Error: " + h(C.value), 1)) : c("", !0)
113
- ]));
114
- }
115
- }), [["__scopeId", "data-v-be859594"]]);
116
- //#endregion
117
- export { b as default };
@@ -1,332 +0,0 @@
1
- import { n as e, r as t, t as n } from "./knime-io-B5eFG9KP.js";
2
- import { KdsCodeEditor as r, setupMonacoEnvironment as i } from "@knime/kds-code-editor";
3
- import { computed as a, getCurrentInstance as o, h as s, nextTick as c, onMounted as l, onUnmounted as u, reactive as d, readonly as f, ref as p, render as m, shallowRef as h, watch as g } from "vue";
4
- import * as _ from "monaco-editor";
5
- import { AlertingService as v, DialogService as y, JsonDataService as ee } from "@knime/ui-extension-service";
6
- //#region src/editor.ts
7
- i();
8
- var b = {
9
- glyphMargin: !1,
10
- lightbulb: { enabled: _.editor.ShowLightbulbIconMode.OnCode },
11
- scrollBeyondLastLine: !0,
12
- suggest: {
13
- showWords: !1,
14
- snippetsPreventQuickSuggestions: !1
15
- },
16
- lineDecorationsWidth: "0.0ch"
17
- }, x = {
18
- minimap: { enabled: !1 },
19
- automaticLayout: !0,
20
- fixedOverflowWidgets: !0,
21
- fontFamily: "\"Roboto Mono\", serif",
22
- fontWeight: "400",
23
- lineNumbersMinChars: 3,
24
- scrollbar: { alwaysConsumeMouseWheel: !1 },
25
- ...b,
26
- renderOverviewRuler: !1,
27
- overviewRulerBorder: !1,
28
- originalEditable: !1
29
- }, S = "Script", C = (e, t) => t === void 0 ? e === "plaintext" ? S : e.toUpperCase() : t, w = /* @__PURE__ */ new WeakMap(), te = (e) => {
30
- let t = w.get(e);
31
- if (t !== void 0) {
32
- if (t > 1) {
33
- w.set(e, t - 1);
34
- return;
35
- }
36
- w.delete(e), e.dispose();
37
- }
38
- }, ne = (e) => {
39
- if ("editorModel" in e) return {
40
- model: e.editorModel,
41
- release: () => {}
42
- };
43
- let t = _.Uri.parse(`inmemory://model/${e.fileName}`), n = _.editor.getModel(t), r = n ?? _.editor.createModel("", e.language, t), i = w.get(r);
44
- return (!n || i !== void 0) && w.set(r, (i ?? 0) + 1), {
45
- model: r,
46
- release: () => te(r)
47
- };
48
- }, T = (e) => {
49
- let t = p(e.getValue()), n = e.onDidChangeContent(() => {
50
- t.value = e.getValue();
51
- });
52
- return u(() => n.dispose()), {
53
- text: a({
54
- get: () => t.value,
55
- set: (t) => {
56
- e.pushStackElement(), e.pushEditOperations([], [{
57
- range: e.getFullModelRange(),
58
- text: t
59
- }], () => null);
60
- }
61
- }),
62
- setInitialText: (t) => e.setValue(t)
63
- };
64
- }, E = (e) => {
65
- if (e.value === void 0) throw Error("Could not create code editor because no element was provided.");
66
- }, D = (e, t) => () => {
67
- e.value && e.value.dispose();
68
- for (let e of t) e.isAttachedToEditor() || e.dispose();
69
- }, O = (e) => (t, n) => {
70
- if (e.value?.getOption(_.editor.EditorOption.readOnly)) return;
71
- let r = [];
72
- n && !e.value?.getModel()?.getValue().includes(n) && r.push({
73
- range: new _.Selection(1, 1, 1, 1),
74
- text: `${n}\n`,
75
- forceMoveMarkers: !0
76
- }), r.push({
77
- range: e.value?.getSelection(),
78
- text: t,
79
- forceMoveMarkers: !0
80
- }), e.value?.getModel()?.pushEditOperations([], r, () => null), e.value?.getModel()?.pushStackElement();
81
- }, k = (e) => (t) => {
82
- if (e.value?.getOption(_.editor.EditorOption.readOnly)) return;
83
- let n = [{
84
- range: e.value?.getSelection(),
85
- text: t,
86
- forceMoveMarkers: !0
87
- }];
88
- e.value?.getModel()?.pushEditOperations([], n, () => null), e.value?.getModel()?.pushStackElement();
89
- }, A = (e, t, n, { selection: r, selectedLines: i }) => {
90
- let a = e.getModel();
91
- a !== t && (e.setModel(t), a?.dispose()), e.updateOptions({
92
- ...b,
93
- ...n.extraEditorOptions ?? {}
94
- }), e.onDidChangeCursorSelection((e) => {
95
- r.value = t.getValueInRange(e.selection), i.value = t.getValueInRange({
96
- startLineNumber: e.selection.startLineNumber,
97
- startColumn: 0,
98
- endLineNumber: e.selection.endLineNumber,
99
- endColumn: t.getLineLastNonWhitespaceColumn(e.selection.endLineNumber)
100
- });
101
- });
102
- }, j = (e) => {
103
- let t = h(), { model: n, release: r } = ne(e), i = p(""), a = p("");
104
- return {
105
- editor: t,
106
- editorModel: n,
107
- releaseEditorModel: r,
108
- selection: i,
109
- selectedLines: a,
110
- returnValue: {
111
- editor: t,
112
- editorModel: n,
113
- selection: f(i),
114
- selectedLines: f(a),
115
- insertColumnReference: O(t),
116
- insertText: k(t),
117
- ...T(n)
118
- }
119
- };
120
- }, M = (e) => {
121
- let { editor: t, editorModel: n, releaseEditorModel: i, selection: a, selectedLines: d, returnValue: f } = j(e), p = o()?.appContext ?? null;
122
- return l(() => {
123
- E(e.container);
124
- let i = s(r, {
125
- overviewRuler: !0,
126
- language: n.getLanguageId(),
127
- languageLabel: C(n.getLanguageId(), e.languageLabel),
128
- onVnodeMounted: () => {
129
- let r = i.component.exposed.getEditor();
130
- A(r, n, e, {
131
- selection: a,
132
- selectedLines: d
133
- }), t.value = r;
134
- }
135
- });
136
- i.appContext = p, m(i, e.container.value);
137
- }), u(() => {
138
- e.container.value && m(null, e.container.value), c(i);
139
- }), f;
140
- }, re = (e, t) => {
141
- let { editor: n, editorModel: r, releaseEditorModel: i, selection: o, selectedLines: s, returnValue: c } = j(t), l = a(() => ({
142
- modelValue: c.text.value,
143
- language: r.getLanguageId(),
144
- languageLabel: C(r.getLanguageId(), t.languageLabel),
145
- overviewRuler: !0
146
- }));
147
- return g(e, (e) => {
148
- let i = e?.getEditor();
149
- if (!i) {
150
- n.value = void 0, o.value = "", s.value = "";
151
- return;
152
- }
153
- i !== n.value && (A(i, r, t, {
154
- selection: o,
155
- selectedLines: s
156
- }), n.value = i);
157
- }, { immediate: !0 }), u(() => {
158
- i();
159
- }), {
160
- ...c,
161
- kdsCodeEditorProps: l
162
- };
163
- }, ie = (e) => {
164
- let t = h(), n = e.originalModel, r = _.editor.createModel("", n.getLanguageId(), _.Uri.parse(`inmemory://model/${e.modifiedFileName}`)), i = {
165
- original: n,
166
- modified: r
167
- };
168
- l(() => {
169
- E(e.container), t.value = _.editor.createDiffEditor(e.container.value, {
170
- ...x,
171
- ...e.extraEditorOptions ?? {}
172
- }), t.value.setModel(i);
173
- }), u(D(t, [n, r]));
174
- let { text: a, setInitialText: o } = T(r);
175
- return {
176
- editor: t,
177
- editorModel: i,
178
- modifiedText: a,
179
- setInitialModifiedText: o
180
- };
181
- }, N = h(), P = () => N, ae = (e) => {
182
- let t = M(e);
183
- return N.value = t, t;
184
- }, oe = {
185
- useCodeEditor: M,
186
- useDiffEditor: ie,
187
- useKdsCodeEditor: re,
188
- useMainCodeEditorStore: P
189
- }, F = {
190
- writeln: (e) => consola.error("Console not yet initialized", e),
191
- write: (e) => consola.error("Console not yet initialized", e),
192
- clear: () => consola.error("Console not yet initialized")
193
- }, I = (e) => {
194
- F = e;
195
- }, L = p("small"), R = class {
196
- jsonDataService;
197
- _eventHandlers = {};
198
- constructor(e) {
199
- this.jsonDataService = e, this.startPolling().catch(() => {});
200
- }
201
- async startPolling() {
202
- for (;;) {
203
- let e = await this.jsonDataService.data({ method: "ScriptingService.getEvent" });
204
- if (e) {
205
- if (e.type in this._eventHandlers) this._eventHandlers[e.type](e.data);
206
- else throw Error(`Got unexpected event from Java with type ${e.type}`);
207
- }
208
- }
209
- }
210
- registerEventHandler(e, t) {
211
- this._eventHandlers[e] = t;
212
- }
213
- }, z = class {
214
- jsonDataService;
215
- alertingService;
216
- eventPoller;
217
- constructor(e, t) {
218
- this.jsonDataService = e, this.alertingService = t, this.eventPoller = new R(this.jsonDataService);
219
- }
220
- sendToService(e, t) {
221
- return this.jsonDataService.data({
222
- method: `ScriptingService.${e}`,
223
- options: t
224
- });
225
- }
226
- callRpcMethod(e) {
227
- return this.jsonDataService.data(e);
228
- }
229
- getOutputPreviewTableInitialData() {
230
- return this.jsonDataService.data({ method: "OutputPreviewTableInitialDataRpcSupplier.getInitialData" });
231
- }
232
- registerEventHandler(e, t) {
233
- this.eventPoller.registerEventHandler(e, t);
234
- }
235
- async connectToLanguageServer(r) {
236
- let i = r ?? P().value?.editorModel;
237
- if (i === void 0) throw Error("Editor model has not yet been initialized");
238
- let a = await this.sendToService("connectToLanguageServer");
239
- if (a.status === "RUNNING") return t.create(i, new n((e) => this.registerEventHandler("language-server", e)), new e((e) => this.sendToService("sendLanguageServerMessage", [e])));
240
- throw Error(a.message ?? "Starting the language server failed");
241
- }
242
- async isCallKnimeUiApiAvailable(e) {
243
- let t = this.jsonDataService.baseService;
244
- return t !== null && (await t.callKnimeUiApi("PortService.getPortView", {
245
- nodeId: e.nodeId,
246
- portIdx: e.portIdx,
247
- viewIdx: e.portViewConfigs[0]?.portViewIdx
248
- })).isSome;
249
- }
250
- isKaiEnabled() {
251
- return this.sendToService("isKaiEnabled");
252
- }
253
- isLoggedIntoHub() {
254
- return this.sendToService("isLoggedIntoHub");
255
- }
256
- getAiDisclaimer() {
257
- return this.sendToService("getAiDisclaimer");
258
- }
259
- sendAlert(e) {
260
- this.alertingService?.sendAlert(e);
261
- }
262
- }, B = class {
263
- initialSettings;
264
- settingsInitialData;
265
- dialogService;
266
- jsonDataService;
267
- constructor(e, t, n, r) {
268
- if (this.initialSettings = e, this.settingsInitialData = t, this.dialogService = n, this.jsonDataService = r, e === void 0 && t === void 0) throw Error("Either initialSettings or settingsInitialData must be provided");
269
- if (e !== void 0 && t !== void 0) throw Error("Cannot provide both initialSettings and settingsInitialData");
270
- }
271
- getSettings() {
272
- return this.initialSettings;
273
- }
274
- getSettingsInitialData() {
275
- return this.settingsInitialData;
276
- }
277
- registerSettingsGetterForApply(e) {
278
- this.dialogService.setApplyListener(async () => {
279
- let t = e();
280
- try {
281
- return await this.jsonDataService.applyData(t), { isApplied: !0 };
282
- } catch (e) {
283
- return consola.warn("Failed to apply settings", e), { isApplied: !1 };
284
- }
285
- });
286
- }
287
- registerSettings(e) {
288
- return this.dialogService.registerSettings(e);
289
- }
290
- }, V = (e, t) => {
291
- let n = G().mainScriptConfigKey ?? "script", r = G().mainScriptSettingsType ?? "model";
292
- if (!t) return { data: { [r]: { [n]: e.script } } };
293
- let i = t.data[r];
294
- if (i === void 0) throw Error(`Could not find ${r} settings in core dialog settings to update script.`);
295
- return i[n] = e.script, t;
296
- }, H, U = () => H, W, G = () => W, K, se = () => K, ce = async () => {
297
- let e = await ee.getInstance(), t = await y.getInstance();
298
- H = new z(e, await v.getInstance());
299
- let n = await e.initialData();
300
- W = n.initialData, K = new B(n.settings, n.settingsInitialData ? JSON.parse(n.settingsInitialData) : void 0, t, e), L.value = t.getInitialDisplayMode(), t.addOnDisplayModeChangeCallback(({ mode: e }) => {
301
- L.value = e;
302
- }), Z();
303
- }, le = (e) => {
304
- e.scriptingService && (H = e.scriptingService), e.initialData && (W = e.initialData), e.settingsService && (K = e.settingsService), e.displayMode && (L.value = e.displayMode), Z();
305
- }, ue = () => {
306
- U().registerEventHandler("console", F.write);
307
- }, q = d({}), de = () => q, J = () => {
308
- q.promptResponse !== void 0 && delete q.promptResponse;
309
- }, fe = (e, t = null) => {
310
- let n = window?.localStorage?.getItem(e);
311
- if (n === null) return t;
312
- try {
313
- return JSON.parse(n);
314
- } catch {
315
- return consola.warn(`Could not parse "${e}" from local storage.`), t;
316
- }
317
- }, pe = (e, t) => {
318
- window?.localStorage?.setItem(e, JSON.stringify(t));
319
- }, Y = () => {
320
- let e = G().kAiConfig.hubId ?? "";
321
- return `ai-disclaimer-do-not-show-again-${encodeURIComponent(e.trim().toLowerCase())}`;
322
- }, me = (e) => {
323
- pe(Y(), e);
324
- }, X = p(!0), Z = () => {
325
- X.value = !fe(Y(), !1);
326
- }, Q = h(), $ = (e) => {
327
- Q.value = e;
328
- };
329
- g(() => P().value, $);
330
- var he = p([]);
331
- //#endregion
332
- export { I as _, me as a, P as b, G as c, ce as d, ue as f, F as g, L as h, $ as i, U as l, V as m, J as n, X as o, le as p, he as r, de as s, Q as t, se as u, oe as v, ae as y };
@@ -1,214 +0,0 @@
1
- import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import { C as t, a as n, t as r } from "./jsonforms-vue.esm-B9eODaNM.js";
3
- import { f as i, i as a, j as o, o as s } from "./dist-iAFUw6uq.js";
4
- import { t as c } from "./src-pw1LRAdm-BUOXZfmX.js";
5
- import { o as l } from "./useFlowVariables-BFaB9PV-.js";
6
- import { r as u } from "./useDirtySettings-C_JB8Tb9.js";
7
- import { n as d, t as f } from "./inject-DGoSf00A.js";
8
- import { r as p } from "./paths-DH9g52IX.js";
9
- import { r as m } from "./useProvideForFlowVariables-AgNwtMFv.js";
10
- import { Fragment as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, defineComponent as C, inject as w, normalizeClass as T, onMounted as E, openBlock as D, provide as O, ref as k, toDisplayString as A, unref as j, watch as M, watchEffect as N, withCtx as P } from "vue";
11
- import { DefaultSettingComparator as F } from "@knime/ui-extension-service";
12
- //#region ../core-ui/src/nodeDialog/composables/components/JsonSettingsComparator.ts
13
- var I = class extends F {
14
- toInternalState(e) {
15
- return JSON.stringify(e ?? null);
16
- }
17
- equals(e, t) {
18
- return e === t;
19
- }
20
- }, L = Symbol("arrayLayoutElementAddedState"), R = ({ isNewElement: e }) => {
21
- let t = /* @__PURE__ */ new Set();
22
- return O(L, {
23
- isNewElement: e,
24
- registerDirtyStateReset: (e) => {
25
- t.add(e);
26
- }
27
- }), { resetElementDirtyState: () => t.forEach((e) => e()) };
28
- }, z = () => w(L, {
29
- isNewElement: !1,
30
- registerDirtyStateReset: () => {}
31
- }), B = ({ dataPath: e, value: t, initialValue: n, valueComparator: r }) => {
32
- let i = r ?? new I(), { constructSettingState: a, getSettingState: o } = u(), s = z(), c = d("updateData"), l = d("getInitialValue"), f = () => {
33
- let r = n === void 0 ? l(j(e)) : n, o = a(j(e), {
34
- initialValue: r,
35
- valueComparator: i
36
- });
37
- return o(t.value), s.isNewElement && c(j(e)), o;
38
- }, p = () => {
39
- let n = o(j(e));
40
- return n?.(t.value), s.isNewElement && c(j(e)), n;
41
- }, m = () => p() ?? f(), h = null;
42
- E(() => {
43
- h = m();
44
- }), M(() => t.value, (e) => h?.(e)), s.registerDirtyStateReset(() => {
45
- h?.(void 0);
46
- });
47
- }, V = Symbol("hideFlowVariableButtonsInArrayFlowVariablesPreview"), H = (e) => O(V, e), U = () => w(V, null), W = (e) => {
48
- let t = f("getPersistSchema")?.() ?? {}, n = l(), r = g(() => p({
49
- persistSchema: t,
50
- path: e.value
51
- })), i = g(() => r.value?.map((e) => ({
52
- ...e,
53
- controllingFlowVariableName: n?.[e.configPath]?.controllingFlowVariableName ?? null
54
- })) ?? null);
55
- return {
56
- arrayFlowVariables: i,
57
- arrayFlowVariablesSet: g(() => !!i.value?.some(({ controllingFlowVariableName: e }) => e !== null)),
58
- missingRequiredVariables: g(() => i.value?.filter((e) => e.required && !e.controllingFlowVariableName) ?? [])
59
- };
60
- }, G = /* @__PURE__ */ C({
61
- __name: "FlowVariableSelector",
62
- props: {
63
- label: {},
64
- errorSubText: {},
65
- persistPath: {},
66
- dataPath: {},
67
- skipOverrideValueFetch: { type: Boolean },
68
- arrayVariablesOnly: { type: Boolean }
69
- },
70
- emits: ["controllingFlowVariableSet"],
71
- setup(e, { emit: t }) {
72
- let n = e, { setControllingFlowVariable: r, unsetControllingFlowVariable: a, controllingFlowVariableName: o, invalidateSetFlowVariable: c } = m(n.persistPath), { getAvailableFlowVariables: l, getFlowVariableOverrideValue: u, clearControllingFlowVariable: d } = f("flowVariablesApi"), p = k([]), C = k({}), w = {
73
- id: "",
74
- text: "None",
75
- title: "No flow variable selected"
76
- }, O = (e) => [w, ...e.map((e) => ({
77
- id: e.name,
78
- text: e.name,
79
- accessory: {
80
- type: "dataType",
81
- name: e.type.id
82
- },
83
- title: `${e.name} (currently "${e.value}")`
84
- }))], M = (e) => e.type.id.endsWith("ARRAY"), N = async (e) => {
85
- let t = await l(e), r = Object.values(t).flat();
86
- return n.arrayVariablesOnly ? r.filter(M) : r;
87
- }, F = k(!1);
88
- E(async () => {
89
- let e = await N(n.persistPath);
90
- C.value = e.reduce((e, t) => (e[t.name] = t, e), {}), p.value = O(e), F.value = !0;
91
- });
92
- let I = t, L = async (e) => {
93
- if (e === w.id) {
94
- a({ path: n.persistPath }), d(n.persistPath);
95
- return;
96
- }
97
- let t = C.value[e], i = {
98
- path: n.persistPath,
99
- flowVariableName: t.name
100
- };
101
- if (r(i), n.skipOverrideValueFetch) return;
102
- let o = await u([n.persistPath], n.dataPath);
103
- o === void 0 ? c(i) : I("controllingFlowVariableSet", n.dataPath, o, t.name);
104
- }, R = g(() => p.value.length === 1 && !o.value), z = g(() => F.value ? R.value ? "No suitable flow variable present" : "No flow variable selected" : "Fetching available flow variables...");
105
- return (e, t) => (D(), _(j(i), {
106
- label: e.label,
107
- error: !!e.errorSubText,
108
- "sub-text": e.errorSubText,
109
- "preserve-sub-text-space": !0,
110
- "possible-values": p.value,
111
- "model-value": F.value ? j(o) : "",
112
- placeholder: z.value,
113
- disabled: !F.value || R.value,
114
- "onUpdate:modelValue": L
115
- }, {
116
- option: P(({ slotData: e, selectedValue: t, isMissing: n, expanded: r } = {
117
- slotData: {},
118
- selectedValue: "",
119
- isMissing: !1,
120
- expanded: !1
121
- }) => [r || t !== "" || n ? (D(), y("div", {
122
- key: 0,
123
- class: T(["data-type-entry", { "with-type": n || e.typeId }])
124
- }, [n ? (D(), y(h, { key: 0 }, [S(j(s), { size: "small" }), b("span", null, "(MISSING) " + A(t), 1)], 64)) : (D(), y(h, { key: 1 }, [e.typeId ? (D(), _(j(s), {
125
- key: 0,
126
- "icon-name": e.typeId,
127
- "icon-title": e.typeText,
128
- size: "small"
129
- }, null, 8, ["icon-name", "icon-title"])) : v("", !0), b("span", null, A(e.text), 1)], 64))], 2)) : (D(), y(h, { key: 1 }, [x(A(z.value), 1)], 64))]),
130
- _: 1
131
- }, 8, [
132
- "label",
133
- "error",
134
- "sub-text",
135
- "possible-values",
136
- "model-value",
137
- "placeholder",
138
- "disabled"
139
- ]));
140
- }
141
- }), K = "ElementResetButton", q = /* @__PURE__ */ C({
142
- __name: "EditResetButton",
143
- props: {
144
- ...r(),
145
- initialIsEdited: {
146
- type: Boolean,
147
- default: !1
148
- },
149
- isLoading: {
150
- type: Boolean,
151
- default: !1
152
- }
153
- },
154
- setup(e) {
155
- let t = e, r = d("trigger"), { control: i, handleChange: a } = n(t), s = k(!1), c = () => {
156
- s.value = !0;
157
- }, l = () => {
158
- s.value = !1, r({ id: K });
159
- };
160
- return N(() => {
161
- s.value = t.initialIsEdited;
162
- }), N(() => {
163
- s.value && !i.value.data ? a(i.value.path, !0) : !s.value && i.value.data && a(i.value.path, !1);
164
- }), (t, n) => (D(), y("div", null, [S(j(o), {
165
- state: e.isLoading ? "progress" : "default",
166
- variant: "transparent",
167
- size: "small",
168
- "leading-icon": s.value ? "undo" : "edit",
169
- disabled: e.isLoading || !j(i).enabled,
170
- ariaLabel: e.isLoading ? "Loading" : s.value ? "Reset to default" : "Edit",
171
- onClick: n[0] ||= (e) => s.value ? l() : c()
172
- }, null, 8, [
173
- "state",
174
- "leading-icon",
175
- "disabled",
176
- "ariaLabel"
177
- ])]));
178
- }
179
- }), J = "editResetButton", Y = {
180
- name: "EditResetButton",
181
- renderer: q,
182
- tester: t(c.default, (e) => e.options?.format === J)
183
- }, X = /*#__PURE__*/ e(/* @__PURE__ */ C({
184
- __name: "ArrayLayoutItemCheckbox",
185
- props: {
186
- control: {},
187
- handleChange: { type: Function },
188
- changeValue: { type: Function },
189
- disabled: { type: Boolean },
190
- labelForId: {},
191
- error: { type: Boolean },
192
- subText: {},
193
- onRegisterValidation: { type: Function }
194
- },
195
- setup(e) {
196
- return (e, t) => (D(), _(j(a), {
197
- "model-value": e.control.data,
198
- tooltip: e.control.label,
199
- disabled: e.disabled,
200
- class: "checkbox",
201
- "onUpdate:modelValue": t[0] ||= (t) => e.changeValue(t)
202
- }, null, 8, [
203
- "model-value",
204
- "tooltip",
205
- "disabled"
206
- ]));
207
- }
208
- }), [["__scopeId", "data-v-d5461dd5"]]), Z = "elementCheckbox", Q = {
209
- name: "ElementCheckbox",
210
- control: X,
211
- tester: t(c.default, (e) => e.options?.format === Z)
212
- };
213
- //#endregion
214
- export { K as a, W as c, R as d, Y as i, U as l, Q as n, G as o, J as r, H as s, Z as t, B as u };