@molecule/app-ui-angular 1.5.1 → 1.10.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.
Files changed (128) hide show
  1. package/README.md +780 -362
  2. package/dist/components/checkbox.component.d.ts +5 -1
  3. package/dist/components/checkbox.component.d.ts.map +1 -1
  4. package/dist/components/checkbox.component.js +14 -3
  5. package/dist/components/checkbox.component.js.map +1 -1
  6. package/dist/components/confirm-button.component.d.ts +1 -5
  7. package/dist/components/confirm-button.component.d.ts.map +1 -1
  8. package/dist/components/confirm-button.component.js +15 -11
  9. package/dist/components/confirm-button.component.js.map +1 -1
  10. package/dist/components/confirm-dialog.component.d.ts +1 -5
  11. package/dist/components/confirm-dialog.component.d.ts.map +1 -1
  12. package/dist/components/confirm-dialog.component.js +5 -3
  13. package/dist/components/confirm-dialog.component.js.map +1 -1
  14. package/dist/components/dropdown.component.d.ts +3 -11
  15. package/dist/components/dropdown.component.d.ts.map +1 -1
  16. package/dist/components/dropdown.component.js +54 -97
  17. package/dist/components/dropdown.component.js.map +1 -1
  18. package/dist/components/file-field.component.d.ts +42 -0
  19. package/dist/components/file-field.component.d.ts.map +1 -0
  20. package/dist/components/file-field.component.js +121 -0
  21. package/dist/components/file-field.component.js.map +1 -0
  22. package/dist/components/floating-input.component.d.ts +21 -3
  23. package/dist/components/floating-input.component.d.ts.map +1 -1
  24. package/dist/components/floating-input.component.js +34 -4
  25. package/dist/components/floating-input.component.js.map +1 -1
  26. package/dist/components/form.component.d.ts.map +1 -1
  27. package/dist/components/form.component.js +11 -6
  28. package/dist/components/form.component.js.map +1 -1
  29. package/dist/components/index.d.ts +1 -0
  30. package/dist/components/index.d.ts.map +1 -1
  31. package/dist/components/index.js +1 -0
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/input.component.d.ts +18 -2
  34. package/dist/components/input.component.d.ts.map +1 -1
  35. package/dist/components/input.component.js +37 -11
  36. package/dist/components/input.component.js.map +1 -1
  37. package/dist/components/language-picker.component.d.ts +9 -1
  38. package/dist/components/language-picker.component.d.ts.map +1 -1
  39. package/dist/components/language-picker.component.js +15 -8
  40. package/dist/components/language-picker.component.js.map +1 -1
  41. package/dist/components/load-error-banner.component.d.ts +21 -3
  42. package/dist/components/load-error-banner.component.d.ts.map +1 -1
  43. package/dist/components/load-error-banner.component.js +33 -5
  44. package/dist/components/load-error-banner.component.js.map +1 -1
  45. package/dist/components/modal.component.d.ts +27 -48
  46. package/dist/components/modal.component.d.ts.map +1 -1
  47. package/dist/components/modal.component.js +85 -184
  48. package/dist/components/modal.component.js.map +1 -1
  49. package/dist/components/molecule/input.component.d.ts +7 -0
  50. package/dist/components/molecule/input.component.d.ts.map +1 -1
  51. package/dist/components/molecule/input.component.js +13 -5
  52. package/dist/components/molecule/input.component.js.map +1 -1
  53. package/dist/components/molecule/select.component.d.ts +7 -0
  54. package/dist/components/molecule/select.component.d.ts.map +1 -1
  55. package/dist/components/molecule/select.component.js +13 -5
  56. package/dist/components/molecule/select.component.js.map +1 -1
  57. package/dist/components/page-header.component.d.ts.map +1 -1
  58. package/dist/components/page-header.component.js +22 -21
  59. package/dist/components/page-header.component.js.map +1 -1
  60. package/dist/components/prompt-dialog.component.d.ts +6 -30
  61. package/dist/components/prompt-dialog.component.d.ts.map +1 -1
  62. package/dist/components/prompt-dialog.component.js +25 -56
  63. package/dist/components/prompt-dialog.component.js.map +1 -1
  64. package/dist/components/responsive-app-shell.component.d.ts +16 -34
  65. package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
  66. package/dist/components/responsive-app-shell.component.js +58 -141
  67. package/dist/components/responsive-app-shell.component.js.map +1 -1
  68. package/dist/components/select.component.d.ts +9 -1
  69. package/dist/components/select.component.d.ts.map +1 -1
  70. package/dist/components/select.component.js +16 -7
  71. package/dist/components/select.component.js.map +1 -1
  72. package/dist/components/sidebar-user-card.component.d.ts +5 -1
  73. package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
  74. package/dist/components/sidebar-user-card.component.js +11 -7
  75. package/dist/components/sidebar-user-card.component.js.map +1 -1
  76. package/dist/components/switch.component.d.ts +3 -1
  77. package/dist/components/switch.component.d.ts.map +1 -1
  78. package/dist/components/switch.component.js +9 -2
  79. package/dist/components/switch.component.js.map +1 -1
  80. package/dist/components/textarea.component.d.ts +15 -9
  81. package/dist/components/textarea.component.d.ts.map +1 -1
  82. package/dist/components/textarea.component.js +33 -19
  83. package/dist/components/textarea.component.js.map +1 -1
  84. package/dist/components/theme-toggle.component.d.ts +14 -1
  85. package/dist/components/theme-toggle.component.d.ts.map +1 -1
  86. package/dist/components/theme-toggle.component.js +27 -6
  87. package/dist/components/theme-toggle.component.js.map +1 -1
  88. package/dist/components/toast.component.d.ts +13 -18
  89. package/dist/components/toast.component.d.ts.map +1 -1
  90. package/dist/components/toast.component.js +47 -63
  91. package/dist/components/toast.component.js.map +1 -1
  92. package/dist/components/tooltip.component.d.ts +17 -2
  93. package/dist/components/tooltip.component.d.ts.map +1 -1
  94. package/dist/components/tooltip.component.js +52 -92
  95. package/dist/components/tooltip.component.js.map +1 -1
  96. package/dist/components/user-menu-popover.component.d.ts +16 -8
  97. package/dist/components/user-menu-popover.component.d.ts.map +1 -1
  98. package/dist/components/user-menu-popover.component.js +40 -48
  99. package/dist/components/user-menu-popover.component.js.map +1 -1
  100. package/dist/index.d.ts +8 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +8 -0
  103. package/dist/index.js.map +1 -1
  104. package/dist/utilities/element-props.d.ts +1 -1
  105. package/dist/utilities/element-props.d.ts.map +1 -1
  106. package/dist/utilities/element-props.js +3 -13
  107. package/dist/utilities/element-props.js.map +1 -1
  108. package/dist/utilities/element.d.ts +10 -0
  109. package/dist/utilities/element.d.ts.map +1 -1
  110. package/dist/utilities/element.js +13 -0
  111. package/dist/utilities/element.js.map +1 -1
  112. package/dist/utilities/style.d.ts +6 -16
  113. package/dist/utilities/style.d.ts.map +1 -1
  114. package/dist/utilities/style.js +38 -117
  115. package/dist/utilities/style.js.map +1 -1
  116. package/dist/web-drag.directive.d.ts +25 -0
  117. package/dist/web-drag.directive.d.ts.map +1 -0
  118. package/dist/web-drag.directive.js +43 -0
  119. package/dist/web-drag.directive.js.map +1 -0
  120. package/dist/web-hover.directive.d.ts +24 -0
  121. package/dist/web-hover.directive.d.ts.map +1 -0
  122. package/dist/web-hover.directive.js +42 -0
  123. package/dist/web-hover.directive.js.map +1 -0
  124. package/dist/web-wheel-zoom.directive.d.ts +18 -0
  125. package/dist/web-wheel-zoom.directive.d.ts.map +1 -0
  126. package/dist/web-wheel-zoom.directive.js +28 -0
  127. package/dist/web-wheel-zoom.directive.js.map +1 -0
  128. package/package.json +13 -5
