@molecule/app-ui-angular 1.0.6 → 1.1.2
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 +11710 -1117
- package/dist/components/accordion.component.d.ts +114 -0
- package/dist/components/accordion.component.d.ts.map +1 -0
- package/dist/components/accordion.component.js +286 -0
- package/dist/components/accordion.component.js.map +1 -0
- package/dist/components/alert.component.d.ts +81 -37
- package/dist/components/alert.component.d.ts.map +1 -1
- package/dist/components/alert.component.js +232 -146
- package/dist/components/alert.component.js.map +1 -1
- package/dist/components/auth-guard.component.d.ts +94 -0
- package/dist/components/auth-guard.component.d.ts.map +1 -0
- package/dist/components/auth-guard.component.js +212 -0
- package/dist/components/auth-guard.component.js.map +1 -0
- package/dist/components/avatar.component.d.ts +97 -0
- package/dist/components/avatar.component.d.ts.map +1 -0
- package/dist/components/avatar.component.js +216 -0
- package/dist/components/avatar.component.js.map +1 -0
- package/dist/components/badge.component.d.ts +27 -12
- package/dist/components/badge.component.d.ts.map +1 -1
- package/dist/components/badge.component.js +47 -47
- package/dist/components/badge.component.js.map +1 -1
- package/dist/components/button.component.d.ts +96 -14
- package/dist/components/button.component.d.ts.map +1 -1
- package/dist/components/button.component.js +232 -87
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/card.component.d.ts +135 -0
- package/dist/components/card.component.d.ts.map +1 -0
- package/dist/components/card.component.js +291 -0
- package/dist/components/card.component.js.map +1 -0
- package/dist/components/checkbox.component.d.ts +97 -29
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +222 -117
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-button.component.d.ts +130 -0
- package/dist/components/confirm-button.component.d.ts.map +1 -0
- package/dist/components/confirm-button.component.js +322 -0
- package/dist/components/confirm-button.component.js.map +1 -0
- package/dist/components/confirm-dialog.component.d.ts +60 -0
- package/dist/components/confirm-dialog.component.d.ts.map +1 -0
- package/dist/components/confirm-dialog.component.js +152 -0
- package/dist/components/confirm-dialog.component.js.map +1 -0
- package/dist/components/controlled-checked.directive.d.ts +45 -0
- package/dist/components/controlled-checked.directive.d.ts.map +1 -0
- package/dist/components/controlled-checked.directive.js +74 -0
- package/dist/components/controlled-checked.directive.js.map +1 -0
- package/dist/components/dropdown.component.d.ts +313 -0
- package/dist/components/dropdown.component.d.ts.map +1 -0
- package/dist/components/dropdown.component.js +919 -0
- package/dist/components/dropdown.component.js.map +1 -0
- package/dist/components/empty-state.component.d.ts +73 -0
- package/dist/components/empty-state.component.d.ts.map +1 -0
- package/dist/components/empty-state.component.js +180 -0
- package/dist/components/empty-state.component.js.map +1 -0
- package/dist/components/floating-input.component.d.ts +86 -0
- package/dist/components/floating-input.component.d.ts.map +1 -0
- package/dist/components/floating-input.component.js +167 -0
- package/dist/components/floating-input.component.js.map +1 -0
- package/dist/components/form-field.component.d.ts +111 -0
- package/dist/components/form-field.component.d.ts.map +1 -0
- package/dist/components/form-field.component.js +300 -0
- package/dist/components/form-field.component.js.map +1 -0
- package/dist/components/form.component.d.ts +77 -0
- package/dist/components/form.component.d.ts.map +1 -0
- package/dist/components/form.component.js +222 -0
- package/dist/components/form.component.js.map +1 -0
- package/dist/components/icon.component.d.ts +85 -0
- package/dist/components/icon.component.d.ts.map +1 -0
- package/dist/components/icon.component.js +187 -0
- package/dist/components/icon.component.js.map +1 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +49 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.component.d.ts +157 -54
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +437 -222
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/label.component.d.ts +29 -0
- package/dist/components/label.component.d.ts.map +1 -0
- package/dist/components/label.component.js +60 -0
- package/dist/components/label.component.js.map +1 -0
- package/dist/components/language-picker.component.d.ts +124 -0
- package/dist/components/language-picker.component.d.ts.map +1 -0
- package/dist/components/language-picker.component.js +305 -0
- package/dist/components/language-picker.component.js.map +1 -0
- package/dist/components/layout.component.d.ts +167 -0
- package/dist/components/layout.component.d.ts.map +1 -0
- package/dist/components/layout.component.js +364 -0
- package/dist/components/layout.component.js.map +1 -0
- package/dist/components/load-error-banner.component.d.ts +103 -0
- package/dist/components/load-error-banner.component.d.ts.map +1 -0
- package/dist/components/load-error-banner.component.js +263 -0
- package/dist/components/load-error-banner.component.js.map +1 -0
- package/dist/components/modal.component.d.ts +125 -95
- package/dist/components/modal.component.d.ts.map +1 -1
- package/dist/components/modal.component.js +458 -271
- package/dist/components/modal.component.js.map +1 -1
- package/dist/components/molecule/alert.component.d.ts +77 -0
- package/dist/components/molecule/alert.component.d.ts.map +1 -0
- package/dist/components/molecule/alert.component.js +229 -0
- package/dist/components/molecule/alert.component.js.map +1 -0
- package/dist/components/molecule/badge.component.d.ts +27 -0
- package/dist/components/molecule/badge.component.d.ts.map +1 -0
- package/dist/components/molecule/badge.component.js +79 -0
- package/dist/components/molecule/badge.component.js.map +1 -0
- package/dist/components/molecule/button.component.d.ts +38 -0
- package/dist/components/molecule/button.component.d.ts.map +1 -0
- package/dist/components/molecule/button.component.js +137 -0
- package/dist/components/molecule/button.component.js.map +1 -0
- package/dist/components/molecule/checkbox.component.d.ts +53 -0
- package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
- package/dist/components/molecule/checkbox.component.js +166 -0
- package/dist/components/molecule/checkbox.component.js.map +1 -0
- package/dist/components/molecule/index.d.ts +18 -0
- package/dist/components/molecule/index.d.ts.map +1 -0
- package/dist/components/molecule/index.js +18 -0
- package/dist/components/molecule/index.js.map +1 -0
- package/dist/components/molecule/input.component.d.ts +93 -0
- package/dist/components/molecule/input.component.d.ts.map +1 -0
- package/dist/components/molecule/input.component.js +314 -0
- package/dist/components/molecule/input.component.js.map +1 -0
- package/dist/components/molecule/modal.component.d.ts +148 -0
- package/dist/components/molecule/modal.component.d.ts.map +1 -0
- package/dist/components/molecule/modal.component.js +382 -0
- package/dist/components/molecule/modal.component.js.map +1 -0
- package/dist/components/molecule/radio-group.component.d.ts +63 -0
- package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
- package/dist/components/molecule/radio-group.component.js +208 -0
- package/dist/components/molecule/radio-group.component.js.map +1 -0
- package/dist/components/molecule/select.component.d.ts +72 -0
- package/dist/components/molecule/select.component.d.ts.map +1 -0
- package/dist/components/molecule/select.component.js +274 -0
- package/dist/components/molecule/select.component.js.map +1 -0
- package/dist/components/molecule/spinner.component.d.ts +42 -0
- package/dist/components/molecule/spinner.component.d.ts.map +1 -0
- package/dist/components/molecule/spinner.component.js +122 -0
- package/dist/components/molecule/spinner.component.js.map +1 -0
- package/dist/components/molecule/switch.component.d.ts +54 -0
- package/dist/components/molecule/switch.component.d.ts.map +1 -0
- package/dist/components/molecule/switch.component.js +148 -0
- package/dist/components/molecule/switch.component.js.map +1 -0
- package/dist/components/molecule/toast.component.d.ts +98 -0
- package/dist/components/molecule/toast.component.d.ts.map +1 -0
- package/dist/components/molecule/toast.component.js +305 -0
- package/dist/components/molecule/toast.component.js.map +1 -0
- package/dist/components/molecule/tooltip.component.d.ts +77 -0
- package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
- package/dist/components/molecule/tooltip.component.js +316 -0
- package/dist/components/molecule/tooltip.component.js.map +1 -0
- package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
- package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
- package/dist/components/optimistic-toggle-button.component.js +296 -0
- package/dist/components/optimistic-toggle-button.component.js.map +1 -0
- package/dist/components/page-header.component.d.ts +77 -0
- package/dist/components/page-header.component.d.ts.map +1 -0
- package/dist/components/page-header.component.js +225 -0
- package/dist/components/page-header.component.js.map +1 -0
- package/dist/components/page-shell.component.d.ts +101 -0
- package/dist/components/page-shell.component.d.ts.map +1 -0
- package/dist/components/page-shell.component.js +221 -0
- package/dist/components/page-shell.component.js.map +1 -0
- package/dist/components/pagination.component.d.ts +137 -0
- package/dist/components/pagination.component.d.ts.map +1 -0
- package/dist/components/pagination.component.js +419 -0
- package/dist/components/pagination.component.js.map +1 -0
- package/dist/components/panel-close.component.d.ts +43 -0
- package/dist/components/panel-close.component.d.ts.map +1 -0
- package/dist/components/panel-close.component.js +75 -0
- package/dist/components/panel-close.component.js.map +1 -0
- package/dist/components/progress.component.d.ts +84 -0
- package/dist/components/progress.component.d.ts.map +1 -0
- package/dist/components/progress.component.js +219 -0
- package/dist/components/progress.component.js.map +1 -0
- package/dist/components/prompt-dialog.component.d.ts +121 -0
- package/dist/components/prompt-dialog.component.d.ts.map +1 -0
- package/dist/components/prompt-dialog.component.js +332 -0
- package/dist/components/prompt-dialog.component.js.map +1 -0
- package/dist/components/radio-group.component.d.ts +66 -34
- package/dist/components/radio-group.component.d.ts.map +1 -1
- package/dist/components/radio-group.component.js +157 -134
- package/dist/components/radio-group.component.js.map +1 -1
- package/dist/components/responsive-app-shell.component.d.ts +408 -0
- package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
- package/dist/components/responsive-app-shell.component.js +1144 -0
- package/dist/components/responsive-app-shell.component.js.map +1 -0
- package/dist/components/select.component.d.ts +135 -38
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +373 -181
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/separator.component.d.ts +39 -0
- package/dist/components/separator.component.d.ts.map +1 -0
- package/dist/components/separator.component.js +73 -0
- package/dist/components/separator.component.js.map +1 -0
- package/dist/components/sidebar-user-card.component.d.ts +106 -0
- package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
- package/dist/components/sidebar-user-card.component.js +277 -0
- package/dist/components/sidebar-user-card.component.js.map +1 -0
- package/dist/components/skeleton.component.d.ts +100 -0
- package/dist/components/skeleton.component.d.ts.map +1 -0
- package/dist/components/skeleton.component.js +214 -0
- package/dist/components/skeleton.component.js.map +1 -0
- package/dist/components/spinner.component.d.ts +36 -19
- package/dist/components/spinner.component.d.ts.map +1 -1
- package/dist/components/spinner.component.js +69 -71
- package/dist/components/spinner.component.js.map +1 -1
- package/dist/components/switch.component.d.ts +72 -29
- package/dist/components/switch.component.d.ts.map +1 -1
- package/dist/components/switch.component.js +168 -95
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/table.component.d.ts +193 -0
- package/dist/components/table.component.d.ts.map +1 -0
- package/dist/components/table.component.js +550 -0
- package/dist/components/table.component.js.map +1 -0
- package/dist/components/tabs.component.d.ts +140 -0
- package/dist/components/tabs.component.d.ts.map +1 -0
- package/dist/components/tabs.component.js +390 -0
- package/dist/components/tabs.component.js.map +1 -0
- package/dist/components/template-outlet.directive.d.ts +50 -0
- package/dist/components/template-outlet.directive.d.ts.map +1 -0
- package/dist/components/template-outlet.directive.js +81 -0
- package/dist/components/template-outlet.directive.js.map +1 -0
- package/dist/components/textarea.component.d.ts +151 -0
- package/dist/components/textarea.component.d.ts.map +1 -0
- package/dist/components/textarea.component.js +340 -0
- package/dist/components/textarea.component.js.map +1 -0
- package/dist/components/theme-toggle.component.d.ts +58 -0
- package/dist/components/theme-toggle.component.d.ts.map +1 -0
- package/dist/components/theme-toggle.component.js +124 -0
- package/dist/components/theme-toggle.component.js.map +1 -0
- package/dist/components/toast.component.d.ts +237 -49
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +636 -201
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +95 -45
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +372 -221
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +283 -0
- package/dist/components/user-menu-popover.component.d.ts.map +1 -0
- package/dist/components/user-menu-popover.component.js +646 -0
- package/dist/components/user-menu-popover.component.js.map +1 -0
- package/dist/components/user-menu.component.d.ts +95 -0
- package/dist/components/user-menu.component.d.ts.map +1 -0
- package/dist/components/user-menu.component.js +218 -0
- package/dist/components/user-menu.component.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-is-desktop.d.ts +22 -0
- package/dist/hooks/use-is-desktop.d.ts.map +1 -0
- package/dist/hooks/use-is-desktop.js +37 -0
- package/dist/hooks/use-is-desktop.js.map +1 -0
- package/dist/index.d.ts +32 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -17
- 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/dom-context.d.ts +42 -0
- package/dist/utilities/dom-context.d.ts.map +1 -0
- package/dist/utilities/dom-context.js +66 -0
- package/dist/utilities/dom-context.js.map +1 -0
- package/dist/utilities/focus.d.ts +32 -0
- package/dist/utilities/focus.d.ts.map +1 -0
- package/dist/utilities/focus.js +47 -0
- package/dist/utilities/focus.js.map +1 -0
- package/dist/utilities/form-field-context.d.ts +34 -0
- package/dist/utilities/form-field-context.d.ts.map +1 -0
- package/dist/utilities/form-field-context.js +28 -0
- package/dist/utilities/form-field-context.js.map +1 -0
- package/dist/utilities/form-submit-error.d.ts +17 -0
- package/dist/utilities/form-submit-error.d.ts.map +1 -0
- package/dist/utilities/form-submit-error.js +42 -0
- package/dist/utilities/form-submit-error.js.map +1 -0
- package/dist/utilities/icon-markup.d.ts +17 -0
- package/dist/utilities/icon-markup.d.ts.map +1 -0
- package/dist/utilities/icon-markup.js +46 -0
- package/dist/utilities/icon-markup.js.map +1 -0
- package/dist/utilities/ids.d.ts +15 -0
- package/dist/utilities/ids.d.ts.map +1 -0
- package/dist/utilities/ids.js +19 -0
- package/dist/utilities/ids.js.map +1 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +11 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/initials.d.ts +13 -0
- package/dist/utilities/initials.d.ts.map +1 -0
- package/dist/utilities/initials.js +23 -0
- package/dist/utilities/initials.js.map +1 -0
- package/dist/utilities/node-value.d.ts +31 -0
- package/dist/utilities/node-value.d.ts.map +1 -0
- package/dist/utilities/node-value.js +37 -0
- package/dist/utilities/node-value.js.map +1 -0
- package/dist/utilities/optimistic-value.d.ts +81 -0
- package/dist/utilities/optimistic-value.d.ts.map +1 -0
- package/dist/utilities/optimistic-value.js +154 -0
- package/dist/utilities/optimistic-value.js.map +1 -0
- package/dist/utilities/render-icon.d.ts +77 -7
- package/dist/utilities/render-icon.d.ts.map +1 -1
- package/dist/utilities/render-icon.js +123 -33
- package/dist/utilities/render-icon.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +21 -0
- package/dist/utilities/rest-attrs.d.ts.map +1 -0
- package/dist/utilities/rest-attrs.js +37 -0
- package/dist/utilities/rest-attrs.js.map +1 -0
- package/dist/utilities/style.d.ts +23 -0
- package/dist/utilities/style.d.ts.map +1 -0
- package/dist/utilities/style.js +86 -0
- package/dist/utilities/style.js.map +1 -0
- package/package.json +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../src/components/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,SAAS,EAET,UAAU,EACV,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,UAAU,EAAqB,WAAW,EAAE,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;YACvB,cAA+B;YAA/B,wCAA+B;YAElC,eAIC;YAJD,8EAIC;YAYD,eAAmB;YAAnB,4BAAmB;YAJnB,uCAAqB;;YAWlB,eAAgC;YAAhC,yCAAgC;YACnC,eASC;YATD,sDASC;YACK,cAAwB;YAAxB,iCAAwB;YAE5B,eAIC;YAJD,mFAIC;YAIP,eAEC;YAFD,qCAEC;YACD,cAEC;YAFD,kDAEC;4BArFO,UAAU,EAAE,gBAAgB;;iFAuF3B,KAAK;cA1FjB,SAAS;eAAC;gBACT,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;gBACvC,MAAM,EAAE;oBACN,MAAM;oBACN,MAAM;oBACN,OAAO;oBACP,OAAO;oBACP,OAAO;oBACP,MAAM;oBACN,aAAa;oBACb,cAAc;oBACd,WAAW;oBACX,YAAY;oBACZ,WAAW;oBACX,OAAO;oBACP,QAAQ;oBACR,UAAU;oBACV,UAAU;oBACV,OAAO;oBACP,cAAc;oBACd,aAAa;oBACb,MAAM;oBACN,IAAI;iBACL;gBACD,IAAI,EAAE;oBACJ,SAAS,EAAE,mBAAmB;iBAC/B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2DN;aACL;;kBA4CE,MAAM;;kBAEN,MAAM;;kBAGN,SAAS;mBAAC,SAAS;;kBAEnB,SAAS;mBAAC,UAAU;;kBAEpB,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,YAAY;;kFAtDZ,KAAK"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Label component.
|
|
5
|
+
*
|
|
6
|
+
* A `<label>` with the class map's label styles; `required` switches to the
|
|
7
|
+
* required variant and `htmlFor` renders the `for` attribute.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Label {
|
|
10
|
+
/** Whether the label renders its required marker. */
|
|
11
|
+
required?: boolean;
|
|
12
|
+
/** Extra classes. */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** The associated control's id (`for` attribute). */
|
|
15
|
+
htmlFor?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The current class map.
|
|
18
|
+
* @returns The UIClassMap.
|
|
19
|
+
*/
|
|
20
|
+
cm(): UIClassMap;
|
|
21
|
+
/**
|
|
22
|
+
* Computes the label class list.
|
|
23
|
+
* @returns The class string.
|
|
24
|
+
*/
|
|
25
|
+
classes(): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Label, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Label, "label[mol-label]", never, { "required": { "alias": "required"; "required": false; }; "className": { "alias": "className"; "required": false; }; "htmlFor": { "alias": "htmlFor"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=label.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.component.d.ts","sourceRoot":"","sources":["../../src/components/label.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGlD;;;;;GAKG;AACH,qBAUa,KAAK;IAChB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;yCApBN,KAAK;2CAAL,KAAK;CAuBjB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label component (React parity).
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { Component } from '@angular/core';
|
|
7
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
const _c0 = ["*"];
|
|
10
|
+
/**
|
|
11
|
+
* Label component.
|
|
12
|
+
*
|
|
13
|
+
* A `<label>` with the class map's label styles; `required` switches to the
|
|
14
|
+
* required variant and `htmlFor` renders the `for` attribute.
|
|
15
|
+
*/
|
|
16
|
+
export class Label {
|
|
17
|
+
/** Whether the label renders its required marker. */
|
|
18
|
+
required;
|
|
19
|
+
/** Extra classes. */
|
|
20
|
+
className;
|
|
21
|
+
/** The associated control's id (`for` attribute). */
|
|
22
|
+
htmlFor;
|
|
23
|
+
/**
|
|
24
|
+
* The current class map.
|
|
25
|
+
* @returns The UIClassMap.
|
|
26
|
+
*/
|
|
27
|
+
cm() {
|
|
28
|
+
return getClassMap();
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Computes the label class list.
|
|
32
|
+
* @returns The class string.
|
|
33
|
+
*/
|
|
34
|
+
classes() {
|
|
35
|
+
return this.cm().cn(this.cm().label({ required: !!this.required }), this.className);
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = function Label_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Label)(); };
|
|
38
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Label, selectors: [["label", "mol-label", ""]], hostVars: 3, hostBindings: function Label_HostBindings(rf, ctx) { if (rf & 2) {
|
|
39
|
+
i0.ɵɵattribute("for", ctx.htmlFor);
|
|
40
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
41
|
+
} }, inputs: { required: "required", className: "className", htmlFor: "htmlFor" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Label_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
i0.ɵɵprojectionDef();
|
|
43
|
+
i0.ɵɵprojection(0);
|
|
44
|
+
} }, encapsulation: 2 });
|
|
45
|
+
}
|
|
46
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Label, [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: 'label[mol-label]',
|
|
50
|
+
standalone: true,
|
|
51
|
+
inputs: ['required', 'className', 'htmlFor'],
|
|
52
|
+
host: {
|
|
53
|
+
'[class]': 'classes()',
|
|
54
|
+
'[attr.for]': 'htmlFor',
|
|
55
|
+
},
|
|
56
|
+
template: `<ng-content></ng-content>`,
|
|
57
|
+
}]
|
|
58
|
+
}], null, null); })();
|
|
59
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Label, { className: "Label", filePath: "components/label.component.ts", lineNumber: 28 }); })();
|
|
60
|
+
//# sourceMappingURL=label.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.component.js","sourceRoot":"","sources":["../../src/components/label.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;AAE9C;;;;;GAKG;AAWH,MAAM,OAAO,KAAK;IAChB,qDAAqD;IACrD,QAAQ,CAAU;IAClB,qBAAqB;IACrB,SAAS,CAAS;IAClB,qDAAqD;IACrD,OAAO,CAAS;IAEhB;;;OAGG;IACH,EAAE;QACA,OAAO,WAAW,EAAE,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACrF,CAAC;+FAtBU,KAAK;6DAAL,KAAK;;YAAL,cAAA,aACZ,CADiB;;;YAFL,kBAAyB;;;iFAEzB,KAAK;cAVjB,SAAS;eAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;gBAC5C,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,YAAY,EAAE,SAAS;iBACxB;gBACD,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,KAAK"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LanguagePicker component (React parity): a globe trigger that opens a
|
|
3
|
+
* modal grid of the registered locales.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type AfterViewInit, type DoCheck, ElementRef, TemplateRef } from '@angular/core';
|
|
8
|
+
import type { IconName } from '@molecule/app-icons';
|
|
9
|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* LanguagePicker component.
|
|
13
|
+
*
|
|
14
|
+
* React's root is a FRAGMENT (trigger button + locale modal), so the host is
|
|
15
|
+
* unwrapped (`data-parity-unwrap`, `display: contents`). Rest props (`title`,
|
|
16
|
+
* `data-*`, `aria-*`, native event handlers) are spread onto the trigger
|
|
17
|
+
* button in React; here they land on the host and are moved onto it.
|
|
18
|
+
*/
|
|
19
|
+
export declare class LanguagePicker implements AfterViewInit, DoCheck {
|
|
20
|
+
/** i18n key for the trigger label / aria-label (default `footer.language`). */
|
|
21
|
+
labelKey?: string;
|
|
22
|
+
/** Fallback label if the i18n key is missing (default `Language`). */
|
|
23
|
+
labelDefault?: string;
|
|
24
|
+
/** i18n key for the modal title (default `languagePicker.modalTitle`). */
|
|
25
|
+
modalTitleKey?: string;
|
|
26
|
+
/** Fallback modal title if the i18n key is missing (default `Choose language`). */
|
|
27
|
+
modalTitleDefault?: string;
|
|
28
|
+
/** Icon glyph before the current locale name (default `globe`). */
|
|
29
|
+
icon?: IconName;
|
|
30
|
+
/** Pixel size for the rendered icon (default 16). */
|
|
31
|
+
iconSize?: number;
|
|
32
|
+
/** What the trigger renders: the locale name, its code, or the icon only. */
|
|
33
|
+
display: 'name' | 'code' | 'icon';
|
|
34
|
+
/** Extra classes appended to the trigger button. */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Inline style object for the trigger button (React camelCase). */
|
|
37
|
+
style?: Record<string, unknown>;
|
|
38
|
+
/** Optional trigger replacement (a node value rendered as a template). */
|
|
39
|
+
renderTrigger?: unknown;
|
|
40
|
+
/** The default trigger button. */
|
|
41
|
+
trigger?: ElementRef<HTMLButtonElement>;
|
|
42
|
+
/** Whether the locale modal is open. */
|
|
43
|
+
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* i18n state: locale, locale list and the async setter. Its `t` reads the
|
|
46
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
47
|
+
* does not).
|
|
48
|
+
*/
|
|
49
|
+
readonly i18n: import("@molecule/app-angular").UseTranslationResult;
|
|
50
|
+
private readonly host;
|
|
51
|
+
private readonly renderer;
|
|
52
|
+
private movedRest;
|
|
53
|
+
/**
|
|
54
|
+
* The current class map.
|
|
55
|
+
* @returns The UIClassMap.
|
|
56
|
+
*/
|
|
57
|
+
cm(): UIClassMap;
|
|
58
|
+
/**
|
|
59
|
+
* The trigger's accessible label.
|
|
60
|
+
* @returns The label text.
|
|
61
|
+
*/
|
|
62
|
+
ariaLabel(): string;
|
|
63
|
+
/**
|
|
64
|
+
* The modal title.
|
|
65
|
+
* @returns The title text.
|
|
66
|
+
*/
|
|
67
|
+
modalTitle(): string;
|
|
68
|
+
/**
|
|
69
|
+
* The trigger's class list.
|
|
70
|
+
* @returns The class string.
|
|
71
|
+
*/
|
|
72
|
+
classes(): string;
|
|
73
|
+
/**
|
|
74
|
+
* Serializes the trigger's inline style.
|
|
75
|
+
* @returns The style attribute text.
|
|
76
|
+
*/
|
|
77
|
+
hostStyle(): string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Narrows a node-valued prop to a TemplateRef.
|
|
80
|
+
*
|
|
81
|
+
* @param value - The prop value.
|
|
82
|
+
* @returns The template, or null.
|
|
83
|
+
*/
|
|
84
|
+
asTemplate(value: unknown): TemplateRef<unknown> | null;
|
|
85
|
+
/**
|
|
86
|
+
* The active locale code.
|
|
87
|
+
* @returns The code.
|
|
88
|
+
*/
|
|
89
|
+
currentLocale(): string;
|
|
90
|
+
/**
|
|
91
|
+
* The registered locales, sorted by native name (React sorts a copy).
|
|
92
|
+
* @returns The sorted locales.
|
|
93
|
+
*/
|
|
94
|
+
sortedLocales(): {
|
|
95
|
+
code: string;
|
|
96
|
+
name: string;
|
|
97
|
+
}[];
|
|
98
|
+
/**
|
|
99
|
+
* The trigger's text (React's `display` switch).
|
|
100
|
+
* @returns The text, or null for the icon-only display.
|
|
101
|
+
*/
|
|
102
|
+
triggerLabel(): string | null;
|
|
103
|
+
/** Opens the locale modal. */
|
|
104
|
+
open(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Switches the locale and closes the modal (React's option click).
|
|
107
|
+
* @param code - The locale code.
|
|
108
|
+
*/
|
|
109
|
+
pick(code: string): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Moves React's rest props (title, data-*, aria-*, native handlers) from
|
|
112
|
+
* the host onto the trigger button, and drops the capture wrapper.
|
|
113
|
+
*/
|
|
114
|
+
ngAfterViewInit(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Re-applies rest attributes on later passes (a props step may add them).
|
|
117
|
+
*/
|
|
118
|
+
ngDoCheck(): void;
|
|
119
|
+
/** Moves any host rest attributes onto the trigger button. */
|
|
120
|
+
private syncRest;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LanguagePicker, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LanguagePicker, "mol-language-picker", never, { "labelKey": { "alias": "labelKey"; "required": false; }; "labelDefault": { "alias": "labelDefault"; "required": false; }; "modalTitleKey": { "alias": "modalTitleKey"; "required": false; }; "modalTitleDefault": { "alias": "modalTitleDefault"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "display": { "alias": "display"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "renderTrigger": { "alias": "renderTrigger"; "required": false; }; }, {}, never, never, true, never>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=language-picker.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-picker.component.d.ts","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAIV,WAAW,EAEZ,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AASlD;;;;;;;GAOG;AACH,qBA4Da,cAAe,YAAW,aAAa,EAAE,OAAO;IAC3D,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mEAAmE;IACnE,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAS;IAC1C,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAA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ens a
|
|
3
|
+
* modal grid of the registered locales.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { Component, ElementRef, inject, Renderer2, signal, TemplateRef, ViewChild, } from '@angular/core';
|
|
8
|
+
import { useTranslation } from '@molecule/app-angular';
|
|
9
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
10
|
+
import { moveRestAttributes } from '../utilities/rest-attrs.js';
|
|
11
|
+
import { styleText } from '../utilities/style.js';
|
|
12
|
+
import { Icon } from './icon.component.js';
|
|
13
|
+
import { Modal } from './modal.component.js';
|
|
14
|
+
import { MolTemplateOutlet } from './template-outlet.directive.js';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
const _c0 = ["trigger"];
|
|
17
|
+
const _forTrack0 = ($index, $item) => $item.code;
|
|
18
|
+
function LanguagePicker_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementContainer(0, 1);
|
|
20
|
+
} if (rf & 2) {
|
|
21
|
+
i0.ɵɵproperty("molTemplateOutlet", ctx);
|
|
22
|
+
} }
|
|
23
|
+
function LanguagePicker_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelementStart(0, "span");
|
|
25
|
+
i0.ɵɵtext(1);
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
} if (rf & 2) {
|
|
28
|
+
i0.ɵɵadvance();
|
|
29
|
+
i0.ɵɵtextInterpolate(ctx);
|
|
30
|
+
} }
|
|
31
|
+
function LanguagePicker_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
33
|
+
i0.ɵɵelementStart(0, "button", 5, 0);
|
|
34
|
+
i0.ɵɵlistener("click", function LanguagePicker_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.open()); });
|
|
35
|
+
i0.ɵɵnamespaceSVG();
|
|
36
|
+
i0.ɵɵelement(2, "svg", 6);
|
|
37
|
+
i0.ɵɵconditionalCreate(3, LanguagePicker_Conditional_1_Conditional_3_Template, 2, 1, "span");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
} if (rf & 2) {
|
|
40
|
+
let tmp_7_0;
|
|
41
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
42
|
+
i0.ɵɵstyleMap(ctx_r1.hostStyle());
|
|
43
|
+
i0.ɵɵclassMap(ctx_r1.classes());
|
|
44
|
+
i0.ɵɵattribute("aria-label", ctx_r1.ariaLabel());
|
|
45
|
+
i0.ɵɵadvance(2);
|
|
46
|
+
i0.ɵɵproperty("name", ctx_r1.icon ?? "globe")("size", ctx_r1.iconSize ?? 16);
|
|
47
|
+
i0.ɵɵadvance();
|
|
48
|
+
i0.ɵɵconditional((tmp_7_0 = ctx_r1.triggerLabel()) ? 3 : -1, tmp_7_0);
|
|
49
|
+
} }
|
|
50
|
+
function LanguagePicker_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
52
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
53
|
+
i0.ɵɵlistener("click", function LanguagePicker_For_5_Template_button_click_0_listener() { const locale_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pick(locale_r4.code)); });
|
|
54
|
+
i0.ɵɵtext(1);
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const locale_r4 = ctx.$implicit;
|
|
58
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
59
|
+
i0.ɵɵclassMap(locale_r4.code === ctx_r1.currentLocale() ? ctx_r1.cm().languageActive : ctx_r1.cm().languageOption);
|
|
60
|
+
i0.ɵɵattribute("data-mol-id", "language-picker-option-" + locale_r4.code)("data-active", locale_r4.code === ctx_r1.currentLocale() ? "true" : null)("aria-pressed", locale_r4.code === ctx_r1.currentLocale() ? "true" : "false");
|
|
61
|
+
i0.ɵɵadvance();
|
|
62
|
+
i0.ɵɵtextInterpolate1(" ", locale_r4.name, " ");
|
|
63
|
+
} }
|
|
64
|
+
/**
|
|
65
|
+
* LanguagePicker component.
|
|
66
|
+
*
|
|
67
|
+
* React's root is a FRAGMENT (trigger button + locale modal), so the host is
|
|
68
|
+
* unwrapped (`data-parity-unwrap`, `display: contents`). Rest props (`title`,
|
|
69
|
+
* `data-*`, `aria-*`, native event handlers) are spread onto the trigger
|
|
70
|
+
* button in React; here they land on the host and are moved onto it.
|
|
71
|
+
*/
|
|
72
|
+
export class LanguagePicker {
|
|
73
|
+
/** i18n key for the trigger label / aria-label (default `footer.language`). */
|
|
74
|
+
labelKey;
|
|
75
|
+
/** Fallback label if the i18n key is missing (default `Language`). */
|
|
76
|
+
labelDefault;
|
|
77
|
+
/** i18n key for the modal title (default `languagePicker.modalTitle`). */
|
|
78
|
+
modalTitleKey;
|
|
79
|
+
/** Fallback modal title if the i18n key is missing (default `Choose language`). */
|
|
80
|
+
modalTitleDefault;
|
|
81
|
+
/** Icon glyph before the current locale name (default `globe`). */
|
|
82
|
+
icon;
|
|
83
|
+
/** Pixel size for the rendered icon (default 16). */
|
|
84
|
+
iconSize;
|
|
85
|
+
/** What the trigger renders: the locale name, its code, or the icon only. */
|
|
86
|
+
display = 'name';
|
|
87
|
+
/** Extra classes appended to the trigger button. */
|
|
88
|
+
className;
|
|
89
|
+
/** Inline style object for the trigger button (React camelCase). */
|
|
90
|
+
style;
|
|
91
|
+
/** Optional trigger replacement (a node value rendered as a template). */
|
|
92
|
+
renderTrigger;
|
|
93
|
+
/** The default trigger button. */
|
|
94
|
+
trigger;
|
|
95
|
+
/** Whether the locale modal is open. */
|
|
96
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
98
|
+
/**
|
|
99
|
+
* i18n state: locale, locale list and the async setter. Its `t` reads the
|
|
100
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
101
|
+
* does not).
|
|
102
|
+
*/
|
|
103
|
+
i18n = useTranslation();
|
|
104
|
+
host = inject(ElementRef);
|
|
105
|
+
renderer = inject(Renderer2);
|
|
106
|
+
movedRest = false;
|
|
107
|
+
/**
|
|
108
|
+
* The current class map.
|
|
109
|
+
* @returns The UIClassMap.
|
|
110
|
+
*/
|
|
111
|
+
cm() {
|
|
112
|
+
return getClassMap();
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The trigger's accessible label.
|
|
116
|
+
* @returns The label text.
|
|
117
|
+
*/
|
|
118
|
+
ariaLabel() {
|
|
119
|
+
return this.i18n.t(this.labelKey ?? 'footer.language', {}, {
|
|
120
|
+
defaultValue: this.labelDefault ?? 'Language',
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The modal title.
|
|
125
|
+
* @returns The title text.
|
|
126
|
+
*/
|
|
127
|
+
modalTitle() {
|
|
128
|
+
return this.i18n.t(this.modalTitleKey ?? 'languagePicker.modalTitle', {}, {
|
|
129
|
+
defaultValue: this.modalTitleDefault ?? 'Choose language',
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The trigger's class list.
|
|
134
|
+
* @returns The class string.
|
|
135
|
+
*/
|
|
136
|
+
classes() {
|
|
137
|
+
return this.cm().cn(this.cm().languagePickerTrigger, this.className);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Serializes the trigger's inline style.
|
|
141
|
+
* @returns The style attribute text.
|
|
142
|
+
*/
|
|
143
|
+
hostStyle() {
|
|
144
|
+
return styleText(this.style);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Narrows a node-valued prop to a TemplateRef.
|
|
148
|
+
*
|
|
149
|
+
* @param value - The prop value.
|
|
150
|
+
* @returns The template, or null.
|
|
151
|
+
*/
|
|
152
|
+
asTemplate(value) {
|
|
153
|
+
return value instanceof TemplateRef ? value : null;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The active locale code.
|
|
157
|
+
* @returns The code.
|
|
158
|
+
*/
|
|
159
|
+
currentLocale() {
|
|
160
|
+
return this.i18n.locale();
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The registered locales, sorted by native name (React sorts a copy).
|
|
164
|
+
* @returns The sorted locales.
|
|
165
|
+
*/
|
|
166
|
+
sortedLocales() {
|
|
167
|
+
return [...this.i18n.locales()].sort((a, b) => a.name.localeCompare(b.name));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The trigger's text (React's `display` switch).
|
|
171
|
+
* @returns The text, or null for the icon-only display.
|
|
172
|
+
*/
|
|
173
|
+
triggerLabel() {
|
|
174
|
+
if (this.display === 'icon')
|
|
175
|
+
return null;
|
|
176
|
+
if (this.display === 'code')
|
|
177
|
+
return this.currentLocale();
|
|
178
|
+
const current = this.sortedLocales().find((locale) => locale.code === this.currentLocale());
|
|
179
|
+
return current?.name ?? this.currentLocale();
|
|
180
|
+
}
|
|
181
|
+
/** Opens the locale modal. */
|
|
182
|
+
open() {
|
|
183
|
+
this.isOpen.set(true);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Switches the locale and closes the modal (React's option click).
|
|
187
|
+
* @param code - The locale code.
|
|
188
|
+
*/
|
|
189
|
+
async pick(code) {
|
|
190
|
+
await this.i18n.setLocale(code);
|
|
191
|
+
this.isOpen.set(false);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Moves React's rest props (title, data-*, aria-*, native handlers) from
|
|
195
|
+
* the host onto the trigger button, and drops the capture wrapper.
|
|
196
|
+
*/
|
|
197
|
+
ngAfterViewInit() {
|
|
198
|
+
this.syncRest();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Re-applies rest attributes on later passes (a props step may add them).
|
|
202
|
+
*/
|
|
203
|
+
ngDoCheck() {
|
|
204
|
+
this.syncRest();
|
|
205
|
+
}
|
|
206
|
+
/** Moves any host rest attributes onto the trigger button. */
|
|
207
|
+
syncRest() {
|
|
208
|
+
const trigger = this.trigger?.nativeElement;
|
|
209
|
+
if (!trigger || this.movedRest)
|
|
210
|
+
return;
|
|
211
|
+
moveRestAttributes(this.host.nativeElement, trigger);
|
|
212
|
+
this.movedRest = true;
|
|
213
|
+
}
|
|
214
|
+
static ɵfac = function LanguagePicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LanguagePicker)(); };
|
|
215
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LanguagePicker, selectors: [["mol-language-picker"]], viewQuery: function LanguagePicker_Query(rf, ctx) { if (rf & 1) {
|
|
216
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
217
|
+
} if (rf & 2) {
|
|
218
|
+
let _t;
|
|
219
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.trigger = _t.first);
|
|
220
|
+
} }, hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], inputs: { labelKey: "labelKey", labelDefault: "labelDefault", modalTitleKey: "modalTitleKey", modalTitleDefault: "modalTitleDefault", icon: "icon", iconSize: "iconSize", display: "display", className: "className", style: "style", renderTrigger: "renderTrigger" }, decls: 6, vars: 6, consts: [["trigger", ""], [3, "molTemplateOutlet"], ["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) {
|
|
221
|
+
i0.ɵɵconditionalCreate(0, LanguagePicker_Conditional_0_Template, 1, 1, "ng-container", 1)(1, LanguagePicker_Conditional_1_Template, 4, 8, "button", 2);
|
|
222
|
+
i0.ɵɵelementStart(2, "mol-modal", 3);
|
|
223
|
+
i0.ɵɵlistener("close", function LanguagePicker_Template_mol_modal_close_2_listener() { return ctx.isOpen.set(false); });
|
|
224
|
+
i0.ɵɵelementStart(3, "div");
|
|
225
|
+
i0.ɵɵrepeaterCreate(4, LanguagePicker_For_5_Template, 2, 6, "button", 4, _forTrack0);
|
|
226
|
+
i0.ɵɵelementEnd()();
|
|
227
|
+
} if (rf & 2) {
|
|
228
|
+
let tmp_0_0;
|
|
229
|
+
i0.ɵɵconditional((tmp_0_0 = ctx.asTemplate(ctx.renderTrigger)) ? 0 : 1, tmp_0_0);
|
|
230
|
+
i0.ɵɵadvance(2);
|
|
231
|
+
i0.ɵɵproperty("open", ctx.isOpen())("title", ctx.modalTitle())("size", "lg");
|
|
232
|
+
i0.ɵɵadvance();
|
|
233
|
+
i0.ɵɵclassMap(ctx.cm().languageGrid);
|
|
234
|
+
i0.ɵɵadvance();
|
|
235
|
+
i0.ɵɵrepeater(ctx.sortedLocales());
|
|
236
|
+
} }, dependencies: [Icon, Modal, MolTemplateOutlet], encapsulation: 2 });
|
|
237
|
+
}
|
|
238
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LanguagePicker, [{
|
|
239
|
+
type: Component,
|
|
240
|
+
args: [{
|
|
241
|
+
selector: 'mol-language-picker',
|
|
242
|
+
standalone: true,
|
|
243
|
+
imports: [Icon, Modal, MolTemplateOutlet],
|
|
244
|
+
inputs: [
|
|
245
|
+
'labelKey',
|
|
246
|
+
'labelDefault',
|
|
247
|
+
'modalTitleKey',
|
|
248
|
+
'modalTitleDefault',
|
|
249
|
+
'icon',
|
|
250
|
+
'iconSize',
|
|
251
|
+
'display',
|
|
252
|
+
'className',
|
|
253
|
+
'style',
|
|
254
|
+
'renderTrigger',
|
|
255
|
+
],
|
|
256
|
+
host: {
|
|
257
|
+
'data-parity-unwrap': '',
|
|
258
|
+
style: 'display: contents',
|
|
259
|
+
},
|
|
260
|
+
template: `@if (asTemplate(renderTrigger); as customTrigger) {
|
|
261
|
+
<ng-container [molTemplateOutlet]="customTrigger"></ng-container>
|
|
262
|
+
} @else {
|
|
263
|
+
<button
|
|
264
|
+
#trigger
|
|
265
|
+
type="button"
|
|
266
|
+
data-mol-id="language-picker-trigger"
|
|
267
|
+
[attr.aria-label]="ariaLabel()"
|
|
268
|
+
(click)="open()"
|
|
269
|
+
[class]="classes()"
|
|
270
|
+
[style]="hostStyle()"
|
|
271
|
+
>
|
|
272
|
+
<svg mol-icon-root [name]="icon ?? 'globe'" [size]="iconSize ?? 16"></svg>
|
|
273
|
+
@if (triggerLabel(); as label) {
|
|
274
|
+
<span>{{ label }}</span>
|
|
275
|
+
}
|
|
276
|
+
</button>
|
|
277
|
+
}
|
|
278
|
+
<mol-modal
|
|
279
|
+
[open]="isOpen()"
|
|
280
|
+
(close)="isOpen.set(false)"
|
|
281
|
+
[title]="modalTitle()"
|
|
282
|
+
[size]="'lg'"
|
|
283
|
+
data-mol-id="language-picker-modal"
|
|
284
|
+
><div [class]="cm().languageGrid">
|
|
285
|
+
@for (locale of sortedLocales(); track locale.code) {
|
|
286
|
+
<button
|
|
287
|
+
type="button"
|
|
288
|
+
[attr.data-mol-id]="'language-picker-option-' + locale.code"
|
|
289
|
+
[attr.data-active]="locale.code === currentLocale() ? 'true' : null"
|
|
290
|
+
[attr.aria-pressed]="locale.code === currentLocale() ? 'true' : 'false'"
|
|
291
|
+
(click)="pick(locale.code)"
|
|
292
|
+
[class]="locale.code === currentLocale() ? cm().languageActive : cm().languageOption"
|
|
293
|
+
>
|
|
294
|
+
{{ locale.name }}
|
|
295
|
+
</button>
|
|
296
|
+
}
|
|
297
|
+
</div></mol-modal
|
|
298
|
+
>`,
|
|
299
|
+
}]
|
|
300
|
+
}], null, { trigger: [{
|
|
301
|
+
type: ViewChild,
|
|
302
|
+
args: ['trigger']
|
|
303
|
+
}] }); })();
|
|
304
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LanguagePicker, { className: "LanguagePicker", filePath: "components/language-picker.component.ts", lineNumber: 99 }); })();
|
|
305
|
+
//# sourceMappingURL=language-picker.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-picker.component.js","sourceRoot":"","sources":["../../src/components/language-picker.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,SAAS,EAET,UAAU,EACV,MAAM,EACN,SAAS,EACT,MAAM,EACN,WAAW,EACX,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,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;;;;;IA+B5D,2BAAiE;;IAAnD,uCAAmC;;;IAa7C,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;;AA/DV;;;;;;;GAOG;AA6DH,MAAM,OAAO,cAAc;IACzB,+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