drill-widgets 2.7.17 → 2.7.18
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 +247 -208
- package/dist/drill-widgets.umd.js +77 -67
- package/dist/lib.d.ts +22 -0
- package/package.json +1 -1
package/dist/drill-widgets.es.js
CHANGED
|
@@ -45,7 +45,7 @@ const Oe = (s) => new Fe(typeof s == "string" ? s : s + "", void 0, me), O = (s,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: je, defineProperty: Ve, getOwnPropertyDescriptor: We, getOwnPropertyNames: He, getOwnPropertySymbols: Be, getPrototypeOf: Qe } = Object, T = globalThis, ye = T.trustedTypes, Ge = ye ? ye.emptyScript : "", re = T.reactiveElementPolyfillSupport, V = (s, e) => s, J = { toAttribute(s, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
s = s ? Ge : null;
|
|
@@ -73,8 +73,8 @@ const { is: Ve, defineProperty: We, getOwnPropertyDescriptor: He, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} }, fe = (s, e) => !
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, fe = (s, e) => !je(s, e), we = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: fe };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let P = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
@@ -85,11 +85,11 @@ let P = class extends HTMLElement {
|
|
|
85
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 && Ve(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 } = We(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[t] = o;
|
|
@@ -103,14 +103,14 @@ let P = class extends HTMLElement {
|
|
|
103
103
|
return this.elementProperties.get(e) ?? we;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(V("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(
|
|
113
|
-
const t = this.properties, i = [...
|
|
111
|
+
if (this.hasOwnProperty(V("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(V("properties"))) {
|
|
113
|
+
const t = this.properties, i = [...He(t), ...Be(t)];
|
|
114
114
|
for (const r of i) this.createProperty(r, t[r]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -276,15 +276,15 @@ let P = class extends HTMLElement {
|
|
|
276
276
|
firstUpdated(e) {
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
|
-
P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[
|
|
279
|
+
P.elementStyles = [], P.shadowRootOptions = { mode: "open" }, P[V("elementProperties")] = /* @__PURE__ */ new Map(), P[V("finalized")] = /* @__PURE__ */ new Map(), re == null || re({ ReactiveElement: P }), (T.reactiveElementVersions ?? (T.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, ke = /-->/g, $e = />/g,
|
|
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"),
|
|
285
|
+
const W = globalThis, X = W.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, H = () => 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, M = 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"), w = Symbol.for("lit-nothing"), Ae = /* @__PURE__ */ new WeakMap(), F = I.createTreeWalker(I, 129);
|
|
288
288
|
function Pe(s, e) {
|
|
289
289
|
if (!be(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return Se !== void 0 ? Se.createHTML(e) : e;
|
|
@@ -295,8 +295,8 @@ 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 = ke : c[1] !== void 0 ? o = $e : c[2] !== void 0 ? (Ue.test(c[2]) && (r = RegExp("</" + c[2], "g")), o =
|
|
299
|
-
const g = 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 = M) : c[3] !== void 0 && (o = M) : o === M ? 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 ? M : c[3] === '"' ? Ce : De) : o === Ce || o === De ? o = M : o === ke || o === $e ? o = R : (o = M, r = void 0);
|
|
299
|
+
const g = o === M && 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
302
|
return [Pe(s, n + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
@@ -314,15 +314,15 @@ class Q {
|
|
|
314
314
|
for (; (r = F.nextNode()) !== null && d.length < a; ) {
|
|
315
315
|
if (r.nodeType === 1) {
|
|
316
316
|
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(ze)) {
|
|
317
|
-
const h = c[o++], g = r.getAttribute(u).split(E),
|
|
318
|
-
d.push({ type: 1, index: n, name:
|
|
317
|
+
const h = c[o++], g = r.getAttribute(u).split(E), x = /([.?@])?(.*)/.exec(h);
|
|
318
|
+
d.push({ type: 1, index: n, name: x[2], strings: g, ctor: x[1] === "." ? Ze : x[1] === "?" ? et : x[1] === "@" ? tt : se }), r.removeAttribute(u);
|
|
319
319
|
} else u.startsWith(E) && (d.push({ type: 6, index: n }), r.removeAttribute(u));
|
|
320
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 : "";
|
|
324
|
-
for (let g = 0; g < h; g++) r.append(u[g],
|
|
325
|
-
r.append(u[h],
|
|
324
|
+
for (let g = 0; g < h; g++) r.append(u[g], H()), F.nextNode(), d.push({ type: 2, index: ++n });
|
|
325
|
+
r.append(u[h], H());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
} else if (r.nodeType === 8) if (r.data === Ie) d.push({ type: 2, index: n });
|
|
@@ -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 = w, 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 === w || e == null || e === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : 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,7 +402,7 @@ 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 !== w && 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;
|
|
@@ -421,7 +421,7 @@ class G {
|
|
|
421
421
|
be(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const t = this._$AH;
|
|
423
423
|
let i, r = 0;
|
|
424
|
-
for (const n of e) r === t.length ? t.push(i = new G(this.O(
|
|
424
|
+
for (const n of e) r === t.length ? t.push(i = new G(this.O(H()), this.O(H()), this, this.options)) : i = t[r], i._$AI(n), r++;
|
|
425
425
|
r < t.length && (this._$AR(i && i._$AB.nextSibling, r), t.length = r);
|
|
426
426
|
}
|
|
427
427
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -444,7 +444,7 @@ 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 = w, 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 = w;
|
|
448
448
|
}
|
|
449
449
|
_$AI(e, t = this, i, r) {
|
|
450
450
|
const n = this.strings;
|
|
@@ -453,12 +453,12 @@ class se {
|
|
|
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 === U && (p = this._$AH[d]), o || (o = !B(p) || p !== this._$AH[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 === w ? e = w : e !== w && (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 === w ? 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 === w ? 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 !== w);
|
|
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) ?? w) === U) return;
|
|
486
|
+
const i = this._$AH, r = e === w && i !== w || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== w && (i === w || 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,14 +502,14 @@ class it {
|
|
|
502
502
|
L(this, e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const oe =
|
|
506
|
-
oe == null || oe(Q, G), (
|
|
505
|
+
const oe = W.litHtmlPolyfillSupport;
|
|
506
|
+
oe == null || oe(Q, G), (W.litHtmlVersions ?? (W.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$;
|
|
510
510
|
if (r === void 0) {
|
|
511
511
|
const n = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
512
|
-
i._$litPart$ = r = new G(e.insertBefore(
|
|
512
|
+
i._$litPart$ = r = new G(e.insertBefore(H(), n), n, void 0, t ?? {});
|
|
513
513
|
}
|
|
514
514
|
return r._$AI(s), r;
|
|
515
515
|
};
|
|
@@ -544,8 +544,8 @@ let N = class extends P {
|
|
|
544
544
|
return U;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
var
|
|
548
|
-
N._$litElement$ = !0, N.finalized = !0, (
|
|
547
|
+
var Me;
|
|
548
|
+
N._$litElement$ = !0, N.finalized = !0, (Me = z.litElementHydrateSupport) == null || Me.call(z, { LitElement: N });
|
|
549
549
|
const ae = z.litElementPolyfillSupport;
|
|
550
550
|
ae == null || ae({ LitElement: N });
|
|
551
551
|
(z.litElementVersions ?? (z.litElementVersions = [])).push("4.2.0");
|
|
@@ -585,7 +585,7 @@ const rt = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged:
|
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + i);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
588
|
+
function $(s) {
|
|
589
589
|
return (e, t) => typeof t == "object" ? nt(s, e, t) : ((i, r, n) => {
|
|
590
590
|
const o = r.hasOwnProperty(n);
|
|
591
591
|
return r.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
@@ -597,13 +597,13 @@ function C(s) {
|
|
|
597
597
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
598
598
|
*/
|
|
599
599
|
function b(s) {
|
|
600
|
-
return
|
|
600
|
+
return $({ ...s, state: !0, attribute: !1 });
|
|
601
601
|
}
|
|
602
|
-
const
|
|
602
|
+
const k = [];
|
|
603
603
|
for (let s = 0; s < 256; ++s)
|
|
604
|
-
|
|
604
|
+
k.push((s + 256).toString(16).slice(1));
|
|
605
605
|
function ot(s, e = 0) {
|
|
606
|
-
return (
|
|
606
|
+
return (k[s[e + 0]] + k[s[e + 1]] + k[s[e + 2]] + k[s[e + 3]] + "-" + k[s[e + 4]] + k[s[e + 5]] + "-" + k[s[e + 6]] + k[s[e + 7]] + "-" + k[s[e + 8]] + k[s[e + 9]] + "-" + k[s[e + 10]] + k[s[e + 11]] + k[s[e + 12]] + k[s[e + 13]] + k[s[e + 14]] + k[s[e + 15]]).toLowerCase();
|
|
607
607
|
}
|
|
608
608
|
let de;
|
|
609
609
|
const at = new Uint8Array(16);
|
|
@@ -880,7 +880,8 @@ const pt = O`
|
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
.form-group input,
|
|
883
|
-
.form-group textarea
|
|
883
|
+
.form-group textarea,
|
|
884
|
+
.form-group select {
|
|
884
885
|
padding: 12px;
|
|
885
886
|
border: 1px solid var(--input-border);
|
|
886
887
|
border-radius: var(--input-radius);
|
|
@@ -890,12 +891,22 @@ const pt = O`
|
|
|
890
891
|
color: inherit;
|
|
891
892
|
}
|
|
892
893
|
|
|
894
|
+
.form-group select {
|
|
895
|
+
cursor: pointer;
|
|
896
|
+
appearance: none;
|
|
897
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
898
|
+
background-repeat: no-repeat;
|
|
899
|
+
background-position: right 12px center;
|
|
900
|
+
padding-right: 40px;
|
|
901
|
+
}
|
|
902
|
+
|
|
893
903
|
.form-group input:focus,
|
|
894
|
-
.form-group textarea:focus
|
|
904
|
+
.form-group textarea:focus,
|
|
905
|
+
.form-group select:focus {
|
|
895
906
|
outline: none;
|
|
896
907
|
border-color: var(--input-border-focus);
|
|
897
908
|
box-shadow: 0 0 0 3px var(--input-focus-ring);
|
|
898
|
-
background: var(--input-bg);
|
|
909
|
+
background-color: var(--input-bg);
|
|
899
910
|
}
|
|
900
911
|
|
|
901
912
|
.form-group input::placeholder,
|
|
@@ -3885,14 +3896,14 @@ const pt = O`
|
|
|
3885
3896
|
}
|
|
3886
3897
|
}
|
|
3887
3898
|
`;
|
|
3888
|
-
var gt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor,
|
|
3899
|
+
var gt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, _ = (s, e, t, i) => {
|
|
3889
3900
|
for (var r = i > 1 ? void 0 : i ? mt(e, t) : e, n = s.length - 1, o; n >= 0; n--)
|
|
3890
3901
|
(o = s[n]) && (r = (i ? o(e, t, r) : o(r)) || r);
|
|
3891
3902
|
return i && r && gt(e, t, r), r;
|
|
3892
3903
|
};
|
|
3893
|
-
let
|
|
3904
|
+
let v = class extends N {
|
|
3894
3905
|
constructor() {
|
|
3895
|
-
super(...arguments), this._templateData = {
|
|
3906
|
+
super(...arguments), this.labelForDrill = "Drill", this.labelForGroup = "Group", this.subjectTypes = [], this.groups = [], this._templateData = {
|
|
3896
3907
|
name: "",
|
|
3897
3908
|
description: "",
|
|
3898
3909
|
steps: []
|
|
@@ -3956,7 +3967,8 @@ let y = class extends N {
|
|
|
3956
3967
|
id: this._templateData.id || A(),
|
|
3957
3968
|
name: this._templateData.name,
|
|
3958
3969
|
description: this._templateData.description || "",
|
|
3959
|
-
steps: this._templateData.steps || []
|
|
3970
|
+
steps: this._templateData.steps || [],
|
|
3971
|
+
subjectType: this._templateData.subjectType
|
|
3960
3972
|
};
|
|
3961
3973
|
console.log("💾 Builder Widget: Save button clicked"), console.log("📄 Workflow Template:", JSON.stringify(i, null, 2)), this.workflow ? (console.log("Calling onWorkflowUpdated callback"), (e = this.onWorkflowUpdated) == null || e.call(this, i)) : (console.log("Calling onWorkflowCreated callback"), (t = this.onWorkflowCreated) == null || t.call(this, i));
|
|
3962
3974
|
} else
|
|
@@ -4117,6 +4129,12 @@ let y = class extends N {
|
|
|
4117
4129
|
steps: n
|
|
4118
4130
|
}, console.log("📝 Template updated with new step order"), this._draggedStepId = null, this._dragOverStepId = null;
|
|
4119
4131
|
}
|
|
4132
|
+
_handleSubjectTypeChange(s) {
|
|
4133
|
+
this._templateData = {
|
|
4134
|
+
...this._templateData,
|
|
4135
|
+
subjectType: s.target.value
|
|
4136
|
+
};
|
|
4137
|
+
}
|
|
4120
4138
|
_addQuestion(s = "text_input") {
|
|
4121
4139
|
var i, r;
|
|
4122
4140
|
if (!this._templateData.steps || this._templateData.steps.length === 0 || !this._selectedStepId) {
|
|
@@ -4818,7 +4836,7 @@ Use **bold** and *italic* text.`;
|
|
|
4818
4836
|
case "role":
|
|
4819
4837
|
switch (s.type) {
|
|
4820
4838
|
case "instance_role_assignee_select":
|
|
4821
|
-
return s.targetId ? `Assigned to: ${s.
|
|
4839
|
+
return s.targetId ? `Assigned to: ${s.targetName} role` : "Assigned to: Role";
|
|
4822
4840
|
default:
|
|
4823
4841
|
return "Assigned to: Role";
|
|
4824
4842
|
}
|
|
@@ -4831,7 +4849,7 @@ Use **bold** and *italic* text.`;
|
|
|
4831
4849
|
const s = this._getSelectedStep();
|
|
4832
4850
|
return l`
|
|
4833
4851
|
<div class="header">
|
|
4834
|
-
<div class="header-inputs">
|
|
4852
|
+
<div class="header-inputs flex items-center">
|
|
4835
4853
|
<div class="form-group">
|
|
4836
4854
|
<label for="template-title">Title</label>
|
|
4837
4855
|
<input
|
|
@@ -4852,6 +4870,14 @@ Use **bold** and *italic* text.`;
|
|
|
4852
4870
|
@input=${this._handleDescriptionChange}
|
|
4853
4871
|
/>
|
|
4854
4872
|
</div>
|
|
4873
|
+
${this.subjectTypes.length > 0 ? l`<div class="form-group">
|
|
4874
|
+
<label for="subject-type-select">Subject Type</label>
|
|
4875
|
+
<select id="subject-type-select" @change=${this._handleSubjectTypeChange}>
|
|
4876
|
+
${this.subjectTypes.map(
|
|
4877
|
+
(t) => l`<option value=${t.name}>${t.name}</option>`
|
|
4878
|
+
)}
|
|
4879
|
+
</select>
|
|
4880
|
+
</div>` : l``}
|
|
4855
4881
|
</div>
|
|
4856
4882
|
<div class="header-actions">
|
|
4857
4883
|
<button class="save-button" @click=${this._handleSave}>Save template</button>
|
|
@@ -4916,9 +4942,10 @@ Use **bold** and *italic* text.`;
|
|
|
4916
4942
|
>
|
|
4917
4943
|
<div class="assignment-card-radio"></div>
|
|
4918
4944
|
<div class="assignment-card-content">
|
|
4919
|
-
<div class="assignment-card-title"
|
|
4945
|
+
<div class="assignment-card-title">${this.labelForGroup}</div>
|
|
4920
4946
|
<div class="assignment-card-description">
|
|
4921
|
-
Assignment is based on individuals within a certain
|
|
4947
|
+
Assignment is based on individuals within a certain
|
|
4948
|
+
${this.labelForGroup}.
|
|
4922
4949
|
</div>
|
|
4923
4950
|
</div>
|
|
4924
4951
|
</div>
|
|
@@ -4937,9 +4964,12 @@ Use **bold** and *italic* text.`;
|
|
|
4937
4964
|
}}
|
|
4938
4965
|
/>
|
|
4939
4966
|
<div class="assignment-radio-label">
|
|
4940
|
-
<div class="assignment-radio-title">
|
|
4967
|
+
<div class="assignment-radio-title">
|
|
4968
|
+
${this.labelForDrill} subject
|
|
4969
|
+
</div>
|
|
4941
4970
|
<div class="assignment-radio-description">
|
|
4942
|
-
The step will be assigned to the subject of this
|
|
4971
|
+
The step will be assigned to the subject of this
|
|
4972
|
+
${this.labelForDrill}.
|
|
4943
4973
|
</div>
|
|
4944
4974
|
</div>
|
|
4945
4975
|
</label>
|
|
@@ -4956,9 +4986,12 @@ Use **bold** and *italic* text.`;
|
|
|
4956
4986
|
/>
|
|
4957
4987
|
|
|
4958
4988
|
<div class="assignment-radio-label">
|
|
4959
|
-
<div class="assignment-radio-title">
|
|
4989
|
+
<div class="assignment-radio-title">
|
|
4990
|
+
${this.labelForDrill} creator
|
|
4991
|
+
</div>
|
|
4960
4992
|
<div class="assignment-radio-description">
|
|
4961
|
-
The step will be assigned to the creator of this
|
|
4993
|
+
The step will be assigned to the creator of this
|
|
4994
|
+
${this.labelForDrill}.
|
|
4962
4995
|
</div>
|
|
4963
4996
|
</div>
|
|
4964
4997
|
</label>
|
|
@@ -4975,11 +5008,11 @@ Use **bold** and *italic* text.`;
|
|
|
4975
5008
|
/>
|
|
4976
5009
|
<div class="assignment-radio-label">
|
|
4977
5010
|
<div class="assignment-radio-title">
|
|
4978
|
-
Assign at start of the
|
|
5011
|
+
Assign at start of the ${this.labelForDrill}
|
|
4979
5012
|
</div>
|
|
4980
5013
|
<div class="assignment-radio-description">
|
|
4981
|
-
At the start of this
|
|
4982
|
-
an individual recipient.
|
|
5014
|
+
At the start of this ${this.labelForDrill}, the initiator will
|
|
5015
|
+
be able to choose an individual recipient.
|
|
4983
5016
|
</div>
|
|
4984
5017
|
</div>
|
|
4985
5018
|
</label>
|
|
@@ -5038,35 +5071,28 @@ Use **bold** and *italic* text.`;
|
|
|
5038
5071
|
/>
|
|
5039
5072
|
` : ""}
|
|
5040
5073
|
` : l`
|
|
5041
|
-
<
|
|
5042
|
-
<label class="assignment-radio-option">
|
|
5043
|
-
<input
|
|
5044
|
-
type="radio"
|
|
5045
|
-
name="assignment-type"
|
|
5046
|
-
value="instance_role_assignee_select"
|
|
5047
|
-
checked
|
|
5048
|
-
/>
|
|
5049
|
-
<div class="assignment-radio-label">
|
|
5050
|
-
<div class="assignment-radio-title">Select a group</div>
|
|
5051
|
-
<div class="assignment-radio-description">
|
|
5052
|
-
Members of the selected group will be eligible for assignment.
|
|
5053
|
-
</div>
|
|
5054
|
-
</div>
|
|
5055
|
-
</label>
|
|
5056
|
-
</div>
|
|
5074
|
+
<label for="group-select">Select a ${this.labelForGroup}</label>
|
|
5057
5075
|
|
|
5058
5076
|
<select
|
|
5059
5077
|
class="assignment-select"
|
|
5060
5078
|
.value=${this._stepAssignmentTarget}
|
|
5061
5079
|
@change=${(t) => {
|
|
5080
|
+
var n, o;
|
|
5062
5081
|
const i = t.target;
|
|
5063
5082
|
this._stepAssignmentTarget = i.value;
|
|
5083
|
+
const r = (n = this._templateData.steps) == null ? void 0 : n.findIndex(
|
|
5084
|
+
(a) => a.id === this._editingStepId
|
|
5085
|
+
);
|
|
5086
|
+
r !== void 0 && r > -1 && (this._templateData.steps[r].assignment.targetName = (o = this.groups.find((a) => a.id === i.value)) == null ? void 0 : o.name, this._templateData.steps[r].assignment.targetId = i.value, this.requestUpdate());
|
|
5064
5087
|
}}
|
|
5065
5088
|
>
|
|
5066
|
-
|
|
5067
|
-
<option value="
|
|
5068
|
-
|
|
5069
|
-
|
|
5089
|
+
<!-- Groups -->
|
|
5090
|
+
<option value="" disabled selected>
|
|
5091
|
+
Select a ${this.labelForGroup}
|
|
5092
|
+
</option>
|
|
5093
|
+
${this.groups.map(
|
|
5094
|
+
(t) => l` <option value=${t.id}>${t.name}</option> `
|
|
5095
|
+
)}
|
|
5070
5096
|
</select>
|
|
5071
5097
|
`}
|
|
5072
5098
|
</div>
|
|
@@ -5480,64 +5506,76 @@ Use **bold** and *italic* text.`;
|
|
|
5480
5506
|
`;
|
|
5481
5507
|
}
|
|
5482
5508
|
};
|
|
5483
|
-
|
|
5509
|
+
v.styles = O`
|
|
5484
5510
|
${pt}
|
|
5485
5511
|
${ct}
|
|
5486
5512
|
${ut}
|
|
5487
5513
|
${Le}
|
|
5488
5514
|
${ht}
|
|
5489
5515
|
`;
|
|
5490
|
-
|
|
5516
|
+
_([
|
|
5517
|
+
$({ attribute: !1 })
|
|
5518
|
+
], v.prototype, "labelForDrill", 2);
|
|
5519
|
+
_([
|
|
5520
|
+
$({ attribute: !1 })
|
|
5521
|
+
], v.prototype, "labelForGroup", 2);
|
|
5522
|
+
_([
|
|
5523
|
+
$({ attribute: !1 })
|
|
5524
|
+
], v.prototype, "subjectTypes", 2);
|
|
5525
|
+
_([
|
|
5526
|
+
$({ attribute: !1 })
|
|
5527
|
+
], v.prototype, "groups", 2);
|
|
5528
|
+
_([
|
|
5491
5529
|
b()
|
|
5492
|
-
],
|
|
5493
|
-
|
|
5530
|
+
], v.prototype, "_templateData", 2);
|
|
5531
|
+
_([
|
|
5494
5532
|
b()
|
|
5495
|
-
],
|
|
5496
|
-
|
|
5533
|
+
], v.prototype, "_showStepModal", 2);
|
|
5534
|
+
_([
|
|
5497
5535
|
b()
|
|
5498
|
-
],
|
|
5499
|
-
|
|
5536
|
+
], v.prototype, "_stepFormData", 2);
|
|
5537
|
+
_([
|
|
5500
5538
|
b()
|
|
5501
|
-
],
|
|
5502
|
-
|
|
5539
|
+
], v.prototype, "_draggedStepId", 2);
|
|
5540
|
+
_([
|
|
5503
5541
|
b()
|
|
5504
|
-
],
|
|
5505
|
-
|
|
5542
|
+
], v.prototype, "_dragOverStepId", 2);
|
|
5543
|
+
_([
|
|
5506
5544
|
b()
|
|
5507
|
-
],
|
|
5508
|
-
|
|
5545
|
+
], v.prototype, "_selectedStepId", 2);
|
|
5546
|
+
_([
|
|
5509
5547
|
b()
|
|
5510
|
-
],
|
|
5511
|
-
|
|
5548
|
+
], v.prototype, "_questions", 2);
|
|
5549
|
+
_([
|
|
5512
5550
|
b()
|
|
5513
|
-
],
|
|
5514
|
-
|
|
5551
|
+
], v.prototype, "_editingStepId", 2);
|
|
5552
|
+
_([
|
|
5515
5553
|
b()
|
|
5516
|
-
],
|
|
5517
|
-
|
|
5554
|
+
], v.prototype, "_stepAssignmentCategory", 2);
|
|
5555
|
+
_([
|
|
5518
5556
|
b()
|
|
5519
|
-
],
|
|
5520
|
-
|
|
5557
|
+
], v.prototype, "_stepAssignmentType", 2);
|
|
5558
|
+
_([
|
|
5521
5559
|
b()
|
|
5522
|
-
],
|
|
5523
|
-
|
|
5560
|
+
], v.prototype, "_stepAssignmentTarget", 2);
|
|
5561
|
+
_([
|
|
5524
5562
|
b()
|
|
5525
|
-
],
|
|
5526
|
-
|
|
5563
|
+
], v.prototype, "_stepAssignmentFirstName", 2);
|
|
5564
|
+
_([
|
|
5527
5565
|
b()
|
|
5528
|
-
],
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
],
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
],
|
|
5535
|
-
|
|
5566
|
+
], v.prototype, "_stepAssignmentLastName", 2);
|
|
5567
|
+
_([
|
|
5568
|
+
$({ attribute: !1 })
|
|
5569
|
+
], v.prototype, "onCancel", 2);
|
|
5570
|
+
_([
|
|
5571
|
+
$({ attribute: !1 })
|
|
5572
|
+
], v.prototype, "workflow", 2);
|
|
5573
|
+
_([
|
|
5536
5574
|
b()
|
|
5537
|
-
],
|
|
5538
|
-
|
|
5575
|
+
], v.prototype, "_openMenuStepId", 2);
|
|
5576
|
+
v = _([
|
|
5539
5577
|
Ne("builder-widget")
|
|
5540
|
-
],
|
|
5578
|
+
], v);
|
|
5541
5579
|
class ft {
|
|
5542
5580
|
constructor(e, t) {
|
|
5543
5581
|
this.signaturePads = e, this.savedSignatures = t;
|
|
@@ -5708,7 +5746,7 @@ class ve {
|
|
|
5708
5746
|
return new ve(e[1], i, r, e[2], t.start, t.end);
|
|
5709
5747
|
}
|
|
5710
5748
|
static calculateControlPoints(e, t, i) {
|
|
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,
|
|
5749
|
+
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, x = c + u == 0 ? 0 : u / (c + u), S = { x: p.x + h * x, y: p.y + g * x }, Y = t.x - S.x, q = t.y - S.y;
|
|
5712
5750
|
return {
|
|
5713
5751
|
c1: new Z(d.x + Y, d.y + q),
|
|
5714
5752
|
c2: new Z(p.x + Y, p.y + q)
|
|
@@ -6000,10 +6038,10 @@ class ee extends vt {
|
|
|
6000
6038
|
const a = o / n, d = a * a, p = d * a, c = 1 - a, u = c * c, h = u * c;
|
|
6001
6039
|
let g = h * e.startPoint.x;
|
|
6002
6040
|
g += 3 * u * a * e.control1.x, g += 3 * c * d * e.control2.x, g += p * e.endPoint.x;
|
|
6003
|
-
let
|
|
6004
|
-
|
|
6005
|
-
const
|
|
6006
|
-
this._drawCurveSegment(g,
|
|
6041
|
+
let x = h * e.startPoint.y;
|
|
6042
|
+
x += 3 * u * a * e.control1.y, x += 3 * c * d * e.control2.y, x += p * e.endPoint.y;
|
|
6043
|
+
const S = Math.min(e.startWidth + p * r, t.maxWidth);
|
|
6044
|
+
this._drawCurveSegment(g, x, S);
|
|
6007
6045
|
}
|
|
6008
6046
|
i.closePath(), i.fill();
|
|
6009
6047
|
}
|
|
@@ -6038,8 +6076,8 @@ class ee extends vt {
|
|
|
6038
6076
|
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);
|
|
6039
6077
|
}
|
|
6040
6078
|
}, (p, { penColor: c, dotSize: u, minWidth: h, maxWidth: g }) => {
|
|
6041
|
-
const
|
|
6042
|
-
|
|
6079
|
+
const x = document.createElement("circle"), S = u > 0 ? u : (h + g) / 2;
|
|
6080
|
+
x.setAttribute("r", S.toString()), x.setAttribute("cx", p.x.toString()), x.setAttribute("cy", p.y.toString()), x.setAttribute("fill", c), d.appendChild(x);
|
|
6043
6081
|
}), d.outerHTML;
|
|
6044
6082
|
}
|
|
6045
6083
|
}
|
|
@@ -6547,7 +6585,7 @@ const ie = class ie {
|
|
|
6547
6585
|
};
|
|
6548
6586
|
ie.MAX_FILE_SIZE = 5 * 1024 * 1024;
|
|
6549
6587
|
let ue = ie;
|
|
6550
|
-
class
|
|
6588
|
+
class D {
|
|
6551
6589
|
/**
|
|
6552
6590
|
* Determines if a form element should be disabled based on context
|
|
6553
6591
|
* Centralizes the disabled logic for consistency across all input types
|
|
@@ -6578,7 +6616,7 @@ class $ {
|
|
|
6578
6616
|
// Extract file extension and guess type
|
|
6579
6617
|
static _guessFileTypeFromUrl(e) {
|
|
6580
6618
|
var n;
|
|
6581
|
-
const i = (n =
|
|
6619
|
+
const i = (n = D._extractFilenameFromUrl(e).split(".").pop()) == null ? void 0 : n.toLowerCase();
|
|
6582
6620
|
return i ? {
|
|
6583
6621
|
pdf: "PDF Document",
|
|
6584
6622
|
doc: "Word Document",
|
|
@@ -6819,23 +6857,23 @@ class $ {
|
|
|
6819
6857
|
<div class="print-response-value file-response">
|
|
6820
6858
|
📎 ${r.name}
|
|
6821
6859
|
${r.size ? l` <span class="file-size"
|
|
6822
|
-
>(${
|
|
6860
|
+
>(${D._formatFileSize(r.size)})</span
|
|
6823
6861
|
>` : ""}
|
|
6824
6862
|
</div>
|
|
6825
6863
|
`;
|
|
6826
6864
|
if (n) {
|
|
6827
|
-
const a =
|
|
6865
|
+
const a = D._extractFilenameFromUrl(r);
|
|
6828
6866
|
return l` <div class="print-response-value file-response">📎 ${a}</div> `;
|
|
6829
6867
|
} else
|
|
6830
6868
|
return l` <div class="print-response-value file-response">📎 ${r}</div> `;
|
|
6831
6869
|
} else {
|
|
6832
|
-
const a = n ? r : "#", d = o ? r.name : n ?
|
|
6870
|
+
const a = n ? r : "#", d = o ? r.name : n ? D._extractFilenameFromUrl(r) : "View File";
|
|
6833
6871
|
return l`
|
|
6834
6872
|
<div class="file-upload-view-only">
|
|
6835
6873
|
<a href="${a}" target="_blank" class="file-link"> 📎 ${d} </a>
|
|
6836
6874
|
${o && r.size ? l`
|
|
6837
6875
|
<span class="file-size-info"
|
|
6838
|
-
>(${
|
|
6876
|
+
>(${D._formatFileSize(r.size)})</span
|
|
6839
6877
|
>
|
|
6840
6878
|
` : ""}
|
|
6841
6879
|
</div>
|
|
@@ -6900,19 +6938,19 @@ class $ {
|
|
|
6900
6938
|
const i = t.formData[e.id] ?? "", r = t.validationErrors[e.id], n = () => {
|
|
6901
6939
|
switch (e.type) {
|
|
6902
6940
|
case "textarea":
|
|
6903
|
-
return
|
|
6941
|
+
return D.renderTextArea(e, i, t);
|
|
6904
6942
|
case "select":
|
|
6905
|
-
return
|
|
6943
|
+
return D.renderSelect(e, i, t);
|
|
6906
6944
|
case "radio":
|
|
6907
|
-
return
|
|
6945
|
+
return D.renderRadio(e, i, t);
|
|
6908
6946
|
case "checkbox":
|
|
6909
|
-
return
|
|
6947
|
+
return D.renderCheckbox(e, i, t);
|
|
6910
6948
|
case "signature":
|
|
6911
|
-
return
|
|
6949
|
+
return D.renderSignature(e, i, t);
|
|
6912
6950
|
case "file_upload":
|
|
6913
|
-
return
|
|
6951
|
+
return D.renderFileUpload(e, i, t);
|
|
6914
6952
|
default:
|
|
6915
|
-
return
|
|
6953
|
+
return D.renderDefaultInput(e, i, t);
|
|
6916
6954
|
}
|
|
6917
6955
|
}, o = e.type === "checkbox" && (!e.options || e.options.length === 0);
|
|
6918
6956
|
return t.mode === "print" ? l`
|
|
@@ -6964,10 +7002,10 @@ class $t {
|
|
|
6964
7002
|
*/
|
|
6965
7003
|
class he extends $t {
|
|
6966
7004
|
constructor(e) {
|
|
6967
|
-
if (super(e), this.it =
|
|
7005
|
+
if (super(e), this.it = w, e.type !== St.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
6968
7006
|
}
|
|
6969
7007
|
render(e) {
|
|
6970
|
-
if (e ===
|
|
7008
|
+
if (e === w || e == null) return this._t = void 0, this.it = e;
|
|
6971
7009
|
if (e === U) return e;
|
|
6972
7010
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
6973
7011
|
if (e === this.it) return this._t;
|
|
@@ -6977,8 +7015,8 @@ class he extends $t {
|
|
|
6977
7015
|
}
|
|
6978
7016
|
}
|
|
6979
7017
|
he.directiveName = "unsafeHTML", he.resultType = 1;
|
|
6980
|
-
const
|
|
6981
|
-
class
|
|
7018
|
+
const Te = kt(he);
|
|
7019
|
+
class C {
|
|
6982
7020
|
static renderMarkdown(e) {
|
|
6983
7021
|
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>");
|
|
6984
7022
|
}
|
|
@@ -6993,7 +7031,7 @@ class D {
|
|
|
6993
7031
|
return l`
|
|
6994
7032
|
<div class="content-element markdown-content">
|
|
6995
7033
|
<div class="markdown-text">
|
|
6996
|
-
${
|
|
7034
|
+
${Te(C.renderMarkdown(e.content))}
|
|
6997
7035
|
</div>
|
|
6998
7036
|
</div>
|
|
6999
7037
|
`;
|
|
@@ -7009,7 +7047,7 @@ class D {
|
|
|
7009
7047
|
static renderHtml(e) {
|
|
7010
7048
|
return l`
|
|
7011
7049
|
<div class="content-element html-content">
|
|
7012
|
-
<div class="html-content-wrapper">${
|
|
7050
|
+
<div class="html-content-wrapper">${Te(e.content)}</div>
|
|
7013
7051
|
</div>
|
|
7014
7052
|
`;
|
|
7015
7053
|
}
|
|
@@ -7054,21 +7092,21 @@ class D {
|
|
|
7054
7092
|
const i = () => {
|
|
7055
7093
|
switch (e.type) {
|
|
7056
7094
|
case "text":
|
|
7057
|
-
return
|
|
7095
|
+
return C.renderText(e);
|
|
7058
7096
|
case "markdown":
|
|
7059
|
-
return
|
|
7097
|
+
return C.renderMarkdownElement(e);
|
|
7060
7098
|
case "divider":
|
|
7061
|
-
return
|
|
7099
|
+
return C.renderDivider(e);
|
|
7062
7100
|
case "html":
|
|
7063
|
-
return
|
|
7101
|
+
return C.renderHtml(e);
|
|
7064
7102
|
case "image":
|
|
7065
|
-
return
|
|
7103
|
+
return C.renderImage(e);
|
|
7066
7104
|
case "video":
|
|
7067
|
-
return
|
|
7105
|
+
return C.renderVideo(e);
|
|
7068
7106
|
case "file":
|
|
7069
|
-
return
|
|
7107
|
+
return C.renderFile(e);
|
|
7070
7108
|
default:
|
|
7071
|
-
return
|
|
7109
|
+
return C.renderUnknown(e);
|
|
7072
7110
|
}
|
|
7073
7111
|
};
|
|
7074
7112
|
return (t == null ? void 0 : t.mode) === "print" ? l`
|
|
@@ -7258,7 +7296,7 @@ class le {
|
|
|
7258
7296
|
`;
|
|
7259
7297
|
}
|
|
7260
7298
|
}
|
|
7261
|
-
class
|
|
7299
|
+
class j {
|
|
7262
7300
|
/**
|
|
7263
7301
|
* Determines if a step should show as completed in the badge.
|
|
7264
7302
|
* If completion screen is showing, all assigned steps are considered completed.
|
|
@@ -7390,7 +7428,7 @@ class pe {
|
|
|
7390
7428
|
n(u), a !== "preview" && o(e, c);
|
|
7391
7429
|
}
|
|
7392
7430
|
}
|
|
7393
|
-
var Ct = Object.defineProperty, At = Object.getOwnPropertyDescriptor,
|
|
7431
|
+
var Ct = Object.defineProperty, At = Object.getOwnPropertyDescriptor, y = (s, e, t, i) => {
|
|
7394
7432
|
for (var r = i > 1 ? void 0 : i ? At(e, t) : e, n = s.length - 1, o; n >= 0; n--)
|
|
7395
7433
|
(o = s[n]) && (r = (i ? o(e, t, r) : o(r)) || r);
|
|
7396
7434
|
return i && r && Ct(e, t, r), r;
|
|
@@ -7649,10 +7687,10 @@ let f = class extends N {
|
|
|
7649
7687
|
this.responseTracker.trackQuestionResponse(this._currentStep, s, e);
|
|
7650
7688
|
}
|
|
7651
7689
|
_renderQuestion(s) {
|
|
7652
|
-
return
|
|
7690
|
+
return D.render(s, this._getRenderContext());
|
|
7653
7691
|
}
|
|
7654
7692
|
_renderContentElement(s) {
|
|
7655
|
-
return
|
|
7693
|
+
return C.render(s, this._getRenderContext());
|
|
7656
7694
|
}
|
|
7657
7695
|
_isQuestionElement(s) {
|
|
7658
7696
|
return f.QUESTION_ELEMENT_TYPES.includes(s.type);
|
|
@@ -7673,7 +7711,7 @@ let f = class extends N {
|
|
|
7673
7711
|
return l`
|
|
7674
7712
|
<div class="print-step">
|
|
7675
7713
|
<!-- Step Header -->
|
|
7676
|
-
${
|
|
7714
|
+
${j.renderStepHeader({ step: s, mode: "print" })}
|
|
7677
7715
|
|
|
7678
7716
|
<!-- Step Elements -->
|
|
7679
7717
|
${s.elements.map((e) => this._renderStepElement(e))}
|
|
@@ -7805,11 +7843,11 @@ let f = class extends N {
|
|
|
7805
7843
|
});
|
|
7806
7844
|
}
|
|
7807
7845
|
async _updateInstanceData(s, e, t) {
|
|
7808
|
-
var d, p, c, u, h, g,
|
|
7846
|
+
var d, p, c, u, h, g, x;
|
|
7809
7847
|
s && this._internalCompletedSteps.add(s);
|
|
7810
|
-
let i = (p = (d = this.instance) == null ? void 0 : d.steps) == null ? void 0 : p.find((
|
|
7848
|
+
let i = (p = (d = this.instance) == null ? void 0 : d.steps) == null ? void 0 : p.find((S) => S.id === s);
|
|
7811
7849
|
if (!i && this._internalCompletedSteps.size > 0) {
|
|
7812
|
-
const
|
|
7850
|
+
const S = Array.from(this._internalCompletedSteps), Y = S[S.length - 1];
|
|
7813
7851
|
i = (u = (c = this.instance) == null ? void 0 : c.steps) == null ? void 0 : u.find((q) => q.id === Y);
|
|
7814
7852
|
}
|
|
7815
7853
|
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 ? {
|
|
@@ -7817,7 +7855,7 @@ let f = class extends N {
|
|
|
7817
7855
|
title: this._currentStep.title
|
|
7818
7856
|
} : null, a = {
|
|
7819
7857
|
instanceId: (g = this.instance) == null ? void 0 : g.id,
|
|
7820
|
-
workflowId: (
|
|
7858
|
+
workflowId: (x = this.instance) == null ? void 0 : x.workflowId,
|
|
7821
7859
|
completedStepId: s || (i ? i.id : void 0),
|
|
7822
7860
|
completedStepData: i ? {
|
|
7823
7861
|
id: i.id,
|
|
@@ -7831,10 +7869,10 @@ let f = class extends N {
|
|
|
7831
7869
|
if (this.onInstanceUpdated)
|
|
7832
7870
|
try {
|
|
7833
7871
|
this._submissionError = null, this.requestUpdate();
|
|
7834
|
-
const
|
|
7835
|
-
return
|
|
7836
|
-
} catch (
|
|
7837
|
-
return this._submissionError =
|
|
7872
|
+
const S = await this.onInstanceUpdated(a);
|
|
7873
|
+
return S.success ? this._submissionError = null : (this._submissionError = S.error || "Unable to save response. Please try again.", s && this._internalCompletedSteps.delete(s)), this.requestUpdate(), S;
|
|
7874
|
+
} catch (S) {
|
|
7875
|
+
return this._submissionError = S instanceof Error ? S.message : "Unable to save response. Please try again.", s && this._internalCompletedSteps.delete(s), this.requestUpdate(), { success: !1, error: this._submissionError };
|
|
7838
7876
|
}
|
|
7839
7877
|
return { success: !0 };
|
|
7840
7878
|
}
|
|
@@ -8096,7 +8134,7 @@ let f = class extends N {
|
|
|
8096
8134
|
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;
|
|
8097
8135
|
return l`
|
|
8098
8136
|
<!-- Mobile Steps Navigation (visible only on mobile) -->
|
|
8099
|
-
${
|
|
8137
|
+
${j.renderMobileSteps({
|
|
8100
8138
|
steps: i,
|
|
8101
8139
|
currentStepIndex: this._currentStepIndex,
|
|
8102
8140
|
mode: this.mode || "default",
|
|
@@ -8109,7 +8147,7 @@ let f = class extends N {
|
|
|
8109
8147
|
})}
|
|
8110
8148
|
|
|
8111
8149
|
<!-- Sidebar: Steps List (hidden on mobile) -->
|
|
8112
|
-
${
|
|
8150
|
+
${j.renderSidebar({
|
|
8113
8151
|
steps: i,
|
|
8114
8152
|
currentStepIndex: this._currentStepIndex,
|
|
8115
8153
|
mode: this.mode || "default",
|
|
@@ -8123,8 +8161,8 @@ let f = class extends N {
|
|
|
8123
8161
|
|
|
8124
8162
|
<!-- Main Content: Step Details and Questions -->
|
|
8125
8163
|
<main class="runner-main-content">
|
|
8126
|
-
${this.mode === "print" ?
|
|
8127
|
-
${
|
|
8164
|
+
${this.mode === "print" ? j.renderStepHeader({ step: s, mode: this.mode }) : l`<div class="runner-card">
|
|
8165
|
+
${j.renderStepHeader({
|
|
8128
8166
|
step: s,
|
|
8129
8167
|
mode: this.mode
|
|
8130
8168
|
})}
|
|
@@ -8202,67 +8240,67 @@ f.CONTENT_ELEMENT_TYPES = [
|
|
|
8202
8240
|
"divider",
|
|
8203
8241
|
"markdown"
|
|
8204
8242
|
];
|
|
8205
|
-
|
|
8206
|
-
|
|
8243
|
+
y([
|
|
8244
|
+
$({ type: Object })
|
|
8207
8245
|
], f.prototype, "instance", 2);
|
|
8208
|
-
|
|
8209
|
-
|
|
8246
|
+
y([
|
|
8247
|
+
$({ type: Object })
|
|
8210
8248
|
], f.prototype, "workflow", 2);
|
|
8211
|
-
|
|
8212
|
-
|
|
8249
|
+
y([
|
|
8250
|
+
$({ type: String })
|
|
8213
8251
|
], f.prototype, "mode", 2);
|
|
8214
|
-
|
|
8215
|
-
|
|
8252
|
+
y([
|
|
8253
|
+
$({ type: Boolean })
|
|
8216
8254
|
], f.prototype, "isLoading", 2);
|
|
8217
|
-
|
|
8218
|
-
|
|
8255
|
+
y([
|
|
8256
|
+
$({ type: Object })
|
|
8219
8257
|
], f.prototype, "currentUser", 2);
|
|
8220
|
-
|
|
8221
|
-
|
|
8258
|
+
y([
|
|
8259
|
+
$({ type: Function })
|
|
8222
8260
|
], f.prototype, "onSignatureCaptured", 2);
|
|
8223
|
-
|
|
8224
|
-
|
|
8261
|
+
y([
|
|
8262
|
+
$({ type: Function })
|
|
8225
8263
|
], f.prototype, "onFileUploaded", 2);
|
|
8226
|
-
|
|
8227
|
-
|
|
8264
|
+
y([
|
|
8265
|
+
$({ type: Function })
|
|
8228
8266
|
], f.prototype, "onInstanceUpdated", 2);
|
|
8229
|
-
|
|
8267
|
+
y([
|
|
8230
8268
|
b()
|
|
8231
8269
|
], f.prototype, "_currentStepIndex", 2);
|
|
8232
|
-
|
|
8270
|
+
y([
|
|
8233
8271
|
b()
|
|
8234
8272
|
], f.prototype, "_formData", 2);
|
|
8235
|
-
|
|
8273
|
+
y([
|
|
8236
8274
|
b()
|
|
8237
8275
|
], f.prototype, "_validationErrors", 2);
|
|
8238
|
-
|
|
8276
|
+
y([
|
|
8239
8277
|
b()
|
|
8240
8278
|
], f.prototype, "_internalCompletedSteps", 2);
|
|
8241
|
-
|
|
8279
|
+
y([
|
|
8242
8280
|
b()
|
|
8243
8281
|
], f.prototype, "_formRestorationComplete", 2);
|
|
8244
|
-
|
|
8282
|
+
y([
|
|
8245
8283
|
b()
|
|
8246
8284
|
], f.prototype, "_savedSignatures", 2);
|
|
8247
|
-
|
|
8285
|
+
y([
|
|
8248
8286
|
b()
|
|
8249
8287
|
], f.prototype, "_replacingSignatures", 2);
|
|
8250
|
-
|
|
8288
|
+
y([
|
|
8251
8289
|
b()
|
|
8252
8290
|
], f.prototype, "_savedInstance", 2);
|
|
8253
|
-
|
|
8291
|
+
y([
|
|
8254
8292
|
b()
|
|
8255
8293
|
], f.prototype, "_isSubmitted", 2);
|
|
8256
|
-
|
|
8294
|
+
y([
|
|
8257
8295
|
b()
|
|
8258
8296
|
], f.prototype, "_userStepsSubmitted", 2);
|
|
8259
|
-
|
|
8297
|
+
y([
|
|
8260
8298
|
b()
|
|
8261
8299
|
], f.prototype, "_justSaved", 2);
|
|
8262
|
-
|
|
8300
|
+
y([
|
|
8263
8301
|
b()
|
|
8264
8302
|
], f.prototype, "_submissionError", 2);
|
|
8265
|
-
f =
|
|
8303
|
+
f = y([
|
|
8266
8304
|
Ne("runner-widget")
|
|
8267
8305
|
], f);
|
|
8268
8306
|
function Jt(s, e = {}) {
|
|
@@ -8292,7 +8330,7 @@ function Jt(s, e = {}) {
|
|
|
8292
8330
|
</div>
|
|
8293
8331
|
<hr class="print-question-separator" />
|
|
8294
8332
|
|
|
8295
|
-
${n ?
|
|
8333
|
+
${n ? Wt(s, o) : ""}
|
|
8296
8334
|
${s.steps.map((d) => Et(d)).join(`
|
|
8297
8335
|
`)}
|
|
8298
8336
|
</div>
|
|
@@ -8306,15 +8344,15 @@ function Et(s) {
|
|
|
8306
8344
|
return `
|
|
8307
8345
|
<div class="print-step">
|
|
8308
8346
|
<!-- Step Header -->
|
|
8309
|
-
${
|
|
8347
|
+
${Tt(s)}
|
|
8310
8348
|
|
|
8311
8349
|
<!-- Step Elements -->
|
|
8312
|
-
${s.elements.map((e) =>
|
|
8350
|
+
${s.elements.map((e) => Mt(e, s)).join(`
|
|
8313
8351
|
`)}
|
|
8314
8352
|
</div>
|
|
8315
8353
|
`;
|
|
8316
8354
|
}
|
|
8317
|
-
function
|
|
8355
|
+
function Tt(s) {
|
|
8318
8356
|
return `
|
|
8319
8357
|
<div class="step-print-header">
|
|
8320
8358
|
<div class="print-step-title">${m(s.title)}</div>
|
|
@@ -8323,11 +8361,11 @@ function Mt(s) {
|
|
|
8323
8361
|
</div>
|
|
8324
8362
|
`;
|
|
8325
8363
|
}
|
|
8326
|
-
function
|
|
8327
|
-
return
|
|
8364
|
+
function Mt(s, e) {
|
|
8365
|
+
return jt(s) ? Ft(s, e) : zt(s);
|
|
8328
8366
|
}
|
|
8329
8367
|
function Ft(s, e) {
|
|
8330
|
-
const t =
|
|
8368
|
+
const t = Vt(s.id, e.responses), i = t == null ? void 0 : t.value, n = s.type === "checkbox" && (!s.options || s.options.length === 0) ? "" : `
|
|
8331
8369
|
<div class="print-question-title">
|
|
8332
8370
|
${m(s.label)}:
|
|
8333
8371
|
</div>
|
|
@@ -8508,7 +8546,7 @@ function Ot(s, e) {
|
|
|
8508
8546
|
return `
|
|
8509
8547
|
<div class="print-response-value file-response">
|
|
8510
8548
|
📎 ${m(e.name)}
|
|
8511
|
-
${e.size ? ` <span class="file-size">(${
|
|
8549
|
+
${e.size ? ` <span class="file-size">(${Ht(e.size)})</span>` : ""}
|
|
8512
8550
|
</div>
|
|
8513
8551
|
`;
|
|
8514
8552
|
if (t) {
|
|
@@ -8543,7 +8581,7 @@ function Rt(s, e) {
|
|
|
8543
8581
|
</div>
|
|
8544
8582
|
`;
|
|
8545
8583
|
}
|
|
8546
|
-
function
|
|
8584
|
+
function jt(s) {
|
|
8547
8585
|
return [
|
|
8548
8586
|
"text_input",
|
|
8549
8587
|
"textarea",
|
|
@@ -8556,10 +8594,10 @@ function Vt(s) {
|
|
|
8556
8594
|
"signature"
|
|
8557
8595
|
].includes(s.type);
|
|
8558
8596
|
}
|
|
8559
|
-
function
|
|
8597
|
+
function Vt(s, e) {
|
|
8560
8598
|
return e == null ? void 0 : e.find((t) => t.elementId === s);
|
|
8561
8599
|
}
|
|
8562
|
-
function
|
|
8600
|
+
function Wt(s, e) {
|
|
8563
8601
|
return `
|
|
8564
8602
|
<div class="runner-card" style="margin-bottom: 40px; border-left: 4px solid #3b82f6;">
|
|
8565
8603
|
<div style="display: flex; justify-content: between; align-items: center; gap: 20px;">
|
|
@@ -8591,7 +8629,7 @@ function m(s) {
|
|
|
8591
8629
|
"'": "'"
|
|
8592
8630
|
})[i]);
|
|
8593
8631
|
}
|
|
8594
|
-
function
|
|
8632
|
+
function Ht(s) {
|
|
8595
8633
|
if (s === 0) return "0 Bytes";
|
|
8596
8634
|
const e = 1024, t = ["Bytes", "KB", "MB", "GB"], i = Math.floor(Math.log(s) / Math.log(e));
|
|
8597
8635
|
return parseFloat((s / Math.pow(e, i)).toFixed(2)) + " " + t[i];
|
|
@@ -9116,6 +9154,7 @@ function Gt() {
|
|
|
9116
9154
|
`;
|
|
9117
9155
|
}
|
|
9118
9156
|
function Xt(s, e = {}) {
|
|
9157
|
+
var r;
|
|
9119
9158
|
if (!customElements.get("builder-widget"))
|
|
9120
9159
|
return console.error("Error: <builder-widget> is not defined. Make sure it was imported."), null;
|
|
9121
9160
|
const t = document.getElementById(s);
|
|
@@ -9123,7 +9162,7 @@ function Xt(s, e = {}) {
|
|
|
9123
9162
|
return console.error(`Error: Target element with ID '${s}' not found.`), null;
|
|
9124
9163
|
t.innerHTML = "";
|
|
9125
9164
|
const i = document.createElement("builder-widget");
|
|
9126
|
-
return e.workflow && (i.workflow = e.workflow), e.onWorkflowCreated && (i.onWorkflowCreated = e.onWorkflowCreated), e.onWorkflowDeleted && (i.onWorkflowDeleted = e.onWorkflowDeleted), e.onWorkflowUpdated && (i.onWorkflowUpdated = e.onWorkflowUpdated), t.appendChild(i), console.log(`Drill Builder mounted on #${s}`), i;
|
|
9165
|
+
return e.workflow && (i.workflow = e.workflow, e.subjectTypes && e.subjectTypes.length > 0 && ((r = e.subjectTypes[0]) != null && r.name) && (console.log("Setting default subject type to:", e.subjectTypes[0].name), i.workflow.subjectType = e.subjectTypes[0].name)), e.onWorkflowCreated && (i.onWorkflowCreated = e.onWorkflowCreated), e.onWorkflowDeleted && (i.onWorkflowDeleted = e.onWorkflowDeleted), e.onWorkflowUpdated && (i.onWorkflowUpdated = e.onWorkflowUpdated), i.labelForDrill = e.labelForDrill || "Drill", i.labelForGroup = e.labelForGroup || "Group", i.subjectTypes = e.subjectTypes || [], i.groups = e.groups || [], t.appendChild(i), console.log(`Drill Builder mounted on #${s}`), i;
|
|
9127
9166
|
}
|
|
9128
9167
|
function Zt(s, e) {
|
|
9129
9168
|
if (!customElements.get("runner-widget"))
|