@@ -38,19 +38,19 @@ function LanguagePicker_Conditional_1_Template(rf, ctx) { if (rf & 1) {
38
38
  i0.ɵɵconditionalCreate(3, LanguagePicker_Conditional_1_Conditional_3_Template, 2, 1, "span");
39
39
  i0.ɵɵelementEnd();
40
40
  } if (rf & 2) {
41
- let tmp_7_0;
41
+ let tmp_9_0;
42
42
  const ctx_r0 = i0.ɵɵnextContext();
43
43
  i0.ɵɵstyleMap(ctx_r0.hostStyle());
44
44
  i0.ɵɵclassMap(ctx_r0.classes());
45
- i0.ɵɵattribute("aria-label", ctx_r0.ariaLabel());
45
+ i0.ɵɵattribute("data-mol-id", ctx_r0.automationId ?? "language-picker-trigger")("data-testid", ctx_r0.testId)("aria-label", ctx_r0.ariaLabel());
46
46
  i0.ɵɵadvance(2);
47
47
  i0.ɵɵproperty("name", ctx_r0.icon ?? "globe")("size", ctx_r0.iconSize ?? 16);
48
48
  i0.ɵɵadvance();
49
- i0.ɵɵconditional((tmp_7_0 = ctx_r0.triggerLabel()) ? 3 : -1, tmp_7_0);
49
+ i0.ɵɵconditional((tmp_9_0 = ctx_r0.triggerLabel()) ? 3 : -1, tmp_9_0);
50
50
  } }
