@record-evolution/widget-form 1.0.19 → 1.0.22

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.
@@ -26,6 +26,20 @@ export declare class WidgetForm extends LitElement {
26
26
  version: string;
27
27
  update(changedProperties: Map<string, any>): void;
28
28
  protected firstUpdated(_changedProperties: PropertyValues): void;
29
+ protected updated(_changedProperties: PropertyValues): void;
30
+ private dialogScrimPatched;
31
+ /**
32
+ * md-dialog renders its scrim as a `<div class="scrim">` sibling of the
33
+ * native `<dialog>` inside its shadow root, with `position: fixed; z-index: 1`,
34
+ * while disabling the native backdrop (`::backdrop { background: none }`).
35
+ * The `<dialog>` is promoted to the top layer by `showModal()`, but the scrim
36
+ * div stays in the normal layer — confined to this widget's stacking context.
37
+ * As a result it fails to cover sibling dashboard widgets painted in a higher
38
+ * stacking context. We re-enable the native `::backdrop` (which lives in the
39
+ * top layer and spans the whole viewport regardless of ancestor transforms /
40
+ * stacking contexts) and hide the confined internal scrim.
41
+ */
42
+ private patchDialogScrim;
29
43
  registerTheme(theme?: Theme): void;
30
44
  openFormDialog(): void;
31
45
  handleFormSubmit(event: Event): void;
@@ -9,7 +9,7 @@ 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
11
  const H = globalThis, W = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
12
- let dt = class {
12
+ let ut = class {
13
13
  constructor(t, s, r) {
14
14
  if (this._$cssResult$ = !0, r !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
15
15
  this.cssText = t, this.t = s;
@@ -27,13 +27,13 @@ let dt = class {
27
27
  return this.cssText;
28
28
  }
29
29
  };
30
- const yt = (e) => new dt(typeof e == "string" ? e : e + "", void 0, K), vt = (e, ...t) => {
30
+ const yt = (e) => new ut(typeof e == "string" ? e : e + "", void 0, K), vt = (e, ...t) => {
31
31
  const s = e.length === 1 ? e[0] : t.reduce(((r, i, n) => r + ((o) => {
32
32
  if (o._$cssResult$ === !0) return o.cssText;
33
33
  if (typeof o == "number") return o;
34
34
  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.");
35
35
  })(i) + e[n + 1]), e[0]);
36
- return new dt(s, e, K);
36
+ return new ut(s, e, K);
37
37
  }, At = (e, t) => {
38
38
  if (W) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
39
39
  else for (const s of t) {
@@ -45,7 +45,7 @@ const yt = (e) => new dt(typeof e == "string" ? e : e + "", void 0, K), vt = (e,
45
45
  for (const r of t.cssRules) s += r.cssText;
46
46
  return yt(s);
47
47
  })(e) : e;
48
- const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: Et, getOwnPropertyNames: St, getOwnPropertySymbols: Ct, getPrototypeOf: Pt } = Object, R = globalThis, et = R.trustedTypes, kt = et ? et.emptyScript : "", Dt = R.reactiveElementPolyfillSupport, O = (e, t) => e, V = { toAttribute(e, t) {
48
+ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnPropertyNames: Et, getOwnPropertySymbols: Ct, getPrototypeOf: Pt } = Object, N = globalThis, et = N.trustedTypes, kt = et ? et.emptyScript : "", Dt = N.reactiveElementPolyfillSupport, O = (e, t) => e, R = { toAttribute(e, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  e = e ? kt : null;
@@ -73,9 +73,9 @@ const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: Et, getOwnProperty
73
73
  }
74
74
  }
75
75
  return s;
76
- } }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: Z };
77
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let S = class extends HTMLElement {
76
+ } }, Z = (e, t) => !xt(e, t), st = { attribute: !0, type: String, converter: R, reflect: !1, useDefault: !1, hasChanged: Z };
77
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), N.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
+ let E = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ??= []).push(t);
81
81
  }
