@record-evolution/widget-form 1.0.11 → 1.0.13
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/widget-form.d.ts +1 -0
- package/dist/widget-form.js +230 -174
- package/dist/widget-form.js.map +1 -1
- package/package.json +2 -1
- package/src/definition-schema.d.ts +18 -1
- package/src/definition-schema.json +28 -11
- package/src/widget-form.ts +86 -10
package/dist/widget-form.js
CHANGED
|
@@ -8,7 +8,7 @@ import "@material/web/textfield/outlined-text-field.js";
|
|
|
8
8
|
import "@material/web/checkbox/checkbox.js";
|
|
9
9
|
import "@material/web/select/outlined-select.js";
|
|
10
10
|
import "@material/web/select/select-option.js";
|
|
11
|
-
const
|
|
11
|
+
const F = globalThis, L = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, W = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
|
|
12
12
|
let ut = class {
|
|
13
13
|
constructor(t, s, i) {
|
|
14
14
|
if (this._$cssResult$ = !0, i !== W) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -27,28 +27,28 @@ let ut = class {
|
|
|
27
27
|
return this.cssText;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
const
|
|
30
|
+
const bt = (e) => new ut(typeof e == "string" ? e : e + "", void 0, W), _t = (e, ...t) => {
|
|
31
31
|
const s = e.length === 1 ? e[0] : t.reduce(((i, r, o) => i + ((n) => {
|
|
32
32
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
33
33
|
if (typeof n == "number") return n;
|
|
34
34
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
35
35
|
})(r) + e[o + 1]), e[0]);
|
|
36
36
|
return new ut(s, e, W);
|
|
37
|
-
},
|
|
37
|
+
}, gt = (e, t) => {
|
|
38
38
|
if (L) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
|
|
39
39
|
else for (const s of t) {
|
|
40
|
-
const i = document.createElement("style"), r =
|
|
40
|
+
const i = document.createElement("style"), r = F.litNonce;
|
|
41
41
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
|
|
42
42
|
}
|
|
43
43
|
}, tt = L ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
44
44
|
let s = "";
|
|
45
45
|
for (const i of t.cssRules) s += i.cssText;
|
|
46
|
-
return
|
|
46
|
+
return bt(s);
|
|
47
47
|
})(e) : e;
|
|
48
|
-
const { is: yt, defineProperty:
|
|
48
|
+
const { is: yt, defineProperty: vt, getOwnPropertyDescriptor: At, getOwnPropertyNames: xt, getOwnPropertySymbols: wt, getPrototypeOf: St } = Object, V = globalThis, et = V.trustedTypes, Et = et ? et.emptyScript : "", Ct = V.reactiveElementPolyfillSupport, T = (e, t) => e, N = { toAttribute(e, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
e = e ?
|
|
51
|
+
e = e ? Et : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,9 +73,9 @@ const { is: yt, defineProperty: At, getOwnPropertyDescriptor: vt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return s;
|
|
76
|
-
} }, Z = (e, t) => !yt(e, t), st = { attribute: !0, type: String, converter:
|
|
76
|
+
} }, Z = (e, t) => !yt(e, t), st = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: Z };
|
|
77
77
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), V.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
78
|
-
let
|
|
78
|
+
let E = class extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ??= []).push(t);
|
|
81
81
|
}
|
|
@@ -85,31 +85,31 @@ let S = class extends HTMLElement {
|
|
|
85
85
|
static createProperty(t, s = st) {
|
|
86
86
|
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
87
87
|
const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, s);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && vt(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, s, i) {
|
|
92
|
-
const { get: r, set: o } =
|
|
92
|
+
const { get: r, set: o } = At(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[s];
|
|
94
94
|
}, set(n) {
|
|
95
95
|
this[s] = n;
|
|
96
96
|
} };
|
|
97
97
|
return { get: r, set(n) {
|
|
98
|
-
const
|
|
99
|
-
o?.call(this, n), this.requestUpdate(t,
|
|
98
|
+
const a = r?.call(this);
|
|
99
|
+
o?.call(this, n), this.requestUpdate(t, a, i);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
103
103
|
return this.elementProperties.get(t) ?? st;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(T("elementProperties"))) return;
|
|
107
|
+
const t = St(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
111
|
+
if (this.hasOwnProperty(T("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
|
|
113
113
|
const s = this.properties, i = [...xt(s), ...wt(s)];
|
|
114
114
|
for (const r of i) this.createProperty(r, s[r]);
|
|
115
115
|
}
|
|
@@ -156,7 +156,7 @@ let S = class extends HTMLElement {
|
|
|
156
156
|
}
|
|
157
157
|
createRenderRoot() {
|
|
158
158
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
159
|
-
return
|
|
159
|
+
return gt(t, this.constructor.elementStyles), t;
|
|
160
160
|
}
|
|
161
161
|
connectedCallback() {
|
|
162
162
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
@@ -172,14 +172,14 @@ let S = class extends HTMLElement {
|
|
|
172
172
|
_$ET(t, s) {
|
|
173
173
|
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
174
174
|
if (r !== void 0 && i.reflect === !0) {
|
|
175
|
-
const o = (i.converter?.toAttribute !== void 0 ? i.converter :
|
|
175
|
+
const o = (i.converter?.toAttribute !== void 0 ? i.converter : N).toAttribute(s, i.type);
|
|
176
176
|
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
_$AK(t, s) {
|
|
180
180
|
const i = this.constructor, r = i._$Eh.get(t);
|
|
181
181
|
if (r !== void 0 && this._$Em !== r) {
|
|
182
|
-
const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter :
|
|
182
|
+
const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : N;
|
|
183
183
|
this._$Em = r, this[r] = n.fromAttribute(s, o.type) ?? this._$Ej?.get(r) ?? null, this._$Em = null;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
@@ -216,8 +216,8 @@ let S = class extends HTMLElement {
|
|
|
216
216
|
}
|
|
217
217
|
const i = this.constructor.elementProperties;
|
|
218
218
|
if (i.size > 0) for (const [r, o] of i) {
|
|
219
|
-
const { wrapped: n } = o,
|
|
220
|
-
n !== !0 || this._$AL.has(r) ||
|
|
219
|
+
const { wrapped: n } = o, a = this[r];
|
|
220
|
+
n !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, o, a);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
let t = !1;
|
|
@@ -254,54 +254,54 @@ let S = class extends HTMLElement {
|
|
|
254
254
|
firstUpdated(t) {
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
|
|
258
|
-
const J = globalThis,
|
|
259
|
-
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, ot = />/g,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g,
|
|
257
|
+
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), Ct?.({ ReactiveElement: E }), (V.reactiveElementVersions ??= []).push("2.1.0");
|
|
258
|
+
const J = globalThis, R = J.trustedTypes, it = R ? R.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + g, Pt = `<${mt}>`, w = document, k = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", K = Array.isArray, Ot = (e) => K(e) || typeof e?.[Symbol.iterator] == "function", z = `[
|
|
259
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, ot = />/g, v = RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Dt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = Dt(1), S = /* @__PURE__ */ Symbol.for("lit-noChange"), p = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
|
|
261
261
|
function ft(e, t) {
|
|
262
262
|
if (!K(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
263
263
|
return it !== void 0 ? it.createHTML(t) : t;
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const Tt = (e, t) => {
|
|
266
266
|
const s = e.length - 1, i = [];
|
|
267
267
|
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = O;
|
|
268
|
-
for (let
|
|
269
|
-
const
|
|
270
|
-
let d,
|
|
271
|
-
for (; u <
|
|
272
|
-
const c = n ===
|
|
273
|
-
o += n === O ?
|
|
268
|
+
for (let a = 0; a < s; a++) {
|
|
269
|
+
const l = e[a];
|
|
270
|
+
let d, m, h = -1, u = 0;
|
|
271
|
+
for (; u < l.length && (n.lastIndex = u, m = n.exec(l), m !== null); ) u = n.lastIndex, n === O ? m[1] === "!--" ? n = rt : m[1] !== void 0 ? n = ot : m[2] !== void 0 ? ($t.test(m[2]) && (r = RegExp("</" + m[2], "g")), n = v) : m[3] !== void 0 && (n = v) : n === v ? m[0] === ">" ? (n = r ?? O, h = -1) : m[1] === void 0 ? h = -2 : (h = n.lastIndex - m[2].length, d = m[1], n = m[3] === void 0 ? v : m[3] === '"' ? lt : nt) : n === lt || n === nt ? n = v : n === rt || n === ot ? n = O : (n = v, r = void 0);
|
|
272
|
+
const c = n === v && e[a + 1].startsWith("/>") ? " " : "";
|
|
273
|
+
o += n === O ? l + Pt : h >= 0 ? (i.push(d), l.slice(0, h) + pt + l.slice(h) + g + c) : l + g + (h === -2 ? a : c);
|
|
274
274
|
}
|
|
275
275
|
return [ft(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
276
276
|
};
|
|
277
|
-
class
|
|
277
|
+
class H {
|
|
278
278
|
constructor({ strings: t, _$litType$: s }, i) {
|
|
279
279
|
let r;
|
|
280
280
|
this.parts = [];
|
|
281
281
|
let o = 0, n = 0;
|
|
282
|
-
const
|
|
283
|
-
if (this.el =
|
|
284
|
-
const
|
|
285
|
-
|
|
282
|
+
const a = t.length - 1, l = this.parts, [d, m] = Tt(t, s);
|
|
283
|
+
if (this.el = H.createElement(d, i), x.currentNode = this.el.content, s === 2 || s === 3) {
|
|
284
|
+
const h = this.el.content.firstChild;
|
|
285
|
+
h.replaceWith(...h.childNodes);
|
|
286
286
|
}
|
|
287
|
-
for (; (r = x.nextNode()) !== null &&
|
|
287
|
+
for (; (r = x.nextNode()) !== null && l.length < a; ) {
|
|
288
288
|
if (r.nodeType === 1) {
|
|
289
|
-
if (r.hasAttributes()) for (const
|
|
290
|
-
const u =
|
|
291
|
-
|
|
292
|
-
} else
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
289
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(pt)) {
|
|
290
|
+
const u = m[n++], c = r.getAttribute(h).split(g), $ = /([.?@])?(.*)/.exec(u);
|
|
291
|
+
l.push({ type: 1, index: o, name: $[2], strings: c, ctor: $[1] === "." ? kt : $[1] === "?" ? Mt : $[1] === "@" ? Ht : j }), r.removeAttribute(h);
|
|
292
|
+
} else h.startsWith(g) && (l.push({ type: 6, index: o }), r.removeAttribute(h));
|
|
293
|
+
if ($t.test(r.tagName)) {
|
|
294
|
+
const h = r.textContent.split(g), u = h.length - 1;
|
|
295
295
|
if (u > 0) {
|
|
296
|
-
r.textContent =
|
|
297
|
-
for (let c = 0; c < u; c++) r.append(
|
|
298
|
-
r.append(
|
|
296
|
+
r.textContent = R ? R.emptyScript : "";
|
|
297
|
+
for (let c = 0; c < u; c++) r.append(h[c], k()), x.nextNode(), l.push({ type: 2, index: ++o });
|
|
298
|
+
r.append(h[u], k());
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
301
|
+
} else if (r.nodeType === 8) if (r.data === mt) l.push({ type: 2, index: o });
|
|
302
302
|
else {
|
|
303
|
-
let
|
|
304
|
-
for (; (
|
|
303
|
+
let h = -1;
|
|
304
|
+
for (; (h = r.data.indexOf(g, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += g.length - 1;
|
|
305
305
|
}
|
|
306
306
|
o++;
|
|
307
307
|
}
|
|
@@ -312,12 +312,12 @@ class k {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
function C(e, t, s = e, i) {
|
|
315
|
-
if (t ===
|
|
315
|
+
if (t === S) return t;
|
|
316
316
|
let r = i !== void 0 ? s._$Co?.[i] : s._$Cl;
|
|
317
|
-
const o =
|
|
317
|
+
const o = M(t) ? void 0 : t._$litDirective$;
|
|
318
318
|
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(e), r._$AT(e, s, i)), i !== void 0 ? (s._$Co ??= [])[i] = r : s._$Cl = r), r !== void 0 && (t = C(e, r._$AS(e, t.values), r, i)), t;
|
|
319
319
|
}
|
|
320
|
-
let
|
|
320
|
+
let Ut = class {
|
|
321
321
|
constructor(t, s) {
|
|
322
322
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
|
|
323
323
|
}
|
|
@@ -330,13 +330,13 @@ let Dt = class {
|
|
|
330
330
|
u(t) {
|
|
331
331
|
const { el: { content: s }, parts: i } = this._$AD, r = (t?.creationScope ?? w).importNode(s, !0);
|
|
332
332
|
x.currentNode = r;
|
|
333
|
-
let o = x.nextNode(), n = 0,
|
|
334
|
-
for (;
|
|
335
|
-
if (n ===
|
|
333
|
+
let o = x.nextNode(), n = 0, a = 0, l = i[0];
|
|
334
|
+
for (; l !== void 0; ) {
|
|
335
|
+
if (n === l.index) {
|
|
336
336
|
let d;
|
|
337
|
-
|
|
337
|
+
l.type === 2 ? d = new P(o, o.nextSibling, this, t) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (d = new Ft(o, this, t)), this._$AV.push(d), l = i[++a];
|
|
338
338
|
}
|
|
339
|
-
n !==
|
|
339
|
+
n !== l?.index && (o = x.nextNode(), n++);
|
|
340
340
|
}
|
|
341
341
|
return x.currentNode = w, r;
|
|
342
342
|
}
|
|
@@ -350,7 +350,7 @@ class P {
|
|
|
350
350
|
return this._$AM?._$AU ?? this._$Cv;
|
|
351
351
|
}
|
|
352
352
|
constructor(t, s, i, r) {
|
|
353
|
-
this.type = 2, this._$AH =
|
|
353
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
354
354
|
}
|
|
355
355
|
get parentNode() {
|
|
356
356
|
let t = this._$AA.parentNode;
|
|
@@ -364,7 +364,7 @@ class P {
|
|
|
364
364
|
return this._$AB;
|
|
365
365
|
}
|
|
366
366
|
_$AI(t, s = this) {
|
|
367
|
-
t = C(this, t, s),
|
|
367
|
+
t = C(this, t, s), M(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ot(t) ? this.k(t) : this._(t);
|
|
368
368
|
}
|
|
369
369
|
O(t) {
|
|
370
370
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -373,25 +373,25 @@ class P {
|
|
|
373
373
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
374
374
|
}
|
|
375
375
|
_(t) {
|
|
376
|
-
this._$AH !==
|
|
376
|
+
this._$AH !== p && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
|
|
377
377
|
}
|
|
378
378
|
$(t) {
|
|
379
|
-
const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
379
|
+
const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = H.createElement(ft(i.h, i.h[0]), this.options)), i);
|
|
380
380
|
if (this._$AH?._$AD === r) this._$AH.p(s);
|
|
381
381
|
else {
|
|
382
|
-
const o = new
|
|
382
|
+
const o = new Ut(r, this), n = o.u(this.options);
|
|
383
383
|
o.p(s), this.T(n), this._$AH = o;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
_$AC(t) {
|
|
387
|
-
let s =
|
|
388
|
-
return s === void 0 &&
|
|
387
|
+
let s = at.get(t.strings);
|
|
388
|
+
return s === void 0 && at.set(t.strings, s = new H(t)), s;
|
|
389
389
|
}
|
|
390
390
|
k(t) {
|
|
391
391
|
K(this._$AH) || (this._$AH = [], this._$AR());
|
|
392
392
|
const s = this._$AH;
|
|
393
393
|
let i, r = 0;
|
|
394
|
-
for (const o of t) r === s.length ? s.push(i = new P(this.O(
|
|
394
|
+
for (const o of t) r === s.length ? s.push(i = new P(this.O(k()), this.O(k()), this, this.options)) : i = s[r], i._$AI(o), r++;
|
|
395
395
|
r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
|
|
396
396
|
}
|
|
397
397
|
_$AR(t = this._$AA.nextSibling, s) {
|
|
@@ -404,7 +404,7 @@ class P {
|
|
|
404
404
|
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class j {
|
|
408
408
|
get tagName() {
|
|
409
409
|
return this.element.tagName;
|
|
410
410
|
}
|
|
@@ -412,53 +412,53 @@ class B {
|
|
|
412
412
|
return this._$AM._$AU;
|
|
413
413
|
}
|
|
414
414
|
constructor(t, s, i, r, o) {
|
|
415
|
-
this.type = 1, this._$AH =
|
|
415
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = s, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
|
416
416
|
}
|
|
417
417
|
_$AI(t, s = this, i, r) {
|
|
418
418
|
const o = this.strings;
|
|
419
419
|
let n = !1;
|
|
420
|
-
if (o === void 0) t = C(this, t, s, 0), n = !
|
|
420
|
+
if (o === void 0) t = C(this, t, s, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
|
|
421
421
|
else {
|
|
422
|
-
const
|
|
423
|
-
let
|
|
424
|
-
for (t = o[0],
|
|
422
|
+
const a = t;
|
|
423
|
+
let l, d;
|
|
424
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) d = C(this, a[i + l], s, l), d === S && (d = this._$AH[l]), n ||= !M(d) || d !== this._$AH[l], d === p ? t = p : t !== p && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
425
425
|
}
|
|
426
426
|
n && !r && this.j(t);
|
|
427
427
|
}
|
|
428
428
|
j(t) {
|
|
429
|
-
t ===
|
|
429
|
+
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
class
|
|
432
|
+
class kt extends j {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.type = 3;
|
|
435
435
|
}
|
|
436
436
|
j(t) {
|
|
437
|
-
this.element[this.name] = t ===
|
|
437
|
+
this.element[this.name] = t === p ? void 0 : t;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
class
|
|
440
|
+
class Mt extends j {
|
|
441
441
|
constructor() {
|
|
442
442
|
super(...arguments), this.type = 4;
|
|
443
443
|
}
|
|
444
444
|
j(t) {
|
|
445
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
445
|
+
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
class
|
|
448
|
+
class Ht extends j {
|
|
449
449
|
constructor(t, s, i, r, o) {
|
|
450
450
|
super(t, s, i, r, o), this.type = 5;
|
|
451
451
|
}
|
|
452
452
|
_$AI(t, s = this) {
|
|
453
|
-
if ((t = C(this, t, s, 0) ??
|
|
454
|
-
const i = this._$AH, r = t ===
|
|
453
|
+
if ((t = C(this, t, s, 0) ?? p) === S) return;
|
|
454
|
+
const i = this._$AH, r = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== p && (i === p || r);
|
|
455
455
|
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
456
456
|
}
|
|
457
457
|
handleEvent(t) {
|
|
458
458
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class Ft {
|
|
462
462
|
constructor(t, s, i) {
|
|
463
463
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
|
|
464
464
|
}
|
|
@@ -469,19 +469,19 @@ class Nt {
|
|
|
469
469
|
C(this, t);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
const
|
|
473
|
-
|
|
472
|
+
const Nt = { I: P }, Rt = J.litHtmlPolyfillSupport;
|
|
473
|
+
Rt?.(H, P), (J.litHtmlVersions ??= []).push("3.3.0");
|
|
474
474
|
const Vt = (e, t, s) => {
|
|
475
475
|
const i = s?.renderBefore ?? t;
|
|
476
476
|
let r = i._$litPart$;
|
|
477
477
|
if (r === void 0) {
|
|
478
478
|
const o = s?.renderBefore ?? null;
|
|
479
|
-
i._$litPart$ = r = new P(t.insertBefore(
|
|
479
|
+
i._$litPart$ = r = new P(t.insertBefore(k(), o), o, void 0, s ?? {});
|
|
480
480
|
}
|
|
481
481
|
return r._$AI(e), r;
|
|
482
482
|
};
|
|
483
483
|
const Q = globalThis;
|
|
484
|
-
let
|
|
484
|
+
let U = class extends E {
|
|
485
485
|
constructor() {
|
|
486
486
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
487
487
|
}
|
|
@@ -500,15 +500,15 @@ let D = class extends S {
|
|
|
500
500
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
501
501
|
}
|
|
502
502
|
render() {
|
|
503
|
-
return
|
|
503
|
+
return S;
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
|
|
506
|
+
U._$litElement$ = !0, U.finalized = !0, Q.litElementHydrateSupport?.({ LitElement: U });
|
|
507
|
+
const jt = Q.litElementPolyfillSupport;
|
|
508
|
+
jt?.({ LitElement: U });
|
|
509
509
|
(Q.litElementVersions ??= []).push("4.2.0");
|
|
510
|
-
const qt = { CHILD: 2 },
|
|
511
|
-
class
|
|
510
|
+
const qt = { CHILD: 2 }, Bt = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
511
|
+
class zt {
|
|
512
512
|
constructor(t) {
|
|
513
513
|
}
|
|
514
514
|
get _$AU() {
|
|
@@ -524,27 +524,27 @@ class Ft {
|
|
|
524
524
|
return this.render(...s);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
const { I: It } =
|
|
527
|
+
const { I: It } = Nt, ht = () => document.createComment(""), D = (e, t, s) => {
|
|
528
528
|
const i = e._$AA.parentNode, r = t === void 0 ? e._$AB : t._$AA;
|
|
529
529
|
if (s === void 0) {
|
|
530
530
|
const o = i.insertBefore(ht(), r), n = i.insertBefore(ht(), r);
|
|
531
531
|
s = new It(o, n, e, e.options);
|
|
532
532
|
} else {
|
|
533
|
-
const o = s._$AB.nextSibling, n = s._$AM,
|
|
534
|
-
if (
|
|
535
|
-
let
|
|
536
|
-
s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (
|
|
533
|
+
const o = s._$AB.nextSibling, n = s._$AM, a = n !== e;
|
|
534
|
+
if (a) {
|
|
535
|
+
let l;
|
|
536
|
+
s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (l = e._$AU) !== n._$AU && s._$AP(l);
|
|
537
537
|
}
|
|
538
|
-
if (o !== r ||
|
|
539
|
-
let
|
|
540
|
-
for (;
|
|
541
|
-
const d =
|
|
542
|
-
i.insertBefore(
|
|
538
|
+
if (o !== r || a) {
|
|
539
|
+
let l = s._$AA;
|
|
540
|
+
for (; l !== o; ) {
|
|
541
|
+
const d = l.nextSibling;
|
|
542
|
+
i.insertBefore(l, r), l = d;
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
return s;
|
|
547
|
-
},
|
|
547
|
+
}, A = (e, t, s = e) => (e._$AI(t, s), e), Lt = {}, Wt = (e, t = Lt) => e._$AH = t, Zt = (e) => e._$AH, I = (e) => {
|
|
548
548
|
e._$AP?.(!1, !0);
|
|
549
549
|
let t = e._$AA;
|
|
550
550
|
const s = e._$AB.nextSibling;
|
|
@@ -557,7 +557,7 @@ const ct = (e, t, s) => {
|
|
|
557
557
|
const i = /* @__PURE__ */ new Map();
|
|
558
558
|
for (let r = t; r <= s; r++) i.set(e[r], r);
|
|
559
559
|
return i;
|
|
560
|
-
}, dt =
|
|
560
|
+
}, dt = Bt(class extends zt {
|
|
561
561
|
constructor(e) {
|
|
562
562
|
if (super(e), e.type !== qt.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
563
563
|
}
|
|
@@ -566,7 +566,7 @@ const ct = (e, t, s) => {
|
|
|
566
566
|
s === void 0 ? s = t : t !== void 0 && (i = t);
|
|
567
567
|
const r = [], o = [];
|
|
568
568
|
let n = 0;
|
|
569
|
-
for (const
|
|
569
|
+
for (const a of e) r[n] = i ? i(a, n) : n, o[n] = s(a, n), n++;
|
|
570
570
|
return { values: o, keys: r };
|
|
571
571
|
}
|
|
572
572
|
render(e, t, s) {
|
|
@@ -575,32 +575,32 @@ const ct = (e, t, s) => {
|
|
|
575
575
|
update(e, [t, s, i]) {
|
|
576
576
|
const r = Zt(e), { values: o, keys: n } = this.dt(t, s, i);
|
|
577
577
|
if (!Array.isArray(r)) return this.ut = n, o;
|
|
578
|
-
const
|
|
579
|
-
let d,
|
|
580
|
-
for (;
|
|
578
|
+
const a = this.ut ??= [], l = [];
|
|
579
|
+
let d, m, h = 0, u = r.length - 1, c = 0, $ = o.length - 1;
|
|
580
|
+
for (; h <= u && c <= $; ) if (r[h] === null) h++;
|
|
581
581
|
else if (r[u] === null) u--;
|
|
582
|
-
else if (h
|
|
583
|
-
else if (
|
|
584
|
-
else if (h
|
|
585
|
-
else if (
|
|
586
|
-
else if (d === void 0 && (d = ct(n, c,
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const X =
|
|
590
|
-
|
|
591
|
-
} else
|
|
582
|
+
else if (a[h] === n[c]) l[c] = A(r[h], o[c]), h++, c++;
|
|
583
|
+
else if (a[u] === n[$]) l[$] = A(r[u], o[$]), u--, $--;
|
|
584
|
+
else if (a[h] === n[$]) l[$] = A(r[h], o[$]), D(e, l[$ + 1], r[h]), h++, $--;
|
|
585
|
+
else if (a[u] === n[c]) l[c] = A(r[u], o[c]), D(e, r[h], r[u]), u--, c++;
|
|
586
|
+
else if (d === void 0 && (d = ct(n, c, $), m = ct(a, h, u)), d.has(a[h])) if (d.has(a[u])) {
|
|
587
|
+
const _ = m.get(n[c]), B = _ !== void 0 ? r[_] : null;
|
|
588
|
+
if (B === null) {
|
|
589
|
+
const X = D(e, r[h]);
|
|
590
|
+
A(X, o[c]), l[c] = X;
|
|
591
|
+
} else l[c] = A(B, o[c]), D(e, r[h], B), r[_] = null;
|
|
592
592
|
c++;
|
|
593
593
|
} else I(r[u]), u--;
|
|
594
|
-
else I(r[
|
|
595
|
-
for (; c <=
|
|
596
|
-
const
|
|
597
|
-
|
|
594
|
+
else I(r[h]), h++;
|
|
595
|
+
for (; c <= $; ) {
|
|
596
|
+
const _ = D(e, l[$ + 1]);
|
|
597
|
+
A(_, o[c]), l[c++] = _;
|
|
598
598
|
}
|
|
599
|
-
for (;
|
|
600
|
-
const
|
|
601
|
-
|
|
599
|
+
for (; h <= u; ) {
|
|
600
|
+
const _ = r[h++];
|
|
601
|
+
_ !== null && I(_);
|
|
602
602
|
}
|
|
603
|
-
return this.ut = n, Wt(e,
|
|
603
|
+
return this.ut = n, Wt(e, l), S;
|
|
604
604
|
}
|
|
605
605
|
});
|
|
606
606
|
const Jt = (e) => (t, s) => {
|
|
@@ -608,23 +608,23 @@ const Jt = (e) => (t, s) => {
|
|
|
608
608
|
customElements.define(e, t);
|
|
609
609
|
})) : customElements.define(e, t);
|
|
610
610
|
};
|
|
611
|
-
const Kt = { attribute: !0, type: String, converter:
|
|
611
|
+
const Kt = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: Z }, Qt = (e = Kt, t, s) => {
|
|
612
612
|
const { kind: i, metadata: r } = s;
|
|
613
613
|
let o = globalThis.litPropertyMetadata.get(r);
|
|
614
614
|
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") {
|
|
615
615
|
const { name: n } = s;
|
|
616
|
-
return { set(
|
|
617
|
-
const
|
|
618
|
-
t.set.call(this,
|
|
619
|
-
}, init(
|
|
620
|
-
return
|
|
616
|
+
return { set(a) {
|
|
617
|
+
const l = t.get.call(this);
|
|
618
|
+
t.set.call(this, a), this.requestUpdate(n, l, e);
|
|
619
|
+
}, init(a) {
|
|
620
|
+
return a !== void 0 && this.C(n, void 0, e, a), a;
|
|
621
621
|
} };
|
|
622
622
|
}
|
|
623
623
|
if (i === "setter") {
|
|
624
624
|
const { name: n } = s;
|
|
625
|
-
return function(
|
|
626
|
-
const
|
|
627
|
-
t.call(this,
|
|
625
|
+
return function(a) {
|
|
626
|
+
const l = this[n];
|
|
627
|
+
t.call(this, a), this.requestUpdate(n, l, e);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
630
|
throw Error("Unsupported decorator location: " + i);
|
|
@@ -652,9 +652,9 @@ var Yt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, y = (e, t,
|
|
|
652
652
|
(n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
|
|
653
653
|
return i && r && Yt(t, s, r), r;
|
|
654
654
|
};
|
|
655
|
-
let
|
|
655
|
+
let b = class extends U {
|
|
656
656
|
constructor() {
|
|
657
|
-
super(...arguments), this.dialogOpen = !1, this.version = "1.0.
|
|
657
|
+
super(...arguments), this.dialogOpen = !1, this.version = "1.0.13";
|
|
658
658
|
}
|
|
659
659
|
update(e) {
|
|
660
660
|
e.has("theme") && this.registerTheme(this.theme), super.update(e);
|
|
@@ -671,22 +671,27 @@ let _ = class extends D {
|
|
|
671
671
|
}
|
|
672
672
|
handleFormSubmit(e) {
|
|
673
673
|
e.preventDefault();
|
|
674
|
-
const
|
|
675
|
-
swarm_app_databackend_key:
|
|
676
|
-
table_name:
|
|
677
|
-
column_name:
|
|
674
|
+
const s = e.submitter?.getAttribute("value") ?? "submit", i = e.target, r = new FormData(i), o = Object.fromEntries(r.entries()), n = this.inputData?.formFields?.map((a, l) => ({
|
|
675
|
+
swarm_app_databackend_key: a.targetColumn?.swarm_app_databackend_key,
|
|
676
|
+
table_name: a.targetColumn?.tablename,
|
|
677
|
+
column_name: a.targetColumn?.column,
|
|
678
678
|
value: this.formatValue(
|
|
679
|
-
|
|
680
|
-
|
|
679
|
+
o[`column-${l}`] || a.defaultValue || "",
|
|
680
|
+
a.type ?? "textfield"
|
|
681
681
|
)
|
|
682
682
|
}));
|
|
683
|
-
this.
|
|
683
|
+
this.inputData?.deleteFlagColumn && n?.push({
|
|
684
|
+
swarm_app_databackend_key: this.inputData?.deleteFlagColumn?.swarm_app_databackend_key,
|
|
685
|
+
table_name: this.inputData?.deleteFlagColumn?.tablename,
|
|
686
|
+
column_name: this.inputData?.deleteFlagColumn?.column,
|
|
687
|
+
value: s === "delete"
|
|
688
|
+
}), this.dispatchEvent(
|
|
684
689
|
new CustomEvent("data-submit", {
|
|
685
|
-
detail:
|
|
690
|
+
detail: n,
|
|
686
691
|
bubbles: !1,
|
|
687
692
|
composed: !1
|
|
688
693
|
})
|
|
689
|
-
),
|
|
694
|
+
), i.reset(), this.dialogOpen = !1;
|
|
690
695
|
}
|
|
691
696
|
formatValue(e, t) {
|
|
692
697
|
switch (t) {
|
|
@@ -704,6 +709,7 @@ let _ = class extends D {
|
|
|
704
709
|
.name="column-${t}"
|
|
705
710
|
.label="${e.label ?? ""}"
|
|
706
711
|
.type="${e.type === "numberfield" ? "number" : "text"}"
|
|
712
|
+
.value="${e.preFilledValue ?? ""}"
|
|
707
713
|
.placeholder="${e.defaultValue ?? ""}"
|
|
708
714
|
.pattern="${e.validation ?? ""}"
|
|
709
715
|
supporting-text=${e.description ?? ""}
|
|
@@ -719,6 +725,7 @@ let _ = class extends D {
|
|
|
719
725
|
.label="${e.label ?? ""}"
|
|
720
726
|
style="width: 200px;"
|
|
721
727
|
type="number"
|
|
728
|
+
.value="${e.preFilledValue ?? ""}"
|
|
722
729
|
.placeholder="${e.defaultValue ?? ""}"
|
|
723
730
|
step="any"
|
|
724
731
|
min=${e.min ?? ""}
|
|
@@ -734,7 +741,7 @@ let _ = class extends D {
|
|
|
734
741
|
<md-checkbox
|
|
735
742
|
name="column-${t}"
|
|
736
743
|
aria-label=${e.label ?? ""}
|
|
737
|
-
?checked=${e.defaultValue === "true"}
|
|
744
|
+
?checked=${(String(e.preFilledValue) ?? e.defaultValue) === "true"}
|
|
738
745
|
supporting-text=${e.description ?? ""}
|
|
739
746
|
?required=${e.required && !e.defaultValue}
|
|
740
747
|
></md-checkbox>
|
|
@@ -748,6 +755,7 @@ let _ = class extends D {
|
|
|
748
755
|
.name="column-${t}"
|
|
749
756
|
.label="${e.label ?? ""}"
|
|
750
757
|
type="textarea"
|
|
758
|
+
.value="${e.preFilledValue ?? ""}"
|
|
751
759
|
.placeholder="${e.defaultValue ?? ""}"
|
|
752
760
|
rows="3"
|
|
753
761
|
?required=${e.required && !e.defaultValue}
|
|
@@ -770,7 +778,7 @@ let _ = class extends D {
|
|
|
770
778
|
(s) => f`
|
|
771
779
|
<md-select-option
|
|
772
780
|
.value="${s.value ?? ""}"
|
|
773
|
-
?selected="${s.value === e.defaultValue}"
|
|
781
|
+
?selected="${s.value === (e.preFilledValue ?? e.defaultValue)}"
|
|
774
782
|
>
|
|
775
783
|
${s.displayLabel}
|
|
776
784
|
</md-select-option>
|
|
@@ -787,17 +795,46 @@ let _ = class extends D {
|
|
|
787
795
|
style="width: 200px;"
|
|
788
796
|
.label="${e.label ?? ""}"
|
|
789
797
|
type="datetime-local"
|
|
790
|
-
.value="${e.defaultValue ?? ""}"
|
|
798
|
+
.value="${e.preFilledValue ?? e.defaultValue ?? ""}"
|
|
791
799
|
supporting-text=${e.description ?? ""}
|
|
792
800
|
?required=${e.required && !e.defaultValue}
|
|
793
801
|
></md-outlined-text-field>
|
|
794
802
|
`;
|
|
795
803
|
}
|
|
804
|
+
resetForm() {
|
|
805
|
+
const e = this.shadowRoot?.querySelector("#form");
|
|
806
|
+
e && this.inputData?.formFields?.forEach((t, s) => {
|
|
807
|
+
const i = `column-${s}`;
|
|
808
|
+
if (t.type === "checkbox") {
|
|
809
|
+
const r = e.querySelector(`md-checkbox[name="${i}"]`);
|
|
810
|
+
r && (r.checked = t.preFilledValue === "true");
|
|
811
|
+
} else if (t.type === "dropdown") {
|
|
812
|
+
const r = e.querySelector(`md-outlined-select[name="${i}"]`);
|
|
813
|
+
r && (r.value = t.preFilledValue ?? "");
|
|
814
|
+
} else {
|
|
815
|
+
const r = e.querySelector(`md-outlined-text-field[name="${i}"]`);
|
|
816
|
+
r && (r.value = t.preFilledValue ?? "");
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
}
|
|
796
820
|
cancelEdit(e) {
|
|
797
|
-
this.dialogOpen = !1;
|
|
821
|
+
this.resetForm(), this.dialogOpen = !1;
|
|
798
822
|
}
|
|
799
823
|
render() {
|
|
824
|
+
const e = this.themeTitleColor, t = this.themeBgColor, s = t?.startsWith("rgba") ? t.replace(/rgba\(([^)]+),\s*[\d.]+\)/, "rgb($1)") : t?.startsWith("#") && t.length === 9 ? t.substring(0, 7) : t;
|
|
800
825
|
return f`
|
|
826
|
+
<style>
|
|
827
|
+
:host {
|
|
828
|
+
--md-sys-color-on-surface: ${e};
|
|
829
|
+
--md-sys-color-on-surface-variant: ${e};
|
|
830
|
+
--md-sys-color-outline: ${e};
|
|
831
|
+
--md-sys-color-surface-container: ${s};
|
|
832
|
+
--md-menu-container-color: ${s};
|
|
833
|
+
--md-menu-item-selected-container-color: ${s};
|
|
834
|
+
--md-menu-item-selected-label-text-color: ${e};
|
|
835
|
+
color: ${e};
|
|
836
|
+
}
|
|
837
|
+
</style>
|
|
801
838
|
<div class="header">
|
|
802
839
|
${this.inputData?.formButton ? f`
|
|
803
840
|
<md-fab
|
|
@@ -807,7 +844,7 @@ let _ = class extends D {
|
|
|
807
844
|
>
|
|
808
845
|
<md-icon slot="icon">add</md-icon>
|
|
809
846
|
</md-fab>
|
|
810
|
-
` :
|
|
847
|
+
` : p}
|
|
811
848
|
<header>
|
|
812
849
|
<h3 class="paging" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>
|
|
813
850
|
<p class="paging" ?active=${this.inputData?.subTitle}>${this.inputData?.subTitle}</p>
|
|
@@ -819,20 +856,26 @@ let _ = class extends D {
|
|
|
819
856
|
class="form"
|
|
820
857
|
quick
|
|
821
858
|
?open=${this.dialogOpen}
|
|
822
|
-
@cancel=${(
|
|
823
|
-
|
|
859
|
+
@cancel=${(i) => {
|
|
860
|
+
i.preventDefault();
|
|
824
861
|
}}
|
|
825
|
-
@keydown=${(
|
|
826
|
-
|
|
862
|
+
@keydown=${(i) => {
|
|
863
|
+
i.key === "Escape" && i.preventDefault();
|
|
827
864
|
}}
|
|
828
865
|
@closed=${() => this.dialogOpen = !1}
|
|
829
866
|
>
|
|
830
867
|
<div slot="headline">${this.inputData?.title ?? "Data Entry"}</div>
|
|
831
868
|
${this.renderForm()}
|
|
832
869
|
<div slot="actions">
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
870
|
+
${this.inputData?.deleteButton ? f`<md-filled-button
|
|
871
|
+
class="delete-btn"
|
|
872
|
+
form="form"
|
|
873
|
+
value="delete"
|
|
874
|
+
type="submit"
|
|
875
|
+
autofocus
|
|
876
|
+
>Delete</md-filled-button
|
|
877
|
+
>` : p}
|
|
878
|
+
<md-outlined-button @click=${this.cancelEdit}>Cancel</md-outlined-button>
|
|
836
879
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
837
880
|
>Submit</md-filled-button
|
|
838
881
|
>
|
|
@@ -842,9 +885,15 @@ let _ = class extends D {
|
|
|
842
885
|
<div class="wrapper">
|
|
843
886
|
${this.renderForm()}
|
|
844
887
|
<div class="form-actions">
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
888
|
+
${this.inputData?.deleteButton ? f`<md-filled-button
|
|
889
|
+
class="delete-btn"
|
|
890
|
+
form="form"
|
|
891
|
+
value="delete"
|
|
892
|
+
type="submit"
|
|
893
|
+
autofocus
|
|
894
|
+
>Delete</md-filled-button
|
|
895
|
+
>` : p}
|
|
896
|
+
<md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
|
|
848
897
|
<md-filled-button form="form" value="submit" type="submit" autofocus
|
|
849
898
|
>Submit</md-filled-button
|
|
850
899
|
>
|
|
@@ -861,7 +910,6 @@ let _ = class extends D {
|
|
|
861
910
|
method="dialog"
|
|
862
911
|
class="form-content"
|
|
863
912
|
@submit=${this.handleFormSubmit}
|
|
864
|
-
@reset=${this.cancelEdit}
|
|
865
913
|
>
|
|
866
914
|
${dt(
|
|
867
915
|
this.inputData?.formFields?.filter((e) => !e.hiddenField) ?? [],
|
|
@@ -887,7 +935,7 @@ let _ = class extends D {
|
|
|
887
935
|
`;
|
|
888
936
|
}
|
|
889
937
|
};
|
|
890
|
-
|
|
938
|
+
b.styles = _t`
|
|
891
939
|
:host {
|
|
892
940
|
display: flex;
|
|
893
941
|
flex-direction: column;
|
|
@@ -1001,32 +1049,40 @@ _.styles = gt`
|
|
|
1001
1049
|
--md-fab-container-color: #007bff;
|
|
1002
1050
|
--md-fab-label-text-color: white;
|
|
1003
1051
|
}
|
|
1052
|
+
|
|
1053
|
+
.delete-btn {
|
|
1054
|
+
--md-filled-button-container-color: #d32f2f;
|
|
1055
|
+
--md-filled-button-label-text-color: #fff;
|
|
1056
|
+
--md-filled-button-hover-label-text-color: #fff;
|
|
1057
|
+
--md-filled-button-focus-label-text-color: #fff;
|
|
1058
|
+
--md-filled-button-pressed-label-text-color: #fff;
|
|
1059
|
+
}
|
|
1004
1060
|
`;
|
|
1005
1061
|
y([
|
|
1006
1062
|
G({ type: Object })
|
|
1007
|
-
],
|
|
1063
|
+
], b.prototype, "inputData", 2);
|
|
1008
1064
|
y([
|
|
1009
1065
|
G({ type: Object })
|
|
1010
|
-
],
|
|
1066
|
+
], b.prototype, "theme", 2);
|
|
1011
1067
|
y([
|
|
1012
1068
|
q()
|
|
1013
|
-
],
|
|
1069
|
+
], b.prototype, "themeBgColor", 2);
|
|
1014
1070
|
y([
|
|
1015
1071
|
q()
|
|
1016
|
-
],
|
|
1072
|
+
], b.prototype, "themeTitleColor", 2);
|
|
1017
1073
|
y([
|
|
1018
1074
|
q()
|
|
1019
|
-
],
|
|
1075
|
+
], b.prototype, "themeSubtitleColor", 2);
|
|
1020
1076
|
y([
|
|
1021
1077
|
q()
|
|
1022
|
-
],
|
|
1078
|
+
], b.prototype, "dialogOpen", 2);
|
|
1023
1079
|
y([
|
|
1024
1080
|
Xt("md-dialog")
|
|
1025
|
-
],
|
|
1026
|
-
|
|
1027
|
-
Jt("widget-form-1.0.
|
|
1028
|
-
],
|
|
1081
|
+
], b.prototype, "dialog", 2);
|
|
1082
|
+
b = y([
|
|
1083
|
+
Jt("widget-form-1.0.13")
|
|
1084
|
+
], b);
|
|
1029
1085
|
export {
|
|
1030
|
-
|
|
1086
|
+
b as WidgetForm
|
|
1031
1087
|
};
|
|
1032
1088
|
//# sourceMappingURL=widget-form.js.map
|