@molecule/app-ui-angular 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2744 -912
- package/dist/components/accordion.component.d.ts +17 -2
- package/dist/components/accordion.component.d.ts.map +1 -1
- package/dist/components/accordion.component.js +31 -7
- package/dist/components/accordion.component.js.map +1 -1
- package/dist/components/alert.component.d.ts +15 -2
- package/dist/components/alert.component.d.ts.map +1 -1
- package/dist/components/alert.component.js +25 -4
- package/dist/components/alert.component.js.map +1 -1
- package/dist/components/auth-guard.component.d.ts +41 -9
- package/dist/components/auth-guard.component.d.ts.map +1 -1
- package/dist/components/auth-guard.component.js +58 -23
- package/dist/components/auth-guard.component.js.map +1 -1
- package/dist/components/avatar.component.d.ts +15 -2
- package/dist/components/avatar.component.d.ts.map +1 -1
- package/dist/components/avatar.component.js +35 -5
- package/dist/components/avatar.component.js.map +1 -1
- package/dist/components/badge.component.d.ts +15 -2
- package/dist/components/badge.component.d.ts.map +1 -1
- package/dist/components/badge.component.js +35 -6
- package/dist/components/badge.component.js.map +1 -1
- package/dist/components/button.component.d.ts +20 -2
- package/dist/components/button.component.d.ts.map +1 -1
- package/dist/components/button.component.js +30 -4
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/card.component.d.ts +67 -9
- package/dist/components/card.component.d.ts.map +1 -1
- package/dist/components/card.component.js +99 -17
- package/dist/components/card.component.js.map +1 -1
- package/dist/components/checkbox.component.d.ts +35 -5
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +59 -9
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-button.component.d.ts +85 -17
- package/dist/components/confirm-button.component.d.ts.map +1 -1
- package/dist/components/confirm-button.component.js +112 -25
- package/dist/components/confirm-button.component.js.map +1 -1
- package/dist/components/confirm-dialog.component.d.ts +50 -13
- package/dist/components/confirm-dialog.component.d.ts.map +1 -1
- package/dist/components/confirm-dialog.component.js +118 -31
- package/dist/components/confirm-dialog.component.js.map +1 -1
- package/dist/components/dropdown.component.d.ts +30 -4
- package/dist/components/dropdown.component.d.ts.map +1 -1
- package/dist/components/dropdown.component.js +80 -13
- package/dist/components/dropdown.component.js.map +1 -1
- package/dist/components/empty-state.component.d.ts +5 -1
- package/dist/components/empty-state.component.d.ts.map +1 -1
- package/dist/components/empty-state.component.js +5 -1
- package/dist/components/empty-state.component.js.map +1 -1
- package/dist/components/floating-input.component.d.ts +18 -4
- package/dist/components/floating-input.component.d.ts.map +1 -1
- package/dist/components/floating-input.component.js +38 -8
- package/dist/components/floating-input.component.js.map +1 -1
- package/dist/components/form-field.component.d.ts +14 -2
- package/dist/components/form-field.component.d.ts.map +1 -1
- package/dist/components/form-field.component.js +34 -5
- package/dist/components/form-field.component.js.map +1 -1
- package/dist/components/form.component.d.ts +61 -15
- package/dist/components/form.component.d.ts.map +1 -1
- package/dist/components/form.component.js +65 -14
- package/dist/components/form.component.js.map +1 -1
- package/dist/components/icon.component.d.ts +22 -4
- package/dist/components/icon.component.d.ts.map +1 -1
- package/dist/components/icon.component.js +1 -1
- package/dist/components/icon.component.js.map +1 -1
- package/dist/components/input.component.d.ts +34 -4
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +66 -11
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/label.component.d.ts +5 -1
- package/dist/components/label.component.d.ts.map +1 -1
- package/dist/components/label.component.js +6 -2
- package/dist/components/label.component.js.map +1 -1
- package/dist/components/language-picker.component.d.ts +44 -8
- package/dist/components/language-picker.component.d.ts.map +1 -1
- package/dist/components/language-picker.component.js +29 -17
- package/dist/components/language-picker.component.js.map +1 -1
- package/dist/components/layout.component.d.ts +57 -8
- package/dist/components/layout.component.d.ts.map +1 -1
- package/dist/components/layout.component.js +134 -21
- package/dist/components/layout.component.js.map +1 -1
- package/dist/components/load-error-banner.component.d.ts +39 -7
- package/dist/components/load-error-banner.component.d.ts.map +1 -1
- package/dist/components/load-error-banner.component.js +68 -21
- package/dist/components/load-error-banner.component.js.map +1 -1
- package/dist/components/modal.component.d.ts +20 -3
- package/dist/components/modal.component.d.ts.map +1 -1
- package/dist/components/modal.component.js +40 -6
- package/dist/components/modal.component.js.map +1 -1
- package/dist/components/optimistic-toggle-button.component.d.ts +80 -19
- package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -1
- package/dist/components/optimistic-toggle-button.component.js +86 -25
- package/dist/components/optimistic-toggle-button.component.js.map +1 -1
- package/dist/components/page-header.component.d.ts +5 -1
- package/dist/components/page-header.component.d.ts.map +1 -1
- package/dist/components/page-header.component.js +5 -1
- package/dist/components/page-header.component.js.map +1 -1
- package/dist/components/page-shell.component.d.ts +5 -1
- package/dist/components/page-shell.component.d.ts.map +1 -1
- package/dist/components/page-shell.component.js +5 -1
- package/dist/components/page-shell.component.js.map +1 -1
- package/dist/components/pagination.component.d.ts +15 -2
- package/dist/components/pagination.component.d.ts.map +1 -1
- package/dist/components/pagination.component.js +26 -5
- package/dist/components/pagination.component.js.map +1 -1
- package/dist/components/panel-close.component.d.ts +10 -1
- package/dist/components/panel-close.component.d.ts.map +1 -1
- package/dist/components/panel-close.component.js +1 -1
- package/dist/components/panel-close.component.js.map +1 -1
- package/dist/components/progress.component.d.ts +51 -8
- package/dist/components/progress.component.d.ts.map +1 -1
- package/dist/components/progress.component.js +26 -5
- package/dist/components/progress.component.js.map +1 -1
- package/dist/components/prompt-dialog.component.d.ts +59 -16
- package/dist/components/prompt-dialog.component.d.ts.map +1 -1
- package/dist/components/prompt-dialog.component.js +129 -41
- package/dist/components/prompt-dialog.component.js.map +1 -1
- package/dist/components/radio-group.component.d.ts +16 -2
- package/dist/components/radio-group.component.d.ts.map +1 -1
- package/dist/components/radio-group.component.js +28 -5
- package/dist/components/radio-group.component.js.map +1 -1
- package/dist/components/responsive-app-shell.component.d.ts +155 -31
- package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
- package/dist/components/responsive-app-shell.component.js +163 -54
- package/dist/components/responsive-app-shell.component.js.map +1 -1
- package/dist/components/select.component.d.ts +29 -4
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +55 -9
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/separator.component.d.ts +37 -7
- package/dist/components/separator.component.d.ts.map +1 -1
- package/dist/components/separator.component.js +33 -6
- package/dist/components/separator.component.js.map +1 -1
- package/dist/components/sidebar-user-card.component.d.ts +28 -7
- package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
- package/dist/components/sidebar-user-card.component.js +1 -1
- package/dist/components/sidebar-user-card.component.js.map +1 -1
- package/dist/components/skeleton.component.d.ts +23 -4
- package/dist/components/skeleton.component.d.ts.map +1 -1
- package/dist/components/skeleton.component.js +34 -7
- package/dist/components/skeleton.component.js.map +1 -1
- package/dist/components/spinner.component.d.ts +15 -2
- package/dist/components/spinner.component.d.ts.map +1 -1
- package/dist/components/spinner.component.js +34 -6
- package/dist/components/spinner.component.js.map +1 -1
- package/dist/components/switch.component.d.ts +30 -7
- package/dist/components/switch.component.d.ts.map +1 -1
- package/dist/components/switch.component.js +56 -11
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/table.component.d.ts +29 -3
- package/dist/components/table.component.d.ts.map +1 -1
- package/dist/components/table.component.js +63 -8
- package/dist/components/table.component.js.map +1 -1
- package/dist/components/tabs.component.d.ts +18 -3
- package/dist/components/tabs.component.d.ts.map +1 -1
- package/dist/components/tabs.component.js +74 -39
- package/dist/components/tabs.component.js.map +1 -1
- package/dist/components/textarea.component.d.ts +29 -4
- package/dist/components/textarea.component.d.ts.map +1 -1
- package/dist/components/textarea.component.js +55 -9
- package/dist/components/textarea.component.js.map +1 -1
- package/dist/components/theme-toggle.component.d.ts +25 -6
- package/dist/components/theme-toggle.component.d.ts.map +1 -1
- package/dist/components/theme-toggle.component.js +1 -1
- package/dist/components/theme-toggle.component.js.map +1 -1
- package/dist/components/toast.component.d.ts +27 -6
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +48 -14
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +57 -5
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +103 -11
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +68 -14
- package/dist/components/user-menu-popover.component.d.ts.map +1 -1
- package/dist/components/user-menu-popover.component.js +4 -4
- package/dist/components/user-menu-popover.component.js.map +1 -1
- package/dist/components/user-menu.component.d.ts +33 -9
- package/dist/components/user-menu.component.d.ts.map +1 -1
- package/dist/components/user-menu.component.js +1 -1
- package/dist/components/user-menu.component.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/element-props.d.ts +78 -0
- package/dist/utilities/element-props.d.ts.map +1 -0
- package/dist/utilities/element-props.js +166 -0
- package/dist/utilities/element-props.js.map +1 -0
- package/dist/utilities/element.d.ts +34 -0
- package/dist/utilities/element.d.ts.map +1 -0
- package/dist/utilities/element.js +24 -0
- package/dist/utilities/element.js.map +1 -0
- package/dist/utilities/index.d.ts +2 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +2 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/node-value.d.ts +1 -1
- package/dist/utilities/node-value.d.ts.map +1 -1
- package/dist/utilities/node-value.js +6 -2
- package/dist/utilities/node-value.js.map +1 -1
- package/dist/utilities/render-icon.d.ts +3 -2
- package/dist/utilities/render-icon.d.ts.map +1 -1
- package/dist/utilities/render-icon.js +6 -3
- package/dist/utilities/render-icon.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +26 -2
- package/dist/utilities/rest-attrs.d.ts.map +1 -1
- package/dist/utilities/rest-attrs.js +37 -0
- package/dist/utilities/rest-attrs.js.map +1 -1
- package/package.json +4 -3
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { Component } from '@angular/core';
|
|
6
|
+
import { Component, ElementRef, inject } from '@angular/core';
|
|
7
7
|
import { getClassMap } from '@molecule/app-ui';
|
|
8
|
+
import { hostElement } from '../utilities/element.js';
|
|
8
9
|
import { styleText } from '../utilities/style.js';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
const _c0 = ["*"];
|
|
@@ -25,6 +26,9 @@ const DIRECTION_MAP = {
|
|
|
25
26
|
* Centers a max-width content column; rest props land on the host element.
|
|
26
27
|
*/
|
|
27
28
|
export class Container {
|
|
29
|
+
host = inject(ElementRef);
|
|
30
|
+
/** The element a caller's ref receives: the host `<div>`. */
|
|
31
|
+
element = hostElement(this.host);
|
|
28
32
|
/** Maximum width preset. */
|
|
29
33
|
maxWidth = 'lg';
|
|
30
34
|
/** Whether the column is centered. */
|
|
@@ -37,6 +41,10 @@ export class Container {
|
|
|
37
41
|
style;
|
|
38
42
|
/** `data-testid`. */
|
|
39
43
|
testId;
|
|
44
|
+
/** `data-mol-id` automation id (React's `automationId`). */
|
|
45
|
+
automationId;
|
|
46
|
+
/** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
|
|
47
|
+
dataMolId;
|
|
40
48
|
/**
|
|
41
49
|
* The current class map.
|
|
42
50
|
* @returns The UIClassMap.
|
|
@@ -53,6 +61,16 @@ export class Container {
|
|
|
53
61
|
size: this.maxWidth,
|
|
54
62
|
}), this.centered && this.cm().mxAuto, this.className);
|
|
55
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
66
|
+
* @returns The attribute value.
|
|
67
|
+
*/
|
|
68
|
+
molId() {
|
|
69
|
+
return (this.automationId ??
|
|
70
|
+
this.dataMolId ??
|
|
71
|
+
this.host.nativeElement.getAttribute('data-mol-id') ??
|
|
72
|
+
undefined);
|
|
73
|
+
}
|
|
56
74
|
/**
|
|
57
75
|
* Serializes the inline style.
|
|
58
76
|
* @returns The style attribute text.
|
|
@@ -61,11 +79,11 @@ export class Container {
|
|
|
61
79
|
return styleText(this.style);
|
|
62
80
|
}
|
|
63
81
|
static ɵfac = function Container_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Container)(); };
|
|
64
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Container, selectors: [["div", "mol-container", ""]], hostVars:
|
|
65
|
-
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
82
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Container, selectors: [["div", "mol-container", ""]], hostVars: 6, hostBindings: function Container_HostBindings(rf, ctx) { if (rf & 2) {
|
|
83
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("data-mol-id", ctx.molId());
|
|
66
84
|
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
67
85
|
i0.ɵɵclassMap(ctx.classes());
|
|
68
|
-
} }, inputs: { maxWidth: "maxWidth", centered: "centered", paddingX: "paddingX", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Container_Template(rf, ctx) { if (rf & 1) {
|
|
86
|
+
} }, inputs: { maxWidth: "maxWidth", centered: "centered", paddingX: "paddingX", className: "className", style: "style", testId: "testId", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"] }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Container_Template(rf, ctx) { if (rf & 1) {
|
|
69
87
|
i0.ɵɵprojectionDef();
|
|
70
88
|
i0.ɵɵprojection(0);
|
|
71
89
|
} }, encapsulation: 2 });
|
|
@@ -75,22 +93,35 @@ export class Container {
|
|
|
75
93
|
args: [{
|
|
76
94
|
selector: 'div[mol-container]',
|
|
77
95
|
standalone: true,
|
|
78
|
-
inputs: [
|
|
96
|
+
inputs: [
|
|
97
|
+
'maxWidth',
|
|
98
|
+
'centered',
|
|
99
|
+
'paddingX',
|
|
100
|
+
'className',
|
|
101
|
+
'style',
|
|
102
|
+
'testId',
|
|
103
|
+
'automationId',
|
|
104
|
+
'dataMolId: data-mol-id',
|
|
105
|
+
],
|
|
79
106
|
host: {
|
|
80
107
|
'[class]': 'classes()',
|
|
81
108
|
'[style]': 'hostStyle()',
|
|
82
109
|
'[attr.data-testid]': 'testId',
|
|
110
|
+
'[attr.data-mol-id]': 'molId()',
|
|
83
111
|
},
|
|
84
112
|
template: `<ng-content></ng-content>`,
|
|
85
113
|
}]
|
|
86
114
|
}], null, null); })();
|
|
87
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Container, { className: "Container", filePath: "components/layout.component.ts", lineNumber:
|
|
115
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Container, { className: "Container", filePath: "components/layout.component.ts", lineNumber: 55 }); })();
|
|
88
116
|
/**
|
|
89
117
|
* Flex container component.
|
|
90
118
|
*
|
|
91
119
|
* A numeric or non-preset string gap becomes an inline style.
|
|
92
120
|
*/
|
|
93
121
|
export class Flex {
|
|
122
|
+
host = inject(ElementRef);
|
|
123
|
+
/** The element a caller's ref receives: the host `<div>`. */
|
|
124
|
+
element = hostElement(this.host);
|
|
94
125
|
/** Flex direction. */
|
|
95
126
|
direction = 'row';
|
|
96
127
|
/** Main-axis justification. */
|
|
@@ -107,6 +138,10 @@ export class Flex {
|
|
|
107
138
|
style;
|
|
108
139
|
/** `data-testid`. */
|
|
109
140
|
testId;
|
|
141
|
+
/** `data-mol-id` automation id (React's `automationId`). */
|
|
142
|
+
automationId;
|
|
143
|
+
/** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
|
|
144
|
+
dataMolId;
|
|
110
145
|
/**
|
|
111
146
|
* The current class map.
|
|
112
147
|
* @returns The UIClassMap.
|
|
@@ -130,6 +165,16 @@ export class Flex {
|
|
|
130
165
|
gap: cmGap,
|
|
131
166
|
}), this.className);
|
|
132
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
170
|
+
* @returns The attribute value.
|
|
171
|
+
*/
|
|
172
|
+
molId() {
|
|
173
|
+
return (this.automationId ??
|
|
174
|
+
this.dataMolId ??
|
|
175
|
+
this.host.nativeElement.getAttribute('data-mol-id') ??
|
|
176
|
+
undefined);
|
|
177
|
+
}
|
|
133
178
|
/**
|
|
134
179
|
* Serializes the merged inline style (numeric or custom gaps inline).
|
|
135
180
|
* @returns The style attribute text.
|
|
@@ -143,11 +188,11 @@ export class Flex {
|
|
|
143
188
|
return styleText({ ...this.style, ...gapStyle });
|
|
144
189
|
}
|
|
145
190
|
static ɵfac = function Flex_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Flex)(); };
|
|
146
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Flex, selectors: [["div", "mol-flex", ""]], hostVars:
|
|
147
|
-
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
191
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Flex, selectors: [["div", "mol-flex", ""]], hostVars: 6, hostBindings: function Flex_HostBindings(rf, ctx) { if (rf & 2) {
|
|
192
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("data-mol-id", ctx.molId());
|
|
148
193
|
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
149
194
|
i0.ɵɵclassMap(ctx.classes());
|
|
150
|
-
} }, inputs: { direction: "direction", justify: "justify", align: "align", wrap: "wrap", gap: "gap", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Flex_Template(rf, ctx) { if (rf & 1) {
|
|
195
|
+
} }, inputs: { direction: "direction", justify: "justify", align: "align", wrap: "wrap", gap: "gap", className: "className", style: "style", testId: "testId", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"] }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Flex_Template(rf, ctx) { if (rf & 1) {
|
|
151
196
|
i0.ɵɵprojectionDef();
|
|
152
197
|
i0.ɵɵprojection(0);
|
|
153
198
|
} }, encapsulation: 2 });
|
|
@@ -157,16 +202,28 @@ export class Flex {
|
|
|
157
202
|
args: [{
|
|
158
203
|
selector: 'div[mol-flex]',
|
|
159
204
|
standalone: true,
|
|
160
|
-
inputs: [
|
|
205
|
+
inputs: [
|
|
206
|
+
'direction',
|
|
207
|
+
'justify',
|
|
208
|
+
'align',
|
|
209
|
+
'wrap',
|
|
210
|
+
'gap',
|
|
211
|
+
'className',
|
|
212
|
+
'style',
|
|
213
|
+
'testId',
|
|
214
|
+
'automationId',
|
|
215
|
+
'dataMolId: data-mol-id',
|
|
216
|
+
],
|
|
161
217
|
host: {
|
|
162
218
|
'[class]': 'classes()',
|
|
163
219
|
'[style]': 'hostStyle()',
|
|
164
220
|
'[attr.data-testid]': 'testId',
|
|
221
|
+
'[attr.data-mol-id]': 'molId()',
|
|
165
222
|
},
|
|
166
223
|
template: `<ng-content></ng-content>`,
|
|
167
224
|
}]
|
|
168
225
|
}], null, null); })();
|
|
169
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Flex, { className: "Flex", filePath: "components/layout.component.ts", lineNumber:
|
|
226
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Flex, { className: "Flex", filePath: "components/layout.component.ts", lineNumber: 149 }); })();
|
|
170
227
|
/**
|
|
171
228
|
* Grid container component.
|
|
172
229
|
*
|
|
@@ -174,6 +231,9 @@ export class Flex {
|
|
|
174
231
|
* value. `gap`/`columnGap`/`rowGap` follow the same preset-or-CSS rule as Flex.
|
|
175
232
|
*/
|
|
176
233
|
export class Grid {
|
|
234
|
+
host = inject(ElementRef);
|
|
235
|
+
/** The element a caller's ref receives: the host `<div>`. */
|
|
236
|
+
element = hostElement(this.host);
|
|
177
237
|
/** Column count or `grid-template-columns` value. */
|
|
178
238
|
columns;
|
|
179
239
|
/** `grid-template-rows` value. */
|
|
@@ -190,6 +250,10 @@ export class Grid {
|
|
|
190
250
|
style;
|
|
191
251
|
/** `data-testid`. */
|
|
192
252
|
testId;
|
|
253
|
+
/** `data-mol-id` automation id (React's `automationId`). */
|
|
254
|
+
automationId;
|
|
255
|
+
/** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
|
|
256
|
+
dataMolId;
|
|
193
257
|
/**
|
|
194
258
|
* The current class map.
|
|
195
259
|
* @returns The UIClassMap.
|
|
@@ -210,6 +274,16 @@ export class Grid {
|
|
|
210
274
|
gap: cmGap,
|
|
211
275
|
}), this.className);
|
|
212
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
279
|
+
* @returns The attribute value.
|
|
280
|
+
*/
|
|
281
|
+
molId() {
|
|
282
|
+
return (this.automationId ??
|
|
283
|
+
this.dataMolId ??
|
|
284
|
+
this.host.nativeElement.getAttribute('data-mol-id') ??
|
|
285
|
+
undefined);
|
|
286
|
+
}
|
|
213
287
|
/**
|
|
214
288
|
* Serializes the merged inline style.
|
|
215
289
|
* @returns The style attribute text.
|
|
@@ -238,11 +312,11 @@ export class Grid {
|
|
|
238
312
|
return styleText(gridStyle);
|
|
239
313
|
}
|
|
240
314
|
static ɵfac = function Grid_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Grid)(); };
|
|
241
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Grid, selectors: [["div", "mol-grid", ""]], hostVars:
|
|
242
|
-
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
315
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Grid, selectors: [["div", "mol-grid", ""]], hostVars: 6, hostBindings: function Grid_HostBindings(rf, ctx) { if (rf & 2) {
|
|
316
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("data-mol-id", ctx.molId());
|
|
243
317
|
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
244
318
|
i0.ɵɵclassMap(ctx.classes());
|
|
245
|
-
} }, inputs: { columns: "columns", rows: "rows", gap: "gap", columnGap: "columnGap", rowGap: "rowGap", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Grid_Template(rf, ctx) { if (rf & 1) {
|
|
319
|
+
} }, inputs: { columns: "columns", rows: "rows", gap: "gap", columnGap: "columnGap", rowGap: "rowGap", className: "className", style: "style", testId: "testId", automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"] }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Grid_Template(rf, ctx) { if (rf & 1) {
|
|
246
320
|
i0.ɵɵprojectionDef();
|
|
247
321
|
i0.ɵɵprojection(0);
|
|
248
322
|
} }, encapsulation: 2 });
|
|
@@ -252,16 +326,28 @@ export class Grid {
|
|
|
252
326
|
args: [{
|
|
253
327
|
selector: 'div[mol-grid]',
|
|
254
328
|
standalone: true,
|
|
255
|
-
inputs: [
|
|
329
|
+
inputs: [
|
|
330
|
+
'columns',
|
|
331
|
+
'rows',
|
|
332
|
+
'gap',
|
|
333
|
+
'columnGap',
|
|
334
|
+
'rowGap',
|
|
335
|
+
'className',
|
|
336
|
+
'style',
|
|
337
|
+
'testId',
|
|
338
|
+
'automationId',
|
|
339
|
+
'dataMolId: data-mol-id',
|
|
340
|
+
],
|
|
256
341
|
host: {
|
|
257
342
|
'[class]': 'classes()',
|
|
258
343
|
'[style]': 'hostStyle()',
|
|
259
344
|
'[attr.data-testid]': 'testId',
|
|
345
|
+
'[attr.data-mol-id]': 'molId()',
|
|
260
346
|
},
|
|
261
347
|
template: `<ng-content></ng-content>`,
|
|
262
348
|
}]
|
|
263
349
|
}], null, null); })();
|
|
264
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Grid, { className: "Grid", filePath: "components/layout.component.ts", lineNumber:
|
|
350
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Grid, { className: "Grid", filePath: "components/layout.component.ts", lineNumber: 261 }); })();
|
|
265
351
|
/**
|
|
266
352
|
* Spacer component.
|
|
267
353
|
*
|
|
@@ -269,6 +355,9 @@ export class Grid {
|
|
|
269
355
|
* inline width/height.
|
|
270
356
|
*/
|
|
271
357
|
export class Spacer {
|
|
358
|
+
host = inject(ElementRef);
|
|
359
|
+
/** The element a caller's ref receives: the host `<div>`. */
|
|
360
|
+
element = hostElement(this.host);
|
|
272
361
|
/** Spacer size (preset name, number in px, or CSS value). */
|
|
273
362
|
size = 'md';
|
|
274
363
|
/** Whether the spacer takes width instead of height. */
|
|
@@ -281,6 +370,10 @@ export class Spacer {
|
|
|
281
370
|
testId;
|
|
282
371
|
/** Explicit `aria-hidden` (React stringifies booleans). */
|
|
283
372
|
ariaHidden;
|
|
373
|
+
/** `data-mol-id` automation id (React's `automationId`). */
|
|
374
|
+
automationId;
|
|
375
|
+
/** A `data-mol-id` given as a plain rest attribute (React's `rootProps` precedence). */
|
|
376
|
+
dataMolId;
|
|
284
377
|
/**
|
|
285
378
|
* The `aria-hidden` attribute value (React renders `true` as `"true"`).
|
|
286
379
|
* @returns The attribute text or null.
|
|
@@ -322,6 +415,16 @@ export class Spacer {
|
|
|
322
415
|
? this.cm().displayInlineBlock
|
|
323
416
|
: this.cm().displayBlock, this.className);
|
|
324
417
|
}
|
|
418
|
+
/**
|
|
419
|
+
* The `data-mol-id` value (`automationId` wins over a rest `data-mol-id`).
|
|
420
|
+
* @returns The attribute value.
|
|
421
|
+
*/
|
|
422
|
+
molId() {
|
|
423
|
+
return (this.automationId ??
|
|
424
|
+
this.dataMolId ??
|
|
425
|
+
this.host.nativeElement.getAttribute('data-mol-id') ??
|
|
426
|
+
undefined);
|
|
427
|
+
}
|
|
325
428
|
/**
|
|
326
429
|
* Serializes the merged inline style.
|
|
327
430
|
* @returns The style attribute text.
|
|
@@ -339,26 +442,36 @@ export class Spacer {
|
|
|
339
442
|
return styleText({ ...this.style, ...sizeStyle });
|
|
340
443
|
}
|
|
341
444
|
static ɵfac = function Spacer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Spacer)(); };
|
|
342
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Spacer, selectors: [["div", "mol-spacer", ""]], hostVars:
|
|
343
|
-
i0.ɵɵattribute("data-testid", ctx.testId)("aria-hidden", ctx.ariaHiddenAttr());
|
|
445
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Spacer, selectors: [["div", "mol-spacer", ""]], hostVars: 7, hostBindings: function Spacer_HostBindings(rf, ctx) { if (rf & 2) {
|
|
446
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("data-mol-id", ctx.molId())("aria-hidden", ctx.ariaHiddenAttr());
|
|
344
447
|
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
345
448
|
i0.ɵɵclassMap(ctx.classes());
|
|
346
|
-
} }, inputs: { size: "size", horizontal: "horizontal", className: "className", style: "style", testId: "testId", ariaHidden: [0, "aria-hidden", "ariaHidden"] }, decls: 0, vars: 0, template: function Spacer_Template(rf, ctx) { }, encapsulation: 2 });
|
|
449
|
+
} }, inputs: { size: "size", horizontal: "horizontal", className: "className", style: "style", testId: "testId", ariaHidden: [0, "aria-hidden", "ariaHidden"], automationId: "automationId", dataMolId: [0, "data-mol-id", "dataMolId"] }, decls: 0, vars: 0, template: function Spacer_Template(rf, ctx) { }, encapsulation: 2 });
|
|
347
450
|
}
|
|
348
451
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Spacer, [{
|
|
349
452
|
type: Component,
|
|
350
453
|
args: [{
|
|
351
454
|
selector: 'div[mol-spacer]',
|
|
352
455
|
standalone: true,
|
|
353
|
-
inputs: [
|
|
456
|
+
inputs: [
|
|
457
|
+
'size',
|
|
458
|
+
'horizontal',
|
|
459
|
+
'className',
|
|
460
|
+
'style',
|
|
461
|
+
'testId',
|
|
462
|
+
'ariaHidden: aria-hidden',
|
|
463
|
+
'automationId',
|
|
464
|
+
'dataMolId: data-mol-id',
|
|
465
|
+
],
|
|
354
466
|
host: {
|
|
355
467
|
'[class]': 'classes()',
|
|
356
468
|
'[style]': 'hostStyle()',
|
|
357
469
|
'[attr.data-testid]': 'testId',
|
|
470
|
+
'[attr.data-mol-id]': 'molId()',
|
|
358
471
|
'[attr.aria-hidden]': 'ariaHiddenAttr()',
|
|
359
472
|
},
|
|
360
473
|
template: '',
|
|
361
474
|
}]
|
|
362
475
|
}], null, null); })();
|
|
363
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Spacer, { className: "Spacer", filePath: "components/layout.component.ts", lineNumber:
|
|
476
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Spacer, { className: "Spacer", filePath: "components/layout.component.ts", lineNumber: 386 }); })();
|
|
364
477
|
//# sourceMappingURL=layout.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.component.js","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"layout.component.js","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG7D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAmB,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;AAEjD,yEAAyE;AACzE,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,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
|
|
|
4
4
|
*
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
|
-
import { type AfterViewInit, type DoCheck, ElementRef, type OnDestroy } from '@angular/core';
|
|
7
|
+
import { type AfterViewInit, type DoCheck, ElementRef, type OnDestroy, type TemplateRef } from '@angular/core';
|
|
8
8
|
import type { UIClassMap } from '@molecule/app-ui';
|
|
9
|
+
import { asTemplate, isGiven, nodeText } from '../utilities/node-value.js';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* Props for {@link LoadErrorBanner} (React's `LoadErrorBannerProps`, in
|
|
13
|
+
* Angular's form). Rest props (`data-*`, `aria-*`, `id`) land on the host, so
|
|
14
|
+
* they are not enumerated here.
|
|
15
|
+
*/
|
|
16
|
+
export interface LoadErrorBannerProps {
|
|
17
|
+
/** The primary error line. */
|
|
18
|
+
message?: string | number | TemplateRef<unknown>;
|
|
19
|
+
/** Secondary line under the message. */
|
|
20
|
+
detail?: string | number | TemplateRef<unknown>;
|
|
21
|
+
/** Called when Retry is clicked; a returned promise keeps the button pending. */
|
|
22
|
+
onRetry?: () => void | Promise<void>;
|
|
23
|
+
/** Retry-button label. */
|
|
24
|
+
retryLabel?: string | number | TemplateRef<unknown>;
|
|
25
|
+
/** `data-mol-id` for the retry button (default `load-error-retry`). */
|
|
26
|
+
retryMolId?: string;
|
|
27
|
+
/** Extra classes for the root (React's rest `className`). */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
10
30
|
/**
|
|
11
31
|
* LoadErrorBanner component.
|
|
12
32
|
*
|
|
@@ -18,17 +38,23 @@ import * as i0 from "@angular/core";
|
|
|
18
38
|
*/
|
|
19
39
|
export declare class LoadErrorBanner implements AfterViewInit, DoCheck, OnDestroy {
|
|
20
40
|
/** The primary error line (node-valued prop). */
|
|
21
|
-
message?:
|
|
41
|
+
message?: LoadErrorBannerProps['message'];
|
|
22
42
|
/** Secondary line under the message (node-valued prop). */
|
|
23
|
-
detail?:
|
|
43
|
+
detail?: LoadErrorBannerProps['detail'];
|
|
24
44
|
/** Retry-button label (node-valued prop). */
|
|
25
|
-
retryLabel?:
|
|
45
|
+
retryLabel?: LoadErrorBannerProps['retryLabel'];
|
|
26
46
|
/** `data-mol-id` for the retry button (default `load-error-retry`). */
|
|
27
|
-
retryMolId
|
|
47
|
+
retryMolId?: LoadErrorBannerProps['retryMolId'];
|
|
28
48
|
/** Called when Retry is clicked; a returned promise keeps the button pending. */
|
|
29
|
-
onRetry?:
|
|
49
|
+
onRetry?: LoadErrorBannerProps['onRetry'];
|
|
30
50
|
/** Extra classes for the root (React's rest `className`). */
|
|
31
|
-
className?:
|
|
51
|
+
className?: LoadErrorBannerProps['className'];
|
|
52
|
+
/** Template helpers (templates see only class members). */
|
|
53
|
+
readonly asTemplate: typeof asTemplate;
|
|
54
|
+
/** Renders a plain-string/number node value. */
|
|
55
|
+
readonly nodeText: typeof nodeText;
|
|
56
|
+
/** Whether a node-valued prop was given. */
|
|
57
|
+
readonly isGiven: typeof isGiven;
|
|
32
58
|
/** Whether a retry is in flight. */
|
|
33
59
|
readonly pending: import("@angular/core").WritableSignal<boolean>;
|
|
34
60
|
/** The detail paragraph (always in the template; detached when unused). */
|
|
@@ -83,6 +109,12 @@ export declare class LoadErrorBanner implements AfterViewInit, DoCheck, OnDestro
|
|
|
83
109
|
* Re-reconciles the conditional wrappers on later passes.
|
|
84
110
|
*/
|
|
85
111
|
ngDoCheck(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Whether React would render the detail paragraph (a given node value or
|
|
114
|
+
* projected slot content).
|
|
115
|
+
* @returns True when the detail renders.
|
|
116
|
+
*/
|
|
117
|
+
private detailPresent;
|
|
86
118
|
/** Restores the retry-label capture span on unmount. */
|
|
87
119
|
ngOnDestroy(): void;
|
|
88
120
|
/** Moves the projected retry label onto the retry button (React: no wrapper). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-error-banner.component.d.ts","sourceRoot":"","sources":["../../src/components/load-error-banner.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAEV,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"load-error-banner.component.d.ts","sourceRoot":"","sources":["../../src/components/load-error-banner.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAEV,KAAK,SAAS,EAGd,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;;AAK1E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IAChD,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IAC/C,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IACnD,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,qBAwCa,eAAgB,YAAW,aAAa,EAAE,OAAO,EAAE,SAAS;IACvE,iDAAiD;IACjD,OAAO,CAAC,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAA;IACzC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IAC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IG;IACH,OAAO,CAAC,aAAa;IAIrB,wDAAwD;IACxD,WAAW,IAAI,IAAI;IAKnB,iFAAiF;IACjF,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,WAAW,CAA+B;IAElD;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;yCA5JN,eAAe;2CAAf,eAAe;CAyK3B"}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
import { Component, ElementRef, inject, Renderer2, signal, ViewChild, } from '@angular/core';
|
|
8
8
|
import { useTranslation } from '@molecule/app-angular';
|
|
9
9
|
import { getClassMap } from '@molecule/app-ui';
|
|
10
|
+
import { asTemplate, isGiven, nodeText } from '../utilities/node-value.js';
|
|
10
11
|
import { Alert } from './alert.component.js';
|
|
11
12
|
import { hasNodes, SlotWrapper } from './button.component.js';
|
|
13
|
+
import { MolTemplateOutlet } from './template-outlet.directive.js';
|
|
12
14
|
import * as i0 from "@angular/core";
|
|
13
15
|
const _c0 = ["detailSlot"];
|
|
14
16
|
const _c1 = ["retrySlot"];
|
|
@@ -16,7 +18,16 @@ const _c2 = ["retryLabelSlot"];
|
|
|
16
18
|
const _c3 = [[["", "slot", "message"]], [["", "slot", "detail"]], "*", [["", "slot", "retrylabel"]]];
|
|
17
19
|
const _c4 = ["[slot=message]", "[slot=detail]", "*", "[slot=retryLabel]"];
|
|
18
20
|
const _c5 = () => ({ justify: "start" });
|
|
19
|
-
function
|
|
21
|
+
function LoadErrorBanner_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
i0.ɵɵelementContainer(0, 4);
|
|
23
|
+
i0.ɵɵtext(1);
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
|
+
i0.ɵɵproperty("molTemplateOutlet", ctx_r0.asTemplate(ctx_r0.retryLabel));
|
|
27
|
+
i0.ɵɵadvance();
|
|
28
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.nodeText(ctx_r0.retryLabel), " ");
|
|
29
|
+
} }
|
|
30
|
+
function LoadErrorBanner_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
20
31
|
i0.ɵɵtext(0);
|
|
21
32
|
} if (rf & 2) {
|
|
22
33
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -44,6 +55,12 @@ export class LoadErrorBanner {
|
|
|
44
55
|
onRetry;
|
|
45
56
|
/** Extra classes for the root (React's rest `className`). */
|
|
46
57
|
className;
|
|
58
|
+
/** Template helpers (templates see only class members). */
|
|
59
|
+
asTemplate = asTemplate;
|
|
60
|
+
/** Renders a plain-string/number node value. */
|
|
61
|
+
nodeText = nodeText;
|
|
62
|
+
/** Whether a node-valued prop was given. */
|
|
63
|
+
isGiven = isGiven;
|
|
47
64
|
/** Whether a retry is in flight. */
|
|
48
65
|
pending = signal(false, /* @ts-ignore */
|
|
49
66
|
...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
@@ -115,7 +132,7 @@ export class LoadErrorBanner {
|
|
|
115
132
|
ngAfterViewInit() {
|
|
116
133
|
this.detailParent = this.detailSlot?.nativeElement.parentElement ?? null;
|
|
117
134
|
this.retryParent = this.retrySlot?.nativeElement.parentElement ?? null;
|
|
118
|
-
this.hasDetail =
|
|
135
|
+
this.hasDetail = this.detailPresent();
|
|
119
136
|
this.hasRetryLabel.set(hasNodes(this.retryLabelSlot?.nativeElement));
|
|
120
137
|
this.sync.sync(this.retryLabelSlot?.nativeElement, false, this.retryLabelSlot?.nativeElement.parentElement ?? undefined);
|
|
121
138
|
this.ngDoCheck();
|
|
@@ -124,11 +141,20 @@ export class LoadErrorBanner {
|
|
|
124
141
|
* Re-reconciles the conditional wrappers on later passes.
|
|
125
142
|
*/
|
|
126
143
|
ngDoCheck() {
|
|
144
|
+
this.hasDetail = this.detailPresent();
|
|
127
145
|
this.sync.sync(this.detailSlot?.nativeElement, this.hasDetail, this.detailParent ?? undefined);
|
|
128
146
|
// React renders the retry row exactly when `onRetry` is given.
|
|
129
147
|
this.sync.sync(this.retrySlot?.nativeElement, !!this.onRetry, this.retryParent ?? undefined);
|
|
130
148
|
this.showRetryLabel();
|
|
131
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Whether React would render the detail paragraph (a given node value or
|
|
152
|
+
* projected slot content).
|
|
153
|
+
* @returns True when the detail renders.
|
|
154
|
+
*/
|
|
155
|
+
detailPresent() {
|
|
156
|
+
return isGiven(this.detail) || hasNodes(this.detailSlot?.nativeElement);
|
|
157
|
+
}
|
|
132
158
|
/** Restores the retry-label capture span on unmount. */
|
|
133
159
|
ngOnDestroy() {
|
|
134
160
|
this.visibleNodes = [];
|
|
@@ -182,21 +208,25 @@ export class LoadErrorBanner {
|
|
|
182
208
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.retryLabelSlot = _t.first);
|
|
183
209
|
} }, hostVars: 2, hostBindings: function LoadErrorBanner_HostBindings(rf, ctx) { if (rf & 2) {
|
|
184
210
|
i0.ɵɵclassMap(ctx.className);
|
|
185
|
-
} }, inputs: { message: "message", detail: "detail", retryLabel: "retryLabel", retryMolId: "retryMolId", onRetry: "onRetry" }, ngContentSelectors: _c4, decls:
|
|
211
|
+
} }, inputs: { message: "message", detail: "detail", retryLabel: "retryLabel", retryMolId: "retryMolId", onRetry: "onRetry" }, ngContentSelectors: _c4, decls: 20, vars: 21, consts: [["detailSlot", ""], ["retrySlot", ""], ["retryLabelSlot", ""], ["mol-alert", "", 3, "status", "live"], [3, "molTemplateOutlet"], ["type", "button", 3, "click", "disabled"]], template: function LoadErrorBanner_Template(rf, ctx) { if (rf & 1) {
|
|
186
212
|
i0.ɵɵprojectionDef(_c3);
|
|
187
213
|
i0.ɵɵelementStart(0, "div", 3)(1, "div")(2, "p");
|
|
188
|
-
i0.ɵɵ
|
|
214
|
+
i0.ɵɵelementContainer(3, 4);
|
|
215
|
+
i0.ɵɵprojection(4);
|
|
216
|
+
i0.ɵɵtext(5);
|
|
189
217
|
i0.ɵɵelementEnd();
|
|
190
|
-
i0.ɵɵelementStart(
|
|
191
|
-
i0.ɵɵ
|
|
218
|
+
i0.ɵɵelementStart(6, "p", null, 0);
|
|
219
|
+
i0.ɵɵelementContainer(8, 4);
|
|
220
|
+
i0.ɵɵprojection(9, 1);
|
|
221
|
+
i0.ɵɵtext(10);
|
|
192
222
|
i0.ɵɵelementEnd();
|
|
193
|
-
i0.ɵɵprojection(
|
|
194
|
-
i0.ɵɵelementStart(
|
|
195
|
-
i0.ɵɵlistener("click", function
|
|
196
|
-
i0.ɵɵelementStart(
|
|
197
|
-
i0.ɵɵprojection(
|
|
223
|
+
i0.ɵɵprojection(11, 2);
|
|
224
|
+
i0.ɵɵelementStart(12, "div", null, 1)(14, "button", 5);
|
|
225
|
+
i0.ɵɵlistener("click", function LoadErrorBanner_Template_button_click_14_listener() { return ctx.handleRetry(); });
|
|
226
|
+
i0.ɵɵelementStart(15, "span", null, 2);
|
|
227
|
+
i0.ɵɵprojection(17, 3);
|
|
198
228
|
i0.ɵɵelementEnd();
|
|
199
|
-
i0.ɵɵconditionalCreate(
|
|
229
|
+
i0.ɵɵconditionalCreate(18, LoadErrorBanner_Conditional_18_Template, 2, 2)(19, LoadErrorBanner_Conditional_19_Template, 1, 1);
|
|
200
230
|
i0.ɵɵelementEnd()()()();
|
|
201
231
|
} if (rf & 2) {
|
|
202
232
|
i0.ɵɵproperty("status", "error")("live", false);
|
|
@@ -204,32 +234,46 @@ export class LoadErrorBanner {
|
|
|
204
234
|
i0.ɵɵclassMap(ctx.cm().stack(2));
|
|
205
235
|
i0.ɵɵadvance();
|
|
206
236
|
i0.ɵɵclassMap(ctx.cm().textSize("sm"));
|
|
237
|
+
i0.ɵɵadvance();
|
|
238
|
+
i0.ɵɵproperty("molTemplateOutlet", ctx.asTemplate(ctx.message));
|
|
207
239
|
i0.ɵɵadvance(2);
|
|
240
|
+
i0.ɵɵtextInterpolate1("", ctx.nodeText(ctx.message), " ");
|
|
241
|
+
i0.ɵɵadvance();
|
|
208
242
|
i0.ɵɵclassMap(ctx.detailClasses());
|
|
209
|
-
i0.ɵɵadvance(
|
|
210
|
-
i0.ɵɵ
|
|
243
|
+
i0.ɵɵadvance(2);
|
|
244
|
+
i0.ɵɵproperty("molTemplateOutlet", ctx.asTemplate(ctx.detail));
|
|
245
|
+
i0.ɵɵadvance(2);
|
|
246
|
+
i0.ɵɵtextInterpolate1("", ctx.nodeText(ctx.detail), " ");
|
|
247
|
+
i0.ɵɵadvance(2);
|
|
248
|
+
i0.ɵɵclassMap(ctx.cm().flex(i0.ɵɵpureFunction0(20, _c5)));
|
|
211
249
|
i0.ɵɵadvance(2);
|
|
212
250
|
i0.ɵɵclassMap(ctx.retryClasses());
|
|
213
251
|
i0.ɵɵproperty("disabled", ctx.pending());
|
|
214
252
|
i0.ɵɵattribute("aria-busy", "false")("data-mol-id", ctx.retryMolId);
|
|
215
253
|
i0.ɵɵadvance(4);
|
|
216
|
-
i0.ɵɵconditional(!ctx.hasRetryLabel() ?
|
|
217
|
-
} }, dependencies: [Alert], encapsulation: 2 });
|
|
254
|
+
i0.ɵɵconditional(!ctx.hasRetryLabel() && ctx.isGiven(ctx.retryLabel) ? 18 : !ctx.hasRetryLabel() ? 19 : -1);
|
|
255
|
+
} }, dependencies: [Alert, MolTemplateOutlet], encapsulation: 2 });
|
|
218
256
|
}
|
|
219
257
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadErrorBanner, [{
|
|
220
258
|
type: Component,
|
|
221
259
|
args: [{
|
|
222
260
|
selector: 'div[mol-load-error-banner]',
|
|
223
261
|
standalone: true,
|
|
224
|
-
imports: [Alert],
|
|
262
|
+
imports: [Alert, MolTemplateOutlet],
|
|
225
263
|
inputs: ['message', 'detail', 'retryLabel', 'retryMolId', 'onRetry'],
|
|
226
264
|
host: {
|
|
227
265
|
'[class]': 'className',
|
|
228
266
|
},
|
|
229
267
|
template: `<div mol-alert [status]="'error'" [live]="false">
|
|
230
268
|
<div [class]="cm().stack(2)">
|
|
231
|
-
<p [class]="cm().textSize('sm')"
|
|
232
|
-
|
|
269
|
+
<p [class]="cm().textSize('sm')">
|
|
270
|
+
<ng-container [molTemplateOutlet]="asTemplate(message)"></ng-container
|
|
271
|
+
><ng-content select="[slot=message]"></ng-content>{{ nodeText(message) }}
|
|
272
|
+
</p>
|
|
273
|
+
<p #detailSlot [class]="detailClasses()">
|
|
274
|
+
<ng-container [molTemplateOutlet]="asTemplate(detail)"></ng-container
|
|
275
|
+
><ng-content select="[slot=detail]"></ng-content>{{ nodeText(detail) }}
|
|
276
|
+
</p>
|
|
233
277
|
<ng-content></ng-content>
|
|
234
278
|
<div #retrySlot [class]="cm().flex({ justify: 'start' })">
|
|
235
279
|
<button
|
|
@@ -241,7 +285,10 @@ export class LoadErrorBanner {
|
|
|
241
285
|
(click)="handleRetry()"
|
|
242
286
|
>
|
|
243
287
|
<span #retryLabelSlot><ng-content select="[slot=retryLabel]"></ng-content></span>
|
|
244
|
-
@if (!hasRetryLabel()) {
|
|
288
|
+
@if (!hasRetryLabel() && isGiven(retryLabel)) {
|
|
289
|
+
<ng-container [molTemplateOutlet]="asTemplate(retryLabel)"></ng-container
|
|
290
|
+
>{{ nodeText(retryLabel) }}
|
|
291
|
+
} @else if (!hasRetryLabel()) {
|
|
245
292
|
{{ retryText() }}
|
|
246
293
|
}
|
|
247
294
|
</button>
|
|
@@ -259,5 +306,5 @@ export class LoadErrorBanner {
|
|
|
259
306
|
type: ViewChild,
|
|
260
307
|
args: ['retryLabelSlot']
|
|
261
308
|
}] }); })();
|
|
262
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoadErrorBanner, { className: "LoadErrorBanner", filePath: "components/load-error-banner.component.ts", lineNumber:
|
|
309
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoadErrorBanner, { className: "LoadErrorBanner", filePath: "components/load-error-banner.component.ts", lineNumber: 99 }); })();
|
|
263
310
|
//# sourceMappingURL=load-error-banner.component.js.map
|