@@ -89,7 +89,7 @@ let S = class extends HTMLElement {
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, s, r) {
92
- const { get: i, set: n } = Et(this.prototype, t) ?? { get() {
92
+ const { get: i, set: n } = St(this.prototype, t) ?? { get() {
93
93
  return this[s];
94
94
  }, set(o) {
95
95
  this[s] = o;
@@ -110,7 +110,7 @@ let S = class extends HTMLElement {
110
110
  static finalize() {
111
111
  if (this.hasOwnProperty(O("finalized"))) return;
112
112
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
113
- const s = this.properties, r = [...St(s), ...Ct(s)];
113
+ const s = this.properties, r = [...Et(s), ...Ct(s)];
114
114
  for (const i of r) this.createProperty(i, s[i]);
115
115
  }
116
116
  const t = this[Symbol.metadata];
@@ -172,14 +172,14 @@ let S = class extends HTMLElement {
172
172
  _$ET(t, s) {
173
173
  const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r);
174
174
  if (i !== void 0 && r.reflect === !0) {
175
- const n = (r.converter?.toAttribute !== void 0 ? r.converter : V).toAttribute(s, r.type);
175
+ const n = (r.converter?.toAttribute !== void 0 ? r.converter : R).toAttribute(s, r.type);
176
176
  this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
177
177
  }
178
178
  }
179
179
  _$AK(t, s) {
180
180
  const r = this.constructor, i = r._$Eh.get(t);
181
181
  if (i !== void 0 && this._$Em !== i) {
182
- const n = r.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : V;
182
+ const n = r.getPropertyOptions(i), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : R;
183
183
  this._$Em = i, this[i] = o.fromAttribute(s, n.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
184
184
  }
185
185
  }
@@ -254,10 +254,10 @@ let S = class extends HTMLElement {
254
254
  firstUpdated(t) {
255
255
  }
256
256
  };
257
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[O("elementProperties")] = /* @__PURE__ */ new Map(), S[O("finalized")] = /* @__PURE__ */ new Map(), Dt?.({ ReactiveElement: S }), (R.reactiveElementVersions ??= []).push("2.1.0");
258
- const J = globalThis, N = J.trustedTypes, rt = N ? N.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Ot = `<${mt}>`, w = document, U = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Tt = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
257
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(), Dt?.({ ReactiveElement: E }), (N.reactiveElementVersions ??= []).push("2.1.0");
258
+ const J = globalThis, V = J.trustedTypes, rt = V ? V.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + y, Ot = `<${mt}>`, w = document, U = () => w.createComment(""), M = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Tt = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
259
259
  \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
260
- \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Ut = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = Ut(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
260
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, $t = /^(?:script|style|textarea|title)$/i, Ut = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = Ut(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 (!Q(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
263
  return rt !== void 0 ? rt.createHTML(t) : t;
@@ -267,10 +267,10 @@ const Mt = (e, t) => {
267
267
  let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
268
268
  for (let h = 0; h < s; h++) {
269
269
  const l = e[h];
270
- let c, p, a = -1, d = 0;
271
- for (; d < l.length && (o.lastIndex = d, p = o.exec(l), p !== null); ) d = o.lastIndex, o === k ? p[1] === "!--" ? o = it : p[1] !== void 0 ? o = ot : p[2] !== void 0 ? ($t.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? k, a = -1) : p[1] === void 0 ? a = -2 : (a = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? lt : nt) : o === lt || o === nt ? o = v : o === it || o === ot ? o = k : (o = v, i = void 0);
272
- const u = o === v && e[h + 1].startsWith("/>") ? " " : "";
273
- n += o === k ? l + Ot : a >= 0 ? (r.push(c), l.slice(0, a) + pt + l.slice(a) + y + u) : l + y + (a === -2 ? h : u);
270
+ let c, m, a = -1, u = 0;
271
+ for (; u < l.length && (o.lastIndex = u, m = o.exec(l), m !== null); ) u = o.lastIndex, o === k ? m[1] === "!--" ? o = it : m[1] !== void 0 ? o = ot : m[2] !== void 0 ? ($t.test(m[2]) && (i = RegExp("</" + m[2], "g")), o = v) : m[3] !== void 0 && (o = v) : o === v ? m[0] === ">" ? (o = i ?? k, a = -1) : m[1] === void 0 ? a = -2 : (a = o.lastIndex - m[2].length, c = m[1], o = m[3] === void 0 ? v : m[3] === '"' ? lt : nt) : o === lt || o === nt ? o = v : o === it || o === ot ? o = k : (o = v, i = void 0);
272
+ const d = o === v && e[h + 1].startsWith("/>") ? " " : "";
273
+ n += o === k ? l + Ot : a >= 0 ? (r.push(c), l.slice(0, a) + pt + l.slice(a) + y + d) : l + y + (a === -2 ? h : d);
274
274
  }
275
275
  return [ft(e, n + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
276
276
  };
@@ -279,7 +279,7 @@ class F {
279
279
  let i;
280
280
  this.parts = [];
281
281
  let n = 0, o = 0;
282
- const h = t.length - 1, l = this.parts, [c, p] = Mt(t, s);
282
+ const h = t.length - 1, l = this.parts, [c, m] = Mt(t, s);
283
283
  if (this.el = F.createElement(c, r), x.currentNode = this.el.content, s === 2 || s === 3) {
284
284
  const a = this.el.content.firstChild;
285
285
  a.replaceWith(...a.childNodes);
@@ -287,15 +287,15 @@ class F {
287
287
  for (; (i = x.nextNode()) !== null && l.length < h; ) {
288
288
  if (i.nodeType === 1) {
289
289
  if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(pt)) {
290
- const d = p[o++], u = i.getAttribute(a).split(y), $ = /([.?@])?(.*)/.exec(d);
291
- l.push({ type: 1, index: n, name: $[2], strings: u, ctor: $[1] === "." ? Ht : $[1] === "?" ? Vt : $[1] === "@" ? Nt : j }), i.removeAttribute(a);
290
+ const u = m[o++], d = i.getAttribute(a).split(y), $ = /([.?@])?(.*)/.exec(u);
291
+ l.push({ type: 1, index: n, name: $[2], strings: d, ctor: $[1] === "." ? Ht : $[1] === "?" ? Rt : $[1] === "@" ? Vt : B }), i.removeAttribute(a);
292
292
  } else a.startsWith(y) && (l.push({ type: 6, index: n }), i.removeAttribute(a));
293
293
  if ($t.test(i.tagName)) {
294
- const a = i.textContent.split(y), d = a.length - 1;
295
- if (d > 0) {
296
- i.textContent = N ? N.emptyScript : "";
297
- for (let u = 0; u < d; u++) i.append(a[u], U()), x.nextNode(), l.push({ type: 2, index: ++n });
298
- i.append(a[d], U());
294
+ const a = i.textContent.split(y), u = a.length - 1;
295
+ if (u > 0) {
296
+ i.textContent = V ? V.emptyScript : "";
297
+ for (let d = 0; d < u; d++) i.append(a[d], U()), x.nextNode(), l.push({ type: 2, index: ++n });
298
+ i.append(a[u], U());
299
299
  }
300
300
  }
301
301
  } else if (i.nodeType === 8) if (i.data === mt) l.push({ type: 2, index: n });
@@ -312,7 +312,7 @@ class F {
312
312
  }
313
313
  }
314
314
  function C(e, t, s = e, r) {
315
- if (t === E) return t;
315
+ if (t === S) return t;
316
316
  let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
317
317
  const n = M(t) ? void 0 : t._$litDirective$;
318
318
  return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (t = C(e, i._$AS(e, t.values), i, r)), t;
@@ -334,7 +334,7 @@ let Ft = class {
334
334
  for (; l !== void 0; ) {
335
335
  if (o === l.index) {
336
336
  let c;
337
- l.type === 2 ? c = new P(n, n.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (c = new Rt(n, this, t)), this._$AV.push(c), l = r[++h];
337
+ l.type === 2 ? c = new P(n, n.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (c = new Nt(n, this, t)), this._$AV.push(c), l = r[++h];
338
338
  }
339
339
  o !== l?.index && (n = x.nextNode(), o++);
340
340
  }
@@ -350,7 +350,7 @@ class P {
350
350
  return this._$AM?._$AU ?? this._$Cv;
351
351
  }
352
352
  constructor(t, s, r, i) {
353
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
353
+ this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.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), M(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Tt(t) ? this.k(t) : this._(t);
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) : Tt(t) ? this.k(t) : this._(t);
368
368
  }
369
369
  O(t) {
370
370
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -373,7 +373,7 @@ class P {
373
373
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
374
374
  }
375
375
  _(t) {
376
- this._$AH !== m && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
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
379
  const { values: s, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = F.createElement(ft(r.h, r.h[0]), this.options)), r);
@@ -404,7 +404,7 @@ class P {
404
404
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
405
405
  }
406
406
  }
407
- class j {
407
+ class B {
408
408
  get tagName() {
409
409
  return this.element.tagName;
410
410
  }
@@ -412,53 +412,53 @@ class j {
412
412
  return this._$AM._$AU;
413
413
  }
414
414
  constructor(t, s, r, i, n) {
415
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = s, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = m;
415
+ this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = s, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = p;
416
416
  }
417
417
  _$AI(t, s = this, r, i) {
418
418
  const n = this.strings;
419
419
  let o = !1;
420
- if (n === void 0) t = C(this, t, s, 0), o = !M(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
420
+ if (n === void 0) t = C(this, t, s, 0), o = !M(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
421
421
  else {
422
422
  const h = t;
423
423
  let l, c;
424
- for (t = n[0], l = 0; l < n.length - 1; l++) c = C(this, h[r + l], s, l), c === E && (c = this._$AH[l]), o ||= !M(c) || c !== this._$AH[l], c === m ? t = m : t !== m && (t += (c ?? "") + n[l + 1]), this._$AH[l] = c;
424
+ for (t = n[0], l = 0; l < n.length - 1; l++) c = C(this, h[r + l], s, l), c === S && (c = this._$AH[l]), o ||= !M(c) || c !== this._$AH[l], c === p ? t = p : t !== p && (t += (c ?? "") + n[l + 1]), this._$AH[l] = c;
425
425
  }
426
426
  o && !i && this.j(t);
427
427
  }
428
428
  j(t) {
429
- t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
429
+ t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
430
430
  }
431
431
  }
432
- class Ht extends j {
432
+ class Ht extends B {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 3;
435
435
  }
436
436
  j(t) {
437
- this.element[this.name] = t === m ? void 0 : t;
437
+ this.element[this.name] = t === p ? void 0 : t;
438
438
  }
439
439
  }
440
- class Vt extends j {
440
+ class Rt extends B {
441
441
  constructor() {
442
442
  super(...arguments), this.type = 4;
443
443
  }
444
444
  j(t) {
445
- this.element.toggleAttribute(this.name, !!t && t !== m);
445
+ this.element.toggleAttribute(this.name, !!t && t !== p);
446
446
  }
447
447
  }
448
- class Nt extends j {
448
+ class Vt extends B {
449
449
  constructor(t, s, r, i, n) {
450
450
  super(t, s, r, i, n), this.type = 5;
451
451
  }
452
452
  _$AI(t, s = this) {
453
- if ((t = C(this, t, s, 0) ?? m) === E) return;
454
- const r = this._$AH, i = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== m && (r === m || i);
453
+ if ((t = C(this, t, s, 0) ?? p) === S) return;
454
+ const r = this._$AH, i = t === p && r !== p || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== p && (r === p || i);
455
455
  i && this.element.removeEventListener(this.name, this, r), n && 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 Rt {
461
+ class Nt {
462
462
  constructor(t, s, r) {
463
463
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = r;
464
464
  }
@@ -469,8 +469,8 @@ class Rt {
469
469
  C(this, t);
470
470
  }
471
471
  }
472
- const jt = { I: P }, Bt = J.litHtmlPolyfillSupport;
473
- Bt?.(F, P), (J.litHtmlVersions ??= []).push("3.3.0");
472
+ const Bt = { I: P }, jt = J.litHtmlPolyfillSupport;
473
+ jt?.(F, P), (J.litHtmlVersions ??= []).push("3.3.0");
474
474
  const qt = (e, t, s) => {
475
475
  const r = s?.renderBefore ?? t;
476
476
  let i = r._$litPart$;
@@ -481,7 +481,7 @@ const qt = (e, t, s) => {
481
481
  return i._$AI(e), i;
482
482
  };
483
483
  const G = globalThis;
484
- let T = class extends S {
484
+ let T = class extends E {
485
485
  constructor() {
486
486
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
487
487
  }
@@ -500,7 +500,7 @@ let T = class extends S {
500
500
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
501
501
  }
502
502
  render() {
503
- return E;
503
+ return S;
504
504
  }
505
505
  };
506
506
  T._$litElement$ = !0, T.finalized = !0, G.litElementHydrateSupport?.({ LitElement: T });
@@ -524,7 +524,7 @@ let gt = class {
524
524
  return this.render(...s);
525
525
  }
526
526
  };
527
- const { I: Lt } = jt, ht = () => document.createComment(""), D = (e, t, s) => {
527
+ const { I: Lt } = Bt, ht = () => document.createComment(""), D = (e, t, s) => {
528
528
  const r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA;
529
529
  if (s === void 0) {
530
530
  const n = r.insertBefore(ht(), i), o = r.insertBefore(ht(), i);
@@ -557,7 +557,7 @@ const ct = (e, t, s) => {
557
557
  const r = /* @__PURE__ */ new Map();
558
558
  for (let i = t; i <= s; i++) r.set(e[i], i);
559
559
  return r;
560
- }, ut = bt(class extends gt {
560
+ }, dt = bt(class extends gt {
561
561
  constructor(e) {
562
562
  if (super(e), e.type !== It.CHILD) throw Error("repeat() can only be used in text expressions");
563
563
  }
@@ -576,36 +576,36 @@ const ct = (e, t, s) => {
576
576
  const i = Kt(e), { values: n, keys: o } = this.dt(t, s, r);
577
577
  if (!Array.isArray(i)) return this.ut = o, n;
578
578
  const h = this.ut ??= [], l = [];
579
- let c, p, a = 0, d = i.length - 1, u = 0, $ = n.length - 1;
580
- for (; a <= d && u <= $; ) if (i[a] === null) a++;
581
- else if (i[d] === null) d--;
582
- else if (h[a] === o[u]) l[u] = A(i[a], n[u]), a++, u++;
583
- else if (h[d] === o[$]) l[$] = A(i[d], n[$]), d--, $--;
579
+ let c, m, a = 0, u = i.length - 1, d = 0, $ = n.length - 1;
580
+ for (; a <= u && d <= $; ) if (i[a] === null) a++;
581
+ else if (i[u] === null) u--;
582
+ else if (h[a] === o[d]) l[d] = A(i[a], n[d]), a++, d++;
583
+ else if (h[u] === o[$]) l[$] = A(i[u], n[$]), u--, $--;
584
584
  else if (h[a] === o[$]) l[$] = A(i[a], n[$]), D(e, l[$ + 1], i[a]), a++, $--;
585
- else if (h[d] === o[u]) l[u] = A(i[d], n[u]), D(e, i[a], i[d]), d--, u++;
586
- else if (c === void 0 && (c = ct(o, u, $), p = ct(h, a, d)), c.has(h[a])) if (c.has(h[d])) {
587
- const g = p.get(o[u]), z = g !== void 0 ? i[g] : null;
585
+ else if (h[u] === o[d]) l[d] = A(i[u], n[d]), D(e, i[a], i[u]), u--, d++;
586
+ else if (c === void 0 && (c = ct(o, d, $), m = ct(h, a, u)), c.has(h[a])) if (c.has(h[u])) {
587
+ const g = m.get(o[d]), z = g !== void 0 ? i[g] : null;
588
588
  if (z === null) {
589
589
  const X = D(e, i[a]);
590
- A(X, n[u]), l[u] = X;
591
- } else l[u] = A(z, n[u]), D(e, i[a], z), i[g] = null;
592
- u++;
593
- } else L(i[d]), d--;
590
+ A(X, n[d]), l[d] = X;
591
+ } else l[d] = A(z, n[d]), D(e, i[a], z), i[g] = null;
592
+ d++;
593
+ } else L(i[u]), u--;
594
594
  else L(i[a]), a++;
595
- for (; u <= $; ) {
595
+ for (; d <= $; ) {
596
596
  const g = D(e, l[$ + 1]);
597
- A(g, n[u]), l[u++] = g;
597
+ A(g, n[d]), l[d++] = g;
598
598
  }
599
- for (; a <= d; ) {
599
+ for (; a <= u; ) {
600
600
  const g = i[a++];
601
601
  g !== null && L(g);
602
602
  }
603
- return this.ut = o, _t(e, l), E;
603
+ return this.ut = o, _t(e, l), S;
604
604
  }
605
605
  });
606
606
  const Zt = bt(class extends gt {
607
607
  constructor() {
608
- super(...arguments), this.key = m;
608
+ super(...arguments), this.key = p;
609
609
  }
610
610
  render(e, t) {
611
611
  return this.key = e, t;
@@ -619,7 +619,7 @@ const Jt = (e) => (t, s) => {
619
619
  customElements.define(e, t);
620
620
  })) : customElements.define(e, t);
621
621
  };
622
- const Qt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, s) => {
622
+ const Qt = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, s) => {
623
623
  const { kind: r, metadata: i } = s;
624
624
  let n = globalThis.litPropertyMetadata.get(i);
625
625
  if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), n.set(s.name, e), r === "accessor") {
@@ -640,14 +640,14 @@ const Qt = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged:
640
640
  }
641
641
  throw Error("Unsupported decorator location: " + r);
642
642
  };
643
- function B(e) {
643
+ function j(e) {
644
644
  return (t, s) => typeof s == "object" ? Gt(e, t, s) : ((r, i, n) => {
645
645
  const o = i.hasOwnProperty(n);
646
646
  return i.constructor.createProperty(n, r), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
647
647
  })(e, t, s);
648
648
  }
649
649
  function q(e) {
650
- return B({ ...e, state: !0, attribute: !1 });
650
+ return j({ ...e, state: !0, attribute: !1 });
651
651
  }
652
652
  const Xt = (e, t, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, s), s);
653
653
  function Yt(e, t) {
@@ -665,7 +665,7 @@ var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, _ = (e, t,
665
665
  };
666
666
  let b = class extends T {
667
667
  constructor() {
668
- super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.19";
668
+ super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.version = "1.0.22", this.dialogScrimPatched = !1;
669
669
  }
670
670
  update(e) {
671
671
  e.has("theme") && this.registerTheme(this.theme), super.update(e);
@@ -673,6 +673,35 @@ let b = class extends T {
673
673
  firstUpdated(e) {
674
674
  this.registerTheme(this.theme);
675
675
  }
676
+ updated(e) {
677
+ this.patchDialogScrim();
678
+ }
679
+ /**
680
+ * md-dialog renders its scrim as a `<div class="scrim">` sibling of the
681
+ * native `<dialog>` inside its shadow root, with `position: fixed; z-index: 1`,
682
+ * while disabling the native backdrop (`::backdrop { background: none }`).
683
+ * The `<dialog>` is promoted to the top layer by `showModal()`, but the scrim
684
+ * div stays in the normal layer — confined to this widget's stacking context.
685
+ * As a result it fails to cover sibling dashboard widgets painted in a higher
686
+ * stacking context. We re-enable the native `::backdrop` (which lives in the
687
+ * top layer and spans the whole viewport regardless of ancestor transforms /
688
+ * stacking contexts) and hide the confined internal scrim.
689
+ */
690
+ patchDialogScrim() {
691
+ if (this.dialogScrimPatched) return;
692
+ const e = this.dialog?.shadowRoot;
693
+ if (!e) return;
694
+ const t = new CSSStyleSheet();
695
+ t.replaceSync(`
696
+ dialog::backdrop {
697
+ background: var(--md-sys-color-scrim, #000);
698
+ opacity: 0.32;
699
+ }
700
+ .scrim {
701
+ display: none !important;
702
+ }
703
+ `), e.adoptedStyleSheets = [...e.adoptedStyleSheets, t], this.dialogScrimPatched = !0;
704
+ }
676
705
  registerTheme(e) {
677
706
  const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), s = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
678
707
  this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
@@ -690,8 +719,8 @@ let b = class extends T {
690
719
  else if (o.type === "checkbox")
691
720
  c = i.has(l) ? "on" : "off";
692
721
  else {
693
- const p = i.get(l);
694
- c = p === null || p === "" ? o.defaultValue ?? "" : p;
722
+ const m = i.get(l);
723
+ c = m === null || m === "" ? o.defaultValue ?? "" : m;
695
724
  }
696
725
  return {
697
726
  swarm_app_databackend_key: o.targetColumn?.swarm_app_databackend_key,
@@ -808,7 +837,7 @@ let b = class extends T {
808
837
  supporting-text=${e.description ?? ""}
809
838
  ?required=${e.required && !e.defaultValue && !e.preFilledValue}
810
839
  >
811
- ${ut(
840
+ ${dt(
812
841
  e.values ?? [],
813
842
  (s) => s.value,
814
843
  (s) => f`
@@ -867,6 +896,10 @@ let b = class extends T {
867
896
  --md-sys-color-on-surface-variant: ${e};
868
897
  --md-sys-color-outline: ${e};
869
898
  --md-sys-color-surface-container: ${s};
899
+ /* Dialog/widget surface honors the theme alpha (may be transparent),
900
+ while the select dropdown panel always uses the alpha-stripped
901
+ color so it stays fully opaque. */
902
+ --md-dialog-container-color: ${t};
870
903
  --md-menu-container-color: ${s};
871
904
  --md-menu-item-selected-container-color: ${s};
872
905
  --md-menu-item-selected-label-text-color: ${e};
@@ -877,16 +910,23 @@ let b = class extends T {
877
910
  ${this.inputData?.formButton ? f`
878
911
  <md-fab
879
912
  aria-label="Add"
880
- style="margin-left: 16px; --md-fab-container-color: ${this.theme?.theme_object?.color?.[0] ?? "#9064f7"}"
913
+ .size=${this.inputData.formButtonStyle?.size || "medium"}
914
+ style="margin: 8px; --md-fab-container-color: ${(this.inputData.formButtonStyle?.bgColor || this.theme?.theme_object?.color?.[0]) ?? "#9064f7"}; --md-fab-icon-color: ${(this.inputData.formButtonStyle?.color || this.theme?.theme_object?.color?.[1]) ?? "#fff"}"
881
915
  @click=${this.openFormDialog}
882
916
  >
883
917
  <md-icon slot="icon">add</md-icon>
884
918
  </md-fab>
885
- ` : m}
886
- <header>
887
- <h3 class="paging" ?active=${this.inputData?.title}>${this.inputData?.title}</h3>
888
- <p class="paging" ?active=${this.inputData?.subTitle}>${this.inputData?.subTitle}</p>
889
- </header>
919
+ ` : p}
920
+ ${this.inputData?.formButton ? p : f`
921
+ <header>
922
+ <h3 class="paging" ?active=${this.inputData?.title}>
923
+ ${this.inputData?.title}
924
+ </h3>
925
+ <p class="paging" ?active=${this.inputData?.subTitle}>
926
+ ${this.inputData?.subTitle}
927
+ </p>
928
+ </header>
929
+ `}
890
930
  </div>
891
931
  ${this.inputData?.formButton ? f`
892
932
  <md-dialog
@@ -911,7 +951,7 @@ let b = class extends T {
911
951
  value="delete"
912
952
  type="submit"
913
953
  >Delete</md-filled-button
914
- >` : m}
954
+ >` : p}
915
955
  <md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
916
956
  <md-outlined-button @click=${this.cancelEdit}>Cancel</md-outlined-button>
917
957
  <md-filled-button form="form" value="submit" type="submit" autofocus
@@ -929,7 +969,7 @@ let b = class extends T {
929
969
  value="delete"
930
970
  type="submit"
931
971
  >Delete</md-filled-button
932
- >` : m}
972
+ >` : p}
933
973
  <md-outlined-button @click=${this.resetForm}>Reset</md-outlined-button>
934
974
  <md-filled-button form="form" value="submit" type="submit" autofocus
935
975
  >Submit</md-filled-button
@@ -950,11 +990,11 @@ let b = class extends T {
950
990
  class="form-content"
951
991
  @submit=${this.handleFormSubmit}
952
992
  >
953
- ${ut(
993
+ ${dt(
954
994
  this.inputData?.formFields ?? [],
955
995
  (e, t) => t,
956
996
  (e, t) => {
957
- if (e.hiddenField) return m;
997
+ if (e.hiddenField) return p;
958
998
  switch (e.type) {
959
999
  case "textfield":
960
1000
  return this.renderTextField(e, t);
@@ -986,16 +1026,6 @@ b.styles = vt`
986
1026
  margin: auto;
987
1027
  }
988
1028
 
989
- .edit-fab {
990
- --md-fab-icon-color: white;
991
- --md-fab-container-color: #007bff;
992
- --md-fab-label-text-color: white;
993
- position: absolute;
994
- bottom: 24px;
995
- right: 24px;
996
- z-index: 10;
997
- }
998
-
999
1029
  .paging:not([active]) {
1000
1030
  display: none !important;
1001
1031
  }
@@ -1059,7 +1089,12 @@ b.styles = vt`
1059
1089
 
1060
1090
  /* The dialog classes */
1061
1091
  .form {
1062
- min-width: 80%;
1092
+ /* Fields are stacked in a single column, so a wide dialog just
1093
+ stretches them unreadably. Cap at a comfortable form width but
1094
+ shrink to fit narrow viewports. Height stays content-driven
1095
+ (Material's fit-content), capped at 80% of the viewport. */
1096
+ width: min(90vw, 480px);
1097
+ max-height: 80vh;
1063
1098
  }
1064
1099
 
1065
1100
  .form [slot='header'] {
@@ -1123,13 +1158,13 @@ b.styles = vt`
1123
1158
  }
1124
1159
  `;
1125
1160
  _([
1126
- B({ type: Object })
1161
+ j({ type: Object })
1127
1162
  ], b.prototype, "inputData", 2);
1128
1163
  _([
1129
- B({ type: Object })
1164
+ j({ type: Object })
1130
1165
  ], b.prototype, "theme", 2);
1131
1166
  _([
1132
- B({ type: String })
1167
+ j({ type: String })
1133
1168
  ], b.prototype, "route", 2);
1134
1169
  _([
1135
1170
  q()
@@ -1147,7 +1182,7 @@ _([
1147
1182
  q()
1148
1183
  ], b.prototype, "formKey", 2);
1149
1184
  b = _([
1150
- Jt("widget-form-1.0.19")
1185
+ Jt("widget-form-1.0.22")
1151
1186
  ], b);
1152
1187
  export {
1153
1188
  b as WidgetForm