drill-widgets 2.7.16 → 2.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drill-widgets.es.js +354 -224
- package/dist/drill-widgets.umd.js +127 -37
- package/dist/lib.d.ts +25 -1
- package/package.json +1 -1
package/dist/drill-widgets.es.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const K = globalThis,
|
|
6
|
+
const K = globalThis, ge = K.ShadowRoot && (K.ShadyCSS === void 0 || K.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, me = Symbol(), xe = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let Fe = class {
|
|
8
8
|
constructor(e, t, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== me) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let e = this.o;
|
|
14
14
|
const t = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (ge && e === void 0) {
|
|
16
16
|
const i = t !== void 0 && t.length === 1;
|
|
17
|
-
i && (e =
|
|
17
|
+
i && (e = xe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && xe.set(t, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,20 +22,20 @@ let Fe = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Oe = (s) => new Fe(typeof s == "string" ? s : s + "", void 0,
|
|
25
|
+
const Oe = (s) => new Fe(typeof s == "string" ? s : s + "", void 0, me), O = (s, ...e) => {
|
|
26
26
|
const t = s.length === 1 ? s[0] : e.reduce((i, r, n) => i + ((o) => {
|
|
27
27
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
28
|
if (typeof o == "number") return o;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(r) + s[n + 1], s[0]);
|
|
31
|
-
return new Fe(t, s,
|
|
31
|
+
return new Fe(t, s, me);
|
|
32
32
|
}, Re = (s, e) => {
|
|
33
|
-
if (
|
|
33
|
+
if (ge) s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
35
|
const i = document.createElement("style"), r = K.litNonce;
|
|
36
36
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = t.cssText, s.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, _e = ge ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
40
|
for (const i of e.cssRules) t += i.cssText;
|
|
41
41
|
return Oe(t);
|
|
@@ -45,7 +45,7 @@ const Oe = (s) => new Fe(typeof s == "string" ? s : s + "", void 0, ge), O = (s,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Ve, defineProperty: We, getOwnPropertyDescriptor: He, getOwnPropertyNames: je, getOwnPropertySymbols: Be, getPrototypeOf: Qe } = Object, M = globalThis, ye = M.trustedTypes, Ge = ye ? ye.emptyScript : "", re = M.reactiveElementPolyfillSupport, W = (s, e) => s, J = { toAttribute(s, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
s = s ? Ge : null;
|
|
@@ -73,23 +73,23 @@ const { is: We, defineProperty: He, getOwnPropertyDescriptor: Ve, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} },
|
|
76
|
+
} }, fe = (s, e) => !Ve(s, e), we = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: fe };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), M.litPropertyMetadata ?? (M.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
-
let
|
|
78
|
+
let P = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(e, t =
|
|
85
|
+
static createProperty(e, t = we) {
|
|
86
86
|
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) {
|
|
87
87
|
const i = Symbol(), r = this.getPropertyDescriptor(e, i, t);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && We(this.prototype, e, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(e, t, i) {
|
|
92
|
-
const { get: r, set: n } =
|
|
92
|
+
const { get: r, set: n } = He(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[t] = o;
|
|
@@ -100,16 +100,16 @@ let U = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(e) {
|
|
103
|
-
return this.elementProperties.get(e) ??
|
|
103
|
+
return this.elementProperties.get(e) ?? we;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(W("elementProperties"))) return;
|
|
107
107
|
const e = Qe(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
111
|
+
if (this.hasOwnProperty(W("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(W("properties"))) {
|
|
113
113
|
const t = this.properties, i = [...je(t), ...Be(t)];
|
|
114
114
|
for (const r of i) this.createProperty(r, t[r]);
|
|
115
115
|
}
|
|
@@ -129,8 +129,8 @@ let U = class extends HTMLElement {
|
|
|
129
129
|
const t = [];
|
|
130
130
|
if (Array.isArray(e)) {
|
|
131
131
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
132
|
-
for (const r of i) t.unshift(
|
|
133
|
-
} else e !== void 0 && t.push(
|
|
132
|
+
for (const r of i) t.unshift(_e(r));
|
|
133
|
+
} else e !== void 0 && t.push(_e(e));
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, t) {
|
|
@@ -200,7 +200,7 @@ let U = class extends HTMLElement {
|
|
|
200
200
|
var r;
|
|
201
201
|
if (e !== void 0) {
|
|
202
202
|
const n = this.constructor, o = this[e];
|
|
203
|
-
if (i ?? (i = n.getPropertyOptions(e)), !((i.hasChanged ??
|
|
203
|
+
if (i ?? (i = n.getPropertyOptions(e)), !((i.hasChanged ?? fe)(o, t) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(e)) && !this.hasAttribute(n._$Eu(e, i)))) return;
|
|
204
204
|
this.C(e, t, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -276,18 +276,18 @@ let U = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(e) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[W("elementProperties")] = /* @__PURE__ */ new Map(), P[W("finalized")] = /* @__PURE__ */ new Map(), re == null || re({ ReactiveElement: P }), (M.reactiveElementVersions ?? (M.reactiveElementVersions = [])).push("2.1.0");
|
|
280
280
|
/**
|
|
281
281
|
* @license
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const
|
|
286
|
-
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
288
|
-
function
|
|
289
|
-
if (!
|
|
290
|
-
return
|
|
285
|
+
const H = globalThis, X = H.trustedTypes, Se = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ze = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, Ie = "?" + E, Ye = `<${Ie}>`, I = document, j = () => I.createComment(""), B = (s) => s === null || typeof s != "object" && typeof s != "function", be = Array.isArray, qe = (s) => be(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", ne = `[
|
|
286
|
+
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ke = /-->/g, $e = />/g, T = RegExp(`>|${ne}(?:([^\\s"'>=/]+)(${ne}*=${ne}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), De = /'/g, Ce = /"/g, Ue = /^(?:script|style|textarea|title)$/i, Ke = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), l = Ke(1), U = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ae = /* @__PURE__ */ new WeakMap(), F = I.createTreeWalker(I, 129);
|
|
288
|
+
function Pe(s, e) {
|
|
289
|
+
if (!be(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
|
+
return Se !== void 0 ? Se.createHTML(e) : e;
|
|
291
291
|
}
|
|
292
292
|
const Je = (s, e) => {
|
|
293
293
|
const t = s.length - 1, i = [];
|
|
@@ -295,11 +295,11 @@ const Je = (s, e) => {
|
|
|
295
295
|
for (let a = 0; a < t; a++) {
|
|
296
296
|
const d = s[a];
|
|
297
297
|
let p, c, u = -1, h = 0;
|
|
298
|
-
for (; h < d.length && (o.lastIndex = h, c = o.exec(d), c !== null); ) h = o.lastIndex, o === R ? c[1] === "!--" ? o =
|
|
298
|
+
for (; h < d.length && (o.lastIndex = h, c = o.exec(d), c !== null); ) h = o.lastIndex, o === R ? c[1] === "!--" ? o = ke : c[1] !== void 0 ? o = $e : c[2] !== void 0 ? (Ue.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? R, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, p = c[1], o = c[3] === void 0 ? T : c[3] === '"' ? Ce : De) : o === Ce || o === De ? o = T : o === ke || o === $e ? o = R : (o = T, r = void 0);
|
|
299
299
|
const g = o === T && s[a + 1].startsWith("/>") ? " " : "";
|
|
300
300
|
n += o === R ? d + Ye : u >= 0 ? (i.push(p), d.slice(0, u) + ze + d.slice(u) + E + g) : d + E + (u === -2 ? a : g);
|
|
301
301
|
}
|
|
302
|
-
return [
|
|
302
|
+
return [Pe(s, n + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
303
303
|
};
|
|
304
304
|
class Q {
|
|
305
305
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
@@ -317,7 +317,7 @@ class Q {
|
|
|
317
317
|
const h = c[o++], g = r.getAttribute(u).split(E), v = /([.?@])?(.*)/.exec(h);
|
|
318
318
|
d.push({ type: 1, index: n, name: v[2], strings: g, ctor: v[1] === "." ? Ze : v[1] === "?" ? et : v[1] === "@" ? tt : se }), r.removeAttribute(u);
|
|
319
319
|
} else u.startsWith(E) && (d.push({ type: 6, index: n }), r.removeAttribute(u));
|
|
320
|
-
if (
|
|
320
|
+
if (Ue.test(r.tagName)) {
|
|
321
321
|
const u = r.textContent.split(E), h = u.length - 1;
|
|
322
322
|
if (h > 0) {
|
|
323
323
|
r.textContent = X ? X.emptyScript : "";
|
|
@@ -340,7 +340,7 @@ class Q {
|
|
|
340
340
|
}
|
|
341
341
|
function L(s, e, t = s, i) {
|
|
342
342
|
var o, a;
|
|
343
|
-
if (e ===
|
|
343
|
+
if (e === U) return e;
|
|
344
344
|
let r = i !== void 0 ? (o = t._$Co) == null ? void 0 : o[i] : t._$Cl;
|
|
345
345
|
const n = B(e) ? void 0 : e._$litDirective$;
|
|
346
346
|
return (r == null ? void 0 : r.constructor) !== n && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = r : t._$Cl = r), r !== void 0 && (e = L(s, r._$AS(s, e.values), r, i)), e;
|
|
@@ -379,7 +379,7 @@ class G {
|
|
|
379
379
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
380
380
|
}
|
|
381
381
|
constructor(e, t, i, r) {
|
|
382
|
-
this.type = 2, this._$AH =
|
|
382
|
+
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
383
383
|
}
|
|
384
384
|
get parentNode() {
|
|
385
385
|
let e = this._$AA.parentNode;
|
|
@@ -393,7 +393,7 @@ class G {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(e, t = this) {
|
|
396
|
-
e = L(this, e, t), B(e) ? e ===
|
|
396
|
+
e = L(this, e, t), B(e) ? e === _ || e == null || e === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : e !== this._$AH && e !== U && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : qe(e) ? this.k(e) : this._(e);
|
|
397
397
|
}
|
|
398
398
|
O(e) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -402,11 +402,11 @@ class G {
|
|
|
402
402
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
403
403
|
}
|
|
404
404
|
_(e) {
|
|
405
|
-
this._$AH !==
|
|
405
|
+
this._$AH !== _ && B(this._$AH) ? this._$AA.nextSibling.data = e : this.T(I.createTextNode(e)), this._$AH = e;
|
|
406
406
|
}
|
|
407
407
|
$(e) {
|
|
408
408
|
var n;
|
|
409
|
-
const { values: t, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = Q.createElement(
|
|
409
|
+
const { values: t, _$litType$: i } = e, r = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = Q.createElement(Pe(i.h, i.h[0]), this.options)), i);
|
|
410
410
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(t);
|
|
411
411
|
else {
|
|
412
412
|
const o = new Xe(r, this), a = o.u(this.options);
|
|
@@ -414,11 +414,11 @@ class G {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(e) {
|
|
417
|
-
let t =
|
|
418
|
-
return t === void 0 &&
|
|
417
|
+
let t = Ae.get(e.strings);
|
|
418
|
+
return t === void 0 && Ae.set(e.strings, t = new Q(e)), t;
|
|
419
419
|
}
|
|
420
420
|
k(e) {
|
|
421
|
-
|
|
421
|
+
be(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const t = this._$AH;
|
|
423
423
|
let i, r = 0;
|
|
424
424
|
for (const n of e) r === t.length ? t.push(i = new G(this.O(j()), this.O(j()), this, this.options)) : i = t[r], i._$AI(n), r++;
|
|
@@ -444,21 +444,21 @@ class se {
|
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
446
|
constructor(e, t, i, r, n) {
|
|
447
|
-
this.type = 1, this._$AH =
|
|
447
|
+
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
|
|
448
448
|
}
|
|
449
449
|
_$AI(e, t = this, i, r) {
|
|
450
450
|
const n = this.strings;
|
|
451
451
|
let o = !1;
|
|
452
|
-
if (n === void 0) e = L(this, e, t, 0), o = !B(e) || e !== this._$AH && e !==
|
|
452
|
+
if (n === void 0) e = L(this, e, t, 0), o = !B(e) || e !== this._$AH && e !== U, o && (this._$AH = e);
|
|
453
453
|
else {
|
|
454
454
|
const a = e;
|
|
455
455
|
let d, p;
|
|
456
|
-
for (e = n[0], d = 0; d < n.length - 1; d++) p = L(this, a[i + d], t, d), p ===
|
|
456
|
+
for (e = n[0], d = 0; d < n.length - 1; d++) p = L(this, a[i + d], t, d), p === U && (p = this._$AH[d]), o || (o = !B(p) || p !== this._$AH[d]), p === _ ? e = _ : e !== _ && (e += (p ?? "") + n[d + 1]), this._$AH[d] = p;
|
|
457
457
|
}
|
|
458
458
|
o && !r && this.j(e);
|
|
459
459
|
}
|
|
460
460
|
j(e) {
|
|
461
|
-
e ===
|
|
461
|
+
e === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
class Ze extends se {
|
|
@@ -466,7 +466,7 @@ class Ze extends se {
|
|
|
466
466
|
super(...arguments), this.type = 3;
|
|
467
467
|
}
|
|
468
468
|
j(e) {
|
|
469
|
-
this.element[this.name] = e ===
|
|
469
|
+
this.element[this.name] = e === _ ? void 0 : e;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
class et extends se {
|
|
@@ -474,7 +474,7 @@ class et extends se {
|
|
|
474
474
|
super(...arguments), this.type = 4;
|
|
475
475
|
}
|
|
476
476
|
j(e) {
|
|
477
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
477
|
+
this.element.toggleAttribute(this.name, !!e && e !== _);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
class tt extends se {
|
|
@@ -482,8 +482,8 @@ class tt extends se {
|
|
|
482
482
|
super(e, t, i, r, n), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(e, t = this) {
|
|
485
|
-
if ((e = L(this, e, t, 0) ??
|
|
486
|
-
const i = this._$AH, r = e ===
|
|
485
|
+
if ((e = L(this, e, t, 0) ?? _) === U) return;
|
|
486
|
+
const i = this._$AH, r = e === _ && i !== _ || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== _ && (i === _ || r);
|
|
487
487
|
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(e) {
|
|
@@ -502,8 +502,8 @@ class it {
|
|
|
502
502
|
L(this, e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const oe =
|
|
506
|
-
oe == null || oe(Q, G), (
|
|
505
|
+
const oe = H.litHtmlPolyfillSupport;
|
|
506
|
+
oe == null || oe(Q, G), (H.litHtmlVersions ?? (H.litHtmlVersions = [])).push("3.3.0");
|
|
507
507
|
const st = (s, e, t) => {
|
|
508
508
|
const i = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
509
509
|
let r = i._$litPart$;
|
|
@@ -519,7 +519,7 @@ const st = (s, e, t) => {
|
|
|
519
519
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
520
520
|
*/
|
|
521
521
|
const z = globalThis;
|
|
522
|
-
let N = class extends
|
|
522
|
+
let N = class extends P {
|
|
523
523
|
constructor() {
|
|
524
524
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
525
525
|
}
|
|
@@ -541,7 +541,7 @@ let N = class extends U {
|
|
|
541
541
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
542
542
|
}
|
|
543
543
|
render() {
|
|
544
|
-
return
|
|
544
|
+
return U;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
var Te;
|
|
@@ -564,7 +564,7 @@ const Ne = (s) => (e, t) => {
|
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const rt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged:
|
|
567
|
+
const rt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: fe }, nt = (s = rt, e, t) => {
|
|
568
568
|
const { kind: i, metadata: r } = t;
|
|
569
569
|
let n = globalThis.litPropertyMetadata.get(r);
|
|
570
570
|
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(t.name, s), i === "accessor") {
|
|
@@ -599,11 +599,11 @@ function C(s) {
|
|
|
599
599
|
function b(s) {
|
|
600
600
|
return C({ ...s, state: !0, attribute: !1 });
|
|
601
601
|
}
|
|
602
|
-
const
|
|
602
|
+
const S = [];
|
|
603
603
|
for (let s = 0; s < 256; ++s)
|
|
604
|
-
|
|
604
|
+
S.push((s + 256).toString(16).slice(1));
|
|
605
605
|
function ot(s, e = 0) {
|
|
606
|
-
return (
|
|
606
|
+
return (S[s[e + 0]] + S[s[e + 1]] + S[s[e + 2]] + S[s[e + 3]] + "-" + S[s[e + 4]] + S[s[e + 5]] + "-" + S[s[e + 6]] + S[s[e + 7]] + "-" + S[s[e + 8]] + S[s[e + 9]] + "-" + S[s[e + 10]] + S[s[e + 11]] + S[s[e + 12]] + S[s[e + 13]] + S[s[e + 14]] + S[s[e + 15]]).toLowerCase();
|
|
607
607
|
}
|
|
608
608
|
let de;
|
|
609
609
|
const at = new Uint8Array(16);
|
|
@@ -615,11 +615,11 @@ function dt() {
|
|
|
615
615
|
}
|
|
616
616
|
return de(at);
|
|
617
617
|
}
|
|
618
|
-
const lt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
618
|
+
const lt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ee = { randomUUID: lt };
|
|
619
619
|
function A(s, e, t) {
|
|
620
620
|
var r;
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
621
|
+
if (Ee.randomUUID && !s)
|
|
622
|
+
return Ee.randomUUID();
|
|
623
623
|
s = s || {};
|
|
624
624
|
const i = s.random ?? ((r = s.rng) == null ? void 0 : r.call(s)) ?? dt();
|
|
625
625
|
if (i.length < 16)
|
|
@@ -3337,6 +3337,44 @@ const pt = O`
|
|
|
3337
3337
|
width: 100%;
|
|
3338
3338
|
}
|
|
3339
3339
|
|
|
3340
|
+
/* Submission Error Icon */
|
|
3341
|
+
.submission-error-icon {
|
|
3342
|
+
color: #ef4444;
|
|
3343
|
+
margin-bottom: 16px;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
.submission-error-icon svg {
|
|
3347
|
+
stroke: #ef4444;
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
/* Error badge in sidebar */
|
|
3351
|
+
.runner-step-badge.error {
|
|
3352
|
+
background: #fee2e2;
|
|
3353
|
+
color: #dc2626;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3356
|
+
/* Retry Button */
|
|
3357
|
+
.retry-button {
|
|
3358
|
+
background: #3b82f6;
|
|
3359
|
+
color: white;
|
|
3360
|
+
border: none;
|
|
3361
|
+
border-radius: 8px;
|
|
3362
|
+
padding: 12px 24px;
|
|
3363
|
+
font-size: 16px;
|
|
3364
|
+
font-weight: 500;
|
|
3365
|
+
cursor: pointer;
|
|
3366
|
+
transition: background 0.2s ease;
|
|
3367
|
+
margin-top: 24px;
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
.retry-button:hover {
|
|
3371
|
+
background: #2563eb;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
.retry-button:active {
|
|
3375
|
+
background: #1d4ed8;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3340
3378
|
/* Clean styling for checkbox lists in print */
|
|
3341
3379
|
.print-response-value.checkbox-response div {
|
|
3342
3380
|
margin: 2px 0;
|
|
@@ -3847,12 +3885,12 @@ const pt = O`
|
|
|
3847
3885
|
}
|
|
3848
3886
|
}
|
|
3849
3887
|
`;
|
|
3850
|
-
var gt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor,
|
|
3888
|
+
var gt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, k = (s, e, t, i) => {
|
|
3851
3889
|
for (var r = i > 1 ? void 0 : i ? mt(e, t) : e, n = s.length - 1, o; n >= 0; n--)
|
|
3852
3890
|
(o = s[n]) && (r = (i ? o(e, t, r) : o(r)) || r);
|
|
3853
3891
|
return i && r && gt(e, t, r), r;
|
|
3854
3892
|
};
|
|
3855
|
-
let
|
|
3893
|
+
let y = class extends N {
|
|
3856
3894
|
constructor() {
|
|
3857
3895
|
super(...arguments), this._templateData = {
|
|
3858
3896
|
name: "",
|
|
@@ -5442,64 +5480,64 @@ Use **bold** and *italic* text.`;
|
|
|
5442
5480
|
`;
|
|
5443
5481
|
}
|
|
5444
5482
|
};
|
|
5445
|
-
|
|
5483
|
+
y.styles = O`
|
|
5446
5484
|
${pt}
|
|
5447
5485
|
${ct}
|
|
5448
5486
|
${ut}
|
|
5449
5487
|
${Le}
|
|
5450
5488
|
${ht}
|
|
5451
5489
|
`;
|
|
5452
|
-
|
|
5490
|
+
k([
|
|
5453
5491
|
b()
|
|
5454
|
-
],
|
|
5455
|
-
|
|
5492
|
+
], y.prototype, "_templateData", 2);
|
|
5493
|
+
k([
|
|
5456
5494
|
b()
|
|
5457
|
-
],
|
|
5458
|
-
|
|
5495
|
+
], y.prototype, "_showStepModal", 2);
|
|
5496
|
+
k([
|
|
5459
5497
|
b()
|
|
5460
|
-
],
|
|
5461
|
-
|
|
5498
|
+
], y.prototype, "_stepFormData", 2);
|
|
5499
|
+
k([
|
|
5462
5500
|
b()
|
|
5463
|
-
],
|
|
5464
|
-
|
|
5501
|
+
], y.prototype, "_draggedStepId", 2);
|
|
5502
|
+
k([
|
|
5465
5503
|
b()
|
|
5466
|
-
],
|
|
5467
|
-
|
|
5504
|
+
], y.prototype, "_dragOverStepId", 2);
|
|
5505
|
+
k([
|
|
5468
5506
|
b()
|
|
5469
|
-
],
|
|
5470
|
-
|
|
5507
|
+
], y.prototype, "_selectedStepId", 2);
|
|
5508
|
+
k([
|
|
5471
5509
|
b()
|
|
5472
|
-
],
|
|
5473
|
-
|
|
5510
|
+
], y.prototype, "_questions", 2);
|
|
5511
|
+
k([
|
|
5474
5512
|
b()
|
|
5475
|
-
],
|
|
5476
|
-
|
|
5513
|
+
], y.prototype, "_editingStepId", 2);
|
|
5514
|
+
k([
|
|
5477
5515
|
b()
|
|
5478
|
-
],
|
|
5479
|
-
|
|
5516
|
+
], y.prototype, "_stepAssignmentCategory", 2);
|
|
5517
|
+
k([
|
|
5480
5518
|
b()
|
|
5481
|
-
],
|
|
5482
|
-
|
|
5519
|
+
], y.prototype, "_stepAssignmentType", 2);
|
|
5520
|
+
k([
|
|
5483
5521
|
b()
|
|
5484
|
-
],
|
|
5485
|
-
|
|
5522
|
+
], y.prototype, "_stepAssignmentTarget", 2);
|
|
5523
|
+
k([
|
|
5486
5524
|
b()
|
|
5487
|
-
],
|
|
5488
|
-
|
|
5525
|
+
], y.prototype, "_stepAssignmentFirstName", 2);
|
|
5526
|
+
k([
|
|
5489
5527
|
b()
|
|
5490
|
-
],
|
|
5491
|
-
|
|
5528
|
+
], y.prototype, "_stepAssignmentLastName", 2);
|
|
5529
|
+
k([
|
|
5492
5530
|
C({ attribute: !1 })
|
|
5493
|
-
],
|
|
5494
|
-
|
|
5531
|
+
], y.prototype, "onCancel", 2);
|
|
5532
|
+
k([
|
|
5495
5533
|
C({ attribute: !1 })
|
|
5496
|
-
],
|
|
5497
|
-
|
|
5534
|
+
], y.prototype, "workflow", 2);
|
|
5535
|
+
k([
|
|
5498
5536
|
b()
|
|
5499
|
-
],
|
|
5500
|
-
|
|
5537
|
+
], y.prototype, "_openMenuStepId", 2);
|
|
5538
|
+
y = k([
|
|
5501
5539
|
Ne("builder-widget")
|
|
5502
|
-
],
|
|
5540
|
+
], y);
|
|
5503
5541
|
class ft {
|
|
5504
5542
|
constructor(e, t) {
|
|
5505
5543
|
this.signaturePads = e, this.savedSignatures = t;
|
|
@@ -5664,13 +5702,13 @@ class Z {
|
|
|
5664
5702
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 0;
|
|
5665
5703
|
}
|
|
5666
5704
|
}
|
|
5667
|
-
class
|
|
5705
|
+
class ve {
|
|
5668
5706
|
static fromPoints(e, t) {
|
|
5669
5707
|
const i = this.calculateControlPoints(e[0], e[1], e[2]).c2, r = this.calculateControlPoints(e[1], e[2], e[3]).c1;
|
|
5670
|
-
return new
|
|
5708
|
+
return new ve(e[1], i, r, e[2], t.start, t.end);
|
|
5671
5709
|
}
|
|
5672
5710
|
static calculateControlPoints(e, t, i) {
|
|
5673
|
-
const r = e.x - t.x, n = e.y - t.y, o = t.x - i.x, a = t.y - i.y, d = { x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 }, p = { x: (t.x + i.x) / 2, y: (t.y + i.y) / 2 }, c = Math.sqrt(r * r + n * n), u = Math.sqrt(o * o + a * a), h = d.x - p.x, g = d.y - p.y, v = c + u == 0 ? 0 : u / (c + u),
|
|
5711
|
+
const r = e.x - t.x, n = e.y - t.y, o = t.x - i.x, a = t.y - i.y, d = { x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 }, p = { x: (t.x + i.x) / 2, y: (t.y + i.y) / 2 }, c = Math.sqrt(r * r + n * n), u = Math.sqrt(o * o + a * a), h = d.x - p.x, g = d.y - p.y, v = c + u == 0 ? 0 : u / (c + u), w = { x: p.x + h * v, y: p.y + g * v }, Y = t.x - w.x, q = t.y - w.y;
|
|
5674
5712
|
return {
|
|
5675
5713
|
c1: new Z(d.x + Y, d.y + q),
|
|
5676
5714
|
c2: new Z(p.x + Y, p.y + q)
|
|
@@ -5936,7 +5974,7 @@ class ee extends vt {
|
|
|
5936
5974
|
const { _lastPoints: i } = this;
|
|
5937
5975
|
if (i.push(e), i.length > 2) {
|
|
5938
5976
|
i.length === 3 && i.unshift(i[0]);
|
|
5939
|
-
const r = this._calculateCurveWidths(i[1], i[2], t), n =
|
|
5977
|
+
const r = this._calculateCurveWidths(i[1], i[2], t), n = ve.fromPoints(i, r);
|
|
5940
5978
|
return i.shift(), n;
|
|
5941
5979
|
}
|
|
5942
5980
|
return null;
|
|
@@ -5964,8 +6002,8 @@ class ee extends vt {
|
|
|
5964
6002
|
g += 3 * u * a * e.control1.x, g += 3 * c * d * e.control2.x, g += p * e.endPoint.x;
|
|
5965
6003
|
let v = h * e.startPoint.y;
|
|
5966
6004
|
v += 3 * u * a * e.control1.y, v += 3 * c * d * e.control2.y, v += p * e.endPoint.y;
|
|
5967
|
-
const
|
|
5968
|
-
this._drawCurveSegment(g, v,
|
|
6005
|
+
const w = Math.min(e.startWidth + p * r, t.maxWidth);
|
|
6006
|
+
this._drawCurveSegment(g, v, w);
|
|
5969
6007
|
}
|
|
5970
6008
|
i.closePath(), i.fill();
|
|
5971
6009
|
}
|
|
@@ -6000,8 +6038,8 @@ class ee extends vt {
|
|
|
6000
6038
|
u.setAttribute("d", h), u.setAttribute("stroke-width", (p.endWidth * 2.25).toFixed(3)), u.setAttribute("stroke", c), u.setAttribute("fill", "none"), u.setAttribute("stroke-linecap", "round"), d.appendChild(u);
|
|
6001
6039
|
}
|
|
6002
6040
|
}, (p, { penColor: c, dotSize: u, minWidth: h, maxWidth: g }) => {
|
|
6003
|
-
const v = document.createElement("circle"),
|
|
6004
|
-
v.setAttribute("r",
|
|
6041
|
+
const v = document.createElement("circle"), w = u > 0 ? u : (h + g) / 2;
|
|
6042
|
+
v.setAttribute("r", w.toString()), v.setAttribute("cx", p.x.toString()), v.setAttribute("cy", p.y.toString()), v.setAttribute("fill", c), d.appendChild(v);
|
|
6005
6043
|
}), d.outerHTML;
|
|
6006
6044
|
}
|
|
6007
6045
|
}
|
|
@@ -6414,7 +6452,7 @@ te.QUESTION_ELEMENT_TYPES = [
|
|
|
6414
6452
|
"file_upload",
|
|
6415
6453
|
"signature"
|
|
6416
6454
|
];
|
|
6417
|
-
let
|
|
6455
|
+
let ce = te;
|
|
6418
6456
|
const ie = class ie {
|
|
6419
6457
|
// 5MB in bytes
|
|
6420
6458
|
constructor(e, t) {
|
|
@@ -6508,8 +6546,8 @@ const ie = class ie {
|
|
|
6508
6546
|
}
|
|
6509
6547
|
};
|
|
6510
6548
|
ie.MAX_FILE_SIZE = 5 * 1024 * 1024;
|
|
6511
|
-
let
|
|
6512
|
-
class
|
|
6549
|
+
let ue = ie;
|
|
6550
|
+
class $ {
|
|
6513
6551
|
/**
|
|
6514
6552
|
* Determines if a form element should be disabled based on context
|
|
6515
6553
|
* Centralizes the disabled logic for consistency across all input types
|
|
@@ -6540,7 +6578,7 @@ class k {
|
|
|
6540
6578
|
// Extract file extension and guess type
|
|
6541
6579
|
static _guessFileTypeFromUrl(e) {
|
|
6542
6580
|
var n;
|
|
6543
|
-
const i = (n =
|
|
6581
|
+
const i = (n = $._extractFilenameFromUrl(e).split(".").pop()) == null ? void 0 : n.toLowerCase();
|
|
6544
6582
|
return i ? {
|
|
6545
6583
|
pdf: "PDF Document",
|
|
6546
6584
|
doc: "Word Document",
|
|
@@ -6781,23 +6819,23 @@ class k {
|
|
|
6781
6819
|
<div class="print-response-value file-response">
|
|
6782
6820
|
📎 ${r.name}
|
|
6783
6821
|
${r.size ? l` <span class="file-size"
|
|
6784
|
-
>(${
|
|
6822
|
+
>(${$._formatFileSize(r.size)})</span
|
|
6785
6823
|
>` : ""}
|
|
6786
6824
|
</div>
|
|
6787
6825
|
`;
|
|
6788
6826
|
if (n) {
|
|
6789
|
-
const a =
|
|
6827
|
+
const a = $._extractFilenameFromUrl(r);
|
|
6790
6828
|
return l` <div class="print-response-value file-response">📎 ${a}</div> `;
|
|
6791
6829
|
} else
|
|
6792
6830
|
return l` <div class="print-response-value file-response">📎 ${r}</div> `;
|
|
6793
6831
|
} else {
|
|
6794
|
-
const a = n ? r : "#", d = o ? r.name : n ?
|
|
6832
|
+
const a = n ? r : "#", d = o ? r.name : n ? $._extractFilenameFromUrl(r) : "View File";
|
|
6795
6833
|
return l`
|
|
6796
6834
|
<div class="file-upload-view-only">
|
|
6797
6835
|
<a href="${a}" target="_blank" class="file-link"> 📎 ${d} </a>
|
|
6798
6836
|
${o && r.size ? l`
|
|
6799
6837
|
<span class="file-size-info"
|
|
6800
|
-
>(${
|
|
6838
|
+
>(${$._formatFileSize(r.size)})</span
|
|
6801
6839
|
>
|
|
6802
6840
|
` : ""}
|
|
6803
6841
|
</div>
|
|
@@ -6862,19 +6900,19 @@ class k {
|
|
|
6862
6900
|
const i = t.formData[e.id] ?? "", r = t.validationErrors[e.id], n = () => {
|
|
6863
6901
|
switch (e.type) {
|
|
6864
6902
|
case "textarea":
|
|
6865
|
-
return
|
|
6903
|
+
return $.renderTextArea(e, i, t);
|
|
6866
6904
|
case "select":
|
|
6867
|
-
return
|
|
6905
|
+
return $.renderSelect(e, i, t);
|
|
6868
6906
|
case "radio":
|
|
6869
|
-
return
|
|
6907
|
+
return $.renderRadio(e, i, t);
|
|
6870
6908
|
case "checkbox":
|
|
6871
|
-
return
|
|
6909
|
+
return $.renderCheckbox(e, i, t);
|
|
6872
6910
|
case "signature":
|
|
6873
|
-
return
|
|
6911
|
+
return $.renderSignature(e, i, t);
|
|
6874
6912
|
case "file_upload":
|
|
6875
|
-
return
|
|
6913
|
+
return $.renderFileUpload(e, i, t);
|
|
6876
6914
|
default:
|
|
6877
|
-
return
|
|
6915
|
+
return $.renderDefaultInput(e, i, t);
|
|
6878
6916
|
}
|
|
6879
6917
|
}, o = e.type === "checkbox" && (!e.options || e.options.length === 0);
|
|
6880
6918
|
return t.mode === "print" ? l`
|
|
@@ -6924,13 +6962,13 @@ class $t {
|
|
|
6924
6962
|
* Copyright 2017 Google LLC
|
|
6925
6963
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6926
6964
|
*/
|
|
6927
|
-
class
|
|
6965
|
+
class he extends $t {
|
|
6928
6966
|
constructor(e) {
|
|
6929
|
-
if (super(e), this.it =
|
|
6967
|
+
if (super(e), this.it = _, e.type !== St.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
6930
6968
|
}
|
|
6931
6969
|
render(e) {
|
|
6932
|
-
if (e ===
|
|
6933
|
-
if (e ===
|
|
6970
|
+
if (e === _ || e == null) return this._t = void 0, this.it = e;
|
|
6971
|
+
if (e === U) return e;
|
|
6934
6972
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
6935
6973
|
if (e === this.it) return this._t;
|
|
6936
6974
|
this.it = e;
|
|
@@ -6938,8 +6976,8 @@ class ue extends $t {
|
|
|
6938
6976
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
6939
6977
|
}
|
|
6940
6978
|
}
|
|
6941
|
-
|
|
6942
|
-
const
|
|
6979
|
+
he.directiveName = "unsafeHTML", he.resultType = 1;
|
|
6980
|
+
const Me = kt(he);
|
|
6943
6981
|
class D {
|
|
6944
6982
|
static renderMarkdown(e) {
|
|
6945
6983
|
return e.replace(/^### (.*$)/gim, "<h3>$1</h3>").replace(/^## (.*$)/gim, "<h2>$1</h2>").replace(/^# (.*$)/gim, "<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim, "<strong>$1</strong>").replace(/\*(.*?)\*/gim, "<em>$1</em>").replace(/`(.*?)`/gim, "<code>$1</code>").replace(/^> (.*$)/gim, "<blockquote>$1</blockquote>").replace(/\n/gim, "<br>");
|
|
@@ -6955,7 +6993,7 @@ class D {
|
|
|
6955
6993
|
return l`
|
|
6956
6994
|
<div class="content-element markdown-content">
|
|
6957
6995
|
<div class="markdown-text">
|
|
6958
|
-
${
|
|
6996
|
+
${Me(D.renderMarkdown(e.content))}
|
|
6959
6997
|
</div>
|
|
6960
6998
|
</div>
|
|
6961
6999
|
`;
|
|
@@ -6971,7 +7009,7 @@ class D {
|
|
|
6971
7009
|
static renderHtml(e) {
|
|
6972
7010
|
return l`
|
|
6973
7011
|
<div class="content-element html-content">
|
|
6974
|
-
<div class="html-content-wrapper">${
|
|
7012
|
+
<div class="html-content-wrapper">${Me(e.content)}</div>
|
|
6975
7013
|
</div>
|
|
6976
7014
|
`;
|
|
6977
7015
|
}
|
|
@@ -7041,7 +7079,7 @@ class D {
|
|
|
7041
7079
|
` : i();
|
|
7042
7080
|
}
|
|
7043
7081
|
}
|
|
7044
|
-
class
|
|
7082
|
+
class le {
|
|
7045
7083
|
static renderMobileStepsForStatus(e) {
|
|
7046
7084
|
const { steps: t, disabled: i = !1 } = e;
|
|
7047
7085
|
return l`
|
|
@@ -7093,6 +7131,71 @@ class Me {
|
|
|
7093
7131
|
</div>
|
|
7094
7132
|
`;
|
|
7095
7133
|
}
|
|
7134
|
+
static renderSubmissionErrorView(e) {
|
|
7135
|
+
var r, n, o;
|
|
7136
|
+
const { submissionError: t, onRetry: i } = e;
|
|
7137
|
+
return l`
|
|
7138
|
+
<div class="runner-layout">
|
|
7139
|
+
<!-- Mobile Steps Navigation (visible only on mobile) -->
|
|
7140
|
+
${this.renderMobileStepsForStatus({
|
|
7141
|
+
steps: (r = e.instance) == null ? void 0 : r.steps,
|
|
7142
|
+
isStepAssignedToUser: e.isStepAssignedToUser,
|
|
7143
|
+
completedSteps: e.completedSteps,
|
|
7144
|
+
disabled: !0
|
|
7145
|
+
})}
|
|
7146
|
+
|
|
7147
|
+
<!-- Sidebar: Steps List (read-only, hidden on mobile) -->
|
|
7148
|
+
<aside class="runner-sidebar">
|
|
7149
|
+
<div class="runner-sidebar-header">Steps</div>
|
|
7150
|
+
<nav aria-label="Workflow steps">
|
|
7151
|
+
<ul class="runner-steps-list">
|
|
7152
|
+
${(o = (n = e.instance) == null ? void 0 : n.steps) == null ? void 0 : o.map((a) => {
|
|
7153
|
+
const d = e.isStepAssignedToUser(a), p = e.completedSteps.has(a.id);
|
|
7154
|
+
return l`
|
|
7155
|
+
<li
|
|
7156
|
+
class="runner-step-item ${p ? "completed" : ""} ${d ? "" : "unassigned"}"
|
|
7157
|
+
style="opacity: ${d ? "1" : "0.6"}; cursor: not-allowed;"
|
|
7158
|
+
>
|
|
7159
|
+
<span class="runner-step-title">${a.title}</span>
|
|
7160
|
+
<span class="runner-step-badge ${!p && d ? "error" : ""}">
|
|
7161
|
+
${p ? "Submitted" : d ? "Failed" : "Other User"}
|
|
7162
|
+
</span>
|
|
7163
|
+
</li>
|
|
7164
|
+
`;
|
|
7165
|
+
})}
|
|
7166
|
+
</ul>
|
|
7167
|
+
</nav>
|
|
7168
|
+
</aside>
|
|
7169
|
+
|
|
7170
|
+
<!-- Main Content: Error View -->
|
|
7171
|
+
<main class="runner-main-content">
|
|
7172
|
+
<div class="submission-container">
|
|
7173
|
+
<div class="submission-error-icon">
|
|
7174
|
+
<svg
|
|
7175
|
+
width="64"
|
|
7176
|
+
height="64"
|
|
7177
|
+
viewBox="0 0 24 24"
|
|
7178
|
+
fill="none"
|
|
7179
|
+
stroke="currentColor"
|
|
7180
|
+
stroke-width="2"
|
|
7181
|
+
stroke-linecap="round"
|
|
7182
|
+
stroke-linejoin="round"
|
|
7183
|
+
>
|
|
7184
|
+
<circle cx="12" cy="12" r="10" />
|
|
7185
|
+
<path d="M12 8v4" />
|
|
7186
|
+
<circle cx="12" cy="16" r="1" fill="currentColor" />
|
|
7187
|
+
</svg>
|
|
7188
|
+
</div>
|
|
7189
|
+
<h2 class="submission-title">Submission Failed</h2>
|
|
7190
|
+
<p class="submission-message">
|
|
7191
|
+
${t || "Unable to save your response. Please try again."}
|
|
7192
|
+
</p>
|
|
7193
|
+
${i ? l` <button class="retry-button" @click=${i}>Try Again</button> ` : ""}
|
|
7194
|
+
</div>
|
|
7195
|
+
</main>
|
|
7196
|
+
</div>
|
|
7197
|
+
`;
|
|
7198
|
+
}
|
|
7096
7199
|
static renderUnifiedSubmissionView(e) {
|
|
7097
7200
|
var t, i, r;
|
|
7098
7201
|
return l`
|
|
@@ -7155,7 +7258,7 @@ class Me {
|
|
|
7155
7258
|
`;
|
|
7156
7259
|
}
|
|
7157
7260
|
}
|
|
7158
|
-
class
|
|
7261
|
+
class V {
|
|
7159
7262
|
/**
|
|
7160
7263
|
* Determines if a step should show as completed in the badge.
|
|
7161
7264
|
* If completion screen is showing, all assigned steps are considered completed.
|
|
@@ -7249,7 +7352,7 @@ class Dt {
|
|
|
7249
7352
|
`;
|
|
7250
7353
|
}
|
|
7251
7354
|
}
|
|
7252
|
-
class
|
|
7355
|
+
class pe {
|
|
7253
7356
|
/**
|
|
7254
7357
|
* Handles change events for basic text inputs, textareas, selects, numbers, dates
|
|
7255
7358
|
*/
|
|
@@ -7287,14 +7390,14 @@ class le {
|
|
|
7287
7390
|
n(u), a !== "preview" && o(e, c);
|
|
7288
7391
|
}
|
|
7289
7392
|
}
|
|
7290
|
-
var Ct = Object.defineProperty, At = Object.getOwnPropertyDescriptor,
|
|
7393
|
+
var Ct = Object.defineProperty, At = Object.getOwnPropertyDescriptor, x = (s, e, t, i) => {
|
|
7291
7394
|
for (var r = i > 1 ? void 0 : i ? At(e, t) : e, n = s.length - 1, o; n >= 0; n--)
|
|
7292
7395
|
(o = s[n]) && (r = (i ? o(e, t, r) : o(r)) || r);
|
|
7293
7396
|
return i && r && Ct(e, t, r), r;
|
|
7294
7397
|
};
|
|
7295
7398
|
let f = class extends N {
|
|
7296
7399
|
constructor() {
|
|
7297
|
-
super(...arguments), this.mode = "default", this.isLoading = !1, this._currentStepIndex = 0, this._formData = {}, this._validationErrors = {}, this._internalCompletedSteps = /* @__PURE__ */ new Set(), this._formRestorationComplete = !1, this._savedSignatures = /* @__PURE__ */ new Set(), this._replacingSignatures = /* @__PURE__ */ new Set(), this._isSubmitted = !1, this._userStepsSubmitted = !1, this._justSaved = !1;
|
|
7400
|
+
super(...arguments), this.mode = "default", this.isLoading = !1, this._currentStepIndex = 0, this._formData = {}, this._validationErrors = {}, this._internalCompletedSteps = /* @__PURE__ */ new Set(), this._formRestorationComplete = !1, this._savedSignatures = /* @__PURE__ */ new Set(), this._replacingSignatures = /* @__PURE__ */ new Set(), this._isSubmitted = !1, this._userStepsSubmitted = !1, this._justSaved = !1, this._submissionError = null;
|
|
7298
7401
|
}
|
|
7299
7402
|
willUpdate(s) {
|
|
7300
7403
|
(s.has("mode") || s.has("currentUser")) && this._updateNavigationService(), (s.has("instance") || s.has("workflow") || s.has("mode")) && (this._initializeState(), this._updateValidationService());
|
|
@@ -7307,9 +7410,9 @@ let f = class extends N {
|
|
|
7307
7410
|
super.disconnectedCallback(), window.removeEventListener("resize", this._handleResize.bind(this)), (s = this.signatureManager) == null || s.destroy();
|
|
7308
7411
|
}
|
|
7309
7412
|
_initializeServices() {
|
|
7310
|
-
this.persistenceManager = new bt(), this.responseTracker = new yt(), this.formStateManager = new
|
|
7413
|
+
this.persistenceManager = new bt(), this.responseTracker = new yt(), this.formStateManager = new ce(), this.signatureManager = new _t(
|
|
7311
7414
|
(s) => this._handleSignatureChange(s)
|
|
7312
|
-
), this.fileUploadManager = new
|
|
7415
|
+
), this.fileUploadManager = new ue(this.formStateManager, this.responseTracker), this._updateNavigationService(), this._updateValidationService();
|
|
7313
7416
|
}
|
|
7314
7417
|
_updateNavigationService() {
|
|
7315
7418
|
this.navigationService = new wt(this.mode || "default", this.currentUser);
|
|
@@ -7431,7 +7534,7 @@ let f = class extends N {
|
|
|
7431
7534
|
return !s || this.mode !== "default" ? !0 : this._isStepAssignedToUser(s);
|
|
7432
7535
|
}
|
|
7433
7536
|
_renderNotAssignedView() {
|
|
7434
|
-
return
|
|
7537
|
+
return le.renderNotAssignedView();
|
|
7435
7538
|
}
|
|
7436
7539
|
get _currentStep() {
|
|
7437
7540
|
var s, e, t;
|
|
@@ -7448,7 +7551,7 @@ let f = class extends N {
|
|
|
7448
7551
|
return this.formStateManager.setValidationErrors(e.errors), this._validationErrors = this.formStateManager.getValidationErrors(), e.isValid;
|
|
7449
7552
|
}
|
|
7450
7553
|
_handleInputChange(s, e) {
|
|
7451
|
-
|
|
7554
|
+
pe.handleInputChange(
|
|
7452
7555
|
s,
|
|
7453
7556
|
e,
|
|
7454
7557
|
this._formData,
|
|
@@ -7458,7 +7561,7 @@ let f = class extends N {
|
|
|
7458
7561
|
), this._handleFormDataUpdate(s);
|
|
7459
7562
|
}
|
|
7460
7563
|
_handleCheckboxChange(s, e) {
|
|
7461
|
-
|
|
7564
|
+
pe.handleCheckboxChange(
|
|
7462
7565
|
s,
|
|
7463
7566
|
e,
|
|
7464
7567
|
this._formData,
|
|
@@ -7468,7 +7571,7 @@ let f = class extends N {
|
|
|
7468
7571
|
), this._handleFormDataUpdate(s);
|
|
7469
7572
|
}
|
|
7470
7573
|
_handleCheckboxGroupChange(s, e, t) {
|
|
7471
|
-
|
|
7574
|
+
pe.handleCheckboxGroupChange(
|
|
7472
7575
|
s,
|
|
7473
7576
|
e,
|
|
7474
7577
|
t,
|
|
@@ -7546,7 +7649,7 @@ let f = class extends N {
|
|
|
7546
7649
|
this.responseTracker.trackQuestionResponse(this._currentStep, s, e);
|
|
7547
7650
|
}
|
|
7548
7651
|
_renderQuestion(s) {
|
|
7549
|
-
return
|
|
7652
|
+
return $.render(s, this._getRenderContext());
|
|
7550
7653
|
}
|
|
7551
7654
|
_renderContentElement(s) {
|
|
7552
7655
|
return D.render(s, this._getRenderContext());
|
|
@@ -7570,7 +7673,7 @@ let f = class extends N {
|
|
|
7570
7673
|
return l`
|
|
7571
7674
|
<div class="print-step">
|
|
7572
7675
|
<!-- Step Header -->
|
|
7573
|
-
${
|
|
7676
|
+
${V.renderStepHeader({ step: s, mode: "print" })}
|
|
7574
7677
|
|
|
7575
7678
|
<!-- Step Elements -->
|
|
7576
7679
|
${s.elements.map((e) => this._renderStepElement(e))}
|
|
@@ -7591,7 +7694,7 @@ let f = class extends N {
|
|
|
7591
7694
|
</div>
|
|
7592
7695
|
`;
|
|
7593
7696
|
}
|
|
7594
|
-
_nextStep() {
|
|
7697
|
+
async _nextStep() {
|
|
7595
7698
|
var t, i, r, n;
|
|
7596
7699
|
if (!this._validateStep()) return;
|
|
7597
7700
|
const s = this._currentStep;
|
|
@@ -7599,17 +7702,17 @@ let f = class extends N {
|
|
|
7599
7702
|
const e = this._findNextAssignedStep(this._currentStepIndex);
|
|
7600
7703
|
if (e !== -1) {
|
|
7601
7704
|
const o = (t = this._currentStep) == null ? void 0 : t.id;
|
|
7602
|
-
if (this._currentStepIndex = e,
|
|
7603
|
-
const d = this.instance.steps.find((p) => p.id === o);
|
|
7604
|
-
d && (d.status = "completed");
|
|
7605
|
-
}
|
|
7606
|
-
const a = (n = (r = this.instance) == null ? void 0 : r.steps) == null ? void 0 : n[this._currentStepIndex];
|
|
7607
|
-
a && (a.status = "active"), this._updateInstanceData(o, "step_navigation", {
|
|
7705
|
+
if (this._currentStepIndex = e, (await this._updateInstanceData(o, "step_navigation", {
|
|
7608
7706
|
direction: "next",
|
|
7609
7707
|
fromStepIndex: this._currentStepIndex - 1,
|
|
7610
7708
|
toStepIndex: this._currentStepIndex,
|
|
7611
7709
|
completedStepId: o
|
|
7612
|
-
})
|
|
7710
|
+
})).success && o && (i = this.instance) != null && i.steps) {
|
|
7711
|
+
const p = this.instance.steps.find((c) => c.id === o);
|
|
7712
|
+
p && (p.status = "completed");
|
|
7713
|
+
}
|
|
7714
|
+
const d = (n = (r = this.instance) == null ? void 0 : r.steps) == null ? void 0 : n[this._currentStepIndex];
|
|
7715
|
+
d && (d.status = "active"), this.mode !== "admin" && this._saveFormDataToHistory(), this._scrollToTop();
|
|
7613
7716
|
}
|
|
7614
7717
|
}
|
|
7615
7718
|
_findNextAssignedStep(s) {
|
|
@@ -7643,47 +7746,49 @@ let f = class extends N {
|
|
|
7643
7746
|
);
|
|
7644
7747
|
console.log("🚦 Navigation result:", t), t.canNavigate ? (this._currentStepIndex = t.newStepIndex, console.log(`✅ Navigated to step ${t.newStepIndex}`), this._scrollToTop()) : console.log("❌ Navigation blocked:", t.reason);
|
|
7645
7748
|
}
|
|
7646
|
-
_submitUserSteps() {
|
|
7647
|
-
var
|
|
7749
|
+
async _submitUserSteps() {
|
|
7750
|
+
var i;
|
|
7648
7751
|
if (!this._validateStep()) return;
|
|
7649
7752
|
const s = this._currentStep;
|
|
7650
7753
|
if (s && this._captureSignaturesFromStep(s), !this.instance) {
|
|
7651
7754
|
console.error("Cannot submit, instance data is missing.");
|
|
7652
7755
|
return;
|
|
7653
7756
|
}
|
|
7654
|
-
const e = (
|
|
7655
|
-
e && this._internalCompletedSteps.add(e),
|
|
7757
|
+
const e = (i = this._currentStep) == null ? void 0 : i.id;
|
|
7758
|
+
e && this._internalCompletedSteps.add(e), (await this._updateInstanceData(e, "user_steps_submission")).success && e && this._internalCompletedSteps.add(e), this._userStepsSubmitted = !0, this._clearSavedFormData("user steps submission"), this._scrollToTop();
|
|
7656
7759
|
}
|
|
7657
|
-
_submit() {
|
|
7658
|
-
var
|
|
7760
|
+
async _submit() {
|
|
7761
|
+
var i;
|
|
7659
7762
|
if (!this._validateStep()) return;
|
|
7660
7763
|
const s = this._currentStep;
|
|
7661
7764
|
if (s && this._captureSignaturesFromStep(s), !this.instance) {
|
|
7662
7765
|
console.error("Cannot submit, instance data is missing.");
|
|
7663
7766
|
return;
|
|
7664
7767
|
}
|
|
7665
|
-
const e = (
|
|
7666
|
-
|
|
7768
|
+
const e = (i = this._currentStep) == null ? void 0 : i.id;
|
|
7769
|
+
console.log("Submitting entire workflow:", this.instance.id), console.log("Final form data:", this._formData), (await this._updateInstanceData(e, "submission")).success && (e && this._internalCompletedSteps.add(e), this.instance && (this.instance.status = "completed", this.instance.currentStepId = void 0, this.instance.completedSteps = Array.from(this._internalCompletedSteps)), this._isSubmitted = !0, this._clearSavedFormData("full workflow submission"), this._scrollToTop());
|
|
7667
7770
|
}
|
|
7668
|
-
_saveStep() {
|
|
7669
|
-
var
|
|
7771
|
+
async _saveStep() {
|
|
7772
|
+
var i;
|
|
7670
7773
|
if (!this._validateStep()) return;
|
|
7671
7774
|
const s = this._currentStep;
|
|
7672
7775
|
if (s && this._captureSignaturesFromStep(s), !this.instance) {
|
|
7673
7776
|
console.error("Cannot save, instance data is missing.");
|
|
7674
7777
|
return;
|
|
7675
7778
|
}
|
|
7676
|
-
const e = (
|
|
7677
|
-
if (
|
|
7678
|
-
const i = this.instance.steps.find((r) => r.id === e);
|
|
7679
|
-
i && (i.status = "completed");
|
|
7680
|
-
}
|
|
7681
|
-
this._updateInstanceData(e, "admin_save", {
|
|
7779
|
+
const e = (i = this._currentStep) == null ? void 0 : i.id;
|
|
7780
|
+
if ((await this._updateInstanceData(e, "admin_save", {
|
|
7682
7781
|
stepId: e,
|
|
7683
7782
|
adminMode: !0
|
|
7684
|
-
})
|
|
7685
|
-
|
|
7686
|
-
|
|
7783
|
+
})).success) {
|
|
7784
|
+
if (e && (this._internalCompletedSteps.add(e), this.instance.steps)) {
|
|
7785
|
+
const r = this.instance.steps.find((n) => n.id === e);
|
|
7786
|
+
r && (r.status = "completed");
|
|
7787
|
+
}
|
|
7788
|
+
this._justSaved = !0, this.requestUpdate(), setTimeout(() => {
|
|
7789
|
+
this._justSaved = !1, this.requestUpdate();
|
|
7790
|
+
}, 2e3);
|
|
7791
|
+
}
|
|
7687
7792
|
}
|
|
7688
7793
|
_clearSavedFormData(s) {
|
|
7689
7794
|
var e;
|
|
@@ -7699,12 +7804,12 @@ let f = class extends N {
|
|
|
7699
7804
|
e && e.scrollTo({ top: 0, behavior: "smooth" });
|
|
7700
7805
|
});
|
|
7701
7806
|
}
|
|
7702
|
-
_updateInstanceData(s, e, t) {
|
|
7807
|
+
async _updateInstanceData(s, e, t) {
|
|
7703
7808
|
var d, p, c, u, h, g, v;
|
|
7704
7809
|
s && this._internalCompletedSteps.add(s);
|
|
7705
|
-
let i = (p = (d = this.instance) == null ? void 0 : d.steps) == null ? void 0 : p.find((
|
|
7810
|
+
let i = (p = (d = this.instance) == null ? void 0 : d.steps) == null ? void 0 : p.find((w) => w.id === s);
|
|
7706
7811
|
if (!i && this._internalCompletedSteps.size > 0) {
|
|
7707
|
-
const
|
|
7812
|
+
const w = Array.from(this._internalCompletedSteps), Y = w[w.length - 1];
|
|
7708
7813
|
i = (u = (c = this.instance) == null ? void 0 : c.steps) == null ? void 0 : u.find((q) => q.id === Y);
|
|
7709
7814
|
}
|
|
7710
7815
|
const r = e === "submission", n = ((h = this.instance) == null ? void 0 : h.steps) && this._internalCompletedSteps.size >= this.instance.steps.length, o = r || n ? null : this._currentStep ? {
|
|
@@ -7713,23 +7818,25 @@ let f = class extends N {
|
|
|
7713
7818
|
} : null, a = {
|
|
7714
7819
|
instanceId: (g = this.instance) == null ? void 0 : g.id,
|
|
7715
7820
|
workflowId: (v = this.instance) == null ? void 0 : v.workflowId,
|
|
7716
|
-
completedStepId: s || (i ? i.id :
|
|
7821
|
+
completedStepId: s || (i ? i.id : void 0),
|
|
7717
7822
|
completedStepData: i ? {
|
|
7718
7823
|
id: i.id,
|
|
7719
7824
|
title: i.title,
|
|
7720
7825
|
responses: i.responses || []
|
|
7721
|
-
} :
|
|
7826
|
+
} : void 0,
|
|
7722
7827
|
completedSteps: Array.from(this._internalCompletedSteps),
|
|
7723
7828
|
currentStep: o,
|
|
7724
7829
|
mode: this.mode
|
|
7725
7830
|
};
|
|
7726
|
-
this.
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
})
|
|
7732
|
-
|
|
7831
|
+
if (this.onInstanceUpdated)
|
|
7832
|
+
try {
|
|
7833
|
+
this._submissionError = null, this.requestUpdate();
|
|
7834
|
+
const w = await this.onInstanceUpdated(a);
|
|
7835
|
+
return w.success ? this._submissionError = null : (this._submissionError = w.error || "Unable to save response. Please try again.", s && this._internalCompletedSteps.delete(s)), this.requestUpdate(), w;
|
|
7836
|
+
} catch (w) {
|
|
7837
|
+
return this._submissionError = w instanceof Error ? w.message : "Unable to save response. Please try again.", s && this._internalCompletedSteps.delete(s), this.requestUpdate(), { success: !1, error: this._submissionError };
|
|
7838
|
+
}
|
|
7839
|
+
return { success: !0 };
|
|
7733
7840
|
}
|
|
7734
7841
|
_restoreFormData() {
|
|
7735
7842
|
var e;
|
|
@@ -7893,7 +8000,7 @@ let f = class extends N {
|
|
|
7893
8000
|
completedSteps: this._internalCompletedSteps,
|
|
7894
8001
|
isStepAssignedToUser: this._isStepAssignedToUser.bind(this)
|
|
7895
8002
|
};
|
|
7896
|
-
return
|
|
8003
|
+
return le.renderUnifiedSubmissionView(s);
|
|
7897
8004
|
}
|
|
7898
8005
|
/**
|
|
7899
8006
|
* Check if the instance status indicates the workflow is completed
|
|
@@ -7928,12 +8035,28 @@ let f = class extends N {
|
|
|
7928
8035
|
var s;
|
|
7929
8036
|
return this.mode !== "default" ? !1 : !!(this._isCurrentStepCompleted() || this._isInstanceCompleted() || ((s = this.instance) == null ? void 0 : s.status) === "active" && this._areUserStepsCompleted());
|
|
7930
8037
|
}
|
|
8038
|
+
// Render the submission error view
|
|
8039
|
+
_renderSubmissionErrorView() {
|
|
8040
|
+
const s = {
|
|
8041
|
+
instance: this.instance,
|
|
8042
|
+
assignedSteps: this._getAssignedSteps(),
|
|
8043
|
+
completedSteps: this._internalCompletedSteps,
|
|
8044
|
+
isStepAssignedToUser: this._isStepAssignedToUser.bind(this),
|
|
8045
|
+
submissionError: this._submissionError,
|
|
8046
|
+
onRetry: () => {
|
|
8047
|
+
this._submissionError = null, this._isSubmitted = !1, this._userStepsSubmitted = !1, this.requestUpdate();
|
|
8048
|
+
}
|
|
8049
|
+
};
|
|
8050
|
+
return le.renderSubmissionErrorView(s);
|
|
8051
|
+
}
|
|
7931
8052
|
/**
|
|
7932
8053
|
* Handles mode-based content routing and basic validation
|
|
7933
8054
|
* Returns content for special modes or null to continue with normal rendering
|
|
7934
8055
|
*/
|
|
7935
8056
|
_renderModeBasedContent() {
|
|
7936
8057
|
var e, t;
|
|
8058
|
+
if (this._submissionError)
|
|
8059
|
+
return this._renderSubmissionErrorView();
|
|
7937
8060
|
if (this._shouldShowCompletionView())
|
|
7938
8061
|
return this._renderUnifiedSubmissionView();
|
|
7939
8062
|
if (this.mode === "print")
|
|
@@ -7973,7 +8096,7 @@ let f = class extends N {
|
|
|
7973
8096
|
const e = this._isLastAssignedStep(), t = this._isLastStepInWorkflow(), i = this.mode === "preview" ? (r = this.workflow) == null ? void 0 : r.steps : (n = this.instance) == null ? void 0 : n.steps;
|
|
7974
8097
|
return l`
|
|
7975
8098
|
<!-- Mobile Steps Navigation (visible only on mobile) -->
|
|
7976
|
-
${
|
|
8099
|
+
${V.renderMobileSteps({
|
|
7977
8100
|
steps: i,
|
|
7978
8101
|
currentStepIndex: this._currentStepIndex,
|
|
7979
8102
|
mode: this.mode || "default",
|
|
@@ -7986,7 +8109,7 @@ let f = class extends N {
|
|
|
7986
8109
|
})}
|
|
7987
8110
|
|
|
7988
8111
|
<!-- Sidebar: Steps List (hidden on mobile) -->
|
|
7989
|
-
${
|
|
8112
|
+
${V.renderSidebar({
|
|
7990
8113
|
steps: i,
|
|
7991
8114
|
currentStepIndex: this._currentStepIndex,
|
|
7992
8115
|
mode: this.mode || "default",
|
|
@@ -8000,8 +8123,8 @@ let f = class extends N {
|
|
|
8000
8123
|
|
|
8001
8124
|
<!-- Main Content: Step Details and Questions -->
|
|
8002
8125
|
<main class="runner-main-content">
|
|
8003
|
-
${this.mode === "print" ?
|
|
8004
|
-
${
|
|
8126
|
+
${this.mode === "print" ? V.renderStepHeader({ step: s, mode: this.mode }) : l`<div class="runner-card">
|
|
8127
|
+
${V.renderStepHeader({
|
|
8005
8128
|
step: s,
|
|
8006
8129
|
mode: this.mode
|
|
8007
8130
|
})}
|
|
@@ -8015,10 +8138,18 @@ let f = class extends N {
|
|
|
8015
8138
|
justSaved: this._justSaved,
|
|
8016
8139
|
isCurrentStepAssigned: this._isCurrentStepAssigned(),
|
|
8017
8140
|
handlers: {
|
|
8018
|
-
saveStep:
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8141
|
+
saveStep: () => {
|
|
8142
|
+
this._saveStep();
|
|
8143
|
+
},
|
|
8144
|
+
nextStep: () => {
|
|
8145
|
+
this._nextStep();
|
|
8146
|
+
},
|
|
8147
|
+
submitUserSteps: () => {
|
|
8148
|
+
this._submitUserSteps();
|
|
8149
|
+
},
|
|
8150
|
+
submit: () => {
|
|
8151
|
+
this._submit();
|
|
8152
|
+
}
|
|
8022
8153
|
}
|
|
8023
8154
|
})}
|
|
8024
8155
|
</form>
|
|
@@ -8071,61 +8202,67 @@ f.CONTENT_ELEMENT_TYPES = [
|
|
|
8071
8202
|
"divider",
|
|
8072
8203
|
"markdown"
|
|
8073
8204
|
];
|
|
8074
|
-
|
|
8205
|
+
x([
|
|
8075
8206
|
C({ type: Object })
|
|
8076
8207
|
], f.prototype, "instance", 2);
|
|
8077
|
-
|
|
8208
|
+
x([
|
|
8078
8209
|
C({ type: Object })
|
|
8079
8210
|
], f.prototype, "workflow", 2);
|
|
8080
|
-
|
|
8211
|
+
x([
|
|
8081
8212
|
C({ type: String })
|
|
8082
8213
|
], f.prototype, "mode", 2);
|
|
8083
|
-
|
|
8214
|
+
x([
|
|
8084
8215
|
C({ type: Boolean })
|
|
8085
8216
|
], f.prototype, "isLoading", 2);
|
|
8086
|
-
|
|
8217
|
+
x([
|
|
8087
8218
|
C({ type: Object })
|
|
8088
8219
|
], f.prototype, "currentUser", 2);
|
|
8089
|
-
|
|
8220
|
+
x([
|
|
8090
8221
|
C({ type: Function })
|
|
8091
8222
|
], f.prototype, "onSignatureCaptured", 2);
|
|
8092
|
-
|
|
8223
|
+
x([
|
|
8093
8224
|
C({ type: Function })
|
|
8094
8225
|
], f.prototype, "onFileUploaded", 2);
|
|
8095
|
-
|
|
8226
|
+
x([
|
|
8227
|
+
C({ type: Function })
|
|
8228
|
+
], f.prototype, "onInstanceUpdated", 2);
|
|
8229
|
+
x([
|
|
8096
8230
|
b()
|
|
8097
8231
|
], f.prototype, "_currentStepIndex", 2);
|
|
8098
|
-
|
|
8232
|
+
x([
|
|
8099
8233
|
b()
|
|
8100
8234
|
], f.prototype, "_formData", 2);
|
|
8101
|
-
|
|
8235
|
+
x([
|
|
8102
8236
|
b()
|
|
8103
8237
|
], f.prototype, "_validationErrors", 2);
|
|
8104
|
-
|
|
8238
|
+
x([
|
|
8105
8239
|
b()
|
|
8106
8240
|
], f.prototype, "_internalCompletedSteps", 2);
|
|
8107
|
-
|
|
8241
|
+
x([
|
|
8108
8242
|
b()
|
|
8109
8243
|
], f.prototype, "_formRestorationComplete", 2);
|
|
8110
|
-
|
|
8244
|
+
x([
|
|
8111
8245
|
b()
|
|
8112
8246
|
], f.prototype, "_savedSignatures", 2);
|
|
8113
|
-
|
|
8247
|
+
x([
|
|
8114
8248
|
b()
|
|
8115
8249
|
], f.prototype, "_replacingSignatures", 2);
|
|
8116
|
-
|
|
8250
|
+
x([
|
|
8117
8251
|
b()
|
|
8118
8252
|
], f.prototype, "_savedInstance", 2);
|
|
8119
|
-
|
|
8253
|
+
x([
|
|
8120
8254
|
b()
|
|
8121
8255
|
], f.prototype, "_isSubmitted", 2);
|
|
8122
|
-
|
|
8256
|
+
x([
|
|
8123
8257
|
b()
|
|
8124
8258
|
], f.prototype, "_userStepsSubmitted", 2);
|
|
8125
|
-
|
|
8259
|
+
x([
|
|
8126
8260
|
b()
|
|
8127
8261
|
], f.prototype, "_justSaved", 2);
|
|
8128
|
-
|
|
8262
|
+
x([
|
|
8263
|
+
b()
|
|
8264
|
+
], f.prototype, "_submissionError", 2);
|
|
8265
|
+
f = x([
|
|
8129
8266
|
Ne("runner-widget")
|
|
8130
8267
|
], f);
|
|
8131
8268
|
function Jt(s, e = {}) {
|
|
@@ -8155,7 +8292,7 @@ function Jt(s, e = {}) {
|
|
|
8155
8292
|
</div>
|
|
8156
8293
|
<hr class="print-question-separator" />
|
|
8157
8294
|
|
|
8158
|
-
${n ?
|
|
8295
|
+
${n ? Ht(s, o) : ""}
|
|
8159
8296
|
${s.steps.map((d) => Et(d)).join(`
|
|
8160
8297
|
`)}
|
|
8161
8298
|
</div>
|
|
@@ -8187,10 +8324,10 @@ function Mt(s) {
|
|
|
8187
8324
|
`;
|
|
8188
8325
|
}
|
|
8189
8326
|
function Tt(s, e) {
|
|
8190
|
-
return
|
|
8327
|
+
return Vt(s) ? Ft(s, e) : zt(s);
|
|
8191
8328
|
}
|
|
8192
8329
|
function Ft(s, e) {
|
|
8193
|
-
const t =
|
|
8330
|
+
const t = Wt(s.id, e.responses), i = t == null ? void 0 : t.value, n = s.type === "checkbox" && (!s.options || s.options.length === 0) ? "" : `
|
|
8194
8331
|
<div class="print-question-title">
|
|
8195
8332
|
${m(s.label)}:
|
|
8196
8333
|
</div>
|
|
@@ -8201,9 +8338,9 @@ function Ft(s, e) {
|
|
|
8201
8338
|
case "date":
|
|
8202
8339
|
return n + It(s, i) + o;
|
|
8203
8340
|
case "textarea":
|
|
8204
|
-
return n + Pt(s, i) + o;
|
|
8205
|
-
case "select":
|
|
8206
8341
|
return n + Ut(s, i) + o;
|
|
8342
|
+
case "select":
|
|
8343
|
+
return n + Pt(s, i) + o;
|
|
8207
8344
|
case "radio":
|
|
8208
8345
|
return n + Nt(s, i) + o;
|
|
8209
8346
|
case "checkbox":
|
|
@@ -8324,14 +8461,14 @@ function It(s, e) {
|
|
|
8324
8461
|
</div>
|
|
8325
8462
|
`;
|
|
8326
8463
|
}
|
|
8327
|
-
function
|
|
8464
|
+
function Ut(s, e) {
|
|
8328
8465
|
return `
|
|
8329
8466
|
<div class="print-response-value textarea-response">
|
|
8330
8467
|
${(e != null ? m(String(e)) : "") || '<span class="print-no-response">No response</span>'}
|
|
8331
8468
|
</div>
|
|
8332
8469
|
`;
|
|
8333
8470
|
}
|
|
8334
|
-
function
|
|
8471
|
+
function Pt(s, e) {
|
|
8335
8472
|
const t = e != null ? String(e) : "";
|
|
8336
8473
|
return `
|
|
8337
8474
|
<div class="print-response-value select-response">
|
|
@@ -8406,7 +8543,7 @@ function Rt(s, e) {
|
|
|
8406
8543
|
</div>
|
|
8407
8544
|
`;
|
|
8408
8545
|
}
|
|
8409
|
-
function
|
|
8546
|
+
function Vt(s) {
|
|
8410
8547
|
return [
|
|
8411
8548
|
"text_input",
|
|
8412
8549
|
"textarea",
|
|
@@ -8419,10 +8556,10 @@ function Wt(s) {
|
|
|
8419
8556
|
"signature"
|
|
8420
8557
|
].includes(s.type);
|
|
8421
8558
|
}
|
|
8422
|
-
function
|
|
8559
|
+
function Wt(s, e) {
|
|
8423
8560
|
return e == null ? void 0 : e.find((t) => t.elementId === s);
|
|
8424
8561
|
}
|
|
8425
|
-
function
|
|
8562
|
+
function Ht(s, e) {
|
|
8426
8563
|
return `
|
|
8427
8564
|
<div class="runner-card" style="margin-bottom: 40px; border-left: 4px solid #3b82f6;">
|
|
8428
8565
|
<div style="display: flex; justify-content: between; align-items: center; gap: 20px;">
|
|
@@ -9007,14 +9144,7 @@ function Zt(s, e) {
|
|
|
9007
9144
|
}
|
|
9008
9145
|
t.innerHTML = "";
|
|
9009
9146
|
const i = document.createElement("runner-widget");
|
|
9010
|
-
return e.mode === "preview" ? (i.workflow = e.workflow, i.mode = "preview") : (i.instance = e.instance, i.mode = e.mode || "default"), e.mode && (i.mode = e.mode), e.isLoading !== void 0 && (i.isLoading = e.isLoading), e.onSignatureCaptured && (i.onSignatureCaptured = e.onSignatureCaptured), e.onFileUploaded && (i.onFileUploaded = e.onFileUploaded), e.currentUser && (i.currentUser = e.currentUser), e.onInstanceUpdated && i.
|
|
9011
|
-
const n = r;
|
|
9012
|
-
try {
|
|
9013
|
-
e.onInstanceUpdated(n.detail);
|
|
9014
|
-
} catch (o) {
|
|
9015
|
-
console.error("Error executing onInstanceUpdated callback:", o);
|
|
9016
|
-
}
|
|
9017
|
-
}), t.appendChild(i), console.log(`Drill Runner mounted on #${s}`), i;
|
|
9147
|
+
return e.mode === "preview" ? (i.workflow = e.workflow, i.mode = "preview") : (i.instance = e.instance, i.mode = e.mode || "default"), e.mode && (i.mode = e.mode), e.isLoading !== void 0 && (i.isLoading = e.isLoading), e.onSignatureCaptured && (i.onSignatureCaptured = e.onSignatureCaptured), e.onFileUploaded && (i.onFileUploaded = e.onFileUploaded), e.currentUser && (i.currentUser = e.currentUser), e.onInstanceUpdated && (i.onInstanceUpdated = e.onInstanceUpdated), t.appendChild(i), console.log(`Drill Runner mounted on #${s}`), i;
|
|
9018
9148
|
}
|
|
9019
9149
|
function ei(s, e) {
|
|
9020
9150
|
const t = s.getFormData(), i = JSON.parse(JSON.stringify(e));
|