mlform 0.1.6 → 0.1.8
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/README.md +39 -12
- package/dist/builtins-DegwhFGA.js +3507 -0
- package/dist/builtins-ml-9qB2MOxt.js +51 -0
- package/dist/{design-system-CrrSGfFB.js → design-system-Dxx1Sh7r.js} +284 -268
- package/dist/errors-B3H1wRwj.js +8 -0
- package/dist/kit-CuRF6dhL.js +1847 -0
- package/dist/mlform/behaviors.mjs +32 -0
- package/dist/mlform/builtins-ml.mjs +3 -0
- package/dist/mlform/design-system.mjs +1 -1
- package/dist/mlform/kit.mjs +3 -3
- package/dist/mlform/presentation.mjs +2 -0
- package/dist/mlform/primitives.mjs +2 -2
- package/dist/mlform/runtime.mjs +5 -0
- package/dist/mlform/schema.mjs +102 -0
- package/dist/mlform/transport.mjs +2 -2
- package/dist/mlform.mjs +8 -4
- package/dist/presentation-CkQuYheR.js +200 -0
- package/dist/{primitives-BtI1xyZz.js → primitives-Duag8Lj0.js} +1367 -1312
- package/dist/runtime-DMjDVo0H.js +1824 -0
- package/dist/strings-CWwrrYzz.js +4 -0
- package/dist/{transport-A1RsnZhD.js → transport-CtVX8ZUT.js} +311 -336
- package/dist/types/src/behaviors/index.d.ts +3 -0
- package/dist/types/src/builtins-ml/index.d.ts +5 -0
- package/dist/types/src/design-system/runtime/fingerprint.d.ts +8 -0
- package/dist/types/src/design-system/runtime/host-observer.d.ts +1 -0
- package/dist/types/src/design-system/runtime/hydration-state.d.ts +13 -0
- package/dist/types/src/design-system/runtime/inherited-scheme.d.ts +5 -0
- package/dist/types/src/design-system/runtime/media.d.ts +19 -0
- package/dist/types/src/index.d.ts +10 -4
- package/dist/types/src/kit/accordion-root-styles.d.ts +1 -0
- package/dist/types/src/kit/accordion-root.d.ts +24 -0
- package/dist/types/src/kit/accordion.d.ts +2 -0
- package/dist/types/src/kit/constants.d.ts +29 -0
- package/dist/types/src/kit/defaults.d.ts +2 -2
- package/dist/types/src/kit/index.d.ts +6 -1
- package/dist/types/src/kit/layout-helpers.d.ts +29 -0
- package/dist/types/src/kit/layout-node-render.d.ts +18 -0
- package/dist/types/src/kit/layout-node-resolver.d.ts +3 -0
- package/dist/types/src/kit/layout-types.d.ts +124 -0
- package/dist/types/src/kit/layout-utils.d.ts +9 -0
- package/dist/types/src/kit/layout.d.ts +8 -0
- package/dist/types/src/kit/mount-types.d.ts +54 -0
- package/dist/types/src/kit/panel-nav.d.ts +9 -0
- package/dist/types/src/{questionnaire/primitives/components → kit}/step-indicator.d.ts +3 -3
- package/dist/types/src/kit/tabs-root-styles.d.ts +1 -0
- package/dist/types/src/kit/tabs-root.d.ts +24 -0
- package/dist/types/src/kit/tabs.d.ts +2 -0
- package/dist/types/src/kit/types.d.ts +4 -51
- package/dist/types/src/kit/view-layout-state.d.ts +14 -0
- package/dist/types/src/kit/view-navigation.d.ts +8 -0
- package/dist/types/src/kit/view-snapshot-cache.d.ts +14 -0
- package/dist/types/src/kit/view-snapshot.d.ts +15 -0
- package/dist/types/src/kit/view-types.d.ts +172 -0
- package/dist/types/src/kit/view.d.ts +8 -0
- package/dist/types/src/kit/wizard-constants.d.ts +19 -0
- package/dist/types/src/kit/wizard-root-styles.d.ts +1 -0
- package/dist/types/src/kit/wizard-root.d.ts +23 -0
- package/dist/types/src/kit/wizard.d.ts +2 -0
- package/dist/types/src/packs/default.d.ts +2 -0
- package/dist/types/src/packs/index.d.ts +3 -0
- package/dist/types/src/packs/ml.d.ts +2 -0
- package/dist/types/src/packs/shared.d.ts +25 -0
- package/dist/types/src/presentation/define-explanation-kind.d.ts +11 -0
- package/dist/types/src/presentation/define-field-kind.d.ts +18 -0
- package/dist/types/src/presentation/define-report-kind.d.ts +15 -0
- package/dist/types/src/presentation/index.d.ts +10 -0
- package/dist/types/src/presentation/register-kind.d.ts +6 -0
- package/dist/types/src/presentation/registry.d.ts +15 -0
- package/dist/types/src/presentation/types/explanation.d.ts +32 -0
- package/dist/types/src/presentation/types/field.d.ts +36 -0
- package/dist/types/src/presentation/types/report.d.ts +41 -0
- package/dist/types/src/primitives/base-explanation-element.d.ts +2 -1
- package/dist/types/src/primitives/base-field-element.d.ts +2 -1
- package/dist/types/src/primitives/base-report-element.d.ts +2 -1
- package/dist/types/src/primitives/components/explanation-panel.d.ts +4 -2
- package/dist/types/src/primitives/components/field-frame-feedback.d.ts +9 -0
- package/dist/types/src/primitives/components/field-frame-styles.d.ts +1 -0
- package/dist/types/src/primitives/components/field-frame.d.ts +5 -3
- package/dist/types/src/primitives/components/form-errors.d.ts +1 -1
- package/dist/types/src/primitives/components/form-root-presenters.d.ts +17 -0
- package/dist/types/src/primitives/components/form-root-state.d.ts +19 -0
- package/dist/types/src/primitives/components/form-root-styles.d.ts +1 -0
- package/dist/types/src/primitives/components/form-root-templates.d.ts +42 -0
- package/dist/types/src/primitives/components/form-root.d.ts +4 -2
- package/dist/types/src/primitives/components/presentation.d.ts +1 -1
- package/dist/types/src/primitives/components/report-frame.d.ts +4 -2
- package/dist/types/src/primitives/components/submit-button.d.ts +1 -1
- package/dist/types/src/primitives/constants.d.ts +1 -1
- package/dist/types/src/primitives/fields/series-field-helpers.d.ts +23 -0
- package/dist/types/src/primitives/fields/series-field-styles.d.ts +1 -0
- package/dist/types/src/primitives/mount-form.d.ts +1 -1
- package/dist/types/src/primitives/presentation.d.ts +8 -0
- package/dist/types/src/primitives/types.d.ts +4 -1
- package/dist/types/src/{engine → runtime}/builtins/index.d.ts +1 -3
- package/dist/types/src/{engine → runtime}/builtins/reports/classifier.d.ts +1 -1
- package/dist/types/src/{engine → runtime}/builtins/shared.d.ts +2 -0
- package/dist/types/src/runtime/declarative/presentation.d.ts +61 -0
- package/dist/types/src/runtime/fields/state-calculations.d.ts +25 -0
- package/dist/types/src/runtime/fields/state.d.ts +2 -0
- package/dist/types/src/runtime/form.d.ts +1 -0
- package/dist/types/src/runtime/index.d.ts +16 -0
- package/dist/types/src/runtime/registry/index.d.ts +5 -0
- package/dist/types/src/runtime/runtime-behaviors.d.ts +23 -0
- package/dist/types/src/runtime/runtime-controller.d.ts +34 -0
- package/dist/types/src/runtime/runtime-refresh.d.ts +14 -0
- package/dist/types/src/runtime/runtime-values.d.ts +19 -0
- package/dist/types/src/runtime/submission/create-submitter.d.ts +2 -0
- package/dist/types/src/runtime/submission/error-flow.d.ts +19 -0
- package/dist/types/src/runtime/submission/field-updates.d.ts +14 -0
- package/dist/types/src/runtime/submission/report-updates.d.ts +16 -0
- package/dist/types/src/runtime/submission/stream-progress.d.ts +4 -0
- package/dist/types/src/runtime/submission/submitter.d.ts +2 -0
- package/dist/types/src/runtime/submission/types.d.ts +60 -0
- package/dist/types/src/runtime/types/behavior.d.ts +32 -0
- package/dist/types/src/runtime/types/explanation.d.ts +22 -0
- package/dist/types/src/runtime/types/field.d.ts +24 -0
- package/dist/types/src/{engine → runtime}/types/form.d.ts +8 -11
- package/dist/types/src/runtime/types/index.d.ts +9 -0
- package/dist/types/src/runtime/types/registry.d.ts +6 -0
- package/dist/types/src/runtime/types/report.d.ts +23 -0
- package/dist/types/src/{engine → runtime}/utils.d.ts +2 -2
- package/dist/types/src/{engine/validation/field.d.ts → runtime/validation/field-state.d.ts} +3 -19
- package/dist/types/src/runtime/validation/field-validator.d.ts +18 -0
- package/dist/types/src/runtime/validation/field.d.ts +2 -0
- package/dist/types/src/schema/index.d.ts +7 -0
- package/dist/types/src/schema/normalize.d.ts +2 -0
- package/dist/types/src/schema/registry.d.ts +9 -0
- package/dist/types/src/schema/types/explanation.d.ts +43 -0
- package/dist/types/src/{engine → schema}/types/field.d.ts +3 -45
- package/dist/types/src/schema/types/form.d.ts +13 -0
- package/dist/types/src/schema/types/report.d.ts +43 -0
- package/dist/types/src/shared/index.d.ts +2 -0
- package/dist/types/src/shared/object.d.ts +1 -0
- package/dist/types/src/shared/strings.d.ts +1 -0
- package/dist/types/src/transport/composition/fanout-helpers.d.ts +2 -0
- package/dist/types/src/transport/composition/fanout.d.ts +1 -2
- package/dist/types/src/transport/composition/index.d.ts +1 -0
- package/dist/types/src/transport/composition/quorum-fanout.d.ts +2 -0
- package/dist/types/src/transport/internal-core.d.ts +21 -0
- package/dist/types/src/transport/internal-errors.d.ts +21 -0
- package/dist/types/src/transport/internal-request.d.ts +21 -0
- package/dist/types/src/transport/internal-routing.d.ts +25 -0
- package/dist/types/src/transport/internal-sse.d.ts +14 -0
- package/dist/types/src/transport/internal-stream.d.ts +13 -0
- package/dist/types/src/transport/internal.d.ts +6 -110
- package/dist/types/src/transport/types/options-http.d.ts +85 -0
- package/dist/types/src/transport/types/options-middleware.d.ts +96 -0
- package/dist/types/src/transport/types/options-routing.d.ts +82 -0
- package/dist/types/src/transport/types/options.d.ts +3 -258
- package/package.json +20 -8
- package/dist/engine-tP-QTA_5.js +0 -5367
- package/dist/kit-fHGskli5.js +0 -76
- package/dist/mlform/engine.mjs +0 -3
- package/dist/mlform/questionnaire.mjs +0 -640
- package/dist/types/src/engine/index.d.ts +0 -11
- package/dist/types/src/engine/registry/index.d.ts +0 -26
- package/dist/types/src/engine/submission/submitter.d.ts +0 -40
- package/dist/types/src/engine/types/explanation.d.ts +0 -109
- package/dist/types/src/engine/types/index.d.ts +0 -9
- package/dist/types/src/engine/types/report.d.ts +0 -87
- package/dist/types/src/questionnaire/constants.d.ts +0 -31
- package/dist/types/src/questionnaire/defaults.d.ts +0 -8
- package/dist/types/src/questionnaire/engine/controller.d.ts +0 -12
- package/dist/types/src/questionnaire/engine/schema.d.ts +0 -9
- package/dist/types/src/questionnaire/errors.d.ts +0 -3
- package/dist/types/src/questionnaire/index.d.ts +0 -6
- package/dist/types/src/questionnaire/mount.d.ts +0 -3
- package/dist/types/src/questionnaire/primitives/components/questionnaire-root.d.ts +0 -23
- package/dist/types/src/questionnaire/primitives/register.d.ts +0 -0
- package/dist/types/src/questionnaire/types.d.ts +0 -69
- package/dist/types/src/{engine/declarative → presentation/types}/presentation.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/boolean.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/category.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/date.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/long-text.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/mapped-category.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/multi-choice.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/number.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/rating.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/series.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/single-choice.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/fields/text.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/builtins/reports/regressor.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/comparison.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/constants.d.ts +0 -0
- package/dist/types/src/{engine/form.d.ts → runtime/create-runtime.d.ts} +0 -0
- package/dist/types/src/{engine → runtime}/declarative/explanation.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/declarative/field.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/declarative/report.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/equality.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/errors.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/explanations/controller.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/explanations/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/fields/controller.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/fields/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/paths.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/reports/controller.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/reports/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/schema/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/state/engine.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/state/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/state/snapshots.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/state/store.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/abort.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/explanations.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/lifecycle.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/pipeline.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/reports.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/request.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/submission/result.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/types/pipeline.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/types/transport.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/validation/conditions.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/validation/form.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/validation/index.d.ts +0 -0
- package/dist/types/src/{engine → runtime}/values.d.ts +0 -0
- package/dist/types/src/{engine → schema}/types/registry.d.ts +1 -1
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e } from "./builtins-ml-9qB2MOxt.js";
|
|
2
|
+
import { f as t } from "./runtime-DMjDVo0H.js";
|
|
2
3
|
//#region node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js
|
|
3
|
-
var
|
|
4
|
+
var n = globalThis, r = n.ShadowRoot && (n.ShadyCSS === void 0 || n.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, i = Symbol(), a = /* @__PURE__ */ new WeakMap(), o = class {
|
|
4
5
|
constructor(e, t, n) {
|
|
5
|
-
if (this._$cssResult$ = !0, n !==
|
|
6
|
+
if (this._$cssResult$ = !0, n !== i) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
6
7
|
this.cssText = e, this.t = t;
|
|
7
8
|
}
|
|
8
9
|
get styleSheet() {
|
|
9
10
|
let e = this.o, t = this.t;
|
|
10
|
-
if (
|
|
11
|
+
if (r && e === void 0) {
|
|
11
12
|
let n = t !== void 0 && t.length === 1;
|
|
12
|
-
n && (e =
|
|
13
|
+
n && (e = a.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && a.set(t, e));
|
|
13
14
|
}
|
|
14
15
|
return e;
|
|
15
16
|
}
|
|
16
17
|
toString() {
|
|
17
18
|
return this.cssText;
|
|
18
19
|
}
|
|
19
|
-
},
|
|
20
|
+
}, s = (e) => new o(typeof e == "string" ? e : e + "", void 0, i), c = (e, ...t) => new o(e.length === 1 ? e[0] : t.reduce((t, n, r) => t + ((e) => {
|
|
20
21
|
if (!0 === e._$cssResult$) return e.cssText;
|
|
21
22
|
if (typeof e == "number") return e;
|
|
22
23
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + e + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
23
|
-
})(n) + e[r + 1], e[0]), e,
|
|
24
|
-
if (
|
|
25
|
-
else for (let
|
|
26
|
-
let
|
|
27
|
-
i !== void 0 &&
|
|
24
|
+
})(n) + e[r + 1], e[0]), e, i), l = (e, t) => {
|
|
25
|
+
if (r) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
26
|
+
else for (let r of t) {
|
|
27
|
+
let t = document.createElement("style"), i = n.litNonce;
|
|
28
|
+
i !== void 0 && t.setAttribute("nonce", i), t.textContent = r.cssText, e.appendChild(t);
|
|
28
29
|
}
|
|
29
|
-
},
|
|
30
|
+
}, u = r ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
30
31
|
let t = "";
|
|
31
32
|
for (let n of e.cssRules) t += n.cssText;
|
|
32
|
-
return
|
|
33
|
-
})(e) : e, { is:
|
|
33
|
+
return s(t);
|
|
34
|
+
})(e) : e, { is: d, defineProperty: f, getOwnPropertyDescriptor: p, getOwnPropertyNames: m, getOwnPropertySymbols: ee, getPrototypeOf: te } = Object, ne = globalThis, re = ne.trustedTypes, ie = re ? re.emptyScript : "", ae = ne.reactiveElementPolyfillSupport, h = (e, t) => e, oe = {
|
|
34
35
|
toAttribute(e, t) {
|
|
35
36
|
switch (t) {
|
|
36
37
|
case Boolean:
|
|
37
|
-
e = e ?
|
|
38
|
+
e = e ? ie : null;
|
|
38
39
|
break;
|
|
39
40
|
case Object:
|
|
40
41
|
case Array: e = e == null ? e : JSON.stringify(e);
|
|
@@ -59,7 +60,7 @@ var t = globalThis, n = t.ShadowRoot && (t.ShadyCSS === void 0 || t.ShadyCSS.nat
|
|
|
59
60
|
}
|
|
60
61
|
return n;
|
|
61
62
|
}
|
|
62
|
-
}, se = (e, t) => !
|
|
63
|
+
}, se = (e, t) => !d(e, t), ce = {
|
|
63
64
|
attribute: !0,
|
|
64
65
|
type: String,
|
|
65
66
|
converter: oe,
|
|
@@ -67,8 +68,8 @@ var t = globalThis, n = t.ShadowRoot && (t.ShadyCSS === void 0 || t.ShadyCSS.nat
|
|
|
67
68
|
useDefault: !1,
|
|
68
69
|
hasChanged: se
|
|
69
70
|
};
|
|
70
|
-
Symbol.metadata ??= Symbol("metadata"),
|
|
71
|
-
var
|
|
71
|
+
Symbol.metadata ??= Symbol("metadata"), ne.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
72
|
+
var g = class extends HTMLElement {
|
|
72
73
|
static addInitializer(e) {
|
|
73
74
|
this._$Ei(), (this.l ??= []).push(e);
|
|
74
75
|
}
|
|
@@ -78,11 +79,11 @@ var h = class extends HTMLElement {
|
|
|
78
79
|
static createProperty(e, t = ce) {
|
|
79
80
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
80
81
|
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
81
|
-
r !== void 0 &&
|
|
82
|
+
r !== void 0 && f(this.prototype, e, r);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
static getPropertyDescriptor(e, t, n) {
|
|
85
|
-
let { get: r, set: i } =
|
|
86
|
+
let { get: r, set: i } = p(this.prototype, e) ?? {
|
|
86
87
|
get() {
|
|
87
88
|
return this[t];
|
|
88
89
|
},
|
|
@@ -104,14 +105,14 @@ var h = class extends HTMLElement {
|
|
|
104
105
|
return this.elementProperties.get(e) ?? ce;
|
|
105
106
|
}
|
|
106
107
|
static _$Ei() {
|
|
107
|
-
if (this.hasOwnProperty(
|
|
108
|
-
let e =
|
|
108
|
+
if (this.hasOwnProperty(h("elementProperties"))) return;
|
|
109
|
+
let e = te(this);
|
|
109
110
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
110
111
|
}
|
|
111
112
|
static finalize() {
|
|
112
|
-
if (this.hasOwnProperty(
|
|
113
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
114
|
-
let e = this.properties, t = [...
|
|
113
|
+
if (this.hasOwnProperty(h("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(h("properties"))) {
|
|
115
|
+
let e = this.properties, t = [...m(e), ...ee(e)];
|
|
115
116
|
for (let n of t) this.createProperty(n, e[n]);
|
|
116
117
|
}
|
|
117
118
|
let e = this[Symbol.metadata];
|
|
@@ -130,8 +131,8 @@ var h = class extends HTMLElement {
|
|
|
130
131
|
let t = [];
|
|
131
132
|
if (Array.isArray(e)) {
|
|
132
133
|
let n = new Set(e.flat(Infinity).reverse());
|
|
133
|
-
for (let e of n) t.unshift(
|
|
134
|
-
} else e !== void 0 && t.push(
|
|
134
|
+
for (let e of n) t.unshift(u(e));
|
|
135
|
+
} else e !== void 0 && t.push(u(e));
|
|
135
136
|
return t;
|
|
136
137
|
}
|
|
137
138
|
static _$Eu(e, t) {
|
|
@@ -157,7 +158,7 @@ var h = class extends HTMLElement {
|
|
|
157
158
|
}
|
|
158
159
|
createRenderRoot() {
|
|
159
160
|
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
160
|
-
return
|
|
161
|
+
return l(e, this.constructor.elementStyles), e;
|
|
161
162
|
}
|
|
162
163
|
connectedCallback() {
|
|
163
164
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
@@ -252,32 +253,32 @@ var h = class extends HTMLElement {
|
|
|
252
253
|
updated(e) {}
|
|
253
254
|
firstUpdated(e) {}
|
|
254
255
|
};
|
|
255
|
-
|
|
256
|
+
g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[h("elementProperties")] = /* @__PURE__ */ new Map(), g[h("finalized")] = /* @__PURE__ */ new Map(), ae?.({ ReactiveElement: g }), (ne.reactiveElementVersions ??= []).push("2.1.2");
|
|
256
257
|
//#endregion
|
|
257
258
|
//#region node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js
|
|
258
|
-
var le = globalThis, ue = (e) => e, de = le.trustedTypes, fe = de ? de.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$",
|
|
259
|
+
var le = globalThis, ue = (e) => e, de = le.trustedTypes, fe = de ? de.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pe = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + _, he = `<${me}>`, v = document, ge = () => v.createComment(""), _e = (e) => e === null || typeof e != "object" && typeof e != "function", ve = Array.isArray, ye = (e) => ve(e) || typeof e?.[Symbol.iterator] == "function", be = "[ \n\f\r]", xe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Se = /-->/g, Ce = />/g, y = RegExp(`>|${be}(?:([^\\s"'>=/]+)(${be}*=${be}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), we = /'/g, Te = /"/g, Ee = /^(?:script|style|textarea|title)$/i, b = ((e) => (t, ...n) => ({
|
|
259
260
|
_$litType$: e,
|
|
260
261
|
strings: t,
|
|
261
262
|
values: n
|
|
262
|
-
}))(1), x = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"),
|
|
263
|
-
function
|
|
263
|
+
}))(1), x = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), De = /* @__PURE__ */ new WeakMap(), C = v.createTreeWalker(v, 129);
|
|
264
|
+
function Oe(e, t) {
|
|
264
265
|
if (!ve(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
265
266
|
return fe === void 0 ? t : fe.createHTML(t);
|
|
266
267
|
}
|
|
267
|
-
var
|
|
268
|
-
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
268
|
+
var ke = (e, t) => {
|
|
269
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = xe;
|
|
269
270
|
for (let t = 0; t < n; t++) {
|
|
270
271
|
let n = e[t], s, c, l = -1, u = 0;
|
|
271
|
-
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o ===
|
|
272
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === xe ? c[1] === "!--" ? o = Se : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = y) : (Ee.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = y) : o = Ce : o === y ? c[0] === ">" ? (o = i ?? xe, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? y : c[3] === "\"" ? Te : we) : o === Te || o === we ? o = y : o === Se || o === Ce ? o = xe : (o = y, i = void 0);
|
|
272
273
|
let d = o === y && e[t + 1].startsWith("/>") ? " " : "";
|
|
273
|
-
a += o ===
|
|
274
|
+
a += o === xe ? n + he : l >= 0 ? (r.push(s), n.slice(0, l) + pe + n.slice(l) + _ + d) : n + _ + (l === -2 ? t : d);
|
|
274
275
|
}
|
|
275
|
-
return [
|
|
276
|
-
},
|
|
276
|
+
return [Oe(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
277
|
+
}, Ae = class e {
|
|
277
278
|
constructor({ strings: t, _$litType$: n }, r) {
|
|
278
279
|
let i;
|
|
279
280
|
this.parts = [];
|
|
280
|
-
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] =
|
|
281
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = ke(t, n);
|
|
281
282
|
if (this.el = e.createElement(l, r), C.currentNode = this.el.content, n === 2 || n === 3) {
|
|
282
283
|
let e = this.el.content.firstChild;
|
|
283
284
|
e.replaceWith(...e.childNodes);
|
|
@@ -285,20 +286,20 @@ var Oe = (e, t) => {
|
|
|
285
286
|
for (; (i = C.nextNode()) !== null && c.length < s;) {
|
|
286
287
|
if (i.nodeType === 1) {
|
|
287
288
|
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(pe)) {
|
|
288
|
-
let t = u[o++], n = i.getAttribute(e).split(
|
|
289
|
+
let t = u[o++], n = i.getAttribute(e).split(_), r = /([.?@])?(.*)/.exec(t);
|
|
289
290
|
c.push({
|
|
290
291
|
type: 1,
|
|
291
292
|
index: a,
|
|
292
293
|
name: r[2],
|
|
293
294
|
strings: n,
|
|
294
|
-
ctor: r[1] === "." ?
|
|
295
|
+
ctor: r[1] === "." ? Ne : r[1] === "?" ? Pe : r[1] === "@" ? Fe : T
|
|
295
296
|
}), i.removeAttribute(e);
|
|
296
|
-
} else e.startsWith(
|
|
297
|
+
} else e.startsWith(_) && (c.push({
|
|
297
298
|
type: 6,
|
|
298
299
|
index: a
|
|
299
300
|
}), i.removeAttribute(e));
|
|
300
|
-
if (
|
|
301
|
-
let e = i.textContent.split(
|
|
301
|
+
if (Ee.test(i.tagName)) {
|
|
302
|
+
let e = i.textContent.split(_), t = e.length - 1;
|
|
302
303
|
if (t > 0) {
|
|
303
304
|
i.textContent = de ? de.emptyScript : "";
|
|
304
305
|
for (let n = 0; n < t; n++) i.append(e[n], ge()), C.nextNode(), c.push({
|
|
@@ -314,16 +315,16 @@ var Oe = (e, t) => {
|
|
|
314
315
|
});
|
|
315
316
|
else {
|
|
316
317
|
let e = -1;
|
|
317
|
-
for (; (e = i.data.indexOf(
|
|
318
|
+
for (; (e = i.data.indexOf(_, e + 1)) !== -1;) c.push({
|
|
318
319
|
type: 7,
|
|
319
320
|
index: a
|
|
320
|
-
}), e +=
|
|
321
|
+
}), e += _.length - 1;
|
|
321
322
|
}
|
|
322
323
|
a++;
|
|
323
324
|
}
|
|
324
325
|
}
|
|
325
326
|
static createElement(e, t) {
|
|
326
|
-
let n =
|
|
327
|
+
let n = v.createElement("template");
|
|
327
328
|
return n.innerHTML = e, n;
|
|
328
329
|
}
|
|
329
330
|
};
|
|
@@ -332,7 +333,7 @@ function w(e, t, n = e, r) {
|
|
|
332
333
|
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = _e(t) ? void 0 : t._$litDirective$;
|
|
333
334
|
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = w(e, i._$AS(e, t.values), i, r)), t;
|
|
334
335
|
}
|
|
335
|
-
var
|
|
336
|
+
var je = class {
|
|
336
337
|
constructor(e, t) {
|
|
337
338
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
338
339
|
}
|
|
@@ -343,23 +344,23 @@ var Ae = class {
|
|
|
343
344
|
return this._$AM._$AU;
|
|
344
345
|
}
|
|
345
346
|
u(e) {
|
|
346
|
-
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ??
|
|
347
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? v).importNode(t, !0);
|
|
347
348
|
C.currentNode = r;
|
|
348
349
|
let i = C.nextNode(), a = 0, o = 0, s = n[0];
|
|
349
350
|
for (; s !== void 0;) {
|
|
350
351
|
if (a === s.index) {
|
|
351
352
|
let t;
|
|
352
|
-
s.type === 2 ? t = new
|
|
353
|
+
s.type === 2 ? t = new Me(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Ie(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
353
354
|
}
|
|
354
355
|
a !== s?.index && (i = C.nextNode(), a++);
|
|
355
356
|
}
|
|
356
|
-
return C.currentNode =
|
|
357
|
+
return C.currentNode = v, r;
|
|
357
358
|
}
|
|
358
359
|
p(e) {
|
|
359
360
|
let t = 0;
|
|
360
361
|
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
361
362
|
}
|
|
362
|
-
},
|
|
363
|
+
}, Me = class e {
|
|
363
364
|
get _$AU() {
|
|
364
365
|
return this._$AM?._$AU ?? this._$Cv;
|
|
365
366
|
}
|
|
@@ -386,19 +387,19 @@ var Ae = class {
|
|
|
386
387
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
387
388
|
}
|
|
388
389
|
_(e) {
|
|
389
|
-
this._$AH !== S && _e(this._$AH) ? this._$AA.nextSibling.data = e : this.T(
|
|
390
|
+
this._$AH !== S && _e(this._$AH) ? this._$AA.nextSibling.data = e : this.T(v.createTextNode(e)), this._$AH = e;
|
|
390
391
|
}
|
|
391
392
|
$(e) {
|
|
392
|
-
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el =
|
|
393
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Ae.createElement(Oe(n.h, n.h[0]), this.options)), n);
|
|
393
394
|
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
394
395
|
else {
|
|
395
|
-
let e = new
|
|
396
|
+
let e = new je(r, this), n = e.u(this.options);
|
|
396
397
|
e.p(t), this.T(n), this._$AH = e;
|
|
397
398
|
}
|
|
398
399
|
}
|
|
399
400
|
_$AC(e) {
|
|
400
|
-
let t =
|
|
401
|
-
return t === void 0 &&
|
|
401
|
+
let t = De.get(e.strings);
|
|
402
|
+
return t === void 0 && De.set(e.strings, t = new Ae(e)), t;
|
|
402
403
|
}
|
|
403
404
|
k(t) {
|
|
404
405
|
ve(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -437,21 +438,21 @@ var Ae = class {
|
|
|
437
438
|
j(e) {
|
|
438
439
|
e === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
439
440
|
}
|
|
440
|
-
},
|
|
441
|
+
}, Ne = class extends T {
|
|
441
442
|
constructor() {
|
|
442
443
|
super(...arguments), this.type = 3;
|
|
443
444
|
}
|
|
444
445
|
j(e) {
|
|
445
446
|
this.element[this.name] = e === S ? void 0 : e;
|
|
446
447
|
}
|
|
447
|
-
},
|
|
448
|
+
}, Pe = class extends T {
|
|
448
449
|
constructor() {
|
|
449
450
|
super(...arguments), this.type = 4;
|
|
450
451
|
}
|
|
451
452
|
j(e) {
|
|
452
453
|
this.element.toggleAttribute(this.name, !!e && e !== S);
|
|
453
454
|
}
|
|
454
|
-
},
|
|
455
|
+
}, Fe = class extends T {
|
|
455
456
|
constructor(e, t, n, r, i) {
|
|
456
457
|
super(e, t, n, r, i), this.type = 5;
|
|
457
458
|
}
|
|
@@ -463,7 +464,7 @@ var Ae = class {
|
|
|
463
464
|
handleEvent(e) {
|
|
464
465
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
465
466
|
}
|
|
466
|
-
},
|
|
467
|
+
}, Ie = class {
|
|
467
468
|
constructor(e, t, n) {
|
|
468
469
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
469
470
|
}
|
|
@@ -473,31 +474,31 @@ var Ae = class {
|
|
|
473
474
|
_$AI(e) {
|
|
474
475
|
w(this, e);
|
|
475
476
|
}
|
|
476
|
-
},
|
|
477
|
+
}, Le = {
|
|
477
478
|
M: pe,
|
|
478
|
-
P:
|
|
479
|
+
P: _,
|
|
479
480
|
A: me,
|
|
480
481
|
C: 1,
|
|
481
|
-
L:
|
|
482
|
-
R:
|
|
482
|
+
L: ke,
|
|
483
|
+
R: je,
|
|
483
484
|
D: ye,
|
|
484
485
|
V: w,
|
|
485
|
-
I:
|
|
486
|
+
I: Me,
|
|
486
487
|
H: T,
|
|
487
|
-
N:
|
|
488
|
-
U:
|
|
489
|
-
B:
|
|
490
|
-
F:
|
|
491
|
-
},
|
|
492
|
-
|
|
493
|
-
var
|
|
488
|
+
N: Pe,
|
|
489
|
+
U: Fe,
|
|
490
|
+
B: Ne,
|
|
491
|
+
F: Ie
|
|
492
|
+
}, Re = le.litHtmlPolyfillSupport;
|
|
493
|
+
Re?.(Ae, Me), (le.litHtmlVersions ??= []).push("3.3.2");
|
|
494
|
+
var ze = (e, t, n) => {
|
|
494
495
|
let r = n?.renderBefore ?? t, i = r._$litPart$;
|
|
495
496
|
if (i === void 0) {
|
|
496
497
|
let e = n?.renderBefore ?? null;
|
|
497
|
-
r._$litPart$ = i = new
|
|
498
|
+
r._$litPart$ = i = new Me(t.insertBefore(ge(), e), e, void 0, n ?? {});
|
|
498
499
|
}
|
|
499
500
|
return i._$AI(e), i;
|
|
500
|
-
},
|
|
501
|
+
}, Be = globalThis, E = class extends g {
|
|
501
502
|
constructor() {
|
|
502
503
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
503
504
|
}
|
|
@@ -507,7 +508,7 @@ var Re = (e, t, n) => {
|
|
|
507
508
|
}
|
|
508
509
|
update(e) {
|
|
509
510
|
let t = this.render();
|
|
510
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
511
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = ze(t, this.renderRoot, this.renderOptions);
|
|
511
512
|
}
|
|
512
513
|
connectedCallback() {
|
|
513
514
|
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
@@ -519,22 +520,22 @@ var Re = (e, t, n) => {
|
|
|
519
520
|
return x;
|
|
520
521
|
}
|
|
521
522
|
};
|
|
522
|
-
E._$litElement$ = !0, E.finalized = !0,
|
|
523
|
-
var
|
|
524
|
-
|
|
523
|
+
E._$litElement$ = !0, E.finalized = !0, Be.litElementHydrateSupport?.({ LitElement: E });
|
|
524
|
+
var Ve = Be.litElementPolyfillSupport;
|
|
525
|
+
Ve?.({ LitElement: E }), (Be.litElementVersions ??= []).push("4.2.2");
|
|
525
526
|
//#endregion
|
|
526
527
|
//#region node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
527
528
|
var D = (e) => (t, n) => {
|
|
528
529
|
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
529
530
|
customElements.define(e, t);
|
|
530
531
|
});
|
|
531
|
-
},
|
|
532
|
+
}, He = {
|
|
532
533
|
attribute: !0,
|
|
533
534
|
type: String,
|
|
534
535
|
converter: oe,
|
|
535
536
|
reflect: !1,
|
|
536
537
|
hasChanged: se
|
|
537
|
-
},
|
|
538
|
+
}, Ue = (e = He, t, n) => {
|
|
538
539
|
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
539
540
|
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
540
541
|
let { name: r } = n;
|
|
@@ -558,7 +559,7 @@ var D = (e) => (t, n) => {
|
|
|
558
559
|
throw Error("Unsupported decorator location: " + r);
|
|
559
560
|
};
|
|
560
561
|
function O(e) {
|
|
561
|
-
return (t, n) => typeof n == "object" ?
|
|
562
|
+
return (t, n) => typeof n == "object" ? Ue(e, t, n) : ((e, t, n) => {
|
|
562
563
|
let r = t.hasOwnProperty(n);
|
|
563
564
|
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
564
565
|
})(e, t, n);
|
|
@@ -597,19 +598,19 @@ var A = {
|
|
|
597
598
|
singleChoiceField: "mlf-single-choice-field",
|
|
598
599
|
multiChoiceField: "mlf-multi-choice-field",
|
|
599
600
|
ratingField: "mlf-rating-field"
|
|
600
|
-
},
|
|
601
|
+
}, j = {
|
|
601
602
|
submitRequest: "mlf-submit-request",
|
|
602
603
|
submitStart: "mlf-submit-start",
|
|
603
604
|
submitSuccess: "mlf-submit-success",
|
|
604
605
|
submitAbort: "mlf-submit-abort",
|
|
605
606
|
submitError: "mlf-submit-error"
|
|
606
|
-
},
|
|
607
|
+
}, M = {
|
|
607
608
|
form: "Inputs",
|
|
608
609
|
reports: "Reports",
|
|
609
610
|
submit: "Submit",
|
|
610
611
|
validating: "Validating...",
|
|
611
612
|
submitting: "Submitting..."
|
|
612
|
-
},
|
|
613
|
+
}, N = Object.freeze({
|
|
613
614
|
formEyebrow: "Form",
|
|
614
615
|
reportEyebrow: "Report",
|
|
615
616
|
formErrorsTitle: "Form errors",
|
|
@@ -667,9 +668,9 @@ var A = {
|
|
|
667
668
|
reportsEmptyTitle: "Results",
|
|
668
669
|
reportsEmptyBody: "Reports will appear here after the form is submitted."
|
|
669
670
|
}), We = (e) => e ? Object.freeze({
|
|
670
|
-
...
|
|
671
|
+
...N,
|
|
671
672
|
...e
|
|
672
|
-
}) :
|
|
673
|
+
}) : N, P = {
|
|
673
674
|
booleanGroup: "mlf-boolean",
|
|
674
675
|
fieldDescription: "mlf-field-description",
|
|
675
676
|
fieldErrors: "mlf-field-errors",
|
|
@@ -679,7 +680,7 @@ var A = {
|
|
|
679
680
|
};
|
|
680
681
|
//#endregion
|
|
681
682
|
//#region \0@oxc-project+runtime@0.123.0/helpers/decorate.js
|
|
682
|
-
function
|
|
683
|
+
function F(e, t, n, r) {
|
|
683
684
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
684
685
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
685
686
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -687,8 +688,8 @@ function P(e, t, n, r) {
|
|
|
687
688
|
}
|
|
688
689
|
//#endregion
|
|
689
690
|
//#region src/primitives/components/form-errors.ts
|
|
690
|
-
var
|
|
691
|
-
static styles =
|
|
691
|
+
var I = class extends E {
|
|
692
|
+
static styles = c`
|
|
692
693
|
:host {
|
|
693
694
|
display: block;
|
|
694
695
|
}
|
|
@@ -728,7 +729,7 @@ var F = class extends E {
|
|
|
728
729
|
set form(e) {
|
|
729
730
|
this.#e = e;
|
|
730
731
|
}
|
|
731
|
-
#t =
|
|
732
|
+
#t = N;
|
|
732
733
|
get text() {
|
|
733
734
|
return this.#t;
|
|
734
735
|
}
|
|
@@ -776,11 +777,11 @@ var F = class extends E {
|
|
|
776
777
|
}
|
|
777
778
|
}
|
|
778
779
|
};
|
|
779
|
-
|
|
780
|
+
F([O({ attribute: !1 })], I.prototype, "form", null), F([O({ attribute: !1 })], I.prototype, "text", null), F([k()], I.prototype, "formErrors", null), I = F([D(A.formErrors)], I);
|
|
780
781
|
//#endregion
|
|
781
782
|
//#region src/primitives/components/submit-button.ts
|
|
782
|
-
var
|
|
783
|
-
static styles =
|
|
783
|
+
var L = class extends E {
|
|
784
|
+
static styles = c`
|
|
784
785
|
:host {
|
|
785
786
|
display: block;
|
|
786
787
|
}
|
|
@@ -830,21 +831,21 @@ var I = class extends E {
|
|
|
830
831
|
set status(e) {
|
|
831
832
|
this.#e = e;
|
|
832
833
|
}
|
|
833
|
-
#t =
|
|
834
|
+
#t = M.submit;
|
|
834
835
|
get idleLabel() {
|
|
835
836
|
return this.#t;
|
|
836
837
|
}
|
|
837
838
|
set idleLabel(e) {
|
|
838
839
|
this.#t = e;
|
|
839
840
|
}
|
|
840
|
-
#n =
|
|
841
|
+
#n = M.validating;
|
|
841
842
|
get validatingLabel() {
|
|
842
843
|
return this.#n;
|
|
843
844
|
}
|
|
844
845
|
set validatingLabel(e) {
|
|
845
846
|
this.#n = e;
|
|
846
847
|
}
|
|
847
|
-
#r =
|
|
848
|
+
#r = M.submitting;
|
|
848
849
|
get submittingLabel() {
|
|
849
850
|
return this.#r;
|
|
850
851
|
}
|
|
@@ -893,17 +894,17 @@ var I = class extends E {
|
|
|
893
894
|
`;
|
|
894
895
|
}
|
|
895
896
|
#c = () => {
|
|
896
|
-
this.dispatchEvent(new CustomEvent(
|
|
897
|
+
this.dispatchEvent(new CustomEvent(j.submitRequest, {
|
|
897
898
|
bubbles: !0,
|
|
898
899
|
composed: !0
|
|
899
900
|
}));
|
|
900
901
|
};
|
|
901
902
|
};
|
|
902
|
-
|
|
903
|
+
F([O({ type: String })], L.prototype, "status", null), F([O({ type: String })], L.prototype, "idleLabel", null), F([O({ type: String })], L.prototype, "validatingLabel", null), F([O({ type: String })], L.prototype, "submittingLabel", null), F([O({ type: Number })], L.prototype, "loaded", null), F([O({ type: Number })], L.prototype, "total", null), F([O({ type: String })], L.prototype, "progressMessage", null), F([O({ type: Number })], L.prototype, "sessionMessageCount", null), L = F([D(A.submitButton)], L);
|
|
903
904
|
//#endregion
|
|
904
905
|
//#region src/primitives/components/unsupported-component.ts
|
|
905
|
-
var
|
|
906
|
-
static styles =
|
|
906
|
+
var R = class extends E {
|
|
907
|
+
static styles = c`
|
|
907
908
|
:host {
|
|
908
909
|
display: block;
|
|
909
910
|
}
|
|
@@ -940,7 +941,7 @@ var L = class extends E {
|
|
|
940
941
|
set role(e) {
|
|
941
942
|
this.#t = e;
|
|
942
943
|
}
|
|
943
|
-
#n =
|
|
944
|
+
#n = N;
|
|
944
945
|
get text() {
|
|
945
946
|
return this.#n;
|
|
946
947
|
}
|
|
@@ -956,7 +957,7 @@ var L = class extends E {
|
|
|
956
957
|
`;
|
|
957
958
|
}
|
|
958
959
|
};
|
|
959
|
-
|
|
960
|
+
F([O({ type: String })], R.prototype, "component", null), F([O({ type: String })], R.prototype, "role", null), F([O({ attribute: !1 })], R.prototype, "text", null), R = F([D(A.unsupportedComponent)], R);
|
|
960
961
|
//#endregion
|
|
961
962
|
//#region node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js
|
|
962
963
|
var Ge = Symbol.for(""), Ke = (e) => {
|
|
@@ -964,7 +965,7 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
964
965
|
}, qe = (e) => ({
|
|
965
966
|
_$litStatic$: e,
|
|
966
967
|
r: Ge
|
|
967
|
-
}), Je = /* @__PURE__ */ new Map(),
|
|
968
|
+
}), Je = /* @__PURE__ */ new Map(), z = ((e) => (t, ...n) => {
|
|
968
969
|
let r = n.length, i, a, o = [], s = [], c, l = 0, u = !1;
|
|
969
970
|
for (; l < r;) {
|
|
970
971
|
for (c = t[l]; l < r && (a = n[l], i = Ke(a)) !== void 0;) c += i + t[++l], u = !0;
|
|
@@ -1001,7 +1002,130 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1001
1002
|
hostDisconnected() {
|
|
1002
1003
|
this.#r?.(), this.#r = null;
|
|
1003
1004
|
}
|
|
1004
|
-
},
|
|
1005
|
+
}, B = (e) => typeof e == "object" && !!e, Xe = (e) => e.join(" "), V = (e, t = "") => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : t, Ze = c`
|
|
1006
|
+
:host {
|
|
1007
|
+
display: block;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
:host([hidden]) {
|
|
1011
|
+
display: none;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
.tile {
|
|
1015
|
+
position: relative;
|
|
1016
|
+
display: grid;
|
|
1017
|
+
gap: 0.85rem;
|
|
1018
|
+
overflow: hidden;
|
|
1019
|
+
padding: 1.5rem 2rem;
|
|
1020
|
+
border-radius: var(--mlf-field-radius, 12px);
|
|
1021
|
+
border: var(--mlf-border-width, 1px) solid
|
|
1022
|
+
var(--mlf-field-border, var(--mlf-color-border, #e2e8f0));
|
|
1023
|
+
background: var(--mlf-field-bg, var(--mlf-color-surface, #ffffff));
|
|
1024
|
+
box-shadow: 0 4px 12px var(--mlf-field-shadow, rgba(0, 0, 0, 0.04));
|
|
1025
|
+
transition: box-shadow 0.2s ease;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.tile:hover {
|
|
1029
|
+
box-shadow: 0 6px 18px var(--mlf-field-shadow-hover, rgba(0, 0, 0, 0.06));
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.tile::before {
|
|
1033
|
+
content: "";
|
|
1034
|
+
position: absolute;
|
|
1035
|
+
inset: 0 auto 0 0;
|
|
1036
|
+
width: 6px;
|
|
1037
|
+
background: var(--mlf-field-accent, var(--mlf-color-accent, #1e40af));
|
|
1038
|
+
transition: background 0.2s ease;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.tile.success::before {
|
|
1042
|
+
background: var(--mlf-field-accent-success, var(--mlf-color-success, #059669));
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.tile.error::before {
|
|
1046
|
+
background: var(--mlf-field-accent-error, var(--mlf-color-danger, #dc2626));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.header {
|
|
1050
|
+
display: flex;
|
|
1051
|
+
align-items: start;
|
|
1052
|
+
justify-content: space-between;
|
|
1053
|
+
gap: 1rem;
|
|
1054
|
+
min-width: 0;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.label {
|
|
1058
|
+
margin: 0;
|
|
1059
|
+
min-width: 0;
|
|
1060
|
+
color: var(--mlf-field-label-color, var(--mlf-color-text, #0f172a));
|
|
1061
|
+
font-size: 1rem;
|
|
1062
|
+
font-weight: 600;
|
|
1063
|
+
line-height: 1.2;
|
|
1064
|
+
overflow-wrap: anywhere;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.help-btn {
|
|
1068
|
+
flex: 0 0 auto;
|
|
1069
|
+
display: inline-flex;
|
|
1070
|
+
align-items: center;
|
|
1071
|
+
justify-content: center;
|
|
1072
|
+
width: 28px;
|
|
1073
|
+
height: 28px;
|
|
1074
|
+
padding: 0;
|
|
1075
|
+
border: none;
|
|
1076
|
+
border-radius: 50%;
|
|
1077
|
+
background: var(--mlf-help-btn-bg, var(--mlf-color-accent, #1e40af));
|
|
1078
|
+
color: var(--mlf-help-btn-color, #ffffff);
|
|
1079
|
+
font-size: 1rem;
|
|
1080
|
+
font-weight: 700;
|
|
1081
|
+
cursor: pointer;
|
|
1082
|
+
transition: background 0.2s ease;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.help-btn:hover:not(:disabled) {
|
|
1086
|
+
background: var(--mlf-help-btn-bg-hover, var(--mlf-color-accent-hover, #1d4ed8));
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.help-btn:disabled {
|
|
1090
|
+
background: var(--mlf-help-btn-bg-disabled, var(--mlf-color-text-muted, #475569));
|
|
1091
|
+
cursor: not-allowed;
|
|
1092
|
+
opacity: 0.7;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.description {
|
|
1096
|
+
display: none;
|
|
1097
|
+
min-width: 0;
|
|
1098
|
+
font-size: 0.875rem;
|
|
1099
|
+
line-height: 1.5;
|
|
1100
|
+
color: var(--mlf-field-description-color, var(--mlf-color-secondary, #475569));
|
|
1101
|
+
white-space: normal;
|
|
1102
|
+
overflow-wrap: anywhere;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.description.show {
|
|
1106
|
+
display: block;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
.control-slot {
|
|
1110
|
+
min-width: fit-content;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.feedback {
|
|
1114
|
+
min-width: 0;
|
|
1115
|
+
font-size: 0.8rem;
|
|
1116
|
+
line-height: 1.5;
|
|
1117
|
+
white-space: normal;
|
|
1118
|
+
overflow-wrap: anywhere;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.feedback.success {
|
|
1122
|
+
color: var(--mlf-field-feedback-success, var(--mlf-color-success, #059669));
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
.feedback.error {
|
|
1126
|
+
color: var(--mlf-field-feedback-error, var(--mlf-color-danger, #dc2626));
|
|
1127
|
+
}
|
|
1128
|
+
`, Qe = (e) => typeof e == "string" ? {
|
|
1005
1129
|
label: e,
|
|
1006
1130
|
value: e
|
|
1007
1131
|
} : e, $e = (e, t) => {
|
|
@@ -1015,131 +1139,46 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1015
1139
|
case "series": return "series-field";
|
|
1016
1140
|
default: return e;
|
|
1017
1141
|
}
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
.tile.error::before {
|
|
1060
|
-
background: var(--mlf-field-accent-error, var(--mlf-color-danger, #dc2626));
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
.header {
|
|
1064
|
-
display: flex;
|
|
1065
|
-
align-items: start;
|
|
1066
|
-
justify-content: space-between;
|
|
1067
|
-
gap: 1rem;
|
|
1068
|
-
min-width: 0;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.label {
|
|
1072
|
-
margin: 0;
|
|
1073
|
-
min-width: 0;
|
|
1074
|
-
color: var(--mlf-field-label-color, var(--mlf-color-text, #0f172a));
|
|
1075
|
-
font-size: 1rem;
|
|
1076
|
-
font-weight: 600;
|
|
1077
|
-
line-height: 1.2;
|
|
1078
|
-
overflow-wrap: anywhere;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
.help-btn {
|
|
1082
|
-
flex: 0 0 auto;
|
|
1083
|
-
display: inline-flex;
|
|
1084
|
-
align-items: center;
|
|
1085
|
-
justify-content: center;
|
|
1086
|
-
width: 28px;
|
|
1087
|
-
height: 28px;
|
|
1088
|
-
padding: 0;
|
|
1089
|
-
border: none;
|
|
1090
|
-
border-radius: 50%;
|
|
1091
|
-
background: var(--mlf-help-btn-bg, var(--mlf-color-accent, #1e40af));
|
|
1092
|
-
color: var(--mlf-help-btn-color, #ffffff);
|
|
1093
|
-
font-size: 1rem;
|
|
1094
|
-
font-weight: 700;
|
|
1095
|
-
cursor: pointer;
|
|
1096
|
-
transition: background 0.2s ease;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
.help-btn:hover:not(:disabled) {
|
|
1100
|
-
background: var(--mlf-help-btn-bg-hover, var(--mlf-color-accent-hover, #1d4ed8));
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
.help-btn:disabled {
|
|
1104
|
-
background: var(--mlf-help-btn-bg-disabled, var(--mlf-color-text-muted, #475569));
|
|
1105
|
-
cursor: not-allowed;
|
|
1106
|
-
opacity: 0.7;
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
.description {
|
|
1110
|
-
display: none;
|
|
1111
|
-
min-width: 0;
|
|
1112
|
-
font-size: 0.875rem;
|
|
1113
|
-
line-height: 1.5;
|
|
1114
|
-
color: var(--mlf-field-description-color, var(--mlf-color-secondary, #475569));
|
|
1115
|
-
white-space: normal;
|
|
1116
|
-
overflow-wrap: anywhere;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
.description.show {
|
|
1120
|
-
display: block;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
.control-slot {
|
|
1124
|
-
min-width: fit-content;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
.feedback {
|
|
1128
|
-
min-width: 0;
|
|
1129
|
-
font-size: 0.8rem;
|
|
1130
|
-
line-height: 1.5;
|
|
1131
|
-
white-space: normal;
|
|
1132
|
-
overflow-wrap: anywhere;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
.feedback.success {
|
|
1136
|
-
color: var(--mlf-field-feedback-success, var(--mlf-color-success, #059669));
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
.feedback.error {
|
|
1140
|
-
color: var(--mlf-field-feedback-error, var(--mlf-color-danger, #dc2626));
|
|
1141
|
-
}
|
|
1142
|
-
`;
|
|
1142
|
+
}, et = (e, t) => typeof t != "string" || t.length === 0 ? null : (Array.isArray(e.options) ? e.options : []).map(Qe).find((e) => e.value === t) ?? null, tt = (e, t, n, r) => {
|
|
1143
|
+
switch ($e(e, t)) {
|
|
1144
|
+
case "text-field": return typeof n.value == "string" && n.value.trim().length > 0;
|
|
1145
|
+
case "date-field": return typeof t.value == "string" && t.value.trim().length > 0;
|
|
1146
|
+
case "category-field": return et(t, n.value) !== null;
|
|
1147
|
+
case "number-field": return n.value !== null && n.value !== void 0 && n.value !== "" && !(typeof n.value == "number" && Number.isNaN(n.value));
|
|
1148
|
+
case "boolean-field": return r !== void 0 || n.dirty || n.touched;
|
|
1149
|
+
case "series-field": return Array.isArray(t.value) && t.value.length > 0;
|
|
1150
|
+
default: return n.value !== null && n.value !== void 0 && n.value !== "";
|
|
1151
|
+
}
|
|
1152
|
+
}, nt = (e, t, n, r) => {
|
|
1153
|
+
switch ($e(e, t)) {
|
|
1154
|
+
case "text-field": {
|
|
1155
|
+
let e = typeof t.value == "string" ? t.value : "";
|
|
1156
|
+
return e.length > 0 ? r.fieldTextRecorded(e.length) : r.fieldReady;
|
|
1157
|
+
}
|
|
1158
|
+
case "number-field": {
|
|
1159
|
+
let e = typeof t.unit == "string" ? ` ${t.unit}` : "";
|
|
1160
|
+
return n.value === null || n.value === void 0 || n.value === "" ? r.fieldReady : r.fieldValidNumber(n.value, e);
|
|
1161
|
+
}
|
|
1162
|
+
case "category-field": {
|
|
1163
|
+
let e = et(t, n.value);
|
|
1164
|
+
return e ? r.fieldCategorySelected(e.label) : r.fieldSelectionReady;
|
|
1165
|
+
}
|
|
1166
|
+
case "date-field": {
|
|
1167
|
+
let e = typeof t.value == "string" ? t.value : "";
|
|
1168
|
+
return e.length > 0 ? r.fieldSelectedDate(e) : r.fieldDateReady;
|
|
1169
|
+
}
|
|
1170
|
+
case "boolean-field": {
|
|
1171
|
+
let e = V(t.trueLabel, r.booleanTrue), i = V(t.falseLabel, r.booleanFalse);
|
|
1172
|
+
return r.fieldBooleanSelection(n.value === !0 ? e : i);
|
|
1173
|
+
}
|
|
1174
|
+
case "series-field": {
|
|
1175
|
+
let e = Array.isArray(t.value) ? t.value.length : 0;
|
|
1176
|
+
return r.fieldSeriesRecorded(e);
|
|
1177
|
+
}
|
|
1178
|
+
default: return r.fieldReady;
|
|
1179
|
+
}
|
|
1180
|
+
}, rt = 0, H = class extends E {
|
|
1181
|
+
static styles = Ze;
|
|
1143
1182
|
#e;
|
|
1144
1183
|
get controller() {
|
|
1145
1184
|
return this.#e;
|
|
@@ -1147,66 +1186,73 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1147
1186
|
set controller(e) {
|
|
1148
1187
|
this.#e = e;
|
|
1149
1188
|
}
|
|
1150
|
-
#t;
|
|
1151
|
-
get
|
|
1189
|
+
#t = null;
|
|
1190
|
+
get descriptor() {
|
|
1152
1191
|
return this.#t;
|
|
1153
1192
|
}
|
|
1154
|
-
set
|
|
1193
|
+
set descriptor(e) {
|
|
1155
1194
|
this.#t = e;
|
|
1156
1195
|
}
|
|
1157
|
-
#n
|
|
1158
|
-
get
|
|
1196
|
+
#n;
|
|
1197
|
+
get registry() {
|
|
1159
1198
|
return this.#n;
|
|
1160
1199
|
}
|
|
1161
|
-
set
|
|
1200
|
+
set registry(e) {
|
|
1162
1201
|
this.#n = e;
|
|
1163
1202
|
}
|
|
1164
|
-
#r =
|
|
1165
|
-
get
|
|
1203
|
+
#r = N;
|
|
1204
|
+
get text() {
|
|
1166
1205
|
return this.#r;
|
|
1167
1206
|
}
|
|
1168
|
-
set
|
|
1207
|
+
set text(e) {
|
|
1169
1208
|
this.#r = e;
|
|
1170
1209
|
}
|
|
1171
1210
|
#i = null;
|
|
1172
|
-
get
|
|
1211
|
+
get resolvedDescriptor() {
|
|
1173
1212
|
return this.#i;
|
|
1174
1213
|
}
|
|
1175
|
-
set
|
|
1214
|
+
set resolvedDescriptor(e) {
|
|
1176
1215
|
this.#i = e;
|
|
1177
1216
|
}
|
|
1178
|
-
#a =
|
|
1179
|
-
get
|
|
1217
|
+
#a = null;
|
|
1218
|
+
get fieldState() {
|
|
1180
1219
|
return this.#a;
|
|
1181
1220
|
}
|
|
1182
|
-
set
|
|
1221
|
+
set fieldState(e) {
|
|
1183
1222
|
this.#a = e;
|
|
1184
1223
|
}
|
|
1185
|
-
#o =
|
|
1186
|
-
|
|
1187
|
-
|
|
1224
|
+
#o = null;
|
|
1225
|
+
get descriptionVisibilityOverride() {
|
|
1226
|
+
return this.#o;
|
|
1227
|
+
}
|
|
1228
|
+
set descriptionVisibilityOverride(e) {
|
|
1229
|
+
this.#o = e;
|
|
1230
|
+
}
|
|
1231
|
+
#s = ++rt;
|
|
1232
|
+
#c;
|
|
1188
1233
|
#l = null;
|
|
1189
|
-
#u =
|
|
1234
|
+
#u = null;
|
|
1190
1235
|
#d = "";
|
|
1191
|
-
#f =
|
|
1192
|
-
|
|
1236
|
+
#f = "";
|
|
1237
|
+
#p = new Ye(this, (e) => {
|
|
1238
|
+
this.resolvedDescriptor = this.descriptor, this.fieldState = e?.state ?? null, this.resolvedDescriptor?.props.description || (this.descriptionVisibilityOverride = null);
|
|
1193
1239
|
});
|
|
1194
1240
|
willUpdate(e) {
|
|
1195
|
-
e.has("controller") && this.#
|
|
1241
|
+
e.has("controller") && this.#p.bind(this.controller), e.has("descriptor") && (this.resolvedDescriptor = this.descriptor), e.has("descriptor") && !this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = null);
|
|
1196
1242
|
}
|
|
1197
1243
|
render() {
|
|
1198
|
-
let e = this.
|
|
1199
|
-
if (!e || !t || !t.visible) return
|
|
1200
|
-
let n = e.props, r = this.registry?.resolveField(e.component), i =
|
|
1244
|
+
let e = this.resolvedDescriptor, t = this.fieldState;
|
|
1245
|
+
if (!e || !t || !t.visible) return z``;
|
|
1246
|
+
let n = e.props, r = this.registry?.resolveField(e.component), i = V(n.label, this.controller?.config.label ?? ""), a = V(n.description), o = this.#v(a), s = tt(e.component, n, t, this.controller?.config.defaultValue), c = Xe(t.errors), l = nt(e.component, n, t, this.text), u = c.length > 0 && (t.touched || s), d = u ? {
|
|
1201
1247
|
tone: "error",
|
|
1202
|
-
message: s
|
|
1203
|
-
} : o && t.valid ? {
|
|
1204
|
-
tone: "success",
|
|
1205
1248
|
message: c
|
|
1206
|
-
} :
|
|
1207
|
-
|
|
1249
|
+
} : s && t.valid ? {
|
|
1250
|
+
tone: "success",
|
|
1251
|
+
message: l
|
|
1252
|
+
} : null, f = u ? "error" : s && t.valid ? "success" : "", p = `${P.fieldControl}-${this.controller?.id}-${this.#s}`, m = `${P.fieldErrors}-${this.controller?.id}-${this.#s}`, ee = `${P.fieldDescription}-${this.controller?.id}-${this.#s}-details`;
|
|
1253
|
+
return z`
|
|
1208
1254
|
<section
|
|
1209
|
-
class="tile ${
|
|
1255
|
+
class="tile ${f}"
|
|
1210
1256
|
aria-busy=${String(t.status === "validating")}
|
|
1211
1257
|
aria-invalid=${String(!t.valid)}
|
|
1212
1258
|
>
|
|
@@ -1216,23 +1262,23 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1216
1262
|
class="help-btn"
|
|
1217
1263
|
type="button"
|
|
1218
1264
|
aria-label=${this.text.helpActionLabel}
|
|
1219
|
-
aria-expanded=${String(
|
|
1220
|
-
aria-controls=${
|
|
1265
|
+
aria-expanded=${String(o)}
|
|
1266
|
+
aria-controls=${ee}
|
|
1221
1267
|
?disabled=${a.length === 0}
|
|
1222
|
-
@click=${this.#
|
|
1268
|
+
@click=${this.#_}
|
|
1223
1269
|
>
|
|
1224
1270
|
${this.text.helpActionGlyph}
|
|
1225
1271
|
</button>
|
|
1226
1272
|
</div>
|
|
1227
1273
|
|
|
1228
|
-
${a ?
|
|
1229
|
-
<div id=${
|
|
1274
|
+
${a ? z`
|
|
1275
|
+
<div id=${ee} class="description ${o ? "show" : ""}">
|
|
1230
1276
|
${a}
|
|
1231
1277
|
</div>
|
|
1232
|
-
` :
|
|
1278
|
+
` : z``}
|
|
1233
1279
|
|
|
1234
1280
|
<div class="control-slot">
|
|
1235
|
-
${r ? this.#
|
|
1281
|
+
${r ? this.#m(r, p, m) : z`
|
|
1236
1282
|
<mlf-unsupported-component
|
|
1237
1283
|
role="field"
|
|
1238
1284
|
component=${e.component}
|
|
@@ -1241,40 +1287,40 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1241
1287
|
`}
|
|
1242
1288
|
</div>
|
|
1243
1289
|
|
|
1244
|
-
${
|
|
1290
|
+
${d ? z`
|
|
1245
1291
|
<div
|
|
1246
|
-
class="feedback ${
|
|
1247
|
-
role=${
|
|
1292
|
+
class="feedback ${d.tone}"
|
|
1293
|
+
role=${d.tone === "error" ? "alert" : "status"}
|
|
1248
1294
|
aria-live="polite"
|
|
1249
1295
|
>
|
|
1250
|
-
${
|
|
1296
|
+
${d.message}
|
|
1251
1297
|
</div>
|
|
1252
|
-
` :
|
|
1298
|
+
` : z``}
|
|
1253
1299
|
</section>
|
|
1254
1300
|
`;
|
|
1255
1301
|
}
|
|
1256
|
-
#
|
|
1257
|
-
let r = qe(e), i = this.#
|
|
1258
|
-
return
|
|
1302
|
+
#m(e, t, n) {
|
|
1303
|
+
let r = qe(e), i = this.#h(t, n), a = this.resolvedDescriptor;
|
|
1304
|
+
return z`
|
|
1259
1305
|
<${r}
|
|
1260
1306
|
.controller=${this.controller}
|
|
1261
|
-
.descriptor=${
|
|
1307
|
+
.descriptor=${a}
|
|
1262
1308
|
.context=${i}
|
|
1263
1309
|
.text=${this.text}
|
|
1264
1310
|
></${r}>
|
|
1265
1311
|
`;
|
|
1266
1312
|
}
|
|
1267
|
-
#
|
|
1268
|
-
if (this.
|
|
1269
|
-
let n = this.#
|
|
1270
|
-
return this.#
|
|
1313
|
+
#h(e, t) {
|
|
1314
|
+
if (this.resolvedDescriptor === this.#l && this.fieldState === this.#u && e === this.#d && t === this.#f) return this.#c;
|
|
1315
|
+
let n = this.#g(this.resolvedDescriptor?.props ?? {}, this.fieldState, e, t);
|
|
1316
|
+
return this.#l = this.resolvedDescriptor, this.#u = this.fieldState, this.#d = e, this.#f = t, this.#c = n, n;
|
|
1271
1317
|
}
|
|
1272
|
-
#
|
|
1318
|
+
#g(e, t, n, r) {
|
|
1273
1319
|
if (!this.controller || !t) return;
|
|
1274
|
-
let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${
|
|
1320
|
+
let i = typeof e.description == "string" && e.description.length > 0 ? e.description : void 0, a = i ? `${P.fieldDescription}-${this.controller.id}-${this.#s}` : void 0, o = [a, r].filter(Boolean).join(" ") || void 0;
|
|
1275
1321
|
return {
|
|
1276
1322
|
controlId: n,
|
|
1277
|
-
label:
|
|
1323
|
+
label: V(e.label, this.controller.config.label),
|
|
1278
1324
|
description: i,
|
|
1279
1325
|
errors: t.errors,
|
|
1280
1326
|
descriptionId: a,
|
|
@@ -1286,62 +1332,18 @@ var Ge = Symbol.for(""), Ke = (e) => {
|
|
|
1286
1332
|
readOnly: t.readOnly
|
|
1287
1333
|
};
|
|
1288
1334
|
}
|
|
1289
|
-
#
|
|
1290
|
-
|
|
1291
|
-
switch ($e(e, t)) {
|
|
1292
|
-
case "text-field": {
|
|
1293
|
-
let e = typeof t.value == "string" ? t.value : "";
|
|
1294
|
-
return e.length > 0 ? r.fieldTextRecorded(e.length) : r.fieldReady;
|
|
1295
|
-
}
|
|
1296
|
-
case "number-field": {
|
|
1297
|
-
let e = typeof t.unit == "string" ? ` ${t.unit}` : "";
|
|
1298
|
-
return n.value === null || n.value === void 0 || n.value === "" ? r.fieldReady : r.fieldValidNumber(n.value, e);
|
|
1299
|
-
}
|
|
1300
|
-
case "category-field": {
|
|
1301
|
-
let e = this.#v(t, n.value);
|
|
1302
|
-
return e ? r.fieldCategorySelected(e.label) : r.fieldSelectionReady;
|
|
1303
|
-
}
|
|
1304
|
-
case "date-field": {
|
|
1305
|
-
let e = typeof t.value == "string" ? t.value : "";
|
|
1306
|
-
return e.length > 0 ? r.fieldSelectedDate(e) : r.fieldDateReady;
|
|
1307
|
-
}
|
|
1308
|
-
case "boolean-field": {
|
|
1309
|
-
let e = B(t.trueLabel, r.booleanTrue), i = B(t.falseLabel, r.booleanFalse);
|
|
1310
|
-
return r.fieldBooleanSelection(n.value === !0 ? e : i);
|
|
1311
|
-
}
|
|
1312
|
-
case "series-field": {
|
|
1313
|
-
let e = Array.isArray(t.value) ? t.value.length : 0;
|
|
1314
|
-
return r.fieldSeriesRecorded(e);
|
|
1315
|
-
}
|
|
1316
|
-
default: return r.fieldReady;
|
|
1317
|
-
}
|
|
1318
|
-
}
|
|
1319
|
-
#_(e, t, n) {
|
|
1320
|
-
switch ($e(e, t)) {
|
|
1321
|
-
case "text-field": return typeof n.value == "string" && n.value.trim().length > 0;
|
|
1322
|
-
case "date-field": return typeof t.value == "string" && t.value.trim().length > 0;
|
|
1323
|
-
case "category-field": return this.#v(t, n.value) !== null;
|
|
1324
|
-
case "number-field": return n.value !== null && n.value !== void 0 && n.value !== "" && !(typeof n.value == "number" && Number.isNaN(n.value));
|
|
1325
|
-
case "boolean-field": return this.#y() || n.dirty || n.touched;
|
|
1326
|
-
case "series-field": return Array.isArray(t.value) && t.value.length > 0;
|
|
1327
|
-
default: return n.value !== null && n.value !== void 0 && n.value !== "";
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
#v(e, t) {
|
|
1331
|
-
return typeof t != "string" || t.length === 0 ? null : (Array.isArray(e.options) ? e.options : []).map(Qe).find((e) => e.value === t) ?? null;
|
|
1332
|
-
}
|
|
1333
|
-
#y() {
|
|
1334
|
-
return this.controller?.config.defaultValue !== void 0;
|
|
1335
|
-
}
|
|
1336
|
-
#b = () => {
|
|
1337
|
-
this.descriptor?.props.description && (this.descriptionVisible = !this.descriptionVisible);
|
|
1335
|
+
#_ = () => {
|
|
1336
|
+
this.resolvedDescriptor?.props.description && (this.descriptionVisibilityOverride = !this.#v(V(this.resolvedDescriptor.props.description)));
|
|
1338
1337
|
};
|
|
1338
|
+
#v(e) {
|
|
1339
|
+
return e.length === 0 ? !1 : this.descriptionVisibilityOverride ?? this.resolvedDescriptor?.props.showDescriptionInline === !0;
|
|
1340
|
+
}
|
|
1339
1341
|
};
|
|
1340
|
-
|
|
1342
|
+
F([O({ attribute: !1 })], H.prototype, "controller", null), F([O({ attribute: !1 })], H.prototype, "descriptor", null), F([O({ attribute: !1 })], H.prototype, "registry", null), F([O({ attribute: !1 })], H.prototype, "text", null), F([k()], H.prototype, "resolvedDescriptor", null), F([k()], H.prototype, "fieldState", null), F([k()], H.prototype, "descriptionVisibilityOverride", null), H = F([D(A.fieldFrame)], H);
|
|
1341
1343
|
//#endregion
|
|
1342
1344
|
//#region src/primitives/components/report-frame.ts
|
|
1343
|
-
var
|
|
1344
|
-
static styles =
|
|
1345
|
+
var it = 0, U = class extends E {
|
|
1346
|
+
static styles = c`
|
|
1345
1347
|
:host {
|
|
1346
1348
|
display: block;
|
|
1347
1349
|
}
|
|
@@ -1424,7 +1426,7 @@ var et = 0, H = class extends E {
|
|
|
1424
1426
|
set registry(e) {
|
|
1425
1427
|
this.#t = e;
|
|
1426
1428
|
}
|
|
1427
|
-
#n =
|
|
1429
|
+
#n = N;
|
|
1428
1430
|
get text() {
|
|
1429
1431
|
return this.#n;
|
|
1430
1432
|
}
|
|
@@ -1453,39 +1455,46 @@ var et = 0, H = class extends E {
|
|
|
1453
1455
|
this.#a = e;
|
|
1454
1456
|
}
|
|
1455
1457
|
#o = null;
|
|
1456
|
-
get
|
|
1458
|
+
get resolvedDescriptor() {
|
|
1457
1459
|
return this.#o;
|
|
1458
1460
|
}
|
|
1459
|
-
set
|
|
1461
|
+
set resolvedDescriptor(e) {
|
|
1460
1462
|
this.#o = e;
|
|
1461
1463
|
}
|
|
1462
|
-
#s =
|
|
1463
|
-
|
|
1464
|
+
#s = null;
|
|
1465
|
+
get reportState() {
|
|
1466
|
+
return this.#s;
|
|
1467
|
+
}
|
|
1468
|
+
set reportState(e) {
|
|
1469
|
+
this.#s = e;
|
|
1470
|
+
}
|
|
1471
|
+
#c = ++it;
|
|
1464
1472
|
#l;
|
|
1465
|
-
#u
|
|
1473
|
+
#u;
|
|
1466
1474
|
#d = null;
|
|
1467
1475
|
#f = null;
|
|
1468
|
-
#p =
|
|
1469
|
-
|
|
1476
|
+
#p = null;
|
|
1477
|
+
#m = new Ye(this, (e) => {
|
|
1478
|
+
this.resolvedDescriptor = this.descriptor, this.reportState = e?.state ?? null;
|
|
1470
1479
|
});
|
|
1471
1480
|
willUpdate(e) {
|
|
1472
|
-
e.has("controller") && this.#
|
|
1481
|
+
e.has("controller") && this.#m.bind(this.controller), e.has("descriptor") && (this.resolvedDescriptor = this.descriptor);
|
|
1473
1482
|
}
|
|
1474
1483
|
render() {
|
|
1475
|
-
let e = this.
|
|
1476
|
-
if (!e || !t) return
|
|
1484
|
+
let e = this.resolvedDescriptor, t = this.reportState;
|
|
1485
|
+
if (!e || !t) return z``;
|
|
1477
1486
|
let n = e.props, r = this.registry?.resolveReport(e.component);
|
|
1478
|
-
return
|
|
1487
|
+
return z`
|
|
1479
1488
|
<section class="report">
|
|
1480
1489
|
<div class="header">
|
|
1481
1490
|
<div class="copy">
|
|
1482
|
-
<p class="label">${
|
|
1483
|
-
${n.description ?
|
|
1491
|
+
<p class="label">${V(n.label, this.controller?.config.label ?? "")}</p>
|
|
1492
|
+
${n.description ? z`<p class="description">${V(n.description)}</p>` : z``}
|
|
1484
1493
|
</div>
|
|
1485
1494
|
<span class="meta">${this.text.reportStatusLabel(t.status)}</span>
|
|
1486
1495
|
</div>
|
|
1487
1496
|
|
|
1488
|
-
${r ? this.#
|
|
1497
|
+
${r ? this.#h(r) : z`
|
|
1489
1498
|
<mlf-unsupported-component
|
|
1490
1499
|
role="report"
|
|
1491
1500
|
component=${e.component}
|
|
@@ -1495,12 +1504,12 @@ var et = 0, H = class extends E {
|
|
|
1495
1504
|
</section>
|
|
1496
1505
|
`;
|
|
1497
1506
|
}
|
|
1498
|
-
#
|
|
1499
|
-
let t = qe(e), n = this.#
|
|
1500
|
-
return
|
|
1507
|
+
#h(e) {
|
|
1508
|
+
let t = qe(e), n = this.#g(), r = this.transport, i = this.reportState?.status === "ready" ? this.#v() : null, a = this.resolvedDescriptor;
|
|
1509
|
+
return z`
|
|
1501
1510
|
<${t}
|
|
1502
1511
|
.controller=${this.controller}
|
|
1503
|
-
.descriptor=${
|
|
1512
|
+
.descriptor=${a}
|
|
1504
1513
|
.context=${n}
|
|
1505
1514
|
.text=${this.text}
|
|
1506
1515
|
.transport=${r}
|
|
@@ -1508,22 +1517,22 @@ var et = 0, H = class extends E {
|
|
|
1508
1517
|
></${t}>
|
|
1509
1518
|
`;
|
|
1510
1519
|
}
|
|
1511
|
-
#
|
|
1512
|
-
if (this.controller === this.#
|
|
1513
|
-
let e = this.#
|
|
1514
|
-
return this.#
|
|
1520
|
+
#g() {
|
|
1521
|
+
if (this.controller === this.#u && this.resolvedDescriptor === this.#d) return this.#l;
|
|
1522
|
+
let e = this.#_(this.resolvedDescriptor?.props ?? {});
|
|
1523
|
+
return this.#u = this.controller, this.#d = this.resolvedDescriptor, this.#l = e, e;
|
|
1515
1524
|
}
|
|
1516
|
-
#
|
|
1525
|
+
#_(e) {
|
|
1517
1526
|
if (this.controller) return {
|
|
1518
|
-
regionId: `${
|
|
1519
|
-
label:
|
|
1527
|
+
regionId: `${P.reportRegion}-${this.controller.id}-${this.#c}`,
|
|
1528
|
+
label: V(e.label, this.controller.config.label ?? this.controller.id),
|
|
1520
1529
|
description: typeof e.description == "string" && e.description.length > 0 ? e.description : void 0
|
|
1521
1530
|
};
|
|
1522
1531
|
}
|
|
1523
|
-
#
|
|
1532
|
+
#v() {
|
|
1524
1533
|
let e = this.lastResult;
|
|
1525
1534
|
if (!e || !this.controller) return null;
|
|
1526
|
-
if (e === this.#
|
|
1535
|
+
if (e === this.#f && this.#p?.reportId === this.controller.id) return this.#p;
|
|
1527
1536
|
let t = {
|
|
1528
1537
|
reportId: this.controller.id,
|
|
1529
1538
|
backend: e.backend,
|
|
@@ -1535,14 +1544,14 @@ var et = 0, H = class extends E {
|
|
|
1535
1544
|
meta: e.meta,
|
|
1536
1545
|
raw: e.raw
|
|
1537
1546
|
};
|
|
1538
|
-
return this.#
|
|
1547
|
+
return this.#f = e, this.#p = t, t;
|
|
1539
1548
|
}
|
|
1540
1549
|
};
|
|
1541
|
-
|
|
1550
|
+
F([O({ attribute: !1 })], U.prototype, "controller", null), F([O({ attribute: !1 })], U.prototype, "registry", null), F([O({ attribute: !1 })], U.prototype, "text", null), F([O({ attribute: !1 })], U.prototype, "transport", null), F([O({ attribute: !1 })], U.prototype, "lastResult", null), F([O({ attribute: !1 })], U.prototype, "descriptor", null), F([k()], U.prototype, "resolvedDescriptor", null), F([k()], U.prototype, "reportState", null), U = F([D(A.reportFrame)], U);
|
|
1542
1551
|
//#endregion
|
|
1543
1552
|
//#region src/primitives/components/explanation-panel.ts
|
|
1544
|
-
var
|
|
1545
|
-
static styles =
|
|
1553
|
+
var at = 0, W = class extends E {
|
|
1554
|
+
static styles = c`
|
|
1546
1555
|
:host {
|
|
1547
1556
|
display: block;
|
|
1548
1557
|
}
|
|
@@ -1633,7 +1642,7 @@ var tt = 0, U = class extends E {
|
|
|
1633
1642
|
set lastResult(e) {
|
|
1634
1643
|
this.#n = e;
|
|
1635
1644
|
}
|
|
1636
|
-
#r =
|
|
1645
|
+
#r = N;
|
|
1637
1646
|
get text() {
|
|
1638
1647
|
return this.#r;
|
|
1639
1648
|
}
|
|
@@ -1648,29 +1657,36 @@ var tt = 0, U = class extends E {
|
|
|
1648
1657
|
this.#i = e;
|
|
1649
1658
|
}
|
|
1650
1659
|
#a = null;
|
|
1651
|
-
get
|
|
1660
|
+
get resolvedDescriptor() {
|
|
1652
1661
|
return this.#a;
|
|
1653
1662
|
}
|
|
1654
|
-
set
|
|
1663
|
+
set resolvedDescriptor(e) {
|
|
1655
1664
|
this.#a = e;
|
|
1656
1665
|
}
|
|
1657
|
-
#o =
|
|
1658
|
-
|
|
1666
|
+
#o = null;
|
|
1667
|
+
get explanationState() {
|
|
1668
|
+
return this.#o;
|
|
1669
|
+
}
|
|
1670
|
+
set explanationState(e) {
|
|
1671
|
+
this.#o = e;
|
|
1672
|
+
}
|
|
1673
|
+
#s = ++at;
|
|
1659
1674
|
#c = null;
|
|
1660
|
-
#l;
|
|
1675
|
+
#l = null;
|
|
1661
1676
|
#u;
|
|
1662
|
-
#d
|
|
1663
|
-
#f =
|
|
1664
|
-
|
|
1677
|
+
#d;
|
|
1678
|
+
#f = null;
|
|
1679
|
+
#p = new Ye(this, (e) => {
|
|
1680
|
+
this.resolvedDescriptor = this.descriptor, this.explanationState = e?.state ?? null;
|
|
1665
1681
|
});
|
|
1666
1682
|
willUpdate(e) {
|
|
1667
|
-
e.has("controller") && this.#
|
|
1683
|
+
e.has("controller") && this.#p.bind(this.controller), e.has("descriptor") && (this.resolvedDescriptor = this.descriptor), (e.has("lastResult") || e.has("controller")) && this.#_();
|
|
1668
1684
|
}
|
|
1669
1685
|
disconnectedCallback() {
|
|
1670
1686
|
super.disconnectedCallback(), this.controller?.abort();
|
|
1671
1687
|
}
|
|
1672
1688
|
render() {
|
|
1673
|
-
let e = this.
|
|
1689
|
+
let e = this.resolvedDescriptor, t = this.explanationState;
|
|
1674
1690
|
if (!e || !t) return b``;
|
|
1675
1691
|
let n = e.props, r = this.registry?.resolveExplanation(e.component);
|
|
1676
1692
|
return b`
|
|
@@ -1678,14 +1694,14 @@ var tt = 0, U = class extends E {
|
|
|
1678
1694
|
<div class="header">
|
|
1679
1695
|
<div class="copy">
|
|
1680
1696
|
<p class="label">
|
|
1681
|
-
${
|
|
1697
|
+
${V(n.label, this.controller?.config.label ?? this.text.explanationLabel)}
|
|
1682
1698
|
</p>
|
|
1683
|
-
${n.description ? b`<p class="description">${
|
|
1699
|
+
${n.description ? b`<p class="description">${V(n.description)}</p>` : b``}
|
|
1684
1700
|
</div>
|
|
1685
1701
|
<span class="status">${t.status}</span>
|
|
1686
1702
|
</div>
|
|
1687
1703
|
|
|
1688
|
-
${r ? this.#
|
|
1704
|
+
${r ? this.#m(r) : b`
|
|
1689
1705
|
<mlf-unsupported-component
|
|
1690
1706
|
role="explanation"
|
|
1691
1707
|
component=${e.component}
|
|
@@ -1695,37 +1711,37 @@ var tt = 0, U = class extends E {
|
|
|
1695
1711
|
</div>
|
|
1696
1712
|
`;
|
|
1697
1713
|
}
|
|
1698
|
-
#
|
|
1699
|
-
let t = qe(e), n = this.#
|
|
1700
|
-
return
|
|
1714
|
+
#m(e) {
|
|
1715
|
+
let t = qe(e), n = this.#h(), r = this.resolvedDescriptor;
|
|
1716
|
+
return z`
|
|
1701
1717
|
<${t}
|
|
1702
1718
|
.controller=${this.controller}
|
|
1703
|
-
.descriptor=${
|
|
1719
|
+
.descriptor=${r}
|
|
1704
1720
|
.context=${n}
|
|
1705
1721
|
.text=${this.text}
|
|
1706
1722
|
></${t}>
|
|
1707
1723
|
`;
|
|
1708
1724
|
}
|
|
1709
|
-
#
|
|
1710
|
-
if (this.controller === this.#
|
|
1711
|
-
let e = this.#
|
|
1712
|
-
return this.#
|
|
1725
|
+
#h() {
|
|
1726
|
+
if (this.controller === this.#d && this.resolvedDescriptor === this.#f) return this.#u;
|
|
1727
|
+
let e = this.#g(this.resolvedDescriptor?.props ?? {});
|
|
1728
|
+
return this.#d = this.controller, this.#f = this.resolvedDescriptor, this.#u = e, e;
|
|
1713
1729
|
}
|
|
1714
|
-
#
|
|
1730
|
+
#g(e) {
|
|
1715
1731
|
if (this.controller) return {
|
|
1716
|
-
regionId: `${
|
|
1732
|
+
regionId: `${P.explanationRegion}-${this.controller.id}-${this.#s}`,
|
|
1717
1733
|
label: typeof e.label == "string" && e.label.length > 0 ? e.label : this.controller.config.label ?? void 0,
|
|
1718
1734
|
description: typeof e.description == "string" && e.description.length > 0 ? e.description : void 0
|
|
1719
1735
|
};
|
|
1720
1736
|
}
|
|
1721
|
-
#
|
|
1737
|
+
#_() {
|
|
1722
1738
|
let e = this.lastResult, t = this.controller;
|
|
1723
1739
|
if (!e || !t || t.state.status !== "idle") return;
|
|
1724
|
-
let n = this.#
|
|
1740
|
+
let n = this.#v(e, t.id);
|
|
1725
1741
|
t.fetch(n);
|
|
1726
1742
|
}
|
|
1727
|
-
#
|
|
1728
|
-
if (e === this.#
|
|
1743
|
+
#v(e, t) {
|
|
1744
|
+
if (e === this.#c && this.#l?.explanationId === t) return this.#l;
|
|
1729
1745
|
let n = {
|
|
1730
1746
|
explanationId: t,
|
|
1731
1747
|
backend: e.backend,
|
|
@@ -1737,14 +1753,14 @@ var tt = 0, U = class extends E {
|
|
|
1737
1753
|
meta: e.meta,
|
|
1738
1754
|
raw: e.raw
|
|
1739
1755
|
};
|
|
1740
|
-
return this.#
|
|
1756
|
+
return this.#c = e, this.#l = n, n;
|
|
1741
1757
|
}
|
|
1742
1758
|
};
|
|
1743
|
-
|
|
1759
|
+
F([O({ attribute: !1 })], W.prototype, "controller", null), F([O({ attribute: !1 })], W.prototype, "registry", null), F([O({ attribute: !1 })], W.prototype, "lastResult", null), F([O({ attribute: !1 })], W.prototype, "text", null), F([O({ attribute: !1 })], W.prototype, "descriptor", null), F([k()], W.prototype, "resolvedDescriptor", null), F([k()], W.prototype, "explanationState", null), W = F([D(A.explanationPanel)], W);
|
|
1744
1760
|
//#endregion
|
|
1745
1761
|
//#region src/primitives/base-field-element.ts
|
|
1746
|
-
var
|
|
1747
|
-
static styles =
|
|
1762
|
+
var G = class extends E {
|
|
1763
|
+
static styles = c`
|
|
1748
1764
|
:host {
|
|
1749
1765
|
display: block;
|
|
1750
1766
|
min-width: 0;
|
|
@@ -1830,7 +1846,7 @@ var W = class extends E {
|
|
|
1830
1846
|
set context(e) {
|
|
1831
1847
|
this.#n = e;
|
|
1832
1848
|
}
|
|
1833
|
-
#r =
|
|
1849
|
+
#r = N;
|
|
1834
1850
|
get text() {
|
|
1835
1851
|
return this.#r;
|
|
1836
1852
|
}
|
|
@@ -1869,10 +1885,10 @@ var W = class extends E {
|
|
|
1869
1885
|
};
|
|
1870
1886
|
}
|
|
1871
1887
|
};
|
|
1872
|
-
|
|
1888
|
+
F([O({ attribute: !1 })], G.prototype, "controller", null), F([O({ attribute: !1 })], G.prototype, "descriptor", null), F([O({ attribute: !1 })], G.prototype, "context", null), F([O({ attribute: !1 })], G.prototype, "text", null);
|
|
1873
1889
|
//#endregion
|
|
1874
1890
|
//#region src/primitives/components/declarative-field.ts
|
|
1875
|
-
var
|
|
1891
|
+
var ot = {
|
|
1876
1892
|
text: {
|
|
1877
1893
|
component: "text-field",
|
|
1878
1894
|
tagName: A.textField
|
|
@@ -1897,8 +1913,8 @@ var nt = {
|
|
|
1897
1913
|
component: "series-field",
|
|
1898
1914
|
tagName: A.seriesField
|
|
1899
1915
|
}
|
|
1900
|
-
},
|
|
1901
|
-
static styles = [
|
|
1916
|
+
}, st = class extends G {
|
|
1917
|
+
static styles = [G.styles, c`
|
|
1902
1918
|
:host {
|
|
1903
1919
|
display: block;
|
|
1904
1920
|
}
|
|
@@ -1906,11 +1922,11 @@ var nt = {
|
|
|
1906
1922
|
render() {
|
|
1907
1923
|
let e = this.#e();
|
|
1908
1924
|
if (!e) return this.renderAssistiveText();
|
|
1909
|
-
let t =
|
|
1925
|
+
let t = ot[e], n = qe(t.tagName), r = {
|
|
1910
1926
|
component: t.component,
|
|
1911
1927
|
props: this.#t(e)
|
|
1912
1928
|
};
|
|
1913
|
-
return
|
|
1929
|
+
return z`
|
|
1914
1930
|
<${n}
|
|
1915
1931
|
.controller=${this.controller}
|
|
1916
1932
|
.descriptor=${r}
|
|
@@ -1921,18 +1937,18 @@ var nt = {
|
|
|
1921
1937
|
}
|
|
1922
1938
|
#e() {
|
|
1923
1939
|
let e = this.props.widget;
|
|
1924
|
-
return typeof e == "string" && e in
|
|
1940
|
+
return typeof e == "string" && e in ot ? e : null;
|
|
1925
1941
|
}
|
|
1926
1942
|
#t(e) {
|
|
1927
1943
|
let t = { ...this.props };
|
|
1928
1944
|
return delete t.widget, e === "boolean" && (t.checked = t.value === !0), t;
|
|
1929
1945
|
}
|
|
1930
1946
|
};
|
|
1931
|
-
|
|
1947
|
+
st = F([D(A.declarativeField)], st);
|
|
1932
1948
|
//#endregion
|
|
1933
1949
|
//#region src/primitives/base-report-element.ts
|
|
1934
|
-
var
|
|
1935
|
-
static styles =
|
|
1950
|
+
var K = class extends E {
|
|
1951
|
+
static styles = c`
|
|
1936
1952
|
:host {
|
|
1937
1953
|
display: block;
|
|
1938
1954
|
}
|
|
@@ -1969,7 +1985,7 @@ var G = class extends E {
|
|
|
1969
1985
|
set context(e) {
|
|
1970
1986
|
this.#n = e;
|
|
1971
1987
|
}
|
|
1972
|
-
#r =
|
|
1988
|
+
#r = N;
|
|
1973
1989
|
get text() {
|
|
1974
1990
|
return this.#r;
|
|
1975
1991
|
}
|
|
@@ -1997,10 +2013,10 @@ var G = class extends E {
|
|
|
1997
2013
|
return this.context;
|
|
1998
2014
|
}
|
|
1999
2015
|
};
|
|
2000
|
-
|
|
2016
|
+
F([O({ attribute: !1 })], K.prototype, "controller", null), F([O({ attribute: !1 })], K.prototype, "descriptor", null), F([O({ attribute: !1 })], K.prototype, "context", null), F([O({ attribute: !1 })], K.prototype, "text", null), F([O({ attribute: !1 })], K.prototype, "transport", null), F([O({ attribute: !1 })], K.prototype, "request", null);
|
|
2001
2017
|
//#endregion
|
|
2002
2018
|
//#region src/primitives/components/presentation.ts
|
|
2003
|
-
var
|
|
2019
|
+
var q = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutral", J = (e) => {
|
|
2004
2020
|
if (typeof e == "string") return e;
|
|
2005
2021
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return String(e);
|
|
2006
2022
|
if (e == null) return "";
|
|
@@ -2009,26 +2025,26 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2009
2025
|
} catch {
|
|
2010
2026
|
return Object.prototype.toString.call(e);
|
|
2011
2027
|
}
|
|
2012
|
-
},
|
|
2028
|
+
}, ct = (e) => Array.isArray(e) ? e : Object.entries(e).map(([e, t]) => ({
|
|
2013
2029
|
label: e,
|
|
2014
2030
|
value: t
|
|
2015
|
-
})),
|
|
2031
|
+
})), lt = (e) => b`<span>${J(e)}</span>`, ut = (e, t) => {
|
|
2016
2032
|
switch (e.type) {
|
|
2017
2033
|
case "text": return typeof e.value == "string" && e.value.includes("\n") ? b`
|
|
2018
|
-
<section class="node text ${
|
|
2034
|
+
<section class="node text ${q(e.tone)}" data-node-index=${t}>
|
|
2019
2035
|
${e.label ? b`<p class="node-label">${e.label}</p>` : S}
|
|
2020
2036
|
<pre class="node-text">${e.value}</pre>
|
|
2021
2037
|
</section>
|
|
2022
2038
|
` : b`
|
|
2023
|
-
<section class="node text ${
|
|
2039
|
+
<section class="node text ${q(e.tone)}" data-node-index=${t}>
|
|
2024
2040
|
${e.label ? b`<p class="node-label">${e.label}</p>` : S}
|
|
2025
|
-
<p class="node-text">${
|
|
2041
|
+
<p class="node-text">${J(e.value)}</p>
|
|
2026
2042
|
</section>
|
|
2027
2043
|
`;
|
|
2028
2044
|
case "metric": return b`
|
|
2029
|
-
<section class="node metric ${
|
|
2045
|
+
<section class="node metric ${q(e.tone)}" data-node-index=${t}>
|
|
2030
2046
|
<p class="node-label">${e.label}</p>
|
|
2031
|
-
<p class="metric-value">${
|
|
2047
|
+
<p class="metric-value">${J(e.value)}</p>
|
|
2032
2048
|
${e.hint ? b`<p class="node-hint">${e.hint}</p>` : S}
|
|
2033
2049
|
</section>
|
|
2034
2050
|
`;
|
|
@@ -2036,10 +2052,10 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2036
2052
|
<section class="node kv" data-node-index=${t}>
|
|
2037
2053
|
${e.label ? b`<p class="node-label">${e.label}</p>` : S}
|
|
2038
2054
|
<dl class="kv-list">
|
|
2039
|
-
${
|
|
2055
|
+
${ct(e.entries).map((e) => b`
|
|
2040
2056
|
<div class="kv-row">
|
|
2041
2057
|
<dt>${e.label}</dt>
|
|
2042
|
-
<dd>${
|
|
2058
|
+
<dd>${J(e.value)}</dd>
|
|
2043
2059
|
</div>
|
|
2044
2060
|
`)}
|
|
2045
2061
|
</dl>
|
|
@@ -2051,9 +2067,9 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2051
2067
|
<section class="node list" data-node-index=${t}>
|
|
2052
2068
|
${e.label ? b`<p class="node-label">${e.label}</p>` : S}
|
|
2053
2069
|
${n === "ol" ? b`<ol class="node-list">
|
|
2054
|
-
${e.items.map((e) => b`<li>${
|
|
2070
|
+
${e.items.map((e) => b`<li>${J(e)}</li>`)}
|
|
2055
2071
|
</ol>` : b`<ul class="node-list">
|
|
2056
|
-
${e.items.map((e) => b`<li>${
|
|
2072
|
+
${e.items.map((e) => b`<li>${J(e)}</li>`)}
|
|
2057
2073
|
</ul>`}
|
|
2058
2074
|
</section>
|
|
2059
2075
|
`;
|
|
@@ -2071,7 +2087,7 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2071
2087
|
<tbody>
|
|
2072
2088
|
${e.rows.map((t) => b`
|
|
2073
2089
|
<tr>
|
|
2074
|
-
${(Array.isArray(t) ? t : e.columns.map((e) => t[e])).map((e) => b`<td>${
|
|
2090
|
+
${(Array.isArray(t) ? t : e.columns.map((e) => t[e])).map((e) => b`<td>${lt(e)}</td>`)}
|
|
2075
2091
|
</tr>
|
|
2076
2092
|
`)}
|
|
2077
2093
|
</tbody>
|
|
@@ -2081,13 +2097,13 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2081
2097
|
`;
|
|
2082
2098
|
case "badge": return b`
|
|
2083
2099
|
<section class="node badge-row" data-node-index=${t}>
|
|
2084
|
-
<span class="badge ${
|
|
2100
|
+
<span class="badge ${q(e.tone)}">${e.label}</span>
|
|
2085
2101
|
</section>
|
|
2086
2102
|
`;
|
|
2087
2103
|
case "notice": return b`
|
|
2088
|
-
<section class="node notice ${
|
|
2104
|
+
<section class="node notice ${q(e.tone)}" data-node-index=${t}>
|
|
2089
2105
|
${e.title ? b`<p class="node-label">${e.title}</p>` : S}
|
|
2090
|
-
<p class="node-text">${
|
|
2106
|
+
<p class="node-text">${J(e.body)}</p>
|
|
2091
2107
|
</section>
|
|
2092
2108
|
`;
|
|
2093
2109
|
case "json": return b`
|
|
@@ -2097,25 +2113,25 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2097
2113
|
</section>
|
|
2098
2114
|
`;
|
|
2099
2115
|
}
|
|
2100
|
-
},
|
|
2116
|
+
}, dt = (e, t) => {
|
|
2101
2117
|
if (!e && !t) return S;
|
|
2102
|
-
let n =
|
|
2118
|
+
let n = V(e?.title, t ?? ""), r = V(e?.description), i = e?.value, a = V(e?.badge);
|
|
2103
2119
|
return b`
|
|
2104
|
-
<section class="summary ${
|
|
2120
|
+
<section class="summary ${q(e?.tone)}">
|
|
2105
2121
|
<div class="summary-copy">
|
|
2106
2122
|
${n ? b`<p class="summary-title">${n}</p>` : S}
|
|
2107
2123
|
${r ? b`<p class="summary-description">${r}</p>` : S}
|
|
2108
2124
|
</div>
|
|
2109
2125
|
<div class="summary-meta">
|
|
2110
|
-
${i != null &&
|
|
2111
|
-
${a ? b`<span class="badge ${
|
|
2126
|
+
${i != null && J(i).length > 0 ? b`<strong class="summary-value">${J(i)}</strong>` : S}
|
|
2127
|
+
${a ? b`<span class="badge ${q(e?.tone)}">${a}</span>` : S}
|
|
2112
2128
|
</div>
|
|
2113
2129
|
</section>
|
|
2114
2130
|
`;
|
|
2115
|
-
},
|
|
2116
|
-
${e.map((e, t) =>
|
|
2117
|
-
</div>`,
|
|
2118
|
-
static styles = [
|
|
2131
|
+
}, ft = (e) => e.length === 0 ? S : b`<div class="presentation">
|
|
2132
|
+
${e.map((e, t) => ut(e, t))}
|
|
2133
|
+
</div>`, pt = class extends K {
|
|
2134
|
+
static styles = [K.styles, c`
|
|
2119
2135
|
:host {
|
|
2120
2136
|
display: block;
|
|
2121
2137
|
}
|
|
@@ -2263,16 +2279,16 @@ var K = (e) => typeof e == "string" && e.length > 0 ? `tone-${e}` : "tone-neutra
|
|
|
2263
2279
|
render() {
|
|
2264
2280
|
let e = this.props, t = Array.isArray(e.content) ? e.content : [];
|
|
2265
2281
|
return b`
|
|
2266
|
-
${
|
|
2267
|
-
${
|
|
2282
|
+
${dt(e.summary && typeof e.summary == "object" ? e.summary : null, this.reportContext?.label)}
|
|
2283
|
+
${ft(t)}
|
|
2268
2284
|
`;
|
|
2269
2285
|
}
|
|
2270
2286
|
};
|
|
2271
|
-
|
|
2287
|
+
pt = F([D(A.declarativeReport)], pt);
|
|
2272
2288
|
//#endregion
|
|
2273
2289
|
//#region src/primitives/base-explanation-element.ts
|
|
2274
|
-
var
|
|
2275
|
-
static styles =
|
|
2290
|
+
var Y = class extends E {
|
|
2291
|
+
static styles = c`
|
|
2276
2292
|
:host {
|
|
2277
2293
|
display: block;
|
|
2278
2294
|
}
|
|
@@ -2298,7 +2314,7 @@ var J = class extends E {
|
|
|
2298
2314
|
set context(e) {
|
|
2299
2315
|
this.#n = e;
|
|
2300
2316
|
}
|
|
2301
|
-
#r =
|
|
2317
|
+
#r = N;
|
|
2302
2318
|
get text() {
|
|
2303
2319
|
return this.#r;
|
|
2304
2320
|
}
|
|
@@ -2312,11 +2328,11 @@ var J = class extends E {
|
|
|
2312
2328
|
return this.context;
|
|
2313
2329
|
}
|
|
2314
2330
|
};
|
|
2315
|
-
|
|
2331
|
+
F([O({ attribute: !1 })], Y.prototype, "controller", null), F([O({ attribute: !1 })], Y.prototype, "descriptor", null), F([O({ attribute: !1 })], Y.prototype, "context", null), F([O({ attribute: !1 })], Y.prototype, "text", null);
|
|
2316
2332
|
//#endregion
|
|
2317
2333
|
//#region src/primitives/components/declarative-explanation.ts
|
|
2318
|
-
var
|
|
2319
|
-
static styles = [
|
|
2334
|
+
var mt = class extends Y {
|
|
2335
|
+
static styles = [Y.styles, c`
|
|
2320
2336
|
:host {
|
|
2321
2337
|
display: block;
|
|
2322
2338
|
}
|
|
@@ -2452,26 +2468,354 @@ var ut = class extends J {
|
|
|
2452
2468
|
`];
|
|
2453
2469
|
render() {
|
|
2454
2470
|
let e = this.props, t = Array.isArray(e.content) ? e.content : [], n = e.chromeless === !0, r = n && t.length === 1 && t[0]?.type === "text" && !t[0].label ? t[0] : null, i = !n && e.summary && typeof e.summary == "object" ? e.summary : null;
|
|
2455
|
-
return r ? b`<pre class="chromeless-text">${
|
|
2456
|
-
${
|
|
2457
|
-
${
|
|
2471
|
+
return r ? b`<pre class="chromeless-text">${V(r.value)}</pre>` : b`
|
|
2472
|
+
${dt(i, n ? void 0 : this.explanationContext?.label)}
|
|
2473
|
+
${ft(t)}
|
|
2458
2474
|
`;
|
|
2459
2475
|
}
|
|
2460
2476
|
};
|
|
2461
|
-
|
|
2477
|
+
mt = F([D(A.declarativeExplanation)], mt);
|
|
2462
2478
|
//#endregion
|
|
2463
|
-
//#region
|
|
2464
|
-
var
|
|
2479
|
+
//#region src/primitives/components/form-root-styles.ts
|
|
2480
|
+
var ht = c`
|
|
2481
|
+
:host {
|
|
2482
|
+
display: block;
|
|
2483
|
+
flex: 1 1 auto;
|
|
2484
|
+
align-self: stretch;
|
|
2485
|
+
inline-size: 100%;
|
|
2486
|
+
block-size: 100%;
|
|
2487
|
+
max-inline-size: 100%;
|
|
2488
|
+
max-block-size: 100%;
|
|
2489
|
+
color: var(--mlf-shell-color, var(--mlf-color-text, #0f172a));
|
|
2490
|
+
background: var(--mlf-shell-bg, var(--mlf-color-bg, #f5f7fa));
|
|
2491
|
+
font-family: var(--mlf-font-family-body);
|
|
2492
|
+
min-width: 0;
|
|
2493
|
+
min-height: 0;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
*,
|
|
2497
|
+
*::before,
|
|
2498
|
+
*::after {
|
|
2499
|
+
box-sizing: border-box;
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
.root {
|
|
2503
|
+
display: grid;
|
|
2504
|
+
gap: var(--mlf-shell-gap, 1rem);
|
|
2505
|
+
inline-size: 100%;
|
|
2506
|
+
block-size: 100%;
|
|
2507
|
+
min-width: 0;
|
|
2508
|
+
min-height: 0;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
.root.split {
|
|
2512
|
+
display: flex;
|
|
2513
|
+
flex: 1 1 auto;
|
|
2514
|
+
gap: 0;
|
|
2515
|
+
overflow: hidden;
|
|
2516
|
+
inline-size: 100%;
|
|
2517
|
+
block-size: 100%;
|
|
2518
|
+
background: var(--mlf-shell-bg, var(--mlf-color-bg, #f5f7fa));
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
.panel {
|
|
2522
|
+
display: grid;
|
|
2523
|
+
gap: 0;
|
|
2524
|
+
min-width: 0;
|
|
2525
|
+
overflow: hidden;
|
|
2526
|
+
border-radius: var(--mlf-panel-radius, 12px);
|
|
2527
|
+
border: var(--mlf-border-width, 1px) solid
|
|
2528
|
+
var(--mlf-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2529
|
+
background: var(--mlf-panel-bg, var(--mlf-color-surface, #ffffff));
|
|
2530
|
+
box-shadow:
|
|
2531
|
+
0 2px 4px var(--mlf-panel-shadow-soft, rgba(0, 0, 0, 0.04)),
|
|
2532
|
+
0 8px 16px var(--mlf-panel-shadow, rgba(0, 0, 0, 0.04));
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
.pane-header {
|
|
2536
|
+
display: flex;
|
|
2537
|
+
justify-content: space-between;
|
|
2538
|
+
align-items: center;
|
|
2539
|
+
gap: 1rem;
|
|
2540
|
+
padding: 0.85rem 1.5rem;
|
|
2541
|
+
border-bottom: var(--mlf-border-width, 1px) solid
|
|
2542
|
+
var(--mlf-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2543
|
+
background: var(--mlf-panel-header-bg, rgba(255, 255, 255, 0.6));
|
|
2544
|
+
backdrop-filter: blur(var(--mlf-header-blur, 3px));
|
|
2545
|
+
-webkit-backdrop-filter: blur(var(--mlf-header-blur, 3px));
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.pane-copy {
|
|
2549
|
+
display: grid;
|
|
2550
|
+
gap: 0.28rem;
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
.eyebrow {
|
|
2554
|
+
margin: 0;
|
|
2555
|
+
font-size: 0.8rem;
|
|
2556
|
+
font-weight: 600;
|
|
2557
|
+
letter-spacing: 0.06em;
|
|
2558
|
+
text-transform: uppercase;
|
|
2559
|
+
color: var(--mlf-pane-eyebrow-color, var(--mlf-color-text-muted, #475569));
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
.pane-title {
|
|
2563
|
+
margin: 0;
|
|
2564
|
+
color: var(--mlf-pane-title-color, var(--mlf-color-text, #0f172a));
|
|
2565
|
+
font-size: 1rem;
|
|
2566
|
+
font-weight: 600;
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
.status {
|
|
2570
|
+
display: inline-flex;
|
|
2571
|
+
align-items: center;
|
|
2572
|
+
justify-content: center;
|
|
2573
|
+
min-height: 2rem;
|
|
2574
|
+
padding: 0.35rem 0.75rem;
|
|
2575
|
+
border-radius: 999px;
|
|
2576
|
+
background: var(
|
|
2577
|
+
--mlf-status-bg,
|
|
2578
|
+
color-mix(in srgb, var(--mlf-color-accent, #1e40af) 10%, transparent)
|
|
2579
|
+
);
|
|
2580
|
+
color: var(--mlf-status-color, var(--mlf-color-secondary, #475569));
|
|
2581
|
+
font-size: 0.72rem;
|
|
2582
|
+
font-weight: 700;
|
|
2583
|
+
letter-spacing: 0.08em;
|
|
2584
|
+
text-transform: uppercase;
|
|
2585
|
+
white-space: nowrap;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
.pane-body {
|
|
2589
|
+
display: grid;
|
|
2590
|
+
gap: 1rem;
|
|
2591
|
+
padding: 1rem 1rem 0;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
.meta {
|
|
2595
|
+
display: flex;
|
|
2596
|
+
flex-wrap: wrap;
|
|
2597
|
+
gap: 0.6rem 1rem;
|
|
2598
|
+
color: var(--mlf-color-text-muted, #475569);
|
|
2599
|
+
font-size: 0.84rem;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
.collection {
|
|
2603
|
+
display: grid;
|
|
2604
|
+
gap: var(--mlf-section-gap, 1rem);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
.actions {
|
|
2608
|
+
padding: 1rem 1.5rem 1.25rem;
|
|
2609
|
+
border-top: var(--mlf-border-width, 1px) solid
|
|
2610
|
+
var(--mlf-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2611
|
+
background: var(--mlf-panel-footer-bg, var(--mlf-color-bg-light, #f5f7fa));
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
.split-shell {
|
|
2615
|
+
display: flex;
|
|
2616
|
+
flex: 1 1 auto;
|
|
2617
|
+
inline-size: 100%;
|
|
2618
|
+
block-size: 100%;
|
|
2619
|
+
min-width: 0;
|
|
2620
|
+
min-height: 0;
|
|
2621
|
+
overflow: hidden;
|
|
2622
|
+
background: var(--mlf-shell-bg, var(--mlf-color-bg, #f5f7fa));
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
.left-section,
|
|
2626
|
+
.right-section,
|
|
2627
|
+
.form-inputs,
|
|
2628
|
+
.results-area {
|
|
2629
|
+
min-width: 0;
|
|
2630
|
+
min-height: 0;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
.left-section,
|
|
2634
|
+
.right-section {
|
|
2635
|
+
display: flex;
|
|
2636
|
+
flex-direction: column;
|
|
2637
|
+
height: 100%;
|
|
2638
|
+
overflow: hidden;
|
|
2639
|
+
background: var(--mlf-shell-panel-bg, var(--mlf-color-surface, #ffffff));
|
|
2640
|
+
box-shadow:
|
|
2641
|
+
0 2px 4px var(--mlf-shell-panel-shadow-soft, rgba(0, 0, 0, 0.04)),
|
|
2642
|
+
0 14px 30px var(--mlf-shell-panel-shadow, rgba(0, 0, 0, 0.08));
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
.left-section {
|
|
2646
|
+
flex: 0 1 auto;
|
|
2647
|
+
resize: horizontal;
|
|
2648
|
+
min-width: min-content;
|
|
2649
|
+
max-width: var(--mlf-shell-left-max-width, 48rem);
|
|
2650
|
+
border-right: var(--mlf-border-width, 1px) solid
|
|
2651
|
+
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
.right-section {
|
|
2655
|
+
flex: 1 1 0%;
|
|
2656
|
+
min-width: var(--mlf-shell-right-min-width, 24rem);
|
|
2657
|
+
border-left: var(--mlf-border-width, 1px) solid
|
|
2658
|
+
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
.scroll-y {
|
|
2662
|
+
overflow-y: auto;
|
|
2663
|
+
overflow-x: hidden;
|
|
2664
|
+
overscroll-behavior: contain;
|
|
2665
|
+
scrollbar-color: color-mix(in srgb, var(--mlf-color-text-muted, #475569) 60%, transparent)
|
|
2666
|
+
transparent;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
.scroll-y::-webkit-scrollbar {
|
|
2670
|
+
width: 8px;
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
.scroll-y::-webkit-scrollbar-thumb {
|
|
2674
|
+
background: color-mix(in srgb, var(--mlf-color-text-muted, #475569) 55%, transparent);
|
|
2675
|
+
border-radius: 999px;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
.sticky-header {
|
|
2679
|
+
position: sticky;
|
|
2680
|
+
top: 0;
|
|
2681
|
+
z-index: 10;
|
|
2682
|
+
display: flex;
|
|
2683
|
+
align-items: center;
|
|
2684
|
+
justify-content: space-between;
|
|
2685
|
+
gap: 1rem;
|
|
2686
|
+
padding: 0.75rem 2rem;
|
|
2687
|
+
border-bottom: var(--mlf-border-width, 1px) solid
|
|
2688
|
+
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2689
|
+
background: var(
|
|
2690
|
+
--mlf-shell-header-bg,
|
|
2691
|
+
color-mix(in srgb, var(--mlf-color-surface, #ffffff) 76%, transparent)
|
|
2692
|
+
);
|
|
2693
|
+
backdrop-filter: blur(var(--mlf-shell-header-blur, 3px));
|
|
2694
|
+
-webkit-backdrop-filter: blur(var(--mlf-shell-header-blur, 3px));
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
.sticky-header h2 {
|
|
2698
|
+
margin: 0;
|
|
2699
|
+
color: var(--mlf-color-text, #0f172a);
|
|
2700
|
+
font-size: 1rem;
|
|
2701
|
+
font-weight: 600;
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
.sticky-meta {
|
|
2705
|
+
color: var(--mlf-color-text-muted, #475569);
|
|
2706
|
+
font-size: var(--mlf-font-size-xs, 0.72rem);
|
|
2707
|
+
letter-spacing: 0.08em;
|
|
2708
|
+
text-transform: uppercase;
|
|
2709
|
+
white-space: nowrap;
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
.form-inputs,
|
|
2713
|
+
.results-area {
|
|
2714
|
+
flex: 1 1 auto;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
.split-content {
|
|
2718
|
+
display: grid;
|
|
2719
|
+
gap: 1rem;
|
|
2720
|
+
padding: 1.25rem 2rem 2rem;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
.form-actions {
|
|
2724
|
+
padding: 1rem 2rem;
|
|
2725
|
+
border-top: var(--mlf-border-width, 1px) solid
|
|
2726
|
+
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2727
|
+
background: var(--mlf-shell-action-bg, var(--mlf-color-surface-muted, #f5f7fa));
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
.empty-report-state {
|
|
2731
|
+
display: grid;
|
|
2732
|
+
gap: 0.35rem;
|
|
2733
|
+
padding: 1.1rem 1.2rem;
|
|
2734
|
+
border: var(--mlf-border-width, 1px) dashed
|
|
2735
|
+
color-mix(in srgb, var(--mlf-color-border, #e2e8f0) 90%, transparent);
|
|
2736
|
+
border-radius: var(--mlf-radius-md, 16px);
|
|
2737
|
+
background: color-mix(in srgb, var(--mlf-color-surface, #ffffff) 84%, transparent);
|
|
2738
|
+
color: var(--mlf-color-text-muted, #475569);
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
.empty-report-title {
|
|
2742
|
+
margin: 0;
|
|
2743
|
+
color: var(--mlf-color-text, #0f172a);
|
|
2744
|
+
font-size: 0.95rem;
|
|
2745
|
+
font-weight: 600;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
.empty-report-copy {
|
|
2749
|
+
margin: 0;
|
|
2750
|
+
font-size: var(--mlf-font-size-sm, 0.84rem);
|
|
2751
|
+
line-height: var(--mlf-line-height-normal, 1.5);
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
@media (max-width: 900px) {
|
|
2755
|
+
.root.split {
|
|
2756
|
+
display: grid;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
.split-shell {
|
|
2760
|
+
display: grid;
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
.left-section,
|
|
2764
|
+
.right-section {
|
|
2765
|
+
min-width: 0;
|
|
2766
|
+
max-width: none;
|
|
2767
|
+
resize: none;
|
|
2768
|
+
border-left: none;
|
|
2769
|
+
border-right: none;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
.sticky-header,
|
|
2773
|
+
.split-content,
|
|
2774
|
+
.form-actions {
|
|
2775
|
+
padding-inline: 1.25rem;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
`, gt = (e) => ({
|
|
2779
|
+
component: "unsupported-field",
|
|
2780
|
+
props: { label: e.config.label ?? e.id }
|
|
2781
|
+
}), _t = (e, t) => t?.getField(e.kind)?.describe(e.config, {
|
|
2782
|
+
fieldId: e.id,
|
|
2783
|
+
state: e.state,
|
|
2784
|
+
value: e.state.value
|
|
2785
|
+
}) ?? gt(e), vt = (e, t, n) => {
|
|
2786
|
+
let r = n?.getReport(e.kind);
|
|
2787
|
+
return r ? r.describe(e.config, {
|
|
2788
|
+
reportId: e.id,
|
|
2789
|
+
state: e.state,
|
|
2790
|
+
payload: e.state.payload,
|
|
2791
|
+
result: t.state.lastResult
|
|
2792
|
+
}) : null;
|
|
2793
|
+
}, yt = (e, t) => {
|
|
2794
|
+
let n = t?.getExplanation(e.kind);
|
|
2795
|
+
return n ? n.describe(e.config, {
|
|
2796
|
+
explanationId: e.id,
|
|
2797
|
+
state: e.state
|
|
2798
|
+
}) : null;
|
|
2799
|
+
}, bt = (e, t, n) => t.map((t) => e.getField(t)).filter((e) => e !== void 0).map((e) => ({
|
|
2800
|
+
controller: e,
|
|
2801
|
+
descriptor: _t(e, n)
|
|
2802
|
+
})), xt = (e, t, n, r) => (n === "always" ? e.reports : t.map((t) => e.getReport(t)).filter((e) => e !== void 0)).map((t) => ({
|
|
2803
|
+
controller: t,
|
|
2804
|
+
descriptor: vt(t, e, r)
|
|
2805
|
+
})).filter((e) => e.descriptor !== null), St = (e, t, n) => t.map((t) => e.getExplanation(t)).filter((e) => e !== void 0).map((e) => ({
|
|
2806
|
+
controller: e,
|
|
2807
|
+
descriptor: yt(e, n)
|
|
2808
|
+
})), Ct = {
|
|
2465
2809
|
ATTRIBUTE: 1,
|
|
2466
2810
|
CHILD: 2,
|
|
2467
2811
|
PROPERTY: 3,
|
|
2468
2812
|
BOOLEAN_ATTRIBUTE: 4,
|
|
2469
2813
|
EVENT: 5,
|
|
2470
2814
|
ELEMENT: 6
|
|
2471
|
-
},
|
|
2815
|
+
}, wt = (e) => (...t) => ({
|
|
2472
2816
|
_$litDirective$: e,
|
|
2473
2817
|
values: t
|
|
2474
|
-
}),
|
|
2818
|
+
}), Tt = class {
|
|
2475
2819
|
constructor(e) {}
|
|
2476
2820
|
get _$AU() {
|
|
2477
2821
|
return this._$AM._$AU;
|
|
@@ -2485,9 +2829,9 @@ var dt = {
|
|
|
2485
2829
|
update(e, t) {
|
|
2486
2830
|
return this.render(...t);
|
|
2487
2831
|
}
|
|
2488
|
-
}, { I:
|
|
2832
|
+
}, { I: Et } = Le, Dt = (e) => e, Ot = () => document.createComment(""), kt = (e, t, n) => {
|
|
2489
2833
|
let r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
|
|
2490
|
-
if (n === void 0) n = new
|
|
2834
|
+
if (n === void 0) n = new Et(r.insertBefore(Ot(), i), r.insertBefore(Ot(), i), e, e.options);
|
|
2491
2835
|
else {
|
|
2492
2836
|
let t = n._$AB.nextSibling, a = n._$AM, o = a !== e;
|
|
2493
2837
|
if (o) {
|
|
@@ -2497,21 +2841,21 @@ var dt = {
|
|
|
2497
2841
|
if (t !== i || o) {
|
|
2498
2842
|
let e = n._$AA;
|
|
2499
2843
|
for (; e !== t;) {
|
|
2500
|
-
let t =
|
|
2501
|
-
|
|
2844
|
+
let t = Dt(e).nextSibling;
|
|
2845
|
+
Dt(r).insertBefore(e, i), e = t;
|
|
2502
2846
|
}
|
|
2503
2847
|
}
|
|
2504
2848
|
}
|
|
2505
2849
|
return n;
|
|
2506
|
-
},
|
|
2850
|
+
}, X = (e, t, n = e) => (e._$AI(t, n), e), At = {}, jt = (e, t = At) => e._$AH = t, Mt = (e) => e._$AH, Nt = (e) => {
|
|
2507
2851
|
e._$AR(), e._$AA.remove();
|
|
2508
|
-
},
|
|
2852
|
+
}, Pt = (e, t, n) => {
|
|
2509
2853
|
let r = /* @__PURE__ */ new Map();
|
|
2510
2854
|
for (let i = t; i <= n; i++) r.set(e[i], i);
|
|
2511
2855
|
return r;
|
|
2512
|
-
},
|
|
2856
|
+
}, Ft = wt(class extends Tt {
|
|
2513
2857
|
constructor(e) {
|
|
2514
|
-
if (super(e), e.type !==
|
|
2858
|
+
if (super(e), e.type !== Ct.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
2515
2859
|
}
|
|
2516
2860
|
dt(e, t, n) {
|
|
2517
2861
|
let r;
|
|
@@ -2527,334 +2871,205 @@ var dt = {
|
|
|
2527
2871
|
return this.dt(e, t, n).values;
|
|
2528
2872
|
}
|
|
2529
2873
|
update(e, [t, n, r]) {
|
|
2530
|
-
let i =
|
|
2874
|
+
let i = Mt(e), { values: a, keys: o } = this.dt(t, n, r);
|
|
2531
2875
|
if (!Array.isArray(i)) return this.ut = o, a;
|
|
2532
2876
|
let s = this.ut ??= [], c = [], l, u, d = 0, f = i.length - 1, p = 0, m = a.length - 1;
|
|
2533
2877
|
for (; d <= f && p <= m;) if (i[d] === null) d++;
|
|
2534
2878
|
else if (i[f] === null) f--;
|
|
2535
|
-
else if (s[d] === o[p]) c[p] =
|
|
2536
|
-
else if (s[f] === o[m]) c[m] =
|
|
2537
|
-
else if (s[d] === o[m]) c[m] =
|
|
2538
|
-
else if (s[f] === o[p]) c[p] =
|
|
2539
|
-
else if (l === void 0 && (l =
|
|
2879
|
+
else if (s[d] === o[p]) c[p] = X(i[d], a[p]), d++, p++;
|
|
2880
|
+
else if (s[f] === o[m]) c[m] = X(i[f], a[m]), f--, m--;
|
|
2881
|
+
else if (s[d] === o[m]) c[m] = X(i[d], a[m]), kt(e, c[m + 1], i[d]), d++, m--;
|
|
2882
|
+
else if (s[f] === o[p]) c[p] = X(i[f], a[p]), kt(e, i[d], i[f]), f--, p++;
|
|
2883
|
+
else if (l === void 0 && (l = Pt(o, p, m), u = Pt(s, d, f)), l.has(s[d])) if (l.has(s[f])) {
|
|
2540
2884
|
let t = u.get(o[p]), n = t === void 0 ? null : i[t];
|
|
2541
2885
|
if (n === null) {
|
|
2542
|
-
let t =
|
|
2543
|
-
|
|
2544
|
-
} else c[p] =
|
|
2886
|
+
let t = kt(e, i[d]);
|
|
2887
|
+
X(t, a[p]), c[p] = t;
|
|
2888
|
+
} else c[p] = X(n, a[p]), kt(e, i[d], n), i[t] = null;
|
|
2545
2889
|
p++;
|
|
2546
|
-
} else
|
|
2547
|
-
else
|
|
2890
|
+
} else Nt(i[f]), f--;
|
|
2891
|
+
else Nt(i[d]), d++;
|
|
2548
2892
|
for (; p <= m;) {
|
|
2549
|
-
let t =
|
|
2550
|
-
|
|
2893
|
+
let t = kt(e, c[m + 1]);
|
|
2894
|
+
X(t, a[p]), c[p++] = t;
|
|
2551
2895
|
}
|
|
2552
2896
|
for (; d <= f;) {
|
|
2553
2897
|
let e = i[d++];
|
|
2554
|
-
e !== null &&
|
|
2898
|
+
e !== null && Nt(e);
|
|
2555
2899
|
}
|
|
2556
|
-
return this.ut = o,
|
|
2557
|
-
}
|
|
2558
|
-
}),
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2900
|
+
return this.ut = o, jt(e, c), x;
|
|
2901
|
+
}
|
|
2902
|
+
}), It = (e, t, n) => b`
|
|
2903
|
+
<div class="collection" part="field-list">
|
|
2904
|
+
${Ft(e, (e) => e.controller.id, (e) => b`
|
|
2905
|
+
<mlf-field-frame
|
|
2906
|
+
.controller=${e.controller}
|
|
2907
|
+
.descriptor=${e.descriptor}
|
|
2908
|
+
.registry=${t}
|
|
2909
|
+
.text=${n}
|
|
2910
|
+
></mlf-field-frame>
|
|
2911
|
+
`)}
|
|
2912
|
+
</div>
|
|
2913
|
+
`, Lt = (e, t, n, r, i) => b`
|
|
2914
|
+
<div class="collection" part="report-list">
|
|
2915
|
+
${Ft(e, (e) => e.controller.id, (e) => b`
|
|
2916
|
+
<mlf-report-frame
|
|
2917
|
+
.controller=${e.controller}
|
|
2918
|
+
.descriptor=${e.descriptor}
|
|
2919
|
+
.registry=${t}
|
|
2920
|
+
.text=${n}
|
|
2921
|
+
.transport=${r}
|
|
2922
|
+
.lastResult=${i}
|
|
2923
|
+
></mlf-report-frame>
|
|
2924
|
+
`)}
|
|
2925
|
+
</div>
|
|
2926
|
+
`, Rt = (e, t, n, r, i) => {
|
|
2927
|
+
let a = St(e, t.explanationIds, r);
|
|
2928
|
+
return a.length === 0 ? S : b`
|
|
2929
|
+
<div class="collection" part="explanation-list">
|
|
2930
|
+
${Ft(a, (e) => e.controller.id, (t) => b`
|
|
2931
|
+
<mlf-explanation-panel
|
|
2932
|
+
.controller=${t.controller}
|
|
2933
|
+
.descriptor=${t.descriptor}
|
|
2934
|
+
.registry=${n}
|
|
2935
|
+
.text=${i}
|
|
2936
|
+
.lastResult=${e.state.lastResult ?? null}
|
|
2937
|
+
></mlf-explanation-panel>
|
|
2938
|
+
`)}
|
|
2939
|
+
</div>
|
|
2940
|
+
`;
|
|
2941
|
+
}, zt = (e) => b`
|
|
2942
|
+
<div class="root stacked">
|
|
2943
|
+
<section class="panel form-pane" part="form-pane">
|
|
2944
|
+
<header class="pane-header">
|
|
2945
|
+
<div class="pane-copy">
|
|
2946
|
+
<p class="eyebrow">${e.text.formEyebrow}</p>
|
|
2947
|
+
<h1 class="pane-title">${e.formLabel}</h1>
|
|
2948
|
+
</div>
|
|
2949
|
+
<span class="status">${e.text.formStatusLabel(e.state.status)}</span>
|
|
2950
|
+
</header>
|
|
2951
|
+
|
|
2952
|
+
<div class="pane-body">
|
|
2953
|
+
<div class="meta">
|
|
2954
|
+
<span>${e.text.formMetaFields(e.visibleFields.length)}</span>
|
|
2955
|
+
<span>${e.text.formMetaReports(e.form.reports.length)}</span>
|
|
2956
|
+
<span>${e.text.formMetaSubmits(e.state.submitCount)}</span>
|
|
2957
|
+
</div>
|
|
2574
2958
|
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
box-sizing: border-box;
|
|
2579
|
-
}
|
|
2959
|
+
<mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
|
|
2960
|
+
${It(e.visibleFields, e.registry, e.text)}
|
|
2961
|
+
</div>
|
|
2580
2962
|
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2963
|
+
<div class="actions" part="actions">
|
|
2964
|
+
<mlf-submit-button
|
|
2965
|
+
.status=${e.state.status}
|
|
2966
|
+
.idleLabel=${e.submitLabel}
|
|
2967
|
+
.validatingLabel=${e.validatingLabel}
|
|
2968
|
+
.submittingLabel=${e.submittingLabel}
|
|
2969
|
+
.loaded=${e.state.submissionLoaded}
|
|
2970
|
+
.total=${e.state.submissionTotal}
|
|
2971
|
+
.progressMessage=${e.state.submissionMessage}
|
|
2972
|
+
.sessionMessageCount=${e.state.submissionSessionMessageCount}
|
|
2973
|
+
@mlf-submit-request=${e.onSubmitRequest}
|
|
2974
|
+
></mlf-submit-button>
|
|
2975
|
+
</div>
|
|
2976
|
+
</section>
|
|
2589
2977
|
|
|
2590
|
-
.
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2978
|
+
${e.showReports ? b`
|
|
2979
|
+
<aside class="panel report-pane" part="report-pane">
|
|
2980
|
+
<header class="pane-header">
|
|
2981
|
+
<div class="pane-copy">
|
|
2982
|
+
<p class="eyebrow">${e.text.reportEyebrow}</p>
|
|
2983
|
+
<h2 class="pane-title">${e.reportsLabel}</h2>
|
|
2984
|
+
</div>
|
|
2985
|
+
<span class="status">${e.reportsToRender.length}</span>
|
|
2986
|
+
</header>
|
|
2599
2987
|
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2988
|
+
<div class="pane-body">
|
|
2989
|
+
${Lt(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null)}
|
|
2990
|
+
${Rt(e.form, e.state, e.registry, e.presentationRegistry, e.text)}
|
|
2991
|
+
</div>
|
|
2992
|
+
</aside>
|
|
2993
|
+
` : S}
|
|
2994
|
+
</div>
|
|
2995
|
+
`, Bt = (e) => b`
|
|
2996
|
+
<div class="root split">
|
|
2997
|
+
<div class="split-shell">
|
|
2998
|
+
<section class="left-section" part="form-pane">
|
|
2999
|
+
<div class="form-inputs scroll-y">
|
|
3000
|
+
<header class="sticky-header">
|
|
3001
|
+
<h2>${e.formLabel}</h2>
|
|
3002
|
+
<span class="sticky-meta">${e.text.formStatusLabel(e.state.status)}</span>
|
|
3003
|
+
</header>
|
|
2613
3004
|
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
border-bottom: var(--mlf-border-width, 1px) solid
|
|
2621
|
-
var(--mlf-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2622
|
-
background: var(--mlf-panel-header-bg, rgba(255, 255, 255, 0.6));
|
|
2623
|
-
backdrop-filter: blur(var(--mlf-header-blur, 3px));
|
|
2624
|
-
-webkit-backdrop-filter: blur(var(--mlf-header-blur, 3px));
|
|
2625
|
-
}
|
|
3005
|
+
<div class="split-content">
|
|
3006
|
+
<div class="meta">
|
|
3007
|
+
<span>${e.text.formMetaFields(e.visibleFields.length)}</span>
|
|
3008
|
+
<span>${e.text.formMetaReports(e.form.reports.length)}</span>
|
|
3009
|
+
<span>${e.text.formMetaSubmits(e.state.submitCount)}</span>
|
|
3010
|
+
</div>
|
|
2626
3011
|
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
3012
|
+
<mlf-form-errors .form=${e.form} .text=${e.text}></mlf-form-errors>
|
|
3013
|
+
${It(e.visibleFields, e.registry, e.text)}
|
|
3014
|
+
</div>
|
|
3015
|
+
</div>
|
|
2631
3016
|
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
3017
|
+
<div class="form-actions" part="actions">
|
|
3018
|
+
<mlf-submit-button
|
|
3019
|
+
.status=${e.state.status}
|
|
3020
|
+
.idleLabel=${e.submitLabel}
|
|
3021
|
+
.validatingLabel=${e.validatingLabel}
|
|
3022
|
+
.submittingLabel=${e.submittingLabel}
|
|
3023
|
+
.loaded=${e.state.submissionLoaded}
|
|
3024
|
+
.total=${e.state.submissionTotal}
|
|
3025
|
+
.progressMessage=${e.state.submissionMessage}
|
|
3026
|
+
.sessionMessageCount=${e.state.submissionSessionMessageCount}
|
|
3027
|
+
@mlf-submit-request=${e.onSubmitRequest}
|
|
3028
|
+
></mlf-submit-button>
|
|
3029
|
+
</div>
|
|
3030
|
+
</section>
|
|
2640
3031
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
3032
|
+
${e.showReports ? b`
|
|
3033
|
+
<section class="right-section" part="report-pane">
|
|
3034
|
+
<div class="results-area scroll-y">
|
|
3035
|
+
<header class="sticky-header">
|
|
3036
|
+
<h2>${e.reportsLabel}</h2>
|
|
3037
|
+
<span class="sticky-meta">${e.reportsToRender.length}</span>
|
|
3038
|
+
</header>
|
|
2647
3039
|
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
.collection {
|
|
2682
|
-
display: grid;
|
|
2683
|
-
gap: var(--mlf-section-gap, 1rem);
|
|
2684
|
-
}
|
|
2685
|
-
|
|
2686
|
-
.actions {
|
|
2687
|
-
padding: 1rem 1.5rem 1.25rem;
|
|
2688
|
-
border-top: var(--mlf-border-width, 1px) solid
|
|
2689
|
-
var(--mlf-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2690
|
-
background: var(--mlf-panel-footer-bg, var(--mlf-color-bg-light, #f5f7fa));
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
.split-shell {
|
|
2694
|
-
display: flex;
|
|
2695
|
-
flex: 1 1 auto;
|
|
2696
|
-
inline-size: 100%;
|
|
2697
|
-
block-size: 100%;
|
|
2698
|
-
min-width: 0;
|
|
2699
|
-
min-height: 0;
|
|
2700
|
-
overflow: hidden;
|
|
2701
|
-
background: var(--mlf-shell-bg, var(--mlf-color-bg, #f5f7fa));
|
|
2702
|
-
}
|
|
2703
|
-
|
|
2704
|
-
.left-section,
|
|
2705
|
-
.right-section,
|
|
2706
|
-
.form-inputs,
|
|
2707
|
-
.results-area {
|
|
2708
|
-
min-width: 0;
|
|
2709
|
-
min-height: 0;
|
|
2710
|
-
}
|
|
2711
|
-
|
|
2712
|
-
.left-section,
|
|
2713
|
-
.right-section {
|
|
2714
|
-
display: flex;
|
|
2715
|
-
flex-direction: column;
|
|
2716
|
-
height: 100%;
|
|
2717
|
-
overflow: hidden;
|
|
2718
|
-
background: var(--mlf-shell-panel-bg, var(--mlf-color-surface, #ffffff));
|
|
2719
|
-
box-shadow:
|
|
2720
|
-
0 2px 4px var(--mlf-shell-panel-shadow-soft, rgba(0, 0, 0, 0.04)),
|
|
2721
|
-
0 14px 30px var(--mlf-shell-panel-shadow, rgba(0, 0, 0, 0.08));
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
.left-section {
|
|
2725
|
-
flex: 0 1 auto;
|
|
2726
|
-
resize: horizontal;
|
|
2727
|
-
min-width: min-content;
|
|
2728
|
-
max-width: var(--mlf-shell-left-max-width, 48rem);
|
|
2729
|
-
border-right: var(--mlf-border-width, 1px) solid
|
|
2730
|
-
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
.right-section {
|
|
2734
|
-
flex: 1 1 0%;
|
|
2735
|
-
min-width: var(--mlf-shell-right-min-width, 24rem);
|
|
2736
|
-
border-left: var(--mlf-border-width, 1px) solid
|
|
2737
|
-
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2738
|
-
}
|
|
2739
|
-
|
|
2740
|
-
.scroll-y {
|
|
2741
|
-
overflow-y: auto;
|
|
2742
|
-
overflow-x: hidden;
|
|
2743
|
-
overscroll-behavior: contain;
|
|
2744
|
-
scrollbar-color: color-mix(in srgb, var(--mlf-color-text-muted, #475569) 60%, transparent)
|
|
2745
|
-
transparent;
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
|
-
.scroll-y::-webkit-scrollbar {
|
|
2749
|
-
width: 8px;
|
|
2750
|
-
}
|
|
2751
|
-
|
|
2752
|
-
.scroll-y::-webkit-scrollbar-thumb {
|
|
2753
|
-
background: color-mix(in srgb, var(--mlf-color-text-muted, #475569) 55%, transparent);
|
|
2754
|
-
border-radius: 999px;
|
|
2755
|
-
}
|
|
2756
|
-
|
|
2757
|
-
.sticky-header {
|
|
2758
|
-
position: sticky;
|
|
2759
|
-
top: 0;
|
|
2760
|
-
z-index: 10;
|
|
2761
|
-
display: flex;
|
|
2762
|
-
align-items: center;
|
|
2763
|
-
justify-content: space-between;
|
|
2764
|
-
gap: 1rem;
|
|
2765
|
-
padding: 0.75rem 2rem;
|
|
2766
|
-
border-bottom: var(--mlf-border-width, 1px) solid
|
|
2767
|
-
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2768
|
-
background: var(
|
|
2769
|
-
--mlf-shell-header-bg,
|
|
2770
|
-
color-mix(in srgb, var(--mlf-color-surface, #ffffff) 76%, transparent)
|
|
2771
|
-
);
|
|
2772
|
-
backdrop-filter: blur(var(--mlf-shell-header-blur, 3px));
|
|
2773
|
-
-webkit-backdrop-filter: blur(var(--mlf-shell-header-blur, 3px));
|
|
2774
|
-
}
|
|
2775
|
-
|
|
2776
|
-
.sticky-header h2 {
|
|
2777
|
-
margin: 0;
|
|
2778
|
-
color: var(--mlf-color-text, #0f172a);
|
|
2779
|
-
font-size: 1rem;
|
|
2780
|
-
font-weight: 600;
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
.sticky-meta {
|
|
2784
|
-
color: var(--mlf-color-text-muted, #475569);
|
|
2785
|
-
font-size: var(--mlf-font-size-xs, 0.72rem);
|
|
2786
|
-
letter-spacing: 0.08em;
|
|
2787
|
-
text-transform: uppercase;
|
|
2788
|
-
white-space: nowrap;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
.form-inputs,
|
|
2792
|
-
.results-area {
|
|
2793
|
-
flex: 1 1 auto;
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
.split-content {
|
|
2797
|
-
display: grid;
|
|
2798
|
-
gap: 1rem;
|
|
2799
|
-
padding: 1.25rem 2rem 2rem;
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
.form-actions {
|
|
2803
|
-
padding: 1rem 2rem;
|
|
2804
|
-
border-top: var(--mlf-border-width, 1px) solid
|
|
2805
|
-
var(--mlf-shell-panel-border, var(--mlf-color-border, #e2e8f0));
|
|
2806
|
-
background: var(--mlf-shell-action-bg, var(--mlf-color-surface-muted, #f5f7fa));
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
.empty-report-state {
|
|
2810
|
-
display: grid;
|
|
2811
|
-
gap: 0.35rem;
|
|
2812
|
-
padding: 1.1rem 1.2rem;
|
|
2813
|
-
border: var(--mlf-border-width, 1px) dashed
|
|
2814
|
-
color-mix(in srgb, var(--mlf-color-border, #e2e8f0) 90%, transparent);
|
|
2815
|
-
border-radius: var(--mlf-radius-md, 16px);
|
|
2816
|
-
background: color-mix(in srgb, var(--mlf-color-surface, #ffffff) 84%, transparent);
|
|
2817
|
-
color: var(--mlf-color-text-muted, #475569);
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
|
-
.empty-report-title {
|
|
2821
|
-
margin: 0;
|
|
2822
|
-
color: var(--mlf-color-text, #0f172a);
|
|
2823
|
-
font-size: 0.95rem;
|
|
2824
|
-
font-weight: 600;
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
.empty-report-copy {
|
|
2828
|
-
margin: 0;
|
|
2829
|
-
font-size: var(--mlf-font-size-sm, 0.84rem);
|
|
2830
|
-
line-height: var(--mlf-line-height-normal, 1.5);
|
|
2831
|
-
}
|
|
2832
|
-
|
|
2833
|
-
@media (max-width: 900px) {
|
|
2834
|
-
.root.split {
|
|
2835
|
-
display: grid;
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
.split-shell {
|
|
2839
|
-
display: grid;
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
.left-section,
|
|
2843
|
-
.right-section {
|
|
2844
|
-
min-width: 0;
|
|
2845
|
-
max-width: none;
|
|
2846
|
-
resize: none;
|
|
2847
|
-
border-left: none;
|
|
2848
|
-
border-right: none;
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
.sticky-header,
|
|
2852
|
-
.split-content,
|
|
2853
|
-
.form-actions {
|
|
2854
|
-
padding-inline: 1.25rem;
|
|
2855
|
-
}
|
|
2856
|
-
}
|
|
2857
|
-
`;
|
|
3040
|
+
<div class="split-content">
|
|
3041
|
+
${e.reportsToRender.length > 0 ? Lt(e.reportsToRender, e.registry, e.text, e.reportTransport, e.form.state.lastResult ?? null) : b`
|
|
3042
|
+
<div class="empty-report-state">
|
|
3043
|
+
<p class="empty-report-title">${e.text.reportsEmptyTitle}</p>
|
|
3044
|
+
<p class="empty-report-copy">${e.text.reportsEmptyBody}</p>
|
|
3045
|
+
</div>
|
|
3046
|
+
`}
|
|
3047
|
+
${Rt(e.form, e.state, e.registry, e.presentationRegistry, e.text)}
|
|
3048
|
+
</div>
|
|
3049
|
+
</div>
|
|
3050
|
+
</section>
|
|
3051
|
+
` : S}
|
|
3052
|
+
</div>
|
|
3053
|
+
</div>
|
|
3054
|
+
`, Vt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), Ht = (e, t) => e.status === t.status && e.submitCount === t.submitCount && e.hasFormErrors === t.hasFormErrors && e.hasLastResult === t.hasLastResult && e.submissionLoaded === t.submissionLoaded && e.submissionTotal === t.submissionTotal && e.submissionMessage === t.submissionMessage && e.submissionSessionMessageCount === t.submissionSessionMessageCount && Vt(e.visibleFieldIds, t.visibleFieldIds) && Vt(e.visibleReportIds, t.visibleReportIds) && Vt(e.explanationIds, t.explanationIds) && Vt(e.reportStateKeys, t.reportStateKeys) && Vt(e.explanationStateKeys, t.explanationStateKeys), Ut = (e) => {
|
|
3055
|
+
let t = e.state;
|
|
3056
|
+
return {
|
|
3057
|
+
status: t.status,
|
|
3058
|
+
submitCount: t.submitCount,
|
|
3059
|
+
hasFormErrors: t.errors.form.length > 0,
|
|
3060
|
+
hasLastResult: t.lastResult !== null,
|
|
3061
|
+
submissionLoaded: t.submissionProgress?.loaded,
|
|
3062
|
+
submissionTotal: t.submissionProgress?.total,
|
|
3063
|
+
submissionMessage: t.submissionProgress?.message,
|
|
3064
|
+
submissionSessionMessageCount: t.submissionProgress?.sessionMessageCount,
|
|
3065
|
+
visibleFieldIds: e.fields.filter((e) => e.state.visible).map((e) => e.id),
|
|
3066
|
+
visibleReportIds: e.reports.map((e) => e.id),
|
|
3067
|
+
explanationIds: t.lastResult === null ? [] : e.explanations.map((e) => e.id),
|
|
3068
|
+
reportStateKeys: e.reports.map((e) => `${e.id}:${e.state.status}:${e.state.payload === void 0}:${e.state.error === null}`),
|
|
3069
|
+
explanationStateKeys: e.explanations.map((e) => `${e.id}:${e.state.status}:${e.state.result === void 0}:${e.state.error === null}`)
|
|
3070
|
+
};
|
|
3071
|
+
}, Z = class extends E {
|
|
3072
|
+
static styles = ht;
|
|
2858
3073
|
#e;
|
|
2859
3074
|
get form() {
|
|
2860
3075
|
return this.#e;
|
|
@@ -2869,268 +3084,135 @@ var dt = {
|
|
|
2869
3084
|
set registry(e) {
|
|
2870
3085
|
this.#t = e;
|
|
2871
3086
|
}
|
|
2872
|
-
#n
|
|
2873
|
-
get
|
|
3087
|
+
#n;
|
|
3088
|
+
get presentationRegistry() {
|
|
2874
3089
|
return this.#n;
|
|
2875
3090
|
}
|
|
2876
|
-
set
|
|
3091
|
+
set presentationRegistry(e) {
|
|
2877
3092
|
this.#n = e;
|
|
2878
3093
|
}
|
|
2879
|
-
#r =
|
|
2880
|
-
get
|
|
3094
|
+
#r = "stacked";
|
|
3095
|
+
get layout() {
|
|
2881
3096
|
return this.#r;
|
|
2882
3097
|
}
|
|
2883
|
-
set
|
|
3098
|
+
set layout(e) {
|
|
2884
3099
|
this.#r = e;
|
|
2885
3100
|
}
|
|
2886
|
-
#i =
|
|
2887
|
-
get
|
|
3101
|
+
#i = M.form;
|
|
3102
|
+
get formLabel() {
|
|
2888
3103
|
return this.#i;
|
|
2889
3104
|
}
|
|
2890
|
-
set
|
|
3105
|
+
set formLabel(e) {
|
|
2891
3106
|
this.#i = e;
|
|
2892
3107
|
}
|
|
2893
|
-
#a =
|
|
2894
|
-
get
|
|
3108
|
+
#a = M.reports;
|
|
3109
|
+
get reportsLabel() {
|
|
2895
3110
|
return this.#a;
|
|
2896
3111
|
}
|
|
2897
|
-
set
|
|
3112
|
+
set reportsLabel(e) {
|
|
2898
3113
|
this.#a = e;
|
|
2899
3114
|
}
|
|
2900
|
-
#o =
|
|
2901
|
-
get
|
|
3115
|
+
#o = M.submit;
|
|
3116
|
+
get submitLabel() {
|
|
2902
3117
|
return this.#o;
|
|
2903
3118
|
}
|
|
2904
|
-
set
|
|
3119
|
+
set submitLabel(e) {
|
|
2905
3120
|
this.#o = e;
|
|
2906
3121
|
}
|
|
2907
|
-
#s =
|
|
2908
|
-
get
|
|
3122
|
+
#s = M.validating;
|
|
3123
|
+
get validatingLabel() {
|
|
2909
3124
|
return this.#s;
|
|
2910
3125
|
}
|
|
2911
|
-
set
|
|
3126
|
+
set validatingLabel(e) {
|
|
2912
3127
|
this.#s = e;
|
|
2913
3128
|
}
|
|
2914
|
-
#c =
|
|
2915
|
-
get
|
|
3129
|
+
#c = M.submitting;
|
|
3130
|
+
get submittingLabel() {
|
|
2916
3131
|
return this.#c;
|
|
2917
3132
|
}
|
|
2918
|
-
set
|
|
3133
|
+
set submittingLabel(e) {
|
|
2919
3134
|
this.#c = e;
|
|
2920
3135
|
}
|
|
2921
|
-
#l =
|
|
2922
|
-
get
|
|
3136
|
+
#l = "auto";
|
|
3137
|
+
get reportPane() {
|
|
2923
3138
|
return this.#l;
|
|
2924
3139
|
}
|
|
2925
|
-
set
|
|
3140
|
+
set reportPane(e) {
|
|
2926
3141
|
this.#l = e;
|
|
2927
3142
|
}
|
|
2928
|
-
#u;
|
|
2929
|
-
get
|
|
3143
|
+
#u = N;
|
|
3144
|
+
get text() {
|
|
2930
3145
|
return this.#u;
|
|
2931
3146
|
}
|
|
2932
|
-
set
|
|
3147
|
+
set text(e) {
|
|
2933
3148
|
this.#u = e;
|
|
2934
3149
|
}
|
|
2935
|
-
#d
|
|
2936
|
-
get
|
|
3150
|
+
#d;
|
|
3151
|
+
get reportTransport() {
|
|
2937
3152
|
return this.#d;
|
|
2938
3153
|
}
|
|
2939
|
-
set
|
|
3154
|
+
set reportTransport(e) {
|
|
2940
3155
|
this.#d = e;
|
|
2941
3156
|
}
|
|
2942
3157
|
#f = null;
|
|
2943
|
-
|
|
3158
|
+
get formState() {
|
|
3159
|
+
return this.#f;
|
|
3160
|
+
}
|
|
3161
|
+
set formState(e) {
|
|
3162
|
+
this.#f = e;
|
|
3163
|
+
}
|
|
3164
|
+
#p = null;
|
|
3165
|
+
#m;
|
|
2944
3166
|
willUpdate(e) {
|
|
2945
|
-
e.has("form") && this.#
|
|
3167
|
+
e.has("form") && this.#g();
|
|
2946
3168
|
}
|
|
2947
3169
|
connectedCallback() {
|
|
2948
|
-
super.connectedCallback(), this.#
|
|
3170
|
+
super.connectedCallback(), this.#g();
|
|
2949
3171
|
}
|
|
2950
3172
|
disconnectedCallback() {
|
|
2951
|
-
this.#
|
|
3173
|
+
this.#p?.(), this.#p = null, this.#m = void 0, super.disconnectedCallback();
|
|
2952
3174
|
}
|
|
2953
3175
|
render() {
|
|
2954
3176
|
let e = this.form, t = this.formState;
|
|
2955
3177
|
if (!e || !t) return b``;
|
|
2956
|
-
let n = this.text, r =
|
|
2957
|
-
return this.layout === "split" ?
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
.validatingLabel=${this.validatingLabel}
|
|
2993
|
-
.submittingLabel=${this.submittingLabel}
|
|
2994
|
-
.loaded=${t.submissionLoaded}
|
|
2995
|
-
.total=${t.submissionTotal}
|
|
2996
|
-
.progressMessage=${t.submissionMessage}
|
|
2997
|
-
.sessionMessageCount=${t.submissionSessionMessageCount}
|
|
2998
|
-
@mlf-submit-request=${this.#g}
|
|
2999
|
-
></mlf-submit-button>
|
|
3000
|
-
</div>
|
|
3001
|
-
</section>
|
|
3002
|
-
|
|
3003
|
-
${c ? b`
|
|
3004
|
-
<aside class="panel report-pane" part="report-pane">
|
|
3005
|
-
<header class="pane-header">
|
|
3006
|
-
<div class="pane-copy">
|
|
3007
|
-
<p class="eyebrow">${n.reportEyebrow}</p>
|
|
3008
|
-
<h2 class="pane-title">${this.reportsLabel}</h2>
|
|
3009
|
-
</div>
|
|
3010
|
-
<span class="status">${o.length}</span>
|
|
3011
|
-
</header>
|
|
3012
|
-
|
|
3013
|
-
<div class="pane-body">
|
|
3014
|
-
<div class="collection" part="report-list">
|
|
3015
|
-
${X(o, (e) => e.id, (e) => b`
|
|
3016
|
-
<mlf-report-frame
|
|
3017
|
-
.controller=${e}
|
|
3018
|
-
.registry=${this.registry}
|
|
3019
|
-
.text=${n}
|
|
3020
|
-
.transport=${r}
|
|
3021
|
-
.lastResult=${this.form?.state.lastResult ?? null}
|
|
3022
|
-
></mlf-report-frame>
|
|
3023
|
-
`)}
|
|
3024
|
-
</div>
|
|
3025
|
-
${this.#h(e, t, n)}
|
|
3026
|
-
</div>
|
|
3027
|
-
</aside>
|
|
3028
|
-
` : b``}
|
|
3029
|
-
</div>
|
|
3030
|
-
`;
|
|
3031
|
-
}
|
|
3032
|
-
#m(e, t, n, r, i) {
|
|
3033
|
-
let a = this.text, o = this.reportTransport;
|
|
3034
|
-
return b`
|
|
3035
|
-
<div class="root split">
|
|
3036
|
-
<div class="split-shell">
|
|
3037
|
-
<section class="left-section" part="form-pane">
|
|
3038
|
-
<div class="form-inputs scroll-y">
|
|
3039
|
-
<header class="sticky-header">
|
|
3040
|
-
<h2>${this.formLabel}</h2>
|
|
3041
|
-
<span class="sticky-meta">${a.formStatusLabel(t.status)}</span>
|
|
3042
|
-
</header>
|
|
3043
|
-
|
|
3044
|
-
<div class="split-content">
|
|
3045
|
-
<div class="meta">
|
|
3046
|
-
<span>${a.formMetaFields(n.length)}</span>
|
|
3047
|
-
<span>${a.formMetaReports(e.reports.length)}</span>
|
|
3048
|
-
<span>${a.formMetaSubmits(t.submitCount)}</span>
|
|
3049
|
-
</div>
|
|
3050
|
-
|
|
3051
|
-
<mlf-form-errors .form=${e} .text=${a}></mlf-form-errors>
|
|
3052
|
-
|
|
3053
|
-
<div class="collection" part="field-list">
|
|
3054
|
-
${X(n, (e) => e.id, (e) => b`
|
|
3055
|
-
<mlf-field-frame
|
|
3056
|
-
.controller=${e}
|
|
3057
|
-
.registry=${this.registry}
|
|
3058
|
-
.text=${a}
|
|
3059
|
-
></mlf-field-frame>
|
|
3060
|
-
`)}
|
|
3061
|
-
</div>
|
|
3062
|
-
</div>
|
|
3063
|
-
</div>
|
|
3064
|
-
|
|
3065
|
-
<div class="form-actions" part="actions">
|
|
3066
|
-
<mlf-submit-button
|
|
3067
|
-
.status=${t.status}
|
|
3068
|
-
.idleLabel=${this.submitLabel}
|
|
3069
|
-
.validatingLabel=${this.validatingLabel}
|
|
3070
|
-
.submittingLabel=${this.submittingLabel}
|
|
3071
|
-
.loaded=${t.submissionLoaded}
|
|
3072
|
-
.total=${t.submissionTotal}
|
|
3073
|
-
.progressMessage=${t.submissionMessage}
|
|
3074
|
-
.sessionMessageCount=${t.submissionSessionMessageCount}
|
|
3075
|
-
@mlf-submit-request=${this.#g}
|
|
3076
|
-
></mlf-submit-button>
|
|
3077
|
-
</div>
|
|
3078
|
-
</section>
|
|
3079
|
-
|
|
3080
|
-
${i ? b`
|
|
3081
|
-
<section class="right-section" part="report-pane">
|
|
3082
|
-
<div class="results-area scroll-y">
|
|
3083
|
-
<header class="sticky-header">
|
|
3084
|
-
<h2>${this.reportsLabel}</h2>
|
|
3085
|
-
<span class="sticky-meta">${r.length}</span>
|
|
3086
|
-
</header>
|
|
3087
|
-
|
|
3088
|
-
<div class="split-content">
|
|
3089
|
-
${r.length > 0 ? b`
|
|
3090
|
-
<div class="collection" part="report-list">
|
|
3091
|
-
${X(r, (e) => e.id, (e) => b`
|
|
3092
|
-
<mlf-report-frame
|
|
3093
|
-
.controller=${e}
|
|
3094
|
-
.registry=${this.registry}
|
|
3095
|
-
.text=${a}
|
|
3096
|
-
.transport=${o}
|
|
3097
|
-
.lastResult=${this.form?.state.lastResult ?? null}
|
|
3098
|
-
></mlf-report-frame>
|
|
3099
|
-
`)}
|
|
3100
|
-
</div>
|
|
3101
|
-
` : b`
|
|
3102
|
-
<div class="empty-report-state">
|
|
3103
|
-
<p class="empty-report-title">${a.reportsEmptyTitle}</p>
|
|
3104
|
-
<p class="empty-report-copy">${a.reportsEmptyBody}</p>
|
|
3105
|
-
</div>
|
|
3106
|
-
`}
|
|
3107
|
-
${this.#h(e, t, a)}
|
|
3108
|
-
</div>
|
|
3109
|
-
</div>
|
|
3110
|
-
</section>
|
|
3111
|
-
` : b``}
|
|
3112
|
-
</div>
|
|
3113
|
-
</div>
|
|
3114
|
-
`;
|
|
3115
|
-
}
|
|
3116
|
-
#h(e, t, n) {
|
|
3117
|
-
let r = t.explanationIds.map((t) => e.getExplanation(t)).filter((e) => e !== void 0);
|
|
3118
|
-
return r.length === 0 ? b`` : b`
|
|
3119
|
-
<div class="collection" part="explanation-list">
|
|
3120
|
-
${X(r, (e) => e.id, (t) => b`
|
|
3121
|
-
<mlf-explanation-panel
|
|
3122
|
-
.controller=${t}
|
|
3123
|
-
.registry=${this.registry}
|
|
3124
|
-
.text=${n}
|
|
3125
|
-
.lastResult=${e.state.lastResult ?? null}
|
|
3126
|
-
></mlf-explanation-panel>
|
|
3127
|
-
`)}
|
|
3128
|
-
</div>
|
|
3129
|
-
`;
|
|
3130
|
-
}
|
|
3131
|
-
#g = async () => {
|
|
3178
|
+
let n = this.text, r = bt(e, t.visibleFieldIds, this.presentationRegistry), i = xt(e, t.visibleReportIds, this.reportPane, this.presentationRegistry), a = this.reportPane !== "hidden" && (e.reports.length > 0 || t.hasFormErrors), o = this.layout === "split" ? a : this.reportPane === "always" ? e.reports.length > 0 : this.reportPane === "auto" ? i.length > 0 : !1;
|
|
3179
|
+
return this.layout === "split" ? Bt({
|
|
3180
|
+
form: e,
|
|
3181
|
+
state: t,
|
|
3182
|
+
visibleFields: r,
|
|
3183
|
+
reportsToRender: i,
|
|
3184
|
+
showReports: o,
|
|
3185
|
+
registry: this.registry,
|
|
3186
|
+
presentationRegistry: this.presentationRegistry,
|
|
3187
|
+
text: n,
|
|
3188
|
+
formLabel: this.formLabel,
|
|
3189
|
+
reportsLabel: this.reportsLabel,
|
|
3190
|
+
submitLabel: this.submitLabel,
|
|
3191
|
+
validatingLabel: this.validatingLabel,
|
|
3192
|
+
submittingLabel: this.submittingLabel,
|
|
3193
|
+
reportTransport: this.reportTransport,
|
|
3194
|
+
onSubmitRequest: this.#h
|
|
3195
|
+
}) : zt({
|
|
3196
|
+
form: e,
|
|
3197
|
+
state: t,
|
|
3198
|
+
visibleFields: r,
|
|
3199
|
+
reportsToRender: i,
|
|
3200
|
+
showReports: o,
|
|
3201
|
+
registry: this.registry,
|
|
3202
|
+
presentationRegistry: this.presentationRegistry,
|
|
3203
|
+
text: n,
|
|
3204
|
+
formLabel: this.formLabel,
|
|
3205
|
+
reportsLabel: this.reportsLabel,
|
|
3206
|
+
submitLabel: this.submitLabel,
|
|
3207
|
+
validatingLabel: this.validatingLabel,
|
|
3208
|
+
submittingLabel: this.submittingLabel,
|
|
3209
|
+
reportTransport: this.reportTransport,
|
|
3210
|
+
onSubmitRequest: this.#h
|
|
3211
|
+
});
|
|
3212
|
+
}
|
|
3213
|
+
#h = async () => {
|
|
3132
3214
|
if (this.form) {
|
|
3133
|
-
this.dispatchEvent(new CustomEvent(
|
|
3215
|
+
this.dispatchEvent(new CustomEvent(j.submitStart, {
|
|
3134
3216
|
detail: {
|
|
3135
3217
|
form: this.form,
|
|
3136
3218
|
state: this.form.state
|
|
@@ -3140,7 +3222,7 @@ var dt = {
|
|
|
3140
3222
|
}));
|
|
3141
3223
|
try {
|
|
3142
3224
|
let e = await this.form.submit();
|
|
3143
|
-
this.dispatchEvent(new CustomEvent(
|
|
3225
|
+
this.dispatchEvent(new CustomEvent(j.submitSuccess, {
|
|
3144
3226
|
detail: {
|
|
3145
3227
|
form: this.form,
|
|
3146
3228
|
state: this.form.state,
|
|
@@ -3149,13 +3231,13 @@ var dt = {
|
|
|
3149
3231
|
bubbles: !0,
|
|
3150
3232
|
composed: !0
|
|
3151
3233
|
}));
|
|
3152
|
-
} catch (
|
|
3153
|
-
this.dispatchEvent(new CustomEvent(
|
|
3234
|
+
} catch (e) {
|
|
3235
|
+
this.dispatchEvent(new CustomEvent(e instanceof t ? j.submitAbort : j.submitError, {
|
|
3154
3236
|
detail: {
|
|
3155
3237
|
form: this.form,
|
|
3156
3238
|
state: this.form.state,
|
|
3157
3239
|
status: this.form.state.status,
|
|
3158
|
-
error:
|
|
3240
|
+
error: e
|
|
3159
3241
|
},
|
|
3160
3242
|
bubbles: !0,
|
|
3161
3243
|
composed: !0
|
|
@@ -3163,58 +3245,42 @@ var dt = {
|
|
|
3163
3245
|
}
|
|
3164
3246
|
}
|
|
3165
3247
|
};
|
|
3166
|
-
#
|
|
3248
|
+
#g() {
|
|
3167
3249
|
if (!this.isConnected) return;
|
|
3168
|
-
if (this.#
|
|
3169
|
-
this.formState = this.form ?
|
|
3250
|
+
if (this.#m === this.form) {
|
|
3251
|
+
this.formState = this.form ? Ut(this.form) : null;
|
|
3170
3252
|
return;
|
|
3171
3253
|
}
|
|
3172
|
-
if (this.#
|
|
3254
|
+
if (this.#p?.(), this.#p = null, this.#m = this.form, this.formState = this.form ? Ut(this.form) : null, !this.form) return;
|
|
3173
3255
|
let e = this.form;
|
|
3174
|
-
this.#
|
|
3256
|
+
this.#p = e.subscribeSelector(() => Ut(e), (e) => {
|
|
3175
3257
|
this.formState = e;
|
|
3176
|
-
}, { equality:
|
|
3177
|
-
}
|
|
3178
|
-
#v(e) {
|
|
3179
|
-
let t = e.state;
|
|
3180
|
-
return {
|
|
3181
|
-
status: t.status,
|
|
3182
|
-
submitCount: t.submitCount,
|
|
3183
|
-
hasFormErrors: t.errors.form.length > 0,
|
|
3184
|
-
hasLastResult: t.lastResult !== null,
|
|
3185
|
-
submissionLoaded: t.submissionProgress?.loaded,
|
|
3186
|
-
submissionTotal: t.submissionProgress?.total,
|
|
3187
|
-
submissionMessage: t.submissionProgress?.message,
|
|
3188
|
-
submissionSessionMessageCount: t.submissionProgress?.sessionMessageCount,
|
|
3189
|
-
visibleFieldIds: e.fields.filter((e) => e.state.visible).map((e) => e.id),
|
|
3190
|
-
visibleReportIds: e.reports.filter((e) => e.descriptor !== null || e.state.status !== "idle").map((e) => e.id),
|
|
3191
|
-
explanationIds: t.lastResult === null ? [] : e.explanations.map((e) => e.id)
|
|
3192
|
-
};
|
|
3258
|
+
}, { equality: Ht });
|
|
3193
3259
|
}
|
|
3194
3260
|
};
|
|
3195
|
-
|
|
3261
|
+
F([O({ attribute: !1 })], Z.prototype, "form", null), F([O({ attribute: !1 })], Z.prototype, "registry", null), F([O({ attribute: !1 })], Z.prototype, "presentationRegistry", null), F([O({ type: String })], Z.prototype, "layout", null), F([O({
|
|
3196
3262
|
type: String,
|
|
3197
3263
|
attribute: "form-label"
|
|
3198
|
-
})], Z.prototype, "formLabel", null),
|
|
3264
|
+
})], Z.prototype, "formLabel", null), F([O({
|
|
3199
3265
|
type: String,
|
|
3200
3266
|
attribute: "reports-label"
|
|
3201
|
-
})], Z.prototype, "reportsLabel", null),
|
|
3267
|
+
})], Z.prototype, "reportsLabel", null), F([O({
|
|
3202
3268
|
type: String,
|
|
3203
3269
|
attribute: "submit-label"
|
|
3204
|
-
})], Z.prototype, "submitLabel", null),
|
|
3270
|
+
})], Z.prototype, "submitLabel", null), F([O({
|
|
3205
3271
|
type: String,
|
|
3206
3272
|
attribute: "validating-label"
|
|
3207
|
-
})], Z.prototype, "validatingLabel", null),
|
|
3273
|
+
})], Z.prototype, "validatingLabel", null), F([O({
|
|
3208
3274
|
type: String,
|
|
3209
3275
|
attribute: "submitting-label"
|
|
3210
|
-
})], Z.prototype, "submittingLabel", null),
|
|
3276
|
+
})], Z.prototype, "submittingLabel", null), F([O({
|
|
3211
3277
|
type: String,
|
|
3212
3278
|
attribute: "report-pane"
|
|
3213
|
-
})], Z.prototype, "reportPane", null),
|
|
3279
|
+
})], Z.prototype, "reportPane", null), F([O({ attribute: !1 })], Z.prototype, "text", null), F([O({ attribute: !1 })], Z.prototype, "reportTransport", null), F([k()], Z.prototype, "formState", null), Z = F([D(A.form)], Z);
|
|
3214
3280
|
//#endregion
|
|
3215
3281
|
//#region node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/if-defined.js
|
|
3216
|
-
var Q = (e) => e ?? S,
|
|
3217
|
-
static styles = [
|
|
3282
|
+
var Q = (e) => e ?? S, Wt = class extends G {
|
|
3283
|
+
static styles = [G.styles, c`
|
|
3218
3284
|
input {
|
|
3219
3285
|
min-height: var(--mlf-control-height, 3rem);
|
|
3220
3286
|
}
|
|
@@ -3227,10 +3293,10 @@ var Q = (e) => e ?? S, Tt = class extends W {
|
|
|
3227
3293
|
type="text"
|
|
3228
3294
|
id=${t?.controlId ?? ""}
|
|
3229
3295
|
.value=${n}
|
|
3230
|
-
aria-label=${t?.label ??
|
|
3296
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3231
3297
|
aria-describedby=${Q(t?.describedBy)}
|
|
3232
3298
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3233
|
-
placeholder=${
|
|
3299
|
+
placeholder=${V(e.placeholder)}
|
|
3234
3300
|
?required=${!!e.required}
|
|
3235
3301
|
?disabled=${!!this.fieldContext?.disabled}
|
|
3236
3302
|
?readonly=${!!this.fieldContext?.readOnly}
|
|
@@ -3250,11 +3316,11 @@ var Q = (e) => e ?? S, Tt = class extends W {
|
|
|
3250
3316
|
this.commitBlur();
|
|
3251
3317
|
};
|
|
3252
3318
|
};
|
|
3253
|
-
|
|
3319
|
+
Wt = F([D(A.textField)], Wt);
|
|
3254
3320
|
//#endregion
|
|
3255
3321
|
//#region src/primitives/fields/number-field.ts
|
|
3256
|
-
var
|
|
3257
|
-
static styles = [
|
|
3322
|
+
var Gt = class extends G {
|
|
3323
|
+
static styles = [G.styles, c`
|
|
3258
3324
|
.input-wrapper {
|
|
3259
3325
|
position: relative;
|
|
3260
3326
|
min-width: 0;
|
|
@@ -3410,7 +3476,7 @@ var Et = class extends W {
|
|
|
3410
3476
|
this.#t = e;
|
|
3411
3477
|
}
|
|
3412
3478
|
render() {
|
|
3413
|
-
let e = this.props, t = this.fieldContext, n = e.input === "range" ? "range" : "text", r = typeof e.value == "number" ? String(e.value) : e.value === null || e.value === void 0 ? "" :
|
|
3479
|
+
let e = this.props, t = this.fieldContext, n = e.input === "range" ? "range" : "text", r = typeof e.value == "number" ? String(e.value) : e.value === null || e.value === void 0 ? "" : V(e.value), i = this.focused && this.draftValue !== null ? this.draftValue : r, a = typeof e.unit == "string" ? e.unit : "", o = `${Math.max(a.length * .56 + .8, 2.2)}rem`, s = this.fieldContext?.disabled ? "input-wrapper is-disabled" : this.fieldContext?.readOnly ? "input-wrapper is-readonly" : "input-wrapper", c = typeof e.value == "number" ? e.value : void 0, l = typeof e.min == "number" ? e.min : void 0, u = typeof e.max == "number" ? e.max : void 0, d = i.length > 0 ? i : r;
|
|
3414
3480
|
return n === "range" ? b`
|
|
3415
3481
|
<div class="range-wrapper">
|
|
3416
3482
|
<div class="range-header">
|
|
@@ -3424,7 +3490,7 @@ var Et = class extends W {
|
|
|
3424
3490
|
min=${Q(l)}
|
|
3425
3491
|
max=${Q(u)}
|
|
3426
3492
|
step=${Q(typeof e.step == "number" ? String(e.step) : void 0)}
|
|
3427
|
-
aria-label=${t?.label ??
|
|
3493
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3428
3494
|
aria-describedby=${Q(t?.describedBy)}
|
|
3429
3495
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3430
3496
|
aria-valuenow=${Q(c)}
|
|
@@ -3448,8 +3514,8 @@ var Et = class extends W {
|
|
|
3448
3514
|
autocomplete="off"
|
|
3449
3515
|
id=${t?.controlId ?? ""}
|
|
3450
3516
|
.value=${i}
|
|
3451
|
-
placeholder=${
|
|
3452
|
-
aria-label=${t?.label ??
|
|
3517
|
+
placeholder=${V(e.placeholder)}
|
|
3518
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3453
3519
|
aria-describedby=${Q(t?.describedBy)}
|
|
3454
3520
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3455
3521
|
aria-valuenow=${Q(c)}
|
|
@@ -3475,7 +3541,7 @@ var Et = class extends W {
|
|
|
3475
3541
|
this.focused = !1, this.commitValue(this.draftValue === null || this.draftValue === "" ? null : this.draftValue), this.draftValue = null, this.commitBlur();
|
|
3476
3542
|
};
|
|
3477
3543
|
#i = () => {
|
|
3478
|
-
this.focused = !0, this.draftValue = typeof this.props.value == "number" ? String(this.props.value) : this.props.value === null || this.props.value === void 0 ? "" :
|
|
3544
|
+
this.focused = !0, this.draftValue = typeof this.props.value == "number" ? String(this.props.value) : this.props.value === null || this.props.value === void 0 ? "" : V(this.props.value);
|
|
3479
3545
|
};
|
|
3480
3546
|
#a = (e) => {
|
|
3481
3547
|
let t = e.target.value, n = Number(t);
|
|
@@ -3491,11 +3557,11 @@ var Et = class extends W {
|
|
|
3491
3557
|
return e;
|
|
3492
3558
|
}
|
|
3493
3559
|
};
|
|
3494
|
-
|
|
3560
|
+
F([k()], Gt.prototype, "draftValue", null), F([k()], Gt.prototype, "focused", null), Gt = F([D(A.numberField)], Gt);
|
|
3495
3561
|
//#endregion
|
|
3496
3562
|
//#region src/primitives/fields/boolean-field.ts
|
|
3497
|
-
var
|
|
3498
|
-
static styles = [
|
|
3563
|
+
var Kt = class extends G {
|
|
3564
|
+
static styles = [G.styles, c`
|
|
3499
3565
|
fieldset {
|
|
3500
3566
|
display: flex;
|
|
3501
3567
|
width: 100%;
|
|
@@ -3562,11 +3628,11 @@ var Dt = class extends W {
|
|
|
3562
3628
|
}
|
|
3563
3629
|
`];
|
|
3564
3630
|
render() {
|
|
3565
|
-
let e = this.props, t = this.fieldContext, n = e.checked === !0, r = this.text, i =
|
|
3631
|
+
let e = this.props, t = this.fieldContext, n = e.checked === !0, r = this.text, i = P.booleanGroup, a = `${t?.controlId ?? i}-true`, o = `${t?.controlId ?? i}-false`, s = V(e.trueLabel, r.booleanTrue), c = V(e.falseLabel, r.booleanFalse), l = !!(this.fieldContext?.disabled || this.fieldContext?.readOnly);
|
|
3566
3632
|
return b`
|
|
3567
3633
|
<fieldset
|
|
3568
3634
|
role="radiogroup"
|
|
3569
|
-
aria-label=${t?.label ??
|
|
3635
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3570
3636
|
aria-describedby=${Q(t?.describedBy)}
|
|
3571
3637
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3572
3638
|
aria-readonly=${String(!!this.fieldContext?.readOnly)}
|
|
@@ -3605,14 +3671,14 @@ var Dt = class extends W {
|
|
|
3605
3671
|
this.commitBlur();
|
|
3606
3672
|
};
|
|
3607
3673
|
};
|
|
3608
|
-
|
|
3674
|
+
Kt = F([D(A.booleanField)], Kt);
|
|
3609
3675
|
//#endregion
|
|
3610
3676
|
//#region src/primitives/fields/category-field.ts
|
|
3611
|
-
var
|
|
3677
|
+
var qt = (e) => typeof e == "string" ? {
|
|
3612
3678
|
label: e,
|
|
3613
3679
|
value: e
|
|
3614
|
-
} : e,
|
|
3615
|
-
static styles = [
|
|
3680
|
+
} : e, Jt = (e, t) => typeof e != "string" || e.length === 0 ? "" : t.some((t) => qt(t).value === e) ? e : "", Yt = class extends G {
|
|
3681
|
+
static styles = [G.styles, c`
|
|
3616
3682
|
.select-wrap {
|
|
3617
3683
|
position: relative;
|
|
3618
3684
|
min-width: 0;
|
|
@@ -3642,13 +3708,13 @@ var Ot = (e) => typeof e == "string" ? {
|
|
|
3642
3708
|
}
|
|
3643
3709
|
`];
|
|
3644
3710
|
render() {
|
|
3645
|
-
let e = this.props, t = this.fieldContext, n = typeof e.value == "string" ? e.value : "", r = Array.isArray(e.options) ? e.options : [], i =
|
|
3711
|
+
let e = this.props, t = this.fieldContext, n = typeof e.value == "string" ? e.value : "", r = Array.isArray(e.options) ? e.options : [], i = Jt(n, r), a = this.text;
|
|
3646
3712
|
return b`
|
|
3647
3713
|
<div class="select-wrap">
|
|
3648
3714
|
<select
|
|
3649
3715
|
class="control"
|
|
3650
3716
|
id=${t?.controlId ?? ""}
|
|
3651
|
-
aria-label=${t?.label ??
|
|
3717
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3652
3718
|
aria-describedby=${Q(t?.describedBy)}
|
|
3653
3719
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3654
3720
|
aria-readonly=${String(!!this.fieldContext?.readOnly)}
|
|
@@ -3661,7 +3727,7 @@ var Ot = (e) => typeof e == "string" ? {
|
|
|
3661
3727
|
— ${a.categoryPlaceholder} —
|
|
3662
3728
|
</option>
|
|
3663
3729
|
${r.map((e) => {
|
|
3664
|
-
let t =
|
|
3730
|
+
let t = qt(e);
|
|
3665
3731
|
return b`
|
|
3666
3732
|
<option value=${t.value} ?selected=${t.value === i}>
|
|
3667
3733
|
${t.label}
|
|
@@ -3688,11 +3754,11 @@ var Ot = (e) => typeof e == "string" ? {
|
|
|
3688
3754
|
this.commitBlur();
|
|
3689
3755
|
};
|
|
3690
3756
|
};
|
|
3691
|
-
|
|
3757
|
+
Yt = F([D(A.categoryField)], Yt);
|
|
3692
3758
|
//#endregion
|
|
3693
3759
|
//#region src/primitives/fields/date-field.ts
|
|
3694
|
-
var
|
|
3695
|
-
static styles = [
|
|
3760
|
+
var Xt = class extends G {
|
|
3761
|
+
static styles = [G.styles, c`
|
|
3696
3762
|
input {
|
|
3697
3763
|
min-height: var(--mlf-control-height, 3rem);
|
|
3698
3764
|
}
|
|
@@ -3709,7 +3775,7 @@ var jt = class extends W {
|
|
|
3709
3775
|
type="date"
|
|
3710
3776
|
id=${t?.controlId ?? ""}
|
|
3711
3777
|
.value=${n}
|
|
3712
|
-
aria-label=${t?.label ??
|
|
3778
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
3713
3779
|
aria-describedby=${Q(t?.describedBy)}
|
|
3714
3780
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
3715
3781
|
?required=${!!e.required}
|
|
@@ -3732,189 +3798,190 @@ var jt = class extends W {
|
|
|
3732
3798
|
this.commitBlur();
|
|
3733
3799
|
};
|
|
3734
3800
|
};
|
|
3735
|
-
|
|
3801
|
+
Xt = F([D(A.dateField)], Xt);
|
|
3736
3802
|
//#endregion
|
|
3737
|
-
//#region src/primitives/fields/series-field.ts
|
|
3738
|
-
var
|
|
3803
|
+
//#region src/primitives/fields/series-field-helpers.ts
|
|
3804
|
+
var Zt = 0, Qt = () => `series-row-${++Zt}`, $t = (e) => e === !0 || e === !1 ? e : e === "true" ? !0 : e === "false" ? !1 : "", en = (e, t) => {
|
|
3739
3805
|
switch (e.kind) {
|
|
3740
3806
|
case "number": return typeof t == "number" ? String(t) : typeof t == "string" ? t : "";
|
|
3741
3807
|
case "date": return typeof t == "string" ? t : "";
|
|
3742
3808
|
case "category":
|
|
3743
3809
|
case "text": return typeof t == "string" ? t : "";
|
|
3744
|
-
case "boolean": return
|
|
3810
|
+
case "boolean": return $t(t);
|
|
3745
3811
|
default: return typeof t == "string" ? t : t ?? "";
|
|
3746
3812
|
}
|
|
3747
|
-
},
|
|
3813
|
+
}, tn = (e, t, n) => Array.isArray(e) ? e.map((e) => {
|
|
3748
3814
|
let r = e;
|
|
3749
3815
|
return {
|
|
3750
|
-
key:
|
|
3751
|
-
field1:
|
|
3752
|
-
field2:
|
|
3816
|
+
key: Qt(),
|
|
3817
|
+
field1: en(t, r.field1),
|
|
3818
|
+
field2: en(n, r.field2)
|
|
3753
3819
|
};
|
|
3754
|
-
}) : [],
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3820
|
+
}) : [], nn = (e, t) => {
|
|
3821
|
+
switch (e.kind) {
|
|
3822
|
+
case "number":
|
|
3823
|
+
case "date":
|
|
3824
|
+
case "category":
|
|
3825
|
+
case "text":
|
|
3826
|
+
case "boolean": return t === "" ? null : t;
|
|
3827
|
+
default: return t === "" ? null : t;
|
|
3828
|
+
}
|
|
3829
|
+
}, rn = (e) => typeof e.unit == "string" ? e.unit : "", an = c`
|
|
3830
|
+
.series {
|
|
3831
|
+
display: grid;
|
|
3832
|
+
gap: 0.9rem;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
.toolbar {
|
|
3836
|
+
display: flex;
|
|
3837
|
+
justify-content: flex-end;
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
.add-btn,
|
|
3841
|
+
.remove-btn {
|
|
3842
|
+
border: var(--mlf-border-width, 1px) solid
|
|
3843
|
+
var(--mlf-series-action-border, var(--mlf-color-border, #cbd5e1));
|
|
3844
|
+
background: var(
|
|
3845
|
+
--mlf-series-action-bg,
|
|
3846
|
+
color-mix(in srgb, var(--mlf-color-accent, #1e40af) 9%, var(--mlf-color-surface, #ffffff))
|
|
3847
|
+
);
|
|
3848
|
+
color: var(--mlf-series-action-text, var(--mlf-color-text, #0f172a));
|
|
3849
|
+
font: inherit;
|
|
3850
|
+
line-height: 1;
|
|
3851
|
+
cursor: pointer;
|
|
3852
|
+
transition:
|
|
3853
|
+
background 0.2s ease,
|
|
3854
|
+
border-color 0.2s ease,
|
|
3855
|
+
transform 0.2s ease;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
.add-btn {
|
|
3859
|
+
padding: 0.7rem 1rem;
|
|
3860
|
+
border-radius: 999px;
|
|
3861
|
+
font-size: 0.85rem;
|
|
3862
|
+
font-weight: 700;
|
|
3863
|
+
letter-spacing: 0.01em;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3866
|
+
.remove-btn {
|
|
3867
|
+
width: 2.25rem;
|
|
3868
|
+
height: 2.25rem;
|
|
3869
|
+
border-radius: 0.8rem;
|
|
3870
|
+
font-size: 1.15rem;
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
.add-btn:hover:not(:disabled),
|
|
3874
|
+
.remove-btn:hover:not(:disabled) {
|
|
3875
|
+
background: var(
|
|
3876
|
+
--mlf-series-action-bg-hover,
|
|
3877
|
+
color-mix(in srgb, var(--mlf-color-accent, #1e40af) 16%, var(--mlf-color-surface, #ffffff))
|
|
3878
|
+
);
|
|
3879
|
+
border-color: var(--mlf-series-action-border-hover, var(--mlf-color-accent, #1e40af));
|
|
3880
|
+
transform: translateY(-1px);
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
.add-btn:disabled,
|
|
3884
|
+
.remove-btn:disabled {
|
|
3885
|
+
cursor: not-allowed;
|
|
3886
|
+
opacity: 0.65;
|
|
3887
|
+
transform: none;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
.grid {
|
|
3891
|
+
display: grid;
|
|
3892
|
+
gap: 0.65rem;
|
|
3893
|
+
}
|
|
3894
|
+
|
|
3895
|
+
.header,
|
|
3896
|
+
.row {
|
|
3897
|
+
display: grid;
|
|
3898
|
+
grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) auto;
|
|
3899
|
+
gap: 0.65rem;
|
|
3900
|
+
align-items: start;
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
.header {
|
|
3904
|
+
padding: 0 0.15rem;
|
|
3905
|
+
color: var(--mlf-series-heading, var(--mlf-color-text-muted, #475569));
|
|
3906
|
+
font-size: 0.72rem;
|
|
3907
|
+
font-weight: 700;
|
|
3908
|
+
letter-spacing: 0.08em;
|
|
3909
|
+
text-transform: uppercase;
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
.row {
|
|
3913
|
+
padding: 0.55rem;
|
|
3914
|
+
border-radius: 1rem;
|
|
3915
|
+
background: var(
|
|
3916
|
+
--mlf-series-row-bg,
|
|
3917
|
+
color-mix(in srgb, var(--mlf-color-surface, #ffffff) 80%, var(--mlf-color-bg-light, #f8fafc))
|
|
3918
|
+
);
|
|
3919
|
+
border: var(--mlf-border-width, 1px) solid
|
|
3920
|
+
var(
|
|
3921
|
+
--mlf-series-row-border,
|
|
3922
|
+
color-mix(in srgb, var(--mlf-color-border, #e2e8f0) 90%, transparent)
|
|
3923
|
+
);
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
.cell {
|
|
3927
|
+
min-width: 0;
|
|
3928
|
+
}
|
|
3929
|
+
|
|
3930
|
+
.cell select,
|
|
3931
|
+
.cell input {
|
|
3932
|
+
min-height: var(--mlf-control-height, 3rem);
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3935
|
+
.value-wrap {
|
|
3936
|
+
position: relative;
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
.value-wrap input {
|
|
3940
|
+
padding-right: calc(var(--mlf-series-unit-width, 2rem) + 1.8rem);
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
.unit {
|
|
3944
|
+
position: absolute;
|
|
3945
|
+
top: 50%;
|
|
3946
|
+
right: 0.85rem;
|
|
3947
|
+
transform: translateY(-50%);
|
|
3948
|
+
max-width: 42%;
|
|
3949
|
+
overflow: hidden;
|
|
3950
|
+
color: var(--mlf-series-unit-color, var(--mlf-color-text-muted, #475569));
|
|
3951
|
+
font-size: 0.82rem;
|
|
3952
|
+
font-weight: 700;
|
|
3953
|
+
text-overflow: ellipsis;
|
|
3954
|
+
white-space: nowrap;
|
|
3955
|
+
pointer-events: none;
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
.unit:empty {
|
|
3959
|
+
display: none;
|
|
3960
|
+
}
|
|
3961
|
+
|
|
3962
|
+
.empty {
|
|
3963
|
+
padding: 0.95rem 1rem;
|
|
3964
|
+
border-radius: 0.9rem;
|
|
3965
|
+
border: 1px dashed var(--mlf-series-empty-border, var(--mlf-color-border, #cbd5e1));
|
|
3966
|
+
color: var(--mlf-series-empty-text, var(--mlf-color-text-muted, #475569));
|
|
3967
|
+
font-size: 0.9rem;
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
@media (max-width: 640px) {
|
|
3971
|
+
.header {
|
|
3972
|
+
display: none;
|
|
3973
|
+
}
|
|
3908
3974
|
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3975
|
+
.row {
|
|
3976
|
+
grid-template-columns: 1fr;
|
|
3977
|
+
}
|
|
3912
3978
|
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3979
|
+
.remove-btn {
|
|
3980
|
+
justify-self: end;
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
`, on = class extends G {
|
|
3984
|
+
static styles = [G.styles, an];
|
|
3918
3985
|
#e = [];
|
|
3919
3986
|
get rows() {
|
|
3920
3987
|
return this.#e;
|
|
@@ -3927,7 +3994,7 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
3927
3994
|
super.willUpdate(e), e.has("descriptor") && this.#i();
|
|
3928
3995
|
}
|
|
3929
3996
|
render() {
|
|
3930
|
-
let e = this.fieldContext, t = !!this.fieldContext?.disabled, n = !!this.fieldContext?.readOnly, r = t || n, i = this.#n, a = this.#r, o = `${Math.max(
|
|
3997
|
+
let e = this.fieldContext, t = !!this.fieldContext?.disabled, n = !!this.fieldContext?.readOnly, r = t || n, i = this.#n, a = this.#r, o = `${Math.max(rn(a).length * .56 + .8, 2.3)}rem`, s = this.text;
|
|
3931
3998
|
return b`
|
|
3932
3999
|
<div class="series" style=${`--mlf-series-unit-width: ${o};`}>
|
|
3933
4000
|
<div class="toolbar">
|
|
@@ -3945,8 +4012,8 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
3945
4012
|
${this.rows.length > 0 ? b`
|
|
3946
4013
|
<div class="grid">
|
|
3947
4014
|
<div class="header" aria-hidden="true">
|
|
3948
|
-
<div>${
|
|
3949
|
-
<div>${
|
|
4015
|
+
<div>${V(i.label, "field1")}</div>
|
|
4016
|
+
<div>${V(a.label, "field2")}</div>
|
|
3950
4017
|
<div></div>
|
|
3951
4018
|
</div>
|
|
3952
4019
|
${this.rows.map((o, c) => {
|
|
@@ -3954,10 +4021,10 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
3954
4021
|
return b`
|
|
3955
4022
|
<div class="row">
|
|
3956
4023
|
<div class="cell">
|
|
3957
|
-
${this.#
|
|
4024
|
+
${this.#u(i, o.field1, c, l, t, n, 1)}
|
|
3958
4025
|
</div>
|
|
3959
4026
|
<div class="cell">
|
|
3960
|
-
${this.#
|
|
4027
|
+
${this.#u(a, o.field2, c, u, t, n, 2)}
|
|
3961
4028
|
</div>
|
|
3962
4029
|
<button
|
|
3963
4030
|
class="remove-btn"
|
|
@@ -3984,11 +4051,11 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
3984
4051
|
return this.props.field2 ?? {};
|
|
3985
4052
|
}
|
|
3986
4053
|
#i() {
|
|
3987
|
-
this.rows =
|
|
4054
|
+
this.rows = tn(this.props.value, this.#n, this.#r), this.#t = !1;
|
|
3988
4055
|
}
|
|
3989
4056
|
#a = () => {
|
|
3990
4057
|
this.rows = [...this.rows, {
|
|
3991
|
-
key:
|
|
4058
|
+
key: Qt(),
|
|
3992
4059
|
field1: "",
|
|
3993
4060
|
field2: ""
|
|
3994
4061
|
}], this.#t = !0, this.#l();
|
|
@@ -4007,25 +4074,12 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4007
4074
|
};
|
|
4008
4075
|
#l() {
|
|
4009
4076
|
this.#t &&= (this.commitValue(this.rows.map((e) => ({
|
|
4010
|
-
field1:
|
|
4011
|
-
field2:
|
|
4077
|
+
field1: nn(this.#n, e.field1),
|
|
4078
|
+
field2: nn(this.#r, e.field2)
|
|
4012
4079
|
}))), !1);
|
|
4013
4080
|
}
|
|
4014
|
-
#u(e, t) {
|
|
4015
|
-
|
|
4016
|
-
case "number":
|
|
4017
|
-
case "date":
|
|
4018
|
-
case "category":
|
|
4019
|
-
case "text": return t === "" ? null : t;
|
|
4020
|
-
case "boolean": return t === "" ? null : t;
|
|
4021
|
-
default: return t === "" ? null : t;
|
|
4022
|
-
}
|
|
4023
|
-
}
|
|
4024
|
-
#d(e) {
|
|
4025
|
-
return typeof e.unit == "string" ? e.unit : "";
|
|
4026
|
-
}
|
|
4027
|
-
#f(e, t, n, r, i, a, o) {
|
|
4028
|
-
let s = this.fieldContext, c = `${s?.label ?? B(this.props.label)} ${B(e.label, `field${o}`)} ${n + 1}`, l = !!e.required;
|
|
4081
|
+
#u(e, t, n, r, i, a, o) {
|
|
4082
|
+
let s = this.fieldContext, c = `${s?.label ?? V(this.props.label)} ${V(e.label, `field${o}`)} ${n + 1}`, l = !!e.required;
|
|
4029
4083
|
switch (e.kind) {
|
|
4030
4084
|
case "date": return b`
|
|
4031
4085
|
<input
|
|
@@ -4080,7 +4134,7 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4080
4134
|
`;
|
|
4081
4135
|
}
|
|
4082
4136
|
case "boolean": {
|
|
4083
|
-
let u =
|
|
4137
|
+
let u = V(e.trueLabel, this.text.booleanTrue), d = V(e.falseLabel, this.text.booleanFalse), f = t === !0 ? "true" : t === !1 ? "false" : "";
|
|
4084
4138
|
return b`
|
|
4085
4139
|
<select
|
|
4086
4140
|
class="control"
|
|
@@ -4103,7 +4157,7 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4103
4157
|
`;
|
|
4104
4158
|
}
|
|
4105
4159
|
case "number": {
|
|
4106
|
-
let u =
|
|
4160
|
+
let u = rn(e);
|
|
4107
4161
|
return b`
|
|
4108
4162
|
<div class="value-wrap">
|
|
4109
4163
|
<input
|
|
@@ -4114,7 +4168,7 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4114
4168
|
spellcheck="false"
|
|
4115
4169
|
autocomplete="off"
|
|
4116
4170
|
.value=${typeof t == "string" ? t : ""}
|
|
4117
|
-
placeholder=${
|
|
4171
|
+
placeholder=${V(e.placeholder)}
|
|
4118
4172
|
aria-label=${c}
|
|
4119
4173
|
aria-describedby=${Q(s?.describedBy)}
|
|
4120
4174
|
aria-invalid=${String(s?.invalid ?? !1)}
|
|
@@ -4136,7 +4190,7 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4136
4190
|
id=${r}
|
|
4137
4191
|
type="text"
|
|
4138
4192
|
.value=${typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" || typeof t == "bigint" ? `${t}` : ""}
|
|
4139
|
-
placeholder=${
|
|
4193
|
+
placeholder=${V(e.placeholder)}
|
|
4140
4194
|
aria-label=${c}
|
|
4141
4195
|
aria-describedby=${Q(s?.describedBy)}
|
|
4142
4196
|
aria-invalid=${String(s?.invalid ?? !1)}
|
|
@@ -4150,11 +4204,11 @@ var Mt = 0, Nt = () => `series-row-${++Mt}`, Pt = (e) => e === !0 || e === !1 ?
|
|
|
4150
4204
|
}
|
|
4151
4205
|
}
|
|
4152
4206
|
};
|
|
4153
|
-
|
|
4207
|
+
F([k()], on.prototype, "rows", null), on = F([D(A.seriesField)], on);
|
|
4154
4208
|
//#endregion
|
|
4155
4209
|
//#region src/primitives/fields/long-text-field.ts
|
|
4156
|
-
var
|
|
4157
|
-
static styles = [
|
|
4210
|
+
var sn = class extends G {
|
|
4211
|
+
static styles = [G.styles, c`
|
|
4158
4212
|
textarea.control {
|
|
4159
4213
|
resize: vertical;
|
|
4160
4214
|
min-height: 6rem;
|
|
@@ -4168,9 +4222,9 @@ var Rt = class extends W {
|
|
|
4168
4222
|
class="control"
|
|
4169
4223
|
id=${t?.controlId ?? ""}
|
|
4170
4224
|
.value=${n}
|
|
4171
|
-
placeholder=${
|
|
4225
|
+
placeholder=${V(e.placeholder)}
|
|
4172
4226
|
rows=${r}
|
|
4173
|
-
aria-label=${t?.label ??
|
|
4227
|
+
aria-label=${t?.label ?? V(e.label)}
|
|
4174
4228
|
aria-describedby=${Q(t?.describedBy)}
|
|
4175
4229
|
aria-invalid=${String(t?.invalid ?? !1)}
|
|
4176
4230
|
?required=${!!e.required}
|
|
@@ -4189,14 +4243,14 @@ var Rt = class extends W {
|
|
|
4189
4243
|
this.commitBlur();
|
|
4190
4244
|
};
|
|
4191
4245
|
};
|
|
4192
|
-
|
|
4246
|
+
sn = F([D(A.longTextField)], sn);
|
|
4193
4247
|
//#endregion
|
|
4194
4248
|
//#region src/primitives/fields/single-choice-field.ts
|
|
4195
|
-
var
|
|
4249
|
+
var cn = (e) => typeof e == "string" ? {
|
|
4196
4250
|
label: e,
|
|
4197
4251
|
value: e
|
|
4198
|
-
} : e,
|
|
4199
|
-
static styles = [
|
|
4252
|
+
} : e, ln = class extends G {
|
|
4253
|
+
static styles = [G.styles, c`
|
|
4200
4254
|
fieldset {
|
|
4201
4255
|
border: none;
|
|
4202
4256
|
padding: 0;
|
|
@@ -4257,7 +4311,7 @@ var zt = (e) => typeof e == "string" ? {
|
|
|
4257
4311
|
}
|
|
4258
4312
|
`];
|
|
4259
4313
|
render() {
|
|
4260
|
-
let e = this.props, t = this.fieldContext, n = typeof e.value == "string" ? e.value : null, r = Array.isArray(e.options) ? e.options : [], i = e.layout === "horizontal" ? "horizontal" : "vertical", a = t?.label ??
|
|
4314
|
+
let e = this.props, t = this.fieldContext, n = typeof e.value == "string" ? e.value : null, r = Array.isArray(e.options) ? e.options : [], i = e.layout === "horizontal" ? "horizontal" : "vertical", a = t?.label ?? V(e.label), o = !!(t?.disabled || t?.readOnly);
|
|
4261
4315
|
return b`
|
|
4262
4316
|
<fieldset>
|
|
4263
4317
|
<legend>${a}</legend>
|
|
@@ -4270,7 +4324,7 @@ var zt = (e) => typeof e == "string" ? {
|
|
|
4270
4324
|
aria-required=${String(!!e.required)}
|
|
4271
4325
|
>
|
|
4272
4326
|
${r.map((e) => {
|
|
4273
|
-
let { label: r, value: i } =
|
|
4327
|
+
let { label: r, value: i } = cn(e), a = `${t?.controlId ?? "sc"}-${i}`;
|
|
4274
4328
|
return b`
|
|
4275
4329
|
<label class=${o ? "disabled" : ""} for=${a}>
|
|
4276
4330
|
<input
|
|
@@ -4299,14 +4353,14 @@ var zt = (e) => typeof e == "string" ? {
|
|
|
4299
4353
|
this.commitBlur();
|
|
4300
4354
|
};
|
|
4301
4355
|
};
|
|
4302
|
-
|
|
4356
|
+
ln = F([D(A.singleChoiceField)], ln);
|
|
4303
4357
|
//#endregion
|
|
4304
4358
|
//#region src/primitives/fields/multi-choice-field.ts
|
|
4305
|
-
var
|
|
4359
|
+
var un = (e) => typeof e == "string" ? {
|
|
4306
4360
|
label: e,
|
|
4307
4361
|
value: e
|
|
4308
|
-
} : e,
|
|
4309
|
-
static styles = [
|
|
4362
|
+
} : e, dn = class extends G {
|
|
4363
|
+
static styles = [G.styles, c`
|
|
4310
4364
|
fieldset {
|
|
4311
4365
|
border: none;
|
|
4312
4366
|
padding: 0;
|
|
@@ -4368,7 +4422,7 @@ var Vt = (e) => typeof e == "string" ? {
|
|
|
4368
4422
|
}
|
|
4369
4423
|
`];
|
|
4370
4424
|
render() {
|
|
4371
|
-
let e = this.props, t = this.fieldContext, n = Array.isArray(e.value) ? e.value : [], r = Array.isArray(e.options) ? e.options : [], i = e.layout === "horizontal" ? "horizontal" : "vertical", a = t?.label ??
|
|
4425
|
+
let e = this.props, t = this.fieldContext, n = Array.isArray(e.value) ? e.value : [], r = Array.isArray(e.options) ? e.options : [], i = e.layout === "horizontal" ? "horizontal" : "vertical", a = t?.label ?? V(e.label), o = !!(t?.disabled || t?.readOnly);
|
|
4372
4426
|
return b`
|
|
4373
4427
|
<fieldset>
|
|
4374
4428
|
<legend>${a}</legend>
|
|
@@ -4381,7 +4435,7 @@ var Vt = (e) => typeof e == "string" ? {
|
|
|
4381
4435
|
aria-required=${String(!!e.required)}
|
|
4382
4436
|
>
|
|
4383
4437
|
${r.map((e) => {
|
|
4384
|
-
let { label: r, value: i } =
|
|
4438
|
+
let { label: r, value: i } = un(e), a = `${t?.controlId ?? "mc"}-${i}`;
|
|
4385
4439
|
return b`
|
|
4386
4440
|
<label class=${o ? "disabled" : ""} for=${a}>
|
|
4387
4441
|
<input
|
|
@@ -4410,11 +4464,11 @@ var Vt = (e) => typeof e == "string" ? {
|
|
|
4410
4464
|
this.commitBlur();
|
|
4411
4465
|
};
|
|
4412
4466
|
};
|
|
4413
|
-
|
|
4467
|
+
dn = F([D(A.multiChoiceField)], dn);
|
|
4414
4468
|
//#endregion
|
|
4415
4469
|
//#region src/primitives/fields/rating-field.ts
|
|
4416
|
-
var
|
|
4417
|
-
static styles = [
|
|
4470
|
+
var fn = class extends G {
|
|
4471
|
+
static styles = [G.styles, c`
|
|
4418
4472
|
.rating-container {
|
|
4419
4473
|
display: inline-flex;
|
|
4420
4474
|
gap: 0.25rem;
|
|
@@ -4467,7 +4521,7 @@ var Ut = class extends W {
|
|
|
4467
4521
|
}
|
|
4468
4522
|
`];
|
|
4469
4523
|
render() {
|
|
4470
|
-
let e = this.props, t = this.fieldContext, n = typeof e.value == "number" ? e.value : null, r = typeof e.min == "number" ? e.min : 1, i = typeof e.max == "number" ? e.max : 5, a = typeof e.step == "number" && e.step > 0 ? e.step : 1, o = !!(t?.disabled || t?.readOnly), s = t?.label ??
|
|
4524
|
+
let e = this.props, t = this.fieldContext, n = typeof e.value == "number" ? e.value : null, r = typeof e.min == "number" ? e.min : 1, i = typeof e.max == "number" ? e.max : 5, a = typeof e.step == "number" && e.step > 0 ? e.step : 1, o = !!(t?.disabled || t?.readOnly), s = t?.label ?? V(e.label), c = [];
|
|
4471
4525
|
for (let e = r; e <= i; e += a) c.push(e);
|
|
4472
4526
|
return b`
|
|
4473
4527
|
<div
|
|
@@ -4521,18 +4575,18 @@ var Ut = class extends W {
|
|
|
4521
4575
|
}
|
|
4522
4576
|
};
|
|
4523
4577
|
};
|
|
4524
|
-
|
|
4578
|
+
fn = F([D(A.ratingField)], fn);
|
|
4525
4579
|
//#endregion
|
|
4526
4580
|
//#region src/primitives/base-async-report-element.ts
|
|
4527
|
-
var
|
|
4581
|
+
var pn = (e) => e instanceof Error ? e.message : typeof e == "string" && e.trim().length > 0 ? e : String(e), mn = (e) => {
|
|
4528
4582
|
if (typeof e == "string") return e;
|
|
4529
4583
|
try {
|
|
4530
4584
|
return JSON.stringify(e, null, 2);
|
|
4531
4585
|
} catch {
|
|
4532
4586
|
return String(e);
|
|
4533
4587
|
}
|
|
4534
|
-
}, $ = class extends
|
|
4535
|
-
static styles = [
|
|
4588
|
+
}, $ = class extends K {
|
|
4589
|
+
static styles = [K.styles, c`
|
|
4536
4590
|
.transport-divider {
|
|
4537
4591
|
border: none;
|
|
4538
4592
|
border-top: var(--mlf-border-width, 1px) solid
|
|
@@ -4682,7 +4736,7 @@ var Wt = (e) => e instanceof Error ? e.message : typeof e == "string" && e.trim(
|
|
|
4682
4736
|
role="region"
|
|
4683
4737
|
aria-label=${e.explanationAriaLabel}
|
|
4684
4738
|
>
|
|
4685
|
-
${
|
|
4739
|
+
${mn(this.transportResult)}</pre
|
|
4686
4740
|
>`;
|
|
4687
4741
|
default: return S;
|
|
4688
4742
|
}
|
|
@@ -4706,15 +4760,15 @@ ${Gt(this.transportResult)}</pre
|
|
|
4706
4760
|
this.transportResultValue = r, this.transportStatus = "done";
|
|
4707
4761
|
} catch (e) {
|
|
4708
4762
|
if (n.signal.aborted) return;
|
|
4709
|
-
this.transportErrorValue =
|
|
4763
|
+
this.transportErrorValue = pn(e), this.transportStatus = "error";
|
|
4710
4764
|
}
|
|
4711
4765
|
}
|
|
4712
4766
|
};
|
|
4713
|
-
|
|
4767
|
+
F([k()], $.prototype, "transportStatus", null), F([k()], $.prototype, "transportResultValue", null), F([k()], $.prototype, "transportErrorValue", null);
|
|
4714
4768
|
//#endregion
|
|
4715
4769
|
//#region src/primitives/reports/classifier-report.ts
|
|
4716
|
-
var
|
|
4717
|
-
if (!
|
|
4770
|
+
var hn = (e, t, n) => {
|
|
4771
|
+
if (!B(e) || !Array.isArray(e.probabilities)) return [];
|
|
4718
4772
|
let r = Array.isArray(t) ? t : e.labels, i = Array.isArray(r) ? r : [];
|
|
4719
4773
|
return e.probabilities.map((e, t) => {
|
|
4720
4774
|
let r = typeof e == "number" ? e : Number(e);
|
|
@@ -4723,8 +4777,8 @@ var Kt = (e, t, n) => {
|
|
|
4723
4777
|
value: r
|
|
4724
4778
|
};
|
|
4725
4779
|
}).filter((e) => e !== null);
|
|
4726
|
-
},
|
|
4727
|
-
static styles = [$.styles,
|
|
4780
|
+
}, gn = class extends $ {
|
|
4781
|
+
static styles = [$.styles, c`
|
|
4728
4782
|
.rows {
|
|
4729
4783
|
display: grid;
|
|
4730
4784
|
gap: 0.5rem;
|
|
@@ -4792,10 +4846,10 @@ var Kt = (e, t, n) => {
|
|
|
4792
4846
|
}
|
|
4793
4847
|
`];
|
|
4794
4848
|
render() {
|
|
4795
|
-
let e = this.props.payload, t = typeof this.props.error == "string" ? this.props.error : null, n = this.reportContext, r = this.props.
|
|
4849
|
+
let e = this.props.payload, t = typeof this.props.error == "string" ? this.props.error : null, n = this.reportContext, r = this.props.showClassProbabilities !== !1, i = this.text;
|
|
4796
4850
|
if (t) return b`<div class="error">${t}</div>`;
|
|
4797
4851
|
if (e == null) return b`<div class="empty">${i.classifierEmpty}</div>`;
|
|
4798
|
-
let a =
|
|
4852
|
+
let a = B(e) ? e.prediction ?? e.className ?? e.label ?? i.classifierUnknownPrediction : e, o = hn(e, this.props.labels, i.classifierClassLabel);
|
|
4799
4853
|
return b`
|
|
4800
4854
|
<section
|
|
4801
4855
|
part="classifier-report"
|
|
@@ -4816,35 +4870,35 @@ var Kt = (e, t, n) => {
|
|
|
4816
4870
|
})}
|
|
4817
4871
|
</div>
|
|
4818
4872
|
` : b`
|
|
4819
|
-
<div class="compact">${
|
|
4873
|
+
<div class="compact">${V(a, i.classifierUnknownPrediction)}</div>
|
|
4820
4874
|
`}
|
|
4821
4875
|
${this.renderTransportPanel(i)}
|
|
4822
4876
|
</section>
|
|
4823
4877
|
`;
|
|
4824
4878
|
}
|
|
4825
4879
|
};
|
|
4826
|
-
|
|
4880
|
+
gn = F([D(A.classifierReport)], gn);
|
|
4827
4881
|
//#endregion
|
|
4828
4882
|
//#region src/primitives/reports/regressor-report.ts
|
|
4829
|
-
var
|
|
4883
|
+
var _n = (e, t, n) => {
|
|
4830
4884
|
if (typeof e == "number") return `${e.toFixed(t)}${n ? ` ${n}` : ""}`;
|
|
4831
4885
|
let r = Number(e);
|
|
4832
4886
|
return Number.isNaN(r) ? String(e) : `${r.toFixed(t)}${n ? ` ${n}` : ""}`;
|
|
4833
|
-
},
|
|
4834
|
-
if (
|
|
4835
|
-
if (
|
|
4887
|
+
}, vn = (e) => {
|
|
4888
|
+
if (B(e) && Array.isArray(e.values)) return e.values.map((e) => Number(e)).filter((e) => !Number.isNaN(e));
|
|
4889
|
+
if (B(e) && "value" in e) {
|
|
4836
4890
|
let t = Number(e.value);
|
|
4837
4891
|
return Number.isNaN(t) ? [] : [t];
|
|
4838
4892
|
}
|
|
4839
4893
|
let t = Number(e);
|
|
4840
4894
|
return Number.isNaN(t) ? [] : [t];
|
|
4841
|
-
},
|
|
4842
|
-
if (
|
|
4895
|
+
}, yn = (e) => {
|
|
4896
|
+
if (B(e) && Array.isArray(e.interval) && e.interval.length === 2) {
|
|
4843
4897
|
let t = Number(e.interval[0]), n = Number(e.interval[1]);
|
|
4844
4898
|
if (!Number.isNaN(t) && !Number.isNaN(n)) return [t, n];
|
|
4845
4899
|
}
|
|
4846
|
-
return
|
|
4847
|
-
},
|
|
4900
|
+
return B(e) && typeof e.min == "number" && typeof e.max == "number" ? [e.min, e.max] : null;
|
|
4901
|
+
}, bn = (e, t) => {
|
|
4848
4902
|
if (t <= e) return "linear-gradient(to right, #ffea00 0%, #00c853 50%, #ffea00 100%)";
|
|
4849
4903
|
let n = t - e, r = e - n, i = t + n, a = (e) => (e - r) / (i - r) * 100, o = a(e), s = a(t), c = a((e + t) / 2);
|
|
4850
4904
|
return `linear-gradient(to right,
|
|
@@ -4855,12 +4909,12 @@ var Jt = (e, t, n) => {
|
|
|
4855
4909
|
#ffea00 ${s}%,
|
|
4856
4910
|
#ff6d00 ${Math.min(s + 10, 100)}%,
|
|
4857
4911
|
#c62828 100%)`;
|
|
4858
|
-
},
|
|
4912
|
+
}, xn = (e, t, n) => {
|
|
4859
4913
|
if (n <= t) return 49;
|
|
4860
4914
|
let r = n - t, i = t - r, a = n + r;
|
|
4861
4915
|
return Math.min(Math.max((e - i) / (a - i) * 100, 0), 98.45);
|
|
4862
|
-
},
|
|
4863
|
-
static styles = [$.styles,
|
|
4916
|
+
}, Sn = class extends $ {
|
|
4917
|
+
static styles = [$.styles, c`
|
|
4864
4918
|
:host {
|
|
4865
4919
|
--marker-size: 14px;
|
|
4866
4920
|
--limit-line-width: 3px;
|
|
@@ -4939,7 +4993,7 @@ var Jt = (e, t, n) => {
|
|
|
4939
4993
|
let e = this.props.payload, t = typeof this.props.error == "string" ? this.props.error : null, n = this.reportContext, r = this.text;
|
|
4940
4994
|
if (t) return b`<div class="error">${t}</div>`;
|
|
4941
4995
|
if (e == null) return b`<div class="empty">${r.regressorEmpty}</div>`;
|
|
4942
|
-
let i = typeof this.props.unit == "string" ? this.props.unit : "", a = typeof this.props.precision == "number" && this.props.precision >= 0 ? this.props.precision : 2, o =
|
|
4996
|
+
let i = typeof this.props.unit == "string" ? this.props.unit : "", a = typeof this.props.precision == "number" && this.props.precision >= 0 ? this.props.precision : 2, o = vn(e), s = yn(e), c = B(e) && typeof e.execution_time == "number" ? `${e.execution_time} ms` : null;
|
|
4943
4997
|
return b`
|
|
4944
4998
|
<section
|
|
4945
4999
|
part="regressor-report"
|
|
@@ -4948,51 +5002,51 @@ var Jt = (e, t, n) => {
|
|
|
4948
5002
|
>
|
|
4949
5003
|
${o.length > 0 ? o.map((e) => b`
|
|
4950
5004
|
<div class="item">
|
|
4951
|
-
<div class="value">${
|
|
5005
|
+
<div class="value">${_n(e, a, i)}</div>
|
|
4952
5006
|
|
|
4953
5007
|
${s ? b`
|
|
4954
5008
|
<div
|
|
4955
5009
|
class="bar-wrapper"
|
|
4956
|
-
style=${`background: ${
|
|
5010
|
+
style=${`background: ${bn(s[0], s[1])};`}
|
|
4957
5011
|
>
|
|
4958
5012
|
<div
|
|
4959
5013
|
class="limit-wrapper"
|
|
4960
|
-
style=${`left: ${
|
|
5014
|
+
style=${`left: ${xn(s[0], s[0], s[1])}%;`}
|
|
4961
5015
|
>
|
|
4962
5016
|
<div class="limit-line"></div>
|
|
4963
5017
|
<div class="limit-label">
|
|
4964
|
-
${
|
|
5018
|
+
${_n(s[0], a, i)}
|
|
4965
5019
|
</div>
|
|
4966
5020
|
</div>
|
|
4967
5021
|
|
|
4968
5022
|
<div
|
|
4969
5023
|
class="limit-wrapper"
|
|
4970
|
-
style=${`left: ${
|
|
5024
|
+
style=${`left: ${xn(s[1], s[0], s[1])}%;`}
|
|
4971
5025
|
>
|
|
4972
5026
|
<div class="limit-line"></div>
|
|
4973
5027
|
<div class="limit-label">
|
|
4974
|
-
${
|
|
5028
|
+
${_n(s[1], a, i)}
|
|
4975
5029
|
</div>
|
|
4976
5030
|
</div>
|
|
4977
5031
|
|
|
4978
5032
|
<span
|
|
4979
5033
|
class="value-marker"
|
|
4980
|
-
style=${`left: ${
|
|
5034
|
+
style=${`left: ${xn(e, s[0], s[1])}%;`}
|
|
4981
5035
|
></span>
|
|
4982
5036
|
</div>
|
|
4983
5037
|
` : b``}
|
|
4984
5038
|
</div>
|
|
4985
|
-
`) : b`<div class="value">${
|
|
5039
|
+
`) : b`<div class="value">${_n(e, a, i)}</div>`}
|
|
4986
5040
|
${c ? b`<div class="meta">${r.regressorExecutionTime(c)}</div>` : b``}
|
|
4987
5041
|
${this.renderTransportPanel(r)}
|
|
4988
5042
|
</section>
|
|
4989
5043
|
`;
|
|
4990
5044
|
}
|
|
4991
5045
|
};
|
|
4992
|
-
|
|
5046
|
+
Sn = F([D(A.regressorReport)], Sn);
|
|
4993
5047
|
//#endregion
|
|
4994
5048
|
//#region src/primitives/registry.ts
|
|
4995
|
-
var
|
|
5049
|
+
var Cn = new Set([
|
|
4996
5050
|
"annotation-xml",
|
|
4997
5051
|
"color-profile",
|
|
4998
5052
|
"font-face",
|
|
@@ -5001,26 +5055,26 @@ var en = new Set([
|
|
|
5001
5055
|
"font-face-format",
|
|
5002
5056
|
"font-face-name",
|
|
5003
5057
|
"missing-glyph"
|
|
5004
|
-
]),
|
|
5005
|
-
if (!
|
|
5006
|
-
},
|
|
5058
|
+
]), wn = (e) => /^[a-z][-.0-9_a-z]*-[-.0-9_a-z]*[a-z0-9]$/.test(e) && !Cn.has(e), Tn = (e) => {
|
|
5059
|
+
if (!wn(e)) throw TypeError(`Invalid primitive renderer tag name "${e}". Expected a valid custom element name.`);
|
|
5060
|
+
}, En = class e {
|
|
5007
5061
|
#e = /* @__PURE__ */ new Map();
|
|
5008
5062
|
#t = /* @__PURE__ */ new Map();
|
|
5009
5063
|
#n = /* @__PURE__ */ new Map();
|
|
5010
5064
|
registerField(e, t) {
|
|
5011
|
-
return
|
|
5065
|
+
return Tn(t), this.#e.set(e, t), this;
|
|
5012
5066
|
}
|
|
5013
5067
|
unregisterField(e) {
|
|
5014
5068
|
return this.#e.delete(e), this;
|
|
5015
5069
|
}
|
|
5016
5070
|
registerReport(e, t) {
|
|
5017
|
-
return
|
|
5071
|
+
return Tn(t), this.#t.set(e, t), this;
|
|
5018
5072
|
}
|
|
5019
5073
|
unregisterReport(e) {
|
|
5020
5074
|
return this.#t.delete(e), this;
|
|
5021
5075
|
}
|
|
5022
5076
|
registerExplanation(e, t) {
|
|
5023
|
-
return
|
|
5077
|
+
return Tn(t), this.#n.set(e, t), this;
|
|
5024
5078
|
}
|
|
5025
5079
|
unregisterExplanation(e) {
|
|
5026
5080
|
return this.#n.delete(e), this;
|
|
@@ -5041,23 +5095,24 @@ var en = new Set([
|
|
|
5041
5095
|
for (let [e, n] of this.#n) t.registerExplanation(e, n);
|
|
5042
5096
|
return t;
|
|
5043
5097
|
}
|
|
5044
|
-
},
|
|
5098
|
+
}, Dn = () => new En(), On = () => Dn().registerField("declarative-field", A.declarativeField).registerField("text-field", A.textField).registerField("number-field", A.numberField).registerField("boolean-field", A.booleanField).registerField("category-field", A.categoryField).registerField("date-field", A.dateField).registerField("series-field", A.seriesField).registerField("long-text-field", A.longTextField).registerField("single-choice-field", A.singleChoiceField).registerField("multi-choice-field", A.multiChoiceField).registerField("rating-field", A.ratingField).registerReport("declarative-report", A.declarativeReport).registerReport("classifier-report", A.classifierReport).registerReport("regressor-report", A.regressorReport).registerExplanation("declarative-explanation", A.declarativeExplanation), kn = (e, t) => {
|
|
5045
5099
|
if (e.childNodes.length > 0 && t !== "replace") throw TypeError("Mount into an empty container or pass `containerStrategy: \"replace\"`.");
|
|
5046
|
-
},
|
|
5047
|
-
let r = document.createElement(A.form), i =
|
|
5048
|
-
|
|
5049
|
-
let
|
|
5100
|
+
}, An = (e) => e ? e.clone() : On(), jn = (t) => t?.clone() ?? e().presentationRegistry, Mn = (e, t, n = {}) => {
|
|
5101
|
+
let r = document.createElement(A.form), i = An(n.registry), a = jn(n.presentationRegistry), o = We(n.text), s = n.containerStrategy ?? "error", c = s === "replace" ? Array.from(e.childNodes) : [];
|
|
5102
|
+
kn(e, s), r.form = t, r.registry = i, r.presentationRegistry = a, r.layout = n.layout ?? "stacked", r.formLabel = n.formLabel ?? M.form, r.reportsLabel = n.reportsLabel ?? M.reports, r.submitLabel = n.submitLabel ?? M.submit, r.validatingLabel = n.validatingLabel ?? M.validating, r.submittingLabel = n.submittingLabel ?? M.submitting, r.reportPane = n.reportPane ?? "auto", r.text = o, r.reportTransport = n.reportTransport, e.replaceChildren(r);
|
|
5103
|
+
let l = !1;
|
|
5050
5104
|
return Object.freeze({
|
|
5051
5105
|
form: t,
|
|
5052
5106
|
host: r,
|
|
5053
5107
|
registry: i,
|
|
5054
|
-
|
|
5108
|
+
presentationRegistry: a,
|
|
5109
|
+
text: o,
|
|
5055
5110
|
unmount() {
|
|
5056
|
-
|
|
5111
|
+
l || (l = !0, r.parentNode === e ? s === "replace" && c.length > 0 ? e.replaceChildren(...c) : e.removeChild(r) : (r.remove(), s === "replace" && c.length > 0 && e.childNodes.length === 0 && e.replaceChildren(...c)));
|
|
5057
5112
|
}
|
|
5058
5113
|
});
|
|
5059
|
-
},
|
|
5114
|
+
}, Nn = (e) => {
|
|
5060
5115
|
e.unmount();
|
|
5061
5116
|
};
|
|
5062
5117
|
//#endregion
|
|
5063
|
-
export { D as _, $ as a, b,
|
|
5118
|
+
export { D as _, $ as a, b, Y as c, F as d, M as f, O as g, k as h, Dn as i, K as l, We as m, Nn as n, Ft as o, N as p, On as r, gt as s, Mn as t, G as u, E as v, c as x, S as y };
|