@db-ux/ngx-core-components 4.11.0 → 4.11.1
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.
|
@@ -199,6 +199,25 @@ class DBAccordionItem {
|
|
|
199
199
|
this._open.set(newStateOpen);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
+
setupObserver(element) {
|
|
203
|
+
if (!element)
|
|
204
|
+
return;
|
|
205
|
+
const parent = element.closest("db-accordion-item");
|
|
206
|
+
if (!parent || this.observer())
|
|
207
|
+
return;
|
|
208
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
209
|
+
if (mutations.some((mutation) => {
|
|
210
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
211
|
+
return attr?.value !== mutation.oldValue;
|
|
212
|
+
})) {
|
|
213
|
+
this.enableAttributePassing(element, "db-accordion-item");
|
|
214
|
+
}
|
|
215
|
+
}));
|
|
216
|
+
this.observer().observe(parent, {
|
|
217
|
+
attributes: true,
|
|
218
|
+
attributeOldValue: true,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
202
221
|
constructor() {
|
|
203
222
|
this.cls = cls;
|
|
204
223
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -216,6 +235,7 @@ class DBAccordionItem {
|
|
|
216
235
|
this._open = signal(false, ...(ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []));
|
|
217
236
|
this._name = signal(undefined, ...(ngDevMode ? [{ debugName: "_name" }] : /* istanbul ignore next */ []));
|
|
218
237
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
238
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
219
239
|
if (typeof window !== "undefined") {
|
|
220
240
|
effect(() => {
|
|
221
241
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -263,10 +283,15 @@ class DBAccordionItem {
|
|
|
263
283
|
const attr = attributes.item(i);
|
|
264
284
|
if (attr && attr.name !== 'data-density' &&
|
|
265
285
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
266
|
-
|
|
286
|
+
if (attr.value) {
|
|
287
|
+
element.setAttribute(attr.name, attr.value);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
element.removeAttribute(attr.name);
|
|
291
|
+
}
|
|
267
292
|
parent.removeAttribute(attr.name);
|
|
268
293
|
}
|
|
269
|
-
else if (attr &&
|
|
294
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
270
295
|
element.setAttribute(attr.name, attr.value);
|
|
271
296
|
parent.removeAttribute(attr.name);
|
|
272
297
|
}
|
|
@@ -274,7 +299,7 @@ class DBAccordionItem {
|
|
|
274
299
|
const isWebComponent = attr.value.includes("hydrated");
|
|
275
300
|
const value = attr.value.replace("hydrated", "").trim();
|
|
276
301
|
const currentClass = element.getAttribute("class");
|
|
277
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
302
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
278
303
|
if (isWebComponent) {
|
|
279
304
|
// Stencil is using this class for lazy loading component
|
|
280
305
|
parent.setAttribute("class", "hydrated");
|
|
@@ -294,10 +319,14 @@ class DBAccordionItem {
|
|
|
294
319
|
this._open.set(this.defaultOpen());
|
|
295
320
|
}
|
|
296
321
|
this.initialized.set(true);
|
|
322
|
+
this.setupObserver(element);
|
|
297
323
|
}
|
|
298
324
|
}
|
|
299
|
-
|
|
300
|
-
|
|
325
|
+
ngOnDestroy() {
|
|
326
|
+
this.observer()?.disconnect();
|
|
327
|
+
}
|
|
328
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
329
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBAccordionItem, isStandalone: true, selector: "db-accordion-item", inputs: { defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, headlinePlain: { classPropertyName: "headlinePlain", publicName: "headlinePlain", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<li
|
|
301
330
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
302
331
|
[class]="cls('db-accordion-item', className())"
|
|
303
332
|
>
|
|
@@ -316,7 +345,7 @@ class DBAccordionItem {
|
|
|
316
345
|
</details>
|
|
317
346
|
</li> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
318
347
|
}
|
|
319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBAccordionItem, decorators: [{
|
|
320
349
|
type: Component,
|
|
321
350
|
args: [{ selector: "db-accordion-item", standalone: true, imports: [CommonModule], template: `<li
|
|
322
351
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
@@ -352,6 +381,25 @@ class DBAccordion {
|
|
|
352
381
|
}
|
|
353
382
|
return [];
|
|
354
383
|
}
|
|
384
|
+
setupObserver(element) {
|
|
385
|
+
if (!element)
|
|
386
|
+
return;
|
|
387
|
+
const parent = element.closest("db-accordion");
|
|
388
|
+
if (!parent || this.observer())
|
|
389
|
+
return;
|
|
390
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
391
|
+
if (mutations.some((mutation) => {
|
|
392
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
393
|
+
return attr?.value !== mutation.oldValue;
|
|
394
|
+
})) {
|
|
395
|
+
this.enableAttributePassing(element, "db-accordion");
|
|
396
|
+
}
|
|
397
|
+
}));
|
|
398
|
+
this.observer().observe(parent, {
|
|
399
|
+
attributes: true,
|
|
400
|
+
attributeOldValue: true,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
355
403
|
trackByItem0(index, item) {
|
|
356
404
|
return `accordion-item-${index}`;
|
|
357
405
|
}
|
|
@@ -369,6 +417,7 @@ class DBAccordion {
|
|
|
369
417
|
this._name = signal("", ...(ngDevMode ? [{ debugName: "_name" }] : /* istanbul ignore next */ []));
|
|
370
418
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
371
419
|
this._initOpenIndexDone = signal(false, ...(ngDevMode ? [{ debugName: "_initOpenIndexDone" }] : /* istanbul ignore next */ []));
|
|
420
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
372
421
|
if (typeof window !== "undefined") {
|
|
373
422
|
effect(() => {
|
|
374
423
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -458,10 +507,15 @@ class DBAccordion {
|
|
|
458
507
|
const attr = attributes.item(i);
|
|
459
508
|
if (attr && attr.name !== 'data-density' &&
|
|
460
509
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
461
|
-
|
|
510
|
+
if (attr.value) {
|
|
511
|
+
element.setAttribute(attr.name, attr.value);
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
element.removeAttribute(attr.name);
|
|
515
|
+
}
|
|
462
516
|
parent.removeAttribute(attr.name);
|
|
463
517
|
}
|
|
464
|
-
else if (attr &&
|
|
518
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
465
519
|
element.setAttribute(attr.name, attr.value);
|
|
466
520
|
parent.removeAttribute(attr.name);
|
|
467
521
|
}
|
|
@@ -469,7 +523,7 @@ class DBAccordion {
|
|
|
469
523
|
const isWebComponent = attr.value.includes("hydrated");
|
|
470
524
|
const value = attr.value.replace("hydrated", "").trim();
|
|
471
525
|
const currentClass = element.getAttribute("class");
|
|
472
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
526
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
473
527
|
if (isWebComponent) {
|
|
474
528
|
// Stencil is using this class for lazy loading component
|
|
475
529
|
parent.setAttribute("class", "hydrated");
|
|
@@ -487,10 +541,14 @@ class DBAccordion {
|
|
|
487
541
|
if (typeof window !== "undefined") {
|
|
488
542
|
this.initialized.set(true);
|
|
489
543
|
this._initOpenIndexDone.set(true);
|
|
544
|
+
this.setupObserver(element);
|
|
490
545
|
}
|
|
491
546
|
}
|
|
492
|
-
|
|
493
|
-
|
|
547
|
+
ngOnDestroy() {
|
|
548
|
+
this.observer()?.disconnect();
|
|
549
|
+
}
|
|
550
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
551
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBAccordion, isStandalone: true, selector: "db-accordion", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, behavior: { classPropertyName: "behavior", publicName: "behavior", isSignal: true, isRequired: false, transformFunction: null }, initOpenIndex: { classPropertyName: "initOpenIndex", publicName: "initOpenIndex", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<ul
|
|
494
552
|
#_ref
|
|
495
553
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
496
554
|
[class]="cls('db-accordion', className())"
|
|
@@ -508,7 +566,7 @@ class DBAccordion {
|
|
|
508
566
|
} }
|
|
509
567
|
</ul> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBAccordionItem, selector: "db-accordion-item", inputs: ["defaultOpen", "name", "open", "id", "propOverrides", "className", "disabled", "headlinePlain", "text"], outputs: ["toggle"] }] }); }
|
|
510
568
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBAccordion, decorators: [{
|
|
512
570
|
type: Component,
|
|
513
571
|
args: [{ selector: "db-accordion", standalone: true, imports: [CommonModule, DBAccordionItem], template: `<ul
|
|
514
572
|
#_ref
|
|
@@ -635,6 +693,25 @@ const DB_UX_LOCAL_STORAGE_MODE = 'db-ux-mode';
|
|
|
635
693
|
|
|
636
694
|
const defaultProps$G = {};
|
|
637
695
|
class DBBadge {
|
|
696
|
+
setupObserver(element) {
|
|
697
|
+
if (!element)
|
|
698
|
+
return;
|
|
699
|
+
const parent = element.closest("db-badge");
|
|
700
|
+
if (!parent || this.observer())
|
|
701
|
+
return;
|
|
702
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
703
|
+
if (mutations.some((mutation) => {
|
|
704
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
705
|
+
return attr?.value !== mutation.oldValue;
|
|
706
|
+
})) {
|
|
707
|
+
this.enableAttributePassing(element, "db-badge");
|
|
708
|
+
}
|
|
709
|
+
}));
|
|
710
|
+
this.observer().observe(parent, {
|
|
711
|
+
attributes: true,
|
|
712
|
+
attributeOldValue: true,
|
|
713
|
+
});
|
|
714
|
+
}
|
|
638
715
|
constructor() {
|
|
639
716
|
this.cls = cls;
|
|
640
717
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -651,6 +728,7 @@ class DBBadge {
|
|
|
651
728
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
652
729
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
653
730
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
731
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
654
732
|
if (typeof window !== "undefined") {
|
|
655
733
|
effect(() => {
|
|
656
734
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -687,10 +765,15 @@ class DBBadge {
|
|
|
687
765
|
const attr = attributes.item(i);
|
|
688
766
|
if (attr && attr.name !== 'data-density' &&
|
|
689
767
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
690
|
-
|
|
768
|
+
if (attr.value) {
|
|
769
|
+
element.setAttribute(attr.name, attr.value);
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
element.removeAttribute(attr.name);
|
|
773
|
+
}
|
|
691
774
|
parent.removeAttribute(attr.name);
|
|
692
775
|
}
|
|
693
|
-
else if (attr &&
|
|
776
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
694
777
|
element.setAttribute(attr.name, attr.value);
|
|
695
778
|
parent.removeAttribute(attr.name);
|
|
696
779
|
}
|
|
@@ -698,7 +781,7 @@ class DBBadge {
|
|
|
698
781
|
const isWebComponent = attr.value.includes("hydrated");
|
|
699
782
|
const value = attr.value.replace("hydrated", "").trim();
|
|
700
783
|
const currentClass = element.getAttribute("class");
|
|
701
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
784
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
702
785
|
if (isWebComponent) {
|
|
703
786
|
// Stencil is using this class for lazy loading component
|
|
704
787
|
parent.setAttribute("class", "hydrated");
|
|
@@ -715,10 +798,14 @@ class DBBadge {
|
|
|
715
798
|
this.enableAttributePassing(element, "db-badge");
|
|
716
799
|
if (typeof window !== "undefined") {
|
|
717
800
|
this.initialized.set(true);
|
|
801
|
+
this.setupObserver(element);
|
|
718
802
|
}
|
|
719
803
|
}
|
|
720
|
-
|
|
721
|
-
|
|
804
|
+
ngOnDestroy() {
|
|
805
|
+
this.observer()?.disconnect();
|
|
806
|
+
}
|
|
807
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBBadge, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
808
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBBadge, isStandalone: true, selector: "db-badge", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, semantic: { classPropertyName: "semantic", publicName: "semantic", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<span
|
|
722
809
|
#_ref
|
|
723
810
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
724
811
|
[class]="cls('db-badge', className())"
|
|
@@ -731,7 +818,7 @@ class DBBadge {
|
|
|
731
818
|
>@if(text()){{{text()}}} <ng-content></ng-content
|
|
732
819
|
></span> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
733
820
|
}
|
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBBadge, decorators: [{
|
|
735
822
|
type: Component,
|
|
736
823
|
args: [{ selector: "db-badge", standalone: true, imports: [CommonModule], template: `<span
|
|
737
824
|
#_ref
|
|
@@ -751,6 +838,25 @@ const BadgePlacementList = ['inline', 'corner-top-left', 'corner-top-right', 'co
|
|
|
751
838
|
|
|
752
839
|
const defaultProps$F = {};
|
|
753
840
|
class DBBrand {
|
|
841
|
+
setupObserver(element) {
|
|
842
|
+
if (!element)
|
|
843
|
+
return;
|
|
844
|
+
const parent = element.closest("db-brand");
|
|
845
|
+
if (!parent || this.observer())
|
|
846
|
+
return;
|
|
847
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
848
|
+
if (mutations.some((mutation) => {
|
|
849
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
850
|
+
return attr?.value !== mutation.oldValue;
|
|
851
|
+
})) {
|
|
852
|
+
this.enableAttributePassing(element, "db-brand");
|
|
853
|
+
}
|
|
854
|
+
}));
|
|
855
|
+
this.observer().observe(parent, {
|
|
856
|
+
attributes: true,
|
|
857
|
+
attributeOldValue: true,
|
|
858
|
+
});
|
|
859
|
+
}
|
|
754
860
|
constructor() {
|
|
755
861
|
this.DEFAULT_ICON = DEFAULT_ICON;
|
|
756
862
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -763,6 +869,7 @@ class DBBrand {
|
|
|
763
869
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
764
870
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
765
871
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
872
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
766
873
|
}
|
|
767
874
|
/**
|
|
768
875
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -777,10 +884,15 @@ class DBBrand {
|
|
|
777
884
|
const attr = attributes.item(i);
|
|
778
885
|
if (attr && attr.name !== 'data-density' &&
|
|
779
886
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
780
|
-
|
|
887
|
+
if (attr.value) {
|
|
888
|
+
element.setAttribute(attr.name, attr.value);
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
element.removeAttribute(attr.name);
|
|
892
|
+
}
|
|
781
893
|
parent.removeAttribute(attr.name);
|
|
782
894
|
}
|
|
783
|
-
else if (attr &&
|
|
895
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
784
896
|
element.setAttribute(attr.name, attr.value);
|
|
785
897
|
parent.removeAttribute(attr.name);
|
|
786
898
|
}
|
|
@@ -788,7 +900,7 @@ class DBBrand {
|
|
|
788
900
|
const isWebComponent = attr.value.includes("hydrated");
|
|
789
901
|
const value = attr.value.replace("hydrated", "").trim();
|
|
790
902
|
const currentClass = element.getAttribute("class");
|
|
791
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
903
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
792
904
|
if (isWebComponent) {
|
|
793
905
|
// Stencil is using this class for lazy loading component
|
|
794
906
|
parent.setAttribute("class", "hydrated");
|
|
@@ -803,9 +915,15 @@ class DBBrand {
|
|
|
803
915
|
ngAfterViewInit() {
|
|
804
916
|
const element = this._ref()?.nativeElement;
|
|
805
917
|
this.enableAttributePassing(element, "db-brand");
|
|
918
|
+
if (typeof window !== "undefined") {
|
|
919
|
+
this.setupObserver(element);
|
|
920
|
+
}
|
|
806
921
|
}
|
|
807
|
-
|
|
808
|
-
|
|
922
|
+
ngOnDestroy() {
|
|
923
|
+
this.observer()?.disconnect();
|
|
924
|
+
}
|
|
925
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBBrand, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
926
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBBrand, isStandalone: true, selector: "db-brand", inputs: { hideLogo: { classPropertyName: "hideLogo", publicName: "hideLogo", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
809
927
|
#_ref
|
|
810
928
|
[attr.data-icon]="hideLogo() ? 'none' : icon() ?? DEFAULT_ICON"
|
|
811
929
|
[attr.data-show-icon]="getBooleanAsString(showIcon(), 'showIcon')"
|
|
@@ -815,7 +933,7 @@ class DBBrand {
|
|
|
815
933
|
<ng-content></ng-content> @if(text()){{{text()}}}
|
|
816
934
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
817
935
|
}
|
|
818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBBrand, decorators: [{
|
|
819
937
|
type: Component,
|
|
820
938
|
args: [{ selector: "db-brand", standalone: true, imports: [CommonModule], template: `<div
|
|
821
939
|
#_ref
|
|
@@ -839,6 +957,25 @@ class DBButton {
|
|
|
839
957
|
}
|
|
840
958
|
return "submit";
|
|
841
959
|
}
|
|
960
|
+
setupObserver(element) {
|
|
961
|
+
if (!element)
|
|
962
|
+
return;
|
|
963
|
+
const parent = element.closest("db-button");
|
|
964
|
+
if (!parent || this.observer())
|
|
965
|
+
return;
|
|
966
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
967
|
+
if (mutations.some((mutation) => {
|
|
968
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
969
|
+
return attr?.value !== mutation.oldValue;
|
|
970
|
+
})) {
|
|
971
|
+
this.enableAttributePassing(element, "db-button");
|
|
972
|
+
}
|
|
973
|
+
}));
|
|
974
|
+
this.observer().observe(parent, {
|
|
975
|
+
attributes: true,
|
|
976
|
+
attributeOldValue: true,
|
|
977
|
+
});
|
|
978
|
+
}
|
|
842
979
|
constructor() {
|
|
843
980
|
this.cls = cls;
|
|
844
981
|
this.getBoolean = getBoolean;
|
|
@@ -865,6 +1002,7 @@ class DBButton {
|
|
|
865
1002
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
866
1003
|
this.click = output();
|
|
867
1004
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
1005
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
868
1006
|
}
|
|
869
1007
|
/**
|
|
870
1008
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -879,10 +1017,15 @@ class DBButton {
|
|
|
879
1017
|
const attr = attributes.item(i);
|
|
880
1018
|
if (attr && attr.name !== 'data-density' &&
|
|
881
1019
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
882
|
-
|
|
1020
|
+
if (attr.value) {
|
|
1021
|
+
element.setAttribute(attr.name, attr.value);
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
element.removeAttribute(attr.name);
|
|
1025
|
+
}
|
|
883
1026
|
parent.removeAttribute(attr.name);
|
|
884
1027
|
}
|
|
885
|
-
else if (attr &&
|
|
1028
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
886
1029
|
element.setAttribute(attr.name, attr.value);
|
|
887
1030
|
parent.removeAttribute(attr.name);
|
|
888
1031
|
}
|
|
@@ -890,7 +1033,7 @@ class DBButton {
|
|
|
890
1033
|
const isWebComponent = attr.value.includes("hydrated");
|
|
891
1034
|
const value = attr.value.replace("hydrated", "").trim();
|
|
892
1035
|
const currentClass = element.getAttribute("class");
|
|
893
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
1036
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
894
1037
|
if (isWebComponent) {
|
|
895
1038
|
// Stencil is using this class for lazy loading component
|
|
896
1039
|
parent.setAttribute("class", "hydrated");
|
|
@@ -905,9 +1048,15 @@ class DBButton {
|
|
|
905
1048
|
ngAfterViewInit() {
|
|
906
1049
|
const element = this._ref()?.nativeElement;
|
|
907
1050
|
this.enableAttributePassing(element, "db-button");
|
|
1051
|
+
if (typeof window !== "undefined") {
|
|
1052
|
+
this.setupObserver(element);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
ngOnDestroy() {
|
|
1056
|
+
this.observer()?.disconnect();
|
|
908
1057
|
}
|
|
909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
910
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1058
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1059
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBButton, isStandalone: true, selector: "db-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, iconLeading: { classPropertyName: "iconLeading", publicName: "iconLeading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIconLeading: { classPropertyName: "showIconLeading", publicName: "showIconLeading", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconTrailing: { classPropertyName: "iconTrailing", publicName: "iconTrailing", isSignal: true, isRequired: false, transformFunction: null }, showIconTrailing: { classPropertyName: "showIconTrailing", publicName: "showIconTrailing", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, noText: { classPropertyName: "noText", publicName: "noText", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<button
|
|
911
1060
|
#_ref
|
|
912
1061
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
913
1062
|
[class]="cls('db-button', className())"
|
|
@@ -929,7 +1078,7 @@ class DBButton {
|
|
|
929
1078
|
@if(text()){{{text()}}} <ng-content></ng-content>
|
|
930
1079
|
</button> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
931
1080
|
}
|
|
932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBButton, decorators: [{
|
|
933
1082
|
type: Component,
|
|
934
1083
|
args: [{ selector: "db-button", standalone: true, imports: [CommonModule], template: `<button
|
|
935
1084
|
#_ref
|
|
@@ -964,6 +1113,25 @@ class DBCard {
|
|
|
964
1113
|
this.click.emit(event);
|
|
965
1114
|
}
|
|
966
1115
|
}
|
|
1116
|
+
setupObserver(element) {
|
|
1117
|
+
if (!element)
|
|
1118
|
+
return;
|
|
1119
|
+
const parent = element.closest("db-card");
|
|
1120
|
+
if (!parent || this.observer())
|
|
1121
|
+
return;
|
|
1122
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
1123
|
+
if (mutations.some((mutation) => {
|
|
1124
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
1125
|
+
return attr?.value !== mutation.oldValue;
|
|
1126
|
+
})) {
|
|
1127
|
+
this.enableAttributePassing(element, "db-card");
|
|
1128
|
+
}
|
|
1129
|
+
}));
|
|
1130
|
+
this.observer().observe(parent, {
|
|
1131
|
+
attributes: true,
|
|
1132
|
+
attributeOldValue: true,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
967
1135
|
constructor() {
|
|
968
1136
|
this.cls = cls;
|
|
969
1137
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -974,6 +1142,7 @@ class DBCard {
|
|
|
974
1142
|
this.spacing = input(...(ngDevMode ? [undefined, { debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
975
1143
|
this.click = output();
|
|
976
1144
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
1145
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
977
1146
|
}
|
|
978
1147
|
/**
|
|
979
1148
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -988,10 +1157,15 @@ class DBCard {
|
|
|
988
1157
|
const attr = attributes.item(i);
|
|
989
1158
|
if (attr && attr.name !== 'data-density' &&
|
|
990
1159
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
991
|
-
|
|
1160
|
+
if (attr.value) {
|
|
1161
|
+
element.setAttribute(attr.name, attr.value);
|
|
1162
|
+
}
|
|
1163
|
+
else {
|
|
1164
|
+
element.removeAttribute(attr.name);
|
|
1165
|
+
}
|
|
992
1166
|
parent.removeAttribute(attr.name);
|
|
993
1167
|
}
|
|
994
|
-
else if (attr &&
|
|
1168
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
995
1169
|
element.setAttribute(attr.name, attr.value);
|
|
996
1170
|
parent.removeAttribute(attr.name);
|
|
997
1171
|
}
|
|
@@ -999,7 +1173,7 @@ class DBCard {
|
|
|
999
1173
|
const isWebComponent = attr.value.includes("hydrated");
|
|
1000
1174
|
const value = attr.value.replace("hydrated", "").trim();
|
|
1001
1175
|
const currentClass = element.getAttribute("class");
|
|
1002
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
1176
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
1003
1177
|
if (isWebComponent) {
|
|
1004
1178
|
// Stencil is using this class for lazy loading component
|
|
1005
1179
|
parent.setAttribute("class", "hydrated");
|
|
@@ -1014,9 +1188,15 @@ class DBCard {
|
|
|
1014
1188
|
ngAfterViewInit() {
|
|
1015
1189
|
const element = this._ref()?.nativeElement;
|
|
1016
1190
|
this.enableAttributePassing(element, "db-card");
|
|
1191
|
+
if (typeof window !== "undefined") {
|
|
1192
|
+
this.setupObserver(element);
|
|
1193
|
+
}
|
|
1017
1194
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1195
|
+
ngOnDestroy() {
|
|
1196
|
+
this.observer()?.disconnect();
|
|
1197
|
+
}
|
|
1198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBCard, isStandalone: true, selector: "db-card", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, behavior: { classPropertyName: "behavior", publicName: "behavior", isSignal: true, isRequired: false, transformFunction: null }, elevationLevel: { classPropertyName: "elevationLevel", publicName: "elevationLevel", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
1020
1200
|
#_ref
|
|
1021
1201
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
1022
1202
|
[class]="cls('db-card', className())"
|
|
@@ -1028,7 +1208,7 @@ class DBCard {
|
|
|
1028
1208
|
<ng-content></ng-content>
|
|
1029
1209
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1030
1210
|
}
|
|
1031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCard, decorators: [{
|
|
1032
1212
|
type: Component,
|
|
1033
1213
|
args: [{ selector: "db-card", standalone: true, imports: [CommonModule], template: `<div
|
|
1034
1214
|
#_ref
|
|
@@ -1120,6 +1300,25 @@ const addValueResetEventListener = (element, props, resetFunction, signal) => {
|
|
|
1120
1300
|
|
|
1121
1301
|
const defaultProps$C = {};
|
|
1122
1302
|
class DBInfotext {
|
|
1303
|
+
setupObserver(element) {
|
|
1304
|
+
if (!element)
|
|
1305
|
+
return;
|
|
1306
|
+
const parent = element.closest("db-infotext");
|
|
1307
|
+
if (!parent || this.observer())
|
|
1308
|
+
return;
|
|
1309
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
1310
|
+
if (mutations.some((mutation) => {
|
|
1311
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
1312
|
+
return attr?.value !== mutation.oldValue;
|
|
1313
|
+
})) {
|
|
1314
|
+
this.enableAttributePassing(element, "db-infotext");
|
|
1315
|
+
}
|
|
1316
|
+
}));
|
|
1317
|
+
this.observer().observe(parent, {
|
|
1318
|
+
attributes: true,
|
|
1319
|
+
attributeOldValue: true,
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1123
1322
|
constructor() {
|
|
1124
1323
|
this.cls = cls;
|
|
1125
1324
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -1133,6 +1332,7 @@ class DBInfotext {
|
|
|
1133
1332
|
this.showIcon = input(...(ngDevMode ? [undefined, { debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
1134
1333
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1135
1334
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
1335
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
1136
1336
|
}
|
|
1137
1337
|
/**
|
|
1138
1338
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -1147,10 +1347,15 @@ class DBInfotext {
|
|
|
1147
1347
|
const attr = attributes.item(i);
|
|
1148
1348
|
if (attr && attr.name !== 'data-density' &&
|
|
1149
1349
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
1150
|
-
|
|
1350
|
+
if (attr.value) {
|
|
1351
|
+
element.setAttribute(attr.name, attr.value);
|
|
1352
|
+
}
|
|
1353
|
+
else {
|
|
1354
|
+
element.removeAttribute(attr.name);
|
|
1355
|
+
}
|
|
1151
1356
|
parent.removeAttribute(attr.name);
|
|
1152
1357
|
}
|
|
1153
|
-
else if (attr &&
|
|
1358
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
1154
1359
|
element.setAttribute(attr.name, attr.value);
|
|
1155
1360
|
parent.removeAttribute(attr.name);
|
|
1156
1361
|
}
|
|
@@ -1158,7 +1363,7 @@ class DBInfotext {
|
|
|
1158
1363
|
const isWebComponent = attr.value.includes("hydrated");
|
|
1159
1364
|
const value = attr.value.replace("hydrated", "").trim();
|
|
1160
1365
|
const currentClass = element.getAttribute("class");
|
|
1161
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
1366
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
1162
1367
|
if (isWebComponent) {
|
|
1163
1368
|
// Stencil is using this class for lazy loading component
|
|
1164
1369
|
parent.setAttribute("class", "hydrated");
|
|
@@ -1173,9 +1378,15 @@ class DBInfotext {
|
|
|
1173
1378
|
ngAfterViewInit() {
|
|
1174
1379
|
const element = this._ref()?.nativeElement;
|
|
1175
1380
|
this.enableAttributePassing(element, "db-infotext");
|
|
1381
|
+
if (typeof window !== "undefined") {
|
|
1382
|
+
this.setupObserver(element);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
ngOnDestroy() {
|
|
1386
|
+
this.observer()?.disconnect();
|
|
1176
1387
|
}
|
|
1177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBInfotext, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBInfotext, isStandalone: true, selector: "db-infotext", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, semantic: { classPropertyName: "semantic", publicName: "semantic", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<span
|
|
1179
1390
|
#_ref
|
|
1180
1391
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
1181
1392
|
[class]="cls('db-infotext', className())"
|
|
@@ -1187,7 +1398,7 @@ class DBInfotext {
|
|
|
1187
1398
|
>@if(text()){{{text()}}} <ng-content></ng-content
|
|
1188
1399
|
></span> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1189
1400
|
}
|
|
1190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBInfotext, decorators: [{
|
|
1191
1402
|
type: Component,
|
|
1192
1403
|
args: [{ selector: "db-infotext", standalone: true, imports: [CommonModule], template: `<span
|
|
1193
1404
|
#_ref
|
|
@@ -1217,7 +1428,7 @@ class DBCheckbox {
|
|
|
1217
1428
|
DEFAULT_INVALID_MESSAGE);
|
|
1218
1429
|
if (hasVoiceOver()) {
|
|
1219
1430
|
this._voiceOverFallback.set(this._invalidMessage());
|
|
1220
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
1431
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
1221
1432
|
}
|
|
1222
1433
|
}
|
|
1223
1434
|
else if (this.hasValidState() &&
|
|
@@ -1226,7 +1437,7 @@ class DBCheckbox {
|
|
|
1226
1437
|
this._descByIds.set(this._validMessageId());
|
|
1227
1438
|
if (hasVoiceOver()) {
|
|
1228
1439
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
1229
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
1440
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
1230
1441
|
}
|
|
1231
1442
|
}
|
|
1232
1443
|
else if (stringPropVisible(this.message(), this.showMessage())) {
|
|
@@ -1263,6 +1474,25 @@ class DBCheckbox {
|
|
|
1263
1474
|
this._validMessageId.set(mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX);
|
|
1264
1475
|
this._invalidMessageId.set(mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX);
|
|
1265
1476
|
}
|
|
1477
|
+
setupObserver(element) {
|
|
1478
|
+
if (!element)
|
|
1479
|
+
return;
|
|
1480
|
+
const parent = element.closest("db-checkbox");
|
|
1481
|
+
if (!parent || this.observer())
|
|
1482
|
+
return;
|
|
1483
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
1484
|
+
if (mutations.some((mutation) => {
|
|
1485
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
1486
|
+
return attr?.value !== mutation.oldValue;
|
|
1487
|
+
})) {
|
|
1488
|
+
this.enableAttributePassing(element, "db-checkbox");
|
|
1489
|
+
}
|
|
1490
|
+
}));
|
|
1491
|
+
this.observer().observe(parent, {
|
|
1492
|
+
attributes: true,
|
|
1493
|
+
attributeOldValue: true,
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1266
1496
|
constructor(renderer) {
|
|
1267
1497
|
this.renderer = renderer;
|
|
1268
1498
|
this.cls = cls;
|
|
@@ -1303,6 +1533,7 @@ class DBCheckbox {
|
|
|
1303
1533
|
this._descByIds = signal(undefined, ...(ngDevMode ? [{ debugName: "_descByIds" }] : /* istanbul ignore next */ []));
|
|
1304
1534
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : /* istanbul ignore next */ []));
|
|
1305
1535
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
1536
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
1306
1537
|
if (typeof window !== "undefined") {
|
|
1307
1538
|
effect(() => {
|
|
1308
1539
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -1410,10 +1641,15 @@ class DBCheckbox {
|
|
|
1410
1641
|
const attr = attributes.item(i);
|
|
1411
1642
|
if (attr && attr.name !== 'data-density' &&
|
|
1412
1643
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
1413
|
-
|
|
1644
|
+
if (attr.value) {
|
|
1645
|
+
element.setAttribute(attr.name, attr.value);
|
|
1646
|
+
}
|
|
1647
|
+
else {
|
|
1648
|
+
element.removeAttribute(attr.name);
|
|
1649
|
+
}
|
|
1414
1650
|
parent.removeAttribute(attr.name);
|
|
1415
1651
|
}
|
|
1416
|
-
else if (attr &&
|
|
1652
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
1417
1653
|
element.setAttribute(attr.name, attr.value);
|
|
1418
1654
|
parent.removeAttribute(attr.name);
|
|
1419
1655
|
}
|
|
@@ -1421,7 +1657,7 @@ class DBCheckbox {
|
|
|
1421
1657
|
const isWebComponent = attr.value.includes("hydrated");
|
|
1422
1658
|
const value = attr.value.replace("hydrated", "").trim();
|
|
1423
1659
|
const currentClass = element.getAttribute("class");
|
|
1424
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
1660
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
1425
1661
|
if (isWebComponent) {
|
|
1426
1662
|
// Stencil is using this class for lazy loading component
|
|
1427
1663
|
parent.setAttribute("class", "hydrated");
|
|
@@ -1455,13 +1691,15 @@ class DBCheckbox {
|
|
|
1455
1691
|
this.initialized.set(true);
|
|
1456
1692
|
this.resetIds();
|
|
1457
1693
|
this._invalidMessage.set(this.invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
1694
|
+
this.setupObserver(element);
|
|
1458
1695
|
}
|
|
1459
1696
|
}
|
|
1460
1697
|
ngOnDestroy() {
|
|
1461
1698
|
this.abortController()?.abort();
|
|
1699
|
+
this.observer()?.disconnect();
|
|
1462
1700
|
}
|
|
1463
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1464
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
1701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCheckbox, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBCheckbox, isStandalone: true, selector: "db-checkbox", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", disabled: "disabledChange", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
1465
1703
|
provide: NG_VALUE_ACCESSOR,
|
|
1466
1704
|
useExisting: DBCheckbox,
|
|
1467
1705
|
multi: true
|
|
@@ -1517,7 +1755,7 @@ class DBCheckbox {
|
|
|
1517
1755
|
>
|
|
1518
1756
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }] }); }
|
|
1519
1757
|
}
|
|
1520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCheckbox, decorators: [{
|
|
1521
1759
|
type: Component,
|
|
1522
1760
|
args: [{ providers: [{
|
|
1523
1761
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1578,6 +1816,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
1578
1816
|
|
|
1579
1817
|
const defaultProps$A = {};
|
|
1580
1818
|
class DBCustomButton {
|
|
1819
|
+
setupObserver(element) {
|
|
1820
|
+
if (!element)
|
|
1821
|
+
return;
|
|
1822
|
+
const parent = element.closest("db-custom-button");
|
|
1823
|
+
if (!parent || this.observer())
|
|
1824
|
+
return;
|
|
1825
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
1826
|
+
if (mutations.some((mutation) => {
|
|
1827
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
1828
|
+
return attr?.value !== mutation.oldValue;
|
|
1829
|
+
})) {
|
|
1830
|
+
this.enableAttributePassing(element, "db-custom-button");
|
|
1831
|
+
}
|
|
1832
|
+
}));
|
|
1833
|
+
this.observer().observe(parent, {
|
|
1834
|
+
attributes: true,
|
|
1835
|
+
attributeOldValue: true,
|
|
1836
|
+
});
|
|
1837
|
+
}
|
|
1581
1838
|
constructor() {
|
|
1582
1839
|
this.cls = cls;
|
|
1583
1840
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -1595,6 +1852,7 @@ class DBCustomButton {
|
|
|
1595
1852
|
this.variant = input(...(ngDevMode ? [undefined, { debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
1596
1853
|
this.noText = input(...(ngDevMode ? [undefined, { debugName: "noText" }] : /* istanbul ignore next */ []));
|
|
1597
1854
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
1855
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
1598
1856
|
}
|
|
1599
1857
|
/**
|
|
1600
1858
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -1609,10 +1867,15 @@ class DBCustomButton {
|
|
|
1609
1867
|
const attr = attributes.item(i);
|
|
1610
1868
|
if (attr && attr.name !== 'data-density' &&
|
|
1611
1869
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
1612
|
-
|
|
1870
|
+
if (attr.value) {
|
|
1871
|
+
element.setAttribute(attr.name, attr.value);
|
|
1872
|
+
}
|
|
1873
|
+
else {
|
|
1874
|
+
element.removeAttribute(attr.name);
|
|
1875
|
+
}
|
|
1613
1876
|
parent.removeAttribute(attr.name);
|
|
1614
1877
|
}
|
|
1615
|
-
else if (attr &&
|
|
1878
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
1616
1879
|
element.setAttribute(attr.name, attr.value);
|
|
1617
1880
|
parent.removeAttribute(attr.name);
|
|
1618
1881
|
}
|
|
@@ -1620,7 +1883,7 @@ class DBCustomButton {
|
|
|
1620
1883
|
const isWebComponent = attr.value.includes("hydrated");
|
|
1621
1884
|
const value = attr.value.replace("hydrated", "").trim();
|
|
1622
1885
|
const currentClass = element.getAttribute("class");
|
|
1623
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
1886
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
1624
1887
|
if (isWebComponent) {
|
|
1625
1888
|
// Stencil is using this class for lazy loading component
|
|
1626
1889
|
parent.setAttribute("class", "hydrated");
|
|
@@ -1635,9 +1898,15 @@ class DBCustomButton {
|
|
|
1635
1898
|
ngAfterViewInit() {
|
|
1636
1899
|
const element = this._ref()?.nativeElement;
|
|
1637
1900
|
this.enableAttributePassing(element, "db-custom-button");
|
|
1901
|
+
if (typeof window !== "undefined") {
|
|
1902
|
+
this.setupObserver(element);
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
ngOnDestroy() {
|
|
1906
|
+
this.observer()?.disconnect();
|
|
1638
1907
|
}
|
|
1639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1640
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
1908
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1909
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBCustomButton, isStandalone: true, selector: "db-custom-button", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, iconLeading: { classPropertyName: "iconLeading", publicName: "iconLeading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIconLeading: { classPropertyName: "showIconLeading", publicName: "showIconLeading", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconTrailing: { classPropertyName: "iconTrailing", publicName: "iconTrailing", isSignal: true, isRequired: false, transformFunction: null }, showIconTrailing: { classPropertyName: "showIconTrailing", publicName: "showIconTrailing", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, noText: { classPropertyName: "noText", publicName: "noText", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
1641
1910
|
#_ref
|
|
1642
1911
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
1643
1912
|
[class]="cls('db-custom-button', className())"
|
|
@@ -1653,7 +1922,7 @@ class DBCustomButton {
|
|
|
1653
1922
|
<ng-content></ng-content>
|
|
1654
1923
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1655
1924
|
}
|
|
1656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomButton, decorators: [{
|
|
1657
1926
|
type: Component,
|
|
1658
1927
|
args: [{ selector: "db-custom-button", standalone: true, imports: [CommonModule], template: `<div
|
|
1659
1928
|
#_ref
|
|
@@ -2102,6 +2371,25 @@ const handleFixedPopover = (element, parent, placement) => {
|
|
|
2102
2371
|
|
|
2103
2372
|
const defaultProps$z = { width: "fixed" };
|
|
2104
2373
|
class DBCustomSelectDropdown {
|
|
2374
|
+
setupObserver(element) {
|
|
2375
|
+
if (!element)
|
|
2376
|
+
return;
|
|
2377
|
+
const parent = element.closest("db-custom-select-dropdown");
|
|
2378
|
+
if (!parent || this.observer())
|
|
2379
|
+
return;
|
|
2380
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
2381
|
+
if (mutations.some((mutation) => {
|
|
2382
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
2383
|
+
return attr?.value !== mutation.oldValue;
|
|
2384
|
+
})) {
|
|
2385
|
+
this.enableAttributePassing(element, "db-custom-select-dropdown");
|
|
2386
|
+
}
|
|
2387
|
+
}));
|
|
2388
|
+
this.observer().observe(parent, {
|
|
2389
|
+
attributes: true,
|
|
2390
|
+
attributeOldValue: true,
|
|
2391
|
+
});
|
|
2392
|
+
}
|
|
2105
2393
|
constructor() {
|
|
2106
2394
|
this.cls = cls;
|
|
2107
2395
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -2109,6 +2397,7 @@ class DBCustomSelectDropdown {
|
|
|
2109
2397
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
2110
2398
|
this.width = input(defaultProps$z["width"], ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
2111
2399
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
2400
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
2112
2401
|
}
|
|
2113
2402
|
/**
|
|
2114
2403
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -2123,10 +2412,15 @@ class DBCustomSelectDropdown {
|
|
|
2123
2412
|
const attr = attributes.item(i);
|
|
2124
2413
|
if (attr && attr.name !== 'data-density' &&
|
|
2125
2414
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
2126
|
-
|
|
2415
|
+
if (attr.value) {
|
|
2416
|
+
element.setAttribute(attr.name, attr.value);
|
|
2417
|
+
}
|
|
2418
|
+
else {
|
|
2419
|
+
element.removeAttribute(attr.name);
|
|
2420
|
+
}
|
|
2127
2421
|
parent.removeAttribute(attr.name);
|
|
2128
2422
|
}
|
|
2129
|
-
else if (attr &&
|
|
2423
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
2130
2424
|
element.setAttribute(attr.name, attr.value);
|
|
2131
2425
|
parent.removeAttribute(attr.name);
|
|
2132
2426
|
}
|
|
@@ -2134,7 +2428,7 @@ class DBCustomSelectDropdown {
|
|
|
2134
2428
|
const isWebComponent = attr.value.includes("hydrated");
|
|
2135
2429
|
const value = attr.value.replace("hydrated", "").trim();
|
|
2136
2430
|
const currentClass = element.getAttribute("class");
|
|
2137
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
2431
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
2138
2432
|
if (isWebComponent) {
|
|
2139
2433
|
// Stencil is using this class for lazy loading component
|
|
2140
2434
|
parent.setAttribute("class", "hydrated");
|
|
@@ -2149,9 +2443,15 @@ class DBCustomSelectDropdown {
|
|
|
2149
2443
|
ngAfterViewInit() {
|
|
2150
2444
|
const element = this._ref()?.nativeElement;
|
|
2151
2445
|
this.enableAttributePassing(element, "db-custom-select-dropdown");
|
|
2446
|
+
if (typeof window !== "undefined") {
|
|
2447
|
+
this.setupObserver(element);
|
|
2448
|
+
}
|
|
2152
2449
|
}
|
|
2153
|
-
|
|
2154
|
-
|
|
2450
|
+
ngOnDestroy() {
|
|
2451
|
+
this.observer()?.disconnect();
|
|
2452
|
+
}
|
|
2453
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2454
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBCustomSelectDropdown, isStandalone: true, selector: "db-custom-select-dropdown", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<article
|
|
2155
2455
|
data-spacing="none"
|
|
2156
2456
|
#_ref
|
|
2157
2457
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
@@ -2161,7 +2461,7 @@ class DBCustomSelectDropdown {
|
|
|
2161
2461
|
<ng-content></ng-content>
|
|
2162
2462
|
</article> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
2163
2463
|
}
|
|
2164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectDropdown, decorators: [{
|
|
2165
2465
|
type: Component,
|
|
2166
2466
|
args: [{ selector: "db-custom-select-dropdown", standalone: true, imports: [CommonModule], template: `<article
|
|
2167
2467
|
data-spacing="none"
|
|
@@ -2189,6 +2489,25 @@ class DBCustomSelectListItem {
|
|
|
2189
2489
|
}
|
|
2190
2490
|
return getBoolean(this.checked(), "checked") ? "check" : "x_placeholder";
|
|
2191
2491
|
}
|
|
2492
|
+
setupObserver(element) {
|
|
2493
|
+
if (!element)
|
|
2494
|
+
return;
|
|
2495
|
+
const parent = element.closest("db-custom-select-list-item");
|
|
2496
|
+
if (!parent || this.observer())
|
|
2497
|
+
return;
|
|
2498
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
2499
|
+
if (mutations.some((mutation) => {
|
|
2500
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
2501
|
+
return attr?.value !== mutation.oldValue;
|
|
2502
|
+
})) {
|
|
2503
|
+
this.enableAttributePassing(element, "db-custom-select-list-item");
|
|
2504
|
+
}
|
|
2505
|
+
}));
|
|
2506
|
+
this.observer().observe(parent, {
|
|
2507
|
+
attributes: true,
|
|
2508
|
+
attributeOldValue: true,
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2192
2511
|
constructor(renderer) {
|
|
2193
2512
|
this.renderer = renderer;
|
|
2194
2513
|
this.cls = cls;
|
|
@@ -2211,6 +2530,7 @@ class DBCustomSelectListItem {
|
|
|
2211
2530
|
this.change = output();
|
|
2212
2531
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
2213
2532
|
this.hasDivider = signal(false, ...(ngDevMode ? [{ debugName: "hasDivider" }] : /* istanbul ignore next */ []));
|
|
2533
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
2214
2534
|
if (typeof window !== "undefined") {
|
|
2215
2535
|
effect(() => {
|
|
2216
2536
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -2236,10 +2556,15 @@ class DBCustomSelectListItem {
|
|
|
2236
2556
|
const attr = attributes.item(i);
|
|
2237
2557
|
if (attr && attr.name !== 'data-density' &&
|
|
2238
2558
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
2239
|
-
|
|
2559
|
+
if (attr.value) {
|
|
2560
|
+
element.setAttribute(attr.name, attr.value);
|
|
2561
|
+
}
|
|
2562
|
+
else {
|
|
2563
|
+
element.removeAttribute(attr.name);
|
|
2564
|
+
}
|
|
2240
2565
|
parent.removeAttribute(attr.name);
|
|
2241
2566
|
}
|
|
2242
|
-
else if (attr &&
|
|
2567
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
2243
2568
|
element.setAttribute(attr.name, attr.value);
|
|
2244
2569
|
parent.removeAttribute(attr.name);
|
|
2245
2570
|
}
|
|
@@ -2247,7 +2572,7 @@ class DBCustomSelectListItem {
|
|
|
2247
2572
|
const isWebComponent = attr.value.includes("hydrated");
|
|
2248
2573
|
const value = attr.value.replace("hydrated", "").trim();
|
|
2249
2574
|
const currentClass = element.getAttribute("class");
|
|
2250
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
2575
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
2251
2576
|
if (isWebComponent) {
|
|
2252
2577
|
// Stencil is using this class for lazy loading component
|
|
2253
2578
|
parent.setAttribute("class", "hydrated");
|
|
@@ -2277,9 +2602,15 @@ class DBCustomSelectListItem {
|
|
|
2277
2602
|
ngAfterViewInit() {
|
|
2278
2603
|
const element = this._ref()?.nativeElement;
|
|
2279
2604
|
this.enableAttributePassing(element, "db-custom-select-list-item");
|
|
2605
|
+
if (typeof window !== "undefined") {
|
|
2606
|
+
this.setupObserver(element);
|
|
2607
|
+
}
|
|
2608
|
+
}
|
|
2609
|
+
ngOnDestroy() {
|
|
2610
|
+
this.observer()?.disconnect();
|
|
2280
2611
|
}
|
|
2281
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2282
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
2612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectListItem, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBCustomSelectListItem, isStandalone: true, selector: "db-custom-select-list-item", inputs: { isGroupTitle: { classPropertyName: "isGroupTitle", publicName: "isGroupTitle", isSignal: true, isRequired: false, transformFunction: null }, showDivider: { classPropertyName: "showDivider", publicName: "showDivider", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, groupTitle: { classPropertyName: "groupTitle", publicName: "groupTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", disabled: "disabledChange", change: "change" }, providers: [{
|
|
2283
2614
|
provide: NG_VALUE_ACCESSOR,
|
|
2284
2615
|
useExisting: DBCustomSelectListItem,
|
|
2285
2616
|
multi: true
|
|
@@ -2314,7 +2645,7 @@ class DBCustomSelectListItem {
|
|
|
2314
2645
|
}
|
|
2315
2646
|
</li> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
2316
2647
|
}
|
|
2317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectListItem, decorators: [{
|
|
2318
2649
|
type: Component,
|
|
2319
2650
|
args: [{ providers: [{
|
|
2320
2651
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2354,6 +2685,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
2354
2685
|
|
|
2355
2686
|
const defaultProps$x = {};
|
|
2356
2687
|
class DBCustomSelectList {
|
|
2688
|
+
setupObserver(element) {
|
|
2689
|
+
if (!element)
|
|
2690
|
+
return;
|
|
2691
|
+
const parent = element.closest("db-custom-select-list");
|
|
2692
|
+
if (!parent || this.observer())
|
|
2693
|
+
return;
|
|
2694
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
2695
|
+
if (mutations.some((mutation) => {
|
|
2696
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
2697
|
+
return attr?.value !== mutation.oldValue;
|
|
2698
|
+
})) {
|
|
2699
|
+
this.enableAttributePassing(element, "db-custom-select-list");
|
|
2700
|
+
}
|
|
2701
|
+
}));
|
|
2702
|
+
this.observer().observe(parent, {
|
|
2703
|
+
attributes: true,
|
|
2704
|
+
attributeOldValue: true,
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2357
2707
|
constructor() {
|
|
2358
2708
|
this.cls = cls;
|
|
2359
2709
|
this.multiple = input(...(ngDevMode ? [undefined, { debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
@@ -2362,6 +2712,7 @@ class DBCustomSelectList {
|
|
|
2362
2712
|
this.propOverrides = input(...(ngDevMode ? [undefined, { debugName: "propOverrides" }] : /* istanbul ignore next */ []));
|
|
2363
2713
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
2364
2714
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
2715
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
2365
2716
|
}
|
|
2366
2717
|
/**
|
|
2367
2718
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -2376,10 +2727,15 @@ class DBCustomSelectList {
|
|
|
2376
2727
|
const attr = attributes.item(i);
|
|
2377
2728
|
if (attr && attr.name !== 'data-density' &&
|
|
2378
2729
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
2379
|
-
|
|
2730
|
+
if (attr.value) {
|
|
2731
|
+
element.setAttribute(attr.name, attr.value);
|
|
2732
|
+
}
|
|
2733
|
+
else {
|
|
2734
|
+
element.removeAttribute(attr.name);
|
|
2735
|
+
}
|
|
2380
2736
|
parent.removeAttribute(attr.name);
|
|
2381
2737
|
}
|
|
2382
|
-
else if (attr &&
|
|
2738
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
2383
2739
|
element.setAttribute(attr.name, attr.value);
|
|
2384
2740
|
parent.removeAttribute(attr.name);
|
|
2385
2741
|
}
|
|
@@ -2387,7 +2743,7 @@ class DBCustomSelectList {
|
|
|
2387
2743
|
const isWebComponent = attr.value.includes("hydrated");
|
|
2388
2744
|
const value = attr.value.replace("hydrated", "").trim();
|
|
2389
2745
|
const currentClass = element.getAttribute("class");
|
|
2390
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
2746
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
2391
2747
|
if (isWebComponent) {
|
|
2392
2748
|
// Stencil is using this class for lazy loading component
|
|
2393
2749
|
parent.setAttribute("class", "hydrated");
|
|
@@ -2402,9 +2758,15 @@ class DBCustomSelectList {
|
|
|
2402
2758
|
ngAfterViewInit() {
|
|
2403
2759
|
const element = this._ref()?.nativeElement;
|
|
2404
2760
|
this.enableAttributePassing(element, "db-custom-select-list");
|
|
2761
|
+
if (typeof window !== "undefined") {
|
|
2762
|
+
this.setupObserver(element);
|
|
2763
|
+
}
|
|
2405
2764
|
}
|
|
2406
|
-
|
|
2407
|
-
|
|
2765
|
+
ngOnDestroy() {
|
|
2766
|
+
this.observer()?.disconnect();
|
|
2767
|
+
}
|
|
2768
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2769
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBCustomSelectList, isStandalone: true, selector: "db-custom-select-list", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
2408
2770
|
[attr.role]="multiple() ? 'group' : 'radiogroup'"
|
|
2409
2771
|
[attr.aria-label]="label()"
|
|
2410
2772
|
#_ref
|
|
@@ -2416,7 +2778,7 @@ class DBCustomSelectList {
|
|
|
2416
2778
|
</ul>
|
|
2417
2779
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
2418
2780
|
}
|
|
2419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
2781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectList, decorators: [{
|
|
2420
2782
|
type: Component,
|
|
2421
2783
|
args: [{ selector: "db-custom-select-list", standalone: true, imports: [CommonModule], template: `<div
|
|
2422
2784
|
[attr.role]="multiple() ? 'group' : 'radiogroup'"
|
|
@@ -2446,7 +2808,7 @@ class DBInput {
|
|
|
2446
2808
|
DEFAULT_INVALID_MESSAGE);
|
|
2447
2809
|
if (hasVoiceOver()) {
|
|
2448
2810
|
this._voiceOverFallback.set(this._invalidMessage());
|
|
2449
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
2811
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
2450
2812
|
}
|
|
2451
2813
|
}
|
|
2452
2814
|
else if (this.hasValidState() &&
|
|
@@ -2458,7 +2820,7 @@ class DBInput {
|
|
|
2458
2820
|
this._descByIds.set(this._validMessageId());
|
|
2459
2821
|
if (hasVoiceOver()) {
|
|
2460
2822
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
2461
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
2823
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
2462
2824
|
}
|
|
2463
2825
|
}
|
|
2464
2826
|
else if (stringPropVisible(this.message(), this.showMessage())) {
|
|
@@ -2514,6 +2876,25 @@ class DBInput {
|
|
|
2514
2876
|
this._invalidMessageId.set(mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX);
|
|
2515
2877
|
this._dataListId.set(mId + DEFAULT_DATALIST_ID_SUFFIX);
|
|
2516
2878
|
}
|
|
2879
|
+
setupObserver(element) {
|
|
2880
|
+
if (!element)
|
|
2881
|
+
return;
|
|
2882
|
+
const parent = element.closest("db-input");
|
|
2883
|
+
if (!parent || this.observer())
|
|
2884
|
+
return;
|
|
2885
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
2886
|
+
if (mutations.some((mutation) => {
|
|
2887
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
2888
|
+
return attr?.value !== mutation.oldValue;
|
|
2889
|
+
})) {
|
|
2890
|
+
this.enableAttributePassing(element, "db-input");
|
|
2891
|
+
}
|
|
2892
|
+
}));
|
|
2893
|
+
this.observer().observe(parent, {
|
|
2894
|
+
attributes: true,
|
|
2895
|
+
attributeOldValue: true,
|
|
2896
|
+
});
|
|
2897
|
+
}
|
|
2517
2898
|
trackByOption0(_, option) {
|
|
2518
2899
|
return this._dataListId() + "-option-" + option.value;
|
|
2519
2900
|
}
|
|
@@ -2596,6 +2977,7 @@ class DBInput {
|
|
|
2596
2977
|
this._value = signal("", ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
2597
2978
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : /* istanbul ignore next */ []));
|
|
2598
2979
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
2980
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
2599
2981
|
if (typeof window !== "undefined") {
|
|
2600
2982
|
effect(() => {
|
|
2601
2983
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -2684,10 +3066,15 @@ class DBInput {
|
|
|
2684
3066
|
const attr = attributes.item(i);
|
|
2685
3067
|
if (attr && attr.name !== 'data-density' &&
|
|
2686
3068
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
2687
|
-
|
|
3069
|
+
if (attr.value) {
|
|
3070
|
+
element.setAttribute(attr.name, attr.value);
|
|
3071
|
+
}
|
|
3072
|
+
else {
|
|
3073
|
+
element.removeAttribute(attr.name);
|
|
3074
|
+
}
|
|
2688
3075
|
parent.removeAttribute(attr.name);
|
|
2689
3076
|
}
|
|
2690
|
-
else if (attr &&
|
|
3077
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
2691
3078
|
element.setAttribute(attr.name, attr.value);
|
|
2692
3079
|
parent.removeAttribute(attr.name);
|
|
2693
3080
|
}
|
|
@@ -2695,7 +3082,7 @@ class DBInput {
|
|
|
2695
3082
|
const isWebComponent = attr.value.includes("hydrated");
|
|
2696
3083
|
const value = attr.value.replace("hydrated", "").trim();
|
|
2697
3084
|
const currentClass = element.getAttribute("class");
|
|
2698
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
3085
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
2699
3086
|
if (isWebComponent) {
|
|
2700
3087
|
// Stencil is using this class for lazy loading component
|
|
2701
3088
|
parent.setAttribute("class", "hydrated");
|
|
@@ -2728,13 +3115,15 @@ class DBInput {
|
|
|
2728
3115
|
if (typeof window !== "undefined") {
|
|
2729
3116
|
this.resetIds();
|
|
2730
3117
|
this._invalidMessage.set(this.invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
3118
|
+
this.setupObserver(element);
|
|
2731
3119
|
}
|
|
2732
3120
|
}
|
|
2733
3121
|
ngOnDestroy() {
|
|
2734
3122
|
this.abortController()?.abort();
|
|
3123
|
+
this.observer()?.disconnect();
|
|
2735
3124
|
}
|
|
2736
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
2737
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
3125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBInput, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBInput, isStandalone: true, selector: "db-input", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, dataListId: { classPropertyName: "dataListId", publicName: "dataListId", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, dataList: { classPropertyName: "dataList", publicName: "dataList", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showIconLeading: { classPropertyName: "showIconLeading", publicName: "showIconLeading", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, iconLeading: { classPropertyName: "iconLeading", publicName: "iconLeading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconTrailing: { classPropertyName: "iconTrailing", publicName: "iconTrailing", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, showIconTrailing: { classPropertyName: "showIconTrailing", publicName: "showIconTrailing", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, fieldSizing: { classPropertyName: "fieldSizing", publicName: "fieldSizing", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, enterkeyhint: { classPropertyName: "enterkeyhint", publicName: "enterkeyhint", isSignal: true, isRequired: false, transformFunction: null }, inputmode: { classPropertyName: "inputmode", publicName: "inputmode", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, messageSize: { classPropertyName: "messageSize", publicName: "messageSize", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null }, validMessageSize: { classPropertyName: "validMessageSize", publicName: "validMessageSize", isSignal: true, isRequired: false, transformFunction: null }, invalidMessageSize: { classPropertyName: "invalidMessageSize", publicName: "invalidMessageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", input: "input", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
2738
3127
|
provide: NG_VALUE_ACCESSOR,
|
|
2739
3128
|
useExisting: DBInput,
|
|
2740
3129
|
multi: true
|
|
@@ -2768,7 +3157,7 @@ class DBInput {
|
|
|
2768
3157
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2769
3158
|
[attr.max]="getInputValue(max(), type())"
|
|
2770
3159
|
[attr.min]="getInputValue(min(), type())"
|
|
2771
|
-
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly')"
|
|
3160
|
+
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly') || undefined"
|
|
2772
3161
|
[attr.form]="form()"
|
|
2773
3162
|
[attr.pattern]="pattern()"
|
|
2774
3163
|
[attr.size]="size()"
|
|
@@ -2821,7 +3210,7 @@ class DBInput {
|
|
|
2821
3210
|
>
|
|
2822
3211
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }] }); }
|
|
2823
3212
|
}
|
|
2824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
3213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBInput, decorators: [{
|
|
2825
3214
|
type: Component,
|
|
2826
3215
|
args: [{ providers: [{
|
|
2827
3216
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2857,7 +3246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
2857
3246
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2858
3247
|
[attr.max]="getInputValue(max(), type())"
|
|
2859
3248
|
[attr.min]="getInputValue(min(), type())"
|
|
2860
|
-
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly')"
|
|
3249
|
+
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly') || undefined"
|
|
2861
3250
|
[attr.form]="form()"
|
|
2862
3251
|
[attr.pattern]="pattern()"
|
|
2863
3252
|
[attr.size]="size()"
|
|
@@ -2951,19 +3340,87 @@ class DBTooltip {
|
|
|
2951
3340
|
}
|
|
2952
3341
|
}
|
|
2953
3342
|
handleLeave() {
|
|
3343
|
+
// Multiple triggers (hover + focus) can be active at once. Only tear
|
|
3344
|
+
// down the shared scroll callback/observer once the last one leaves.
|
|
3345
|
+
this._activeTriggerCount.set(Math.max((this._activeTriggerCount() ?? 0) - 1, 0));
|
|
3346
|
+
if ((this._activeTriggerCount() ?? 0) > 0) {
|
|
3347
|
+
return;
|
|
3348
|
+
}
|
|
2954
3349
|
if (this._documentScrollListenerCallbackId()) {
|
|
2955
3350
|
new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId());
|
|
3351
|
+
this._documentScrollListenerCallbackId.set(undefined);
|
|
2956
3352
|
}
|
|
2957
3353
|
this._observer()?.unobserve(this.getParent());
|
|
2958
3354
|
}
|
|
2959
3355
|
handleEnter(parent) {
|
|
2960
|
-
|
|
3356
|
+
// Register the shared scroll callback only for the first active
|
|
3357
|
+
// trigger; a second enter (e.g. focusin after mouseenter) must not
|
|
3358
|
+
// orphan the first callback.
|
|
3359
|
+
this._activeTriggerCount.set((this._activeTriggerCount() ?? 0) + 1);
|
|
3360
|
+
if (this._activeTriggerCount() === 1) {
|
|
3361
|
+
this._documentScrollListenerCallbackId.set(new DocumentScrollListener().addCallback((event) => this.handleDocumentScroll(event, parent)));
|
|
3362
|
+
this._observer()?.observe(this.getParent());
|
|
3363
|
+
}
|
|
2961
3364
|
this.handleAutoPlacement(parent);
|
|
2962
|
-
this._observer()?.observe(this.getParent());
|
|
2963
3365
|
}
|
|
2964
3366
|
resetIds() {
|
|
2965
3367
|
this._id.set(this.id() ?? this.propOverrides()?.id ?? "tooltip-" + uuid());
|
|
2966
3368
|
}
|
|
3369
|
+
_detachListeners() {
|
|
3370
|
+
const callbackId = this._documentScrollListenerCallbackId();
|
|
3371
|
+
if (callbackId) {
|
|
3372
|
+
new DocumentScrollListener().removeCallback(callbackId);
|
|
3373
|
+
this._documentScrollListenerCallbackId.set(undefined);
|
|
3374
|
+
}
|
|
3375
|
+
this._observer()?.disconnect();
|
|
3376
|
+
this._observer.set(undefined);
|
|
3377
|
+
this._activeTriggerCount.set(0);
|
|
3378
|
+
const bound = this._boundListeners() ?? [];
|
|
3379
|
+
bound.forEach((entry) => {
|
|
3380
|
+
entry.parent.removeEventListener(entry.type, entry.fn);
|
|
3381
|
+
});
|
|
3382
|
+
this._boundListeners.set([]);
|
|
3383
|
+
// Remove attributes this tooltip set on its parent, but only while
|
|
3384
|
+
// they still belong to this tooltip (avoid clobbering another one).
|
|
3385
|
+
const parent = this._attachedParent();
|
|
3386
|
+
if (parent) {
|
|
3387
|
+
const attachedId = this._attachedId() ?? this._id();
|
|
3388
|
+
// Only remove data-has-tooltip when no other .db-tooltip
|
|
3389
|
+
// siblings remain inside the same parent.
|
|
3390
|
+
const remainingTooltips = parent.querySelectorAll(".db-tooltip");
|
|
3391
|
+
const otherTooltipsExist = Array.from(remainingTooltips).some((el) => el !== this._ref()?.nativeElement);
|
|
3392
|
+
if (parent.dataset["hasTooltip"] === "true" && !otherTooltipsExist) {
|
|
3393
|
+
delete parent.dataset["hasTooltip"];
|
|
3394
|
+
}
|
|
3395
|
+
if (parent.getAttribute("aria-labelledby") === attachedId) {
|
|
3396
|
+
parent.removeAttribute("aria-labelledby");
|
|
3397
|
+
}
|
|
3398
|
+
if (parent.getAttribute("aria-describedby") === attachedId) {
|
|
3399
|
+
parent.removeAttribute("aria-describedby");
|
|
3400
|
+
}
|
|
3401
|
+
this._attachedParent.set(undefined);
|
|
3402
|
+
this._attachedId.set(undefined);
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
setupObserver(element) {
|
|
3406
|
+
if (!element)
|
|
3407
|
+
return;
|
|
3408
|
+
const parent = element.closest("db-tooltip");
|
|
3409
|
+
if (!parent || this.observer())
|
|
3410
|
+
return;
|
|
3411
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
3412
|
+
if (mutations.some((mutation) => {
|
|
3413
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
3414
|
+
return attr?.value !== mutation.oldValue;
|
|
3415
|
+
})) {
|
|
3416
|
+
this.enableAttributePassing(element, "db-tooltip");
|
|
3417
|
+
}
|
|
3418
|
+
}));
|
|
3419
|
+
this.observer().observe(parent, {
|
|
3420
|
+
attributes: true,
|
|
3421
|
+
attributeOldValue: true,
|
|
3422
|
+
});
|
|
3423
|
+
}
|
|
2967
3424
|
constructor() {
|
|
2968
3425
|
this.cls = cls;
|
|
2969
3426
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -2984,6 +3441,11 @@ class DBTooltip {
|
|
|
2984
3441
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
2985
3442
|
this._documentScrollListenerCallbackId = signal(undefined, ...(ngDevMode ? [{ debugName: "_documentScrollListenerCallbackId" }] : /* istanbul ignore next */ []));
|
|
2986
3443
|
this._observer = signal(undefined, ...(ngDevMode ? [{ debugName: "_observer" }] : /* istanbul ignore next */ []));
|
|
3444
|
+
this._attachedParent = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachedParent" }] : /* istanbul ignore next */ []));
|
|
3445
|
+
this._attachedId = signal(undefined, ...(ngDevMode ? [{ debugName: "_attachedId" }] : /* istanbul ignore next */ []));
|
|
3446
|
+
this._activeTriggerCount = signal(0, ...(ngDevMode ? [{ debugName: "_activeTriggerCount" }] : /* istanbul ignore next */ []));
|
|
3447
|
+
this._boundListeners = signal([], ...(ngDevMode ? [{ debugName: "_boundListeners" }] : /* istanbul ignore next */ []));
|
|
3448
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
2987
3449
|
if (typeof window !== "undefined") {
|
|
2988
3450
|
effect(() => {
|
|
2989
3451
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -3005,13 +3467,42 @@ class DBTooltip {
|
|
|
3005
3467
|
const parent = this.getParent();
|
|
3006
3468
|
if (parent) {
|
|
3007
3469
|
this.handleAutoPlacement(parent);
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
parent.addEventListener("
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3470
|
+
const enterListener = () => this.handleEnter(parent);
|
|
3471
|
+
const leaveListener = () => this.handleLeave();
|
|
3472
|
+
const keyDownListener = (event) => this.handleEscape(event);
|
|
3473
|
+
parent.addEventListener("mouseenter", enterListener);
|
|
3474
|
+
parent.addEventListener("focusin", enterListener);
|
|
3475
|
+
parent.addEventListener("keydown", keyDownListener);
|
|
3476
|
+
parent.addEventListener("mouseleave", leaveListener);
|
|
3477
|
+
parent.addEventListener("focusout", leaveListener);
|
|
3478
|
+
this._boundListeners.set([
|
|
3479
|
+
...(this._boundListeners() ?? []),
|
|
3480
|
+
{
|
|
3481
|
+
parent,
|
|
3482
|
+
type: "mouseenter",
|
|
3483
|
+
fn: enterListener,
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
parent,
|
|
3487
|
+
type: "focusin",
|
|
3488
|
+
fn: enterListener,
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
parent,
|
|
3492
|
+
type: "keydown",
|
|
3493
|
+
fn: keyDownListener,
|
|
3494
|
+
},
|
|
3495
|
+
{
|
|
3496
|
+
parent,
|
|
3497
|
+
type: "mouseleave",
|
|
3498
|
+
fn: leaveListener,
|
|
3499
|
+
},
|
|
3500
|
+
{
|
|
3501
|
+
parent,
|
|
3502
|
+
type: "focusout",
|
|
3503
|
+
fn: leaveListener,
|
|
3504
|
+
},
|
|
3505
|
+
]);
|
|
3015
3506
|
parent.dataset["hasTooltip"] = "true";
|
|
3016
3507
|
if (this.variant() === "label") {
|
|
3017
3508
|
parent.setAttribute("aria-labelledby", this._id());
|
|
@@ -3019,6 +3510,8 @@ class DBTooltip {
|
|
|
3019
3510
|
else {
|
|
3020
3511
|
parent.setAttribute("aria-describedby", this._id());
|
|
3021
3512
|
}
|
|
3513
|
+
this._attachedParent.set(parent);
|
|
3514
|
+
this._attachedId.set(this._id());
|
|
3022
3515
|
}
|
|
3023
3516
|
if (typeof window !== "undefined" &&
|
|
3024
3517
|
"IntersectionObserver" in window) {
|
|
@@ -3049,10 +3542,15 @@ class DBTooltip {
|
|
|
3049
3542
|
const attr = attributes.item(i);
|
|
3050
3543
|
if (attr && attr.name !== 'data-density' &&
|
|
3051
3544
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
3052
|
-
|
|
3545
|
+
if (attr.value) {
|
|
3546
|
+
element.setAttribute(attr.name, attr.value);
|
|
3547
|
+
}
|
|
3548
|
+
else {
|
|
3549
|
+
element.removeAttribute(attr.name);
|
|
3550
|
+
}
|
|
3053
3551
|
parent.removeAttribute(attr.name);
|
|
3054
3552
|
}
|
|
3055
|
-
else if (attr &&
|
|
3553
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
3056
3554
|
element.setAttribute(attr.name, attr.value);
|
|
3057
3555
|
parent.removeAttribute(attr.name);
|
|
3058
3556
|
}
|
|
@@ -3060,7 +3558,7 @@ class DBTooltip {
|
|
|
3060
3558
|
const isWebComponent = attr.value.includes("hydrated");
|
|
3061
3559
|
const value = attr.value.replace("hydrated", "").trim();
|
|
3062
3560
|
const currentClass = element.getAttribute("class");
|
|
3063
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
3561
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
3064
3562
|
if (isWebComponent) {
|
|
3065
3563
|
// Stencil is using this class for lazy loading component
|
|
3066
3564
|
parent.setAttribute("class", "hydrated");
|
|
@@ -3078,10 +3576,15 @@ class DBTooltip {
|
|
|
3078
3576
|
if (typeof window !== "undefined") {
|
|
3079
3577
|
this.resetIds();
|
|
3080
3578
|
this.initialized.set(true);
|
|
3579
|
+
this.setupObserver(element);
|
|
3081
3580
|
}
|
|
3082
3581
|
}
|
|
3083
|
-
|
|
3084
|
-
|
|
3582
|
+
ngOnDestroy() {
|
|
3583
|
+
this._detachListeners();
|
|
3584
|
+
this.observer()?.disconnect();
|
|
3585
|
+
}
|
|
3586
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTooltip, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3587
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTooltip, isStandalone: true, selector: "db-tooltip", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<i
|
|
3085
3588
|
role="tooltip"
|
|
3086
3589
|
aria-hidden="true"
|
|
3087
3590
|
data-gap="true"
|
|
@@ -3099,7 +3602,7 @@ class DBTooltip {
|
|
|
3099
3602
|
>@if(text()){{{text()}}} <ng-content></ng-content
|
|
3100
3603
|
></i> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
3101
3604
|
}
|
|
3102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
3605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTooltip, decorators: [{
|
|
3103
3606
|
type: Component,
|
|
3104
3607
|
args: [{ selector: "db-tooltip", standalone: true, imports: [CommonModule], template: `<i
|
|
3105
3608
|
role="tooltip"
|
|
@@ -3137,6 +3640,25 @@ class DBTag {
|
|
|
3137
3640
|
// TODO: We should think this through again, if we would really like to have default and especially english, instead of german labels in here
|
|
3138
3641
|
return DEFAULT_REMOVE;
|
|
3139
3642
|
}
|
|
3643
|
+
setupObserver(element) {
|
|
3644
|
+
if (!element)
|
|
3645
|
+
return;
|
|
3646
|
+
const parent = element.closest("db-tag");
|
|
3647
|
+
if (!parent || this.observer())
|
|
3648
|
+
return;
|
|
3649
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
3650
|
+
if (mutations.some((mutation) => {
|
|
3651
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
3652
|
+
return attr?.value !== mutation.oldValue;
|
|
3653
|
+
})) {
|
|
3654
|
+
this.enableAttributePassing(element, "db-tag");
|
|
3655
|
+
}
|
|
3656
|
+
}));
|
|
3657
|
+
this.observer().observe(parent, {
|
|
3658
|
+
attributes: true,
|
|
3659
|
+
attributeOldValue: true,
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3140
3662
|
constructor() {
|
|
3141
3663
|
this.cls = cls;
|
|
3142
3664
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -3155,6 +3677,7 @@ class DBTag {
|
|
|
3155
3677
|
this.behavior = input(...(ngDevMode ? [undefined, { debugName: "behavior" }] : /* istanbul ignore next */ []));
|
|
3156
3678
|
this.remove = output();
|
|
3157
3679
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
3680
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
3158
3681
|
}
|
|
3159
3682
|
/**
|
|
3160
3683
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -3169,10 +3692,15 @@ class DBTag {
|
|
|
3169
3692
|
const attr = attributes.item(i);
|
|
3170
3693
|
if (attr && attr.name !== 'data-density' &&
|
|
3171
3694
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
3172
|
-
|
|
3695
|
+
if (attr.value) {
|
|
3696
|
+
element.setAttribute(attr.name, attr.value);
|
|
3697
|
+
}
|
|
3698
|
+
else {
|
|
3699
|
+
element.removeAttribute(attr.name);
|
|
3700
|
+
}
|
|
3173
3701
|
parent.removeAttribute(attr.name);
|
|
3174
3702
|
}
|
|
3175
|
-
else if (attr &&
|
|
3703
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
3176
3704
|
element.setAttribute(attr.name, attr.value);
|
|
3177
3705
|
parent.removeAttribute(attr.name);
|
|
3178
3706
|
}
|
|
@@ -3180,7 +3708,7 @@ class DBTag {
|
|
|
3180
3708
|
const isWebComponent = attr.value.includes("hydrated");
|
|
3181
3709
|
const value = attr.value.replace("hydrated", "").trim();
|
|
3182
3710
|
const currentClass = element.getAttribute("class");
|
|
3183
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
3711
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
3184
3712
|
if (isWebComponent) {
|
|
3185
3713
|
// Stencil is using this class for lazy loading component
|
|
3186
3714
|
parent.setAttribute("class", "hydrated");
|
|
@@ -3195,9 +3723,15 @@ class DBTag {
|
|
|
3195
3723
|
ngAfterViewInit() {
|
|
3196
3724
|
const element = this._ref()?.nativeElement;
|
|
3197
3725
|
this.enableAttributePassing(element, "db-tag");
|
|
3726
|
+
if (typeof window !== "undefined") {
|
|
3727
|
+
this.setupObserver(element);
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
ngOnDestroy() {
|
|
3731
|
+
this.observer()?.disconnect();
|
|
3198
3732
|
}
|
|
3199
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
3200
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
3733
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3734
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTag, isStandalone: true, selector: "db-tag", inputs: { removeButton: { classPropertyName: "removeButton", publicName: "removeButton", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, semantic: { classPropertyName: "semantic", publicName: "semantic", isSignal: true, isRequired: false, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showCheckState: { classPropertyName: "showCheckState", publicName: "showCheckState", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, noText: { classPropertyName: "noText", publicName: "noText", isSignal: true, isRequired: false, transformFunction: null }, overflow: { classPropertyName: "overflow", publicName: "overflow", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, behavior: { classPropertyName: "behavior", publicName: "behavior", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { remove: "remove" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
3201
3735
|
#_ref
|
|
3202
3736
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
3203
3737
|
[class]="cls('db-tag', className())"
|
|
@@ -3226,7 +3760,7 @@ class DBTag {
|
|
|
3226
3760
|
}
|
|
3227
3761
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTooltip, selector: "db-tooltip", inputs: ["id", "propOverrides", "variant", "placement", "className", "emphasis", "wrap", "animation", "delay", "width", "showArrow", "text"] }] }); }
|
|
3228
3762
|
}
|
|
3229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
3763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTag, decorators: [{
|
|
3230
3764
|
type: Component,
|
|
3231
3765
|
args: [{ selector: "db-tag", standalone: true, imports: [CommonModule, DBTooltip], template: `<div
|
|
3232
3766
|
#_ref
|
|
@@ -3285,7 +3819,7 @@ class DBCustomSelect {
|
|
|
3285
3819
|
DEFAULT_INVALID_MESSAGE);
|
|
3286
3820
|
if (hasVoiceOver()) {
|
|
3287
3821
|
this._voiceOverFallback.set(this._invalidMessage());
|
|
3288
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
3822
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
3289
3823
|
}
|
|
3290
3824
|
if (this._userInteraction()) {
|
|
3291
3825
|
this._validity.set(this.validation() ?? "invalid");
|
|
@@ -3297,7 +3831,7 @@ class DBCustomSelect {
|
|
|
3297
3831
|
this.setDescById(this._validMessageId());
|
|
3298
3832
|
if (hasVoiceOver()) {
|
|
3299
3833
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
3300
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
3834
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
3301
3835
|
}
|
|
3302
3836
|
this._validity.set(this.validation() ?? "valid");
|
|
3303
3837
|
}
|
|
@@ -3388,7 +3922,7 @@ class DBCustomSelect {
|
|
|
3388
3922
|
const dropdown = this.detailsRef()?.nativeElement.querySelector("article");
|
|
3389
3923
|
if (dropdown) {
|
|
3390
3924
|
// This is a workaround for Angular
|
|
3391
|
-
delay(() => {
|
|
3925
|
+
void delay(() => {
|
|
3392
3926
|
handleFixedDropdown(dropdown, this.detailsRef()?.nativeElement, this.placement() ?? "bottom");
|
|
3393
3927
|
}, 1);
|
|
3394
3928
|
}
|
|
@@ -3443,7 +3977,7 @@ class DBCustomSelect {
|
|
|
3443
3977
|
// or to the last checkbox
|
|
3444
3978
|
const search = getSearchInput(this.detailsRef()?.nativeElement);
|
|
3445
3979
|
if (search) {
|
|
3446
|
-
delay(() => {
|
|
3980
|
+
void delay(() => {
|
|
3447
3981
|
search.focus();
|
|
3448
3982
|
}, 100);
|
|
3449
3983
|
}
|
|
@@ -3609,7 +4143,7 @@ class DBCustomSelect {
|
|
|
3609
4143
|
? checkboxes.at(1)
|
|
3610
4144
|
: first;
|
|
3611
4145
|
if (checkbox) {
|
|
3612
|
-
delay(() => {
|
|
4146
|
+
void delay(() => {
|
|
3613
4147
|
// Takes some time until element can be focused
|
|
3614
4148
|
checkbox.focus();
|
|
3615
4149
|
}, 1);
|
|
@@ -3622,7 +4156,7 @@ class DBCustomSelect {
|
|
|
3622
4156
|
// Focus search if possible
|
|
3623
4157
|
const search = getSearchInput(this.detailsRef()?.nativeElement);
|
|
3624
4158
|
if (search) {
|
|
3625
|
-
delay(() => {
|
|
4159
|
+
void delay(() => {
|
|
3626
4160
|
// Takes some time until element can be focused
|
|
3627
4161
|
search.focus();
|
|
3628
4162
|
}, 1);
|
|
@@ -3692,6 +4226,25 @@ class DBCustomSelect {
|
|
|
3692
4226
|
// This is a function to satisfy React
|
|
3693
4227
|
event.stopPropagation();
|
|
3694
4228
|
}
|
|
4229
|
+
setupObserver(element) {
|
|
4230
|
+
if (!element)
|
|
4231
|
+
return;
|
|
4232
|
+
const parent = element.closest("db-custom-select");
|
|
4233
|
+
if (!parent || this.observer())
|
|
4234
|
+
return;
|
|
4235
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
4236
|
+
if (mutations.some((mutation) => {
|
|
4237
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
4238
|
+
return attr?.value !== mutation.oldValue;
|
|
4239
|
+
})) {
|
|
4240
|
+
this.enableAttributePassing(element, "db-custom-select");
|
|
4241
|
+
}
|
|
4242
|
+
}));
|
|
4243
|
+
this.observer().observe(parent, {
|
|
4244
|
+
attributes: true,
|
|
4245
|
+
attributeOldValue: true,
|
|
4246
|
+
});
|
|
4247
|
+
}
|
|
3695
4248
|
trackByOption0(_, option) {
|
|
3696
4249
|
return getOptionKey(option, "native-select-option-");
|
|
3697
4250
|
}
|
|
@@ -3802,6 +4355,7 @@ class DBCustomSelect {
|
|
|
3802
4355
|
this._searchValue = signal(undefined, ...(ngDevMode ? [{ debugName: "_searchValue" }] : /* istanbul ignore next */ []));
|
|
3803
4356
|
this.selectAllChecked = signal(false, ...(ngDevMode ? [{ debugName: "selectAllChecked" }] : /* istanbul ignore next */ []));
|
|
3804
4357
|
this.selectAllIndeterminate = signal(false, ...(ngDevMode ? [{ debugName: "selectAllIndeterminate" }] : /* istanbul ignore next */ []));
|
|
4358
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
3805
4359
|
if (typeof window !== "undefined") {
|
|
3806
4360
|
effect(() => {
|
|
3807
4361
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -4092,10 +4646,15 @@ class DBCustomSelect {
|
|
|
4092
4646
|
const attr = attributes.item(i);
|
|
4093
4647
|
if (attr && attr.name !== 'data-density' &&
|
|
4094
4648
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
4095
|
-
|
|
4649
|
+
if (attr.value) {
|
|
4650
|
+
element.setAttribute(attr.name, attr.value);
|
|
4651
|
+
}
|
|
4652
|
+
else {
|
|
4653
|
+
element.removeAttribute(attr.name);
|
|
4654
|
+
}
|
|
4096
4655
|
parent.removeAttribute(attr.name);
|
|
4097
4656
|
}
|
|
4098
|
-
else if (attr &&
|
|
4657
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
4099
4658
|
element.setAttribute(attr.name, attr.value);
|
|
4100
4659
|
parent.removeAttribute(attr.name);
|
|
4101
4660
|
}
|
|
@@ -4103,7 +4662,7 @@ class DBCustomSelect {
|
|
|
4103
4662
|
const isWebComponent = attr.value.includes("hydrated");
|
|
4104
4663
|
const value = attr.value.replace("hydrated", "").trim();
|
|
4105
4664
|
const currentClass = element.getAttribute("class");
|
|
4106
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
4665
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
4107
4666
|
if (isWebComponent) {
|
|
4108
4667
|
// Stencil is using this class for lazy loading component
|
|
4109
4668
|
parent.setAttribute("class", "hydrated");
|
|
@@ -4148,13 +4707,15 @@ class DBCustomSelect {
|
|
|
4148
4707
|
}
|
|
4149
4708
|
}));
|
|
4150
4709
|
}
|
|
4710
|
+
this.setupObserver(element);
|
|
4151
4711
|
}
|
|
4152
4712
|
}
|
|
4153
4713
|
ngOnDestroy() {
|
|
4154
4714
|
this.abortController()?.abort();
|
|
4715
|
+
this.observer()?.disconnect();
|
|
4155
4716
|
}
|
|
4156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
4157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
4717
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelect, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4718
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBCustomSelect, isStandalone: true, selector: "db-custom-select", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, showNoResults: { classPropertyName: "showNoResults", publicName: "showNoResults", isSignal: true, isRequired: false, transformFunction: null }, showLoading: { classPropertyName: "showLoading", publicName: "showLoading", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null }, selectedLabels: { classPropertyName: "selectedLabels", publicName: "selectedLabels", isSignal: true, isRequired: false, transformFunction: null }, transformSelectedLabels: { classPropertyName: "transformSelectedLabels", publicName: "transformSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedType: { classPropertyName: "selectedType", publicName: "selectedType", isSignal: true, isRequired: false, transformFunction: null }, amountText: { classPropertyName: "amountText", publicName: "amountText", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, removeTagsTexts: { classPropertyName: "removeTagsTexts", publicName: "removeTagsTexts", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, searchFilter: { classPropertyName: "searchFilter", publicName: "searchFilter", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, formFieldWidth: { classPropertyName: "formFieldWidth", publicName: "formFieldWidth", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, selectedPrefix: { classPropertyName: "selectedPrefix", publicName: "selectedPrefix", isSignal: true, isRequired: false, transformFunction: null }, dropdownWidth: { classPropertyName: "dropdownWidth", publicName: "dropdownWidth", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, listLabel: { classPropertyName: "listLabel", publicName: "listLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, mobileCloseButtonText: { classPropertyName: "mobileCloseButtonText", publicName: "mobileCloseButtonText", isSignal: true, isRequired: false, transformFunction: null }, showClearSelection: { classPropertyName: "showClearSelection", publicName: "showClearSelection", isSignal: true, isRequired: false, transformFunction: null }, clearSelectionText: { classPropertyName: "clearSelectionText", publicName: "clearSelectionText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { values: "valuesChange", disabled: "disabledChange", amountChange: "amountChange", dropdownToggle: "dropdownToggle", optionSelected: "optionSelected", search: "search" }, providers: [{
|
|
4158
4719
|
provide: NG_VALUE_ACCESSOR,
|
|
4159
4720
|
useExisting: DBCustomSelect,
|
|
4160
4721
|
multi: true
|
|
@@ -4368,7 +4929,7 @@ class DBCustomSelect {
|
|
|
4368
4929
|
>
|
|
4369
4930
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTag, selector: "db-tag", inputs: ["removeButton", "id", "propOverrides", "className", "semantic", "emphasis", "icon", "showCheckState", "showIcon", "noText", "overflow", "text", "behavior"], outputs: ["remove"] }, { kind: "component", type: DBCustomSelectDropdown, selector: "db-custom-select-dropdown", inputs: ["id", "propOverrides", "className", "width"] }, { kind: "component", type: DBInput, selector: "db-input", inputs: ["invalidMessage", "id", "propOverrides", "dataListId", "message", "showMessage", "value", "validMessage", "validation", "required", "minLength", "maxLength", "pattern", "dataList", "className", "variant", "showLabel", "showIconLeading", "showIcon", "iconLeading", "icon", "iconTrailing", "showRequiredAsterisk", "showIconTrailing", "label", "fieldSizing", "name", "type", "multiple", "accept", "placeholder", "disabled", "step", "maxlength", "minlength", "max", "min", "readOnly", "readonly", "form", "size", "autocomplete", "autofocus", "enterkeyhint", "inputmode", "ariaDescribedBy", "messageSize", "messageIcon", "validMessageSize", "invalidMessageSize"], outputs: ["valueChange", "disabledChange", "input", "change", "blur", "focus"] }, { kind: "component", type: DBCustomSelectList, selector: "db-custom-select-list", inputs: ["multiple", "label", "id", "propOverrides", "className"] }, { kind: "component", type: DBCustomSelectListItem, selector: "db-custom-select-list-item", inputs: ["isGroupTitle", "showDivider", "type", "checked", "id", "propOverrides", "className", "groupTitle", "icon", "showIcon", "name", "disabled", "value", "label"], outputs: ["checkedChange", "disabledChange", "change"] }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }, { kind: "component", type: DBTooltip, selector: "db-tooltip", inputs: ["id", "propOverrides", "variant", "placement", "className", "emphasis", "wrap", "animation", "delay", "width", "showArrow", "text"] }] }); }
|
|
4370
4931
|
}
|
|
4371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
4932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelect, decorators: [{
|
|
4372
4933
|
type: Component,
|
|
4373
4934
|
args: [{ providers: [{
|
|
4374
4935
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -4599,12 +5160,32 @@ const CustomSelectDropdownWidthList = ['fixed', 'auto', 'full'];
|
|
|
4599
5160
|
|
|
4600
5161
|
const defaultProps$s = {};
|
|
4601
5162
|
class DBCustomSelectFormField {
|
|
5163
|
+
setupObserver(element) {
|
|
5164
|
+
if (!element)
|
|
5165
|
+
return;
|
|
5166
|
+
const parent = element.closest("db-custom-select-form-field");
|
|
5167
|
+
if (!parent || this.observer())
|
|
5168
|
+
return;
|
|
5169
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
5170
|
+
if (mutations.some((mutation) => {
|
|
5171
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
5172
|
+
return attr?.value !== mutation.oldValue;
|
|
5173
|
+
})) {
|
|
5174
|
+
this.enableAttributePassing(element, "db-custom-select-form-field");
|
|
5175
|
+
}
|
|
5176
|
+
}));
|
|
5177
|
+
this.observer().observe(parent, {
|
|
5178
|
+
attributes: true,
|
|
5179
|
+
attributeOldValue: true,
|
|
5180
|
+
});
|
|
5181
|
+
}
|
|
4602
5182
|
constructor() {
|
|
4603
5183
|
this.cls = cls;
|
|
4604
5184
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
4605
5185
|
this.propOverrides = input(...(ngDevMode ? [undefined, { debugName: "propOverrides" }] : /* istanbul ignore next */ []));
|
|
4606
5186
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
4607
5187
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
5188
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
4608
5189
|
}
|
|
4609
5190
|
/**
|
|
4610
5191
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -4619,10 +5200,15 @@ class DBCustomSelectFormField {
|
|
|
4619
5200
|
const attr = attributes.item(i);
|
|
4620
5201
|
if (attr && attr.name !== 'data-density' &&
|
|
4621
5202
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
4622
|
-
|
|
5203
|
+
if (attr.value) {
|
|
5204
|
+
element.setAttribute(attr.name, attr.value);
|
|
5205
|
+
}
|
|
5206
|
+
else {
|
|
5207
|
+
element.removeAttribute(attr.name);
|
|
5208
|
+
}
|
|
4623
5209
|
parent.removeAttribute(attr.name);
|
|
4624
5210
|
}
|
|
4625
|
-
else if (attr &&
|
|
5211
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
4626
5212
|
element.setAttribute(attr.name, attr.value);
|
|
4627
5213
|
parent.removeAttribute(attr.name);
|
|
4628
5214
|
}
|
|
@@ -4630,7 +5216,7 @@ class DBCustomSelectFormField {
|
|
|
4630
5216
|
const isWebComponent = attr.value.includes("hydrated");
|
|
4631
5217
|
const value = attr.value.replace("hydrated", "").trim();
|
|
4632
5218
|
const currentClass = element.getAttribute("class");
|
|
4633
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
5219
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
4634
5220
|
if (isWebComponent) {
|
|
4635
5221
|
// Stencil is using this class for lazy loading component
|
|
4636
5222
|
parent.setAttribute("class", "hydrated");
|
|
@@ -4645,9 +5231,15 @@ class DBCustomSelectFormField {
|
|
|
4645
5231
|
ngAfterViewInit() {
|
|
4646
5232
|
const element = this._ref()?.nativeElement;
|
|
4647
5233
|
this.enableAttributePassing(element, "db-custom-select-form-field");
|
|
5234
|
+
if (typeof window !== "undefined") {
|
|
5235
|
+
this.setupObserver(element);
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
ngOnDestroy() {
|
|
5239
|
+
this.observer()?.disconnect();
|
|
4648
5240
|
}
|
|
4649
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
4650
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
5241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectFormField, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBCustomSelectFormField, isStandalone: true, selector: "db-custom-select-form-field", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<summary
|
|
4651
5243
|
#_ref
|
|
4652
5244
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
4653
5245
|
[class]="cls('db-custom-select-form-field', className())"
|
|
@@ -4655,7 +5247,7 @@ class DBCustomSelectFormField {
|
|
|
4655
5247
|
<ng-content></ng-content>
|
|
4656
5248
|
</summary> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
4657
5249
|
}
|
|
4658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBCustomSelectFormField, decorators: [{
|
|
4659
5251
|
type: Component,
|
|
4660
5252
|
args: [{ selector: "db-custom-select-form-field", standalone: true, imports: [CommonModule], template: `<summary
|
|
4661
5253
|
#_ref
|
|
@@ -4672,6 +5264,25 @@ const SelectedTypeList = ['amount', 'text', 'tag'];
|
|
|
4672
5264
|
|
|
4673
5265
|
const defaultProps$r = {};
|
|
4674
5266
|
class DBDivider {
|
|
5267
|
+
setupObserver(element) {
|
|
5268
|
+
if (!element)
|
|
5269
|
+
return;
|
|
5270
|
+
const parent = element.closest("db-divider");
|
|
5271
|
+
if (!parent || this.observer())
|
|
5272
|
+
return;
|
|
5273
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
5274
|
+
if (mutations.some((mutation) => {
|
|
5275
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
5276
|
+
return attr?.value !== mutation.oldValue;
|
|
5277
|
+
})) {
|
|
5278
|
+
this.enableAttributePassing(element, "db-divider");
|
|
5279
|
+
}
|
|
5280
|
+
}));
|
|
5281
|
+
this.observer().observe(parent, {
|
|
5282
|
+
attributes: true,
|
|
5283
|
+
attributeOldValue: true,
|
|
5284
|
+
});
|
|
5285
|
+
}
|
|
4675
5286
|
constructor() {
|
|
4676
5287
|
this.cls = cls;
|
|
4677
5288
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -4682,6 +5293,7 @@ class DBDivider {
|
|
|
4682
5293
|
this.width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
4683
5294
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
4684
5295
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
5296
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
4685
5297
|
}
|
|
4686
5298
|
/**
|
|
4687
5299
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -4696,10 +5308,15 @@ class DBDivider {
|
|
|
4696
5308
|
const attr = attributes.item(i);
|
|
4697
5309
|
if (attr && attr.name !== 'data-density' &&
|
|
4698
5310
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
4699
|
-
|
|
5311
|
+
if (attr.value) {
|
|
5312
|
+
element.setAttribute(attr.name, attr.value);
|
|
5313
|
+
}
|
|
5314
|
+
else {
|
|
5315
|
+
element.removeAttribute(attr.name);
|
|
5316
|
+
}
|
|
4700
5317
|
parent.removeAttribute(attr.name);
|
|
4701
5318
|
}
|
|
4702
|
-
else if (attr &&
|
|
5319
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
4703
5320
|
element.setAttribute(attr.name, attr.value);
|
|
4704
5321
|
parent.removeAttribute(attr.name);
|
|
4705
5322
|
}
|
|
@@ -4707,7 +5324,7 @@ class DBDivider {
|
|
|
4707
5324
|
const isWebComponent = attr.value.includes("hydrated");
|
|
4708
5325
|
const value = attr.value.replace("hydrated", "").trim();
|
|
4709
5326
|
const currentClass = element.getAttribute("class");
|
|
4710
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
5327
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
4711
5328
|
if (isWebComponent) {
|
|
4712
5329
|
// Stencil is using this class for lazy loading component
|
|
4713
5330
|
parent.setAttribute("class", "hydrated");
|
|
@@ -4722,9 +5339,15 @@ class DBDivider {
|
|
|
4722
5339
|
ngAfterViewInit() {
|
|
4723
5340
|
const element = this._ref()?.nativeElement;
|
|
4724
5341
|
this.enableAttributePassing(element, "db-divider");
|
|
5342
|
+
if (typeof window !== "undefined") {
|
|
5343
|
+
this.setupObserver(element);
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
ngOnDestroy() {
|
|
5347
|
+
this.observer()?.disconnect();
|
|
4725
5348
|
}
|
|
4726
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
4727
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
5349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBDivider, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5350
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBDivider, isStandalone: true, selector: "db-divider", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, margin: { classPropertyName: "margin", publicName: "margin", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, emphasis: { classPropertyName: "emphasis", publicName: "emphasis", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
4728
5351
|
#_ref
|
|
4729
5352
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
4730
5353
|
[attr.data-margin]="margin()"
|
|
@@ -4734,7 +5357,7 @@ class DBDivider {
|
|
|
4734
5357
|
[class]="cls('db-divider', className())"
|
|
4735
5358
|
></div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
4736
5359
|
}
|
|
4737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBDivider, decorators: [{
|
|
4738
5361
|
type: Component,
|
|
4739
5362
|
args: [{ selector: "db-divider", standalone: true, imports: [CommonModule], template: `<div
|
|
4740
5363
|
#_ref
|
|
@@ -4810,6 +5433,25 @@ class DBDrawer {
|
|
|
4810
5433
|
}
|
|
4811
5434
|
}
|
|
4812
5435
|
}
|
|
5436
|
+
setupObserver(element) {
|
|
5437
|
+
if (!element)
|
|
5438
|
+
return;
|
|
5439
|
+
const parent = element.closest("db-drawer");
|
|
5440
|
+
if (!parent || this.observer())
|
|
5441
|
+
return;
|
|
5442
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
5443
|
+
if (mutations.some((mutation) => {
|
|
5444
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
5445
|
+
return attr?.value !== mutation.oldValue;
|
|
5446
|
+
})) {
|
|
5447
|
+
this.enableAttributePassing(element, "db-drawer");
|
|
5448
|
+
}
|
|
5449
|
+
}));
|
|
5450
|
+
this.observer().observe(parent, {
|
|
5451
|
+
attributes: true,
|
|
5452
|
+
attributeOldValue: true,
|
|
5453
|
+
});
|
|
5454
|
+
}
|
|
4813
5455
|
constructor() {
|
|
4814
5456
|
this.cls = cls;
|
|
4815
5457
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -4831,6 +5473,7 @@ class DBDrawer {
|
|
|
4831
5473
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
4832
5474
|
this.dialogContainerRef = viewChild("dialogContainerRef", ...(ngDevMode ? [{ debugName: "dialogContainerRef" }] : /* istanbul ignore next */ []));
|
|
4833
5475
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
5476
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
4834
5477
|
if (typeof window !== "undefined") {
|
|
4835
5478
|
effect(() => {
|
|
4836
5479
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -4873,10 +5516,15 @@ class DBDrawer {
|
|
|
4873
5516
|
const attr = attributes.item(i);
|
|
4874
5517
|
if (attr && attr.name !== 'data-density' &&
|
|
4875
5518
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
4876
|
-
|
|
5519
|
+
if (attr.value) {
|
|
5520
|
+
element.setAttribute(attr.name, attr.value);
|
|
5521
|
+
}
|
|
5522
|
+
else {
|
|
5523
|
+
element.removeAttribute(attr.name);
|
|
5524
|
+
}
|
|
4877
5525
|
parent.removeAttribute(attr.name);
|
|
4878
5526
|
}
|
|
4879
|
-
else if (attr &&
|
|
5527
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
4880
5528
|
element.setAttribute(attr.name, attr.value);
|
|
4881
5529
|
parent.removeAttribute(attr.name);
|
|
4882
5530
|
}
|
|
@@ -4884,7 +5532,7 @@ class DBDrawer {
|
|
|
4884
5532
|
const isWebComponent = attr.value.includes("hydrated");
|
|
4885
5533
|
const value = attr.value.replace("hydrated", "").trim();
|
|
4886
5534
|
const currentClass = element.getAttribute("class");
|
|
4887
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
5535
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
4888
5536
|
if (isWebComponent) {
|
|
4889
5537
|
// Stencil is using this class for lazy loading component
|
|
4890
5538
|
parent.setAttribute("class", "hydrated");
|
|
@@ -4902,10 +5550,14 @@ class DBDrawer {
|
|
|
4902
5550
|
if (typeof window !== "undefined") {
|
|
4903
5551
|
this.handleDialogOpen();
|
|
4904
5552
|
this.initialized.set(true);
|
|
5553
|
+
this.setupObserver(element);
|
|
4905
5554
|
}
|
|
4906
5555
|
}
|
|
4907
|
-
|
|
4908
|
-
|
|
5556
|
+
ngOnDestroy() {
|
|
5557
|
+
this.observer()?.disconnect();
|
|
5558
|
+
}
|
|
5559
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5560
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBDrawer, isStandalone: true, selector: "db-drawer", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, closeButtonId: { classPropertyName: "closeButtonId", publicName: "closeButtonId", isSignal: true, isRequired: false, transformFunction: null }, closeButtonText: { classPropertyName: "closeButtonText", publicName: "closeButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }, { propertyName: "dialogContainerRef", first: true, predicate: ["dialogContainerRef"], descendants: true, isSignal: true }], ngImport: i0, template: `<dialog
|
|
4909
5561
|
class="db-drawer"
|
|
4910
5562
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
4911
5563
|
#_ref
|
|
@@ -4942,7 +5594,7 @@ class DBDrawer {
|
|
|
4942
5594
|
</article>
|
|
4943
5595
|
</dialog> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }] }); }
|
|
4944
5596
|
}
|
|
4945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5597
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBDrawer, decorators: [{
|
|
4946
5598
|
type: Component,
|
|
4947
5599
|
args: [{ selector: "db-drawer", standalone: true, imports: [CommonModule, DBButton], template: `<dialog
|
|
4948
5600
|
class="db-drawer"
|
|
@@ -5121,10 +5773,10 @@ var navigation = {
|
|
|
5121
5773
|
|
|
5122
5774
|
/* Angular cannot handle multiple slots with the same name, we need to use Directives for this. */
|
|
5123
5775
|
class SecondaryActionDirective {
|
|
5124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
5125
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
5776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SecondaryActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5777
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: SecondaryActionDirective, isStandalone: true, selector: "[dbSecondaryAction]", ngImport: i0 }); }
|
|
5126
5778
|
}
|
|
5127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SecondaryActionDirective, decorators: [{
|
|
5128
5780
|
type: Directive,
|
|
5129
5781
|
args: [{
|
|
5130
5782
|
selector: '[dbSecondaryAction]',
|
|
@@ -5134,10 +5786,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
5134
5786
|
|
|
5135
5787
|
/* Angular cannot handle multiple slots with the same name, we need to use Directives for this. */
|
|
5136
5788
|
class MetaNavigationDirective {
|
|
5137
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
5138
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
5789
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MetaNavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5790
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: MetaNavigationDirective, isStandalone: true, selector: "[dbMetaNavigation]", ngImport: i0 }); }
|
|
5139
5791
|
}
|
|
5140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: MetaNavigationDirective, decorators: [{
|
|
5141
5793
|
type: Directive,
|
|
5142
5794
|
args: [{
|
|
5143
5795
|
selector: '[dbMetaNavigation]',
|
|
@@ -5147,10 +5799,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
5147
5799
|
|
|
5148
5800
|
/* Angular cannot handle multiple slots with the same name, we need to use Directives for this. */
|
|
5149
5801
|
class NavigationDirective {
|
|
5150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
5151
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
5802
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5803
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: NavigationDirective, isStandalone: true, selector: "[dbNavigation]", ngImport: i0 }); }
|
|
5152
5804
|
}
|
|
5153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
5805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationDirective, decorators: [{
|
|
5154
5806
|
type: Directive,
|
|
5155
5807
|
args: [{
|
|
5156
5808
|
selector: '[dbNavigation]',
|
|
@@ -5174,9 +5826,28 @@ class DBHeader {
|
|
|
5174
5826
|
this.handleToggle();
|
|
5175
5827
|
}
|
|
5176
5828
|
}
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5829
|
+
setupObserver(element) {
|
|
5830
|
+
if (!element)
|
|
5831
|
+
return;
|
|
5832
|
+
const parent = element.closest("db-header");
|
|
5833
|
+
if (!parent || this.observer())
|
|
5834
|
+
return;
|
|
5835
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
5836
|
+
if (mutations.some((mutation) => {
|
|
5837
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
5838
|
+
return attr?.value !== mutation.oldValue;
|
|
5839
|
+
})) {
|
|
5840
|
+
this.enableAttributePassing(element, "db-header");
|
|
5841
|
+
}
|
|
5842
|
+
}));
|
|
5843
|
+
this.observer().observe(parent, {
|
|
5844
|
+
attributes: true,
|
|
5845
|
+
attributeOldValue: true,
|
|
5846
|
+
});
|
|
5847
|
+
}
|
|
5848
|
+
constructor() {
|
|
5849
|
+
this.cls = cls;
|
|
5850
|
+
this.DEFAULT_BURGER_MENU = DEFAULT_BURGER_MENU;
|
|
5180
5851
|
this.getBoolean = getBoolean;
|
|
5181
5852
|
this.forceMobile = input(...(ngDevMode ? [undefined, { debugName: "forceMobile" }] : /* istanbul ignore next */ []));
|
|
5182
5853
|
this.drawerOpen = input(...(ngDevMode ? [undefined, { debugName: "drawerOpen" }] : /* istanbul ignore next */ []));
|
|
@@ -5191,6 +5862,7 @@ class DBHeader {
|
|
|
5191
5862
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
5192
5863
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
5193
5864
|
this.forcedToMobile = signal(false, ...(ngDevMode ? [{ debugName: "forcedToMobile" }] : /* istanbul ignore next */ []));
|
|
5865
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5194
5866
|
if (typeof window !== "undefined") {
|
|
5195
5867
|
effect(() => {
|
|
5196
5868
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -5226,10 +5898,15 @@ class DBHeader {
|
|
|
5226
5898
|
const attr = attributes.item(i);
|
|
5227
5899
|
if (attr && attr.name !== 'data-density' &&
|
|
5228
5900
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5229
|
-
|
|
5901
|
+
if (attr.value) {
|
|
5902
|
+
element.setAttribute(attr.name, attr.value);
|
|
5903
|
+
}
|
|
5904
|
+
else {
|
|
5905
|
+
element.removeAttribute(attr.name);
|
|
5906
|
+
}
|
|
5230
5907
|
parent.removeAttribute(attr.name);
|
|
5231
5908
|
}
|
|
5232
|
-
else if (attr &&
|
|
5909
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5233
5910
|
element.setAttribute(attr.name, attr.value);
|
|
5234
5911
|
parent.removeAttribute(attr.name);
|
|
5235
5912
|
}
|
|
@@ -5237,7 +5914,7 @@ class DBHeader {
|
|
|
5237
5914
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5238
5915
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5239
5916
|
const currentClass = element.getAttribute("class");
|
|
5240
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
5917
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5241
5918
|
if (isWebComponent) {
|
|
5242
5919
|
// Stencil is using this class for lazy loading component
|
|
5243
5920
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5254,10 +5931,14 @@ class DBHeader {
|
|
|
5254
5931
|
this.enableAttributePassing(element, "db-header");
|
|
5255
5932
|
if (typeof window !== "undefined") {
|
|
5256
5933
|
this.initialized.set(true);
|
|
5934
|
+
this.setupObserver(element);
|
|
5257
5935
|
}
|
|
5258
5936
|
}
|
|
5259
|
-
|
|
5260
|
-
|
|
5937
|
+
ngOnDestroy() {
|
|
5938
|
+
this.observer()?.disconnect();
|
|
5939
|
+
}
|
|
5940
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5941
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBHeader, isStandalone: true, selector: "db-header", inputs: { forceMobile: { classPropertyName: "forceMobile", publicName: "forceMobile", isSignal: true, isRequired: false, transformFunction: null }, drawerOpen: { classPropertyName: "drawerOpen", publicName: "drawerOpen", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, burgerMenuLabel: { classPropertyName: "burgerMenuLabel", publicName: "burgerMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, closeButtonId: { classPropertyName: "closeButtonId", publicName: "closeButtonId", isSignal: true, isRequired: false, transformFunction: null }, closeButtonText: { classPropertyName: "closeButtonText", publicName: "closeButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, queries: [{ propertyName: "dbNavigation", first: true, predicate: NavigationDirective, descendants: true, read: TemplateRef }, { propertyName: "dbMetaNavigation", first: true, predicate: MetaNavigationDirective, descendants: true, read: TemplateRef }, { propertyName: "dbSecondaryAction", first: true, predicate: SecondaryActionDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<header
|
|
5261
5942
|
#_ref
|
|
5262
5943
|
[class]="cls('db-header', className())"
|
|
5263
5944
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
@@ -5316,7 +5997,7 @@ class DBHeader {
|
|
|
5316
5997
|
></db-drawer>
|
|
5317
5998
|
</header> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }, { kind: "component", type: DBDrawer, selector: "db-drawer", inputs: ["open", "position", "backdrop", "variant", "id", "propOverrides", "direction", "className", "spacing", "width", "rounded", "closeButtonId", "closeButtonText"], outputs: ["close"] }] }); }
|
|
5318
5999
|
}
|
|
5319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBHeader, decorators: [{
|
|
5320
6001
|
type: Component,
|
|
5321
6002
|
args: [{ selector: "db-header", standalone: true, imports: [CommonModule, DBButton, DBDrawer], template: `<header
|
|
5322
6003
|
#_ref
|
|
@@ -5389,6 +6070,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
5389
6070
|
|
|
5390
6071
|
const defaultProps$o = {};
|
|
5391
6072
|
class DBIcon {
|
|
6073
|
+
setupObserver(element) {
|
|
6074
|
+
if (!element)
|
|
6075
|
+
return;
|
|
6076
|
+
const parent = element.closest("db-icon");
|
|
6077
|
+
if (!parent || this.observer())
|
|
6078
|
+
return;
|
|
6079
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6080
|
+
if (mutations.some((mutation) => {
|
|
6081
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6082
|
+
return attr?.value !== mutation.oldValue;
|
|
6083
|
+
})) {
|
|
6084
|
+
this.enableAttributePassing(element, "db-icon");
|
|
6085
|
+
}
|
|
6086
|
+
}));
|
|
6087
|
+
this.observer().observe(parent, {
|
|
6088
|
+
attributes: true,
|
|
6089
|
+
attributeOldValue: true,
|
|
6090
|
+
});
|
|
6091
|
+
}
|
|
5392
6092
|
constructor() {
|
|
5393
6093
|
this.cls = cls;
|
|
5394
6094
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -5399,6 +6099,7 @@ class DBIcon {
|
|
|
5399
6099
|
this.variant = input(...(ngDevMode ? [undefined, { debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
5400
6100
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
5401
6101
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
6102
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5402
6103
|
}
|
|
5403
6104
|
/**
|
|
5404
6105
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -5413,10 +6114,15 @@ class DBIcon {
|
|
|
5413
6114
|
const attr = attributes.item(i);
|
|
5414
6115
|
if (attr && attr.name !== 'data-density' &&
|
|
5415
6116
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5416
|
-
|
|
6117
|
+
if (attr.value) {
|
|
6118
|
+
element.setAttribute(attr.name, attr.value);
|
|
6119
|
+
}
|
|
6120
|
+
else {
|
|
6121
|
+
element.removeAttribute(attr.name);
|
|
6122
|
+
}
|
|
5417
6123
|
parent.removeAttribute(attr.name);
|
|
5418
6124
|
}
|
|
5419
|
-
else if (attr &&
|
|
6125
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5420
6126
|
element.setAttribute(attr.name, attr.value);
|
|
5421
6127
|
parent.removeAttribute(attr.name);
|
|
5422
6128
|
}
|
|
@@ -5424,7 +6130,7 @@ class DBIcon {
|
|
|
5424
6130
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5425
6131
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5426
6132
|
const currentClass = element.getAttribute("class");
|
|
5427
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6133
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5428
6134
|
if (isWebComponent) {
|
|
5429
6135
|
// Stencil is using this class for lazy loading component
|
|
5430
6136
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5439,9 +6145,15 @@ class DBIcon {
|
|
|
5439
6145
|
ngAfterViewInit() {
|
|
5440
6146
|
const element = this._ref()?.nativeElement;
|
|
5441
6147
|
this.enableAttributePassing(element, "db-icon");
|
|
6148
|
+
if (typeof window !== "undefined") {
|
|
6149
|
+
this.setupObserver(element);
|
|
6150
|
+
}
|
|
5442
6151
|
}
|
|
5443
|
-
|
|
5444
|
-
|
|
6152
|
+
ngOnDestroy() {
|
|
6153
|
+
this.observer()?.disconnect();
|
|
6154
|
+
}
|
|
6155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBIcon, isStandalone: true, selector: "db-icon", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, weight: { classPropertyName: "weight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<span
|
|
5445
6157
|
aria-hidden="true"
|
|
5446
6158
|
#_ref
|
|
5447
6159
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
@@ -5452,7 +6164,7 @@ class DBIcon {
|
|
|
5452
6164
|
>@if(text()){{{text()}}} <ng-content></ng-content
|
|
5453
6165
|
></span> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
5454
6166
|
}
|
|
5455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBIcon, decorators: [{
|
|
5456
6168
|
type: Component,
|
|
5457
6169
|
args: [{ selector: "db-icon", standalone: true, imports: [CommonModule], template: `<span
|
|
5458
6170
|
aria-hidden="true"
|
|
@@ -5476,6 +6188,25 @@ const InputTypeList = ['color', 'date', 'datetime-local', 'email', 'file',
|
|
|
5476
6188
|
|
|
5477
6189
|
const defaultProps$n = {};
|
|
5478
6190
|
class DBLink {
|
|
6191
|
+
setupObserver(element) {
|
|
6192
|
+
if (!element)
|
|
6193
|
+
return;
|
|
6194
|
+
const parent = element.closest("db-link");
|
|
6195
|
+
if (!parent || this.observer())
|
|
6196
|
+
return;
|
|
6197
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6198
|
+
if (mutations.some((mutation) => {
|
|
6199
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6200
|
+
return attr?.value !== mutation.oldValue;
|
|
6201
|
+
})) {
|
|
6202
|
+
this.enableAttributePassing(element, "db-link");
|
|
6203
|
+
}
|
|
6204
|
+
}));
|
|
6205
|
+
this.observer().observe(parent, {
|
|
6206
|
+
attributes: true,
|
|
6207
|
+
attributeOldValue: true,
|
|
6208
|
+
});
|
|
6209
|
+
}
|
|
5479
6210
|
constructor() {
|
|
5480
6211
|
this.cls = cls;
|
|
5481
6212
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -5497,6 +6228,7 @@ class DBLink {
|
|
|
5497
6228
|
this.wrap = input(...(ngDevMode ? [undefined, { debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
5498
6229
|
this.text = input(...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
|
|
5499
6230
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
6231
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5500
6232
|
}
|
|
5501
6233
|
/**
|
|
5502
6234
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -5511,10 +6243,15 @@ class DBLink {
|
|
|
5511
6243
|
const attr = attributes.item(i);
|
|
5512
6244
|
if (attr && attr.name !== 'data-density' &&
|
|
5513
6245
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5514
|
-
|
|
6246
|
+
if (attr.value) {
|
|
6247
|
+
element.setAttribute(attr.name, attr.value);
|
|
6248
|
+
}
|
|
6249
|
+
else {
|
|
6250
|
+
element.removeAttribute(attr.name);
|
|
6251
|
+
}
|
|
5515
6252
|
parent.removeAttribute(attr.name);
|
|
5516
6253
|
}
|
|
5517
|
-
else if (attr &&
|
|
6254
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5518
6255
|
element.setAttribute(attr.name, attr.value);
|
|
5519
6256
|
parent.removeAttribute(attr.name);
|
|
5520
6257
|
}
|
|
@@ -5522,7 +6259,7 @@ class DBLink {
|
|
|
5522
6259
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5523
6260
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5524
6261
|
const currentClass = element.getAttribute("class");
|
|
5525
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6262
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5526
6263
|
if (isWebComponent) {
|
|
5527
6264
|
// Stencil is using this class for lazy loading component
|
|
5528
6265
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5537,9 +6274,15 @@ class DBLink {
|
|
|
5537
6274
|
ngAfterViewInit() {
|
|
5538
6275
|
const element = this._ref()?.nativeElement;
|
|
5539
6276
|
this.enableAttributePassing(element, "db-link");
|
|
6277
|
+
if (typeof window !== "undefined") {
|
|
6278
|
+
this.setupObserver(element);
|
|
6279
|
+
}
|
|
5540
6280
|
}
|
|
5541
|
-
|
|
5542
|
-
|
|
6281
|
+
ngOnDestroy() {
|
|
6282
|
+
this.observer()?.disconnect();
|
|
6283
|
+
}
|
|
6284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBLink, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6285
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBLink, isStandalone: true, selector: "db-link", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, referrerpolicy: { classPropertyName: "referrerpolicy", publicName: "referrerpolicy", isSignal: true, isRequired: false, transformFunction: null }, referrerPolicy: { classPropertyName: "referrerPolicy", publicName: "referrerPolicy", isSignal: true, isRequired: false, transformFunction: null }, hreflang: { classPropertyName: "hreflang", publicName: "hreflang", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<a
|
|
5543
6286
|
#_ref
|
|
5544
6287
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
5545
6288
|
[class]="cls('db-link', className())"
|
|
@@ -5559,7 +6302,7 @@ class DBLink {
|
|
|
5559
6302
|
>@if(text()){{{text()}}} <ng-content></ng-content
|
|
5560
6303
|
></a> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
5561
6304
|
}
|
|
5562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBLink, decorators: [{
|
|
5563
6306
|
type: Component,
|
|
5564
6307
|
args: [{ selector: "db-link", standalone: true, imports: [CommonModule], template: `<a
|
|
5565
6308
|
#_ref
|
|
@@ -5588,12 +6331,32 @@ const LinkContentList = ['external', 'internal'];
|
|
|
5588
6331
|
|
|
5589
6332
|
const defaultProps$m = {};
|
|
5590
6333
|
class DBNavigation {
|
|
6334
|
+
setupObserver(element) {
|
|
6335
|
+
if (!element)
|
|
6336
|
+
return;
|
|
6337
|
+
const parent = element.closest("db-navigation");
|
|
6338
|
+
if (!parent || this.observer())
|
|
6339
|
+
return;
|
|
6340
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6341
|
+
if (mutations.some((mutation) => {
|
|
6342
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6343
|
+
return attr?.value !== mutation.oldValue;
|
|
6344
|
+
})) {
|
|
6345
|
+
this.enableAttributePassing(element, "db-navigation");
|
|
6346
|
+
}
|
|
6347
|
+
}));
|
|
6348
|
+
this.observer().observe(parent, {
|
|
6349
|
+
attributes: true,
|
|
6350
|
+
attributeOldValue: true,
|
|
6351
|
+
});
|
|
6352
|
+
}
|
|
5591
6353
|
constructor() {
|
|
5592
6354
|
this.cls = cls;
|
|
5593
6355
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
5594
6356
|
this.propOverrides = input(...(ngDevMode ? [undefined, { debugName: "propOverrides" }] : /* istanbul ignore next */ []));
|
|
5595
6357
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
5596
6358
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
6359
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5597
6360
|
}
|
|
5598
6361
|
/**
|
|
5599
6362
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -5608,10 +6371,15 @@ class DBNavigation {
|
|
|
5608
6371
|
const attr = attributes.item(i);
|
|
5609
6372
|
if (attr && attr.name !== 'data-density' &&
|
|
5610
6373
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5611
|
-
|
|
6374
|
+
if (attr.value) {
|
|
6375
|
+
element.setAttribute(attr.name, attr.value);
|
|
6376
|
+
}
|
|
6377
|
+
else {
|
|
6378
|
+
element.removeAttribute(attr.name);
|
|
6379
|
+
}
|
|
5612
6380
|
parent.removeAttribute(attr.name);
|
|
5613
6381
|
}
|
|
5614
|
-
else if (attr &&
|
|
6382
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5615
6383
|
element.setAttribute(attr.name, attr.value);
|
|
5616
6384
|
parent.removeAttribute(attr.name);
|
|
5617
6385
|
}
|
|
@@ -5619,7 +6387,7 @@ class DBNavigation {
|
|
|
5619
6387
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5620
6388
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5621
6389
|
const currentClass = element.getAttribute("class");
|
|
5622
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6390
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5623
6391
|
if (isWebComponent) {
|
|
5624
6392
|
// Stencil is using this class for lazy loading component
|
|
5625
6393
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5634,9 +6402,15 @@ class DBNavigation {
|
|
|
5634
6402
|
ngAfterViewInit() {
|
|
5635
6403
|
const element = this._ref()?.nativeElement;
|
|
5636
6404
|
this.enableAttributePassing(element, "db-navigation");
|
|
6405
|
+
if (typeof window !== "undefined") {
|
|
6406
|
+
this.setupObserver(element);
|
|
6407
|
+
}
|
|
6408
|
+
}
|
|
6409
|
+
ngOnDestroy() {
|
|
6410
|
+
this.observer()?.disconnect();
|
|
5637
6411
|
}
|
|
5638
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
5639
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
6412
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNavigation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6413
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBNavigation, isStandalone: true, selector: "db-navigation", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<nav
|
|
5640
6414
|
#_ref
|
|
5641
6415
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
5642
6416
|
[class]="cls('db-navigation', className())"
|
|
@@ -5644,7 +6418,7 @@ class DBNavigation {
|
|
|
5644
6418
|
<menu><ng-content></ng-content></menu>
|
|
5645
6419
|
</nav> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
5646
6420
|
}
|
|
5647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNavigation, decorators: [{
|
|
5648
6422
|
type: Component,
|
|
5649
6423
|
args: [{ selector: "db-navigation", standalone: true, imports: [CommonModule], template: `<nav
|
|
5650
6424
|
#_ref
|
|
@@ -5657,10 +6431,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
5657
6431
|
|
|
5658
6432
|
/* Angular cannot handle multiple slots with the same name, we need to use Directives for this. */
|
|
5659
6433
|
class NavigationContentDirective {
|
|
5660
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
5661
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.
|
|
6434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6435
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: NavigationContentDirective, isStandalone: true, selector: "[dbNavigationContent]", ngImport: i0 }); }
|
|
5662
6436
|
}
|
|
5663
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationContentDirective, decorators: [{
|
|
5664
6438
|
type: Directive,
|
|
5665
6439
|
args: [{
|
|
5666
6440
|
selector: '[dbNavigationContent]',
|
|
@@ -5691,6 +6465,25 @@ class DBNavigationItem {
|
|
|
5691
6465
|
event.stopPropagation();
|
|
5692
6466
|
this.isSubNavigationExpanded.set(false);
|
|
5693
6467
|
}
|
|
6468
|
+
setupObserver(element) {
|
|
6469
|
+
if (!element)
|
|
6470
|
+
return;
|
|
6471
|
+
const parent = element.closest("db-navigation-item");
|
|
6472
|
+
if (!parent || this.observer())
|
|
6473
|
+
return;
|
|
6474
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6475
|
+
if (mutations.some((mutation) => {
|
|
6476
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6477
|
+
return attr?.value !== mutation.oldValue;
|
|
6478
|
+
})) {
|
|
6479
|
+
this.enableAttributePassing(element, "db-navigation-item");
|
|
6480
|
+
}
|
|
6481
|
+
}));
|
|
6482
|
+
this.observer().observe(parent, {
|
|
6483
|
+
attributes: true,
|
|
6484
|
+
attributeOldValue: true,
|
|
6485
|
+
});
|
|
6486
|
+
}
|
|
5694
6487
|
constructor() {
|
|
5695
6488
|
this.cls = cls;
|
|
5696
6489
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -5720,6 +6513,7 @@ class DBNavigationItem {
|
|
|
5720
6513
|
this.navigationItemSafeTriangle = signal(undefined, ...(ngDevMode ? [{ debugName: "navigationItemSafeTriangle" }] : /* istanbul ignore next */ []));
|
|
5721
6514
|
this.subNavigationId = signal(undefined, ...(ngDevMode ? [{ debugName: "subNavigationId" }] : /* istanbul ignore next */ []));
|
|
5722
6515
|
this.subNavigationToggleId = signal(undefined, ...(ngDevMode ? [{ debugName: "subNavigationToggleId" }] : /* istanbul ignore next */ []));
|
|
6516
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5723
6517
|
if (typeof window !== "undefined") {
|
|
5724
6518
|
effect(() => {
|
|
5725
6519
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -5768,10 +6562,15 @@ class DBNavigationItem {
|
|
|
5768
6562
|
const attr = attributes.item(i);
|
|
5769
6563
|
if (attr && attr.name !== 'data-density' &&
|
|
5770
6564
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5771
|
-
|
|
6565
|
+
if (attr.value) {
|
|
6566
|
+
element.setAttribute(attr.name, attr.value);
|
|
6567
|
+
}
|
|
6568
|
+
else {
|
|
6569
|
+
element.removeAttribute(attr.name);
|
|
6570
|
+
}
|
|
5772
6571
|
parent.removeAttribute(attr.name);
|
|
5773
6572
|
}
|
|
5774
|
-
else if (attr &&
|
|
6573
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5775
6574
|
element.setAttribute(attr.name, attr.value);
|
|
5776
6575
|
parent.removeAttribute(attr.name);
|
|
5777
6576
|
}
|
|
@@ -5779,7 +6578,7 @@ class DBNavigationItem {
|
|
|
5779
6578
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5780
6579
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5781
6580
|
const currentClass = element.getAttribute("class");
|
|
5782
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6581
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5783
6582
|
if (isWebComponent) {
|
|
5784
6583
|
// Stencil is using this class for lazy loading component
|
|
5785
6584
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5799,10 +6598,14 @@ class DBNavigationItem {
|
|
|
5799
6598
|
const subNavId = `sub-nav-${this.id() ?? uuid()}`;
|
|
5800
6599
|
this.subNavigationId.set(subNavId);
|
|
5801
6600
|
this.subNavigationToggleId.set(`${subNavId}-toggle`);
|
|
6601
|
+
this.setupObserver(element);
|
|
5802
6602
|
}
|
|
5803
6603
|
}
|
|
5804
|
-
|
|
5805
|
-
|
|
6604
|
+
ngOnDestroy() {
|
|
6605
|
+
this.observer()?.disconnect();
|
|
6606
|
+
}
|
|
6607
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNavigationItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6608
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBNavigationItem, isStandalone: true, selector: "db-navigation-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, subNavigationExpanded: { classPropertyName: "subNavigationExpanded", publicName: "subNavigationExpanded", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hideSubNavigation: { classPropertyName: "hideSubNavigation", publicName: "hideSubNavigation", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, backButtonId: { classPropertyName: "backButtonId", publicName: "backButtonId", isSignal: true, isRequired: false, transformFunction: null }, backButtonText: { classPropertyName: "backButtonText", publicName: "backButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { click: "click" }, queries: [{ propertyName: "dbNavigationContent", first: true, predicate: NavigationContentDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<li
|
|
5806
6609
|
#_ref
|
|
5807
6610
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
5808
6611
|
(mouseover)="navigationItemSafeTriangle()?.enableFollow()"
|
|
@@ -5855,7 +6658,7 @@ class DBNavigationItem {
|
|
|
5855
6658
|
} }
|
|
5856
6659
|
</li> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }] }); }
|
|
5857
6660
|
}
|
|
5858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNavigationItem, decorators: [{
|
|
5859
6662
|
type: Component,
|
|
5860
6663
|
args: [{ selector: "db-navigation-item", standalone: true, imports: [CommonModule, DBButton], template: `<li
|
|
5861
6664
|
#_ref
|
|
@@ -5924,6 +6727,25 @@ class DBNotification {
|
|
|
5924
6727
|
this.close.emit(event);
|
|
5925
6728
|
}
|
|
5926
6729
|
}
|
|
6730
|
+
setupObserver(element) {
|
|
6731
|
+
if (!element)
|
|
6732
|
+
return;
|
|
6733
|
+
const parent = element.closest("db-notification");
|
|
6734
|
+
if (!parent || this.observer())
|
|
6735
|
+
return;
|
|
6736
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6737
|
+
if (mutations.some((mutation) => {
|
|
6738
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6739
|
+
return attr?.value !== mutation.oldValue;
|
|
6740
|
+
})) {
|
|
6741
|
+
this.enableAttributePassing(element, "db-notification");
|
|
6742
|
+
}
|
|
6743
|
+
}));
|
|
6744
|
+
this.observer().observe(parent, {
|
|
6745
|
+
attributes: true,
|
|
6746
|
+
attributeOldValue: true,
|
|
6747
|
+
});
|
|
6748
|
+
}
|
|
5927
6749
|
constructor() {
|
|
5928
6750
|
this.cls = cls;
|
|
5929
6751
|
this.getNotificationRole = getNotificationRole;
|
|
@@ -5952,6 +6774,7 @@ class DBNotification {
|
|
|
5952
6774
|
this.closeButtonText = input(...(ngDevMode ? [undefined, { debugName: "closeButtonText" }] : /* istanbul ignore next */ []));
|
|
5953
6775
|
this.close = output();
|
|
5954
6776
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
6777
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
5955
6778
|
}
|
|
5956
6779
|
/**
|
|
5957
6780
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -5966,10 +6789,15 @@ class DBNotification {
|
|
|
5966
6789
|
const attr = attributes.item(i);
|
|
5967
6790
|
if (attr && attr.name !== 'data-density' &&
|
|
5968
6791
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
5969
|
-
|
|
6792
|
+
if (attr.value) {
|
|
6793
|
+
element.setAttribute(attr.name, attr.value);
|
|
6794
|
+
}
|
|
6795
|
+
else {
|
|
6796
|
+
element.removeAttribute(attr.name);
|
|
6797
|
+
}
|
|
5970
6798
|
parent.removeAttribute(attr.name);
|
|
5971
6799
|
}
|
|
5972
|
-
else if (attr &&
|
|
6800
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
5973
6801
|
element.setAttribute(attr.name, attr.value);
|
|
5974
6802
|
parent.removeAttribute(attr.name);
|
|
5975
6803
|
}
|
|
@@ -5977,7 +6805,7 @@ class DBNotification {
|
|
|
5977
6805
|
const isWebComponent = attr.value.includes("hydrated");
|
|
5978
6806
|
const value = attr.value.replace("hydrated", "").trim();
|
|
5979
6807
|
const currentClass = element.getAttribute("class");
|
|
5980
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6808
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
5981
6809
|
if (isWebComponent) {
|
|
5982
6810
|
// Stencil is using this class for lazy loading component
|
|
5983
6811
|
parent.setAttribute("class", "hydrated");
|
|
@@ -5992,9 +6820,15 @@ class DBNotification {
|
|
|
5992
6820
|
ngAfterViewInit() {
|
|
5993
6821
|
const element = this._ref()?.nativeElement;
|
|
5994
6822
|
this.enableAttributePassing(element, "db-notification");
|
|
6823
|
+
if (typeof window !== "undefined") {
|
|
6824
|
+
this.setupObserver(element);
|
|
6825
|
+
}
|
|
5995
6826
|
}
|
|
5996
|
-
|
|
5997
|
-
|
|
6827
|
+
ngOnDestroy() {
|
|
6828
|
+
this.observer()?.disconnect();
|
|
6829
|
+
}
|
|
6830
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNotification, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6831
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBNotification, isStandalone: true, selector: "db-notification", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, semantic: { classPropertyName: "semantic", publicName: "semantic", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLive: { classPropertyName: "ariaLive", publicName: "ariaLive", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, linkVariant: { classPropertyName: "linkVariant", publicName: "linkVariant", isSignal: true, isRequired: false, transformFunction: null }, headline: { classPropertyName: "headline", publicName: "headline", isSignal: true, isRequired: false, transformFunction: null }, showHeadline: { classPropertyName: "showHeadline", publicName: "showHeadline", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, timestamp: { classPropertyName: "timestamp", publicName: "timestamp", isSignal: true, isRequired: false, transformFunction: null }, showTimestamp: { classPropertyName: "showTimestamp", publicName: "showTimestamp", isSignal: true, isRequired: false, transformFunction: null }, timestampDatetime: { classPropertyName: "timestampDatetime", publicName: "timestampDatetime", isSignal: true, isRequired: false, transformFunction: null }, closeable: { classPropertyName: "closeable", publicName: "closeable", isSignal: true, isRequired: false, transformFunction: null }, closeButtonId: { classPropertyName: "closeButtonId", publicName: "closeButtonId", isSignal: true, isRequired: false, transformFunction: null }, closeButtonText: { classPropertyName: "closeButtonText", publicName: "closeButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
5998
6832
|
#_ref
|
|
5999
6833
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
6000
6834
|
[class]="cls('db-notification', className())"
|
|
@@ -6038,7 +6872,7 @@ class DBNotification {
|
|
|
6038
6872
|
}
|
|
6039
6873
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }] }); }
|
|
6040
6874
|
}
|
|
6041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
6875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBNotification, decorators: [{
|
|
6042
6876
|
type: Component,
|
|
6043
6877
|
args: [{ selector: "db-notification", standalone: true, imports: [CommonModule, DBButton], template: `<div
|
|
6044
6878
|
#_ref
|
|
@@ -6091,6 +6925,25 @@ const NotificationAriaLiveList = ['assertive', 'polite', 'off'];
|
|
|
6091
6925
|
|
|
6092
6926
|
const defaultProps$j = {};
|
|
6093
6927
|
class DBPage {
|
|
6928
|
+
setupObserver(element) {
|
|
6929
|
+
if (!element)
|
|
6930
|
+
return;
|
|
6931
|
+
const parent = element.closest("db-page");
|
|
6932
|
+
if (!parent || this.observer())
|
|
6933
|
+
return;
|
|
6934
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
6935
|
+
if (mutations.some((mutation) => {
|
|
6936
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
6937
|
+
return attr?.value !== mutation.oldValue;
|
|
6938
|
+
})) {
|
|
6939
|
+
this.enableAttributePassing(element, "db-page");
|
|
6940
|
+
}
|
|
6941
|
+
}));
|
|
6942
|
+
this.observer().observe(parent, {
|
|
6943
|
+
attributes: true,
|
|
6944
|
+
attributeOldValue: true,
|
|
6945
|
+
});
|
|
6946
|
+
}
|
|
6094
6947
|
constructor() {
|
|
6095
6948
|
this.cls = cls;
|
|
6096
6949
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -6103,6 +6956,7 @@ class DBPage {
|
|
|
6103
6956
|
this.mainClass = input(...(ngDevMode ? [undefined, { debugName: "mainClass" }] : /* istanbul ignore next */ []));
|
|
6104
6957
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
6105
6958
|
this.fontsLoaded = signal(false, ...(ngDevMode ? [{ debugName: "fontsLoaded" }] : /* istanbul ignore next */ []));
|
|
6959
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
6106
6960
|
}
|
|
6107
6961
|
/**
|
|
6108
6962
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -6117,10 +6971,15 @@ class DBPage {
|
|
|
6117
6971
|
const attr = attributes.item(i);
|
|
6118
6972
|
if (attr && attr.name !== 'data-density' &&
|
|
6119
6973
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
6120
|
-
|
|
6974
|
+
if (attr.value) {
|
|
6975
|
+
element.setAttribute(attr.name, attr.value);
|
|
6976
|
+
}
|
|
6977
|
+
else {
|
|
6978
|
+
element.removeAttribute(attr.name);
|
|
6979
|
+
}
|
|
6121
6980
|
parent.removeAttribute(attr.name);
|
|
6122
6981
|
}
|
|
6123
|
-
else if (attr &&
|
|
6982
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
6124
6983
|
element.setAttribute(attr.name, attr.value);
|
|
6125
6984
|
parent.removeAttribute(attr.name);
|
|
6126
6985
|
}
|
|
@@ -6128,7 +6987,7 @@ class DBPage {
|
|
|
6128
6987
|
const isWebComponent = attr.value.includes("hydrated");
|
|
6129
6988
|
const value = attr.value.replace("hydrated", "").trim();
|
|
6130
6989
|
const currentClass = element.getAttribute("class");
|
|
6131
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
6990
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
6132
6991
|
if (isWebComponent) {
|
|
6133
6992
|
// Stencil is using this class for lazy loading component
|
|
6134
6993
|
parent.setAttribute("class", "hydrated");
|
|
@@ -6163,6 +7022,7 @@ class DBPage {
|
|
|
6163
7022
|
else {
|
|
6164
7023
|
this.fontsLoaded.set(true);
|
|
6165
7024
|
}
|
|
7025
|
+
this.setupObserver(element);
|
|
6166
7026
|
}
|
|
6167
7027
|
}
|
|
6168
7028
|
ngOnDestroy() {
|
|
@@ -6171,9 +7031,10 @@ class DBPage {
|
|
|
6171
7031
|
// remove document styles set by this
|
|
6172
7032
|
document.documentElement.classList.remove("db-page-document");
|
|
6173
7033
|
}
|
|
7034
|
+
this.observer()?.disconnect();
|
|
6174
7035
|
}
|
|
6175
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
6176
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
7036
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7037
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBPage, isStandalone: true, selector: "db-page", inputs: { fadeIn: { classPropertyName: "fadeIn", publicName: "fadeIn", isSignal: true, isRequired: false, transformFunction: null }, documentOverflow: { classPropertyName: "documentOverflow", publicName: "documentOverflow", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, mainClass: { classPropertyName: "mainClass", publicName: "mainClass", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
6177
7038
|
#_ref
|
|
6178
7039
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
6179
7040
|
[class]="cls('db-page', className())"
|
|
@@ -6186,7 +7047,7 @@ class DBPage {
|
|
|
6186
7047
|
<ng-content select="[footer]"> </ng-content>
|
|
6187
7048
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
6188
7049
|
}
|
|
6189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
7050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBPage, decorators: [{
|
|
6190
7051
|
type: Component,
|
|
6191
7052
|
args: [{ selector: "db-page", standalone: true, imports: [CommonModule], template: `<div
|
|
6192
7053
|
#_ref
|
|
@@ -6276,6 +7137,25 @@ class DBPopover {
|
|
|
6276
7137
|
}
|
|
6277
7138
|
return null;
|
|
6278
7139
|
}
|
|
7140
|
+
setupObserver(element) {
|
|
7141
|
+
if (!element)
|
|
7142
|
+
return;
|
|
7143
|
+
const parent = element.closest("db-popover");
|
|
7144
|
+
if (!parent || this.observer())
|
|
7145
|
+
return;
|
|
7146
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
7147
|
+
if (mutations.some((mutation) => {
|
|
7148
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
7149
|
+
return attr?.value !== mutation.oldValue;
|
|
7150
|
+
})) {
|
|
7151
|
+
this.enableAttributePassing(element, "db-popover");
|
|
7152
|
+
}
|
|
7153
|
+
}));
|
|
7154
|
+
this.observer().observe(parent, {
|
|
7155
|
+
attributes: true,
|
|
7156
|
+
attributeOldValue: true,
|
|
7157
|
+
});
|
|
7158
|
+
}
|
|
6279
7159
|
constructor() {
|
|
6280
7160
|
this.cls = cls;
|
|
6281
7161
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -6294,6 +7174,7 @@ class DBPopover {
|
|
|
6294
7174
|
this.isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : /* istanbul ignore next */ []));
|
|
6295
7175
|
this._documentScrollListenerCallbackId = signal(undefined, ...(ngDevMode ? [{ debugName: "_documentScrollListenerCallbackId" }] : /* istanbul ignore next */ []));
|
|
6296
7176
|
this._observer = signal(undefined, ...(ngDevMode ? [{ debugName: "_observer" }] : /* istanbul ignore next */ []));
|
|
7177
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
6297
7178
|
if (typeof window !== "undefined") {
|
|
6298
7179
|
effect(() => {
|
|
6299
7180
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -6356,10 +7237,15 @@ class DBPopover {
|
|
|
6356
7237
|
const attr = attributes.item(i);
|
|
6357
7238
|
if (attr && attr.name !== 'data-density' &&
|
|
6358
7239
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
6359
|
-
|
|
7240
|
+
if (attr.value) {
|
|
7241
|
+
element.setAttribute(attr.name, attr.value);
|
|
7242
|
+
}
|
|
7243
|
+
else {
|
|
7244
|
+
element.removeAttribute(attr.name);
|
|
7245
|
+
}
|
|
6360
7246
|
parent.removeAttribute(attr.name);
|
|
6361
7247
|
}
|
|
6362
|
-
else if (attr &&
|
|
7248
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
6363
7249
|
element.setAttribute(attr.name, attr.value);
|
|
6364
7250
|
parent.removeAttribute(attr.name);
|
|
6365
7251
|
}
|
|
@@ -6367,7 +7253,7 @@ class DBPopover {
|
|
|
6367
7253
|
const isWebComponent = attr.value.includes("hydrated");
|
|
6368
7254
|
const value = attr.value.replace("hydrated", "").trim();
|
|
6369
7255
|
const currentClass = element.getAttribute("class");
|
|
6370
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
7256
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
6371
7257
|
if (isWebComponent) {
|
|
6372
7258
|
// Stencil is using this class for lazy loading component
|
|
6373
7259
|
parent.setAttribute("class", "hydrated");
|
|
@@ -6384,10 +7270,14 @@ class DBPopover {
|
|
|
6384
7270
|
this.enableAttributePassing(element, "db-popover");
|
|
6385
7271
|
if (typeof window !== "undefined") {
|
|
6386
7272
|
this.initialized.set(true);
|
|
7273
|
+
this.setupObserver(element);
|
|
6387
7274
|
}
|
|
6388
7275
|
}
|
|
6389
|
-
|
|
6390
|
-
|
|
7276
|
+
ngOnDestroy() {
|
|
7277
|
+
this.observer()?.disconnect();
|
|
7278
|
+
}
|
|
7279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7280
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBPopover, isStandalone: true, selector: "db-popover", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
6391
7281
|
#_ref
|
|
6392
7282
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
6393
7283
|
[class]="cls('db-popover', className())"
|
|
@@ -6407,7 +7297,7 @@ class DBPopover {
|
|
|
6407
7297
|
</article>
|
|
6408
7298
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
6409
7299
|
}
|
|
6410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
7300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBPopover, decorators: [{
|
|
6411
7301
|
type: Component,
|
|
6412
7302
|
args: [{ selector: "db-popover", standalone: true, imports: [CommonModule], template: `<div
|
|
6413
7303
|
#_ref
|
|
@@ -6462,6 +7352,25 @@ class DBRadio {
|
|
|
6462
7352
|
resetIds() {
|
|
6463
7353
|
this._id.set(this.id() ?? this.propOverrides()?.id ?? `radio-${uuid()}`);
|
|
6464
7354
|
}
|
|
7355
|
+
setupObserver(element) {
|
|
7356
|
+
if (!element)
|
|
7357
|
+
return;
|
|
7358
|
+
const parent = element.closest("db-radio");
|
|
7359
|
+
if (!parent || this.observer())
|
|
7360
|
+
return;
|
|
7361
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
7362
|
+
if (mutations.some((mutation) => {
|
|
7363
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
7364
|
+
return attr?.value !== mutation.oldValue;
|
|
7365
|
+
})) {
|
|
7366
|
+
this.enableAttributePassing(element, "db-radio");
|
|
7367
|
+
}
|
|
7368
|
+
}));
|
|
7369
|
+
this.observer().observe(parent, {
|
|
7370
|
+
attributes: true,
|
|
7371
|
+
attributeOldValue: true,
|
|
7372
|
+
});
|
|
7373
|
+
}
|
|
6465
7374
|
constructor(renderer) {
|
|
6466
7375
|
this.renderer = renderer;
|
|
6467
7376
|
this.getHideProp = getHideProp;
|
|
@@ -6488,6 +7397,7 @@ class DBRadio {
|
|
|
6488
7397
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
6489
7398
|
this._id = signal(undefined, ...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
6490
7399
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
7400
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
6491
7401
|
if (typeof window !== "undefined") {
|
|
6492
7402
|
effect(() => {
|
|
6493
7403
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -6562,10 +7472,15 @@ class DBRadio {
|
|
|
6562
7472
|
const attr = attributes.item(i);
|
|
6563
7473
|
if (attr && attr.name !== 'data-density' &&
|
|
6564
7474
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
6565
|
-
|
|
7475
|
+
if (attr.value) {
|
|
7476
|
+
element.setAttribute(attr.name, attr.value);
|
|
7477
|
+
}
|
|
7478
|
+
else {
|
|
7479
|
+
element.removeAttribute(attr.name);
|
|
7480
|
+
}
|
|
6566
7481
|
parent.removeAttribute(attr.name);
|
|
6567
7482
|
}
|
|
6568
|
-
else if (attr &&
|
|
7483
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
6569
7484
|
element.setAttribute(attr.name, attr.value);
|
|
6570
7485
|
parent.removeAttribute(attr.name);
|
|
6571
7486
|
}
|
|
@@ -6573,7 +7488,7 @@ class DBRadio {
|
|
|
6573
7488
|
const isWebComponent = attr.value.includes("hydrated");
|
|
6574
7489
|
const value = attr.value.replace("hydrated", "").trim();
|
|
6575
7490
|
const currentClass = element.getAttribute("class");
|
|
6576
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
7491
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
6577
7492
|
if (isWebComponent) {
|
|
6578
7493
|
// Stencil is using this class for lazy loading component
|
|
6579
7494
|
parent.setAttribute("class", "hydrated");
|
|
@@ -6608,13 +7523,15 @@ class DBRadio {
|
|
|
6608
7523
|
if (typeof window !== "undefined") {
|
|
6609
7524
|
this.initialized.set(true);
|
|
6610
7525
|
this.resetIds();
|
|
7526
|
+
this.setupObserver(element);
|
|
6611
7527
|
}
|
|
6612
7528
|
}
|
|
6613
7529
|
ngOnDestroy() {
|
|
6614
7530
|
this.abortController()?.abort();
|
|
7531
|
+
this.observer()?.disconnect();
|
|
6615
7532
|
}
|
|
6616
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
6617
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
7533
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBRadio, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7534
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBRadio, isStandalone: true, selector: "db-radio", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", value: "valueChange", input: "input", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
6618
7535
|
provide: NG_VALUE_ACCESSOR,
|
|
6619
7536
|
useExisting: DBRadio,
|
|
6620
7537
|
multi: true
|
|
@@ -6642,7 +7559,7 @@ class DBRadio {
|
|
|
6642
7559
|
@if(label()){{{label()}}} <ng-content></ng-content
|
|
6643
7560
|
></label> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
6644
7561
|
}
|
|
6645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
7562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBRadio, decorators: [{
|
|
6646
7563
|
type: Component,
|
|
6647
7564
|
args: [{ providers: [{
|
|
6648
7565
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -6675,6 +7592,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
6675
7592
|
|
|
6676
7593
|
const defaultProps$g = {};
|
|
6677
7594
|
class DBSection {
|
|
7595
|
+
setupObserver(element) {
|
|
7596
|
+
if (!element)
|
|
7597
|
+
return;
|
|
7598
|
+
const parent = element.closest("db-section");
|
|
7599
|
+
if (!parent || this.observer())
|
|
7600
|
+
return;
|
|
7601
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
7602
|
+
if (mutations.some((mutation) => {
|
|
7603
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
7604
|
+
return attr?.value !== mutation.oldValue;
|
|
7605
|
+
})) {
|
|
7606
|
+
this.enableAttributePassing(element, "db-section");
|
|
7607
|
+
}
|
|
7608
|
+
}));
|
|
7609
|
+
this.observer().observe(parent, {
|
|
7610
|
+
attributes: true,
|
|
7611
|
+
attributeOldValue: true,
|
|
7612
|
+
});
|
|
7613
|
+
}
|
|
6678
7614
|
constructor() {
|
|
6679
7615
|
this.cls = cls;
|
|
6680
7616
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
@@ -6683,6 +7619,7 @@ class DBSection {
|
|
|
6683
7619
|
this.spacing = input(...(ngDevMode ? [undefined, { debugName: "spacing" }] : /* istanbul ignore next */ []));
|
|
6684
7620
|
this.width = input(...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
6685
7621
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
7622
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
6686
7623
|
}
|
|
6687
7624
|
/**
|
|
6688
7625
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -6697,10 +7634,15 @@ class DBSection {
|
|
|
6697
7634
|
const attr = attributes.item(i);
|
|
6698
7635
|
if (attr && attr.name !== 'data-density' &&
|
|
6699
7636
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
6700
|
-
|
|
7637
|
+
if (attr.value) {
|
|
7638
|
+
element.setAttribute(attr.name, attr.value);
|
|
7639
|
+
}
|
|
7640
|
+
else {
|
|
7641
|
+
element.removeAttribute(attr.name);
|
|
7642
|
+
}
|
|
6701
7643
|
parent.removeAttribute(attr.name);
|
|
6702
7644
|
}
|
|
6703
|
-
else if (attr &&
|
|
7645
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
6704
7646
|
element.setAttribute(attr.name, attr.value);
|
|
6705
7647
|
parent.removeAttribute(attr.name);
|
|
6706
7648
|
}
|
|
@@ -6708,7 +7650,7 @@ class DBSection {
|
|
|
6708
7650
|
const isWebComponent = attr.value.includes("hydrated");
|
|
6709
7651
|
const value = attr.value.replace("hydrated", "").trim();
|
|
6710
7652
|
const currentClass = element.getAttribute("class");
|
|
6711
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
7653
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
6712
7654
|
if (isWebComponent) {
|
|
6713
7655
|
// Stencil is using this class for lazy loading component
|
|
6714
7656
|
parent.setAttribute("class", "hydrated");
|
|
@@ -6723,9 +7665,15 @@ class DBSection {
|
|
|
6723
7665
|
ngAfterViewInit() {
|
|
6724
7666
|
const element = this._ref()?.nativeElement;
|
|
6725
7667
|
this.enableAttributePassing(element, "db-section");
|
|
7668
|
+
if (typeof window !== "undefined") {
|
|
7669
|
+
this.setupObserver(element);
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
ngOnDestroy() {
|
|
7673
|
+
this.observer()?.disconnect();
|
|
6726
7674
|
}
|
|
6727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
6728
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
7675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSection, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7676
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBSection, isStandalone: true, selector: "db-section", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<section
|
|
6729
7677
|
#_ref
|
|
6730
7678
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
6731
7679
|
[class]="cls('db-section', className())"
|
|
@@ -6735,7 +7683,7 @@ class DBSection {
|
|
|
6735
7683
|
<ng-content></ng-content>
|
|
6736
7684
|
</section> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
6737
7685
|
}
|
|
6738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
7686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSection, decorators: [{
|
|
6739
7687
|
type: Component,
|
|
6740
7688
|
args: [{ selector: "db-section", standalone: true, imports: [CommonModule], template: `<section
|
|
6741
7689
|
#_ref
|
|
@@ -6763,7 +7711,7 @@ class DBSelect {
|
|
|
6763
7711
|
DEFAULT_INVALID_MESSAGE);
|
|
6764
7712
|
if (hasVoiceOver()) {
|
|
6765
7713
|
this._voiceOverFallback.set(this._invalidMessage());
|
|
6766
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
7714
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
6767
7715
|
}
|
|
6768
7716
|
}
|
|
6769
7717
|
else if (this.hasValidState() &&
|
|
@@ -6772,7 +7720,7 @@ class DBSelect {
|
|
|
6772
7720
|
this._descByIds.set(this._validMessageId());
|
|
6773
7721
|
if (hasVoiceOver()) {
|
|
6774
7722
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
6775
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
7723
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
6776
7724
|
}
|
|
6777
7725
|
}
|
|
6778
7726
|
else if (stringPropVisible(this.message(), this.showMessage())) {
|
|
@@ -6841,6 +7789,25 @@ class DBSelect {
|
|
|
6841
7789
|
this._invalidMessageId.set(mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX);
|
|
6842
7790
|
this._placeholderId.set(mId + DEFAULT_PLACEHOLDER_ID_SUFFIX);
|
|
6843
7791
|
}
|
|
7792
|
+
setupObserver(element) {
|
|
7793
|
+
if (!element)
|
|
7794
|
+
return;
|
|
7795
|
+
const parent = element.closest("db-select");
|
|
7796
|
+
if (!parent || this.observer())
|
|
7797
|
+
return;
|
|
7798
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
7799
|
+
if (mutations.some((mutation) => {
|
|
7800
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
7801
|
+
return attr?.value !== mutation.oldValue;
|
|
7802
|
+
})) {
|
|
7803
|
+
this.enableAttributePassing(element, "db-select");
|
|
7804
|
+
}
|
|
7805
|
+
}));
|
|
7806
|
+
this.observer().observe(parent, {
|
|
7807
|
+
attributes: true,
|
|
7808
|
+
attributeOldValue: true,
|
|
7809
|
+
});
|
|
7810
|
+
}
|
|
6844
7811
|
trackByOptgroupOption0(_, optgroupOption) {
|
|
6845
7812
|
return getOptionKey(optgroupOption, "select-optgroup-option-");
|
|
6846
7813
|
}
|
|
@@ -6897,6 +7864,7 @@ class DBSelect {
|
|
|
6897
7864
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
6898
7865
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : /* istanbul ignore next */ []));
|
|
6899
7866
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
7867
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
6900
7868
|
if (typeof window !== "undefined") {
|
|
6901
7869
|
effect(() => {
|
|
6902
7870
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -6994,10 +7962,15 @@ class DBSelect {
|
|
|
6994
7962
|
const attr = attributes.item(i);
|
|
6995
7963
|
if (attr && attr.name !== 'data-density' &&
|
|
6996
7964
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
6997
|
-
|
|
7965
|
+
if (attr.value) {
|
|
7966
|
+
element.setAttribute(attr.name, attr.value);
|
|
7967
|
+
}
|
|
7968
|
+
else {
|
|
7969
|
+
element.removeAttribute(attr.name);
|
|
7970
|
+
}
|
|
6998
7971
|
parent.removeAttribute(attr.name);
|
|
6999
7972
|
}
|
|
7000
|
-
else if (attr &&
|
|
7973
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
7001
7974
|
element.setAttribute(attr.name, attr.value);
|
|
7002
7975
|
parent.removeAttribute(attr.name);
|
|
7003
7976
|
}
|
|
@@ -7005,7 +7978,7 @@ class DBSelect {
|
|
|
7005
7978
|
const isWebComponent = attr.value.includes("hydrated");
|
|
7006
7979
|
const value = attr.value.replace("hydrated", "").trim();
|
|
7007
7980
|
const currentClass = element.getAttribute("class");
|
|
7008
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
7981
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
7009
7982
|
if (isWebComponent) {
|
|
7010
7983
|
// Stencil is using this class for lazy loading component
|
|
7011
7984
|
parent.setAttribute("class", "hydrated");
|
|
@@ -7041,13 +8014,15 @@ class DBSelect {
|
|
|
7041
8014
|
this._invalidMessage.set(this.invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
7042
8015
|
// @ts-ignore
|
|
7043
8016
|
this.writeValue?.(this.value?.() ?? "");
|
|
8017
|
+
this.setupObserver(element);
|
|
7044
8018
|
}
|
|
7045
8019
|
}
|
|
7046
8020
|
ngOnDestroy() {
|
|
7047
8021
|
this.abortController()?.abort();
|
|
8022
|
+
this.observer()?.disconnect();
|
|
7048
8023
|
}
|
|
7049
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7050
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
8024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSelect, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBSelect, isStandalone: true, selector: "db-select", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showEmptyOption: { classPropertyName: "showEmptyOption", publicName: "showEmptyOption", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", click: "click", input: "input", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
7051
8026
|
provide: NG_VALUE_ACCESSOR,
|
|
7052
8027
|
useExisting: DBSelect,
|
|
7053
8028
|
multi: true
|
|
@@ -7149,7 +8124,7 @@ class DBSelect {
|
|
|
7149
8124
|
>
|
|
7150
8125
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }] }); }
|
|
7151
8126
|
}
|
|
7152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
8127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSelect, decorators: [{
|
|
7153
8128
|
type: Component,
|
|
7154
8129
|
args: [{ providers: [{
|
|
7155
8130
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -7256,6 +8231,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
7256
8231
|
|
|
7257
8232
|
const defaultProps$e = {};
|
|
7258
8233
|
class DBStack {
|
|
8234
|
+
setupObserver(element) {
|
|
8235
|
+
if (!element)
|
|
8236
|
+
return;
|
|
8237
|
+
const parent = element.closest("db-stack");
|
|
8238
|
+
if (!parent || this.observer())
|
|
8239
|
+
return;
|
|
8240
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
8241
|
+
if (mutations.some((mutation) => {
|
|
8242
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
8243
|
+
return attr?.value !== mutation.oldValue;
|
|
8244
|
+
})) {
|
|
8245
|
+
this.enableAttributePassing(element, "db-stack");
|
|
8246
|
+
}
|
|
8247
|
+
}));
|
|
8248
|
+
this.observer().observe(parent, {
|
|
8249
|
+
attributes: true,
|
|
8250
|
+
attributeOldValue: true,
|
|
8251
|
+
});
|
|
8252
|
+
}
|
|
7259
8253
|
constructor() {
|
|
7260
8254
|
this.cls = cls;
|
|
7261
8255
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -7269,6 +8263,7 @@ class DBStack {
|
|
|
7269
8263
|
this.justifyContent = input(...(ngDevMode ? [undefined, { debugName: "justifyContent" }] : /* istanbul ignore next */ []));
|
|
7270
8264
|
this.wrap = input(...(ngDevMode ? [undefined, { debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
7271
8265
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
8266
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
7272
8267
|
}
|
|
7273
8268
|
/**
|
|
7274
8269
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -7283,10 +8278,15 @@ class DBStack {
|
|
|
7283
8278
|
const attr = attributes.item(i);
|
|
7284
8279
|
if (attr && attr.name !== 'data-density' &&
|
|
7285
8280
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
7286
|
-
|
|
8281
|
+
if (attr.value) {
|
|
8282
|
+
element.setAttribute(attr.name, attr.value);
|
|
8283
|
+
}
|
|
8284
|
+
else {
|
|
8285
|
+
element.removeAttribute(attr.name);
|
|
8286
|
+
}
|
|
7287
8287
|
parent.removeAttribute(attr.name);
|
|
7288
8288
|
}
|
|
7289
|
-
else if (attr &&
|
|
8289
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
7290
8290
|
element.setAttribute(attr.name, attr.value);
|
|
7291
8291
|
parent.removeAttribute(attr.name);
|
|
7292
8292
|
}
|
|
@@ -7294,7 +8294,7 @@ class DBStack {
|
|
|
7294
8294
|
const isWebComponent = attr.value.includes("hydrated");
|
|
7295
8295
|
const value = attr.value.replace("hydrated", "").trim();
|
|
7296
8296
|
const currentClass = element.getAttribute("class");
|
|
7297
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
8297
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
7298
8298
|
if (isWebComponent) {
|
|
7299
8299
|
// Stencil is using this class for lazy loading component
|
|
7300
8300
|
parent.setAttribute("class", "hydrated");
|
|
@@ -7309,9 +8309,15 @@ class DBStack {
|
|
|
7309
8309
|
ngAfterViewInit() {
|
|
7310
8310
|
const element = this._ref()?.nativeElement;
|
|
7311
8311
|
this.enableAttributePassing(element, "db-stack");
|
|
8312
|
+
if (typeof window !== "undefined") {
|
|
8313
|
+
this.setupObserver(element);
|
|
8314
|
+
}
|
|
8315
|
+
}
|
|
8316
|
+
ngOnDestroy() {
|
|
8317
|
+
this.observer()?.disconnect();
|
|
7312
8318
|
}
|
|
7313
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7314
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
8319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBStack, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8320
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBStack, isStandalone: true, selector: "db-stack", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
7315
8321
|
#_ref
|
|
7316
8322
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
7317
8323
|
[class]="cls('db-stack', className())"
|
|
@@ -7325,7 +8331,7 @@ class DBStack {
|
|
|
7325
8331
|
<ng-content></ng-content>
|
|
7326
8332
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
7327
8333
|
}
|
|
7328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
8334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBStack, decorators: [{
|
|
7329
8335
|
type: Component,
|
|
7330
8336
|
args: [{ selector: "db-stack", standalone: true, imports: [CommonModule], template: `<div
|
|
7331
8337
|
#_ref
|
|
@@ -7361,7 +8367,7 @@ class DBSwitch {
|
|
|
7361
8367
|
DEFAULT_INVALID_MESSAGE);
|
|
7362
8368
|
if (hasVoiceOver()) {
|
|
7363
8369
|
this._voiceOverFallback.set(this._invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
7364
|
-
delay(() => {
|
|
8370
|
+
void delay(() => {
|
|
7365
8371
|
this._voiceOverFallback.set("");
|
|
7366
8372
|
}, 1000);
|
|
7367
8373
|
}
|
|
@@ -7373,7 +8379,7 @@ class DBSwitch {
|
|
|
7373
8379
|
this._descByIds.set(this._validMessageId());
|
|
7374
8380
|
if (hasVoiceOver()) {
|
|
7375
8381
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
7376
|
-
delay(() => {
|
|
8382
|
+
void delay(() => {
|
|
7377
8383
|
this._voiceOverFallback.set("");
|
|
7378
8384
|
}, 1000);
|
|
7379
8385
|
}
|
|
@@ -7422,6 +8428,25 @@ class DBSwitch {
|
|
|
7422
8428
|
this._validMessageId.set(`${mId}${DEFAULT_VALID_MESSAGE_ID_SUFFIX}`);
|
|
7423
8429
|
this._invalidMessageId.set(`${mId}${DEFAULT_INVALID_MESSAGE_ID_SUFFIX}`);
|
|
7424
8430
|
}
|
|
8431
|
+
setupObserver(element) {
|
|
8432
|
+
if (!element)
|
|
8433
|
+
return;
|
|
8434
|
+
const parent = element.closest("db-switch");
|
|
8435
|
+
if (!parent || this.observer())
|
|
8436
|
+
return;
|
|
8437
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
8438
|
+
if (mutations.some((mutation) => {
|
|
8439
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
8440
|
+
return attr?.value !== mutation.oldValue;
|
|
8441
|
+
})) {
|
|
8442
|
+
this.enableAttributePassing(element, "db-switch");
|
|
8443
|
+
}
|
|
8444
|
+
}));
|
|
8445
|
+
this.observer().observe(parent, {
|
|
8446
|
+
attributes: true,
|
|
8447
|
+
attributeOldValue: true,
|
|
8448
|
+
});
|
|
8449
|
+
}
|
|
7425
8450
|
constructor(renderer) {
|
|
7426
8451
|
this.renderer = renderer;
|
|
7427
8452
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -7465,6 +8490,7 @@ class DBSwitch {
|
|
|
7465
8490
|
this._descByIds = signal(undefined, ...(ngDevMode ? [{ debugName: "_descByIds" }] : /* istanbul ignore next */ []));
|
|
7466
8491
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : /* istanbul ignore next */ []));
|
|
7467
8492
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
8493
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
7468
8494
|
if (typeof window !== "undefined") {
|
|
7469
8495
|
effect(() => {
|
|
7470
8496
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -7537,10 +8563,15 @@ class DBSwitch {
|
|
|
7537
8563
|
const attr = attributes.item(i);
|
|
7538
8564
|
if (attr && attr.name !== 'data-density' &&
|
|
7539
8565
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
7540
|
-
|
|
8566
|
+
if (attr.value) {
|
|
8567
|
+
element.setAttribute(attr.name, attr.value);
|
|
8568
|
+
}
|
|
8569
|
+
else {
|
|
8570
|
+
element.removeAttribute(attr.name);
|
|
8571
|
+
}
|
|
7541
8572
|
parent.removeAttribute(attr.name);
|
|
7542
8573
|
}
|
|
7543
|
-
else if (attr &&
|
|
8574
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
7544
8575
|
element.setAttribute(attr.name, attr.value);
|
|
7545
8576
|
parent.removeAttribute(attr.name);
|
|
7546
8577
|
}
|
|
@@ -7548,7 +8579,7 @@ class DBSwitch {
|
|
|
7548
8579
|
const isWebComponent = attr.value.includes("hydrated");
|
|
7549
8580
|
const value = attr.value.replace("hydrated", "").trim();
|
|
7550
8581
|
const currentClass = element.getAttribute("class");
|
|
7551
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
8582
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
7552
8583
|
if (isWebComponent) {
|
|
7553
8584
|
// Stencil is using this class for lazy loading component
|
|
7554
8585
|
parent.setAttribute("class", "hydrated");
|
|
@@ -7582,13 +8613,15 @@ class DBSwitch {
|
|
|
7582
8613
|
this.resetIds();
|
|
7583
8614
|
this.handleValidation();
|
|
7584
8615
|
this._invalidMessage.set(this.invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
8616
|
+
this.setupObserver(element);
|
|
7585
8617
|
}
|
|
7586
8618
|
}
|
|
7587
8619
|
ngOnDestroy() {
|
|
7588
8620
|
this.abortController()?.abort();
|
|
8621
|
+
this.observer()?.disconnect();
|
|
7589
8622
|
}
|
|
7590
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7591
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
8623
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSwitch, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8624
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBSwitch, isStandalone: true, selector: "db-switch", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, visualAid: { classPropertyName: "visualAid", publicName: "visualAid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, iconLeading: { classPropertyName: "iconLeading", publicName: "iconLeading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconTrailing: { classPropertyName: "iconTrailing", publicName: "iconTrailing", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", disabled: "disabledChange", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
7592
8625
|
provide: NG_VALUE_ACCESSOR,
|
|
7593
8626
|
useExisting: DBSwitch,
|
|
7594
8627
|
multi: true
|
|
@@ -7651,7 +8684,7 @@ class DBSwitch {
|
|
|
7651
8684
|
>
|
|
7652
8685
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }] }); }
|
|
7653
8686
|
}
|
|
7654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
8687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBSwitch, decorators: [{
|
|
7655
8688
|
type: Component,
|
|
7656
8689
|
args: [{ providers: [{
|
|
7657
8690
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -7740,6 +8773,25 @@ class DBTabItem {
|
|
|
7740
8773
|
}
|
|
7741
8774
|
handleFrameworkEventAngular(this, event, "checked");
|
|
7742
8775
|
}
|
|
8776
|
+
setupObserver(element) {
|
|
8777
|
+
if (!element)
|
|
8778
|
+
return;
|
|
8779
|
+
const parent = element.closest("db-tab-item");
|
|
8780
|
+
if (!parent || this.observer())
|
|
8781
|
+
return;
|
|
8782
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
8783
|
+
if (mutations.some((mutation) => {
|
|
8784
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
8785
|
+
return attr?.value !== mutation.oldValue;
|
|
8786
|
+
})) {
|
|
8787
|
+
this.enableAttributePassing(element, "db-tab-item");
|
|
8788
|
+
}
|
|
8789
|
+
}));
|
|
8790
|
+
this.observer().observe(parent, {
|
|
8791
|
+
attributes: true,
|
|
8792
|
+
attributeOldValue: true,
|
|
8793
|
+
});
|
|
8794
|
+
}
|
|
7743
8795
|
constructor(renderer) {
|
|
7744
8796
|
this.renderer = renderer;
|
|
7745
8797
|
this.cls = cls;
|
|
@@ -7767,6 +8819,7 @@ class DBTabItem {
|
|
|
7767
8819
|
this.initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
7768
8820
|
this._listenerAdded = signal(false, ...(ngDevMode ? [{ debugName: "_listenerAdded" }] : /* istanbul ignore next */ []));
|
|
7769
8821
|
this.boundSetSelectedOnChange = signal(undefined, ...(ngDevMode ? [{ debugName: "boundSetSelectedOnChange" }] : /* istanbul ignore next */ []));
|
|
8822
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
7770
8823
|
if (typeof window !== "undefined") {
|
|
7771
8824
|
effect(() => {
|
|
7772
8825
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -7819,10 +8872,15 @@ class DBTabItem {
|
|
|
7819
8872
|
const attr = attributes.item(i);
|
|
7820
8873
|
if (attr && attr.name !== 'data-density' &&
|
|
7821
8874
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
7822
|
-
|
|
8875
|
+
if (attr.value) {
|
|
8876
|
+
element.setAttribute(attr.name, attr.value);
|
|
8877
|
+
}
|
|
8878
|
+
else {
|
|
8879
|
+
element.removeAttribute(attr.name);
|
|
8880
|
+
}
|
|
7823
8881
|
parent.removeAttribute(attr.name);
|
|
7824
8882
|
}
|
|
7825
|
-
else if (attr &&
|
|
8883
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
7826
8884
|
element.setAttribute(attr.name, attr.value);
|
|
7827
8885
|
parent.removeAttribute(attr.name);
|
|
7828
8886
|
}
|
|
@@ -7830,7 +8888,7 @@ class DBTabItem {
|
|
|
7830
8888
|
const isWebComponent = attr.value.includes("hydrated");
|
|
7831
8889
|
const value = attr.value.replace("hydrated", "").trim();
|
|
7832
8890
|
const currentClass = element.getAttribute("class");
|
|
7833
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
8891
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
7834
8892
|
if (isWebComponent) {
|
|
7835
8893
|
// Stencil is using this class for lazy loading component
|
|
7836
8894
|
parent.setAttribute("class", "hydrated");
|
|
@@ -7863,6 +8921,7 @@ class DBTabItem {
|
|
|
7863
8921
|
if (typeof window !== "undefined") {
|
|
7864
8922
|
this.boundSetSelectedOnChange.set(this.setSelectedOnChange.bind(this));
|
|
7865
8923
|
this.initialized.set(true);
|
|
8924
|
+
this.setupObserver(element);
|
|
7866
8925
|
}
|
|
7867
8926
|
}
|
|
7868
8927
|
ngOnDestroy() {
|
|
@@ -7874,9 +8933,10 @@ class DBTabItem {
|
|
|
7874
8933
|
?.removeEventListener("change", this.boundSetSelectedOnChange());
|
|
7875
8934
|
this._listenerAdded.set(false);
|
|
7876
8935
|
}
|
|
8936
|
+
this.observer()?.disconnect();
|
|
7877
8937
|
}
|
|
7878
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7879
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
8938
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabItem, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8939
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTabItem, isStandalone: true, selector: "db-tab-item", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, iconLeading: { classPropertyName: "iconLeading", publicName: "iconLeading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconTrailing: { classPropertyName: "iconTrailing", publicName: "iconTrailing", isSignal: true, isRequired: false, transformFunction: null }, showIconLeading: { classPropertyName: "showIconLeading", publicName: "showIconLeading", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showIconTrailing: { classPropertyName: "showIconTrailing", publicName: "showIconTrailing", isSignal: true, isRequired: false, transformFunction: null }, noText: { classPropertyName: "noText", publicName: "noText", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", checked: "checkedChange", change: "change" }, providers: [{
|
|
7880
8940
|
provide: NG_VALUE_ACCESSOR,
|
|
7881
8941
|
useExisting: DBTabItem,
|
|
7882
8942
|
multi: true
|
|
@@ -7902,7 +8962,7 @@ class DBTabItem {
|
|
|
7902
8962
|
></label>
|
|
7903
8963
|
</li> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
7904
8964
|
}
|
|
7905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
8965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabItem, decorators: [{
|
|
7906
8966
|
type: Component,
|
|
7907
8967
|
args: [{ providers: [{
|
|
7908
8968
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -7933,12 +8993,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
7933
8993
|
|
|
7934
8994
|
const defaultProps$b = {};
|
|
7935
8995
|
class DBTabList {
|
|
8996
|
+
setupObserver(element) {
|
|
8997
|
+
if (!element)
|
|
8998
|
+
return;
|
|
8999
|
+
const parent = element.closest("db-tab-list");
|
|
9000
|
+
if (!parent || this.observer())
|
|
9001
|
+
return;
|
|
9002
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
9003
|
+
if (mutations.some((mutation) => {
|
|
9004
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
9005
|
+
return attr?.value !== mutation.oldValue;
|
|
9006
|
+
})) {
|
|
9007
|
+
this.enableAttributePassing(element, "db-tab-list");
|
|
9008
|
+
}
|
|
9009
|
+
}));
|
|
9010
|
+
this.observer().observe(parent, {
|
|
9011
|
+
attributes: true,
|
|
9012
|
+
attributeOldValue: true,
|
|
9013
|
+
});
|
|
9014
|
+
}
|
|
7936
9015
|
constructor() {
|
|
7937
9016
|
this.cls = cls;
|
|
7938
9017
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
7939
9018
|
this.propOverrides = input(...(ngDevMode ? [undefined, { debugName: "propOverrides" }] : /* istanbul ignore next */ []));
|
|
7940
9019
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
7941
9020
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
9021
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
7942
9022
|
}
|
|
7943
9023
|
/**
|
|
7944
9024
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -7953,10 +9033,15 @@ class DBTabList {
|
|
|
7953
9033
|
const attr = attributes.item(i);
|
|
7954
9034
|
if (attr && attr.name !== 'data-density' &&
|
|
7955
9035
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
7956
|
-
|
|
9036
|
+
if (attr.value) {
|
|
9037
|
+
element.setAttribute(attr.name, attr.value);
|
|
9038
|
+
}
|
|
9039
|
+
else {
|
|
9040
|
+
element.removeAttribute(attr.name);
|
|
9041
|
+
}
|
|
7957
9042
|
parent.removeAttribute(attr.name);
|
|
7958
9043
|
}
|
|
7959
|
-
else if (attr &&
|
|
9044
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
7960
9045
|
element.setAttribute(attr.name, attr.value);
|
|
7961
9046
|
parent.removeAttribute(attr.name);
|
|
7962
9047
|
}
|
|
@@ -7964,7 +9049,7 @@ class DBTabList {
|
|
|
7964
9049
|
const isWebComponent = attr.value.includes("hydrated");
|
|
7965
9050
|
const value = attr.value.replace("hydrated", "").trim();
|
|
7966
9051
|
const currentClass = element.getAttribute("class");
|
|
7967
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9052
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
7968
9053
|
if (isWebComponent) {
|
|
7969
9054
|
// Stencil is using this class for lazy loading component
|
|
7970
9055
|
parent.setAttribute("class", "hydrated");
|
|
@@ -7979,9 +9064,15 @@ class DBTabList {
|
|
|
7979
9064
|
ngAfterViewInit() {
|
|
7980
9065
|
const element = this._ref()?.nativeElement;
|
|
7981
9066
|
this.enableAttributePassing(element, "db-tab-list");
|
|
9067
|
+
if (typeof window !== "undefined") {
|
|
9068
|
+
this.setupObserver(element);
|
|
9069
|
+
}
|
|
9070
|
+
}
|
|
9071
|
+
ngOnDestroy() {
|
|
9072
|
+
this.observer()?.disconnect();
|
|
7982
9073
|
}
|
|
7983
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
7984
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
9074
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9075
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBTabList, isStandalone: true, selector: "db-tab-list", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
7985
9076
|
#_ref
|
|
7986
9077
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
7987
9078
|
[class]="cls('db-tab-list', className())"
|
|
@@ -7991,7 +9082,7 @@ class DBTabList {
|
|
|
7991
9082
|
</ul>
|
|
7992
9083
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
7993
9084
|
}
|
|
7994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabList, decorators: [{
|
|
7995
9086
|
type: Component,
|
|
7996
9087
|
args: [{ selector: "db-tab-list", standalone: true, imports: [CommonModule], template: `<div
|
|
7997
9088
|
#_ref
|
|
@@ -8006,6 +9097,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8006
9097
|
|
|
8007
9098
|
const defaultProps$a = {};
|
|
8008
9099
|
class DBTabPanel {
|
|
9100
|
+
setupObserver(element) {
|
|
9101
|
+
if (!element)
|
|
9102
|
+
return;
|
|
9103
|
+
const parent = element.closest("db-tab-panel");
|
|
9104
|
+
if (!parent || this.observer())
|
|
9105
|
+
return;
|
|
9106
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
9107
|
+
if (mutations.some((mutation) => {
|
|
9108
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
9109
|
+
return attr?.value !== mutation.oldValue;
|
|
9110
|
+
})) {
|
|
9111
|
+
this.enableAttributePassing(element, "db-tab-panel");
|
|
9112
|
+
}
|
|
9113
|
+
}));
|
|
9114
|
+
this.observer().observe(parent, {
|
|
9115
|
+
attributes: true,
|
|
9116
|
+
attributeOldValue: true,
|
|
9117
|
+
});
|
|
9118
|
+
}
|
|
8009
9119
|
constructor() {
|
|
8010
9120
|
this.cls = cls;
|
|
8011
9121
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
@@ -8013,6 +9123,7 @@ class DBTabPanel {
|
|
|
8013
9123
|
this.propOverrides = input(...(ngDevMode ? [undefined, { debugName: "propOverrides" }] : /* istanbul ignore next */ []));
|
|
8014
9124
|
this.content = input(...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
|
|
8015
9125
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
9126
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
8016
9127
|
}
|
|
8017
9128
|
/**
|
|
8018
9129
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -8027,10 +9138,15 @@ class DBTabPanel {
|
|
|
8027
9138
|
const attr = attributes.item(i);
|
|
8028
9139
|
if (attr && attr.name !== 'data-density' &&
|
|
8029
9140
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8030
|
-
|
|
9141
|
+
if (attr.value) {
|
|
9142
|
+
element.setAttribute(attr.name, attr.value);
|
|
9143
|
+
}
|
|
9144
|
+
else {
|
|
9145
|
+
element.removeAttribute(attr.name);
|
|
9146
|
+
}
|
|
8031
9147
|
parent.removeAttribute(attr.name);
|
|
8032
9148
|
}
|
|
8033
|
-
else if (attr &&
|
|
9149
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8034
9150
|
element.setAttribute(attr.name, attr.value);
|
|
8035
9151
|
parent.removeAttribute(attr.name);
|
|
8036
9152
|
}
|
|
@@ -8038,7 +9154,7 @@ class DBTabPanel {
|
|
|
8038
9154
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8039
9155
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8040
9156
|
const currentClass = element.getAttribute("class");
|
|
8041
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9157
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8042
9158
|
if (isWebComponent) {
|
|
8043
9159
|
// Stencil is using this class for lazy loading component
|
|
8044
9160
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8053,9 +9169,15 @@ class DBTabPanel {
|
|
|
8053
9169
|
ngAfterViewInit() {
|
|
8054
9170
|
const element = this._ref()?.nativeElement;
|
|
8055
9171
|
this.enableAttributePassing(element, "db-tab-panel");
|
|
9172
|
+
if (typeof window !== "undefined") {
|
|
9173
|
+
this.setupObserver(element);
|
|
9174
|
+
}
|
|
8056
9175
|
}
|
|
8057
|
-
|
|
8058
|
-
|
|
9176
|
+
ngOnDestroy() {
|
|
9177
|
+
this.observer()?.disconnect();
|
|
9178
|
+
}
|
|
9179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTabPanel, isStandalone: true, selector: "db-tab-panel", inputs: { className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<section
|
|
8059
9181
|
role="tabpanel"
|
|
8060
9182
|
#_ref
|
|
8061
9183
|
[class]="cls('db-tab-panel', className())"
|
|
@@ -8064,7 +9186,7 @@ class DBTabPanel {
|
|
|
8064
9186
|
@if(content()){{{content()}}} <ng-content></ng-content>
|
|
8065
9187
|
</section> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
8066
9188
|
}
|
|
8067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabPanel, decorators: [{
|
|
8068
9190
|
type: Component,
|
|
8069
9191
|
args: [{ selector: "db-tab-panel", standalone: true, imports: [CommonModule], template: `<section
|
|
8070
9192
|
role="tabpanel"
|
|
@@ -8105,10 +9227,15 @@ class DBTableDataCell {
|
|
|
8105
9227
|
const attr = attributes.item(i);
|
|
8106
9228
|
if (attr && attr.name !== 'data-density' &&
|
|
8107
9229
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8108
|
-
|
|
9230
|
+
if (attr.value) {
|
|
9231
|
+
element.setAttribute(attr.name, attr.value);
|
|
9232
|
+
}
|
|
9233
|
+
else {
|
|
9234
|
+
element.removeAttribute(attr.name);
|
|
9235
|
+
}
|
|
8109
9236
|
parent.removeAttribute(attr.name);
|
|
8110
9237
|
}
|
|
8111
|
-
else if (attr &&
|
|
9238
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8112
9239
|
element.setAttribute(attr.name, attr.value);
|
|
8113
9240
|
parent.removeAttribute(attr.name);
|
|
8114
9241
|
}
|
|
@@ -8116,7 +9243,7 @@ class DBTableDataCell {
|
|
|
8116
9243
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8117
9244
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8118
9245
|
const currentClass = element.getAttribute("class");
|
|
8119
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9246
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8120
9247
|
if (isWebComponent) {
|
|
8121
9248
|
// Stencil is using this class for lazy loading component
|
|
8122
9249
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8132,8 +9259,8 @@ class DBTableDataCell {
|
|
|
8132
9259
|
const element = this._ref()?.nativeElement;
|
|
8133
9260
|
this.enableAttributePassing(element, "db-table-data-cell");
|
|
8134
9261
|
}
|
|
8135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
9262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableDataCell, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBTableDataCell, isStandalone: true, selector: "db-table-data-cell", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, horizontalAlignment: { classPropertyName: "horizontalAlignment", publicName: "horizontalAlignment", isSignal: true, isRequired: false, transformFunction: null }, verticalAlignment: { classPropertyName: "verticalAlignment", publicName: "verticalAlignment", isSignal: true, isRequired: false, transformFunction: null }, colSpan: { classPropertyName: "colSpan", publicName: "colSpan", isSignal: true, isRequired: false, transformFunction: null }, colspan: { classPropertyName: "colspan", publicName: "colspan", isSignal: true, isRequired: false, transformFunction: null }, rowSpan: { classPropertyName: "rowSpan", publicName: "rowSpan", isSignal: true, isRequired: false, transformFunction: null }, rowspan: { classPropertyName: "rowspan", publicName: "rowspan", isSignal: true, isRequired: false, transformFunction: null }, headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<td
|
|
8137
9264
|
#_ref
|
|
8138
9265
|
[attr.id]="id()"
|
|
8139
9266
|
[class]="cls('db-table-data-cell', className())"
|
|
@@ -8146,7 +9273,7 @@ class DBTableDataCell {
|
|
|
8146
9273
|
<ng-content></ng-content>
|
|
8147
9274
|
</td> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
8148
9275
|
}
|
|
8149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableDataCell, decorators: [{
|
|
8150
9277
|
type: Component,
|
|
8151
9278
|
args: [{ selector: "db-table-data-cell", standalone: true, imports: [CommonModule], template: `<td
|
|
8152
9279
|
#_ref
|
|
@@ -8195,10 +9322,15 @@ class DBTableHeaderCell {
|
|
|
8195
9322
|
const attr = attributes.item(i);
|
|
8196
9323
|
if (attr && attr.name !== 'data-density' &&
|
|
8197
9324
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8198
|
-
|
|
9325
|
+
if (attr.value) {
|
|
9326
|
+
element.setAttribute(attr.name, attr.value);
|
|
9327
|
+
}
|
|
9328
|
+
else {
|
|
9329
|
+
element.removeAttribute(attr.name);
|
|
9330
|
+
}
|
|
8199
9331
|
parent.removeAttribute(attr.name);
|
|
8200
9332
|
}
|
|
8201
|
-
else if (attr &&
|
|
9333
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8202
9334
|
element.setAttribute(attr.name, attr.value);
|
|
8203
9335
|
parent.removeAttribute(attr.name);
|
|
8204
9336
|
}
|
|
@@ -8206,7 +9338,7 @@ class DBTableHeaderCell {
|
|
|
8206
9338
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8207
9339
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8208
9340
|
const currentClass = element.getAttribute("class");
|
|
8209
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9341
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8210
9342
|
if (isWebComponent) {
|
|
8211
9343
|
// Stencil is using this class for lazy loading component
|
|
8212
9344
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8222,8 +9354,8 @@ class DBTableHeaderCell {
|
|
|
8222
9354
|
const element = this._ref()?.nativeElement;
|
|
8223
9355
|
this.enableAttributePassing(element, "db-table-header-cell");
|
|
8224
9356
|
}
|
|
8225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.
|
|
9357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBTableHeaderCell, isStandalone: true, selector: "db-table-header-cell", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, horizontalAlignment: { classPropertyName: "horizontalAlignment", publicName: "horizontalAlignment", isSignal: true, isRequired: false, transformFunction: null }, verticalAlignment: { classPropertyName: "verticalAlignment", publicName: "verticalAlignment", isSignal: true, isRequired: false, transformFunction: null }, noText: { classPropertyName: "noText", publicName: "noText", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: false, transformFunction: null }, colSpan: { classPropertyName: "colSpan", publicName: "colSpan", isSignal: true, isRequired: false, transformFunction: null }, colspan: { classPropertyName: "colspan", publicName: "colspan", isSignal: true, isRequired: false, transformFunction: null }, rowSpan: { classPropertyName: "rowSpan", publicName: "rowSpan", isSignal: true, isRequired: false, transformFunction: null }, rowspan: { classPropertyName: "rowspan", publicName: "rowspan", isSignal: true, isRequired: false, transformFunction: null }, headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: false, transformFunction: null }, abbr: { classPropertyName: "abbr", publicName: "abbr", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<th
|
|
8227
9359
|
#_ref
|
|
8228
9360
|
[attr.id]="id()"
|
|
8229
9361
|
[class]="cls('db-table-header-cell', className())"
|
|
@@ -8239,7 +9371,7 @@ class DBTableHeaderCell {
|
|
|
8239
9371
|
<ng-content></ng-content>
|
|
8240
9372
|
</th> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
8241
9373
|
}
|
|
8242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableHeaderCell, decorators: [{
|
|
8243
9375
|
type: Component,
|
|
8244
9376
|
args: [{ selector: "db-table-header-cell", standalone: true, imports: [CommonModule], template: `<th
|
|
8245
9377
|
#_ref
|
|
@@ -8290,10 +9422,15 @@ class DBTableRow {
|
|
|
8290
9422
|
const attr = attributes.item(i);
|
|
8291
9423
|
if (attr && attr.name !== 'data-density' &&
|
|
8292
9424
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8293
|
-
|
|
9425
|
+
if (attr.value) {
|
|
9426
|
+
element.setAttribute(attr.name, attr.value);
|
|
9427
|
+
}
|
|
9428
|
+
else {
|
|
9429
|
+
element.removeAttribute(attr.name);
|
|
9430
|
+
}
|
|
8294
9431
|
parent.removeAttribute(attr.name);
|
|
8295
9432
|
}
|
|
8296
|
-
else if (attr &&
|
|
9433
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8297
9434
|
element.setAttribute(attr.name, attr.value);
|
|
8298
9435
|
parent.removeAttribute(attr.name);
|
|
8299
9436
|
}
|
|
@@ -8301,7 +9438,7 @@ class DBTableRow {
|
|
|
8301
9438
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8302
9439
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8303
9440
|
const currentClass = element.getAttribute("class");
|
|
8304
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9441
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8305
9442
|
if (isWebComponent) {
|
|
8306
9443
|
// Stencil is using this class for lazy loading component
|
|
8307
9444
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8317,8 +9454,8 @@ class DBTableRow {
|
|
|
8317
9454
|
const element = this._ref()?.nativeElement;
|
|
8318
9455
|
this.enableAttributePassing(element, "db-table-row");
|
|
8319
9456
|
}
|
|
8320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8321
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
9457
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableRow, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9458
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTableRow, isStandalone: true, selector: "db-table-row", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, subHeaderEmphasis: { classPropertyName: "subHeaderEmphasis", publicName: "subHeaderEmphasis", isSignal: true, isRequired: false, transformFunction: null }, cells: { classPropertyName: "cells", publicName: "cells", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<tr
|
|
8322
9459
|
#_ref
|
|
8323
9460
|
[attr.id]="id()"
|
|
8324
9461
|
[class]="cls('db-table-row', className())"
|
|
@@ -8400,7 +9537,7 @@ class DBTableRow {
|
|
|
8400
9537
|
}
|
|
8401
9538
|
</tr> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTableDataCell, selector: "db-table-data-cell", inputs: ["id", "className", "horizontalAlignment", "verticalAlignment", "colSpan", "colspan", "rowSpan", "rowspan", "headers"] }, { kind: "component", type: DBLink, selector: "db-link", inputs: ["id", "propOverrides", "className", "href", "target", "rel", "role", "referrerpolicy", "referrerPolicy", "hreflang", "disabled", "size", "showIcon", "variant", "content", "wrap", "text"] }, { kind: "component", type: DBTableHeaderCell, selector: "db-table-header-cell", inputs: ["id", "className", "horizontalAlignment", "verticalAlignment", "noText", "scope", "colSpan", "colspan", "rowSpan", "rowspan", "headers", "abbr"] }] }); }
|
|
8402
9539
|
}
|
|
8403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableRow, decorators: [{
|
|
8404
9541
|
type: Component,
|
|
8405
9542
|
args: [{ selector: "db-table-row", standalone: true, imports: [CommonModule, DBTableDataCell, DBLink, DBTableHeaderCell], template: `<tr
|
|
8406
9543
|
#_ref
|
|
@@ -8511,10 +9648,15 @@ class DBTableBody {
|
|
|
8511
9648
|
const attr = attributes.item(i);
|
|
8512
9649
|
if (attr && attr.name !== 'data-density' &&
|
|
8513
9650
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8514
|
-
|
|
9651
|
+
if (attr.value) {
|
|
9652
|
+
element.setAttribute(attr.name, attr.value);
|
|
9653
|
+
}
|
|
9654
|
+
else {
|
|
9655
|
+
element.removeAttribute(attr.name);
|
|
9656
|
+
}
|
|
8515
9657
|
parent.removeAttribute(attr.name);
|
|
8516
9658
|
}
|
|
8517
|
-
else if (attr &&
|
|
9659
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8518
9660
|
element.setAttribute(attr.name, attr.value);
|
|
8519
9661
|
parent.removeAttribute(attr.name);
|
|
8520
9662
|
}
|
|
@@ -8522,7 +9664,7 @@ class DBTableBody {
|
|
|
8522
9664
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8523
9665
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8524
9666
|
const currentClass = element.getAttribute("class");
|
|
8525
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9667
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8526
9668
|
if (isWebComponent) {
|
|
8527
9669
|
// Stencil is using this class for lazy loading component
|
|
8528
9670
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8538,8 +9680,8 @@ class DBTableBody {
|
|
|
8538
9680
|
const element = this._ref()?.nativeElement;
|
|
8539
9681
|
this.enableAttributePassing(element, "db-table-body");
|
|
8540
9682
|
}
|
|
8541
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8542
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
9683
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTableBody, isStandalone: true, selector: "db-table-body", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<tbody
|
|
8543
9685
|
#_ref
|
|
8544
9686
|
[attr.id]="id()"
|
|
8545
9687
|
[class]="cls('db-table-body', className())"
|
|
@@ -8557,7 +9699,7 @@ class DBTableBody {
|
|
|
8557
9699
|
}
|
|
8558
9700
|
</tbody> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTableRow, selector: "db-table-row", inputs: ["id", "className", "interactive", "subHeaderEmphasis", "cells"] }] }); }
|
|
8559
9701
|
}
|
|
8560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableBody, decorators: [{
|
|
8561
9703
|
type: Component,
|
|
8562
9704
|
args: [{ selector: "db-table-body", standalone: true, imports: [CommonModule, DBTableRow], template: `<tbody
|
|
8563
9705
|
#_ref
|
|
@@ -8604,10 +9746,15 @@ class DBTableFooter {
|
|
|
8604
9746
|
const attr = attributes.item(i);
|
|
8605
9747
|
if (attr && attr.name !== 'data-density' &&
|
|
8606
9748
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8607
|
-
|
|
9749
|
+
if (attr.value) {
|
|
9750
|
+
element.setAttribute(attr.name, attr.value);
|
|
9751
|
+
}
|
|
9752
|
+
else {
|
|
9753
|
+
element.removeAttribute(attr.name);
|
|
9754
|
+
}
|
|
8608
9755
|
parent.removeAttribute(attr.name);
|
|
8609
9756
|
}
|
|
8610
|
-
else if (attr &&
|
|
9757
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8611
9758
|
element.setAttribute(attr.name, attr.value);
|
|
8612
9759
|
parent.removeAttribute(attr.name);
|
|
8613
9760
|
}
|
|
@@ -8615,7 +9762,7 @@ class DBTableFooter {
|
|
|
8615
9762
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8616
9763
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8617
9764
|
const currentClass = element.getAttribute("class");
|
|
8618
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9765
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8619
9766
|
if (isWebComponent) {
|
|
8620
9767
|
// Stencil is using this class for lazy loading component
|
|
8621
9768
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8631,8 +9778,8 @@ class DBTableFooter {
|
|
|
8631
9778
|
const element = this._ref()?.nativeElement;
|
|
8632
9779
|
this.enableAttributePassing(element, "db-table-footer");
|
|
8633
9780
|
}
|
|
8634
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8635
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
9781
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9782
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTableFooter, isStandalone: true, selector: "db-table-footer", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<tfoot
|
|
8636
9783
|
#_ref
|
|
8637
9784
|
[attr.id]="id()"
|
|
8638
9785
|
[class]="cls('db-table-footer', className())"
|
|
@@ -8650,7 +9797,7 @@ class DBTableFooter {
|
|
|
8650
9797
|
}
|
|
8651
9798
|
</tfoot> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTableRow, selector: "db-table-row", inputs: ["id", "className", "interactive", "subHeaderEmphasis", "cells"] }] }); }
|
|
8652
9799
|
}
|
|
8653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableFooter, decorators: [{
|
|
8654
9801
|
type: Component,
|
|
8655
9802
|
args: [{ selector: "db-table-footer", standalone: true, imports: [CommonModule, DBTableRow], template: `<tfoot
|
|
8656
9803
|
#_ref
|
|
@@ -8679,6 +9826,25 @@ class DBTableHead {
|
|
|
8679
9826
|
headerCell: true,
|
|
8680
9827
|
}));
|
|
8681
9828
|
}
|
|
9829
|
+
setupObserver(element) {
|
|
9830
|
+
if (!element)
|
|
9831
|
+
return;
|
|
9832
|
+
const parent = element.closest("db-table-head");
|
|
9833
|
+
if (!parent || this.observer())
|
|
9834
|
+
return;
|
|
9835
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
9836
|
+
if (mutations.some((mutation) => {
|
|
9837
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
9838
|
+
return attr?.value !== mutation.oldValue;
|
|
9839
|
+
})) {
|
|
9840
|
+
this.enableAttributePassing(element, "db-table-head");
|
|
9841
|
+
}
|
|
9842
|
+
}));
|
|
9843
|
+
this.observer().observe(parent, {
|
|
9844
|
+
attributes: true,
|
|
9845
|
+
attributeOldValue: true,
|
|
9846
|
+
});
|
|
9847
|
+
}
|
|
8682
9848
|
trackByRow0(index, row) {
|
|
8683
9849
|
return `${row.id ?? this.id() ?? uuid()}-table-head-row-${index}`;
|
|
8684
9850
|
}
|
|
@@ -8689,6 +9855,7 @@ class DBTableHead {
|
|
|
8689
9855
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
8690
9856
|
this.rows = input(...(ngDevMode ? [undefined, { debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
8691
9857
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
9858
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
8692
9859
|
}
|
|
8693
9860
|
/**
|
|
8694
9861
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -8703,10 +9870,15 @@ class DBTableHead {
|
|
|
8703
9870
|
const attr = attributes.item(i);
|
|
8704
9871
|
if (attr && attr.name !== 'data-density' &&
|
|
8705
9872
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8706
|
-
|
|
9873
|
+
if (attr.value) {
|
|
9874
|
+
element.setAttribute(attr.name, attr.value);
|
|
9875
|
+
}
|
|
9876
|
+
else {
|
|
9877
|
+
element.removeAttribute(attr.name);
|
|
9878
|
+
}
|
|
8707
9879
|
parent.removeAttribute(attr.name);
|
|
8708
9880
|
}
|
|
8709
|
-
else if (attr &&
|
|
9881
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8710
9882
|
element.setAttribute(attr.name, attr.value);
|
|
8711
9883
|
parent.removeAttribute(attr.name);
|
|
8712
9884
|
}
|
|
@@ -8714,7 +9886,7 @@ class DBTableHead {
|
|
|
8714
9886
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8715
9887
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8716
9888
|
const currentClass = element.getAttribute("class");
|
|
8717
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
9889
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8718
9890
|
if (isWebComponent) {
|
|
8719
9891
|
// Stencil is using this class for lazy loading component
|
|
8720
9892
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8729,9 +9901,15 @@ class DBTableHead {
|
|
|
8729
9901
|
ngAfterViewInit() {
|
|
8730
9902
|
const element = this._ref()?.nativeElement;
|
|
8731
9903
|
this.enableAttributePassing(element, "db-table-head");
|
|
9904
|
+
if (typeof window !== "undefined") {
|
|
9905
|
+
this.setupObserver(element);
|
|
9906
|
+
}
|
|
9907
|
+
}
|
|
9908
|
+
ngOnDestroy() {
|
|
9909
|
+
this.observer()?.disconnect();
|
|
8732
9910
|
}
|
|
8733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
8734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
9911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableHead, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTableHead, isStandalone: true, selector: "db-table-head", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<thead
|
|
8735
9913
|
#_ref
|
|
8736
9914
|
[attr.id]="id()"
|
|
8737
9915
|
[class]="cls('db-table-head', className())"
|
|
@@ -8750,7 +9928,7 @@ class DBTableHead {
|
|
|
8750
9928
|
}
|
|
8751
9929
|
</thead> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBTableRow, selector: "db-table-row", inputs: ["id", "className", "interactive", "subHeaderEmphasis", "cells"] }] }); }
|
|
8752
9930
|
}
|
|
8753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
9931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableHead, decorators: [{
|
|
8754
9932
|
type: Component,
|
|
8755
9933
|
args: [{ selector: "db-table-head", standalone: true, imports: [CommonModule, DBTableRow], template: `<thead
|
|
8756
9934
|
#_ref
|
|
@@ -8786,6 +9964,25 @@ class DBTable {
|
|
|
8786
9964
|
}
|
|
8787
9965
|
return {};
|
|
8788
9966
|
}
|
|
9967
|
+
setupObserver(element) {
|
|
9968
|
+
if (!element)
|
|
9969
|
+
return;
|
|
9970
|
+
const parent = element.closest("db-table");
|
|
9971
|
+
if (!parent || this.observer())
|
|
9972
|
+
return;
|
|
9973
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
9974
|
+
if (mutations.some((mutation) => {
|
|
9975
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
9976
|
+
return attr?.value !== mutation.oldValue;
|
|
9977
|
+
})) {
|
|
9978
|
+
this.enableAttributePassing(element, "db-table");
|
|
9979
|
+
}
|
|
9980
|
+
}));
|
|
9981
|
+
this.observer().observe(parent, {
|
|
9982
|
+
attributes: true,
|
|
9983
|
+
attributeOldValue: true,
|
|
9984
|
+
});
|
|
9985
|
+
}
|
|
8789
9986
|
constructor() {
|
|
8790
9987
|
this.cls = cls;
|
|
8791
9988
|
this.getBooleanAsString = getBooleanAsString;
|
|
@@ -8804,6 +10001,7 @@ class DBTable {
|
|
|
8804
10001
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
8805
10002
|
this._data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : /* istanbul ignore next */ []));
|
|
8806
10003
|
this._style = signal(undefined, ...(ngDevMode ? [{ debugName: "_style" }] : /* istanbul ignore next */ []));
|
|
10004
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
8807
10005
|
if (typeof window !== "undefined") {
|
|
8808
10006
|
effect(() => {
|
|
8809
10007
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -8888,10 +10086,15 @@ class DBTable {
|
|
|
8888
10086
|
const attr = attributes.item(i);
|
|
8889
10087
|
if (attr && attr.name !== 'data-density' &&
|
|
8890
10088
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
8891
|
-
|
|
10089
|
+
if (attr.value) {
|
|
10090
|
+
element.setAttribute(attr.name, attr.value);
|
|
10091
|
+
}
|
|
10092
|
+
else {
|
|
10093
|
+
element.removeAttribute(attr.name);
|
|
10094
|
+
}
|
|
8892
10095
|
parent.removeAttribute(attr.name);
|
|
8893
10096
|
}
|
|
8894
|
-
else if (attr &&
|
|
10097
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
8895
10098
|
element.setAttribute(attr.name, attr.value);
|
|
8896
10099
|
parent.removeAttribute(attr.name);
|
|
8897
10100
|
}
|
|
@@ -8899,7 +10102,7 @@ class DBTable {
|
|
|
8899
10102
|
const isWebComponent = attr.value.includes("hydrated");
|
|
8900
10103
|
const value = attr.value.replace("hydrated", "").trim();
|
|
8901
10104
|
const currentClass = element.getAttribute("class");
|
|
8902
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
10105
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
8903
10106
|
if (isWebComponent) {
|
|
8904
10107
|
// Stencil is using this class for lazy loading component
|
|
8905
10108
|
parent.setAttribute("class", "hydrated");
|
|
@@ -8914,9 +10117,15 @@ class DBTable {
|
|
|
8914
10117
|
ngAfterViewInit() {
|
|
8915
10118
|
const element = this._ref()?.nativeElement;
|
|
8916
10119
|
this.enableAttributePassing(element, "db-table");
|
|
10120
|
+
if (typeof window !== "undefined") {
|
|
10121
|
+
this.setupObserver(element);
|
|
10122
|
+
}
|
|
8917
10123
|
}
|
|
8918
|
-
|
|
8919
|
-
|
|
10124
|
+
ngOnDestroy() {
|
|
10125
|
+
this.observer()?.disconnect();
|
|
10126
|
+
}
|
|
10127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTable, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTable, isStandalone: true, selector: "db-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, mobileVariant: { classPropertyName: "mobileVariant", publicName: "mobileVariant", isSignal: true, isRequired: false, transformFunction: null }, columnSizes: { classPropertyName: "columnSizes", publicName: "columnSizes", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showCaption: { classPropertyName: "showCaption", publicName: "showCaption", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, captionPlain: { classPropertyName: "captionPlain", publicName: "captionPlain", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
8920
10129
|
[class]="cls('db-table', className())"
|
|
8921
10130
|
[ngStyle]="_style()"
|
|
8922
10131
|
[attr.data-width]="width()"
|
|
@@ -8946,7 +10155,7 @@ class DBTable {
|
|
|
8946
10155
|
</table>
|
|
8947
10156
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: DBTableHead, selector: "db-table-head", inputs: ["id", "className", "rows"] }, { kind: "component", type: DBTableBody, selector: "db-table-body", inputs: ["id", "className", "rows"] }, { kind: "component", type: DBTableFooter, selector: "db-table-footer", inputs: ["id", "className", "rows"] }] }); }
|
|
8948
10157
|
}
|
|
8949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
10158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTable, decorators: [{
|
|
8950
10159
|
type: Component,
|
|
8951
10160
|
args: [{ selector: "db-table", standalone: true, imports: [CommonModule, DBTableHead, DBTableBody, DBTableFooter], template: `<div
|
|
8952
10161
|
[class]="cls('db-table', className())"
|
|
@@ -8981,11 +10190,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
8981
10190
|
|
|
8982
10191
|
const defaultProps$2 = {};
|
|
8983
10192
|
class DBTableCaption {
|
|
10193
|
+
setupObserver(element) {
|
|
10194
|
+
if (!element)
|
|
10195
|
+
return;
|
|
10196
|
+
const parent = element.closest("db-table-caption");
|
|
10197
|
+
if (!parent || this.observer())
|
|
10198
|
+
return;
|
|
10199
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
10200
|
+
if (mutations.some((mutation) => {
|
|
10201
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
10202
|
+
return attr?.value !== mutation.oldValue;
|
|
10203
|
+
})) {
|
|
10204
|
+
this.enableAttributePassing(element, "db-table-caption");
|
|
10205
|
+
}
|
|
10206
|
+
}));
|
|
10207
|
+
this.observer().observe(parent, {
|
|
10208
|
+
attributes: true,
|
|
10209
|
+
attributeOldValue: true,
|
|
10210
|
+
});
|
|
10211
|
+
}
|
|
8984
10212
|
constructor() {
|
|
8985
10213
|
this.cls = cls;
|
|
8986
10214
|
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
8987
10215
|
this.className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : /* istanbul ignore next */ []));
|
|
8988
10216
|
this._ref = viewChild("_ref", ...(ngDevMode ? [{ debugName: "_ref" }] : /* istanbul ignore next */ []));
|
|
10217
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
8989
10218
|
}
|
|
8990
10219
|
/**
|
|
8991
10220
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -9000,10 +10229,15 @@ class DBTableCaption {
|
|
|
9000
10229
|
const attr = attributes.item(i);
|
|
9001
10230
|
if (attr && attr.name !== 'data-density' &&
|
|
9002
10231
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
9003
|
-
|
|
10232
|
+
if (attr.value) {
|
|
10233
|
+
element.setAttribute(attr.name, attr.value);
|
|
10234
|
+
}
|
|
10235
|
+
else {
|
|
10236
|
+
element.removeAttribute(attr.name);
|
|
10237
|
+
}
|
|
9004
10238
|
parent.removeAttribute(attr.name);
|
|
9005
10239
|
}
|
|
9006
|
-
else if (attr &&
|
|
10240
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
9007
10241
|
element.setAttribute(attr.name, attr.value);
|
|
9008
10242
|
parent.removeAttribute(attr.name);
|
|
9009
10243
|
}
|
|
@@ -9011,7 +10245,7 @@ class DBTableCaption {
|
|
|
9011
10245
|
const isWebComponent = attr.value.includes("hydrated");
|
|
9012
10246
|
const value = attr.value.replace("hydrated", "").trim();
|
|
9013
10247
|
const currentClass = element.getAttribute("class");
|
|
9014
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
10248
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
9015
10249
|
if (isWebComponent) {
|
|
9016
10250
|
// Stencil is using this class for lazy loading component
|
|
9017
10251
|
parent.setAttribute("class", "hydrated");
|
|
@@ -9026,9 +10260,15 @@ class DBTableCaption {
|
|
|
9026
10260
|
ngAfterViewInit() {
|
|
9027
10261
|
const element = this._ref()?.nativeElement;
|
|
9028
10262
|
this.enableAttributePassing(element, "db-table-caption");
|
|
10263
|
+
if (typeof window !== "undefined") {
|
|
10264
|
+
this.setupObserver(element);
|
|
10265
|
+
}
|
|
9029
10266
|
}
|
|
9030
|
-
|
|
9031
|
-
|
|
10267
|
+
ngOnDestroy() {
|
|
10268
|
+
this.observer()?.disconnect();
|
|
10269
|
+
}
|
|
10270
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableCaption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10271
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.17", type: DBTableCaption, isStandalone: true, selector: "db-table-caption", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<caption
|
|
9032
10272
|
#_ref
|
|
9033
10273
|
[attr.id]="id()"
|
|
9034
10274
|
[class]="cls('db-table-caption', className())"
|
|
@@ -9036,7 +10276,7 @@ class DBTableCaption {
|
|
|
9036
10276
|
<ng-content></ng-content>
|
|
9037
10277
|
</caption> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
9038
10278
|
}
|
|
9039
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
10279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTableCaption, decorators: [{
|
|
9040
10280
|
type: Component,
|
|
9041
10281
|
args: [{ selector: "db-table-caption", standalone: true, imports: [CommonModule], template: `<caption
|
|
9042
10282
|
#_ref
|
|
@@ -9177,6 +10417,25 @@ class DBTabs {
|
|
|
9177
10417
|
}
|
|
9178
10418
|
}
|
|
9179
10419
|
}
|
|
10420
|
+
setupObserver(element) {
|
|
10421
|
+
if (!element)
|
|
10422
|
+
return;
|
|
10423
|
+
const parent = element.closest("db-tabs");
|
|
10424
|
+
if (!parent || this.observer())
|
|
10425
|
+
return;
|
|
10426
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
10427
|
+
if (mutations.some((mutation) => {
|
|
10428
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
10429
|
+
return attr?.value !== mutation.oldValue;
|
|
10430
|
+
})) {
|
|
10431
|
+
this.enableAttributePassing(element, "db-tabs");
|
|
10432
|
+
}
|
|
10433
|
+
}));
|
|
10434
|
+
this.observer().observe(parent, {
|
|
10435
|
+
attributes: true,
|
|
10436
|
+
attributeOldValue: true,
|
|
10437
|
+
});
|
|
10438
|
+
}
|
|
9180
10439
|
trackByTab0(index, tab) {
|
|
9181
10440
|
return this.name() + "tab-item" + index;
|
|
9182
10441
|
}
|
|
@@ -9206,6 +10465,7 @@ class DBTabs {
|
|
|
9206
10465
|
this.showScrollRight = signal(false, ...(ngDevMode ? [{ debugName: "showScrollRight" }] : /* istanbul ignore next */ []));
|
|
9207
10466
|
this.scrollContainer = signal(null, ...(ngDevMode ? [{ debugName: "scrollContainer" }] : /* istanbul ignore next */ []));
|
|
9208
10467
|
this._resizeObserver = signal(undefined, ...(ngDevMode ? [{ debugName: "_resizeObserver" }] : /* istanbul ignore next */ []));
|
|
10468
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
9209
10469
|
if (typeof window !== "undefined") {
|
|
9210
10470
|
effect(() => {
|
|
9211
10471
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -9251,10 +10511,15 @@ class DBTabs {
|
|
|
9251
10511
|
const attr = attributes.item(i);
|
|
9252
10512
|
if (attr && attr.name !== 'data-density' &&
|
|
9253
10513
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
9254
|
-
|
|
10514
|
+
if (attr.value) {
|
|
10515
|
+
element.setAttribute(attr.name, attr.value);
|
|
10516
|
+
}
|
|
10517
|
+
else {
|
|
10518
|
+
element.removeAttribute(attr.name);
|
|
10519
|
+
}
|
|
9255
10520
|
parent.removeAttribute(attr.name);
|
|
9256
10521
|
}
|
|
9257
|
-
else if (attr &&
|
|
10522
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
9258
10523
|
element.setAttribute(attr.name, attr.value);
|
|
9259
10524
|
parent.removeAttribute(attr.name);
|
|
9260
10525
|
}
|
|
@@ -9262,7 +10527,7 @@ class DBTabs {
|
|
|
9262
10527
|
const isWebComponent = attr.value.includes("hydrated");
|
|
9263
10528
|
const value = attr.value.replace("hydrated", "").trim();
|
|
9264
10529
|
const currentClass = element.getAttribute("class");
|
|
9265
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
10530
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
9266
10531
|
if (isWebComponent) {
|
|
9267
10532
|
// Stencil is using this class for lazy loading component
|
|
9268
10533
|
parent.setAttribute("class", "hydrated");
|
|
@@ -9280,14 +10545,16 @@ class DBTabs {
|
|
|
9280
10545
|
if (typeof window !== "undefined") {
|
|
9281
10546
|
this._name.set(`tabs-${this.name() || uuid()}`);
|
|
9282
10547
|
this.initialized.set(true);
|
|
10548
|
+
this.setupObserver(element);
|
|
9283
10549
|
}
|
|
9284
10550
|
}
|
|
9285
10551
|
ngOnDestroy() {
|
|
9286
10552
|
this._resizeObserver()?.disconnect();
|
|
9287
10553
|
this._resizeObserver.set(undefined);
|
|
10554
|
+
this.observer()?.disconnect();
|
|
9288
10555
|
}
|
|
9289
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
9290
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
10556
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabs, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10557
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTabs, isStandalone: true, selector: "db-tabs", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, arrowScrollDistance: { classPropertyName: "arrowScrollDistance", publicName: "arrowScrollDistance", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, behavior: { classPropertyName: "behavior", publicName: "behavior", isSignal: true, isRequired: false, transformFunction: null }, initialSelectedMode: { classPropertyName: "initialSelectedMode", publicName: "initialSelectedMode", isSignal: true, isRequired: false, transformFunction: null }, initialSelectedIndex: { classPropertyName: "initialSelectedIndex", publicName: "initialSelectedIndex", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexChange: "indexChange", tabSelect: "tabSelect" }, viewQueries: [{ propertyName: "_ref", first: true, predicate: ["_ref"], descendants: true, isSignal: true }], ngImport: i0, template: `<div
|
|
9291
10558
|
#_ref
|
|
9292
10559
|
[attr.id]="id() ?? propOverrides()?.id"
|
|
9293
10560
|
[class]="cls('db-tabs', className())"
|
|
@@ -9341,7 +10608,7 @@ class DBTabs {
|
|
|
9341
10608
|
<ng-content></ng-content>
|
|
9342
10609
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBButton, selector: "db-button", inputs: ["type", "id", "propOverrides", "className", "disabled", "iconLeading", "icon", "showIconLeading", "showIcon", "iconTrailing", "showIconTrailing", "size", "width", "variant", "wrap", "noText", "name", "form", "value", "text"], outputs: ["click"] }, { kind: "component", type: DBTabList, selector: "db-tab-list", inputs: ["id", "propOverrides", "className"] }, { kind: "component", type: DBTabItem, selector: "db-tab-item", inputs: ["active", "name", "className", "id", "propOverrides", "iconLeading", "icon", "iconTrailing", "showIconLeading", "showIcon", "showIconTrailing", "noText", "disabled", "checked", "label"], outputs: ["disabledChange", "checkedChange", "change"] }, { kind: "component", type: DBTabPanel, selector: "db-tab-panel", inputs: ["className", "id", "propOverrides", "content"] }] }); }
|
|
9343
10610
|
}
|
|
9344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
10611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTabs, decorators: [{
|
|
9345
10612
|
type: Component,
|
|
9346
10613
|
args: [{ selector: "db-tabs", standalone: true, imports: [CommonModule, DBButton, DBTabList, DBTabItem, DBTabPanel], template: `<div
|
|
9347
10614
|
#_ref
|
|
@@ -9418,7 +10685,7 @@ class DBTextarea {
|
|
|
9418
10685
|
DEFAULT_INVALID_MESSAGE);
|
|
9419
10686
|
if (hasVoiceOver()) {
|
|
9420
10687
|
this._voiceOverFallback.set(this._invalidMessage());
|
|
9421
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
10688
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
9422
10689
|
}
|
|
9423
10690
|
}
|
|
9424
10691
|
else if (this.hasValidState() &&
|
|
@@ -9427,7 +10694,7 @@ class DBTextarea {
|
|
|
9427
10694
|
this._descByIds.set(this._validMessageId());
|
|
9428
10695
|
if (hasVoiceOver()) {
|
|
9429
10696
|
this._voiceOverFallback.set(this.validMessage() ?? DEFAULT_VALID_MESSAGE);
|
|
9430
|
-
delay(() => this._voiceOverFallback.set(""), 1000);
|
|
10697
|
+
void delay(() => this._voiceOverFallback.set(""), 1000);
|
|
9431
10698
|
}
|
|
9432
10699
|
}
|
|
9433
10700
|
else if (stringPropVisible(this.message(), this.showMessage())) {
|
|
@@ -9473,6 +10740,25 @@ class DBTextarea {
|
|
|
9473
10740
|
this._validMessageId.set(mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX);
|
|
9474
10741
|
this._invalidMessageId.set(mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX);
|
|
9475
10742
|
}
|
|
10743
|
+
setupObserver(element) {
|
|
10744
|
+
if (!element)
|
|
10745
|
+
return;
|
|
10746
|
+
const parent = element.closest("db-textarea");
|
|
10747
|
+
if (!parent || this.observer())
|
|
10748
|
+
return;
|
|
10749
|
+
this.observer.set(new MutationObserver((mutations) => {
|
|
10750
|
+
if (mutations.some((mutation) => {
|
|
10751
|
+
const attr = mutation.target.attributes.getNamedItem(mutation.attributeName ?? "");
|
|
10752
|
+
return attr?.value !== mutation.oldValue;
|
|
10753
|
+
})) {
|
|
10754
|
+
this.enableAttributePassing(element, "db-textarea");
|
|
10755
|
+
}
|
|
10756
|
+
}));
|
|
10757
|
+
this.observer().observe(parent, {
|
|
10758
|
+
attributes: true,
|
|
10759
|
+
attributeOldValue: true,
|
|
10760
|
+
});
|
|
10761
|
+
}
|
|
9476
10762
|
constructor(renderer) {
|
|
9477
10763
|
this.renderer = renderer;
|
|
9478
10764
|
this.cls = cls;
|
|
@@ -9532,6 +10818,7 @@ class DBTextarea {
|
|
|
9532
10818
|
this._value = signal("", ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
9533
10819
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : /* istanbul ignore next */ []));
|
|
9534
10820
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : /* istanbul ignore next */ []));
|
|
10821
|
+
this.observer = signal(undefined, ...(ngDevMode ? [{ debugName: "observer" }] : /* istanbul ignore next */ []));
|
|
9535
10822
|
if (typeof window !== "undefined") {
|
|
9536
10823
|
effect(() => {
|
|
9537
10824
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
@@ -9619,10 +10906,15 @@ class DBTextarea {
|
|
|
9619
10906
|
const attr = attributes.item(i);
|
|
9620
10907
|
if (attr && attr.name !== 'data-density' &&
|
|
9621
10908
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
9622
|
-
|
|
10909
|
+
if (attr.value) {
|
|
10910
|
+
element.setAttribute(attr.name, attr.value);
|
|
10911
|
+
}
|
|
10912
|
+
else {
|
|
10913
|
+
element.removeAttribute(attr.name);
|
|
10914
|
+
}
|
|
9623
10915
|
parent.removeAttribute(attr.name);
|
|
9624
10916
|
}
|
|
9625
|
-
else if (attr &&
|
|
10917
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
9626
10918
|
element.setAttribute(attr.name, attr.value);
|
|
9627
10919
|
parent.removeAttribute(attr.name);
|
|
9628
10920
|
}
|
|
@@ -9630,7 +10922,7 @@ class DBTextarea {
|
|
|
9630
10922
|
const isWebComponent = attr.value.includes("hydrated");
|
|
9631
10923
|
const value = attr.value.replace("hydrated", "").trim();
|
|
9632
10924
|
const currentClass = element.getAttribute("class");
|
|
9633
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
10925
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
9634
10926
|
if (isWebComponent) {
|
|
9635
10927
|
// Stencil is using this class for lazy loading component
|
|
9636
10928
|
parent.setAttribute("class", "hydrated");
|
|
@@ -9663,13 +10955,15 @@ class DBTextarea {
|
|
|
9663
10955
|
if (typeof window !== "undefined") {
|
|
9664
10956
|
this.resetIds();
|
|
9665
10957
|
this._invalidMessage.set(this.invalidMessage() || DEFAULT_INVALID_MESSAGE);
|
|
10958
|
+
this.setupObserver(element);
|
|
9666
10959
|
}
|
|
9667
10960
|
}
|
|
9668
10961
|
ngOnDestroy() {
|
|
9669
10962
|
this.abortController()?.abort();
|
|
10963
|
+
this.observer()?.disconnect();
|
|
9670
10964
|
}
|
|
9671
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
9672
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
10965
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTextarea, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10966
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DBTextarea, isStandalone: true, selector: "db-textarea", inputs: { invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, propOverrides: { classPropertyName: "propOverrides", publicName: "propOverrides", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showMessage: { classPropertyName: "showMessage", publicName: "showMessage", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, validMessage: { classPropertyName: "validMessage", publicName: "validMessage", isSignal: true, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, showRequiredAsterisk: { classPropertyName: "showRequiredAsterisk", publicName: "showRequiredAsterisk", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, fieldSizing: { classPropertyName: "fieldSizing", publicName: "fieldSizing", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, showResizer: { classPropertyName: "showResizer", publicName: "showResizer", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, minlength: { classPropertyName: "minlength", publicName: "minlength", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, spellCheck: { classPropertyName: "spellCheck", publicName: "spellCheck", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, messageIcon: { classPropertyName: "messageIcon", publicName: "messageIcon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", input: "input", change: "change", blur: "blur", focus: "focus" }, providers: [{
|
|
9673
10967
|
provide: NG_VALUE_ACCESSOR,
|
|
9674
10968
|
useExisting: DBTextarea,
|
|
9675
10969
|
multi: true
|
|
@@ -9690,7 +10984,7 @@ class DBTextarea {
|
|
|
9690
10984
|
[attr.data-hide-resizer]="getHideProp(showResizer() ?? true)"
|
|
9691
10985
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
9692
10986
|
[required]="getBoolean(required(), 'required')"
|
|
9693
|
-
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly')"
|
|
10987
|
+
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly') || undefined"
|
|
9694
10988
|
[attr.form]="form()"
|
|
9695
10989
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
9696
10990
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
@@ -9736,7 +11030,7 @@ class DBTextarea {
|
|
|
9736
11030
|
>
|
|
9737
11031
|
</div> `, isInline: true, styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DBInfotext, selector: "db-infotext", inputs: ["id", "propOverrides", "className", "icon", "semantic", "size", "wrap", "showIcon", "text"] }] }); }
|
|
9738
11032
|
}
|
|
9739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
11033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DBTextarea, decorators: [{
|
|
9740
11034
|
type: Component,
|
|
9741
11035
|
args: [{ providers: [{
|
|
9742
11036
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -9759,7 +11053,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
9759
11053
|
[attr.data-hide-resizer]="getHideProp(showResizer() ?? true)"
|
|
9760
11054
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
9761
11055
|
[required]="getBoolean(required(), 'required')"
|
|
9762
|
-
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly')"
|
|
11056
|
+
[attr.readOnly]="getBoolean(readOnly(), 'readOnly') || getBoolean(readonly(), 'readonly') || undefined"
|
|
9763
11057
|
[attr.form]="form()"
|
|
9764
11058
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
9765
11059
|
[attr.minLength]="getNumber(minLength(), minlength())"
|