51
51
  function LanguagePicker_For_5_Template(rf, ctx) { if (rf & 1) {
52
52
  const _r3 = i0.ɵɵgetCurrentView();
53
- i0.ɵɵelementStart(0, "button", 7);
53
+ i0.ɵɵelementStart(0, "button", 5);
54
54
  i0.ɵɵlistener("click", function LanguagePicker_For_5_Template_button_click_0_listener() { const locale_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.pick(locale_r4.code)); });
55
55
  i0.ɵɵtext(1);
56
56
  i0.ɵɵelementEnd();
@@ -91,6 +91,10 @@ export class LanguagePicker {
91
91
  className;
92
92
  /** Inline style object for the trigger button (React camelCase). */
93
93
  style;
94
+ /** `data-testid` for the trigger button. */
95
+ testId;
96
+ /** `data-mol-id` for the trigger button (React's `automationId`). */
97
+ automationId;
94
98
  /** Optional trigger replacement (a node value rendered as a template). */
95
99
  renderTrigger;
96
100
  /**
@@ -219,8 +223,8 @@ export class LanguagePicker {
219
223
  } if (rf & 2) {
220
224
  let _t;
221
225
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.trigger = _t.first);
222
- } }, inputs: { labelKey: "labelKey", labelDefault: "labelDefault", modalTitleKey: "modalTitleKey", modalTitleDefault: "modalTitleDefault", icon: "icon", iconSize: "iconSize", display: "display", className: "className", style: "style", renderTrigger: "renderTrigger" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], decls: 6, vars: 6, consts: [["trigger", ""], [3, "molTemplateOutlet", "molTemplateOutletContext"], ["type", "button", "data-mol-id", "language-picker-trigger", 3, "class", "style"], ["data-mol-id", "language-picker-modal", 3, "close", "open", "title", "size"], ["type", "button", 3, "class"], ["type", "button", "data-mol-id", "language-picker-trigger", 3, "click"], ["mol-icon-root", "", 3, "name", "size"], ["type", "button", 3, "click"]], template: function LanguagePicker_Template(rf, ctx) { if (rf & 1) {
223
- i0.ɵɵconditionalCreate(0, LanguagePicker_Conditional_0_Template, 1, 2, "ng-container", 1)(1, LanguagePicker_Conditional_1_Template, 4, 8, "button", 2);
226
+ } }, inputs: { labelKey: "labelKey", labelDefault: "labelDefault", modalTitleKey: "modalTitleKey", modalTitleDefault: "modalTitleDefault", icon: "icon", iconSize: "iconSize", display: "display", className: "className", style: "style", testId: "testId", automationId: "automationId", renderTrigger: "renderTrigger" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], decls: 6, vars: 6, consts: [["trigger", ""], [3, "molTemplateOutlet", "molTemplateOutletContext"], ["type", "button", 3, "class", "style"], ["data-mol-id", "language-picker-modal", 3, "close", "open", "title", "size"], ["type", "button", 3, "class"], ["type", "button", 3, "click"], ["mol-icon-root", "", 3, "name", "size"]], template: function LanguagePicker_Template(rf, ctx) { if (rf & 1) {
227
+ i0.ɵɵconditionalCreate(0, LanguagePicker_Conditional_0_Template, 1, 2, "ng-container", 1)(1, LanguagePicker_Conditional_1_Template, 4, 10, "button", 2);
224
228
  i0.ɵɵelementStart(2, "mol-modal", 3);
225
229
  i0.ɵɵlistener("close", function LanguagePicker_Template_mol_modal_close_2_listener() { return ctx.isOpen.set(false); });
226
230
  i0.ɵɵelementStart(3, "div");
@@ -254,6 +258,8 @@ export class LanguagePicker {
254
258
  'display',
255
259
  'className',
256
260
  'style',
261
+ 'testId',
262
+ 'automationId',
257
263
  'renderTrigger',
258
264
  ],
259
265
  template: `@if (asTemplate(renderTrigger); as customTrigger) {
@@ -265,7 +271,8 @@ export class LanguagePicker {
265
271
  <button
266
272
  #trigger
267
273
  type="button"
268
- data-mol-id="language-picker-trigger"
274
+ [attr.data-mol-id]="automationId ?? 'language-picker-trigger'"
275
+ [attr.data-testid]="testId"
269
276
  [attr.aria-label]="ariaLabel()"
270
277
  (click)="open()"
271
278
  [class]="classes()"
@@ -303,5 +310,5 @@ export class LanguagePicker {
303
310
  type: ViewChild,
304
311
  args: ['trigger']
305
312
  }] }); })();
306
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LanguagePicker, { className: "LanguagePicker", filePath: "components/language-picker.component.ts", lineNumber: 129 }); })();
313
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LanguagePicker, { className: "LanguagePicker", filePath: "components/language-picker.component.ts", lineNumber: 136 }); })();
307
314
  //# sourceMappingURL=language-picker.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"language-picker.component.js","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE7F,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;;;;;IA8D5D,2BAGgB;;;IADd,AADA,uCAAmC,mDACQ;;;IAczC,4BAAM;IAAA,YAAW;IAAA,iBAAO;;IAAlB,cAAW;IAAX,yBAAW;;;;IAXrB,oCAQC;IAHC,kLAAS,aAAM,KAAC;;IAIhB,yBAA0E;IAC1E,4FAAgC;IAGlC,iBAAS;;;;IANP,iCAAqB;IADrB,+BAAmB;;IAGA,eAAwB;IAAC,AAAzB,6CAAwB,+BAAwB;IACnE,cAEC;IAFD,qEAEC;;;;IAWC,iCAOC;IAFC,sMAAS,2BAAiB,KAAC;IAG3B,YACF;IAAA,iBAAS;;;;IAHP,kHAAqF;;IAErF,cACF;IADE,+CACF;;AAjEV;;;;;;;;;GASG;AA6DH,MAAM,OAAO,cAAc;IACzB,+EAA+E;IAC/E,QAAQ,CAAk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T,cAAc"}
1
+ {"version":3,"file":"language-picker.component.js","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE7F,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;;;;;IAoE5D,2BAGgB;;;IADd,AADA,uCAAmC,mDACQ;;;IAezC,4BAAM;IAAA,YAAW;IAAA,iBAAO;;IAAlB,cAAW;IAAX,yBAAW;;;;IAZrB,oCASC;IAHC,kLAAS,aAAM,KAAC;;IAIhB,yBAA0E;IAC1E,4FAAgC;IAGlC,iBAAS;;;;IANP,iCAAqB;IADrB,+BAAmB;;IAGA,eAAwB;IAAC,AAAzB,6CAAwB,+BAAwB;IACnE,cAEC;IAFD,qEAEC;;;;IAWC,iCAOC;IAFC,sMAAS,2BAAiB,KAAC;IAG3B,YACF;IAAA,iBAAS;;;;IAHP,kHAAqF;;IAErF,cACF;IADE,+CACF;;AApEV;;;;;;;;;GASG;AAgEH,MAAM,OAAO,cAAc;IACzB,+EAA+E;IAC/E,QAAQ,CAAkC;IAC1C,sEAAsE;IACtE,YAAY,CAAsC;IAClD,0EAA0E;IAC1E,aAAa,CAAuC;IACpD,mFAAmF;IACnF,iBAAiB,CAA2C;IAC5D,mEAAmE;IACnE,IAAI,CAA8B;IA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6
  */
7
- import { type ElementRef, type TemplateRef } from '@angular/core';
7
+ import { type AfterViewChecked, ElementRef, type TemplateRef } from '@angular/core';
8
8
  import type { UIClassMap } from '@molecule/app-ui';
9
9
  import { asTemplate, isGiven, nodeText } from '../utilities/node-value.js';
10
10
  import * as i0 from "@angular/core";
@@ -27,6 +27,10 @@ export interface LoadErrorBannerProps {
27
27
  retryMolId?: string;
28
28
  /** Extra classes for the root (React's rest `className`). */
29
29
  className?: string;
30
+ /** `data-testid` for the root. */
31
+ testId?: string;
32
+ /** `data-mol-id` for the root (React's `automationId`). */
33
+ automationId?: string;
30
34
  }
31
35
  /**
32
36
  * LoadErrorBanner component.
@@ -37,7 +41,7 @@ export interface LoadErrorBannerProps {
37
41
  * as `[slot=message]` / `[slot=detail]` / `[slot=retryLabel]`. The detail
38
42
  * paragraph and the retry row render only when React would render them.
39
43
  */
40
- export declare class LoadErrorBanner {
44
+ export declare class LoadErrorBanner implements AfterViewChecked {
41
45
  /** The primary error line (node-valued prop). */
42
46
  message?: LoadErrorBannerProps['message'];
43
47
  /** Secondary line under the message (node-valued prop). */
@@ -50,6 +54,10 @@ export declare class LoadErrorBanner {
50
54
  onRetry?: LoadErrorBannerProps['onRetry'];
51
55
  /** Extra classes for the root (React's rest `className`). */
52
56
  className?: LoadErrorBannerProps['className'];
57
+ /** `data-testid` for the root. */
58
+ testId?: LoadErrorBannerProps['testId'];
59
+ /** `data-mol-id` for the root (React's `automationId`). */
60
+ automationId?: LoadErrorBannerProps['automationId'];
53
61
  /** Template helpers (templates see only class members). */
54
62
  readonly asTemplate: typeof asTemplate;
55
63
  /** Renders a plain-string/number node value. */
@@ -70,6 +78,16 @@ export declare class LoadErrorBanner {
70
78
  * does not).
71
79
  */
72
80
  private readonly i18n;
81
+ /** The host element, which is React's root `<div>`. */
82
+ private readonly host;
83
+ /** The `data-mol-id` this component last wrote (React's `automationId` wins over a rest `data-mol-id`). */
84
+ private lastWrittenMolId;
85
+ /**
86
+ * Applies React's `rootProps` precedence on the root: a rest `data-mol-id`
87
+ * bound on the tag stays, and `automationId` overrides it when given (and
88
+ * leaves no stale value once cleared).
89
+ */
90
+ ngAfterViewChecked(): void;
73
91
  /** Whether the projected retry label exists (a signal the placement function sets). */
74
92
  private readonly hasRetryLabel;
75
93
  /** Reconciles the detail/retry wrappers and the projected retry label. */
@@ -118,6 +136,6 @@ export declare class LoadErrorBanner {
118
136
  /** Moves the projected retry label onto the retry button (React: no wrapper). */
119
137
  private showRetryLabel;
120
138
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadErrorBanner, never>;
121
- static ɵcmp: i0.ɵɵComponentDeclaration<LoadErrorBanner, "div[mol-load-error-banner]", never, { "message": { "alias": "message"; "required": false; }; "detail": { "alias": "detail"; "required": false; }; "retryLabel": { "alias": "retryLabel"; "required": false; }; "retryMolId": { "alias": "retryMolId"; "required": false; }; "onRetry": { "alias": "onRetry"; "required": false; }; }, {}, never, ["[slot=message]", "[slot=detail]", "*", "[slot=retryLabel]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
139
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadErrorBanner, "div[mol-load-error-banner]", never, { "message": { "alias": "message"; "required": false; }; "detail": { "alias": "detail"; "required": false; }; "retryLabel": { "alias": "retryLabel"; "required": false; }; "retryMolId": { "alias": "retryMolId"; "required": false; }; "onRetry": { "alias": "onRetry"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; }, {}, never, ["[slot=message]", "[slot=detail]", "*", "[slot=retryLabel]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
122
140
  }
123
141
  //# sourceMappingURL=load-error-banner.component.d.ts.map
@@ -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,EAAa,KAAK,UAAU,EAAU,KAAK,W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,CAAC,QAAQ,kBAAW;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,iBAAU;IAE1B,oCAAoC;IACpC,QAAQ,CAAC,OAAO,kDAAgB;IAEhC,2EAA2E;IAClD,UAAU,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAA;IACtE,yEAAyE;IACjD,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IAC9D,qCAAqC;IACR,cAAc,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAA;IAEzE;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC,uFAAuF;IACvF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C,0EAA0E;;IAK1E;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,SAAS,IAAI,MAAM;IAMnB;;;;OAIG;IACH,WAAW,IAAI,IAAI;IAQnB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAUjB;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAIrB,iFAAiF;IACjF,OAAO,CAAC,cAAc;yCAzHX,eAAe;2CAAf,eAAe;CAmI3B"}
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,gBAAgB,EAErB,UAAU,EAGV,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAA;AAUtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;;;AAI1E;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAA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IAChD,QAAQ,CAAC,QAAQ,kBAAW;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,iBAAU;IAE1B,oCAAoC;IACpC,QAAQ,CAAC,OAAO,kDAAgB;IAEhC,2EAA2E;IAClD,UAAU,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAA;IACtE,yEAAyE;IACjD,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IAC9D,qCAAqC;IACR,cAAc,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAA;IAEzE;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC,uDAAuD;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8C;IAEnE,2GAA2G;IAC3G,OAAO,CAAC,gBAAgB,CAAsB;IAE9C;;;;OAIG;IACH,kBAAkB,IAAI,IAAI;IAY1B,uFAAuF;IACvF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C,0EAA0E;;IAK1E;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,SAAS,IAAI,MAAM;IAMnB;;;;OAIG;IACH,WAAW,IAAI,IAAI;IAQnB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAUjB;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAIrB,iFAAiF;IACjF,OAAO,CAAC,cAAc;yCApJX,eAAe;2CAAf,eAAe;CA8J3B"}
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * @module
6
6
  */
7
- import { Component, signal, ViewChild } from '@angular/core';
7
+ import { Component, ElementRef, inject, signal, ViewChild, } from '@angular/core';
8
8
  import { MolPlacement, placeContent, setElementPresent, usePlacement, useTranslation, } from '@molecule/app-angular';
9
9
  import { getClassMap } from '@molecule/app-ui';
10
10
  import { asTemplate, isGiven, nodeText } from '../utilities/node-value.js';
@@ -55,6 +55,10 @@ export class LoadErrorBanner {
55
55
  onRetry;
56
56
  /** Extra classes for the root (React's rest `className`). */
57
57
  className;
58
+ /** `data-testid` for the root. */
59
+ testId;
60
+ /** `data-mol-id` for the root (React's `automationId`). */
61
+ automationId;
58
62
  /** Template helpers (templates see only class members). */
59
63
  asTemplate = asTemplate;
60
64
  /** Renders a plain-string/number node value. */
@@ -76,6 +80,28 @@ export class LoadErrorBanner {
76
80
  * does not).
77
81
  */
78
82
  i18n = useTranslation();
83
+ /** The host element, which is React's root `<div>`. */
84
+ host = inject(ElementRef);
85
+ /** The `data-mol-id` this component last wrote (React's `automationId` wins over a rest `data-mol-id`). */
86
+ lastWrittenMolId = null;
87
+ /**
88
+ * Applies React's `rootProps` precedence on the root: a rest `data-mol-id`
89
+ * bound on the tag stays, and `automationId` overrides it when given (and
90
+ * leaves no stale value once cleared).
91
+ */
92
+ ngAfterViewChecked() {
93
+ const host = this.host.nativeElement;
94
+ const current = host.getAttribute('data-mol-id');
95
+ if (this.automationId !== undefined) {
96
+ if (current !== this.automationId)
97
+ host.setAttribute('data-mol-id', this.automationId);
98
+ this.lastWrittenMolId = this.automationId;
99
+ return;
100
+ }
101
+ if (current !== null && current === this.lastWrittenMolId)
102
+ host.removeAttribute('data-mol-id');
103
+ this.lastWrittenMolId = null;
104
+ }
79
105
  /** Whether the projected retry label exists (a signal the placement function sets). */
80
106
  hasRetryLabel = signal(false, /* @ts-ignore */
81
107
  ...(ngDevMode ? [{ debugName: "hasRetryLabel" }] : /* istanbul ignore next */ []));
@@ -171,9 +197,10 @@ export class LoadErrorBanner {
171
197
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.detailSlot = _t.first);
172
198
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.retrySlot = _t.first);
173
199
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.retryLabelSlot = _t.first);
174
- } }, hostVars: 2, hostBindings: function LoadErrorBanner_HostBindings(rf, ctx) { if (rf & 2) {
200
+ } }, hostVars: 3, hostBindings: function LoadErrorBanner_HostBindings(rf, ctx) { if (rf & 2) {
201
+ i0.ɵɵattribute("data-testid", ctx.testId);
175
202
  i0.ɵɵclassMap(ctx.className);
176
- } }, inputs: { message: "message", detail: "detail", retryLabel: "retryLabel", retryMolId: "retryMolId", onRetry: "onRetry" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], 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) {
203
+ } }, inputs: { message: "message", detail: "detail", retryLabel: "retryLabel", retryMolId: "retryMolId", onRetry: "onRetry", testId: "testId", automationId: "automationId" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], 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) {
177
204
  i0.ɵɵprojectionDef(_c3);
178
205
  i0.ɵɵelementStart(0, "div", 3)(1, "div")(2, "p");
179
206
  i0.ɵɵelementContainer(3, 4);
@@ -226,9 +253,10 @@ export class LoadErrorBanner {
226
253
  standalone: true,
227
254
  hostDirectives: [MolPlacement],
228
255
  imports: [Alert, MolTemplateOutlet],
229
- inputs: ['message', 'detail', 'retryLabel', 'retryMolId', 'onRetry'],
256
+ inputs: ['message', 'detail', 'retryLabel', 'retryMolId', 'onRetry', 'testId', 'automationId'],
230
257
  host: {
231
258
  '[class]': 'className',
259
+ '[attr.data-testid]': 'testId',
232
260
  },
233
261
  template: `<div mol-alert [status]="'error'" [live]="false">
234
262
  <div [class]="cm().stack(2)">
@@ -272,5 +300,5 @@ export class LoadErrorBanner {
272
300
  type: ViewChild,
273
301
  args: ['retryLabelSlot']
274
302
  }] }); })();
275
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoadErrorBanner, { className: "LoadErrorBanner", filePath: "components/load-error-banner.component.ts", lineNumber: 95 }); })();
303
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoadErrorBanner, { className: "LoadErrorBanner", filePath: "components/load-error-banner.component.ts", lineNumber: 108 }); })();
276
304
  //# sourceMappingURL=load-error-banner.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-error-banner.component.js","sourceRoot":"","sources":["../../src/components/load-error-banner.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAmB,MAAM,EAAoB,SAAS,EAAE,MAAM,eAAe,CAAA;AAE/F,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EAEjB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;;;;;;;;;IA8DtD,2BACC;IAAA,YACH;;;IAFgB,wEAA4C;IACzD,cACH;IADG,kEACH;;;IACE,YACF;;;IADE,mDACF;;AA5CV;;;;;;;;GAQG;AA0CH,MAAM,OAAO,eAAe;IAC1B,iDAAiD;IACjD,OAAO,CAAkC;IACzC,2DAA2D;IAC3D,MAAM,CAAiC;IACvC,6CAA6C;IAC7C,UAAU,CAAqC;IAC/C,uEAAuE;IACvE,UAAU,GAAwC,kBAAkB,CAAA;IACpE,iFAA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AAE,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC;gBACnC,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC;gBACpE,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;iBACvB;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA8BH;aACR;;kBA0BE,SAAS;mBAAC,YAAY;;kBAEtB,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,gBAAgB;;kFA7BhB,eAAe"}
1
+ {"version":3,"file":"load-error-banner.component.js","sourceRoot":"","sources":["../../src/components/load-error-banner.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,SAAS,EACT,UAAU,EACV,MAAM,EACN,MAAM,EAEN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EAEjB,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;;;;;;;;;;IAmEtD,2BACC;IAAA,YACH;;;IAFgB,wEAA4C;IACzD,cACH;IADG,kEACH;;;IACE,YACF;;;IADE,mDACF;;AA7CV;;;;;;;;GAQG;AA2CH,MAAM,OAAO,eAAe;IAC1B,iDAAiD;IACjD,OAAO,CAAkC;IACzC,2DAA2D;IAC3D,MAAM,CAAiC;IACvC,6CAA6C;IAC7C,UAAU,CAAqC;IAC/C,uEAAuE;IACvE,UAAU,GAAwC,kBAAkB,CAAA;IACpE,iFAAiF;I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Modal component (React parity): a `document.body` portal dialog.
3
- *
4
- * @module
5
- */
6
1
  import { type AfterViewChecked, type AfterViewInit, type DoCheck, ElementRef, EventEmitter, type OnDestroy } from '@angular/core';
7
- import type { ModalSize, MouseEventHandler, UIClassMap } from '@molecule/app-ui';
2
+ import type { ModalSize, MouseEventHandler, OverlayTarget, UIClassMap } from '@molecule/app-ui';
8
3
  import type { HasElement } from '../utilities/element.js';
9
4
  import type { ResolvedIcon } from '../utilities/render-icon.js';
10
5
  import * as i0 from "@angular/core";
@@ -19,6 +14,19 @@ import * as i1 from "@molecule/app-angular";
19
14
  * WAI-ARIA APG modal dialog pattern (focus
20
15
  * into the dialog on open, trapped Tab, focus restored on close, Escape for
21
16
  * the topmost dialog only, reference-counted body scroll lock).
17
+ *
18
+ * Projected content is created with the consumer's view, so a closed modal's body and footer exist
19
+ * while hidden: their components, effects and fetches run. React mounts them only while shown, and
20
+ * again each time they show. Write content with state as `*molLazy` (`MolLazy` from
21
+ * `@molecule/app-angular`): it is created when it shows and destroyed when it hides, as React's is.
22
+ *
23
+ * @example
24
+ * ```html
25
+ * <mol-modal [open]="open" title="Edit profile" (close)="open = false">
26
+ * <form *molLazy>…</form>
27
+ * <div slot="footer" *molLazy><button mol-button (click)="save()">Save</button></div>
28
+ * </mol-modal>
29
+ * ```
22
30
  */
23
31
  export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck, OnDestroy, HasElement<HTMLDivElement> {
24
32
  /** Whether the dialog is open. */
@@ -41,6 +49,8 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
41
49
  closeLabel?: string;
42
50
  /** Whether body scroll is locked while open. */
43
51
  preventScroll: boolean;
52
+ /** The control that takes focus when the dialog opens; the first focusable control without it. */
53
+ initialFocus?: OverlayTarget;
44
54
  /** Extra classes for the dialog. */
45
55
  className?: string;
46
56
  /** Inline style object for the dialog (React camelCase). */
@@ -69,13 +79,10 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
69
79
  footerSlot?: ElementRef<HTMLDivElement>;
70
80
  /** The per-instance title id (the normalizer renumbers it). */
71
81
  readonly titleId: string;
72
- /** The instance's stack id. */
73
- private readonly stackId;
74
82
  private readonly host;
75
- /** Schedules the deferred focus moves from the change-detection hooks. */
76
- private readonly injector;
77
- /** Schedules the focus restore of a destroyed open dialog (the component's own injector is gone). */
83
+ private readonly browser;
78
84
  private readonly environmentInjector;
85
+ private readonly layer;
79
86
  private readonly inner;
80
87
  /** The element a caller's ref receives: the dialog, or `null` while closed. */
81
88
  readonly element: import("@angular/core").Signal<HTMLDivElement | null>;
@@ -87,12 +94,8 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
87
94
  * does not).
88
95
  */
89
96
  private readonly i18n;
90
- private readonly sync;
91
97
  private lastOpen;
92
98
  private lastFooter;
93
- private previouslyFocused;
94
- private listeners;
95
- private locked;
96
99
  /** The `data-mol-id` a caller bound on the host (React spreads it onto the dialog). */
97
100
  private externalMolId;
98
101
  /**
@@ -153,9 +156,7 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
153
156
  * content into `document.body` and applies the initial open state.
154
157
  */
155
158
  ngAfterViewInit(): void;
156
- /**
157
- * Reconciles the open state on later passes.
158
- */
159
+ /** Reconciles open transitions and option changes after the view exists. */
159
160
  ngDoCheck(): void;
160
161
  /**
161
162
  * Follows a `data-mol-id` the caller binds on the tag on every pass: React
@@ -164,7 +165,7 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
164
165
  * {@link setHostRoot}.
165
166
  */
166
167
  ngAfterViewChecked(): void;
167
- /** Removes listeners, unlocks scroll and restores the portal nodes (unmount). */
168
+ /** Releases the layer when its parent destroys the view. */
168
169
  ngOnDestroy(): void;
169
170
  /**
170
171
  * Applies React's `{!!footer && <div className={dialogFooter}>…</div>}`, and
@@ -175,37 +176,15 @@ export declare class Modal implements AfterViewInit, AfterViewChecked, DoCheck,
175
176
  * @param hasContent - Reads whether a slot has content.
176
177
  */
177
178
  private reconcileFooter;
178
- /**
179
- * Applies an open/closed transition (React mounts/unmounts the portal and
180
- * its effects).
181
- *
182
- * @param open - The new open state.
183
- */
184
- private transition;
185
- /**
186
- * Moves focus into the dialog after the render — the WAI-ARIA open focus.
187
- * Deferred out of the change-detection hooks: focusing during one fires the
188
- * dialog's `focusin` listeners while Angular is still checking, and a state
189
- * change they make is never rendered.
190
- */
191
- private focusFirstInDialog;
192
- /** Re-inserts the portal nodes into `document.body` (in React's order). */
179
+ /** Applies a portal transition and updates the open layer’s options. */
180
+ private syncOpen;
181
+ /** Registers the open layer before later overlays can enter the stack. */
182
+ private syncLayer;
183
+ /** Moves the browser dialog to its own body and keeps the server dialog inline. */
193
184
  private attachPortal;
194
- /** Removes the portal nodes from the document (React renders null). */
185
+ /** Removes the portal nodes while closed. */
195
186
  private detachPortal;
196
- /** Locks or unlocks body scroll for React's `open && preventScroll`. */
197
- private syncScrollLock;
198
- /** Adds Escape and the Tab focus trap while open (React's effect). */
199
- private addListeners;
200
- /** Removes the document listeners. */
201
- private removeListeners;
202
- /**
203
- * Escape closes the topmost dialog; Tab wraps inside it.
204
- *
205
- * @param event - The key event.
206
- */
207
- private handleKeyDown;
208
187
  static ɵfac: i0.ɵɵFactoryDeclaration<Modal, never>;
209
- static ɵcmp: i0.ɵɵComponentDeclaration<Modal, "mol-modal", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "closeOnOverlayClick": { "alias": "closeOnOverlayClick"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "centered": { "alias": "centered"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "preventScroll": { "alias": "preventScroll"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onDoubleClick": { "alias": "onDoubleClick"; "required": false; }; }, { "close": "close"; }, never, ["*", "[slot=footer]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
188
+ static ɵcmp: i0.ɵɵComponentDeclaration<Modal, "mol-modal", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "closeOnOverlayClick": { "alias": "closeOnOverlayClick"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; "centered": { "alias": "centered"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "preventScroll": { "alias": "preventScroll"; "required": false; }; "initialFocus": { "alias": "initialFocus"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "automationId": { "alias": "automationId"; "required": false; }; "dataMolId": { "alias": "data-mol-id"; "required": false; }; "onDoubleClick": { "alias": "onDoubleClick"; "required": false; }; }, { "close": "close"; }, never, ["*", "[slot=footer]"], true, [{ directive: typeof i1.MolPlacement; inputs: {}; outputs: {}; }]>;
210
189
  }
211
190
  //# sourceMappingURL=modal.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../src/components/modal.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAEV,YAAY,EAGZ,KAAK,SAAS,EAIf,MAAM,eAAe,CAAA;AAWtB,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAA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