base-screen 0.3.0 → 0.4.0
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/_internal/contracts/document/schema.d.ts +7 -0
- package/dist/_internal/contracts/document/schema.js +1 -1
- package/dist/_internal/contracts/document/validate-value-ref.js +6 -1
- package/dist/_internal/contracts/screen-document.schema.json +15 -3
- package/dist/_internal/contracts/types/diagnostics.d.ts +1 -1
- package/dist/_internal/contracts/types/document.d.ts +3 -1
- package/dist/_internal/core/blueprint/runtime-simulate.d.ts +57 -0
- package/dist/_internal/core/blueprint/runtime-simulate.js +177 -0
- package/dist/_internal/core/blueprint/runtime.d.ts +1 -0
- package/dist/_internal/core/blueprint/runtime.js +1 -0
- package/dist/_internal/core/commands/apply-collection-commands.d.ts +32 -0
- package/dist/_internal/core/commands/apply-collection-commands.js +174 -0
- package/dist/_internal/core/commands/apply.js +13 -0
- package/dist/_internal/core/commands/parse-command.js +12 -0
- package/dist/_internal/core/commands/types.d.ts +29 -1
- package/dist/_internal/core/data/data-candidates.d.ts +38 -0
- package/dist/_internal/core/data/data-candidates.js +186 -0
- package/dist/_internal/core/data/dataset-profile.d.ts +71 -0
- package/dist/_internal/core/data/dataset-profile.js +170 -0
- package/dist/_internal/core/data/sample-values.d.ts +25 -0
- package/dist/_internal/core/data/sample-values.js +45 -0
- package/dist/_internal/core/diff/screen-diff.js +6 -0
- package/dist/_internal/core/index.d.ts +7 -1
- package/dist/_internal/core/index.js +7 -1
- package/dist/_internal/core/state/state-preset.d.ts +32 -0
- package/dist/_internal/core/state/state-preset.js +37 -0
- package/dist/_internal/core/validation/layout-audit.d.ts +17 -0
- package/dist/_internal/core/validation/layout-audit.js +228 -0
- package/dist/_internal/core/validation/legibility.d.ts +9 -0
- package/dist/_internal/core/validation/legibility.js +33 -0
- package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +6 -1
- package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +27 -0
- package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +21 -5
- package/dist/_internal/engine/browser/dom/dataset/designer-data-section-diff.d.ts +4 -6
- package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +2 -0
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +3 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +5 -3
- package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +2 -14
- package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +2 -0
- package/dist/_internal/engine/browser/viewport/designer-snap-tuning.d.ts +14 -0
- package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +2 -0
- package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +35 -2
- package/dist/_internal/engine/common/operations/display/designer-target-display.d.ts +2 -2
- package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +7 -2
- package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +42 -2
- package/dist/_internal/engine/{designer-blueprint-workbench-panel-CJ3iZo5v.js → designer-blueprint-workbench-panel-BWSglfAb.js} +210 -290
- package/dist/_internal/engine/{designer-dataset-controller-CrfOg2Ys.js → designer-dataset-controller-DdbY4ILC.js} +619 -561
- package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +24 -0
- package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +12 -0
- package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +2 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +1 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +4 -1
- package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +23 -0
- package/dist/_internal/engine/{designer-field-primitives-KBZuWN_D.js → designer-field-primitives-Crn464Qg.js} +44 -3
- package/dist/_internal/engine/{designer-left-panel-groups-dom-N2OHOWjl.js → designer-left-panel-groups-dom-DFdLWxxY.js} +2 -2
- package/dist/_internal/engine/{host-resource-selection-xo2mLCD4.js → host-resource-selection-CWrPLVOc.js} +2 -2
- package/dist/_internal/engine/index.js +4742 -4360
- package/dist/_internal/host-kit/index.d.ts +1 -0
- package/dist/_internal/host-kit/index.js +1 -0
- package/dist/_internal/host-kit/intent/index.d.ts +16 -0
- package/dist/_internal/host-kit/intent/index.js +13 -0
- package/dist/_internal/host-kit/intent/intent-behavior.d.ts +59 -0
- package/dist/_internal/host-kit/intent/intent-behavior.js +812 -0
- package/dist/_internal/host-kit/intent/intent-block.d.ts +59 -0
- package/dist/_internal/host-kit/intent/intent-block.js +359 -0
- package/dist/_internal/host-kit/intent/intent-catalog.d.ts +105 -0
- package/dist/_internal/host-kit/intent/intent-catalog.js +60 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +222 -0
- package/dist/_internal/host-kit/intent/intent-compile-types.js +10 -0
- package/dist/_internal/host-kit/intent/intent-compile.d.ts +35 -0
- package/dist/_internal/host-kit/intent/intent-compile.js +465 -0
- package/dist/_internal/host-kit/intent/intent-data-check.d.ts +50 -0
- package/dist/_internal/host-kit/intent/intent-data-check.js +163 -0
- package/dist/_internal/host-kit/intent/intent-data-context.d.ts +53 -0
- package/dist/_internal/host-kit/intent/intent-data-context.js +200 -0
- package/dist/_internal/host-kit/intent/intent-dataset.d.ts +52 -0
- package/dist/_internal/host-kit/intent/intent-dataset.js +125 -0
- package/dist/_internal/host-kit/intent/intent-format.d.ts +33 -0
- package/dist/_internal/host-kit/intent/intent-format.js +94 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +29 -0
- package/dist/_internal/host-kit/intent/intent-kpi-bind.js +59 -0
- package/dist/_internal/host-kit/intent/intent-layout.d.ts +102 -0
- package/dist/_internal/host-kit/intent/intent-layout.js +264 -0
- package/dist/_internal/host-kit/intent/intent-parse.d.ts +39 -0
- package/dist/_internal/host-kit/intent/intent-parse.js +930 -0
- package/dist/_internal/host-kit/intent/intent-prepare.d.ts +52 -0
- package/dist/_internal/host-kit/intent/intent-prepare.js +104 -0
- package/dist/_internal/host-kit/intent/intent-session.d.ts +202 -0
- package/dist/_internal/host-kit/intent/intent-session.js +1001 -0
- package/dist/_internal/host-kit/intent/intent-stream.d.ts +28 -0
- package/dist/_internal/host-kit/intent/intent-stream.js +183 -0
- package/dist/_internal/host-kit/intent/intent-style.d.ts +37 -0
- package/dist/_internal/host-kit/intent/intent-style.js +77 -0
- package/dist/_internal/host-kit/intent/intent-types.d.ts +234 -0
- package/dist/_internal/host-kit/intent/intent-types.js +10 -0
- package/dist/_internal/material/chart.js +34 -12
- package/dist/_internal/material/table.js +52 -21
- package/dist/_internal/plugin-sdk/index.d.ts +6 -0
- package/dist/_internal/plugin-sdk/index.js +6 -0
- package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +38 -0
- package/dist/_internal/plugin-sdk/material-isolated-csp.js +67 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +22 -0
- package/dist/_internal/plugin-sdk/material-isolated-runtime.js +262 -0
- package/dist/_internal/plugin-sdk/material-isolated.d.ts +94 -0
- package/dist/_internal/plugin-sdk/material-isolated.js +1024 -0
- package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +10 -2
- package/dist/_internal/plugin-sdk/material-rendered-element.js +71 -7
- package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +2 -0
- package/dist/_internal/plugin-sdk/material-spec-audit.js +26 -6
- package/dist/_internal/plugin-sdk/material-spec.d.ts +20 -0
- package/dist/_internal/plugin-sdk/material-spec.js +78 -3
- package/dist/_internal/plugin-sdk/material-template-audit.d.ts +12 -0
- package/dist/_internal/plugin-sdk/material-template-audit.js +302 -0
- package/dist/_internal/plugin-sdk/material-template-expression.d.ts +98 -0
- package/dist/_internal/plugin-sdk/material-template-expression.js +549 -0
- package/dist/_internal/plugin-sdk/material-template-render.d.ts +32 -0
- package/dist/_internal/plugin-sdk/material-template-render.js +579 -0
- package/dist/_internal/plugin-sdk/material-template.d.ts +185 -0
- package/dist/_internal/plugin-sdk/material-template.js +879 -0
- package/dist/auto-register.js +10 -10
- package/dist/contracts.js +5 -5
- package/dist/contrast-DRPezUIl.js +131 -0
- package/dist/contrast-DRPezUIl.js.map +1 -0
- package/dist/core.js +156 -136
- package/dist/core.js.map +1 -1
- package/dist/dataset-profile-Dk6xdtsM.js +261 -0
- package/dist/dataset-profile-Dk6xdtsM.js.map +1 -0
- package/dist/{designer-3Tb0EIDV.js → designer-CFOvOmLn.js} +2 -2
- package/dist/{designer-3Tb0EIDV.js.map → designer-CFOvOmLn.js.map} +1 -1
- package/dist/designer-auto-register.js +5 -5
- package/dist/{designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js → designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js} +452 -531
- package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js.map +1 -0
- package/dist/{designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js → designer-dataset-controller-DdbY4ILC-CMdGdGbr.js} +862 -804
- package/dist/designer-dataset-controller-DdbY4ILC-CMdGdGbr.js.map +1 -0
- package/dist/{designer-field-primitives-KBZuWN_D-B3h4jpYe.js → designer-field-primitives-Crn464Qg-Bi7q8s5J.js} +45 -4
- package/dist/designer-field-primitives-Crn464Qg-Bi7q8s5J.js.map +1 -0
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js} +4 -4
- package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js.map → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js.map} +1 -1
- package/dist/designer.js +5 -5
- package/dist/{dist-6GRboBs-.js → dist-B2bW2Tru.js} +4 -4
- package/dist/{dist-6GRboBs-.js.map → dist-B2bW2Tru.js.map} +1 -1
- package/dist/{dist-BjLjFUy1.js → dist-CHK9BTXX.js} +3833 -3453
- package/dist/dist-CHK9BTXX.js.map +1 -0
- package/dist/engine.js +5 -5
- package/dist/{fragment-Y6YnW6wy.js → fragment-B-oP0Fru.js} +3 -3
- package/dist/{fragment-Y6YnW6wy.js.map → fragment-B-oP0Fru.js.map} +1 -1
- package/dist/host-kit.js +3963 -187
- package/dist/host-kit.js.map +1 -1
- package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js → host-resource-selection-CWrPLVOc-DPDq3jau.js} +5 -5
- package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js.map → host-resource-selection-CWrPLVOc-DPDq3jau.js.map} +1 -1
- package/dist/index.js +10 -10
- package/dist/legibility-CS28ivEz.js +12 -0
- package/dist/legibility-CS28ivEz.js.map +1 -0
- package/dist/{level-scale-BzUjE31V.js → level-scale-CwHqFEVd.js} +2 -2
- package/dist/{level-scale-BzUjE31V.js.map → level-scale-CwHqFEVd.js.map} +1 -1
- package/dist/{manager-Ch0RTu_i.js → manager-CeB4Jnr9.js} +3 -3
- package/dist/{manager-Ch0RTu_i.js.map → manager-CeB4Jnr9.js.map} +1 -1
- package/dist/{material-UbSfiuZq.js → material-DeVkzSoT.js} +2 -2
- package/dist/{material-UbSfiuZq.js.map → material-DeVkzSoT.js.map} +1 -1
- package/dist/material-auto-register.js +1 -1
- package/dist/material.js +2 -2
- package/dist/{migrate-document-D3HhCVlZ.js → migrate-document-BM888PtC.js} +2 -2
- package/dist/{migrate-document-D3HhCVlZ.js.map → migrate-document-BM888PtC.js.map} +1 -1
- package/dist/{parse-AOTE9WnD.js → parse-Ji7kE9ZT.js} +9 -4
- package/dist/parse-Ji7kE9ZT.js.map +1 -0
- package/dist/{parse-B1OD1teS.js → parse-aZat9tAS.js} +3 -3
- package/dist/{parse-B1OD1teS.js.map → parse-aZat9tAS.js.map} +1 -1
- package/dist/{parse-parts-BNrpdG5o.js → parse-parts-qzl4suzk.js} +2 -2
- package/dist/{parse-parts-BNrpdG5o.js.map → parse-parts-qzl4suzk.js.map} +1 -1
- package/dist/{plugin-DHgh9uHh.js → plugin-CstHQ5ws.js} +4 -4
- package/dist/{plugin-DHgh9uHh.js.map → plugin-CstHQ5ws.js.map} +1 -1
- package/dist/plugin-core.js +2 -2
- package/dist/plugin-manager.js +1 -1
- package/dist/plugin-package-DWifuHi1.js +4206 -0
- package/dist/plugin-package-DWifuHi1.js.map +1 -0
- package/dist/{plugin-registration-rsmb4GvS.js → plugin-registration-DTwBvnHX.js} +2 -2
- package/dist/{plugin-registration-rsmb4GvS.js.map → plugin-registration-DTwBvnHX.js.map} +1 -1
- package/dist/plugin-sdk.js +6 -6
- package/dist/{plugins-DGRHgREK.js → plugins-QDL0yIql.js} +2 -2
- package/dist/{plugins-DGRHgREK.js.map → plugins-QDL0yIql.js.map} +1 -1
- package/dist/plugins.js +8 -8
- package/dist/renderer.js +1 -1
- package/dist/{runtime-dispatch-BfnRDtMe.js → runtime-dispatch-C0gyIrTv.js} +2 -2
- package/dist/{runtime-dispatch-BfnRDtMe.js.map → runtime-dispatch-C0gyIrTv.js.map} +1 -1
- package/dist/runtime-simulate-aSYO9yDX.js +147 -0
- package/dist/runtime-simulate-aSYO9yDX.js.map +1 -0
- package/dist/{src-Bm7u11mN-_0u6cMEw.js → src-Bm7u11mN-Bi1hDVkh.js} +39 -39
- package/dist/{src-Bm7u11mN-_0u6cMEw.js.map → src-Bm7u11mN-Bi1hDVkh.js.map} +1 -1
- package/dist/state-preset-DtpygJOH.js +22 -0
- package/dist/state-preset-DtpygJOH.js.map +1 -0
- package/dist/{text-BNksUr5J.js → text-BSTz0pFQ.js} +87 -34
- package/dist/text-BSTz0pFQ.js.map +1 -0
- package/dist/{value-ref-BG_MV9C-.js → value-ref-XkLuckGV.js} +2 -2
- package/dist/{value-ref-BG_MV9C-.js.map → value-ref-XkLuckGV.js.map} +1 -1
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js → viewer-CrJupI8I-BJiz1cvW.js} +4 -4
- package/dist/{viewer-CrJupI8I-D9dVcNw4.js.map → viewer-CrJupI8I-BJiz1cvW.js.map} +1 -1
- package/dist/viewer-auto-register.js +2 -2
- package/dist/viewer.js +2 -2
- package/dist/{viewport-CiCKeAQH.js → viewport-BNIRWjiT.js} +354 -155
- package/dist/viewport-BNIRWjiT.js.map +1 -0
- package/package.json +12 -12
- package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js.map +0 -1
- package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js.map +0 -1
- package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js.map +0 -1
- package/dist/dist-BjLjFUy1.js.map +0 -1
- package/dist/parse-AOTE9WnD.js.map +0 -1
- package/dist/plugin-package-Dr5ro6h6.js +0 -1221
- package/dist/plugin-package-Dr5ro6h6.js.map +0 -1
- package/dist/text-BNksUr5J.js.map +0 -1
- package/dist/viewport-CiCKeAQH.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { C as e, r as t, s as n, w as r } from "./host-resource-selection-
|
|
2
|
-
import { A as i, O as a, S as o, T as s, _ as c, a as l, b as u, f as d, g as f, i as p, l as m, m as h, v as g, w as _, x as v, y } from "./designer-field-primitives-
|
|
1
|
+
import { C as e, r as t, s as n, w as r } from "./host-resource-selection-CWrPLVOc.js";
|
|
2
|
+
import { A as i, O as a, S as o, T as s, _ as c, a as l, b as u, f as d, g as f, i as p, l as m, m as h, v as g, w as _, x as v, y } from "./designer-field-primitives-Crn464Qg.js";
|
|
3
3
|
import { validateScreenHostResourceBinding as b } from "@base-screen/core";
|
|
4
4
|
import "@base-screen/plugin-core";
|
|
5
|
-
import { MAX_DATASET_ROWS as x, derivedDataSourceId as
|
|
5
|
+
import { MAX_DATASET_ROWS as x, derivedDataSourceId as S, evaluateScreenDatasetParameters as C, parseScreenDatasetDefinition as w, parseScreenDatasetEntries as ee, parseScreenDatasetGroups as T, parseScreenJsonValue as E, parseScreenTabularDataset as D, readScreenComponentDataBinding as O, readScreenComponentValueRef as k, readScreenDocumentDataSources as A, readScreenVariableRecord as te } from "@base-screen/contracts";
|
|
6
6
|
//#region src/browser/controllers/dataset/designer-data-flow-scroll-sync.ts
|
|
7
|
-
var
|
|
7
|
+
var ne = "[data-ds-section]", re = {
|
|
8
8
|
value: "source",
|
|
9
9
|
source: "source",
|
|
10
10
|
"host-link": "source",
|
|
11
11
|
preview: "preview",
|
|
12
12
|
authoring: "preview"
|
|
13
|
-
},
|
|
13
|
+
}, ie = class {
|
|
14
14
|
onStepChange;
|
|
15
15
|
#e;
|
|
16
16
|
#t;
|
|
@@ -44,12 +44,12 @@ var re = "[data-ds-section]", ie = {
|
|
|
44
44
|
handleScroll() {
|
|
45
45
|
let e = this.#e;
|
|
46
46
|
if (e === void 0) return;
|
|
47
|
-
let t = [...e.querySelectorAll(
|
|
47
|
+
let t = [...e.querySelectorAll(ne)];
|
|
48
48
|
if (t.length === 0) return;
|
|
49
49
|
let n = e.scrollTop + e.clientHeight >= e.scrollHeight - 10 ? e.scrollTop + e.clientHeight : e.scrollTop + Math.min(e.clientHeight * .25, 80), r = "source";
|
|
50
50
|
for (let e of t) {
|
|
51
51
|
if (e.offsetTop > n) break;
|
|
52
|
-
let t =
|
|
52
|
+
let t = re[e.dataset.dsSection];
|
|
53
53
|
t !== void 0 && (r = t);
|
|
54
54
|
}
|
|
55
55
|
this.emitStep(r);
|
|
@@ -63,20 +63,20 @@ var re = "[data-ds-section]", ie = {
|
|
|
63
63
|
};
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/browser/controllers/dataset/designer-data-source-authoring.ts
|
|
66
|
-
function
|
|
66
|
+
function ae(e, t) {
|
|
67
67
|
if (t === void 0) return null;
|
|
68
68
|
if (t.dataSource?.type === "dataset") return {
|
|
69
69
|
source: t.dataSource,
|
|
70
70
|
instanceId: void 0,
|
|
71
71
|
instance: void 0
|
|
72
72
|
};
|
|
73
|
-
let n =
|
|
73
|
+
let n = k(t);
|
|
74
74
|
if (n === null || n.kind !== "data-source-field" || e === void 0) return null;
|
|
75
|
-
let r =
|
|
75
|
+
let r = A(e).find((e) => e.id === n.dataSourceId);
|
|
76
76
|
if (r === void 0 || r.source.kind !== "dataset") return null;
|
|
77
77
|
let i = {};
|
|
78
78
|
for (let [e, t] of Object.entries(r.params)) {
|
|
79
|
-
let n =
|
|
79
|
+
let n = le(t);
|
|
80
80
|
n !== void 0 && (i[e] = n);
|
|
81
81
|
}
|
|
82
82
|
return {
|
|
@@ -84,21 +84,21 @@ function oe(e, t) {
|
|
|
84
84
|
type: "dataset",
|
|
85
85
|
datasetId: r.source.datasetId,
|
|
86
86
|
params: i,
|
|
87
|
-
binding:
|
|
87
|
+
binding: O(t)
|
|
88
88
|
},
|
|
89
89
|
instanceId: r.id,
|
|
90
90
|
instance: r
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function oe(e, t) {
|
|
94
94
|
if (t === void 0 || e === void 0 || t.dataSource?.type === "host-resource") return null;
|
|
95
|
-
let n =
|
|
95
|
+
let n = k(t);
|
|
96
96
|
if (n === null || n.kind !== "data-source-field") return null;
|
|
97
|
-
let r =
|
|
97
|
+
let r = A(e).find((e) => e.id === n.dataSourceId);
|
|
98
98
|
if (r === void 0 || r.source.kind !== "host-resource") return null;
|
|
99
99
|
let i = {};
|
|
100
100
|
for (let [e, t] of Object.entries(r.params)) {
|
|
101
|
-
let n =
|
|
101
|
+
let n = le(t);
|
|
102
102
|
n !== void 0 && (i[e] = n);
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
@@ -107,13 +107,13 @@ function se(e, t) {
|
|
|
107
107
|
resourceType: r.source.resourceType,
|
|
108
108
|
resourceId: r.source.resourceId,
|
|
109
109
|
params: i,
|
|
110
|
-
binding:
|
|
110
|
+
binding: O(t)
|
|
111
111
|
},
|
|
112
112
|
instanceId: r.id,
|
|
113
113
|
instance: r
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function se(e, t, n, r = []) {
|
|
117
117
|
let i = {};
|
|
118
118
|
for (let n of e.parameters) {
|
|
119
119
|
let e = t.params[n.name];
|
|
@@ -129,7 +129,7 @@ function ce(e, t, n, r = []) {
|
|
|
129
129
|
fields: a
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function ce(e) {
|
|
133
133
|
return e.kind === "variable" ? {
|
|
134
134
|
kind: "variable",
|
|
135
135
|
variableId: e.variableId
|
|
@@ -138,7 +138,7 @@ function le(e) {
|
|
|
138
138
|
value: e.value
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function le(e) {
|
|
142
142
|
if (e.kind === "variable") return {
|
|
143
143
|
kind: "variable",
|
|
144
144
|
variableId: e.variableId
|
|
@@ -155,7 +155,7 @@ function ue(e, t, n = []) {
|
|
|
155
155
|
e === void 0 ? n.defaultValue !== void 0 && (i[n.name] = {
|
|
156
156
|
kind: "inline",
|
|
157
157
|
value: n.defaultValue
|
|
158
|
-
}) : i[n.name] =
|
|
158
|
+
}) : i[n.name] = ce(e);
|
|
159
159
|
}
|
|
160
160
|
let a = r ? Object.fromEntries(Object.entries(t.binding?.fields ?? {}).map(([e, t]) => [e, [...t]])) : {};
|
|
161
161
|
return r || Object.assign(a, de(e, n)), {
|
|
@@ -224,10 +224,10 @@ function ge(e, t, n, r, a = []) {
|
|
|
224
224
|
} catch {
|
|
225
225
|
return M("CORE_COMMAND_INVALID", i.dataSource.staticInvalid);
|
|
226
226
|
}
|
|
227
|
-
let s =
|
|
227
|
+
let s = E(o);
|
|
228
228
|
if (!s.ok || n?.kind === "scalar" && typeof s.value !== n.valueType) return M("CORE_COMMAND_INVALID", i.dataSource.staticInvalid);
|
|
229
229
|
if (n?.kind === "tabular") {
|
|
230
|
-
let t =
|
|
230
|
+
let t = D(s.value);
|
|
231
231
|
if (!t.ok) return t;
|
|
232
232
|
let n = b(r ?? null, t.value.fields, a);
|
|
233
233
|
return n.ok ? j(De(e, {
|
|
@@ -259,7 +259,7 @@ function _e(e) {
|
|
|
259
259
|
},
|
|
260
260
|
params: e.draft.params,
|
|
261
261
|
...o === void 0 && e.newInstanceUpdatePolicy !== void 0 ? { updatePolicy: e.newInstanceUpdatePolicy } : {}
|
|
262
|
-
}, l = o === void 0 ? [...i, c] : i.map((e) => e.id === s ? c : e), u = e.document.components.find((t) => t.id === e.componentId), d = u === void 0 ? null :
|
|
262
|
+
}, l = o === void 0 ? [...i, c] : i.map((e) => e.id === s ? c : e), u = e.document.components.find((t) => t.id === e.componentId), d = u === void 0 ? null : k(u), f = d?.kind === "data-source-field" ? d.dataSourceId : void 0, p = [{
|
|
263
263
|
type: "replace-data-sources",
|
|
264
264
|
dataSources: l
|
|
265
265
|
}, {
|
|
@@ -291,17 +291,17 @@ function ve(e, t, n) {
|
|
|
291
291
|
if (n === void 0) return M("HOST_DATASET_PARAMETER_INVALID", i.dataset.incomplete);
|
|
292
292
|
r[e] = a.kind === "inline" ? a.value : Ce(n);
|
|
293
293
|
}
|
|
294
|
-
let a =
|
|
294
|
+
let a = C(t.parameters, r);
|
|
295
295
|
return a.ok ? j(null) : a;
|
|
296
296
|
}
|
|
297
297
|
function ye(e, t, n) {
|
|
298
298
|
for (let r of e.components) {
|
|
299
299
|
if (r.id === t) continue;
|
|
300
|
-
let e =
|
|
300
|
+
let e = k(r);
|
|
301
301
|
if (e?.kind === "data-source-field" && e.dataSourceId === n) return !0;
|
|
302
302
|
}
|
|
303
303
|
for (let t of e.variables) {
|
|
304
|
-
let e =
|
|
304
|
+
let e = te(t).value;
|
|
305
305
|
if (e.kind === "data-source-field" && e.dataSourceId === n) return !0;
|
|
306
306
|
}
|
|
307
307
|
return !1;
|
|
@@ -335,14 +335,14 @@ function we(e, t) {
|
|
|
335
335
|
dataValue: null,
|
|
336
336
|
dataBinding: null
|
|
337
337
|
}
|
|
338
|
-
}], i = n === void 0 ? null :
|
|
338
|
+
}], i = n === void 0 ? null : k(n);
|
|
339
339
|
if (i?.kind === "data-source-field") {
|
|
340
340
|
let n = i.dataSourceId, a = e.components.some((e) => {
|
|
341
341
|
if (e.id === t) return !1;
|
|
342
|
-
let r =
|
|
342
|
+
let r = k(e);
|
|
343
343
|
return r?.kind === "data-source-field" && r.dataSourceId === n;
|
|
344
344
|
}), o = e.variables.some((e) => {
|
|
345
|
-
let t =
|
|
345
|
+
let t = te(e);
|
|
346
346
|
return t.value.kind === "data-source-field" && t.value.dataSourceId === n;
|
|
347
347
|
}), s = e.dataSources ?? [];
|
|
348
348
|
!a && !o && s.some((e) => e.id === n) && r.push({
|
|
@@ -473,7 +473,7 @@ var Oe = class {
|
|
|
473
473
|
this.callbacks.report(a.diagnostics), this.callbacks.setFeedback(i.dataset.describeFailed);
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
|
-
let o =
|
|
476
|
+
let o = w(a.value);
|
|
477
477
|
if (!o.ok) {
|
|
478
478
|
this.callbacks.report(o.diagnostics), this.callbacks.setFeedback(i.dataset.describeFailed);
|
|
479
479
|
return;
|
|
@@ -516,7 +516,7 @@ var Oe = class {
|
|
|
516
516
|
this.callbacks.report(a.diagnostics), this.#h("error", a.diagnostics[0]?.code ?? i.dataset.loadFailed), this.callbacks.setFeedback(i.dataset.loadFailed);
|
|
517
517
|
return;
|
|
518
518
|
}
|
|
519
|
-
let o =
|
|
519
|
+
let o = ee(a.value);
|
|
520
520
|
if (!o.ok) {
|
|
521
521
|
this.callbacks.report(o.diagnostics), this.#h("error", o.diagnostics[0]?.code ?? i.dataset.loadFailed), this.callbacks.setFeedback(i.dataset.loadFailed);
|
|
522
522
|
return;
|
|
@@ -545,7 +545,7 @@ var Oe = class {
|
|
|
545
545
|
this.callbacks.report(n.diagnostics);
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
|
-
let r =
|
|
548
|
+
let r = T(n.value);
|
|
549
549
|
if (!r.ok) {
|
|
550
550
|
this.callbacks.report(r.diagnostics);
|
|
551
551
|
return;
|
|
@@ -658,7 +658,7 @@ function P(e, t) {
|
|
|
658
658
|
//#region src/browser/controllers/dataset/designer-dataset-instance-view.ts
|
|
659
659
|
function Pe(e, t) {
|
|
660
660
|
if (t === null || t.kind !== "data-source-field") return;
|
|
661
|
-
let n = t.dataSourceId, r =
|
|
661
|
+
let n = t.dataSourceId, r = A(e ?? Ie()).find((e) => e.id === n);
|
|
662
662
|
return r === void 0 ? {
|
|
663
663
|
id: n,
|
|
664
664
|
name: n,
|
|
@@ -872,34 +872,35 @@ function Je(t) {
|
|
|
872
872
|
let a = n.createElement("span");
|
|
873
873
|
a.className = "designer-visually-hidden", a.dataset.valueRefLive = "true", a.setAttribute("aria-live", "polite");
|
|
874
874
|
let o = n.createElement("div");
|
|
875
|
-
o.className = "designer-value-ref-field", o.append(i, a),
|
|
876
|
-
let s, c, l, u = 0, d = [], p = "", m, h;
|
|
877
|
-
function
|
|
875
|
+
o.className = "designer-value-ref-field", o.append(i, a), b();
|
|
876
|
+
let s, c, l, u = 0, d = [], p = "", m, h, g = !1;
|
|
877
|
+
function v() {
|
|
878
878
|
return We(Ue(t.input, r), p);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function b() {
|
|
881
881
|
i.replaceChildren(qe(n, t.input.current, t.input, r));
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function x(e) {
|
|
884
|
+
if (g) return;
|
|
884
885
|
if (s !== void 0) {
|
|
885
886
|
e && c?.focus();
|
|
886
887
|
return;
|
|
887
888
|
}
|
|
888
|
-
s =
|
|
889
|
-
let
|
|
890
|
-
|
|
891
|
-
let
|
|
892
|
-
let
|
|
893
|
-
|
|
894
|
-
},
|
|
895
|
-
n.addEventListener("pointerdown",
|
|
896
|
-
n.removeEventListener("pointerdown",
|
|
897
|
-
}, s.addEventListener("keydown",
|
|
898
|
-
}
|
|
899
|
-
function
|
|
900
|
-
s?.remove(), s = void 0, c = void 0, l = void 0, p = "", h?.(), h = void 0, i.setAttribute("aria-expanded", "false"), e && i.focus();
|
|
889
|
+
s = ee();
|
|
890
|
+
let r = s;
|
|
891
|
+
C().appendChild(s), w(), i.setAttribute("aria-expanded", "true"), t.onOpenChange?.(!0, !1);
|
|
892
|
+
let a = (e) => {
|
|
893
|
+
let t = e.composedPath();
|
|
894
|
+
t.includes(r) || t.includes(i) || S(!1);
|
|
895
|
+
}, o = () => w();
|
|
896
|
+
n.addEventListener("pointerdown", a, !0), n.defaultView?.addEventListener("scroll", o, !0), n.defaultView?.addEventListener("resize", o), h = () => {
|
|
897
|
+
n.removeEventListener("pointerdown", a, !0), n.defaultView?.removeEventListener("scroll", o, !0), n.defaultView?.removeEventListener("resize", o);
|
|
898
|
+
}, s.addEventListener("keydown", te), e ? c?.focus() : l?.focus();
|
|
899
|
+
}
|
|
900
|
+
function S(e) {
|
|
901
|
+
s?.remove(), s = void 0, c = void 0, l = void 0, p = "", h?.(), h = void 0, i.setAttribute("aria-expanded", "false"), t.onOpenChange?.(!1, e), e && i.focus();
|
|
901
902
|
}
|
|
902
|
-
function
|
|
903
|
+
function C() {
|
|
903
904
|
if (t.popoverHost !== void 0) return t.popoverHost;
|
|
904
905
|
let e = i.closest(".designer");
|
|
905
906
|
if (e instanceof HTMLElement) {
|
|
@@ -910,12 +911,12 @@ function Je(t) {
|
|
|
910
911
|
}
|
|
911
912
|
return i.offsetParent instanceof HTMLElement ? i.offsetParent : n.body;
|
|
912
913
|
}
|
|
913
|
-
function
|
|
914
|
+
function w() {
|
|
914
915
|
if (s === void 0) return;
|
|
915
916
|
let e = (t.anchor ?? i).getBoundingClientRect();
|
|
916
917
|
s.style.position = "fixed", s.style.left = `${Math.round(e.left)}px`, s.style.top = `${Math.round(e.bottom + 4)}px`, s.style.minWidth = `${Math.round(Math.min(e.width, 360))}px`, s.style.pointerEvents = "auto";
|
|
917
918
|
}
|
|
918
|
-
function
|
|
919
|
+
function ee() {
|
|
919
920
|
let e = n.createElement("div");
|
|
920
921
|
e.className = "designer-value-ref-popover", e.dataset.valueRefPopover = "true", e.setAttribute("role", "dialog"), e.setAttribute("aria-label", r.placeholder), e.setAttribute("aria-modal", "false");
|
|
921
922
|
let i = t.input.allowedKinds;
|
|
@@ -926,13 +927,13 @@ function Je(t) {
|
|
|
926
927
|
items: i.map((e) => ({
|
|
927
928
|
className: "designer-value-ref-tab",
|
|
928
929
|
dataset: { valueRefTab: e },
|
|
929
|
-
label:
|
|
930
|
+
label: T(e),
|
|
930
931
|
value: e
|
|
931
932
|
})),
|
|
932
933
|
selected: Ye(t.input.current)
|
|
933
934
|
});
|
|
934
935
|
for (let e of a.buttons.values()) e.addEventListener("click", () => {
|
|
935
|
-
p = "", c !== void 0 && (c.value = ""),
|
|
936
|
+
p = "", c !== void 0 && (c.value = ""), E();
|
|
936
937
|
});
|
|
937
938
|
e.appendChild(a.element);
|
|
938
939
|
}
|
|
@@ -944,22 +945,22 @@ function Je(t) {
|
|
|
944
945
|
}), c.dataset.valueRefSearch = "true", c.addEventListener("input", () => {
|
|
945
946
|
let e = c?.value ?? "";
|
|
946
947
|
m !== void 0 && clearTimeout(m), m = setTimeout(() => {
|
|
947
|
-
p = e,
|
|
948
|
+
p = e, E();
|
|
948
949
|
}, 180);
|
|
949
950
|
}), e.appendChild(c), l = n.createElement("div"), l.className = "designer-value-ref-list", l.setAttribute("role", "listbox"), l.tabIndex = -1, e.appendChild(l);
|
|
950
951
|
let a = n.createElement("div");
|
|
951
952
|
a.className = "designer-value-ref-footer";
|
|
952
953
|
let o = f(n, { text: r.manage });
|
|
953
954
|
return o.dataset.valueRefManage = "true", o.addEventListener("click", () => {
|
|
954
|
-
t.onManage?.(),
|
|
955
|
-
}), a.appendChild(o), e.appendChild(a),
|
|
955
|
+
t.onManage?.(), S(!0);
|
|
956
|
+
}), a.appendChild(o), e.appendChild(a), E(), e;
|
|
956
957
|
}
|
|
957
|
-
function
|
|
958
|
+
function T(e) {
|
|
958
959
|
return e === "inline" ? r.tab.inline : e === "variable" ? r.tab.variable : r.tab.field;
|
|
959
960
|
}
|
|
960
|
-
function
|
|
961
|
+
function E() {
|
|
961
962
|
if (l !== void 0) {
|
|
962
|
-
if (d =
|
|
963
|
+
if (d = v(), u = Math.min(u, Math.max(d.length - 1, 0)), l.replaceChildren(), d.length === 0) {
|
|
963
964
|
let n = p.trim().length > 0, i = n ? [{
|
|
964
965
|
label: r.clearSearch,
|
|
965
966
|
dataset: { valueRefClearSearch: "true" }
|
|
@@ -973,71 +974,71 @@ function Je(t) {
|
|
|
973
974
|
a.dataset.valueRefEmpty = n ? "search" : "items";
|
|
974
975
|
let s = o[0];
|
|
975
976
|
s !== void 0 && (s.title = n ? r.emptySearch : r.emptyVariables, s.addEventListener("click", () => {
|
|
976
|
-
n ? (p = "", c !== void 0 && (c.value = ""),
|
|
977
|
+
n ? (p = "", c !== void 0 && (c.value = ""), E(), c?.focus()) : (t.onCreateVariable?.(), S(!0));
|
|
977
978
|
})), l.removeAttribute("aria-activedescendant");
|
|
978
979
|
return;
|
|
979
980
|
}
|
|
980
981
|
d.forEach((e, i) => {
|
|
981
982
|
let a = n.createElement("button");
|
|
982
|
-
a.type = "button", a.className = "designer-value-ref-option", a.id = Xe(e.id), a.dataset.valueRefOption = e.id, a.setAttribute("role", "option"), a.setAttribute("aria-selected", String(
|
|
983
|
+
a.type = "button", a.className = "designer-value-ref-option", a.id = Xe(e.id), a.dataset.valueRefOption = e.id, a.setAttribute("role", "option"), a.setAttribute("aria-selected", String(D(e))), a.appendChild(qe(n, e.value, t.input, r)), a.addEventListener("click", () => O(e)), i === u && (a.dataset.active = "true"), l.appendChild(a);
|
|
983
984
|
}), l.setAttribute("aria-activedescendant", Xe(d[u].id));
|
|
984
985
|
}
|
|
985
986
|
}
|
|
986
|
-
function
|
|
987
|
+
function D(e) {
|
|
987
988
|
let n = t.input.current;
|
|
988
989
|
return n === null || n.kind !== e.value.kind ? !1 : n.kind === "variable" && e.value.kind === "variable" ? n.variableId === e.value.variableId : n.kind === "data-source-field" && e.value.kind === "data-source-field" ? n.dataSourceId === e.value.dataSourceId && n.path.join(".") === e.value.path.join(".") : n.kind === "inline" && e.value.kind === "inline" && n.value === e.value.value;
|
|
989
990
|
}
|
|
990
|
-
function
|
|
991
|
-
let n =
|
|
992
|
-
|
|
991
|
+
function O(e) {
|
|
992
|
+
let n = k(e);
|
|
993
|
+
S(!0), a.textContent = r.selected(n), t.onSelect(e.value);
|
|
993
994
|
}
|
|
994
|
-
function
|
|
995
|
+
function k(e) {
|
|
995
996
|
return `${Ve(e.kind, r)} ${e.label}`;
|
|
996
997
|
}
|
|
997
|
-
function
|
|
998
|
+
function A(e) {
|
|
998
999
|
if (d.length !== 0) {
|
|
999
1000
|
u = (u + e + d.length) % d.length;
|
|
1000
1001
|
for (let [e, t] of [...l?.children ?? []].entries()) t instanceof HTMLElement && t.dataset.valueRefOption !== void 0 && (t.dataset.active = String(e === u));
|
|
1001
1002
|
l !== void 0 && l.setAttribute("aria-activedescendant", Xe(d[u].id));
|
|
1002
1003
|
}
|
|
1003
1004
|
}
|
|
1004
|
-
function
|
|
1005
|
+
function te(e) {
|
|
1005
1006
|
switch (e.key) {
|
|
1006
1007
|
case "ArrowDown":
|
|
1007
|
-
e.preventDefault(),
|
|
1008
|
+
e.preventDefault(), A(1);
|
|
1008
1009
|
return;
|
|
1009
1010
|
case "ArrowUp":
|
|
1010
|
-
e.preventDefault(),
|
|
1011
|
+
e.preventDefault(), A(-1);
|
|
1011
1012
|
return;
|
|
1012
1013
|
case "Home":
|
|
1013
|
-
e.preventDefault(), u = 0,
|
|
1014
|
+
e.preventDefault(), u = 0, A(0);
|
|
1014
1015
|
return;
|
|
1015
1016
|
case "End":
|
|
1016
|
-
e.preventDefault(), u = d.length - 1,
|
|
1017
|
+
e.preventDefault(), u = d.length - 1, A(0);
|
|
1017
1018
|
return;
|
|
1018
1019
|
case "Enter": {
|
|
1019
1020
|
let t = d[u];
|
|
1020
1021
|
if (t === void 0) return;
|
|
1021
|
-
e.preventDefault(),
|
|
1022
|
+
e.preventDefault(), O(t);
|
|
1022
1023
|
return;
|
|
1023
1024
|
}
|
|
1024
1025
|
case "Escape":
|
|
1025
|
-
e.preventDefault(),
|
|
1026
|
+
e.preventDefault(), S(!0);
|
|
1026
1027
|
return;
|
|
1027
1028
|
case "Tab":
|
|
1028
|
-
|
|
1029
|
+
S(!1);
|
|
1029
1030
|
return;
|
|
1030
1031
|
default: return;
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
return i.addEventListener("click", () => {
|
|
1034
|
-
s === void 0 ?
|
|
1035
|
+
s === void 0 ? x(!0) : S(!0);
|
|
1035
1036
|
}), i.addEventListener("keydown", (e) => {
|
|
1036
|
-
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1037
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), x(!0));
|
|
1037
1038
|
}), {
|
|
1038
1039
|
element: o,
|
|
1039
1040
|
dispose: () => {
|
|
1040
|
-
|
|
1041
|
+
g || (s !== void 0 && S(!1), g = !0, m !== void 0 && clearTimeout(m), h?.(), i.replaceChildren(), o.replaceChildren());
|
|
1041
1042
|
}
|
|
1042
1043
|
};
|
|
1043
1044
|
}
|
|
@@ -1324,14 +1325,14 @@ function yt(e, t) {
|
|
|
1324
1325
|
month: (y ?? /* @__PURE__ */ new Date()).getMonth()
|
|
1325
1326
|
}, x = () => {
|
|
1326
1327
|
v.textContent = y === void 0 ? i.calendar.unset : L(y);
|
|
1327
|
-
},
|
|
1328
|
+
}, S = () => {
|
|
1328
1329
|
let e = y === void 0 ? "" : L(y), t = xt();
|
|
1329
1330
|
for (let n of h.querySelectorAll("[data-calendar-day]")) {
|
|
1330
1331
|
let r = n.dataset.calendarDay ?? "";
|
|
1331
1332
|
n.dataset.selected = String(r === e), n.dataset.today = String(r === L(t)), n.tabIndex = r === e || e === "" && n.dataset.inView === "true" ? 0 : -1;
|
|
1332
1333
|
}
|
|
1333
1334
|
x();
|
|
1334
|
-
},
|
|
1335
|
+
}, C = () => {
|
|
1335
1336
|
u.textContent = i.calendar.monthTitle(b.year, b.month + 1);
|
|
1336
1337
|
let e = (new Date(b.year, b.month, 1).getDay() + 6) % 7, t = new Date(b.year, b.month, 1 - e);
|
|
1337
1338
|
h.replaceChildren();
|
|
@@ -1339,60 +1340,60 @@ function yt(e, t) {
|
|
|
1339
1340
|
let r = new Date(t.getFullYear(), t.getMonth(), t.getDate() + e), i = n.createElement("button");
|
|
1340
1341
|
i.type = "button", i.className = "designer-calendar-day", i.dataset.calendarDay = L(r), i.dataset.inView = String(r.getMonth() === b.month), i.dataset.outside = String(r.getMonth() !== b.month), i.setAttribute("aria-label", L(r)), i.textContent = String(r.getDate()), h.appendChild(i);
|
|
1341
1342
|
}
|
|
1342
|
-
|
|
1343
|
-
},
|
|
1343
|
+
S();
|
|
1344
|
+
}, w = (e) => {
|
|
1344
1345
|
h.querySelector(`[data-calendar-day="${L(e)}"]`)?.focus({ preventScroll: !0 });
|
|
1345
|
-
},
|
|
1346
|
+
}, ee = (e) => {
|
|
1346
1347
|
if (y = e, e.getFullYear() !== b.year || e.getMonth() !== b.month) {
|
|
1347
1348
|
b = {
|
|
1348
1349
|
year: e.getFullYear(),
|
|
1349
1350
|
month: e.getMonth()
|
|
1350
|
-
},
|
|
1351
|
+
}, C();
|
|
1351
1352
|
return;
|
|
1352
1353
|
}
|
|
1353
|
-
|
|
1354
|
-
},
|
|
1354
|
+
S();
|
|
1355
|
+
}, T = () => {
|
|
1355
1356
|
e.value = y === void 0 ? "" : L(y), e.dispatchEvent(new Event("change", {
|
|
1356
1357
|
bubbles: !0,
|
|
1357
1358
|
composed: !0
|
|
1358
1359
|
}));
|
|
1359
|
-
},
|
|
1360
|
+
}, E = () => {
|
|
1360
1361
|
let t = I(e.value);
|
|
1361
1362
|
t !== void 0 && (y = t);
|
|
1362
1363
|
let i = y ?? /* @__PURE__ */ new Date();
|
|
1363
1364
|
b = {
|
|
1364
1365
|
year: i.getFullYear(),
|
|
1365
1366
|
month: i.getMonth()
|
|
1366
|
-
}, c.hidden = !1, s.setAttribute("aria-expanded", "true"), r.dataset.open = "true",
|
|
1367
|
+
}, c.hidden = !1, s.setAttribute("aria-expanded", "true"), r.dataset.open = "true", C();
|
|
1367
1368
|
let a = s.getBoundingClientRect(), o = n.defaultView;
|
|
1368
|
-
o !== null && (c.dataset.side = o.innerHeight - a.bottom < c.offsetHeight + vt && a.top > c.offsetHeight + vt ? "top" : "bottom"),
|
|
1369
|
-
},
|
|
1369
|
+
o !== null && (c.dataset.side = o.innerHeight - a.bottom < c.offsetHeight + vt && a.top > c.offsetHeight + vt ? "top" : "bottom"), w(i);
|
|
1370
|
+
}, D = (e) => {
|
|
1370
1371
|
c.hidden = !0, s.setAttribute("aria-expanded", "false"), r.dataset.open = "false", e && s.focus({ preventScroll: !0 });
|
|
1371
1372
|
};
|
|
1372
1373
|
s.addEventListener("click", () => {
|
|
1373
|
-
c.hidden ?
|
|
1374
|
+
c.hidden ? E() : D(!0);
|
|
1374
1375
|
}), s.addEventListener("keydown", (e) => {
|
|
1375
|
-
e.key === "ArrowDown" && c.hidden && (e.preventDefault(),
|
|
1376
|
+
e.key === "ArrowDown" && c.hidden && (e.preventDefault(), E());
|
|
1376
1377
|
}), f.addEventListener("click", () => {
|
|
1377
1378
|
let e = new Date(b.year, b.month - 1, 1);
|
|
1378
1379
|
b = {
|
|
1379
1380
|
year: e.getFullYear(),
|
|
1380
1381
|
month: e.getMonth()
|
|
1381
|
-
},
|
|
1382
|
+
}, C();
|
|
1382
1383
|
}), p.addEventListener("click", () => {
|
|
1383
1384
|
let e = new Date(b.year, b.month + 1, 1);
|
|
1384
1385
|
b = {
|
|
1385
1386
|
year: e.getFullYear(),
|
|
1386
1387
|
month: e.getMonth()
|
|
1387
|
-
},
|
|
1388
|
+
}, C();
|
|
1388
1389
|
}), _.addEventListener("click", () => {
|
|
1389
1390
|
let e = xt();
|
|
1390
|
-
|
|
1391
|
+
ee(e), T(), w(e);
|
|
1391
1392
|
}), h.addEventListener("click", (e) => {
|
|
1392
1393
|
let t = e.target?.closest("[data-calendar-day]");
|
|
1393
1394
|
if (t == null) return;
|
|
1394
1395
|
let n = I(t.dataset.calendarDay ?? "");
|
|
1395
|
-
n !== void 0 && (
|
|
1396
|
+
n !== void 0 && (ee(n), T(), w(n));
|
|
1396
1397
|
}), h.addEventListener("keydown", (e) => {
|
|
1397
1398
|
let t = e.target?.closest("[data-calendar-day]");
|
|
1398
1399
|
if (t == null) return;
|
|
@@ -1405,7 +1406,7 @@ function yt(e, t) {
|
|
|
1405
1406
|
(t.getMonth() !== b.month || t.getFullYear() !== b.year) && (b = {
|
|
1406
1407
|
year: t.getFullYear(),
|
|
1407
1408
|
month: t.getMonth()
|
|
1408
|
-
},
|
|
1409
|
+
}, C()), w(t);
|
|
1409
1410
|
return;
|
|
1410
1411
|
}
|
|
1411
1412
|
if (e.key === "PageUp" || e.key === "PageDown") {
|
|
@@ -1414,13 +1415,13 @@ function yt(e, t) {
|
|
|
1414
1415
|
b = {
|
|
1415
1416
|
year: r.getFullYear(),
|
|
1416
1417
|
month: r.getMonth()
|
|
1417
|
-
},
|
|
1418
|
+
}, C(), w(a);
|
|
1418
1419
|
return;
|
|
1419
1420
|
}
|
|
1420
1421
|
if (e.key === "Home" || e.key === "End") {
|
|
1421
1422
|
e.preventDefault();
|
|
1422
1423
|
let t = new Date(b.year, b.month + 1, 0).getDate();
|
|
1423
|
-
|
|
1424
|
+
w(new Date(b.year, b.month, e.key === "Home" ? 1 : t));
|
|
1424
1425
|
}
|
|
1425
1426
|
}), e.addEventListener("change", () => {
|
|
1426
1427
|
let t = I(e.value);
|
|
@@ -1431,27 +1432,27 @@ function yt(e, t) {
|
|
|
1431
1432
|
y = t, b = {
|
|
1432
1433
|
year: t.getFullYear(),
|
|
1433
1434
|
month: t.getMonth()
|
|
1434
|
-
}, c.hidden ||
|
|
1435
|
+
}, c.hidden || C();
|
|
1435
1436
|
}), e.addEventListener("keydown", (e) => {
|
|
1436
|
-
e.key === "ArrowDown" && c.hidden && (e.preventDefault(),
|
|
1437
|
+
e.key === "ArrowDown" && c.hidden && (e.preventDefault(), E());
|
|
1437
1438
|
}), c.addEventListener("keydown", (e) => {
|
|
1438
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
1439
|
+
e.key === "Escape" && (e.preventDefault(), D(!0));
|
|
1439
1440
|
});
|
|
1440
|
-
let
|
|
1441
|
+
let O = (t) => {
|
|
1441
1442
|
if (!r.isConnected) {
|
|
1442
|
-
e.ownerDocument.removeEventListener("pointerdown",
|
|
1443
|
+
e.ownerDocument.removeEventListener("pointerdown", O, !0);
|
|
1443
1444
|
return;
|
|
1444
1445
|
}
|
|
1445
1446
|
if (c.hidden) return;
|
|
1446
1447
|
let n = t.composedPath()[0] ?? t.target;
|
|
1447
|
-
n instanceof Node && r.contains(n) ||
|
|
1448
|
+
n instanceof Node && r.contains(n) || D(!1);
|
|
1448
1449
|
};
|
|
1449
|
-
return e.ownerDocument.addEventListener("pointerdown",
|
|
1450
|
+
return e.ownerDocument.addEventListener("pointerdown", O, !0), C(), {
|
|
1450
1451
|
element: r,
|
|
1451
|
-
open:
|
|
1452
|
-
close: () =>
|
|
1452
|
+
open: E,
|
|
1453
|
+
close: () => D(!1),
|
|
1453
1454
|
dispose: () => {
|
|
1454
|
-
e.ownerDocument.removeEventListener("pointerdown",
|
|
1455
|
+
e.ownerDocument.removeEventListener("pointerdown", O, !0), c.remove();
|
|
1455
1456
|
}
|
|
1456
1457
|
};
|
|
1457
1458
|
}
|
|
@@ -1663,32 +1664,36 @@ function Lt(e, t) {
|
|
|
1663
1664
|
className: "designer-dataset-parameter-mode-option",
|
|
1664
1665
|
dataset: { datasetParameterMode: "variable" }
|
|
1665
1666
|
}]
|
|
1666
|
-
}), m = p.get("inline"), h = p.get("variable")
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1667
|
+
}), m = p.get("inline"), h = p.get("variable"), _, v = null, y, b = (e, t) => {
|
|
1668
|
+
let n = String(e);
|
|
1669
|
+
h.setAttribute("aria-expanded", n), _?.setAttribute("aria-expanded", n), !e && t && (v?.isConnected ? v : y)?.focus({ preventScroll: !0 });
|
|
1670
|
+
};
|
|
1671
|
+
h.setAttribute("aria-haspopup", "dialog"), h.setAttribute("aria-expanded", "false"), l.append(d, f);
|
|
1672
|
+
let x = e.createElement("div");
|
|
1673
|
+
x.className = "designer-dataset-parameter-control", x.dataset.datasetParameterControl = r.name, x.dataset.mode = o, s !== "" && (x.dataset.invalid = "true");
|
|
1674
|
+
let S = Ze({
|
|
1671
1675
|
ownerDocument: e,
|
|
1672
1676
|
text: Mt,
|
|
1673
1677
|
input: Qe(a, t.variables),
|
|
1674
1678
|
controlKey: `parameter:${r.name}`,
|
|
1675
1679
|
ariaLabel: i.dataset.parameterVariableLabel(r.label),
|
|
1676
|
-
anchor:
|
|
1680
|
+
anchor: x,
|
|
1677
1681
|
popoverHost: t.overlayHost,
|
|
1682
|
+
onOpenChange: b,
|
|
1678
1683
|
onSelect: (e) => t.onSelectParameter?.(r.name, e)
|
|
1679
1684
|
});
|
|
1680
|
-
if (
|
|
1685
|
+
if (v = S.element.querySelector("[data-value-ref-trigger]"), v?.addEventListener("click", () => {
|
|
1686
|
+
y = v ?? void 0;
|
|
1687
|
+
}, { capture: !0 }), kt(n, S.dispose), o === "inline") {
|
|
1681
1688
|
let n = St(e, t.descriptor, r.name, a ?? void 0);
|
|
1682
|
-
r.required && n.querySelector("input, select, textarea")?.setAttribute("aria-required", "true"),
|
|
1683
|
-
let o = g(e, {
|
|
1689
|
+
r.required && n.querySelector("input, select, textarea")?.setAttribute("aria-required", "true"), x.appendChild(n), _ = g(e, {
|
|
1684
1690
|
className: "designer-dataset-parameter-bind",
|
|
1685
1691
|
icon: "variable",
|
|
1686
1692
|
label: i.dataset.parameterVariableLabel(r.label)
|
|
1687
|
-
})
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
} else _.appendChild(v.element);
|
|
1693
|
+
}), _.dataset.datasetParameterBind = r.name, _.setAttribute("aria-haspopup", "dialog"), _.setAttribute("aria-expanded", "false"), _.addEventListener("click", () => {
|
|
1694
|
+
y = _, v?.click();
|
|
1695
|
+
}), x.appendChild(_);
|
|
1696
|
+
} else x.appendChild(S.element);
|
|
1692
1697
|
if (o === "variable") {
|
|
1693
1698
|
let n = g(e, {
|
|
1694
1699
|
className: "designer-dataset-parameter-clear",
|
|
@@ -1700,12 +1705,12 @@ function Lt(e, t) {
|
|
|
1700
1705
|
kind: "inline",
|
|
1701
1706
|
value: null
|
|
1702
1707
|
});
|
|
1703
|
-
}),
|
|
1708
|
+
}), x.appendChild(n);
|
|
1704
1709
|
}
|
|
1705
|
-
if (c.append(l,
|
|
1710
|
+
if (c.append(l, x), s !== "") {
|
|
1706
1711
|
let t = e.createElement("span");
|
|
1707
1712
|
t.className = "designer-field-message designer-dataset-parameter-error", t.id = `designer-dataset-parameter-error-${r.name.replace(/[^A-Za-z0-9_-]/g, "-")}`, t.dataset.datasetParameterError = "true", t.setAttribute("role", "alert"), t.textContent = s;
|
|
1708
|
-
let n =
|
|
1713
|
+
let n = x.querySelector("input, select, textarea");
|
|
1709
1714
|
n !== null && (n.setAttribute("aria-invalid", "true"), n.setAttribute("aria-describedby", t.id)), c.appendChild(t);
|
|
1710
1715
|
}
|
|
1711
1716
|
m.addEventListener("click", () => {
|
|
@@ -1714,7 +1719,7 @@ function Lt(e, t) {
|
|
|
1714
1719
|
value: null
|
|
1715
1720
|
});
|
|
1716
1721
|
}), h.addEventListener("click", () => {
|
|
1717
|
-
v
|
|
1722
|
+
y = h, v?.click();
|
|
1718
1723
|
}), n.appendChild(c);
|
|
1719
1724
|
}
|
|
1720
1725
|
return n;
|
|
@@ -2244,7 +2249,7 @@ function gn(e, t) {
|
|
|
2244
2249
|
t.preview.tab,
|
|
2245
2250
|
t.preview.open,
|
|
2246
2251
|
t.preview.message,
|
|
2247
|
-
|
|
2252
|
+
Dn(t)
|
|
2248
2253
|
]);
|
|
2249
2254
|
case "authoring": return U([
|
|
2250
2255
|
t.authoring,
|
|
@@ -2263,9 +2268,30 @@ function gn(e, t) {
|
|
|
2263
2268
|
]);
|
|
2264
2269
|
}
|
|
2265
2270
|
}
|
|
2266
|
-
|
|
2271
|
+
var _n = /* @__PURE__ */ new WeakMap(), vn = 4;
|
|
2272
|
+
function yn(e, t) {
|
|
2273
|
+
let n = _n.get(e);
|
|
2274
|
+
if (n !== void 0) {
|
|
2275
|
+
n.pending = t;
|
|
2276
|
+
return;
|
|
2277
|
+
}
|
|
2278
|
+
let r = { pending: void 0 };
|
|
2279
|
+
_n.set(e, r);
|
|
2280
|
+
try {
|
|
2281
|
+
let n = t;
|
|
2282
|
+
for (let t = 0; t < vn; t += 1) {
|
|
2283
|
+
if (bn(e, n), r.pending === void 0) return;
|
|
2284
|
+
n = r.pending, r.pending = void 0;
|
|
2285
|
+
}
|
|
2286
|
+
} finally {
|
|
2287
|
+
_n.delete(e);
|
|
2288
|
+
let t = r.pending;
|
|
2289
|
+
t !== void 0 && e.isConnected && queueMicrotask(() => yn(e, t));
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
function bn(e, t) {
|
|
2267
2293
|
if (e.querySelector("[data-ds-section]") === null) return;
|
|
2268
|
-
let n = mn(t), r =
|
|
2294
|
+
let n = mn(t), r = Sn(e, n), i = En(e, n), a = null;
|
|
2269
2295
|
for (let r = n.length - 1; r >= 0; r--) {
|
|
2270
2296
|
let o = n[r], s = V(e, o), c = gn(o, t);
|
|
2271
2297
|
if (o === "value") {
|
|
@@ -2291,15 +2317,15 @@ function _n(e, t) {
|
|
|
2291
2317
|
let e = t.dataset.dsSection;
|
|
2292
2318
|
e !== void 0 && n.includes(e) || (Dt(t), t.remove());
|
|
2293
2319
|
}
|
|
2294
|
-
|
|
2320
|
+
Cn(e, r, n);
|
|
2295
2321
|
}
|
|
2296
|
-
function
|
|
2322
|
+
function xn(e, t) {
|
|
2297
2323
|
for (let n of e.querySelectorAll("[data-ds-section]")) {
|
|
2298
2324
|
let e = n.dataset.dsSection;
|
|
2299
2325
|
e !== void 0 && (n.dataset.dsContentKey = gn(e, t), H(n));
|
|
2300
2326
|
}
|
|
2301
2327
|
}
|
|
2302
|
-
function
|
|
2328
|
+
function Sn(e, t) {
|
|
2303
2329
|
let n = e.ownerDocument, r = n?.activeElement;
|
|
2304
2330
|
if (r == null || r === n?.body || !e.contains(r)) return {
|
|
2305
2331
|
section: void 0,
|
|
@@ -2310,17 +2336,17 @@ function yn(e, t) {
|
|
|
2310
2336
|
let i = r.closest("[data-ds-section]")?.dataset.dsSection;
|
|
2311
2337
|
return {
|
|
2312
2338
|
section: i,
|
|
2313
|
-
control:
|
|
2339
|
+
control: Tn(r),
|
|
2314
2340
|
index: i === void 0 ? -1 : t.indexOf(i),
|
|
2315
2341
|
insideRoot: !0
|
|
2316
2342
|
};
|
|
2317
2343
|
}
|
|
2318
|
-
function
|
|
2344
|
+
function Cn(e, t, n) {
|
|
2319
2345
|
if (!t.insideRoot) return;
|
|
2320
2346
|
let r = [...e.querySelectorAll("[data-ds-section]")];
|
|
2321
2347
|
if (r.length === 0) return;
|
|
2322
2348
|
if (t.section !== void 0 && t.control !== void 0) {
|
|
2323
|
-
let n =
|
|
2349
|
+
let n = wn(e, t.section, t.control);
|
|
2324
2350
|
if (n !== null) {
|
|
2325
2351
|
n.focus();
|
|
2326
2352
|
return;
|
|
@@ -2348,13 +2374,13 @@ function bn(e, t, n) {
|
|
|
2348
2374
|
function V(e, t) {
|
|
2349
2375
|
return e.querySelector(`[data-ds-section="${t}"]`);
|
|
2350
2376
|
}
|
|
2351
|
-
function
|
|
2377
|
+
function wn(e, t, n) {
|
|
2352
2378
|
let r = V(e, t);
|
|
2353
2379
|
if (r === null) return null;
|
|
2354
|
-
for (let e of r.querySelectorAll("button, input, select, textarea, [tabindex]")) if (
|
|
2380
|
+
for (let e of r.querySelectorAll("button, input, select, textarea, [tabindex]")) if (Tn(e) === n) return e;
|
|
2355
2381
|
return null;
|
|
2356
2382
|
}
|
|
2357
|
-
function
|
|
2383
|
+
function Tn(e) {
|
|
2358
2384
|
let t = e.dataset.dsControl;
|
|
2359
2385
|
return t === void 0 ? e.dataset.datasetAction ?? e.dataset.datasetPreviewTab ?? e.dataset.datasetParameter ?? e.dataset.datasetBindingTrigger ?? e.dataset.datasetBindingRole ?? e.dataset.datasetEditorMode ?? e.dataset.datasetAuthoringAction ?? e.dataset.dataSourceModeSelect ?? void 0 : t;
|
|
2360
2386
|
}
|
|
@@ -2362,14 +2388,14 @@ function H(e) {
|
|
|
2362
2388
|
for (let t of e.querySelectorAll("button, input, select, textarea, [tabindex]")) t.dataset.dsFocusable = "true";
|
|
2363
2389
|
e.tabIndex = -1;
|
|
2364
2390
|
}
|
|
2365
|
-
function
|
|
2391
|
+
function En(e, t) {
|
|
2366
2392
|
for (let n of t) {
|
|
2367
2393
|
let t = V(e, n);
|
|
2368
2394
|
if (t?.parentElement != null) return t.parentElement;
|
|
2369
2395
|
}
|
|
2370
2396
|
return e.querySelector(".designer-inspector-data-flow-content") ?? e;
|
|
2371
2397
|
}
|
|
2372
|
-
function
|
|
2398
|
+
function Dn(e) {
|
|
2373
2399
|
let t = e.preview.rawValue;
|
|
2374
2400
|
if (typeof t != "object" || !t || Array.isArray(t)) return t === void 0 ? "none" : "scalar";
|
|
2375
2401
|
let n = t.rows, r = t.fields;
|
|
@@ -2386,7 +2412,7 @@ function U(e) {
|
|
|
2386
2412
|
}
|
|
2387
2413
|
//#endregion
|
|
2388
2414
|
//#region src/browser/dom/dataset/designer-data-state.ts
|
|
2389
|
-
function
|
|
2415
|
+
function On(e) {
|
|
2390
2416
|
return e.configured ? e.unavailable === void 0 ? e.readonly === void 0 ? e.loading === !0 ? { state: "loading" } : e.failure === void 0 ? e.empty === !0 ? { state: "empty" } : { state: "ready" } : {
|
|
2391
2417
|
state: "failed",
|
|
2392
2418
|
diagnosticCode: e.failure
|
|
@@ -2398,13 +2424,13 @@ function Tn(e) {
|
|
|
2398
2424
|
reason: e.unavailable
|
|
2399
2425
|
} : { state: "unconfigured" };
|
|
2400
2426
|
}
|
|
2401
|
-
function
|
|
2427
|
+
function kn(e, t) {
|
|
2402
2428
|
let n = e.dataset;
|
|
2403
2429
|
n !== void 0 && (n.state = t.state, t.reason === void 0 ? delete n.stateReason : n.stateReason = t.reason);
|
|
2404
2430
|
}
|
|
2405
2431
|
//#endregion
|
|
2406
2432
|
//#region src/browser/dom/static-data/designer-static-data-controls.ts
|
|
2407
|
-
function
|
|
2433
|
+
function An(e, t) {
|
|
2408
2434
|
let n = t.descriptor;
|
|
2409
2435
|
if (n?.kind !== "scalar") return l(e, { label: "" }).field;
|
|
2410
2436
|
let r = n.valueType === "string" ? i.dataSource.staticScalarString : n.valueType === "number" ? i.dataSource.staticScalarNumber : i.dataSource.staticScalarBoolean;
|
|
@@ -2431,7 +2457,7 @@ function Dn(e, t) {
|
|
|
2431
2457
|
});
|
|
2432
2458
|
return u.dataset.staticScalar = n.valueType, o.control.appendChild(u), o.field;
|
|
2433
2459
|
}
|
|
2434
|
-
function
|
|
2460
|
+
function jn(e, t) {
|
|
2435
2461
|
let n = l(e, {
|
|
2436
2462
|
label: i.dataSource.staticValue,
|
|
2437
2463
|
tagName: "span",
|
|
@@ -2443,7 +2469,7 @@ function On(e, t) {
|
|
|
2443
2469
|
});
|
|
2444
2470
|
return r.dataset.dataSourceStatic = "true", n.control.appendChild(r), n.field;
|
|
2445
2471
|
}
|
|
2446
|
-
function
|
|
2472
|
+
function Mn(e, t, n, r) {
|
|
2447
2473
|
let i = W(e, `tab-${t}`, n);
|
|
2448
2474
|
return i.setAttribute("aria-pressed", String(r)), i;
|
|
2449
2475
|
}
|
|
@@ -2454,7 +2480,7 @@ function W(e, t, n, r) {
|
|
|
2454
2480
|
});
|
|
2455
2481
|
return i.dataset.staticAction = t, i;
|
|
2456
2482
|
}
|
|
2457
|
-
function
|
|
2483
|
+
function Nn(e, t, n, r) {
|
|
2458
2484
|
let i = g(e, {
|
|
2459
2485
|
className: "designer-static-page-button",
|
|
2460
2486
|
icon: r,
|
|
@@ -2462,15 +2488,15 @@ function An(e, t, n, r) {
|
|
|
2462
2488
|
});
|
|
2463
2489
|
return i.dataset.staticAction = t, i;
|
|
2464
2490
|
}
|
|
2465
|
-
function
|
|
2491
|
+
function Pn(e, t, n, r) {
|
|
2466
2492
|
let i = W(e, t, r);
|
|
2467
2493
|
return i.dataset.staticIndex = String(n), i;
|
|
2468
2494
|
}
|
|
2469
|
-
function
|
|
2495
|
+
function Fn(e, t, n, r, i = !1) {
|
|
2470
2496
|
let a = W(e, `binding-${n}`, r);
|
|
2471
2497
|
return a.dataset.staticBindingRole = t, a.disabled = i, a;
|
|
2472
2498
|
}
|
|
2473
|
-
function
|
|
2499
|
+
function In(e, t) {
|
|
2474
2500
|
if (t === void 0) return i.dataset.bindingNone;
|
|
2475
2501
|
let n = e.roles.flatMap((n) => {
|
|
2476
2502
|
let r = e.binding?.fields[n.id] ?? [];
|
|
@@ -2480,7 +2506,7 @@ function Nn(e, t) {
|
|
|
2480
2506
|
}
|
|
2481
2507
|
//#endregion
|
|
2482
2508
|
//#region src/browser/dom/static-data/designer-static-data-table-dom.ts
|
|
2483
|
-
function
|
|
2509
|
+
function Ln(e, t, n) {
|
|
2484
2510
|
let r = e.createElement("section");
|
|
2485
2511
|
r.className = "designer-static-bindings";
|
|
2486
2512
|
for (let a of t.roles) {
|
|
@@ -2513,8 +2539,8 @@ function Pn(e, t, n) {
|
|
|
2513
2539
|
t.dataset.staticBindingRole = a.id, p.appendChild(h(t).element);
|
|
2514
2540
|
} else {
|
|
2515
2541
|
let t = e.createElement("div");
|
|
2516
|
-
t.className = "designer-dataset-binding-role-actions", t.append(
|
|
2517
|
-
for (let t of d) p.appendChild(
|
|
2542
|
+
t.className = "designer-dataset-binding-role-actions", t.append(Fn(e, a.id, "select-all", d.length > a.maxFields ? i.dataset.bindingSelectMaximum : i.dataset.bindingSelectAll, l.length === Math.min(d.length, a.maxFields)), Fn(e, a.id, "clear", i.dataset.bindingClear, l.length === 0)), s.appendChild(t);
|
|
2543
|
+
for (let t of d) p.appendChild(Rn(e, a.id, t, l, a.maxFields));
|
|
2518
2544
|
}
|
|
2519
2545
|
if (d.length === 0) {
|
|
2520
2546
|
let t = e.createElement("p");
|
|
@@ -2524,7 +2550,7 @@ function Pn(e, t, n) {
|
|
|
2524
2550
|
}
|
|
2525
2551
|
return r;
|
|
2526
2552
|
}
|
|
2527
|
-
function
|
|
2553
|
+
function Rn(e, t, n, r, i) {
|
|
2528
2554
|
let a = r.includes(n.id), o = e.createElement("button");
|
|
2529
2555
|
o.type = "button", o.className = "designer-dataset-field-option", o.dataset.staticBindingRole = t, o.dataset.staticBindingField = n.id, o.setAttribute("aria-pressed", String(a)), o.disabled = !a && r.length >= i;
|
|
2530
2556
|
let s = e.createElement("span");
|
|
@@ -2532,7 +2558,7 @@ function Fn(e, t, n, r, i) {
|
|
|
2532
2558
|
let c = e.createElement("small");
|
|
2533
2559
|
return c.textContent = n.valueType, o.append(s, c), o;
|
|
2534
2560
|
}
|
|
2535
|
-
function
|
|
2561
|
+
function zn(e, t, n, r, a) {
|
|
2536
2562
|
let o = e.createElement("section");
|
|
2537
2563
|
o.className = "designer-static-rows", a !== void 0 && (o.dataset.designerScrollScope = `static-rows:${a}`);
|
|
2538
2564
|
let s = e.createElement("h4");
|
|
@@ -2550,7 +2576,7 @@ function In(e, t, n, r, a) {
|
|
|
2550
2576
|
i.dataset.staticCellRow = String(a), i.dataset.staticCellField = t.id, r.appendChild(i), o.appendChild(r);
|
|
2551
2577
|
});
|
|
2552
2578
|
let s = e.createElement("td");
|
|
2553
|
-
s.appendChild(
|
|
2579
|
+
s.appendChild(Pn(e, "row-remove", a, i.dataSource.staticRemoveRow)), o.appendChild(s), d.appendChild(o);
|
|
2554
2580
|
}), c.append(l, d);
|
|
2555
2581
|
let p = e.createElement("footer");
|
|
2556
2582
|
p.className = "designer-static-rows-footer";
|
|
@@ -2568,79 +2594,79 @@ function In(e, t, n, r, a) {
|
|
|
2568
2594
|
h.dataset.staticPageSize = "true";
|
|
2569
2595
|
let g = e.createElement("span");
|
|
2570
2596
|
g.className = "designer-static-page-status", g.textContent = i.dataSource.staticPage(f.page + 1, f.pages);
|
|
2571
|
-
let _ =
|
|
2597
|
+
let _ = Nn(e, "page-previous", i.dataSource.staticPreviousPage, "chevron-left");
|
|
2572
2598
|
_.toggleAttribute("disabled", f.page === 0);
|
|
2573
|
-
let b =
|
|
2599
|
+
let b = Nn(e, "page-next", i.dataSource.staticNextPage, "chevron-right");
|
|
2574
2600
|
return b.toggleAttribute("disabled", f.page >= f.pages - 1), m.append(h, _, g, b), p.append(W(e, "row-add", i.dataSource.staticAddRow), m), o.append(s, c, p), o;
|
|
2575
2601
|
}
|
|
2576
2602
|
//#endregion
|
|
2577
2603
|
//#region src/browser/dom/static-data/designer-static-data-dom.ts
|
|
2578
|
-
function
|
|
2604
|
+
function Bn(e) {
|
|
2579
2605
|
let t = e.ownerDocument, n = t.createElement("section");
|
|
2580
2606
|
n.className = "designer-data-source-editor", n.dataset.inspectorSearchSection = "true";
|
|
2581
2607
|
let r = t.createElement("h4");
|
|
2582
|
-
if (r.className = "designer-inspector-section-title", r.textContent = i.dataSource.staticTitle, n.appendChild(r), e.descriptor?.kind === "scalar") return n.appendChild(
|
|
2583
|
-
if (e.descriptor?.kind !== "tabular") return n.appendChild(
|
|
2584
|
-
let a =
|
|
2585
|
-
if (o.className = "designer-static-data-tabs designer-static-inline-tabs", o.append(
|
|
2608
|
+
if (r.className = "designer-inspector-section-title", r.textContent = i.dataSource.staticTitle, n.appendChild(r), e.descriptor?.kind === "scalar") return n.appendChild(An(t, e)), n;
|
|
2609
|
+
if (e.descriptor?.kind !== "tabular") return n.appendChild(jn(t, e.jsonDraft)), n;
|
|
2610
|
+
let a = D(e.value), o = t.createElement("div");
|
|
2611
|
+
if (o.className = "designer-static-data-tabs designer-static-inline-tabs", o.append(Mn(t, "table", i.dataSource.staticForm, e.tab === "table"), Mn(t, "advanced", i.dataSource.staticAdvanced, e.tab === "advanced")), n.appendChild(o), e.tab === "advanced" || !a.ok) n.appendChild(jn(t, e.jsonDraft));
|
|
2586
2612
|
else {
|
|
2587
2613
|
let r = t.createElement("div");
|
|
2588
2614
|
r.className = "designer-static-tabular-summary";
|
|
2589
2615
|
let o = t.createElement("strong");
|
|
2590
2616
|
o.textContent = i.dataSource.staticTabularSummary(a.value.fields.length, a.value.rows.length);
|
|
2591
2617
|
let s = t.createElement("small");
|
|
2592
|
-
s.textContent =
|
|
2618
|
+
s.textContent = In(e, a.value), r.append(o, s), n.append(r, zn(t, a.value, e.page, e.pageSize, e.scrollScope));
|
|
2593
2619
|
}
|
|
2594
2620
|
return n;
|
|
2595
2621
|
}
|
|
2596
|
-
function
|
|
2622
|
+
function Vn(e) {
|
|
2597
2623
|
let t = e.ownerDocument.createElement("section");
|
|
2598
2624
|
t.className = "designer-data-source-editor designer-static-inline-mapping", t.dataset.inspectorSearchSection = "true";
|
|
2599
2625
|
let n = e.ownerDocument.createElement("h4");
|
|
2600
2626
|
n.className = "designer-inspector-section-title", n.textContent = i.dataSource.mappingStep;
|
|
2601
|
-
let r =
|
|
2627
|
+
let r = D(e.value);
|
|
2602
2628
|
if (t.appendChild(n), !r.ok) {
|
|
2603
2629
|
let n = e.ownerDocument.createElement("p");
|
|
2604
2630
|
return n.className = "designer-empty-state", n.textContent = i.dataSource.staticInvalid, t.appendChild(n), t;
|
|
2605
2631
|
}
|
|
2606
|
-
return t.appendChild(
|
|
2632
|
+
return t.appendChild(Ln(e.ownerDocument, e, r.value)), t;
|
|
2607
2633
|
}
|
|
2608
|
-
function
|
|
2634
|
+
function Hn(e) {
|
|
2609
2635
|
let t = e.ownerDocument.createElement("aside");
|
|
2610
2636
|
t.className = "designer-data-workbench-preview designer-static-inline-preview", t.dataset.workbenchSection = "preview";
|
|
2611
2637
|
let n = e.ownerDocument.createElement("header"), r = e.ownerDocument.createElement("h4");
|
|
2612
2638
|
r.textContent = i.dataSource.responseTitle;
|
|
2613
|
-
let a =
|
|
2639
|
+
let a = D(e.value), o = e.ownerDocument.createElement("span");
|
|
2614
2640
|
o.dataset.status = a.ok ? "ready" : "error", o.textContent = a.ok ? i.dataSource.staticTabularSummary(a.value.fields.length, a.value.rows.length) : i.dataSource.staticInvalid, n.append(r, o);
|
|
2615
2641
|
let s = e.ownerDocument.createElement("pre");
|
|
2616
2642
|
return s.dataset.staticPreviewValue = "true", e.scrollScope !== void 0 && (s.dataset.designerScrollScope = `static-preview:${e.scrollScope}`), s.textContent = JSON.stringify(a.ok ? a.value.rows.slice(0, 8) : e.value, null, 2), t.append(n, s), t;
|
|
2617
2643
|
}
|
|
2618
2644
|
//#endregion
|
|
2619
2645
|
//#region src/browser/dom/dataset/designer-data-entry-dom.ts
|
|
2620
|
-
function
|
|
2646
|
+
function Un(e) {
|
|
2621
2647
|
if (e === "static") return "inline";
|
|
2622
2648
|
if (e === "variable") return "variable";
|
|
2623
2649
|
if (e === "dataset" || e === "host-resource") return "source";
|
|
2624
2650
|
}
|
|
2625
|
-
function
|
|
2626
|
-
let t =
|
|
2651
|
+
function Wn(e) {
|
|
2652
|
+
let t = Un(e.mode);
|
|
2627
2653
|
return [
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2654
|
+
Gn(e, "inline", "static", t),
|
|
2655
|
+
Gn(e, "variable", "variable", t),
|
|
2656
|
+
Kn(e, t)
|
|
2631
2657
|
];
|
|
2632
2658
|
}
|
|
2633
|
-
function
|
|
2659
|
+
function Gn(e, t, n, r) {
|
|
2634
2660
|
let i = e.availableModes.includes(n);
|
|
2635
2661
|
return {
|
|
2636
2662
|
entry: t,
|
|
2637
2663
|
mode: n,
|
|
2638
2664
|
selected: r === t,
|
|
2639
2665
|
disabled: !i,
|
|
2640
|
-
...i ? {} : { reason:
|
|
2666
|
+
...i ? {} : { reason: qn(t).disabled }
|
|
2641
2667
|
};
|
|
2642
2668
|
}
|
|
2643
|
-
function
|
|
2669
|
+
function Kn(e, t) {
|
|
2644
2670
|
let n = e.availableModes.includes("dataset"), r = e.availableModes.includes("host-resource"), a = i.data.entry.source;
|
|
2645
2671
|
if (!n && !r) return {
|
|
2646
2672
|
entry: "source",
|
|
@@ -2658,30 +2684,30 @@ function Un(e, t) {
|
|
|
2658
2684
|
...s ? { reason: a.portMissing } : {}
|
|
2659
2685
|
};
|
|
2660
2686
|
}
|
|
2661
|
-
function
|
|
2687
|
+
function qn(e) {
|
|
2662
2688
|
return e === "inline" ? i.data.entry.inline : e === "variable" ? i.data.entry.variable : i.data.entry.source;
|
|
2663
2689
|
}
|
|
2664
|
-
function
|
|
2690
|
+
function Jn(e) {
|
|
2665
2691
|
return [
|
|
2666
2692
|
i.data.entry.legend,
|
|
2667
2693
|
i.data.panel.emptyTitle,
|
|
2668
2694
|
...e.map((e) => {
|
|
2669
|
-
let t =
|
|
2695
|
+
let t = qn(e.entry);
|
|
2670
2696
|
return `${t.title} ${t.description} ${e.reason ?? t.disabled}`;
|
|
2671
2697
|
})
|
|
2672
2698
|
].join(" ");
|
|
2673
2699
|
}
|
|
2674
|
-
function
|
|
2700
|
+
function Yn(e) {
|
|
2675
2701
|
return e === "none" ? "empty" : "configured";
|
|
2676
2702
|
}
|
|
2677
|
-
function
|
|
2703
|
+
function Xn(e, t) {
|
|
2678
2704
|
let n = e.createElement("div");
|
|
2679
2705
|
n.className = "designer-data-entry-guide", n.dataset.dataEntryGroup = "true", n.dataset.dataEntryLayout = "empty", n.setAttribute("role", "radiogroup"), n.setAttribute("aria-label", i.data.panel.emptyTitle);
|
|
2680
|
-
for (let r of t) n.appendChild(
|
|
2706
|
+
for (let r of t) n.appendChild(Zn(e, r));
|
|
2681
2707
|
return n;
|
|
2682
2708
|
}
|
|
2683
|
-
function
|
|
2684
|
-
let n =
|
|
2709
|
+
function Zn(e, t) {
|
|
2710
|
+
let n = qn(t.entry), r = e.createElement("button");
|
|
2685
2711
|
r.type = "button", r.className = "designer-data-entry-guide-row", r.dataset.dataEntry = t.entry, r.dataset.dataEntryMode = t.mode, r.dataset.dsControl = `data-entry:${t.entry}`, r.setAttribute("role", "radio"), r.setAttribute("aria-checked", String(t.selected)), r.tabIndex = t.disabled ? -1 : 0, t.selected && (r.dataset.datasetMode = t.mode), t.disabled && (r.disabled = !0, r.setAttribute("aria-disabled", "true"));
|
|
2686
2712
|
let i = e.createElement("span");
|
|
2687
2713
|
i.className = "designer-data-entry-guide-title", i.textContent = n.title;
|
|
@@ -2707,7 +2733,7 @@ function G(e, t, n, r, i = !1) {
|
|
|
2707
2733
|
});
|
|
2708
2734
|
return a.dataset.datasetAction = t, r !== void 0 && (a.dataset.variant = r), a;
|
|
2709
2735
|
}
|
|
2710
|
-
function
|
|
2736
|
+
function Qn(e, t) {
|
|
2711
2737
|
let n = e.createElement("div");
|
|
2712
2738
|
n.className = "designer-dataset-actions designer-dataset-status-bar", n.dataset.datasetStatusBar = "true";
|
|
2713
2739
|
let r = e.createElement("span");
|
|
@@ -2727,7 +2753,7 @@ function Yn(e, t) {
|
|
|
2727
2753
|
});
|
|
2728
2754
|
return c.dataset.datasetAction = t.action, c.dataset.variant = "request", n.append(r, s, c), n;
|
|
2729
2755
|
}
|
|
2730
|
-
function
|
|
2756
|
+
function $n(e, t) {
|
|
2731
2757
|
for (let n of e.querySelectorAll("[data-dataset-status-bar]")) {
|
|
2732
2758
|
let e = n.querySelector("[data-dataset-status]");
|
|
2733
2759
|
e !== null && (e.dataset.state = t.state);
|
|
@@ -2741,32 +2767,32 @@ function Xn(e, t) {
|
|
|
2741
2767
|
o !== null && (o.dataset.datasetAction = t.action, o.textContent = t.actionLabel, o.disabled = t.actionDisabled);
|
|
2742
2768
|
}
|
|
2743
2769
|
}
|
|
2744
|
-
function
|
|
2745
|
-
for (let n of e.querySelectorAll("[data-dataset-apply-bar]"))
|
|
2770
|
+
function er(e, t) {
|
|
2771
|
+
for (let n of e.querySelectorAll("[data-dataset-apply-bar]")) tr(n.ownerDocument, n, t);
|
|
2746
2772
|
}
|
|
2747
|
-
function
|
|
2773
|
+
function tr(e, t, n) {
|
|
2748
2774
|
if (t.replaceChildren(), n.dirty) {
|
|
2749
2775
|
let n = e.createElement("span");
|
|
2750
|
-
n.className = "designer-dataset-apply-dirty", n.dataset.datasetApplyDirty = "true", n.append(
|
|
2776
|
+
n.className = "designer-dataset-apply-dirty", n.dataset.datasetApplyDirty = "true", n.append(nr(e), rr(e)), t.appendChild(n);
|
|
2751
2777
|
}
|
|
2752
|
-
t.appendChild(
|
|
2778
|
+
t.appendChild(ir(e, n));
|
|
2753
2779
|
}
|
|
2754
|
-
function
|
|
2780
|
+
function nr(e) {
|
|
2755
2781
|
let t = e.createElement("i");
|
|
2756
2782
|
return t.className = "designer-dataset-apply-dirty-dot", t.setAttribute("aria-hidden", "true"), t;
|
|
2757
2783
|
}
|
|
2758
|
-
function
|
|
2784
|
+
function rr(e) {
|
|
2759
2785
|
let t = e.createElement("span");
|
|
2760
2786
|
return t.textContent = i.data.panel.dirty, t;
|
|
2761
2787
|
}
|
|
2762
|
-
function
|
|
2788
|
+
function ir(e, t) {
|
|
2763
2789
|
let n = f(e, {
|
|
2764
2790
|
disabled: t.disabled,
|
|
2765
2791
|
text: t.label
|
|
2766
2792
|
});
|
|
2767
2793
|
return n.dataset.datasetAction = "apply", n.dataset.variant = "apply", n.dataset.state = t.dirty ? "dirty" : "applied", n;
|
|
2768
2794
|
}
|
|
2769
|
-
function
|
|
2795
|
+
function ar(e) {
|
|
2770
2796
|
let t = e.dirty;
|
|
2771
2797
|
return {
|
|
2772
2798
|
label: t ? i.data.panel.apply : i.data.panel.applied,
|
|
@@ -2776,32 +2802,32 @@ function nr(e) {
|
|
|
2776
2802
|
}
|
|
2777
2803
|
//#endregion
|
|
2778
2804
|
//#region src/browser/dom/dataset/designer-dataset-flow-dom.ts
|
|
2779
|
-
function
|
|
2805
|
+
function or(e) {
|
|
2780
2806
|
let t = e.panel.ownerDocument, n = t.createElement("section");
|
|
2781
2807
|
n.className = "designer-data-source-type", n.dataset.dsSection = "value", n.tabIndex = -1;
|
|
2782
|
-
let r =
|
|
2808
|
+
let r = Wn({
|
|
2783
2809
|
mode: e.mode,
|
|
2784
2810
|
availableModes: e.availableModes,
|
|
2785
2811
|
resourceAvailable: e.resourceAvailable
|
|
2786
2812
|
});
|
|
2787
|
-
n.dataset.inspectorSearchSection = "true", n.dataset.inspectorSearchText =
|
|
2788
|
-
let a =
|
|
2813
|
+
n.dataset.inspectorSearchSection = "true", n.dataset.inspectorSearchText = Jn(r);
|
|
2814
|
+
let a = Yn(e.mode);
|
|
2789
2815
|
if (n.dataset.dataEntryLayout = a, a === "empty") {
|
|
2790
2816
|
n.dataset.workbenchSection = "source";
|
|
2791
2817
|
let e = t.createElement("h3");
|
|
2792
2818
|
e.className = "designer-inspector-section-title", e.textContent = i.data.panel.emptyTitle;
|
|
2793
2819
|
let a = t.createElement("p");
|
|
2794
|
-
return a.className = "designer-data-entry-hint", a.textContent = i.data.panel.emptyHint, n.append(e,
|
|
2820
|
+
return a.className = "designer-data-entry-hint", a.textContent = i.data.panel.emptyHint, n.append(e, Xn(t, r), a), n;
|
|
2795
2821
|
}
|
|
2796
|
-
let o =
|
|
2822
|
+
let o = sr(t, e);
|
|
2797
2823
|
return o === null ? (n.dataset.inspectorSearchText = "", n) : (n.dataset.inspectorSearchText = [
|
|
2798
2824
|
i.dataSource.sourceBinding,
|
|
2799
2825
|
i.dataSource.sourceKind(e.mode),
|
|
2800
2826
|
i.dataSource.sourceKindChange
|
|
2801
2827
|
].join(" "), n.appendChild(o), n);
|
|
2802
2828
|
}
|
|
2803
|
-
function
|
|
2804
|
-
if (t.mode !== "static" && t.mode !== "variable" ||
|
|
2829
|
+
function sr(e, t) {
|
|
2830
|
+
if (t.mode !== "static" && t.mode !== "variable" || lr(t.availableModes).length < 2) return null;
|
|
2805
2831
|
let n = e.createElement("div");
|
|
2806
2832
|
n.className = "designer-dataset-source-binding", n.dataset.sourceKindRow = "true";
|
|
2807
2833
|
let r = e.createElement("span");
|
|
@@ -2816,23 +2842,23 @@ function ir(e, t) {
|
|
|
2816
2842
|
});
|
|
2817
2843
|
return o.dataset.sourceKindChange = "true", n.append(r, a, o), n;
|
|
2818
2844
|
}
|
|
2819
|
-
var
|
|
2845
|
+
var cr = [
|
|
2820
2846
|
"static",
|
|
2821
2847
|
"variable",
|
|
2822
2848
|
"dataset"
|
|
2823
2849
|
];
|
|
2824
|
-
function
|
|
2825
|
-
return
|
|
2850
|
+
function lr(e) {
|
|
2851
|
+
return cr.filter((t) => e.includes(t));
|
|
2826
2852
|
}
|
|
2827
|
-
function
|
|
2828
|
-
return
|
|
2853
|
+
function ur(e) {
|
|
2854
|
+
return Bn(pr(e));
|
|
2829
2855
|
}
|
|
2830
|
-
function
|
|
2856
|
+
function dr(e) {
|
|
2831
2857
|
if (e.hostResourceSelectionAvailable !== !0) return;
|
|
2832
2858
|
let t = f(e.panel.ownerDocument, { text: i.dataSource.hostResourceSelect });
|
|
2833
2859
|
return t.dataset.datasetAction = "select-host-resource", t;
|
|
2834
2860
|
}
|
|
2835
|
-
function
|
|
2861
|
+
function fr(e) {
|
|
2836
2862
|
let t = e.panel.ownerDocument, n = t.createElement("section");
|
|
2837
2863
|
n.className = "designer-data-source-variable";
|
|
2838
2864
|
let r = l(t, { label: i.dataset.selectVariable }), a = v(t, {
|
|
@@ -2850,7 +2876,7 @@ function lr(e) {
|
|
|
2850
2876
|
});
|
|
2851
2877
|
return a.dataset.dataVariableSource = "true", r.control.appendChild(h(a).element), n.appendChild(r.field), n;
|
|
2852
2878
|
}
|
|
2853
|
-
function
|
|
2879
|
+
function pr(e) {
|
|
2854
2880
|
return {
|
|
2855
2881
|
ownerDocument: e.panel.ownerDocument,
|
|
2856
2882
|
descriptor: e.staticDescriptor,
|
|
@@ -2864,36 +2890,36 @@ function ur(e) {
|
|
|
2864
2890
|
scrollScope: e.scrollScope
|
|
2865
2891
|
};
|
|
2866
2892
|
}
|
|
2867
|
-
function
|
|
2893
|
+
function mr(e) {
|
|
2868
2894
|
let t = e.panel.ownerDocument, n = t.createElement("section");
|
|
2869
2895
|
if (n.className = "designer-dataset-section designer-inspector-data-flow", n.dataset.datasetSection = "true", n.dataset.dataFlowLayout = "continuous", n.dataset.inspectorSearchSection = "true", e.mode === "host-resource") {
|
|
2870
2896
|
let r = t.createElement("div");
|
|
2871
2897
|
r.className = "designer-inspector-data-flow-content", r.dataset.designerScrollScope = `data-source:${e.scrollScope}`;
|
|
2872
2898
|
let a = t.createElement("p");
|
|
2873
|
-
a.className = "designer-host-resource-summary", a.dataset.hostResourceSummary = "true", a.textContent = e.hostResource === void 0 ? i.dataSource.hostResourceManaged : i.dataSource.hostResourceSummary(e.hostResource.resourceType, e.hostResource.resourceId), r.append(
|
|
2874
|
-
for (let t of mn(e)) t !== "value" && r.appendChild(
|
|
2875
|
-
let o =
|
|
2899
|
+
a.className = "designer-host-resource-summary", a.dataset.hostResourceSummary = "true", a.textContent = e.hostResource === void 0 ? i.dataSource.hostResourceManaged : i.dataSource.hostResourceSummary(e.hostResource.resourceType, e.hostResource.resourceId), r.append(or(e), a);
|
|
2900
|
+
for (let t of mn(e)) t !== "value" && r.appendChild(vr(t, e));
|
|
2901
|
+
let o = dr(e);
|
|
2876
2902
|
return o !== void 0 && r.appendChild(o), n.appendChild(r), n;
|
|
2877
2903
|
}
|
|
2878
|
-
n.dataset.activeStep =
|
|
2904
|
+
n.dataset.activeStep = Sr(e.activeStep);
|
|
2879
2905
|
let r = t.createElement("div");
|
|
2880
|
-
return r.className = "designer-inspector-data-flow-content", r.dataset.designerScrollScope = `data-source:${e.scrollScope}`,
|
|
2906
|
+
return r.className = "designer-inspector-data-flow-content", r.dataset.designerScrollScope = `data-source:${e.scrollScope}`, hr(r, e), n.appendChild(r), n;
|
|
2881
2907
|
}
|
|
2882
|
-
function
|
|
2883
|
-
if (e.appendChild(
|
|
2908
|
+
function hr(e, t) {
|
|
2909
|
+
if (e.appendChild(or(t)), t.mode !== "none") {
|
|
2884
2910
|
if (t.mode === "static") {
|
|
2885
|
-
|
|
2911
|
+
xr(e, t);
|
|
2886
2912
|
return;
|
|
2887
2913
|
}
|
|
2888
2914
|
if (t.mode === "variable") {
|
|
2889
|
-
e.appendChild(
|
|
2915
|
+
e.appendChild(fr(t)), e.appendChild(Qn(e.ownerDocument, K(t))), _r(e);
|
|
2890
2916
|
return;
|
|
2891
2917
|
}
|
|
2892
|
-
for (let n of mn(t)) n !== "value" && e.appendChild(
|
|
2893
|
-
e.appendChild(
|
|
2918
|
+
for (let n of mn(t)) n !== "value" && e.appendChild(vr(n, t));
|
|
2919
|
+
e.appendChild(Qn(e.ownerDocument, K(t))), _r(e);
|
|
2894
2920
|
}
|
|
2895
2921
|
}
|
|
2896
|
-
function
|
|
2922
|
+
function gr(e) {
|
|
2897
2923
|
if (e === void 0) return 0;
|
|
2898
2924
|
if (Array.isArray(e)) return e.length;
|
|
2899
2925
|
if (typeof e == "object" && e) {
|
|
@@ -2912,7 +2938,7 @@ function K(e) {
|
|
|
2912
2938
|
canUndo: e.canUndo === !0
|
|
2913
2939
|
};
|
|
2914
2940
|
let t = P(e.descriptor, e.draft), n = e.preview.status === "loading", r = e.preview.status === "ready", a = e.preview.status === "error", o = n || t > 0 || e.descriptor === void 0 || !e.resourceAvailable, s, c, l, u = "test";
|
|
2915
|
-
return n ? (s = "loading", c = i.dataSource.testing, l = i.dataSource.testing) : t > 0 ? (s = "invalid", c = i.dataSource.parametersUnfilled(t), l = i.dataSource.test) : a ? (s = "error", c = i.dataSource.responseFailed, l = i.dataSource.retry) : r ? (s = "ready", c = i.dataSource.syncedRows(
|
|
2941
|
+
return n ? (s = "loading", c = i.dataSource.testing, l = i.dataSource.testing) : t > 0 ? (s = "invalid", c = i.dataSource.parametersUnfilled(t), l = i.dataSource.test) : a ? (s = "error", c = i.dataSource.responseFailed, l = i.dataSource.retry) : r ? (s = "ready", c = i.dataSource.syncedRows(gr(e.preview.rawValue)), l = i.dataset.refresh) : e.dirty ? (s = "dirty", c = i.dataSource.draft, u = "sync", l = i.dataSource.sync) : (s = "synced", c = i.dataSource.synced, l = i.dataSource.test), {
|
|
2916
2942
|
state: s,
|
|
2917
2943
|
text: c,
|
|
2918
2944
|
actionLabel: l,
|
|
@@ -2921,7 +2947,7 @@ function K(e) {
|
|
|
2921
2947
|
canUndo: e.canUndo === !0
|
|
2922
2948
|
};
|
|
2923
2949
|
}
|
|
2924
|
-
function
|
|
2950
|
+
function _r(e) {
|
|
2925
2951
|
let t = e.querySelector(".designer-dataset-actions");
|
|
2926
2952
|
if (t === null) return;
|
|
2927
2953
|
let n = () => {
|
|
@@ -2940,8 +2966,8 @@ function mr(e) {
|
|
|
2940
2966
|
e.observe(t), t.addEventListener("DOMNodeRemovedFromDocument", () => e.disconnect(), { once: !0 }), t.isConnected || e.disconnect();
|
|
2941
2967
|
}
|
|
2942
2968
|
}
|
|
2943
|
-
function
|
|
2944
|
-
let n =
|
|
2969
|
+
function vr(e, t) {
|
|
2970
|
+
let n = br(e, t);
|
|
2945
2971
|
if (e === "authoring") {
|
|
2946
2972
|
n.classList.add("designer-inspector-advanced-settings"), n.dataset.workbenchSection = "refresh", n.tabIndex = -1;
|
|
2947
2973
|
let e = n.querySelector(".designer-inspector-section-title");
|
|
@@ -2949,40 +2975,40 @@ function hr(e, t) {
|
|
|
2949
2975
|
}
|
|
2950
2976
|
return n;
|
|
2951
2977
|
}
|
|
2952
|
-
function
|
|
2978
|
+
function yr(e) {
|
|
2953
2979
|
let t = e.descriptor, n = e.mode === "dataset" && t !== void 0 ? !e.resourceAvailable || !tt(t, e.draft, e.roles) : !1;
|
|
2954
|
-
return
|
|
2980
|
+
return ar({
|
|
2955
2981
|
dirty: e.dirty,
|
|
2956
2982
|
blocked: n
|
|
2957
2983
|
});
|
|
2958
2984
|
}
|
|
2959
|
-
function
|
|
2985
|
+
function br(e, t) {
|
|
2960
2986
|
let n = B(e, t);
|
|
2961
2987
|
if (n === void 0) throw Error(`DATASET_SECTION_UNAVAILABLE:${e}`);
|
|
2962
2988
|
return n;
|
|
2963
2989
|
}
|
|
2964
|
-
function
|
|
2965
|
-
let n =
|
|
2966
|
-
if (e.appendChild(
|
|
2967
|
-
let t =
|
|
2990
|
+
function xr(e, t) {
|
|
2991
|
+
let n = pr(t);
|
|
2992
|
+
if (e.appendChild(ur(t)), t.staticDescriptor?.kind === "tabular") {
|
|
2993
|
+
let t = Vn(n);
|
|
2968
2994
|
t.dataset.workbenchSection = "mapping", t.tabIndex = -1;
|
|
2969
|
-
let r =
|
|
2995
|
+
let r = Hn(n);
|
|
2970
2996
|
r.tabIndex = -1, e.append(t, r);
|
|
2971
2997
|
}
|
|
2972
|
-
let r =
|
|
2973
|
-
r !== void 0 && e.appendChild(r), e.appendChild(
|
|
2998
|
+
let r = dr(t);
|
|
2999
|
+
r !== void 0 && e.appendChild(r), e.appendChild(Qn(e.ownerDocument, K(t))), _r(e);
|
|
2974
3000
|
}
|
|
2975
|
-
function
|
|
3001
|
+
function Sr(e) {
|
|
2976
3002
|
return e === "mapping" || e === "preview" ? e : "source";
|
|
2977
3003
|
}
|
|
2978
3004
|
//#endregion
|
|
2979
3005
|
//#region src/browser/dom/dataset/designer-source-sheet-dom.ts
|
|
2980
|
-
var
|
|
3006
|
+
var Cr = [
|
|
2981
3007
|
"dataset",
|
|
2982
3008
|
"variable",
|
|
2983
3009
|
"fixed"
|
|
2984
3010
|
];
|
|
2985
|
-
function
|
|
3011
|
+
function wr(e) {
|
|
2986
3012
|
let t = e.panel.ownerDocument, n = t.createElement("div");
|
|
2987
3013
|
n.className = "designer-source-sheet-layer", n.dataset.sourceSheet = "true";
|
|
2988
3014
|
let r = t.createElement("section");
|
|
@@ -2995,7 +3021,7 @@ function xr(e) {
|
|
|
2995
3021
|
l.type = "button", l.className = "designer-source-sheet-close", l.dataset.sourceSheetClose = "true", l.setAttribute("aria-label", i.dataSource.pickerClose), l.innerHTML = a("close"), o.append(s, l);
|
|
2996
3022
|
let u = t.createElement("div");
|
|
2997
3023
|
u.className = "designer-source-sheet-tabs", u.setAttribute("role", "tablist"), u.setAttribute("aria-label", i.dataSource.pickerTabsLabel);
|
|
2998
|
-
let d = new Map(
|
|
3024
|
+
let d = new Map(Wn({
|
|
2999
3025
|
mode: e.mode,
|
|
3000
3026
|
availableModes: e.availableModes,
|
|
3001
3027
|
resourceAvailable: e.resourceAvailable
|
|
@@ -3004,7 +3030,7 @@ function xr(e) {
|
|
|
3004
3030
|
variable: "variable",
|
|
3005
3031
|
fixed: "inline"
|
|
3006
3032
|
};
|
|
3007
|
-
for (let n of
|
|
3033
|
+
for (let n of Cr) {
|
|
3008
3034
|
let r = t.createElement("button");
|
|
3009
3035
|
r.type = "button", r.dataset.sourceSheetTab = n, r.setAttribute("role", "tab"), r.setAttribute("aria-selected", String(e.sourcePickerTab === n)), r.tabIndex = e.sourcePickerTab === n ? 0 : -1;
|
|
3010
3036
|
let a = d.get(f[n]);
|
|
@@ -3014,18 +3040,18 @@ function xr(e) {
|
|
|
3014
3040
|
p.className = "designer-source-sheet-tools";
|
|
3015
3041
|
let m = t.createElement("div");
|
|
3016
3042
|
m.className = "designer-source-sheet-scroll", m.setAttribute("role", "tabpanel");
|
|
3017
|
-
let h = e.sourcePickerTab === "fixed" ?
|
|
3018
|
-
if (e.sourcePickerTab === "fixed") p.hidden = !0, m.appendChild(
|
|
3043
|
+
let h = e.sourcePickerTab === "fixed" ? Dr(e) : "";
|
|
3044
|
+
if (e.sourcePickerTab === "fixed") p.hidden = !0, m.appendChild(Or(t, h));
|
|
3019
3045
|
else {
|
|
3020
|
-
if (p.appendChild(
|
|
3046
|
+
if (p.appendChild(Tr(t, e)), e.sourcePickerTab === "dataset") {
|
|
3021
3047
|
let t = ft(e);
|
|
3022
3048
|
t !== void 0 && p.appendChild(t);
|
|
3023
3049
|
}
|
|
3024
|
-
m.appendChild(e.sourcePickerTab === "variable" ?
|
|
3050
|
+
m.appendChild(e.sourcePickerTab === "variable" ? Er(e) : pt(e));
|
|
3025
3051
|
}
|
|
3026
|
-
return r.append(o, u, p, m,
|
|
3052
|
+
return r.append(o, u, p, m, kr(t, e, h)), n.appendChild(r), n;
|
|
3027
3053
|
}
|
|
3028
|
-
function
|
|
3054
|
+
function Tr(e, t) {
|
|
3029
3055
|
let n = e.createElement("label");
|
|
3030
3056
|
n.className = "designer-source-sheet-search";
|
|
3031
3057
|
let r = e.createElement("span");
|
|
@@ -3039,7 +3065,7 @@ function Sr(e, t) {
|
|
|
3039
3065
|
});
|
|
3040
3066
|
return s.autocomplete = "off", o ? s.dataset.datasetVariableQuery = "true" : s.dataset.datasetQuery = "true", n.append(r, s), n;
|
|
3041
3067
|
}
|
|
3042
|
-
function
|
|
3068
|
+
function Er(e) {
|
|
3043
3069
|
let t = e.panel.ownerDocument, n = t.createElement("div");
|
|
3044
3070
|
n.className = "designer-source-sheet-list", n.dataset.sourceSheetVariables = "true";
|
|
3045
3071
|
let r = e.variableQuery.trim().toLowerCase(), o = e.variables.filter((e) => r === "" || e.name.toLowerCase().includes(r)), s = t.createElement("p");
|
|
@@ -3058,13 +3084,13 @@ function Cr(e) {
|
|
|
3058
3084
|
}
|
|
3059
3085
|
return n.appendChild(s), n;
|
|
3060
3086
|
}
|
|
3061
|
-
function
|
|
3087
|
+
function Dr(e) {
|
|
3062
3088
|
let t = e.staticDraft.trim();
|
|
3063
3089
|
if (t !== "" && t !== "null") return e.staticDraft;
|
|
3064
3090
|
let n = e.preview.rawValue;
|
|
3065
3091
|
return typeof n == "object" && n && !Array.isArray(n) && Array.isArray(n.fields) && Array.isArray(n.rows) ? JSON.stringify(n, null, 2) : e.staticDraft;
|
|
3066
3092
|
}
|
|
3067
|
-
function
|
|
3093
|
+
function Or(e, t) {
|
|
3068
3094
|
let n = e.createElement("div");
|
|
3069
3095
|
n.className = "designer-source-sheet-fixed";
|
|
3070
3096
|
let r = e.createElement("div");
|
|
@@ -3080,14 +3106,14 @@ function Tr(e, t) {
|
|
|
3080
3106
|
});
|
|
3081
3107
|
return c.dataset.sourceSheetFixed = "true", c.spellcheck = !1, n.append(r, c), n;
|
|
3082
3108
|
}
|
|
3083
|
-
function
|
|
3109
|
+
function kr(e, t, n) {
|
|
3084
3110
|
let r = e.createElement("footer");
|
|
3085
3111
|
r.className = "designer-source-sheet-foot";
|
|
3086
3112
|
let a = e.createElement("span");
|
|
3087
3113
|
a.className = "designer-source-sheet-note", a.dataset.sourceSheetNote = "true";
|
|
3088
3114
|
let o = e.createElement("div");
|
|
3089
3115
|
if (o.className = "designer-source-sheet-actions", t.sourcePickerTab === "fixed") {
|
|
3090
|
-
let r =
|
|
3116
|
+
let r = Ar(n, t.staticDescriptor);
|
|
3091
3117
|
a.textContent = r.note, a.dataset.tone = r.ok ? "ok" : "error";
|
|
3092
3118
|
let s = e.createElement("button");
|
|
3093
3119
|
s.type = "button", s.className = "designer-source-sheet-primary", s.dataset.sourceSheetApplyFixed = "true", s.textContent = i.dataSource.pickerFixedApply, s.disabled = !r.ok, o.appendChild(s);
|
|
@@ -3098,7 +3124,7 @@ function Er(e, t, n) {
|
|
|
3098
3124
|
}
|
|
3099
3125
|
return r.append(a, o), r;
|
|
3100
3126
|
}
|
|
3101
|
-
function
|
|
3127
|
+
function Ar(e, t) {
|
|
3102
3128
|
let n = e.trim();
|
|
3103
3129
|
if (n === "") return {
|
|
3104
3130
|
ok: !1,
|
|
@@ -3114,7 +3140,7 @@ function Dr(e, t) {
|
|
|
3114
3140
|
};
|
|
3115
3141
|
}
|
|
3116
3142
|
if (t?.kind === "tabular") {
|
|
3117
|
-
let e =
|
|
3143
|
+
let e = D(r);
|
|
3118
3144
|
return e.ok ? {
|
|
3119
3145
|
ok: !0,
|
|
3120
3146
|
note: i.dataSource.pickerFixedValid(e.value.rows.length, e.value.fields.length)
|
|
@@ -3133,22 +3159,44 @@ function Dr(e, t) {
|
|
|
3133
3159
|
}
|
|
3134
3160
|
//#endregion
|
|
3135
3161
|
//#region src/browser/dom/dataset/designer-dataset-dom.ts
|
|
3136
|
-
function
|
|
3162
|
+
function jr(e) {
|
|
3137
3163
|
let { panel: t } = e;
|
|
3138
3164
|
Ot(t), t.replaceChildren();
|
|
3139
3165
|
let n = t.ownerDocument.createElement("section");
|
|
3140
3166
|
n.className = "designer-data-source-panel", n.dataset.dataSourcePanel = "true", n.dataset.inspectorSearchSection = "true", n.appendChild(Re(t.ownerDocument, e.dataState));
|
|
3141
|
-
let r =
|
|
3142
|
-
n.appendChild(r);
|
|
3143
|
-
let i =
|
|
3144
|
-
|
|
3145
|
-
let a =
|
|
3146
|
-
|
|
3147
|
-
let
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3167
|
+
let r = Mr(t.ownerDocument, e);
|
|
3168
|
+
r !== void 0 && n.appendChild(r);
|
|
3169
|
+
let i = mr(e);
|
|
3170
|
+
n.appendChild(i);
|
|
3171
|
+
let a = t.ownerDocument.createElement("p");
|
|
3172
|
+
a.className = "designer-data-source-feedback", a.dataset.datasetFeedback = "true", a.setAttribute("role", "status"), a.setAttribute("aria-live", "polite"), a.textContent = e.feedback;
|
|
3173
|
+
let o = i.querySelector(".designer-inspector-data-flow-content"), s = o?.querySelector(".designer-dataset-actions");
|
|
3174
|
+
s == null ? (o ?? n).appendChild(a) : s.before(a), t.appendChild(n);
|
|
3175
|
+
let c = t.closest(".properties") ?? t;
|
|
3176
|
+
for (let e of c.querySelectorAll("[data-source-sheet]")) e.remove();
|
|
3177
|
+
return e.catalogOpen && e.surface === "inspector" && c.appendChild(wr(e)), { feedback: a };
|
|
3178
|
+
}
|
|
3179
|
+
function Mr(e, t) {
|
|
3180
|
+
let n = t.dataValue;
|
|
3181
|
+
if (t.surface !== "inspector" || n?.kind !== "inline" || n.sample !== !0) return;
|
|
3182
|
+
let r = i.sampleData, a = e.createElement("div");
|
|
3183
|
+
a.className = "designer-data-notice designer-sample-data-notice", a.dataset.dataNoticeTone = "warning", a.dataset.sampleInspectorNotice = "", a.setAttribute("role", "status");
|
|
3184
|
+
let o = e.createElement("span");
|
|
3185
|
+
o.className = "designer-data-notice-text", o.textContent = r.inspectorNotice;
|
|
3186
|
+
let s = e.createElement("span");
|
|
3187
|
+
s.className = "designer-sample-data-actions";
|
|
3188
|
+
let c = f(e, {
|
|
3189
|
+
className: "designer-data-notice-retry",
|
|
3190
|
+
text: r.bind
|
|
3191
|
+
});
|
|
3192
|
+
c.dataset.datasetChange = "", c.dataset.tip = r.bindTip;
|
|
3193
|
+
let l = f(e, {
|
|
3194
|
+
className: "designer-data-notice-retry",
|
|
3195
|
+
text: r.keep
|
|
3196
|
+
});
|
|
3197
|
+
return l.dataset.sampleAction = "keep", l.dataset.tip = r.keepTip, s.append(c, l), a.append(o, s), a;
|
|
3198
|
+
}
|
|
3199
|
+
function Nr(e) {
|
|
3152
3200
|
let t = e.panel.ownerDocument, n = t.createElement("div");
|
|
3153
3201
|
n.className = "designer-data-workbench-shell", n.dataset.datasetWorkbench = "true", n.dataset.inspectorSearchSection = "true", n.dataset.inspectorSearchText = [
|
|
3154
3202
|
e.descriptor?.name ?? i.dataSource.workbench,
|
|
@@ -3170,7 +3218,7 @@ function kr(e) {
|
|
|
3170
3218
|
c.className = "designer-workbench-draft", c.dataset.dirty = String(e.dirty), c.textContent = e.dirty ? i.dataSource.draft : i.dataSource.synced, o.append(s, c), a.appendChild(o);
|
|
3171
3219
|
let l = t.createElement("div");
|
|
3172
3220
|
l.className = "designer-workbench-actions", l.append(G(t, "toggle-preview", e.preview.open ? i.dataSource.previewClose : i.dataSource.previewOpen, "preview-toggle"), G(t, "test", e.preview.status === "loading" ? i.dataSource.testing : i.dataSource.test, void 0, e.descriptor === void 0 || !e.resourceAvailable || e.preview.status === "loading"), G(t, "apply", i.dataSource.apply("dataset"), "primary", !e.dirty || e.descriptor === void 0 || !e.resourceAvailable)), r.append(a, l);
|
|
3173
|
-
let u =
|
|
3221
|
+
let u = Fr(t, e.confirmClose), d = t.createElement("nav");
|
|
3174
3222
|
d.className = "designer-data-workbench-steps", d.dataset.inspectorSearchSection = "true", d.dataset.inspectorSearchText = [
|
|
3175
3223
|
i.dataSource.sourceStep,
|
|
3176
3224
|
i.dataSource.mappingStep,
|
|
@@ -3209,16 +3257,16 @@ function kr(e) {
|
|
|
3209
3257
|
i.type = "button", i.dataset.workbenchStep = n, i.dataset.state = a === "available" && e.activeStep === n ? "current" : a, i.setAttribute("aria-current", e.activeStep === n ? "step" : "false"), i.disabled = a === "pending" || a === "unavailable", i.textContent = r, d.appendChild(i);
|
|
3210
3258
|
}
|
|
3211
3259
|
let f = t.createElement("main");
|
|
3212
|
-
f.className = "designer-static-data-content", f.dataset.designerScrollScope = `data-workbench-editor:${e.scrollScope}`, f.appendChild(
|
|
3213
|
-
let p =
|
|
3260
|
+
f.className = "designer-static-data-content", f.dataset.designerScrollScope = `data-workbench-editor:${e.scrollScope}`, f.appendChild(Pr("host-link", e)), f.appendChild(Pr("source", e)), (e.descriptor !== void 0 || e.mode === "host-resource") && f.append(Pr("authoring", e), Ir(t, "transform", i.dataSource.transformStep, i.dataSource.transformUnavailable), Ir(t, "refresh", i.dataSource.refreshStep, Zt(e.authoring)));
|
|
3261
|
+
let p = Pr("preview", e), m = t.createElement("div");
|
|
3214
3262
|
return m.className = "designer-data-workbench-grid", m.append(d, f, p), n.dataset.kind = "dataset", n.dataset.inspectorPane = "data", n.append(r, u, m), n;
|
|
3215
3263
|
}
|
|
3216
|
-
function
|
|
3264
|
+
function Pr(e, t) {
|
|
3217
3265
|
let n = B(e, t);
|
|
3218
3266
|
if (n === void 0) throw Error(`DATASET_SECTION_UNAVAILABLE:${e}`);
|
|
3219
3267
|
return n;
|
|
3220
3268
|
}
|
|
3221
|
-
function
|
|
3269
|
+
function Fr(e, t) {
|
|
3222
3270
|
let n = e.createElement("section");
|
|
3223
3271
|
n.className = "designer-workbench-confirm", n.hidden = !t, n.dataset.datasetDiscardConfirm = "true";
|
|
3224
3272
|
let r = e.createElement("span"), a = e.createElement("strong");
|
|
@@ -3228,7 +3276,7 @@ function jr(e, t) {
|
|
|
3228
3276
|
let s = e.createElement("span");
|
|
3229
3277
|
return s.append(G(e, "keep-editing", i.dataSource.keepEditing), G(e, "discard-workbench", i.dataSource.discard, "danger")), n.append(r, s), n;
|
|
3230
3278
|
}
|
|
3231
|
-
function
|
|
3279
|
+
function Ir(e, t, n, r) {
|
|
3232
3280
|
let i = e.createElement("section");
|
|
3233
3281
|
i.className = "designer-dataset-config-section designer-data-workbench-notice", i.dataset.workbenchSection = t, i.dataset.inspectorSearchSection = "true", i.dataset.inspectorSearchText = `${n} ${r}`, i.tabIndex = -1;
|
|
3234
3282
|
let a = e.createElement("h4");
|
|
@@ -3238,10 +3286,10 @@ function Mr(e, t, n, r) {
|
|
|
3238
3286
|
}
|
|
3239
3287
|
//#endregion
|
|
3240
3288
|
//#region src/browser/controllers/dataset/designer-dataset-effective-value.ts
|
|
3241
|
-
function
|
|
3242
|
-
return e === void 0 ? t.valueRef :
|
|
3289
|
+
function Lr(e, t) {
|
|
3290
|
+
return e === void 0 ? t.valueRef : k(e) ?? t.valueRef;
|
|
3243
3291
|
}
|
|
3244
|
-
function
|
|
3292
|
+
function Rr(e, t, n) {
|
|
3245
3293
|
let r = Pe(e, t);
|
|
3246
3294
|
if (r === void 0) return;
|
|
3247
3295
|
if (r.status === "document") return r;
|
|
@@ -3257,49 +3305,49 @@ function Pr(e, t, n) {
|
|
|
3257
3305
|
}
|
|
3258
3306
|
//#endregion
|
|
3259
3307
|
//#region src/browser/controllers/dataset/designer-dataset-surface-controller.ts
|
|
3260
|
-
function
|
|
3308
|
+
function zr(e) {
|
|
3261
3309
|
let t = e.callbacks.preserveScrollContinuity;
|
|
3262
3310
|
if (t !== void 0) {
|
|
3263
|
-
t(() =>
|
|
3311
|
+
t(() => Br(e));
|
|
3264
3312
|
return;
|
|
3265
3313
|
}
|
|
3266
|
-
|
|
3314
|
+
Br(e);
|
|
3267
3315
|
}
|
|
3268
|
-
function
|
|
3316
|
+
function Br(e) {
|
|
3269
3317
|
let t = e.state.panel;
|
|
3270
3318
|
if (t === void 0) return;
|
|
3271
|
-
let r =
|
|
3319
|
+
let r = Hr(t), i = J(e, t, "inspector"), a = jr(i);
|
|
3272
3320
|
e.state.feedback = a.feedback;
|
|
3273
3321
|
let o = e.currentEntry()?.manifest, s = t.querySelector(".designer-inspector-data-flow-content") ?? t, c = t.ownerDocument.createElement("div");
|
|
3274
3322
|
n(c, o?.editorDescriptor?.data, {
|
|
3275
3323
|
document: e.callbacks.getDocument(),
|
|
3276
3324
|
interaction: e.callbacks.getInteraction(),
|
|
3277
3325
|
catalog: e.callbacks.getCatalog(),
|
|
3278
|
-
getDatasetFields: () =>
|
|
3326
|
+
getDatasetFields: () => li(e)
|
|
3279
3327
|
});
|
|
3280
3328
|
let l = s.querySelector(".designer-dataset-actions"), u = s.querySelector("[data-ds-section=\"preview\"]") ?? l;
|
|
3281
3329
|
if (u !== null) {
|
|
3282
3330
|
for (; c.firstChild !== null;) u.before(c.firstChild);
|
|
3283
|
-
|
|
3331
|
+
_r(s);
|
|
3284
3332
|
} else for (; c.firstChild !== null;) s.appendChild(c.firstChild);
|
|
3285
|
-
|
|
3333
|
+
ni(e, J(e, t, "workbench")), xn(t, i);
|
|
3286
3334
|
let d = e.callbacks.getWorkbenchHost?.();
|
|
3287
|
-
d !== void 0 &&
|
|
3335
|
+
d !== void 0 && xn(d, J(e, t, "workbench")), e.dataFlowScrollSync.bind(t), kn(t, i.dataState), ze(t, i.dataState), r !== void 0 && t.querySelector(`[data-data-entry="${r}"]`)?.focus({ preventScroll: !0 });
|
|
3288
3336
|
}
|
|
3289
|
-
function
|
|
3337
|
+
function Vr(e) {
|
|
3290
3338
|
let t = e.state.panel;
|
|
3291
3339
|
if (t === void 0) return;
|
|
3292
3340
|
let n = J(e, t, "inspector");
|
|
3293
|
-
|
|
3341
|
+
er(t, yr(n)), $n(t, K(n));
|
|
3294
3342
|
}
|
|
3295
|
-
function
|
|
3343
|
+
function Hr(e) {
|
|
3296
3344
|
let t = e.getRootNode()?.activeElement;
|
|
3297
3345
|
if (t != null && t !== e) return t.closest("[data-data-entry]")?.dataset.dataEntry;
|
|
3298
3346
|
}
|
|
3299
|
-
function
|
|
3347
|
+
function Ur(e) {
|
|
3300
3348
|
let t = e.currentComponent()?.dataSource ?? null, n = t !== null || e.state.mode !== "none";
|
|
3301
3349
|
if (!n) return { configured: !1 };
|
|
3302
|
-
let r =
|
|
3350
|
+
let r = Wr(e, t), i = e.currentComponent()?.status.locked === !0 ? "locked" : void 0, a = e.catalogController.status === "loading" || e.state.preview.status === "loading", o = Gr(e), s = Kr(e.state.preview);
|
|
3303
3351
|
return {
|
|
3304
3352
|
configured: n,
|
|
3305
3353
|
...r === void 0 ? {} : { unavailable: r },
|
|
@@ -3309,17 +3357,17 @@ function zr(e) {
|
|
|
3309
3357
|
...s ? { empty: s } : {}
|
|
3310
3358
|
};
|
|
3311
3359
|
}
|
|
3312
|
-
function
|
|
3360
|
+
function Wr(e, t) {
|
|
3313
3361
|
let n = e.state.mode, r = t?.type === "dataset" || n === "dataset", i = t?.type === "variable" || n === "variable", a = t?.type === "host-resource" || n === "host-resource";
|
|
3314
3362
|
if (r) return e.callbacks.getCatalogPort() === void 0 ? "port-missing" : e.state.draft !== void 0 && e.state.descriptor === void 0 ? "instance-missing" : void 0;
|
|
3315
3363
|
if (i) return e.callbacks.getHostCatalogPort?.() === void 0 ? "port-missing" : void 0;
|
|
3316
3364
|
if (a) return e.callbacks.getResourcePort() === void 0 ? "port-missing" : void 0;
|
|
3317
3365
|
}
|
|
3318
|
-
function
|
|
3366
|
+
function Gr(e) {
|
|
3319
3367
|
if (e.state.preview.status === "error") return e.state.preview.message;
|
|
3320
3368
|
if (e.catalogController.status === "error") return "catalog";
|
|
3321
3369
|
}
|
|
3322
|
-
function
|
|
3370
|
+
function Kr(e) {
|
|
3323
3371
|
if (e.status !== "ready" || e.rawValue === void 0) return !1;
|
|
3324
3372
|
let t = e.rawValue;
|
|
3325
3373
|
if (typeof t != "object" || !t || Array.isArray(t)) return !1;
|
|
@@ -3332,12 +3380,12 @@ function q(e, t) {
|
|
|
3332
3380
|
let r = e.callbacks.getWorkbenchHost?.();
|
|
3333
3381
|
for (let t of [n, r]) {
|
|
3334
3382
|
if (t === void 0) continue;
|
|
3335
|
-
let r = J(e, n,
|
|
3336
|
-
|
|
3383
|
+
let r = J(e, n, Qr(t, n));
|
|
3384
|
+
yn(t, r), ze(t, r.dataState), er(t, yr(r)), $n(t, K(r));
|
|
3337
3385
|
}
|
|
3338
|
-
|
|
3386
|
+
kn(n, J(e, n, "inspector").dataState), t?.();
|
|
3339
3387
|
}
|
|
3340
|
-
function
|
|
3388
|
+
function qr(e) {
|
|
3341
3389
|
let t = e.state.bindingOpenRoleId;
|
|
3342
3390
|
if (t === null) return;
|
|
3343
3391
|
e.state.bindingOpenRoleId = null;
|
|
@@ -3347,20 +3395,20 @@ function Ur(e) {
|
|
|
3347
3395
|
for (let e of r.querySelectorAll("[data-dataset-binding-menu]")) e.dataset.datasetBindingMenu === t && (e.hidden = !0, e.parentElement?.querySelector("[data-dataset-binding-trigger]")?.setAttribute("aria-expanded", "false"));
|
|
3348
3396
|
if (n === void 0) continue;
|
|
3349
3397
|
let i = r.querySelector("[data-ds-section=\"source\"]");
|
|
3350
|
-
i !== null && (i.dataset.dsContentKey = gn("source", J(e, n,
|
|
3398
|
+
i !== null && (i.dataset.dsContentKey = gn("source", J(e, n, Qr(r, n))));
|
|
3351
3399
|
}
|
|
3352
3400
|
}
|
|
3353
|
-
function
|
|
3401
|
+
function Jr(e) {
|
|
3354
3402
|
let t = e.state.panel;
|
|
3355
3403
|
if (t === void 0) return;
|
|
3356
3404
|
let n = J(e, t, "inspector"), r = [typeof t.closest == "function" ? t.closest(".properties") ?? t : t, e.callbacks.getWorkbenchHost?.()];
|
|
3357
3405
|
for (let e of r) for (let t of e?.querySelectorAll("[data-dataset-results]") ?? []) t.replaceWith(pt(n));
|
|
3358
3406
|
q(e);
|
|
3359
3407
|
}
|
|
3360
|
-
function
|
|
3408
|
+
function Yr(e) {
|
|
3361
3409
|
e.cancelPreview(), e.state.preview = N(e.state.preview.open), q(e), e.catalogController.retry();
|
|
3362
3410
|
}
|
|
3363
|
-
function
|
|
3411
|
+
function Xr(e, t) {
|
|
3364
3412
|
let n = t === "mapping" || t === "preview" ? t : "source";
|
|
3365
3413
|
if (n === e.state.activeStep) return;
|
|
3366
3414
|
e.state.activeStep = n;
|
|
@@ -3372,7 +3420,7 @@ function Kr(e, t) {
|
|
|
3372
3420
|
e.setAttribute("aria-current", t ? "step" : "false");
|
|
3373
3421
|
}
|
|
3374
3422
|
}
|
|
3375
|
-
function
|
|
3423
|
+
function Zr(e) {
|
|
3376
3424
|
let t = e.state;
|
|
3377
3425
|
if (t.mode === "static") return { valueRef: {
|
|
3378
3426
|
kind: "inline",
|
|
@@ -3385,7 +3433,7 @@ function qr(e) {
|
|
|
3385
3433
|
if (t.mode !== "dataset") return { valueRef: null };
|
|
3386
3434
|
let n = e.currentComponent();
|
|
3387
3435
|
if (n === void 0) return { valueRef: null };
|
|
3388
|
-
let r =
|
|
3436
|
+
let r = S(n.id);
|
|
3389
3437
|
return {
|
|
3390
3438
|
valueRef: {
|
|
3391
3439
|
kind: "data-source-field",
|
|
@@ -3399,11 +3447,11 @@ function qr(e) {
|
|
|
3399
3447
|
}
|
|
3400
3448
|
};
|
|
3401
3449
|
}
|
|
3402
|
-
function
|
|
3450
|
+
function Qr(e, t) {
|
|
3403
3451
|
return e === t ? "inspector" : "workbench";
|
|
3404
3452
|
}
|
|
3405
3453
|
function J(e, n, r) {
|
|
3406
|
-
let i = e.currentComponent()?.dataSource, a = e.currentComponent(), o =
|
|
3454
|
+
let i = e.currentComponent()?.dataSource, a = e.currentComponent(), o = Zr(e), s = Lr(a, o), c = e.callbacks.getDocument(), l = s?.kind === "data-source-field" ? s.dataSourceId : void 0, u = c === void 0 || l === void 0 ? void 0 : A(c).find((e) => e.id === l), d = i?.type === "host-resource" ? {
|
|
3407
3455
|
resourceType: i.resourceType,
|
|
3408
3456
|
resourceId: i.resourceId
|
|
3409
3457
|
} : u?.source.kind === "host-resource" ? {
|
|
@@ -3414,7 +3462,7 @@ function J(e, n, r) {
|
|
|
3414
3462
|
panel: n,
|
|
3415
3463
|
surface: r,
|
|
3416
3464
|
dataValue: s,
|
|
3417
|
-
instance:
|
|
3465
|
+
instance: Rr(e.callbacks.getDocument(), s, o),
|
|
3418
3466
|
datasetInstances: e.state.descriptor === void 0 ? [] : Fe(e.callbacks.getDocument(), e.state.descriptor.datasetId),
|
|
3419
3467
|
selectedDatasetInstanceId: e.state.datasetInstanceId,
|
|
3420
3468
|
groupOpenOverrides: e.state.groupOpenOverrides,
|
|
@@ -3431,8 +3479,8 @@ function J(e, n, r) {
|
|
|
3431
3479
|
e.state.descriptor?.datasetId ?? null
|
|
3432
3480
|
]),
|
|
3433
3481
|
mode: e.state.mode,
|
|
3434
|
-
availableModes:
|
|
3435
|
-
dataState:
|
|
3482
|
+
availableModes: ci(e),
|
|
3483
|
+
dataState: On(Ur(e)),
|
|
3436
3484
|
...d === void 0 ? {} : { hostResource: d },
|
|
3437
3485
|
variableSourceId: i?.type === "variable" ? i.variableId : e.state.variableSourceId,
|
|
3438
3486
|
staticDraft: e.state.staticDraft,
|
|
@@ -3460,45 +3508,45 @@ function J(e, n, r) {
|
|
|
3460
3508
|
catalogAvailable: e.callbacks.getCatalogPort() !== void 0,
|
|
3461
3509
|
resourceAvailable: e.callbacks.getCatalogPort() !== void 0,
|
|
3462
3510
|
hostResourceSelectionAvailable: e.callbacks.isHostResourceSelectionButtonVisible?.() === !0 && a !== void 0 && !("dataValue" in a) && t(e.currentEntry()?.manifest),
|
|
3463
|
-
link:
|
|
3511
|
+
link: si(e),
|
|
3464
3512
|
bindingOpenRoleId: e.state.bindingOpenRoleId,
|
|
3465
3513
|
feedback: e.state.feedbackText,
|
|
3466
|
-
dirty:
|
|
3514
|
+
dirty: ti(e, i ?? null),
|
|
3467
3515
|
canUndo: e.callbacks.canUndo?.() ?? !1,
|
|
3468
3516
|
confirmClose: e.state.confirmClose,
|
|
3469
3517
|
preview: e.state.preview,
|
|
3470
3518
|
activeStep: e.state.activeStep,
|
|
3471
3519
|
authoring: e.state.authoring,
|
|
3472
3520
|
...(() => {
|
|
3473
|
-
let t =
|
|
3521
|
+
let t = $r(e, s);
|
|
3474
3522
|
return t === void 0 ? {} : { pushDelivery: t };
|
|
3475
3523
|
})(),
|
|
3476
|
-
...
|
|
3524
|
+
...ei(e)
|
|
3477
3525
|
};
|
|
3478
3526
|
}
|
|
3479
|
-
function
|
|
3527
|
+
function $r(e, t) {
|
|
3480
3528
|
if (t?.kind !== "data-source-field") return;
|
|
3481
3529
|
let n = e.callbacks.getDocument();
|
|
3482
3530
|
if (n === void 0) return;
|
|
3483
|
-
let r =
|
|
3531
|
+
let r = A(n).find((e) => e.id === t.dataSourceId)?.source;
|
|
3484
3532
|
if (r?.kind === "host-resource") {
|
|
3485
3533
|
let t = e.callbacks.getRuntimeContributions()?.getResourceType(r.resourceType)?.delivery?.push;
|
|
3486
3534
|
return t === void 0 || typeof e.callbacks.getResourcePort()?.subscribe != "function" ? void 0 : { append: t.append === !0 };
|
|
3487
3535
|
}
|
|
3488
3536
|
if (r?.kind === "host-catalog") return typeof e.callbacks.getHostCatalogPort?.()?.subscribe == "function" ? { append: !1 } : void 0;
|
|
3489
3537
|
}
|
|
3490
|
-
function
|
|
3538
|
+
function ei(e) {
|
|
3491
3539
|
let t = e.callbacks.getOverlayHost?.();
|
|
3492
3540
|
return {
|
|
3493
3541
|
...t === void 0 ? {} : { overlayHost: t },
|
|
3494
3542
|
onSelectParameter: (t, n) => e.setParameterValueRef(t, n)
|
|
3495
3543
|
};
|
|
3496
3544
|
}
|
|
3497
|
-
function
|
|
3545
|
+
function ti(e, t) {
|
|
3498
3546
|
let n = e.state.mode;
|
|
3499
3547
|
return n === "dataset" ? e.state.draftDirty : n === "static" ? t?.type !== "static" || JSON.stringify(t.value) !== JSON.stringify(e.state.staticValue) || JSON.stringify(t.binding ?? null) !== JSON.stringify(e.state.staticBinding ?? null) || e.state.staticDraft !== JSON.stringify(e.state.staticValue, null, 2) : n === "variable" ? t?.type !== "variable" || t.variableId !== e.state.variableSourceId : !1;
|
|
3500
3548
|
}
|
|
3501
|
-
function
|
|
3549
|
+
function ni(e, t) {
|
|
3502
3550
|
let n = e.callbacks.getWorkbenchHost?.();
|
|
3503
3551
|
if (n === void 0) return;
|
|
3504
3552
|
let r = n.closest(".designer");
|
|
@@ -3508,9 +3556,9 @@ function Qr(e, t) {
|
|
|
3508
3556
|
n.hidden = !0, n.removeAttribute("role"), n.removeAttribute("aria-modal"), n.removeAttribute("tabindex"), r !== null && delete r.dataset.dataWorkbenchOpen;
|
|
3509
3557
|
return;
|
|
3510
3558
|
}
|
|
3511
|
-
n.hidden = !1, n.setAttribute("role", "dialog"), n.setAttribute("aria-modal", "true"), n.setAttribute("aria-label", i.dataSource.workbench), n.tabIndex = -1, n.appendChild(
|
|
3559
|
+
n.hidden = !1, n.setAttribute("role", "dialog"), n.setAttribute("aria-modal", "true"), n.setAttribute("aria-label", i.dataSource.workbench), n.tabIndex = -1, n.appendChild(Nr(t)), r !== null && (r.dataset.dataWorkbenchOpen = "true");
|
|
3512
3560
|
}
|
|
3513
|
-
function
|
|
3561
|
+
function ri(e, t) {
|
|
3514
3562
|
e.state.activeStep = t, t === "preview" && (e.state.preview = {
|
|
3515
3563
|
...e.state.preview,
|
|
3516
3564
|
open: !0
|
|
@@ -3521,14 +3569,14 @@ function $r(e, t) {
|
|
|
3521
3569
|
block: "start"
|
|
3522
3570
|
}), n?.focus({ preventScroll: !0 });
|
|
3523
3571
|
}
|
|
3524
|
-
function
|
|
3572
|
+
function ii(e) {
|
|
3525
3573
|
let t = e.callbacks.getWorkbenchHost?.();
|
|
3526
3574
|
(t?.querySelector("[data-dataset-action=\"close-workbench\"]") ?? t)?.focus({ preventScroll: !0 });
|
|
3527
3575
|
}
|
|
3528
|
-
function
|
|
3576
|
+
function ai(e) {
|
|
3529
3577
|
e.state.panel?.querySelector("[data-dataset-authoring-action=\"fullscreen-edit\"]")?.focus({ preventScroll: !0 });
|
|
3530
3578
|
}
|
|
3531
|
-
function
|
|
3579
|
+
function oi(e, t, n, r) {
|
|
3532
3580
|
let i = t === "dataset" ? "[data-dataset-binding-field]" : "[data-static-binding-field]", a = t === "dataset" ? "data-dataset-binding-role-id" : "data-static-binding-role", o = t === "dataset" ? "data-dataset-binding-field" : "data-static-binding-field", s = [e.callbacks.getWorkbenchHost?.(), e.state.panel];
|
|
3533
3581
|
for (let e of s) {
|
|
3534
3582
|
let t = [...e?.querySelectorAll(i) ?? []].find((e) => e.getAttribute(a) === n && e.getAttribute(o) === r);
|
|
@@ -3538,7 +3586,7 @@ function ni(e, t, n, r) {
|
|
|
3538
3586
|
}
|
|
3539
3587
|
}
|
|
3540
3588
|
}
|
|
3541
|
-
function
|
|
3589
|
+
function si(e) {
|
|
3542
3590
|
let t = e.callbacks.getCatalogPort(), n = e.state.preview, r = e.catalogController.error;
|
|
3543
3591
|
return {
|
|
3544
3592
|
catalog: t === void 0 ? { status: "unavailable" } : {
|
|
@@ -3552,16 +3600,16 @@ function ri(e) {
|
|
|
3552
3600
|
variables: e.callbacks.getHostCatalogPort?.() === void 0 ? { status: "unavailable" } : { status: "ready" }
|
|
3553
3601
|
};
|
|
3554
3602
|
}
|
|
3555
|
-
function
|
|
3603
|
+
function ci(e) {
|
|
3556
3604
|
return pe(e.currentEntry());
|
|
3557
3605
|
}
|
|
3558
|
-
function
|
|
3606
|
+
function li(e) {
|
|
3559
3607
|
return e.state.descriptor?.fields.map((e) => ({
|
|
3560
3608
|
id: e.id,
|
|
3561
3609
|
label: e.label
|
|
3562
3610
|
})) ?? [];
|
|
3563
3611
|
}
|
|
3564
|
-
function
|
|
3612
|
+
function ui(e) {
|
|
3565
3613
|
e.dataFlowScrollSync.clear();
|
|
3566
3614
|
let t = e.callbacks.getWorkbenchHost?.();
|
|
3567
3615
|
if (t !== void 0) {
|
|
@@ -3571,21 +3619,21 @@ function oi(e) {
|
|
|
3571
3619
|
}
|
|
3572
3620
|
e.state.panel = void 0, e.state.feedback = void 0;
|
|
3573
3621
|
}
|
|
3574
|
-
function
|
|
3622
|
+
function di(e, t) {
|
|
3575
3623
|
e.state.feedbackText = t, e.state.feedback !== void 0 && (e.state.feedback.textContent = t);
|
|
3576
3624
|
}
|
|
3577
|
-
function
|
|
3625
|
+
function fi(e) {
|
|
3578
3626
|
return e === "source" || e === "mapping" || e === "transform" || e === "preview" || e === "refresh";
|
|
3579
3627
|
}
|
|
3580
3628
|
//#endregion
|
|
3581
3629
|
//#region src/browser/controllers/dataset/designer-update-policy-authoring.ts
|
|
3582
|
-
var
|
|
3630
|
+
var pi = /* @__PURE__ */ new Set([
|
|
3583
3631
|
"refreshStrategy",
|
|
3584
3632
|
"refreshInterval",
|
|
3585
3633
|
"pushFallbackInterval",
|
|
3586
3634
|
"pushRetainRows"
|
|
3587
3635
|
]);
|
|
3588
|
-
function
|
|
3636
|
+
function mi(e, t, n) {
|
|
3589
3637
|
switch (e.refreshStrategy) {
|
|
3590
3638
|
case "once": return { mode: "once" };
|
|
3591
3639
|
case "manual": return { mode: "manual" };
|
|
@@ -3594,7 +3642,7 @@ function ui(e, t, n) {
|
|
|
3594
3642
|
intervalSeconds: e.refreshInterval
|
|
3595
3643
|
};
|
|
3596
3644
|
case "push": {
|
|
3597
|
-
let r =
|
|
3645
|
+
let r = hi(e, t, n), i = e.pushFallbackInterval;
|
|
3598
3646
|
return {
|
|
3599
3647
|
mode: "push",
|
|
3600
3648
|
...i === void 0 || i <= 0 ? {} : { fallbackIntervalSeconds: i },
|
|
@@ -3603,17 +3651,17 @@ function ui(e, t, n) {
|
|
|
3603
3651
|
}
|
|
3604
3652
|
}
|
|
3605
3653
|
}
|
|
3606
|
-
function
|
|
3654
|
+
function hi(e, t, n) {
|
|
3607
3655
|
let r = t?.mode === "push" ? t.retain : void 0;
|
|
3608
3656
|
return n?.append !== !0 || e.pushRetainRows === void 0 ? r : {
|
|
3609
3657
|
...r,
|
|
3610
3658
|
rows: e.pushRetainRows
|
|
3611
3659
|
};
|
|
3612
3660
|
}
|
|
3613
|
-
function
|
|
3614
|
-
return
|
|
3661
|
+
function gi(e, t) {
|
|
3662
|
+
return _i(e) === _i(t);
|
|
3615
3663
|
}
|
|
3616
|
-
function
|
|
3664
|
+
function _i(e) {
|
|
3617
3665
|
if (e === void 0 || e.mode === "manual") return "{\"mode\":\"manual\"}";
|
|
3618
3666
|
let t = e.retain;
|
|
3619
3667
|
return JSON.stringify({
|
|
@@ -3627,10 +3675,10 @@ function pi(e) {
|
|
|
3627
3675
|
}
|
|
3628
3676
|
});
|
|
3629
3677
|
}
|
|
3630
|
-
function
|
|
3678
|
+
function vi(e, t) {
|
|
3631
3679
|
let n = e?.components.find((e) => e.id === t);
|
|
3632
3680
|
if (e === void 0 || n === void 0) return { kind: "inline" };
|
|
3633
|
-
let r =
|
|
3681
|
+
let r = k(n);
|
|
3634
3682
|
if (r?.kind !== "data-source-field") return { kind: "inline" };
|
|
3635
3683
|
let i = (e.dataSources ?? []).find((e) => e.id === r.dataSourceId);
|
|
3636
3684
|
return i === void 0 ? { kind: "inline" } : i.readOnly === !0 ? {
|
|
@@ -3641,15 +3689,15 @@ function mi(e, t) {
|
|
|
3641
3689
|
instance: i
|
|
3642
3690
|
};
|
|
3643
3691
|
}
|
|
3644
|
-
function
|
|
3645
|
-
if (
|
|
3692
|
+
function yi(e, t, n, r) {
|
|
3693
|
+
if (gi(t.updatePolicy, n)) return {
|
|
3646
3694
|
ok: !0,
|
|
3647
3695
|
value: null,
|
|
3648
3696
|
diagnostics: []
|
|
3649
3697
|
};
|
|
3650
3698
|
if (n.mode === "push" && r === void 0 && t.updatePolicy?.mode !== "push") return {
|
|
3651
3699
|
ok: !1,
|
|
3652
|
-
diagnostics: [
|
|
3700
|
+
diagnostics: [bi(t.id, i.dataSource.refreshPushUnsupported)]
|
|
3653
3701
|
};
|
|
3654
3702
|
let { updatePolicy: a, ...o } = t, s = n.mode === "manual" ? o : {
|
|
3655
3703
|
...o,
|
|
@@ -3664,7 +3712,7 @@ function hi(e, t, n, r) {
|
|
|
3664
3712
|
diagnostics: []
|
|
3665
3713
|
};
|
|
3666
3714
|
}
|
|
3667
|
-
function
|
|
3715
|
+
function bi(e, t) {
|
|
3668
3716
|
return {
|
|
3669
3717
|
severity: "error",
|
|
3670
3718
|
code: "DATA_SOURCE_UPDATE_POLICY_INVALID",
|
|
@@ -3677,11 +3725,11 @@ function gi(e, t) {
|
|
|
3677
3725
|
message: t
|
|
3678
3726
|
};
|
|
3679
3727
|
}
|
|
3680
|
-
function
|
|
3681
|
-
if (e.refreshStrategy !== "manual" && e.refreshStrategy !== "push") return
|
|
3728
|
+
function xi(e) {
|
|
3729
|
+
if (e.refreshStrategy !== "manual" && e.refreshStrategy !== "push") return mi(e, void 0, void 0);
|
|
3682
3730
|
}
|
|
3683
|
-
function
|
|
3684
|
-
if (
|
|
3731
|
+
function Si(e, t, n) {
|
|
3732
|
+
if (gi(mi(e, t, n), t)) return e;
|
|
3685
3733
|
let { pushFallbackInterval: r, pushRetainRows: i, ...a } = e, o = t?.mode ?? "manual";
|
|
3686
3734
|
return {
|
|
3687
3735
|
...a,
|
|
@@ -3693,32 +3741,32 @@ function vi(e, t, n) {
|
|
|
3693
3741
|
}
|
|
3694
3742
|
//#endregion
|
|
3695
3743
|
//#region src/browser/controllers/dataset/designer-dataset-draft-controller.ts
|
|
3696
|
-
var
|
|
3697
|
-
function
|
|
3744
|
+
var Ci = 300;
|
|
3745
|
+
function wi(e) {
|
|
3698
3746
|
return P(e.state.descriptor, e.state.draft);
|
|
3699
3747
|
}
|
|
3700
|
-
function
|
|
3748
|
+
function Ti(e) {
|
|
3701
3749
|
e.state.mode === "dataset" && (e.state.clearAutoApply(), e.state.autoApplyTimer = setTimeout(() => {
|
|
3702
|
-
e.state.autoApplyTimer = void 0, !(e.state.mode !== "dataset" || !e.state.draftDirty) && (
|
|
3703
|
-
},
|
|
3750
|
+
e.state.autoApplyTimer = void 0, !(e.state.mode !== "dataset" || !e.state.draftDirty) && (wi(e) > 0 || Y(e, { auto: !0 }));
|
|
3751
|
+
}, Ci));
|
|
3704
3752
|
}
|
|
3705
|
-
function
|
|
3706
|
-
if (!
|
|
3753
|
+
function Ei(e, t) {
|
|
3754
|
+
if (!Gi(e).includes(t)) return;
|
|
3707
3755
|
if (e.state.clearAutoApply(), e.state.mode = t, e.state.groupOpenOverrides.clear(), e.state.parameterInlineMemory.clear(), e.state.activeStep = "source", e.state.workbenchOpen = !1, e.state.feedbackText = "", e.state.confirmClose = !1, t === "static" && e.currentComponent()?.dataSource?.type !== "static" && e.restoreStaticExample(), t !== "dataset") {
|
|
3708
3756
|
e.catalogController.clear(), e.renderSurface();
|
|
3709
3757
|
return;
|
|
3710
3758
|
}
|
|
3711
3759
|
let n = e.currentComponent()?.dataSource;
|
|
3712
|
-
n?.type === "dataset" && e.state.descriptor?.datasetId !== n.datasetId ? (e.state.catalogOpen = !1, e.renderSurface(),
|
|
3760
|
+
n?.type === "dataset" && e.state.descriptor?.datasetId !== n.datasetId ? (e.state.catalogOpen = !1, e.renderSurface(), Di(e, n.datasetId, { autoApply: !0 })) : (e.state.catalogOpen = e.state.descriptor === void 0, e.renderSurface()), e.catalogController.ensureList();
|
|
3713
3761
|
}
|
|
3714
|
-
async function
|
|
3715
|
-
if (!
|
|
3716
|
-
let r = e.currentComponent()?.id, i = e.currentComponent(), a =
|
|
3717
|
-
if (o === void 0 || e.currentComponent()?.id !== r || !
|
|
3762
|
+
async function Di(e, t, n = {}) {
|
|
3763
|
+
if (!Gi(e).includes("dataset")) return;
|
|
3764
|
+
let r = e.currentComponent()?.id, i = e.currentComponent(), a = ae(e.callbacks.getDocument(), i), o = await e.catalogController.describe(t);
|
|
3765
|
+
if (o === void 0 || e.currentComponent()?.id !== r || !Gi(e).includes("dataset")) return;
|
|
3718
3766
|
let s = e.currentEntry()?.manifest.dataBinding?.roles ?? [], c = a?.source.datasetId === t, l = c ? a?.instance : void 0;
|
|
3719
|
-
e.state.descriptor = o, e.state.datasetInstanceId = c ? a?.instanceId ?? null : null, e.state.draft = l !== void 0 && l.source.kind === "dataset" ?
|
|
3767
|
+
e.state.descriptor = o, e.state.datasetInstanceId = c ? a?.instanceId ?? null : null, e.state.draft = l !== void 0 && l.source.kind === "dataset" ? se(o, l, i?.dataBinding, s) : ue(o, c ? a?.source ?? null : null, s), e.state.parameterInlineMemory.clear(), e.state.mode = "dataset", e.state.catalogOpen = !1, e.state.draftDirty = zi(e), e.state.preview = N(), e.state.activeStep = "source", e.state.feedbackText = "", e.renderSurface(), n.autoApply === !0 && e.state.draftDirty && Ti(e);
|
|
3720
3768
|
}
|
|
3721
|
-
function
|
|
3769
|
+
function Oi(e, t) {
|
|
3722
3770
|
let n = e.callbacks.getDocument(), r = e.state.descriptor, i = e.state.draft;
|
|
3723
3771
|
if (n !== void 0 && r !== void 0 && i !== void 0) {
|
|
3724
3772
|
if (t === null) e.state.datasetInstanceId = null;
|
|
@@ -3730,7 +3778,7 @@ function wi(e, t) {
|
|
|
3730
3778
|
params: { ...a.params }
|
|
3731
3779
|
};
|
|
3732
3780
|
}
|
|
3733
|
-
e.state.feedbackText = "", e.state.draftDirty =
|
|
3781
|
+
e.state.feedbackText = "", e.state.draftDirty = zi(e), e.renderSurface(), Y(e);
|
|
3734
3782
|
}
|
|
3735
3783
|
}
|
|
3736
3784
|
function Y(e, t = {}) {
|
|
@@ -3750,7 +3798,7 @@ function Y(e, t = {}) {
|
|
|
3750
3798
|
e.setFeedback(i.dataset.incomplete);
|
|
3751
3799
|
return;
|
|
3752
3800
|
}
|
|
3753
|
-
let s =
|
|
3801
|
+
let s = xi(e.state.authoring);
|
|
3754
3802
|
a = _e({
|
|
3755
3803
|
document: r,
|
|
3756
3804
|
componentId: n.id,
|
|
@@ -3770,18 +3818,18 @@ function Y(e, t = {}) {
|
|
|
3770
3818
|
e.callbacks.report(o.diagnostics);
|
|
3771
3819
|
return;
|
|
3772
3820
|
}
|
|
3773
|
-
let s = o.value.components.find((e) => e.id === n.id), c = s === void 0 ? null :
|
|
3821
|
+
let s = o.value.components.find((e) => e.id === n.id), c = s === void 0 ? null : k(s);
|
|
3774
3822
|
e.state.datasetInstanceId = c?.kind === "data-source-field" ? c.dataSourceId : null, t.auto !== !0 && e.setFeedback(""), e.state.draftDirty = !1, e.state.confirmClose = !1, e.state.activeStep = "source", e.renderSurface();
|
|
3775
3823
|
}
|
|
3776
|
-
function
|
|
3777
|
-
let t = e.currentComponent(), n = t?.id ?? null, r = e.callbacks.getDocument(), i =
|
|
3778
|
-
if (n === e.state.focusedComponentId &&
|
|
3824
|
+
function ki(e) {
|
|
3825
|
+
let t = e.currentComponent(), n = t?.id ?? null, r = e.callbacks.getDocument(), i = ae(r, t), a = oe(r, t), o = i?.source ?? a?.source ?? t?.dataSource, s = i?.instanceId ?? a?.instanceId ?? null;
|
|
3826
|
+
if (n === e.state.focusedComponentId && Ki(o, e.state.syncedDataSource) && s === e.state.syncedInstanceId) {
|
|
3779
3827
|
e.state.syncedDataSource = o, e.state.syncedInstanceId = s, e.state.datasetInstanceId = s;
|
|
3780
|
-
let i =
|
|
3781
|
-
i.kind !== "inline" && (e.state.authoring =
|
|
3828
|
+
let i = vi(r, n);
|
|
3829
|
+
i.kind !== "inline" && (e.state.authoring = Si(e.state.authoring, i.instance.updatePolicy, $r(e, t === void 0 ? null : k(t))));
|
|
3782
3830
|
return;
|
|
3783
3831
|
}
|
|
3784
|
-
let c = n === e.state.focusedComponentId, l = c ? e.state.activeStep : "source", u = c ? e.state.authoring : Ne(t === void 0 ? void 0 : Pe(r,
|
|
3832
|
+
let c = n === e.state.focusedComponentId, l = c ? e.state.activeStep : "source", u = c ? e.state.authoring : Ne(t === void 0 ? void 0 : Pe(r, k(t))?.updatePolicy);
|
|
3785
3833
|
if (e.state.focusedComponentId = n, e.state.clearAutoApply(), e.state.syncedDataSource = o, e.state.syncedInstanceId = s, e.state.datasetInstanceId = s, e.state.feedbackText = "", e.state.draftDirty = !1, e.state.confirmClose = !1, c || (e.state.workbenchOpen = !1), e.cancelPreview(), e.state.preview = N(), e.state.activeStep = l, e.state.authoring = u, o?.type === "static") {
|
|
3786
3834
|
e.state.mode = "static", e.state.staticDraft = JSON.stringify(o.value, null, 2), e.state.staticValue = o.value, e.state.staticBinding = o.binding, e.state.staticPage = 0, e.state.descriptor = void 0, e.state.draft = void 0, e.state.catalogOpen = !1;
|
|
3787
3835
|
return;
|
|
@@ -3791,13 +3839,13 @@ function Ti(e) {
|
|
|
3791
3839
|
return;
|
|
3792
3840
|
}
|
|
3793
3841
|
if (o?.type === "dataset") {
|
|
3794
|
-
if (e.state.mode = "dataset", e.state.catalogOpen = !1, !
|
|
3842
|
+
if (e.state.mode = "dataset", e.state.catalogOpen = !1, !Gi(e).includes("dataset")) {
|
|
3795
3843
|
e.state.descriptor = void 0, e.state.draft = void 0;
|
|
3796
3844
|
return;
|
|
3797
3845
|
}
|
|
3798
3846
|
if (e.state.descriptor?.datasetId === o.datasetId) {
|
|
3799
3847
|
let n = e.currentEntry()?.manifest.dataBinding?.roles ?? [];
|
|
3800
|
-
e.state.draft = i?.instance !== void 0 && i.instance.source.kind === "dataset" ?
|
|
3848
|
+
e.state.draft = i?.instance !== void 0 && i.instance.source.kind === "dataset" ? se(e.state.descriptor, i.instance, t?.dataBinding, n) : ue(e.state.descriptor, o, n);
|
|
3801
3849
|
return;
|
|
3802
3850
|
}
|
|
3803
3851
|
return e.state.descriptor = void 0, e.state.draft = void 0, { datasetId: o.datasetId };
|
|
@@ -3808,11 +3856,11 @@ function Ti(e) {
|
|
|
3808
3856
|
}
|
|
3809
3857
|
e.state.mode = "none", e.state.variableSourceId = "", e.state.descriptor = void 0, e.state.draft = void 0, e.state.catalogOpen = !1;
|
|
3810
3858
|
}
|
|
3811
|
-
function
|
|
3859
|
+
function Ai(e, t) {
|
|
3812
3860
|
let n = e.currentEntry()?.manifest.dataBinding?.roles.find((e) => e.id === t.dataset.datasetBindingRoleId), r = t.dataset.datasetBindingField;
|
|
3813
3861
|
e.state.draft !== void 0 && n !== void 0 && r !== void 0 && (e.state.draft = he(e.state.draft, n, r), X(e, ["source", "preview"], () => e.restoreBindingFieldFocus("dataset", n.id, r)));
|
|
3814
3862
|
}
|
|
3815
|
-
function
|
|
3863
|
+
function ji(e, t) {
|
|
3816
3864
|
let n = e.currentEntry()?.manifest.dataBinding?.roles.find((e) => e.id === t.dataset.datasetBindingRoleId);
|
|
3817
3865
|
if (e.state.draft === void 0 || e.state.descriptor === void 0 || n === void 0) return;
|
|
3818
3866
|
let r = e.state.descriptor.fields.filter((e) => n.valueTypes.includes(e.valueType)).slice(0, n.maxFields).map((e) => e.id);
|
|
@@ -3824,7 +3872,7 @@ function Di(e, t) {
|
|
|
3824
3872
|
}
|
|
3825
3873
|
}, X(e);
|
|
3826
3874
|
}
|
|
3827
|
-
function
|
|
3875
|
+
function Mi(e) {
|
|
3828
3876
|
let t = e.state.descriptor;
|
|
3829
3877
|
if (e.state.draft === void 0 || t === void 0) return;
|
|
3830
3878
|
let n = de(t, e.currentEntry()?.manifest.dataBinding?.roles ?? []);
|
|
@@ -3833,7 +3881,7 @@ function Oi(e) {
|
|
|
3833
3881
|
fields: n
|
|
3834
3882
|
}, X(e);
|
|
3835
3883
|
}
|
|
3836
|
-
function
|
|
3884
|
+
function Ni(e, t, n) {
|
|
3837
3885
|
if (t === "" || e.state.draft === void 0) return;
|
|
3838
3886
|
let r = e.state.draft.params[t];
|
|
3839
3887
|
r?.kind === "inline" && e.state.parameterInlineMemory.set(t, r.value);
|
|
@@ -3841,23 +3889,23 @@ function ki(e, t, n) {
|
|
|
3841
3889
|
kind: "inline",
|
|
3842
3890
|
value: i === void 0 ? Ee(e.state.descriptor, t) : i
|
|
3843
3891
|
} : n;
|
|
3844
|
-
|
|
3892
|
+
Ui(r, a) || (e.state.draft = me(e.state.draft, t, a), X(e, ["source", "preview"], () => Ri(e, a.kind === "inline" ? `[data-value-ref-inline="parameter:${t}"]` : `[data-value-ref-trigger="parameter:${t}"]`, a.kind === "inline" ? "caret-end" : "keep")));
|
|
3845
3893
|
}
|
|
3846
|
-
function
|
|
3894
|
+
function Pi(e, t) {
|
|
3847
3895
|
let n = t.dataset.valueRefInline;
|
|
3848
3896
|
if (n === void 0 || e.state.draft === void 0 || e.state.descriptor === void 0) return;
|
|
3849
|
-
let r =
|
|
3897
|
+
let r = Fi(n), i = e.state.descriptor.parameters.find((e) => e.name === r);
|
|
3850
3898
|
if (i === void 0) return;
|
|
3851
3899
|
let a = fe(t, i);
|
|
3852
3900
|
a !== void 0 && (e.state.draft = me(e.state.draft, r, {
|
|
3853
3901
|
kind: "inline",
|
|
3854
3902
|
value: a
|
|
3855
|
-
}), X(e, ["source", "preview"], () =>
|
|
3903
|
+
}), X(e, ["source", "preview"], () => Ri(e, `[data-value-ref-inline="${n}"]`, "caret-end"), { deferSurfaceWhilePickerOpen: !0 }));
|
|
3856
3904
|
}
|
|
3857
|
-
function
|
|
3905
|
+
function Fi(e) {
|
|
3858
3906
|
return e.startsWith("parameter:") ? e.slice(10) : e;
|
|
3859
3907
|
}
|
|
3860
|
-
function
|
|
3908
|
+
function Ii(e, t) {
|
|
3861
3909
|
let n = t.dataset.datasetBindingRole;
|
|
3862
3910
|
if (n === void 0 || e.state.draft === void 0) return;
|
|
3863
3911
|
let r = t.value || t.selectedOptions[0]?.value || "";
|
|
@@ -3867,66 +3915,76 @@ function Mi(e, t) {
|
|
|
3867
3915
|
...e.state.draft.fields,
|
|
3868
3916
|
[n]: r === "" ? [] : [r]
|
|
3869
3917
|
}
|
|
3870
|
-
}, X(e, ["source", "preview"], () =>
|
|
3918
|
+
}, X(e, ["source", "preview"], () => Ri(e, `[data-dataset-binding-role="${n}"]`));
|
|
3871
3919
|
}
|
|
3872
|
-
function X(e, t = ["source", "preview"], n) {
|
|
3873
|
-
e.state.draftDirty =
|
|
3920
|
+
function X(e, t = ["source", "preview"], n, r = {}) {
|
|
3921
|
+
if (e.state.draftDirty = zi(e), e.state.confirmClose = !1, e.state.preview = {
|
|
3874
3922
|
...N(e.state.preview.open),
|
|
3875
3923
|
tab: e.state.preview.tab
|
|
3876
|
-
},
|
|
3924
|
+
}, r.deferSurfaceWhilePickerOpen === !0 && Li(e)) {
|
|
3925
|
+
e.state.clearAutoApply(), Vr(e);
|
|
3926
|
+
return;
|
|
3927
|
+
}
|
|
3928
|
+
q(e, n), e.state.mode === "dataset" && Ti(e);
|
|
3929
|
+
}
|
|
3930
|
+
function Li(e) {
|
|
3931
|
+
let t = e.state.workbenchOpen ? e.callbacks.getWorkbenchHost?.() : e.state.panel;
|
|
3932
|
+
if (t == null) return !1;
|
|
3933
|
+
let n = t.getRootNode();
|
|
3934
|
+
return n.querySelector("[data-value-ref-popover]") !== null || n.activeElement?.closest("[data-dataset-parameter-mode=\"variable\"], [data-dataset-parameter-bind], [data-value-ref-trigger]") !== null;
|
|
3877
3935
|
}
|
|
3878
|
-
function
|
|
3936
|
+
function Ri(e, t, n = "keep") {
|
|
3879
3937
|
let r = (e.state.workbenchOpen ? e.callbacks.getWorkbenchHost?.() : e.state.panel)?.querySelector(t);
|
|
3880
3938
|
if (r == null || ((r.closest(".designer-select-control")?.querySelector(".designer-select-trigger") ?? r).focus({ preventScroll: !0 }), n !== "caret-end" || !(r instanceof HTMLInputElement)) || r.type === "number") return;
|
|
3881
3939
|
let i = r.value.length;
|
|
3882
3940
|
r.setSelectionRange(i, i);
|
|
3883
3941
|
}
|
|
3884
|
-
function
|
|
3885
|
-
let t = e.currentComponent(), n =
|
|
3942
|
+
function zi(e) {
|
|
3943
|
+
let t = e.currentComponent(), n = ae(e.callbacks.getDocument(), t), r = n?.source ?? t?.dataSource, i = e.state.draft;
|
|
3886
3944
|
if (r?.type !== "dataset" || i === void 0) return i !== void 0;
|
|
3887
3945
|
if (r.datasetId !== i.datasetId) return !0;
|
|
3888
3946
|
let a = (e.currentEntry()?.manifest.dataBinding?.roles ?? []).length === 0 ? null : { fields: i.fields };
|
|
3889
|
-
return !(n?.instance === void 0 ?
|
|
3947
|
+
return !(n?.instance === void 0 ? Vi(r.params) === Hi(i.params) : Bi(n.instance.params) === Bi(i.params)) || JSON.stringify(t?.dataBinding ?? r.binding) !== JSON.stringify(a);
|
|
3890
3948
|
}
|
|
3891
|
-
function
|
|
3949
|
+
function Bi(e) {
|
|
3892
3950
|
return JSON.stringify(Object.keys(e).sort().map((t) => [t, e[t]]));
|
|
3893
3951
|
}
|
|
3894
|
-
function
|
|
3895
|
-
let t = Object.keys(e).sort().map((t) => [t,
|
|
3952
|
+
function Vi(e) {
|
|
3953
|
+
let t = Object.keys(e).sort().map((t) => [t, le(ce(e[t])) ?? null]);
|
|
3896
3954
|
return JSON.stringify(t);
|
|
3897
3955
|
}
|
|
3898
|
-
function
|
|
3899
|
-
let t = Object.keys(e).sort().map((t) => [t,
|
|
3956
|
+
function Hi(e) {
|
|
3957
|
+
let t = Object.keys(e).sort().map((t) => [t, le(e[t]) ?? null]);
|
|
3900
3958
|
return JSON.stringify(t);
|
|
3901
3959
|
}
|
|
3902
|
-
function
|
|
3960
|
+
function Ui(e, t) {
|
|
3903
3961
|
return e === void 0 || e.kind !== t.kind ? !1 : e.kind === "variable" && t.kind === "variable" ? e.variableId === t.variableId : e.kind === "inline" && t.kind === "inline" && JSON.stringify(e.value) === JSON.stringify(t.value);
|
|
3904
3962
|
}
|
|
3905
|
-
function
|
|
3963
|
+
function Wi(e) {
|
|
3906
3964
|
e.state.clearAutoApply();
|
|
3907
3965
|
let t = e.currentComponent()?.dataSource, n = e.state.descriptor;
|
|
3908
3966
|
t?.type === "dataset" && n !== void 0 && (e.state.draft = ue(n, t, e.currentEntry()?.manifest.dataBinding?.roles ?? [])), e.state.draftDirty = !1, e.state.parameterInlineMemory.clear(), e.cancelPreview(), e.state.preview = N();
|
|
3909
3967
|
}
|
|
3910
|
-
function
|
|
3968
|
+
function Gi(e) {
|
|
3911
3969
|
return pe(e.currentEntry()).filter((t) => t !== "dataset" || e.callbacks.getCatalogPort() !== void 0);
|
|
3912
3970
|
}
|
|
3913
|
-
function
|
|
3971
|
+
function Ki(e, t) {
|
|
3914
3972
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
3915
3973
|
}
|
|
3916
|
-
function
|
|
3974
|
+
function qi(e) {
|
|
3917
3975
|
let t = e.callbacks.getDocument(), n = e.currentComponent();
|
|
3918
3976
|
if (t === void 0 || n === void 0) return;
|
|
3919
|
-
let r =
|
|
3977
|
+
let r = vi(t, n.id);
|
|
3920
3978
|
if (r.kind === "inline") {
|
|
3921
3979
|
e.setFeedback(i.dataSource.refreshPolicyPendingApply);
|
|
3922
3980
|
return;
|
|
3923
3981
|
}
|
|
3924
3982
|
if (r.kind === "read-only") {
|
|
3925
|
-
e.setFeedback(i.dataSource.refreshPolicyReadOnly), e.state.authoring =
|
|
3983
|
+
e.setFeedback(i.dataSource.refreshPolicyReadOnly), e.state.authoring = Si(e.state.authoring, r.instance.updatePolicy, void 0);
|
|
3926
3984
|
return;
|
|
3927
3985
|
}
|
|
3928
|
-
let a =
|
|
3929
|
-
e.state.authoring =
|
|
3986
|
+
let a = $r(e, k(n)), o = mi(e.state.authoring, r.instance.updatePolicy, a), s = yi(t, r.instance, o, a), c = () => {
|
|
3987
|
+
e.state.authoring = Si(e.state.authoring, r.instance.updatePolicy, a);
|
|
3930
3988
|
};
|
|
3931
3989
|
if (!s.ok) {
|
|
3932
3990
|
e.callbacks.report(s.diagnostics), e.setFeedback(s.diagnostics[0]?.message ?? ""), c();
|
|
@@ -3938,13 +3996,13 @@ function Hi(e) {
|
|
|
3938
3996
|
}
|
|
3939
3997
|
//#endregion
|
|
3940
3998
|
//#region src/browser/controllers/dataset/designer-dataset-preview-controller.ts
|
|
3941
|
-
function
|
|
3999
|
+
function Ji(e, t) {
|
|
3942
4000
|
e.state.preview = {
|
|
3943
4001
|
...e.state.preview,
|
|
3944
4002
|
tab: t
|
|
3945
4003
|
}, q(e);
|
|
3946
4004
|
}
|
|
3947
|
-
async function
|
|
4005
|
+
async function Yi(e) {
|
|
3948
4006
|
let t = e.state.descriptor, n = e.state.draft, r = e.currentComponent(), a = e.callbacks.getCatalogPort();
|
|
3949
4007
|
if (t === void 0 || n === void 0 || r === void 0 || a === void 0) return;
|
|
3950
4008
|
e.cancelPreview();
|
|
@@ -3970,12 +4028,12 @@ async function Wi(e) {
|
|
|
3970
4028
|
e.callbacks.report(t.diagnostics), Z(e);
|
|
3971
4029
|
return;
|
|
3972
4030
|
}
|
|
3973
|
-
let c =
|
|
4031
|
+
let c = w(t.value);
|
|
3974
4032
|
if (!c.ok || c.value.datasetId !== n.datasetId) {
|
|
3975
4033
|
Z(e);
|
|
3976
4034
|
return;
|
|
3977
4035
|
}
|
|
3978
|
-
let u = await Promise.race([
|
|
4036
|
+
let u = await Promise.race([Xi(e, n, o), l]);
|
|
3979
4037
|
if (o.signal.aborted || s !== e.state.previewGeneration) return;
|
|
3980
4038
|
if (u === void 0) {
|
|
3981
4039
|
e.state.previewController = void 0, e.state.preview = {
|
|
@@ -3985,13 +4043,13 @@ async function Wi(e) {
|
|
|
3985
4043
|
}, e.state.feedbackText = e.state.preview.message, e.renderSurface();
|
|
3986
4044
|
return;
|
|
3987
4045
|
}
|
|
3988
|
-
let d =
|
|
4046
|
+
let d = C(c.value.parameters, u);
|
|
3989
4047
|
if (!d.ok) {
|
|
3990
4048
|
Z(e);
|
|
3991
4049
|
return;
|
|
3992
4050
|
}
|
|
3993
4051
|
let f = Date.now(), p = await Promise.race([a.query({
|
|
3994
|
-
dataSourceId:
|
|
4052
|
+
dataSourceId: ea(r),
|
|
3995
4053
|
datasetId: n.datasetId,
|
|
3996
4054
|
params: d.value
|
|
3997
4055
|
}, { signal: o.signal }), l]);
|
|
@@ -4000,12 +4058,12 @@ async function Wi(e) {
|
|
|
4000
4058
|
e.callbacks.report(p.diagnostics), Z(e);
|
|
4001
4059
|
return;
|
|
4002
4060
|
}
|
|
4003
|
-
let m =
|
|
4061
|
+
let m = E(p.value, { maxBytes: 1048576 });
|
|
4004
4062
|
if (!m.ok) {
|
|
4005
4063
|
e.callbacks.report(m.diagnostics), Z(e);
|
|
4006
4064
|
return;
|
|
4007
4065
|
}
|
|
4008
|
-
let h =
|
|
4066
|
+
let h = Zi(e, m.value);
|
|
4009
4067
|
if (!h.ok) {
|
|
4010
4068
|
e.callbacks.report(h.diagnostics), Z(e);
|
|
4011
4069
|
return;
|
|
@@ -4015,7 +4073,7 @@ async function Wi(e) {
|
|
|
4015
4073
|
tab: e.state.preview.tab,
|
|
4016
4074
|
rawValue: m.value,
|
|
4017
4075
|
consumerValue: h.value,
|
|
4018
|
-
message: i.dataSource.testReadyWithDuration(
|
|
4076
|
+
message: i.dataSource.testReadyWithDuration(ta(m.value), Math.max(0, Date.now() - f)),
|
|
4019
4077
|
testedAt: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
|
|
4020
4078
|
open: !0
|
|
4021
4079
|
}, e.state.feedbackText = "", e.renderSurface();
|
|
@@ -4025,7 +4083,7 @@ async function Wi(e) {
|
|
|
4025
4083
|
c !== void 0 && clearTimeout(c);
|
|
4026
4084
|
}
|
|
4027
4085
|
}
|
|
4028
|
-
async function
|
|
4086
|
+
async function Xi(e, t, n) {
|
|
4029
4087
|
let r = {}, i = e.callbacks.getDocument(), a = /* @__PURE__ */ new Map();
|
|
4030
4088
|
for (let [e, n] of Object.entries(t.params)) {
|
|
4031
4089
|
if (n.kind === "inline") {
|
|
@@ -4063,7 +4121,7 @@ async function Gi(e, t, n) {
|
|
|
4063
4121
|
let l = /* @__PURE__ */ new Map();
|
|
4064
4122
|
for (let { variable: e, result: t } of i) {
|
|
4065
4123
|
if (!t.ok) return;
|
|
4066
|
-
let n =
|
|
4124
|
+
let n = E(t.value, { maxBytes: 1048576 });
|
|
4067
4125
|
if (!n.ok) return;
|
|
4068
4126
|
l.set(e.id, n.value);
|
|
4069
4127
|
}
|
|
@@ -4079,14 +4137,14 @@ async function Gi(e, t, n) {
|
|
|
4079
4137
|
}
|
|
4080
4138
|
return r;
|
|
4081
4139
|
}
|
|
4082
|
-
function
|
|
4140
|
+
function Zi(e, t) {
|
|
4083
4141
|
let n = e.currentEntry(), r = n?.manifest.dataBinding?.roles ?? [];
|
|
4084
4142
|
if (r.length === 0 || n?.tabularDataAdapter === void 0) return {
|
|
4085
4143
|
ok: !0,
|
|
4086
4144
|
value: t,
|
|
4087
4145
|
diagnostics: []
|
|
4088
4146
|
};
|
|
4089
|
-
let a =
|
|
4147
|
+
let a = D(t);
|
|
4090
4148
|
if (!a.ok) return a;
|
|
4091
4149
|
let o = b({ fields: e.state.draft?.fields ?? {} }, a.value.fields, r);
|
|
4092
4150
|
if (!o.ok) return o;
|
|
@@ -4095,7 +4153,7 @@ function Ki(e, t) {
|
|
|
4095
4153
|
dataset: a.value,
|
|
4096
4154
|
fields: o.value.fields
|
|
4097
4155
|
});
|
|
4098
|
-
return e.ok ?
|
|
4156
|
+
return e.ok ? E(e.value, { maxBytes: 1048576 }) : e;
|
|
4099
4157
|
} catch {
|
|
4100
4158
|
return {
|
|
4101
4159
|
ok: !1,
|
|
@@ -4115,10 +4173,10 @@ function Z(e) {
|
|
|
4115
4173
|
message: i.dataSource.testFailed
|
|
4116
4174
|
}, e.state.feedbackText = e.state.preview.message, e.renderSurface();
|
|
4117
4175
|
}
|
|
4118
|
-
function
|
|
4176
|
+
function Qi(e) {
|
|
4119
4177
|
e.state.previewGeneration++, e.state.previewController?.abort(), e.state.previewController = void 0;
|
|
4120
4178
|
}
|
|
4121
|
-
async function
|
|
4179
|
+
async function $i(e) {
|
|
4122
4180
|
let t = e.state.preview.rawValue;
|
|
4123
4181
|
if (e.callbacks.requestAuthoringAction?.("copy-data", { value: JSON.stringify(t ?? null) }), t === void 0) {
|
|
4124
4182
|
e.setFeedback(i.dataSource.copyDataUnavailable);
|
|
@@ -4132,11 +4190,11 @@ async function Ji(e) {
|
|
|
4132
4190
|
}
|
|
4133
4191
|
e.setFeedback(n ? i.dataSource.copyDataSuccess : i.dataSource.copyDataFailed);
|
|
4134
4192
|
}
|
|
4135
|
-
function
|
|
4136
|
-
let t =
|
|
4193
|
+
function ea(e) {
|
|
4194
|
+
let t = k(e);
|
|
4137
4195
|
return t?.kind === "data-source-field" ? t.dataSourceId : e.id;
|
|
4138
4196
|
}
|
|
4139
|
-
function
|
|
4197
|
+
function ta(e) {
|
|
4140
4198
|
if (Array.isArray(e)) return e.length;
|
|
4141
4199
|
if (typeof e == "object" && e && !Array.isArray(e)) {
|
|
4142
4200
|
let t = e.rows;
|
|
@@ -4146,10 +4204,10 @@ function Xi(e) {
|
|
|
4146
4204
|
}
|
|
4147
4205
|
//#endregion
|
|
4148
4206
|
//#region src/browser/controllers/dataset/designer-static-cell.ts
|
|
4149
|
-
function
|
|
4207
|
+
function na(e, t, n) {
|
|
4150
4208
|
let r = e.trim();
|
|
4151
4209
|
if (r === "") return n ? null : void 0;
|
|
4152
|
-
if (t === "string" || t === "date") return t === "date" && !
|
|
4210
|
+
if (t === "string" || t === "date") return t === "date" && !ra(r) ? void 0 : e;
|
|
4153
4211
|
if (t === "number") {
|
|
4154
4212
|
let e = Number(r);
|
|
4155
4213
|
return Number.isFinite(e) ? e : void 0;
|
|
@@ -4157,35 +4215,35 @@ function Zi(e, t, n) {
|
|
|
4157
4215
|
if (/^true$/i.test(r)) return !0;
|
|
4158
4216
|
if (/^false$/i.test(r)) return !1;
|
|
4159
4217
|
}
|
|
4160
|
-
function
|
|
4218
|
+
function ra(e) {
|
|
4161
4219
|
return /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,3})?)?(?:Z|[+-]\d{2}:\d{2})?)?$/.test(e) && Number.isFinite(Date.parse(e));
|
|
4162
4220
|
}
|
|
4163
4221
|
//#endregion
|
|
4164
4222
|
//#region src/browser/controllers/dataset/designer-static-table-controller.ts
|
|
4165
|
-
function
|
|
4223
|
+
function ia(e, t) {
|
|
4166
4224
|
e.state.staticValue = t, e.state.staticDraft = JSON.stringify(t, null, 2), e.setFeedback("");
|
|
4167
4225
|
}
|
|
4168
4226
|
function Q(e) {
|
|
4169
|
-
let t =
|
|
4227
|
+
let t = D(e.state.staticValue);
|
|
4170
4228
|
return t.ok ? t.value : void 0;
|
|
4171
4229
|
}
|
|
4172
|
-
function
|
|
4173
|
-
let r =
|
|
4230
|
+
function aa(e, t, n = !0) {
|
|
4231
|
+
let r = D(t);
|
|
4174
4232
|
if (!r.ok) {
|
|
4175
|
-
e.callbacks.report(r.diagnostics), e.setFeedback(
|
|
4233
|
+
e.callbacks.report(r.diagnostics), e.setFeedback(fa(e, r.diagnostics[0]));
|
|
4176
4234
|
return;
|
|
4177
4235
|
}
|
|
4178
|
-
e.state.staticValue = r.value, e.state.staticDraft = JSON.stringify(r.value, null, 2), e.state.staticPage = je(r.value.rows.length, e.state.staticPage, e.state.staticPageSize).page, e.setFeedback(""), n ? e.renderSurface() :
|
|
4236
|
+
e.state.staticValue = r.value, e.state.staticDraft = JSON.stringify(r.value, null, 2), e.state.staticPage = je(r.value.rows.length, e.state.staticPage, e.state.staticPageSize).page, e.setFeedback(""), n ? e.renderSurface() : sa(e, r.value);
|
|
4179
4237
|
}
|
|
4180
|
-
function
|
|
4238
|
+
function oa(e, t, n, r, a = !0) {
|
|
4181
4239
|
let o = Q(e), s = o?.fields.find((e) => e.id === n), c = o?.rows[t];
|
|
4182
4240
|
if (o === void 0 || s === void 0 || c === void 0) return;
|
|
4183
|
-
let l =
|
|
4241
|
+
let l = na(r, s.valueType, s.nullable === !0);
|
|
4184
4242
|
if (l === void 0) {
|
|
4185
4243
|
e.setFeedback(`rows.${t}.${n}:${i.panel.enterValidValue}`);
|
|
4186
4244
|
return;
|
|
4187
4245
|
}
|
|
4188
|
-
|
|
4246
|
+
aa(e, {
|
|
4189
4247
|
fields: o.fields,
|
|
4190
4248
|
rows: o.rows.map((e, r) => r === t ? {
|
|
4191
4249
|
...e,
|
|
@@ -4193,53 +4251,53 @@ function ta(e, t, n, r, a = !0) {
|
|
|
4193
4251
|
} : e)
|
|
4194
4252
|
}, a);
|
|
4195
4253
|
}
|
|
4196
|
-
function
|
|
4254
|
+
function sa(e, t) {
|
|
4197
4255
|
let n = JSON.stringify(t.rows.slice(0, 8), null, 2), r = [e.state.panel, e.callbacks.getWorkbenchHost?.()];
|
|
4198
4256
|
for (let e of r) for (let t of e?.querySelectorAll("[data-static-preview-value]") ?? []) t.textContent = n;
|
|
4199
4257
|
}
|
|
4200
|
-
function
|
|
4258
|
+
function ca(e) {
|
|
4201
4259
|
let t = Q(e);
|
|
4202
4260
|
if (t === void 0 || t.rows.length >= x) return;
|
|
4203
|
-
let n = Object.fromEntries(t.fields.map((t) => [t.id, t.nullable === !0 ? null :
|
|
4204
|
-
e.state.staticPage = Math.floor(t.rows.length / e.state.staticPageSize),
|
|
4261
|
+
let n = Object.fromEntries(t.fields.map((t) => [t.id, t.nullable === !0 ? null : da(e, t.valueType)]));
|
|
4262
|
+
e.state.staticPage = Math.floor(t.rows.length / e.state.staticPageSize), aa(e, {
|
|
4205
4263
|
fields: t.fields,
|
|
4206
4264
|
rows: [...t.rows, n]
|
|
4207
4265
|
});
|
|
4208
4266
|
}
|
|
4209
|
-
function
|
|
4267
|
+
function la(e, t) {
|
|
4210
4268
|
let n = Q(e);
|
|
4211
|
-
n !== void 0 && n.rows[t] !== void 0 &&
|
|
4269
|
+
n !== void 0 && n.rows[t] !== void 0 && aa(e, {
|
|
4212
4270
|
fields: n.fields,
|
|
4213
4271
|
rows: n.rows.filter((e, n) => n !== t)
|
|
4214
4272
|
});
|
|
4215
4273
|
}
|
|
4216
|
-
function
|
|
4274
|
+
function ua(e, t = !0) {
|
|
4217
4275
|
let n = e.currentEntry()?.manifest, r = n?.defaultData ?? null;
|
|
4218
4276
|
e.state.staticValue = r, e.state.staticDraft = JSON.stringify(r, null, 2), e.state.staticBinding = n?.staticData?.kind === "tabular" ? n.staticData.defaultBinding : void 0, e.state.staticPage = 0, e.state.feedbackText = "", t && e.renderSurface();
|
|
4219
4277
|
}
|
|
4220
|
-
function
|
|
4278
|
+
function da(e, t) {
|
|
4221
4279
|
return t === "number" ? 0 : t === "boolean" ? !1 : t === "date" ? "1970-01-01" : "";
|
|
4222
4280
|
}
|
|
4223
|
-
function
|
|
4281
|
+
function fa(e, t) {
|
|
4224
4282
|
if (t === void 0) return i.dataSource.staticInvalid;
|
|
4225
4283
|
let n = t.path.join(".");
|
|
4226
4284
|
return n === "" ? t.message : `${n}:${t.message}`;
|
|
4227
4285
|
}
|
|
4228
4286
|
//#endregion
|
|
4229
4287
|
//#region src/browser/controllers/dataset/designer-static-data-events.ts
|
|
4230
|
-
function
|
|
4231
|
-
if (t.dataset.dataSourceStatic !== void 0) return e.state.staticDraft = t.value,
|
|
4288
|
+
function pa(e, t) {
|
|
4289
|
+
if (t.dataset.dataSourceStatic !== void 0) return e.state.staticDraft = t.value, _a(e), !0;
|
|
4232
4290
|
if (t.dataset.staticScalar !== void 0) {
|
|
4233
4291
|
if (t.dataset.staticScalar === "number") {
|
|
4234
4292
|
let n = Number(t.value);
|
|
4235
4293
|
if (!Number.isFinite(n)) return !0;
|
|
4236
|
-
|
|
4237
|
-
} else t.dataset.staticScalar === "string" &&
|
|
4294
|
+
ia(e, n);
|
|
4295
|
+
} else t.dataset.staticScalar === "string" && ia(e, t.value);
|
|
4238
4296
|
return !0;
|
|
4239
4297
|
}
|
|
4240
|
-
return t.dataset.staticCellRow !== void 0 && (
|
|
4298
|
+
return t.dataset.staticCellRow !== void 0 && (oa(e, Number(t.dataset.staticCellRow), t.dataset.staticCellField ?? "", t.value, !1), !0);
|
|
4241
4299
|
}
|
|
4242
|
-
function
|
|
4300
|
+
function ma(e, t) {
|
|
4243
4301
|
let n = t.closest("[data-static-binding-field]");
|
|
4244
4302
|
if (n !== null) {
|
|
4245
4303
|
let t = e.currentEntry()?.manifest.dataBinding?.roles.find((e) => e.id === n.dataset.staticBindingRole), r = n.dataset.staticBindingField;
|
|
@@ -4253,12 +4311,12 @@ function la(e, t) {
|
|
|
4253
4311
|
return !0;
|
|
4254
4312
|
}
|
|
4255
4313
|
let r = t.closest("[data-static-action]");
|
|
4256
|
-
return r !== null && (
|
|
4314
|
+
return r !== null && (ga(e, r), !0);
|
|
4257
4315
|
}
|
|
4258
|
-
function
|
|
4259
|
-
if (t.dataset.staticScalar === "boolean" && t instanceof HTMLInputElement) return
|
|
4316
|
+
function ha(e, t) {
|
|
4317
|
+
if (t.dataset.staticScalar === "boolean" && t instanceof HTMLInputElement) return ia(e, t.checked), !0;
|
|
4260
4318
|
if (t.dataset.staticPageSize !== void 0 && t instanceof HTMLSelectElement) return e.state.staticPageSize = Ae(Number(t.value)), e.state.staticPage = 0, e.renderSurface(), !0;
|
|
4261
|
-
if (t.dataset.staticCellRow !== void 0 && t instanceof HTMLInputElement) return
|
|
4319
|
+
if (t.dataset.staticCellRow !== void 0 && t instanceof HTMLInputElement) return oa(e, Number(t.dataset.staticCellRow), t.dataset.staticCellField ?? "", t.value, !1), !0;
|
|
4262
4320
|
if (t.dataset.staticBindingRole !== void 0 && t instanceof HTMLSelectElement) {
|
|
4263
4321
|
let n = t.dataset.staticBindingRole, r = t.multiple ? [...t.selectedOptions].map((e) => e.value) : t.value === "" ? [] : [t.value];
|
|
4264
4322
|
return e.state.staticBinding = { fields: {
|
|
@@ -4268,7 +4326,7 @@ function ua(e, t) {
|
|
|
4268
4326
|
}
|
|
4269
4327
|
return !1;
|
|
4270
4328
|
}
|
|
4271
|
-
function
|
|
4329
|
+
function ga(e, t) {
|
|
4272
4330
|
let n = t.dataset.staticAction;
|
|
4273
4331
|
if (n === "apply") {
|
|
4274
4332
|
e.apply();
|
|
@@ -4279,7 +4337,7 @@ function da(e, t) {
|
|
|
4279
4337
|
return;
|
|
4280
4338
|
}
|
|
4281
4339
|
if (n === "row-add") {
|
|
4282
|
-
|
|
4340
|
+
ca(e);
|
|
4283
4341
|
return;
|
|
4284
4342
|
}
|
|
4285
4343
|
if (n === "page-previous" || n === "page-next") {
|
|
@@ -4299,9 +4357,9 @@ function da(e, t) {
|
|
|
4299
4357
|
return;
|
|
4300
4358
|
}
|
|
4301
4359
|
let r = Number(t.dataset.staticIndex);
|
|
4302
|
-
Number.isInteger(r) && n === "row-remove" &&
|
|
4360
|
+
Number.isInteger(r) && n === "row-remove" && la(e, r);
|
|
4303
4361
|
}
|
|
4304
|
-
function
|
|
4362
|
+
function _a(e) {
|
|
4305
4363
|
let t;
|
|
4306
4364
|
try {
|
|
4307
4365
|
t = JSON.parse(e.state.staticDraft);
|
|
@@ -4309,9 +4367,9 @@ function fa(e) {
|
|
|
4309
4367
|
e.setFeedback(i.dataSource.staticInvalid);
|
|
4310
4368
|
return;
|
|
4311
4369
|
}
|
|
4312
|
-
let n =
|
|
4370
|
+
let n = E(t);
|
|
4313
4371
|
if (!n.ok) {
|
|
4314
|
-
e.setFeedback(
|
|
4372
|
+
e.setFeedback(fa(e, n.diagnostics[0]));
|
|
4315
4373
|
return;
|
|
4316
4374
|
}
|
|
4317
4375
|
let r = e.currentEntry()?.manifest.staticData;
|
|
@@ -4320,9 +4378,9 @@ function fa(e) {
|
|
|
4320
4378
|
return;
|
|
4321
4379
|
}
|
|
4322
4380
|
if (r?.kind === "tabular") {
|
|
4323
|
-
let t =
|
|
4381
|
+
let t = D(n.value);
|
|
4324
4382
|
if (!t.ok) {
|
|
4325
|
-
e.setFeedback(
|
|
4383
|
+
e.setFeedback(fa(e, t.diagnostics[0]));
|
|
4326
4384
|
return;
|
|
4327
4385
|
}
|
|
4328
4386
|
e.state.staticValue = t.value;
|
|
@@ -4331,95 +4389,95 @@ function fa(e) {
|
|
|
4331
4389
|
}
|
|
4332
4390
|
//#endregion
|
|
4333
4391
|
//#region src/browser/controllers/dataset/designer-dataset-events.ts
|
|
4334
|
-
function
|
|
4335
|
-
return !(t instanceof HTMLInputElement) && !(t instanceof HTMLTextAreaElement) ? !1 :
|
|
4392
|
+
function va(e, t) {
|
|
4393
|
+
return !(t instanceof HTMLInputElement) && !(t instanceof HTMLTextAreaElement) ? !1 : pa(e, t) ? (Vr(e), !0) : t.dataset.datasetVariableQuery === void 0 ? t.dataset.sourceSheetFixed === void 0 ? t.dataset.datasetQuery !== void 0 && (e.catalogController.updateQuery(t.value), !0) : (e.state.staticDraft = t.value, Ma(e, t.value), !0) : (e.state.variableQuery = t.value, Fa(e), !0);
|
|
4336
4394
|
}
|
|
4337
|
-
function
|
|
4338
|
-
if (
|
|
4395
|
+
function ya(e, t) {
|
|
4396
|
+
if (ma(e, t)) return !0;
|
|
4339
4397
|
(t.closest("[data-value-ref-trigger]") !== null || t.closest("[data-dataset-binding-trigger]") !== null) && e.state.clearAutoApply();
|
|
4340
4398
|
let n = t.closest("[data-data-entry]");
|
|
4341
|
-
if (n !== null) return
|
|
4399
|
+
if (n !== null) return ba(e, n), !0;
|
|
4342
4400
|
let r = t.closest("[data-data-source-mode]")?.dataset.dataSourceMode;
|
|
4343
|
-
if (r !== void 0) return
|
|
4344
|
-
if (t.closest("[data-dataset-auto-match]") !== null) return
|
|
4401
|
+
if (r !== void 0) return Ei(e, r), !0;
|
|
4402
|
+
if (t.closest("[data-dataset-auto-match]") !== null) return Mi(e), !0;
|
|
4345
4403
|
let i = t.closest("[data-source-sheet-tab]");
|
|
4346
4404
|
if (i !== null) {
|
|
4347
4405
|
let t = i.dataset.sourceSheetTab;
|
|
4348
|
-
return t !== void 0 && t !== e.state.sourcePickerTab && (e.state.sourcePickerTab = t, e.state.catalogOpen = !0, e.renderSurface(),
|
|
4406
|
+
return t !== void 0 && t !== e.state.sourcePickerTab && (e.state.sourcePickerTab = t, e.state.catalogOpen = !0, e.renderSurface(), Ta(e, t)), !0;
|
|
4349
4407
|
}
|
|
4350
|
-
if (t.closest("[data-source-sheet-close]") !== null || t.classList?.contains("designer-source-sheet-layer") === !0) return
|
|
4408
|
+
if (t.closest("[data-source-sheet-close]") !== null || t.classList?.contains("designer-source-sheet-layer") === !0) return Oa(e), !0;
|
|
4351
4409
|
let a = t.closest("[data-source-sheet-variable]");
|
|
4352
|
-
if (a?.dataset.sourceSheetVariable !== void 0) return
|
|
4353
|
-
if (t.closest("[data-source-sheet-apply-fixed]") !== null) return
|
|
4354
|
-
if (t.closest("[data-source-sheet-format]") !== null) return
|
|
4355
|
-
if (t.closest("[data-dataset-change]") !== null || t.closest("[data-source-kind-change]") !== null) return
|
|
4410
|
+
if (a?.dataset.sourceSheetVariable !== void 0) return Aa(e, a.dataset.sourceSheetVariable), !0;
|
|
4411
|
+
if (t.closest("[data-source-sheet-apply-fixed]") !== null) return Na(e), !0;
|
|
4412
|
+
if (t.closest("[data-source-sheet-format]") !== null) return Pa(e), !0;
|
|
4413
|
+
if (t.closest("[data-dataset-change]") !== null || t.closest("[data-source-kind-change]") !== null) return ka(e), !0;
|
|
4356
4414
|
if (t.closest("[data-dataset-load-more]") !== null) return e.catalogController.loadMore(), !0;
|
|
4357
4415
|
let o = t.closest("[data-dataset-binding-chip-field]");
|
|
4358
4416
|
if (o !== null) {
|
|
4359
4417
|
let t = o.dataset.datasetBindingChipField, n = o.closest(".designer-bind-field")?.querySelector(`[data-dataset-binding-field="${t}"]`);
|
|
4360
|
-
return n != null &&
|
|
4418
|
+
return n != null && Ai(e, n), !0;
|
|
4361
4419
|
}
|
|
4362
4420
|
let s = t.closest("[data-dataset-binding-trigger]");
|
|
4363
4421
|
if (s !== null) {
|
|
4364
4422
|
let t = s.dataset.datasetBindingTrigger ?? null;
|
|
4365
|
-
return e.state.bindingOpenRoleId = e.state.bindingOpenRoleId === t ? null : t, q(e, () =>
|
|
4423
|
+
return e.state.bindingOpenRoleId = e.state.bindingOpenRoleId === t ? null : t, q(e, () => Ri(e, t === null ? "[data-dataset-binding-trigger]" : `[data-dataset-binding-trigger="${t}"]`)), !0;
|
|
4366
4424
|
}
|
|
4367
4425
|
let c = t.closest("[data-dataset-binding-field]");
|
|
4368
|
-
if (c !== null) return
|
|
4369
|
-
e.state.bindingOpenRoleId !== null && t.closest("[data-dataset-binding-role]")?.dataset.datasetBindingRole !== e.state.bindingOpenRoleId &&
|
|
4426
|
+
if (c !== null) return Ai(e, c), !0;
|
|
4427
|
+
e.state.bindingOpenRoleId !== null && t.closest("[data-dataset-binding-role]")?.dataset.datasetBindingRole !== e.state.bindingOpenRoleId && qr(e);
|
|
4370
4428
|
let l = t.closest("[data-dataset-binding-role-action]");
|
|
4371
|
-
if (l !== null) return
|
|
4429
|
+
if (l !== null) return ji(e, l), !0;
|
|
4372
4430
|
let u = t.closest("[data-dataset-preview-tab]")?.dataset.datasetPreviewTab;
|
|
4373
|
-
if (u === "response" || u === "consumer" || u === "request") return
|
|
4431
|
+
if (u === "response" || u === "consumer" || u === "request") return Ji(e, u), !0;
|
|
4374
4432
|
let d = t.closest("[data-workbench-step]")?.dataset.workbenchStep;
|
|
4375
|
-
if (
|
|
4433
|
+
if (fi(d)) return e.focusWorkbenchSection(d), !0;
|
|
4376
4434
|
let f = t.closest("[data-dataset-editor-mode]")?.dataset.datasetEditorMode;
|
|
4377
4435
|
if (f === "visual" || f === "code") return e.state.authoring = {
|
|
4378
4436
|
...e.state.authoring,
|
|
4379
4437
|
editorMode: f
|
|
4380
4438
|
}, f === "code" && e.callbacks.requestAuthoringAction?.("open-code-editor"), q(e), !0;
|
|
4381
4439
|
let p = t.closest("[data-dataset-authoring-action]")?.dataset.datasetAuthoringAction;
|
|
4382
|
-
return p === void 0 ?
|
|
4440
|
+
return p === void 0 ? wa(e, t) : (p === "copy-data" ? e.copyPreviewData() : p === "fullscreen-edit" ? (e.state.workbenchOpen = !0, e.state.confirmClose = !1, e.callbacks.requestAuthoringAction?.(p), e.renderSurface(), e.focusDataWorkbench()) : e.callbacks.requestAuthoringAction?.(p), !0);
|
|
4383
4441
|
}
|
|
4384
|
-
function
|
|
4442
|
+
function ba(e, t) {
|
|
4385
4443
|
let n = t.dataset.dataEntry, r = t.dataset.dataEntryMode;
|
|
4386
|
-
n !== void 0 && r !== void 0 && (!t.disabled && t.getAttribute("aria-checked") !== "true" &&
|
|
4444
|
+
n !== void 0 && r !== void 0 && (!t.disabled && t.getAttribute("aria-checked") !== "true" && Ei(e, r), xa(e, n));
|
|
4387
4445
|
}
|
|
4388
|
-
function
|
|
4446
|
+
function xa(e, t) {
|
|
4389
4447
|
e.state.panel?.querySelector(`[data-data-entry="${t}"]`)?.focus({ preventScroll: !0 });
|
|
4390
4448
|
}
|
|
4391
|
-
function
|
|
4449
|
+
function Sa(e) {
|
|
4392
4450
|
if (e === "ArrowRight" || e === "ArrowDown") return "next";
|
|
4393
4451
|
if (e === "ArrowLeft" || e === "ArrowUp") return "previous";
|
|
4394
4452
|
if (e === "Home") return "first";
|
|
4395
4453
|
if (e === "End") return "last";
|
|
4396
4454
|
}
|
|
4397
|
-
function
|
|
4455
|
+
function Ca(e, t, n) {
|
|
4398
4456
|
let r = [...t.closest("[data-data-entry-group]")?.querySelectorAll("[data-data-entry]") ?? []].filter((e) => !e.disabled), i = r.indexOf(t);
|
|
4399
4457
|
if (i === -1 || r.length === 0) return;
|
|
4400
4458
|
let a = n === "first" ? 0 : n === "last" ? r.length - 1 : (i + (n === "next" ? 1 : -1) + r.length) % r.length, o = r[Math.min(Math.max(a, 0), r.length - 1)];
|
|
4401
4459
|
if (o === void 0 || o === t) {
|
|
4402
|
-
|
|
4460
|
+
xa(e, t.dataset.dataEntry ?? "");
|
|
4403
4461
|
return;
|
|
4404
4462
|
}
|
|
4405
|
-
|
|
4463
|
+
ba(e, o);
|
|
4406
4464
|
}
|
|
4407
|
-
function
|
|
4465
|
+
function wa(e, t) {
|
|
4408
4466
|
let n = t.closest("[data-dataset-action]"), r = n?.dataset.datasetAction;
|
|
4409
4467
|
if (r === "select-step") {
|
|
4410
4468
|
e.state.confirmClose = !1;
|
|
4411
|
-
let t = n?.dataset.datasetWorkbenchTarget, r =
|
|
4469
|
+
let t = n?.dataset.datasetWorkbenchTarget, r = fi(t) ? t : "source";
|
|
4412
4470
|
return e.focusWorkbenchSection(r), r === "source" && e.state.mode === "dataset" && e.catalogController.ensureList(), !0;
|
|
4413
4471
|
}
|
|
4414
4472
|
if (r === "open-workbench") {
|
|
4415
4473
|
e.state.workbenchOpen = !0, e.state.confirmClose = !1;
|
|
4416
4474
|
let t = n?.dataset.datasetWorkbenchTarget;
|
|
4417
|
-
return e.state.activeStep =
|
|
4475
|
+
return e.state.activeStep = fi(t) ? t : "source", e.state.activeStep === "preview" && (e.state.preview = {
|
|
4418
4476
|
...e.state.preview,
|
|
4419
4477
|
open: !0
|
|
4420
4478
|
}), e.renderSurface(), e.focusDataWorkbench(), !0;
|
|
4421
4479
|
}
|
|
4422
|
-
if (r === "close-workbench") return
|
|
4480
|
+
if (r === "close-workbench") return Ia(e);
|
|
4423
4481
|
if (r === "keep-editing") return e.state.confirmClose = !1, e.renderSurface(), !0;
|
|
4424
4482
|
if (r === "discard-workbench") return e.restoreDatasetDraft(), e.state.workbenchOpen = !1, e.state.confirmClose = !1, e.renderSurface(), e.restoreFullscreenActionFocus(), !0;
|
|
4425
4483
|
if (r === "toggle-preview") return e.state.preview = {
|
|
@@ -4429,7 +4487,7 @@ function ya(e, t) {
|
|
|
4429
4487
|
if (r === "apply" || r === "sync") return e.apply(), !0;
|
|
4430
4488
|
if (r === "test") return e.testDatasetDraft(), !0;
|
|
4431
4489
|
if (r === "undo") return e.callbacks.undo?.(), !0;
|
|
4432
|
-
if (r === "retry-link") return
|
|
4490
|
+
if (r === "retry-link") return Yr(e), !0;
|
|
4433
4491
|
if (r === "select-host-resource") {
|
|
4434
4492
|
let t = e.currentComponent();
|
|
4435
4493
|
return t !== void 0 && e.callbacks.requestHostResourceSelection?.(t.id, t.type), !0;
|
|
@@ -4437,19 +4495,19 @@ function ya(e, t) {
|
|
|
4437
4495
|
if (r === "open-instance") return e.state.workbenchOpen = !0, e.state.confirmClose = !1, e.renderSurface(), e.focusDataWorkbench(), !0;
|
|
4438
4496
|
if (r === "refresh") return e.callbacks.refresh(e.callbacks.getInteraction().focusedComponentId ?? void 0), !0;
|
|
4439
4497
|
let i = t.closest("[data-dataset-resource-id]");
|
|
4440
|
-
return i?.dataset.datasetResourceId !== void 0 && (
|
|
4498
|
+
return i?.dataset.datasetResourceId !== void 0 && (Di(e, i.dataset.datasetResourceId, { autoApply: !0 }), !0);
|
|
4441
4499
|
}
|
|
4442
4500
|
function $(e) {
|
|
4443
4501
|
let t = e.state.panel?.getRootNode?.();
|
|
4444
4502
|
return typeof ShadowRoot > "u" || !(t instanceof ShadowRoot) ? null : t.querySelector("[data-source-sheet]");
|
|
4445
4503
|
}
|
|
4446
|
-
function
|
|
4504
|
+
function Ta(e, t) {
|
|
4447
4505
|
$(e)?.querySelector(`[data-source-sheet-tab="${t}"]`)?.focus({ preventScroll: !0 });
|
|
4448
4506
|
}
|
|
4449
|
-
function
|
|
4450
|
-
|
|
4507
|
+
function Ea(e) {
|
|
4508
|
+
Ta(e, e.state.sourcePickerTab);
|
|
4451
4509
|
}
|
|
4452
|
-
function
|
|
4510
|
+
function Da(e, t) {
|
|
4453
4511
|
let n = $(e)?.querySelector("[data-source-sheet]");
|
|
4454
4512
|
if (n == null) return !1;
|
|
4455
4513
|
let r = [...n.querySelectorAll("button:not(:disabled), input, textarea, select, [tabindex]:not([tabindex=\"-1\"])")].filter((e) => e.getClientRects().length > 0);
|
|
@@ -4457,34 +4515,34 @@ function Sa(e, t) {
|
|
|
4457
4515
|
let i = r[0], a = r[r.length - 1], o = n.getRootNode().activeElement, s = o !== null && n.contains(o);
|
|
4458
4516
|
return t.shiftKey && (!s || o === i) ? (t.preventDefault(), a.focus(), !0) : !t.shiftKey && (!s || o === a) && (t.preventDefault(), i.focus(), !0);
|
|
4459
4517
|
}
|
|
4460
|
-
function
|
|
4518
|
+
function Oa(e) {
|
|
4461
4519
|
if (!e.state.catalogOpen) return;
|
|
4462
4520
|
e.state.catalogOpen = !1, e.renderSurface();
|
|
4463
4521
|
let t = e.state.mode === "static" || e.state.mode === "variable" ? "[data-source-kind-change]" : "[data-dataset-change]";
|
|
4464
4522
|
e.state.panel?.querySelector(t)?.focus({ preventScroll: !0 });
|
|
4465
4523
|
}
|
|
4466
|
-
function
|
|
4467
|
-
e.state.catalogOpen = !0, e.state.sourcePickerTab = e.state.mode === "variable" ? "variable" : e.state.mode === "static" ? "fixed" : "dataset", e.renderSurface(), e.catalogController.ensureList(),
|
|
4524
|
+
function ka(e) {
|
|
4525
|
+
e.state.catalogOpen = !0, e.state.sourcePickerTab = e.state.mode === "variable" ? "variable" : e.state.mode === "static" ? "fixed" : "dataset", e.renderSurface(), e.catalogController.ensureList(), Ea(e);
|
|
4468
4526
|
}
|
|
4469
|
-
function
|
|
4470
|
-
e.state.mode !== "variable" &&
|
|
4527
|
+
function Aa(e, t) {
|
|
4528
|
+
e.state.mode !== "variable" && Ei(e, "variable"), e.state.variableSourceId = t, e.state.draftDirty = !0, e.state.catalogOpen = !1, Y(e);
|
|
4471
4529
|
}
|
|
4472
|
-
function
|
|
4530
|
+
function ja(e) {
|
|
4473
4531
|
return $(e)?.querySelector("[data-source-sheet-fixed]") ?? null;
|
|
4474
4532
|
}
|
|
4475
|
-
function
|
|
4533
|
+
function Ma(e, t) {
|
|
4476
4534
|
let n = $(e);
|
|
4477
4535
|
if (n === null) return;
|
|
4478
|
-
let r =
|
|
4536
|
+
let r = Ar(t, e.currentEntry()?.manifest.staticData), i = n.querySelector("[data-source-sheet-note]");
|
|
4479
4537
|
i !== null && (i.textContent = r.note, i.dataset.tone = r.ok ? "ok" : "error");
|
|
4480
4538
|
let a = n.querySelector("[data-source-sheet-apply-fixed]");
|
|
4481
4539
|
a !== null && (a.disabled = !r.ok);
|
|
4482
4540
|
}
|
|
4483
|
-
function
|
|
4484
|
-
let t =
|
|
4541
|
+
function Na(e) {
|
|
4542
|
+
let t = ja(e);
|
|
4485
4543
|
if (t === null) return;
|
|
4486
|
-
if (!
|
|
4487
|
-
|
|
4544
|
+
if (!Ar(t.value, e.currentEntry()?.manifest.staticData).ok) {
|
|
4545
|
+
Ma(e, t.value);
|
|
4488
4546
|
return;
|
|
4489
4547
|
}
|
|
4490
4548
|
let n = e.state.mode, r = e.currentEntry()?.manifest.staticData;
|
|
@@ -4496,15 +4554,15 @@ function Oa(e) {
|
|
|
4496
4554
|
let a = $(e)?.querySelector("[data-source-sheet-note]");
|
|
4497
4555
|
a != null && (a.textContent = e.state.feedbackText || i.dataSource.staticInvalid, a.dataset.tone = "error"), e.renderSurface();
|
|
4498
4556
|
}
|
|
4499
|
-
function
|
|
4500
|
-
let t =
|
|
4557
|
+
function Pa(e) {
|
|
4558
|
+
let t = ja(e);
|
|
4501
4559
|
if (t !== null) try {
|
|
4502
|
-
t.value = JSON.stringify(JSON.parse(t.value), null, 2), e.state.staticDraft = t.value,
|
|
4560
|
+
t.value = JSON.stringify(JSON.parse(t.value), null, 2), e.state.staticDraft = t.value, Ma(e, t.value);
|
|
4503
4561
|
} catch {
|
|
4504
|
-
|
|
4562
|
+
Ma(e, t.value);
|
|
4505
4563
|
}
|
|
4506
4564
|
}
|
|
4507
|
-
function
|
|
4565
|
+
function Fa(e) {
|
|
4508
4566
|
let t = $(e);
|
|
4509
4567
|
if (t === null) return;
|
|
4510
4568
|
let n = e.state.variableQuery.trim().toLowerCase(), r = 0;
|
|
@@ -4515,13 +4573,13 @@ function Aa(e) {
|
|
|
4515
4573
|
let i = t.querySelector("[data-source-sheet-variable-empty]");
|
|
4516
4574
|
i !== null && (i.hidden = r > 0);
|
|
4517
4575
|
}
|
|
4518
|
-
function
|
|
4576
|
+
function Ia(e) {
|
|
4519
4577
|
return e.state.mode === "dataset" && e.state.draftDirty ? (e.state.confirmClose = !0, e.renderSurface(), !0) : (e.state.workbenchOpen = !1, e.state.confirmClose = !1, e.renderSurface(), e.restoreFullscreenActionFocus(), !0);
|
|
4520
4578
|
}
|
|
4521
|
-
function
|
|
4522
|
-
return !(t instanceof HTMLInputElement) && !(t instanceof HTMLSelectElement) && !(t instanceof HTMLTextAreaElement) ? !1 : t.dataset.dataSourceModeSelect !== void 0 && t instanceof HTMLSelectElement ? (
|
|
4579
|
+
function La(e, t) {
|
|
4580
|
+
return !(t instanceof HTMLInputElement) && !(t instanceof HTMLSelectElement) && !(t instanceof HTMLTextAreaElement) ? !1 : t.dataset.dataSourceModeSelect !== void 0 && t instanceof HTMLSelectElement ? (Ei(e, t.value), !0) : t.dataset.datasetGroup !== void 0 && t instanceof HTMLSelectElement ? (e.catalogController.updateGroup(t.value || void 0), !0) : t.dataset.dataVariableSource !== void 0 && t instanceof HTMLSelectElement ? (e.state.variableSourceId = t.value, e.state.draftDirty = !0, e.renderSurface(), !0) : ha(e, t) ? (Vr(e), !0) : t.dataset.datasetAuthoringSetting === void 0 ? t.dataset.datasetInstanceSelect !== void 0 && t instanceof HTMLSelectElement ? (Oi(e, t.value === "" ? null : t.value), !0) : t.dataset.valueRefInline === void 0 ? t.dataset.datasetBindingRole !== void 0 && t instanceof HTMLSelectElement && (Ii(e, t), !0) : ((t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && Pi(e, t), !0) : (Ra(e, t.dataset.datasetAuthoringSetting, t), !0);
|
|
4523
4581
|
}
|
|
4524
|
-
function
|
|
4582
|
+
function Ra(e, t, n) {
|
|
4525
4583
|
let r;
|
|
4526
4584
|
if (t === "loadingDisabled" || t === "controlled") {
|
|
4527
4585
|
if (!(n instanceof HTMLInputElement)) return;
|
|
@@ -4562,11 +4620,11 @@ function Na(e, t, n) {
|
|
|
4562
4620
|
e.callbacks.requestAuthoringAction?.("update-settings", {
|
|
4563
4621
|
setting: t,
|
|
4564
4622
|
value: r
|
|
4565
|
-
}),
|
|
4623
|
+
}), pi.has(t) && qi(e), e.renderSurface();
|
|
4566
4624
|
}
|
|
4567
|
-
function
|
|
4568
|
-
if (t.key === "Escape" && e.state.catalogOpen) return t.preventDefault(),
|
|
4569
|
-
if (t.key === "Tab" && e.state.catalogOpen &&
|
|
4625
|
+
function za(e, t) {
|
|
4626
|
+
if (t.key === "Escape" && e.state.catalogOpen) return t.preventDefault(), Oa(e), !0;
|
|
4627
|
+
if (t.key === "Tab" && e.state.catalogOpen && Da(e, t)) return !0;
|
|
4570
4628
|
if (t.key === "Escape" && e.state.bindingOpenRoleId !== null) return t.preventDefault(), e.state.bindingOpenRoleId = null, q(e), !0;
|
|
4571
4629
|
if (t.key === "Backspace") {
|
|
4572
4630
|
let n = t.target, r = n instanceof Element ? n.closest("[data-dataset-binding-trigger]") : null;
|
|
@@ -4575,16 +4633,16 @@ function Pa(e, t) {
|
|
|
4575
4633
|
if (i !== void 0) {
|
|
4576
4634
|
t.preventDefault();
|
|
4577
4635
|
let n = i.closest(".designer-bind-field"), r = i.dataset.datasetBindingChipField, a = n?.querySelector(`[data-dataset-binding-field="${r}"]`);
|
|
4578
|
-
a != null &&
|
|
4636
|
+
a != null && Ai(e, a);
|
|
4579
4637
|
}
|
|
4580
4638
|
return !0;
|
|
4581
4639
|
}
|
|
4582
4640
|
}
|
|
4583
|
-
if (t.key === "Escape" && e.state.workbenchOpen) return t.preventDefault(), e.state.mode === "dataset" && e.state.draftDirty ? (e.state.confirmClose = !0, e.renderSurface()) :
|
|
4584
|
-
let n =
|
|
4641
|
+
if (t.key === "Escape" && e.state.workbenchOpen) return t.preventDefault(), e.state.mode === "dataset" && e.state.draftDirty ? (e.state.confirmClose = !0, e.renderSurface()) : Ia(e), !0;
|
|
4642
|
+
let n = Sa(t.key);
|
|
4585
4643
|
if (n !== void 0) {
|
|
4586
4644
|
let r = t.target instanceof Element ? t.target.closest("[data-data-entry]") : null;
|
|
4587
|
-
if (r !== null) return t.preventDefault(),
|
|
4645
|
+
if (r !== null) return t.preventDefault(), Ca(e, r, n), !0;
|
|
4588
4646
|
}
|
|
4589
4647
|
if (t.key !== "Enter" || t.isComposing) return !1;
|
|
4590
4648
|
let r = t.target;
|
|
@@ -4592,18 +4650,18 @@ function Pa(e, t) {
|
|
|
4592
4650
|
}
|
|
4593
4651
|
//#endregion
|
|
4594
4652
|
//#region src/browser/controllers/dataset/designer-dataset-controller.ts
|
|
4595
|
-
var
|
|
4653
|
+
var Ba = class {
|
|
4596
4654
|
#e = new Me();
|
|
4597
4655
|
#t;
|
|
4598
4656
|
#n;
|
|
4599
4657
|
constructor(e) {
|
|
4600
|
-
let t = new
|
|
4658
|
+
let t = new ie((e) => Xr(this.#n, e));
|
|
4601
4659
|
this.#t = new Oe({
|
|
4602
4660
|
getPort: e.getCatalogPort,
|
|
4603
4661
|
report: e.report,
|
|
4604
|
-
setFeedback: (e) =>
|
|
4662
|
+
setFeedback: (e) => di(this.#n, e),
|
|
4605
4663
|
render: () => this.renderSurface(),
|
|
4606
|
-
renderResults: () =>
|
|
4664
|
+
renderResults: () => Jr(this.#n)
|
|
4607
4665
|
}), this.#n = {
|
|
4608
4666
|
callbacks: e,
|
|
4609
4667
|
state: this.#e,
|
|
@@ -4618,27 +4676,27 @@ var Fa = class {
|
|
|
4618
4676
|
return n === void 0 ? void 0 : e.getCatalog()?.get(n.type);
|
|
4619
4677
|
},
|
|
4620
4678
|
renderSurface: () => this.renderSurface(),
|
|
4621
|
-
setFeedback: (e) =>
|
|
4622
|
-
cancelPreview: () =>
|
|
4623
|
-
restoreStaticExample: (e) =>
|
|
4679
|
+
setFeedback: (e) => di(this.#n, e),
|
|
4680
|
+
cancelPreview: () => Qi(this.#n),
|
|
4681
|
+
restoreStaticExample: (e) => ua(this.#n, e),
|
|
4624
4682
|
apply: () => Y(this.#n),
|
|
4625
|
-
restoreDatasetDraft: () =>
|
|
4626
|
-
setParameterValueRef: (e, t) =>
|
|
4627
|
-
focusWorkbenchSection: (e) =>
|
|
4628
|
-
testDatasetDraft: () =>
|
|
4629
|
-
copyPreviewData: () =>
|
|
4630
|
-
focusDataWorkbench: () =>
|
|
4631
|
-
restoreFullscreenActionFocus: () =>
|
|
4632
|
-
restoreBindingFieldFocus: (e, t, n) =>
|
|
4683
|
+
restoreDatasetDraft: () => Wi(this.#n),
|
|
4684
|
+
setParameterValueRef: (e, t) => Ni(this.#n, e, t),
|
|
4685
|
+
focusWorkbenchSection: (e) => ri(this.#n, e),
|
|
4686
|
+
testDatasetDraft: () => Yi(this.#n),
|
|
4687
|
+
copyPreviewData: () => $i(this.#n),
|
|
4688
|
+
focusDataWorkbench: () => ii(this.#n),
|
|
4689
|
+
restoreFullscreenActionFocus: () => ai(this.#n),
|
|
4690
|
+
restoreBindingFieldFocus: (e, t, n) => oi(this.#n, e, t, n)
|
|
4633
4691
|
};
|
|
4634
4692
|
}
|
|
4635
4693
|
render(e) {
|
|
4636
|
-
if (
|
|
4694
|
+
if (ui(this.#n), this.#n.currentComponent() === void 0) {
|
|
4637
4695
|
e !== void 0 && e.replaceChildren(i.dataPanelEmpty);
|
|
4638
4696
|
return;
|
|
4639
4697
|
}
|
|
4640
|
-
let t =
|
|
4641
|
-
pe(this.#n.currentEntry()).includes("dataset") || this.#t.clear(), e !== void 0 && (this.#e.panel = e, this.renderSurface(), this.#e.mode === "dataset" && (this.#t.ensureList(), t !== void 0 &&
|
|
4698
|
+
let t = ki(this.#n);
|
|
4699
|
+
pe(this.#n.currentEntry()).includes("dataset") || this.#t.clear(), e !== void 0 && (this.#e.panel = e, this.renderSurface(), this.#e.mode === "dataset" && (this.#t.ensureList(), t !== void 0 && Di(this.#n, t.datasetId)));
|
|
4642
4700
|
}
|
|
4643
4701
|
getFocusedDatasetFields() {
|
|
4644
4702
|
return this.#e.descriptor?.fields.map((e) => ({
|
|
@@ -4647,22 +4705,22 @@ var Fa = class {
|
|
|
4647
4705
|
})) ?? [];
|
|
4648
4706
|
}
|
|
4649
4707
|
clear() {
|
|
4650
|
-
this.#t.clear(),
|
|
4708
|
+
this.#t.clear(), ui(this.#n), Qi(this.#n), this.#e.reset();
|
|
4651
4709
|
}
|
|
4652
4710
|
onInput(e) {
|
|
4653
|
-
return
|
|
4711
|
+
return va(this.#n, e);
|
|
4654
4712
|
}
|
|
4655
4713
|
onClick(e) {
|
|
4656
|
-
return
|
|
4714
|
+
return ya(this.#n, e);
|
|
4657
4715
|
}
|
|
4658
4716
|
onChange(e) {
|
|
4659
|
-
return
|
|
4717
|
+
return La(this.#n, e);
|
|
4660
4718
|
}
|
|
4661
4719
|
onKeyDown(e) {
|
|
4662
|
-
return
|
|
4720
|
+
return za(this.#n, e);
|
|
4663
4721
|
}
|
|
4664
4722
|
setParameterValueRef(e, t) {
|
|
4665
|
-
|
|
4723
|
+
Ni(this.#n, e, t);
|
|
4666
4724
|
}
|
|
4667
4725
|
get descriptor() {
|
|
4668
4726
|
return this.#e.descriptor;
|
|
@@ -4674,10 +4732,10 @@ var Fa = class {
|
|
|
4674
4732
|
return this.#e.authoring;
|
|
4675
4733
|
}
|
|
4676
4734
|
renderSurface() {
|
|
4677
|
-
|
|
4735
|
+
zr(this.#n);
|
|
4678
4736
|
}
|
|
4679
4737
|
};
|
|
4680
4738
|
//#endregion
|
|
4681
|
-
export {
|
|
4739
|
+
export { Ba as DesignerDatasetController };
|
|
4682
4740
|
|
|
4683
|
-
//# sourceMappingURL=designer-dataset-controller-
|
|
4741
|
+
//# sourceMappingURL=designer-dataset-controller-DdbY4ILC.js.map
|