@masmarino/gabarit 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -85
- package/accordion/README.md +56 -0
- package/alert/README.md +87 -0
- package/app-shell/README.md +133 -0
- package/auth/README.md +155 -0
- package/auth-activate/README.md +119 -0
- package/auth-login/README.md +113 -0
- package/auth-register/README.md +104 -0
- package/auth-reset-password/README.md +120 -0
- package/autocomplete/README.md +77 -0
- package/avatar/README.md +34 -0
- package/avatar-group/README.md +47 -0
- package/badge/README.md +177 -0
- package/bar-chart/README.md +44 -0
- package/breadcrumb/README.md +38 -0
- package/button/README.md +175 -0
- package/card/README.md +179 -0
- package/checkbox/README.md +50 -0
- package/checkbox-group/README.md +78 -0
- package/confirm-danger-modal/README.md +77 -0
- package/copy-button/README.md +90 -0
- package/copy-field/README.md +54 -0
- package/date-picker/README.md +84 -0
- package/description-list/README.md +63 -0
- package/dimension-card/README.md +39 -0
- package/disclosure/README.md +48 -0
- package/divider/README.md +31 -0
- package/drawer/README.md +49 -0
- package/empty-state/README.md +84 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs +243 -0
- package/fesm2022/masmarino-gabarit-accordion.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-alert.mjs +208 -0
- package/fesm2022/masmarino-gabarit-alert.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs +378 -0
- package/fesm2022/masmarino-gabarit-app-shell.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs +415 -0
- package/fesm2022/masmarino-gabarit-auth-activate.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs +467 -0
- package/fesm2022/masmarino-gabarit-auth-login.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs +457 -0
- package/fesm2022/masmarino-gabarit-auth-register.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs +364 -0
- package/fesm2022/masmarino-gabarit-auth-reset-password.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-auth.mjs +844 -0
- package/fesm2022/masmarino-gabarit-auth.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs +475 -0
- package/fesm2022/masmarino-gabarit-autocomplete.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-avatar-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs +107 -0
- package/fesm2022/masmarino-gabarit-avatar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-badge.mjs +449 -0
- package/fesm2022/masmarino-gabarit-badge.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs +408 -0
- package/fesm2022/masmarino-gabarit-bar-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs +59 -0
- package/fesm2022/masmarino-gabarit-breadcrumb.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-button.mjs +374 -0
- package/fesm2022/masmarino-gabarit-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-card.mjs +400 -0
- package/fesm2022/masmarino-gabarit-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-chart.mjs +1289 -0
- package/fesm2022/masmarino-gabarit-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs +335 -0
- package/fesm2022/masmarino-gabarit-checkbox-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs +170 -0
- package/fesm2022/masmarino-gabarit-checkbox.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs +387 -0
- package/fesm2022/masmarino-gabarit-confirm-danger-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs +407 -0
- package/fesm2022/masmarino-gabarit-copy-button.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs +229 -0
- package/fesm2022/masmarino-gabarit-copy-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs +1242 -0
- package/fesm2022/masmarino-gabarit-date-picker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs +127 -0
- package/fesm2022/masmarino-gabarit-description-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs +162 -0
- package/fesm2022/masmarino-gabarit-dimension-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs +154 -0
- package/fesm2022/masmarino-gabarit-disclosure.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-divider.mjs +90 -0
- package/fesm2022/masmarino-gabarit-divider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-docs.mjs +16 -2
- package/fesm2022/masmarino-gabarit-docs.mjs.map +1 -1
- package/fesm2022/masmarino-gabarit-drawer.mjs +209 -0
- package/fesm2022/masmarino-gabarit-drawer.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs +226 -0
- package/fesm2022/masmarino-gabarit-empty-state.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs +335 -0
- package/fesm2022/masmarino-gabarit-file-upload.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs +24 -0
- package/fesm2022/masmarino-gabarit-floating-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-format.mjs +345 -0
- package/fesm2022/masmarino-gabarit-format.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs +247 -0
- package/fesm2022/masmarino-gabarit-funnel-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs +180 -0
- package/fesm2022/masmarino-gabarit-gauge-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs +127 -0
- package/fesm2022/masmarino-gabarit-git-field.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs +150 -0
- package/fesm2022/masmarino-gabarit-icon-marker.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-icon.mjs +308 -0
- package/fesm2022/masmarino-gabarit-icon.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-input.mjs +493 -0
- package/fesm2022/masmarino-gabarit-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs +216 -0
- package/fesm2022/masmarino-gabarit-job-graph.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs +104 -0
- package/fesm2022/masmarino-gabarit-job-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs +574 -0
- package/fesm2022/masmarino-gabarit-line-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs +320 -0
- package/fesm2022/masmarino-gabarit-list-card.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs +58 -0
- package/fesm2022/masmarino-gabarit-list-row.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs +369 -0
- package/fesm2022/masmarino-gabarit-list-toolbar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-menu.mjs +464 -0
- package/fesm2022/masmarino-gabarit-menu.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs +897 -0
- package/fesm2022/masmarino-gabarit-mfa-enrollment.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs +629 -0
- package/fesm2022/masmarino-gabarit-mfa-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-modal.mjs +260 -0
- package/fesm2022/masmarino-gabarit-modal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs +332 -0
- package/fesm2022/masmarino-gabarit-nav-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs +119 -0
- package/fesm2022/masmarino-gabarit-notification-dot.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs +78 -0
- package/fesm2022/masmarino-gabarit-page-header.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs +157 -0
- package/fesm2022/masmarino-gabarit-page-layout.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs +415 -0
- package/fesm2022/masmarino-gabarit-pagination.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-panel.mjs +80 -0
- package/fesm2022/masmarino-gabarit-panel.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs +606 -0
- package/fesm2022/masmarino-gabarit-passkey-settings.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs +317 -0
- package/fesm2022/masmarino-gabarit-pie-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-popover.mjs +142 -0
- package/fesm2022/masmarino-gabarit-popover.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs +202 -0
- package/fesm2022/masmarino-gabarit-radio-group.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs +142 -0
- package/fesm2022/masmarino-gabarit-save-status.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs +576 -0
- package/fesm2022/masmarino-gabarit-search-bar.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs +348 -0
- package/fesm2022/masmarino-gabarit-secret-reveal.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs +272 -0
- package/fesm2022/masmarino-gabarit-segmented-control.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-select.mjs +512 -0
- package/fesm2022/masmarino-gabarit-select.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs +189 -0
- package/fesm2022/masmarino-gabarit-skeleton-list.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs +109 -0
- package/fesm2022/masmarino-gabarit-skeleton.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-slider.mjs +239 -0
- package/fesm2022/masmarino-gabarit-slider.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs +276 -0
- package/fesm2022/masmarino-gabarit-sparkline.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs +86 -0
- package/fesm2022/masmarino-gabarit-spinner.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs +139 -0
- package/fesm2022/masmarino-gabarit-stat-grid.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs +312 -0
- package/fesm2022/masmarino-gabarit-stat-tile.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs +219 -0
- package/fesm2022/masmarino-gabarit-stepper.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-switch.mjs +151 -0
- package/fesm2022/masmarino-gabarit-switch.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-table.mjs +206 -0
- package/fesm2022/masmarino-gabarit-table.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs +210 -0
- package/fesm2022/masmarino-gabarit-tabs.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs +288 -0
- package/fesm2022/masmarino-gabarit-tag-input.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tag.mjs +155 -0
- package/fesm2022/masmarino-gabarit-tag.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs +369 -0
- package/fesm2022/masmarino-gabarit-textarea.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs +521 -0
- package/fesm2022/masmarino-gabarit-timeline-chart.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs +220 -0
- package/fesm2022/masmarino-gabarit-toaster.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs +185 -0
- package/fesm2022/masmarino-gabarit-tooltip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-tree.mjs +258 -0
- package/fesm2022/masmarino-gabarit-tree.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs +106 -0
- package/fesm2022/masmarino-gabarit-user-chip.mjs.map +1 -0
- package/fesm2022/masmarino-gabarit.mjs +83 -24785
- package/fesm2022/masmarino-gabarit.mjs.map +1 -1
- package/file-upload/README.md +47 -0
- package/funnel-chart/README.md +39 -0
- package/gauge-bar/README.md +35 -0
- package/git-field/README.md +34 -0
- package/icon/README.md +52 -0
- package/icon-marker/README.md +37 -0
- package/input/README.md +120 -0
- package/job-graph/README.md +76 -0
- package/job-status/README.md +34 -0
- package/line-chart/README.md +52 -0
- package/list-card/README.md +144 -0
- package/list-row/README.md +72 -0
- package/list-toolbar/README.md +52 -0
- package/menu/README.md +90 -0
- package/mfa-enrollment/README.md +189 -0
- package/mfa-settings/README.md +154 -0
- package/modal/README.md +72 -0
- package/nav-tabs/README.md +106 -0
- package/notification-dot/README.md +43 -0
- package/package.json +329 -1
- package/page-header/README.md +56 -0
- package/page-layout/README.md +76 -0
- package/pagination/README.md +73 -0
- package/panel/README.md +56 -0
- package/passkey-settings/README.md +120 -0
- package/pie-chart/README.md +85 -0
- package/popover/README.md +62 -0
- package/radio-group/README.md +47 -0
- package/save-status/README.md +44 -0
- package/search-bar/README.md +84 -0
- package/secret-reveal/README.md +60 -0
- package/segmented-control/README.md +79 -0
- package/select/README.md +61 -0
- package/skeleton/README.md +49 -0
- package/skeleton-list/README.md +40 -0
- package/slider/README.md +44 -0
- package/sparkline/README.md +37 -0
- package/spinner/README.md +41 -0
- package/stat-grid/README.md +47 -0
- package/stat-tile/README.md +75 -0
- package/stepper/README.md +67 -0
- package/switch/README.md +51 -0
- package/table/README.md +75 -0
- package/tabs/README.md +34 -0
- package/tag/README.md +34 -0
- package/tag-input/README.md +45 -0
- package/textarea/README.md +76 -0
- package/timeline-chart/README.md +49 -0
- package/toaster/README.md +92 -0
- package/tooltip/README.md +50 -0
- package/tree/README.md +79 -0
- package/types/masmarino-gabarit-accordion.d.ts +54 -0
- package/types/masmarino-gabarit-alert.d.ts +65 -0
- package/types/masmarino-gabarit-app-shell.d.ts +102 -0
- package/types/masmarino-gabarit-auth-activate.d.ts +70 -0
- package/types/masmarino-gabarit-auth-login.d.ts +63 -0
- package/types/masmarino-gabarit-auth-register.d.ts +66 -0
- package/types/masmarino-gabarit-auth-reset-password.d.ts +53 -0
- package/types/masmarino-gabarit-auth.d.ts +543 -0
- package/types/masmarino-gabarit-autocomplete.d.ts +140 -0
- package/types/masmarino-gabarit-avatar-group.d.ts +60 -0
- package/types/masmarino-gabarit-avatar.d.ts +31 -0
- package/types/masmarino-gabarit-badge.d.ts +139 -0
- package/types/masmarino-gabarit-bar-chart.d.ts +111 -0
- package/types/masmarino-gabarit-breadcrumb.d.ts +12 -0
- package/types/masmarino-gabarit-button.d.ts +108 -0
- package/types/masmarino-gabarit-card.d.ts +102 -0
- package/types/masmarino-gabarit-chart.d.ts +361 -0
- package/types/masmarino-gabarit-checkbox-group.d.ts +113 -0
- package/types/masmarino-gabarit-checkbox.d.ts +49 -0
- package/types/masmarino-gabarit-confirm-danger-modal.d.ts +94 -0
- package/types/masmarino-gabarit-copy-button.d.ts +111 -0
- package/types/masmarino-gabarit-copy-field.d.ts +64 -0
- package/types/masmarino-gabarit-date-picker.d.ts +399 -0
- package/types/masmarino-gabarit-description-list.d.ts +40 -0
- package/types/masmarino-gabarit-dimension-card.d.ts +55 -0
- package/types/masmarino-gabarit-disclosure.d.ts +44 -0
- package/types/masmarino-gabarit-divider.d.ts +20 -0
- package/types/masmarino-gabarit-docs.d.ts +2 -1
- package/types/masmarino-gabarit-drawer.d.ts +51 -0
- package/types/masmarino-gabarit-empty-state.d.ts +67 -0
- package/types/masmarino-gabarit-file-upload.d.ts +95 -0
- package/types/masmarino-gabarit-floating-panel.d.ts +14 -0
- package/types/masmarino-gabarit-format.d.ts +54 -0
- package/types/masmarino-gabarit-funnel-chart.d.ts +78 -0
- package/types/masmarino-gabarit-gauge-bar.d.ts +54 -0
- package/types/masmarino-gabarit-git-field.d.ts +39 -0
- package/types/masmarino-gabarit-icon-marker.d.ts +47 -0
- package/types/masmarino-gabarit-icon.d.ts +23 -0
- package/types/masmarino-gabarit-input.d.ts +181 -0
- package/types/masmarino-gabarit-job-graph.d.ts +63 -0
- package/types/masmarino-gabarit-job-status.d.ts +20 -0
- package/types/masmarino-gabarit-line-chart.d.ts +153 -0
- package/types/masmarino-gabarit-list-card.d.ts +87 -0
- package/types/masmarino-gabarit-list-row.d.ts +14 -0
- package/types/masmarino-gabarit-list-toolbar.d.ts +100 -0
- package/types/masmarino-gabarit-menu.d.ts +93 -0
- package/types/masmarino-gabarit-mfa-enrollment.d.ts +142 -0
- package/types/masmarino-gabarit-mfa-settings.d.ts +89 -0
- package/types/masmarino-gabarit-modal.d.ts +60 -0
- package/types/masmarino-gabarit-nav-tabs.d.ts +65 -0
- package/types/masmarino-gabarit-notification-dot.d.ts +34 -0
- package/types/masmarino-gabarit-page-header.d.ts +20 -0
- package/types/masmarino-gabarit-page-layout.d.ts +46 -0
- package/types/masmarino-gabarit-pagination.d.ts +109 -0
- package/types/masmarino-gabarit-panel.d.ts +21 -0
- package/types/masmarino-gabarit-passkey-settings.d.ts +94 -0
- package/types/masmarino-gabarit-pie-chart.d.ts +94 -0
- package/types/masmarino-gabarit-popover.d.ts +33 -0
- package/types/masmarino-gabarit-radio-group.d.ts +66 -0
- package/types/masmarino-gabarit-save-status.d.ts +39 -0
- package/types/masmarino-gabarit-search-bar.d.ts +183 -0
- package/types/masmarino-gabarit-secret-reveal.d.ts +95 -0
- package/types/masmarino-gabarit-segmented-control.d.ts +76 -0
- package/types/masmarino-gabarit-select.d.ts +146 -0
- package/types/masmarino-gabarit-skeleton-list.d.ts +54 -0
- package/types/masmarino-gabarit-skeleton.d.ts +26 -0
- package/types/masmarino-gabarit-slider.d.ts +73 -0
- package/types/masmarino-gabarit-sparkline.d.ts +70 -0
- package/types/masmarino-gabarit-spinner.d.ts +20 -0
- package/types/masmarino-gabarit-stat-grid.d.ts +39 -0
- package/types/masmarino-gabarit-stat-tile.d.ts +79 -0
- package/types/masmarino-gabarit-stepper.d.ts +67 -0
- package/types/masmarino-gabarit-switch.d.ts +42 -0
- package/types/masmarino-gabarit-table.d.ts +60 -0
- package/types/masmarino-gabarit-tabs.d.ts +40 -0
- package/types/masmarino-gabarit-tag-input.d.ts +78 -0
- package/types/masmarino-gabarit-tag.d.ts +35 -0
- package/types/masmarino-gabarit-textarea.d.ts +109 -0
- package/types/masmarino-gabarit-timeline-chart.d.ts +145 -0
- package/types/masmarino-gabarit-toaster.d.ts +62 -0
- package/types/masmarino-gabarit-tooltip.d.ts +39 -0
- package/types/masmarino-gabarit-tree.d.ts +71 -0
- package/types/masmarino-gabarit-user-chip.d.ts +26 -0
- package/types/masmarino-gabarit.d.ts +83 -6599
- package/user-chip/README.md +42 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { LOCALE_ID, Pipe, inject } from "@angular/core";
|
|
3
|
+
const MAX_ENTRIES = 100;
|
|
4
|
+
const cache = /* @__PURE__ */ new Map();
|
|
5
|
+
function cachedIntl(kind, locale, options, create) {
|
|
6
|
+
const key = `${kind}|${locale}|${options === void 0 ? "" : JSON.stringify(options)}`;
|
|
7
|
+
const hit = cache.get(key);
|
|
8
|
+
if (hit !== void 0) return hit;
|
|
9
|
+
if (cache.size >= MAX_ENTRIES) cache.clear();
|
|
10
|
+
const created = create();
|
|
11
|
+
cache.set(key, created);
|
|
12
|
+
return created;
|
|
13
|
+
}
|
|
14
|
+
const NBSP = "\xA0";
|
|
15
|
+
const UNITS = [
|
|
16
|
+
"byte",
|
|
17
|
+
"kilobyte",
|
|
18
|
+
"megabyte",
|
|
19
|
+
"gigabyte",
|
|
20
|
+
"terabyte",
|
|
21
|
+
"petabyte"
|
|
22
|
+
];
|
|
23
|
+
function siLabels(locale) {
|
|
24
|
+
return cachedIntl("bytes-labels", locale, void 0, () => UNITS.map((unit) => {
|
|
25
|
+
return new Intl.NumberFormat(locale, {
|
|
26
|
+
style: "unit",
|
|
27
|
+
unit,
|
|
28
|
+
unitDisplay: "narrow"
|
|
29
|
+
}).formatToParts(1).find((part) => part.type === "unit")?.value ?? unit;
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
const IEC_SYMBOLS = [
|
|
33
|
+
"B",
|
|
34
|
+
"KiB",
|
|
35
|
+
"MiB",
|
|
36
|
+
"GiB",
|
|
37
|
+
"TiB",
|
|
38
|
+
"PiB"
|
|
39
|
+
];
|
|
40
|
+
function label(locale, rank, options) {
|
|
41
|
+
const si = siLabels(locale)[rank];
|
|
42
|
+
if (rank === 0 || options.base === 1e3) return si;
|
|
43
|
+
const capital = si.charAt(0).toUpperCase();
|
|
44
|
+
if (options.binaryUnits === "legacy") return capital + si.slice(1);
|
|
45
|
+
return /^\p{Script=Latin}/u.test(si) ? `${capital}i${si.slice(1)}` : IEC_SYMBOLS[rank];
|
|
46
|
+
}
|
|
47
|
+
function round(value, decimals) {
|
|
48
|
+
const factor = 10 ** decimals;
|
|
49
|
+
return Math.round(value * factor) / factor;
|
|
50
|
+
}
|
|
51
|
+
function formatBytes(bytes, locale, options = {}) {
|
|
52
|
+
if (!Number.isFinite(bytes)) return "—";
|
|
53
|
+
const base = options.base === 1e3 ? 1e3 : 1024;
|
|
54
|
+
const requested = Math.trunc(options.decimals ?? 1);
|
|
55
|
+
const decimals = Number.isFinite(requested) ? Math.max(0, Math.min(20, requested)) : 1;
|
|
56
|
+
const last = UNITS.length - 1;
|
|
57
|
+
let value = Math.abs(bytes);
|
|
58
|
+
let rank = 0;
|
|
59
|
+
while (value >= base && rank < last) {
|
|
60
|
+
value /= base;
|
|
61
|
+
rank++;
|
|
62
|
+
}
|
|
63
|
+
let shown = round(value, rank === 0 ? 0 : decimals);
|
|
64
|
+
if (shown >= base && rank < last) {
|
|
65
|
+
shown = round(shown / base, decimals);
|
|
66
|
+
rank++;
|
|
67
|
+
}
|
|
68
|
+
const signed = bytes < 0 && shown !== 0 ? -shown : shown;
|
|
69
|
+
return `${cachedIntl("bytes-number", locale, { decimals: rank === 0 ? 0 : decimals }, () => new Intl.NumberFormat(locale, {
|
|
70
|
+
minimumFractionDigits: 0,
|
|
71
|
+
maximumFractionDigits: rank === 0 ? 0 : decimals
|
|
72
|
+
})).format(signed)}${NBSP}${label(locale, rank, {
|
|
73
|
+
...options,
|
|
74
|
+
base
|
|
75
|
+
})}`;
|
|
76
|
+
}
|
|
77
|
+
const SECOND = 1e3;
|
|
78
|
+
const MINUTE = 60 * SECOND;
|
|
79
|
+
const HOUR = 60 * MINUTE;
|
|
80
|
+
const DAY = 24 * HOUR;
|
|
81
|
+
const WEEK = 7 * DAY;
|
|
82
|
+
const MONTH = 30 * DAY;
|
|
83
|
+
const YEAR = 365 * DAY;
|
|
84
|
+
const RANKS = [
|
|
85
|
+
[
|
|
86
|
+
"second",
|
|
87
|
+
SECOND,
|
|
88
|
+
MINUTE
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
"minute",
|
|
92
|
+
MINUTE,
|
|
93
|
+
HOUR
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"hour",
|
|
97
|
+
HOUR,
|
|
98
|
+
DAY
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"day",
|
|
102
|
+
DAY,
|
|
103
|
+
WEEK
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"week",
|
|
107
|
+
WEEK,
|
|
108
|
+
MONTH
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
"month",
|
|
112
|
+
MONTH,
|
|
113
|
+
YEAR
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"year",
|
|
117
|
+
YEAR,
|
|
118
|
+
Infinity
|
|
119
|
+
]
|
|
120
|
+
];
|
|
121
|
+
const NOW_WINDOW = 10 * SECOND;
|
|
122
|
+
function toTime(value) {
|
|
123
|
+
return value instanceof Date ? value.getTime() : new Date(value).getTime();
|
|
124
|
+
}
|
|
125
|
+
function relativeFormat(locale, style, numeric) {
|
|
126
|
+
return cachedIntl("relative", locale, {
|
|
127
|
+
style,
|
|
128
|
+
numeric
|
|
129
|
+
}, () => new Intl.RelativeTimeFormat(locale, {
|
|
130
|
+
style,
|
|
131
|
+
numeric
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
function formatRelativeTime(date, locale, now = Date.now(), options = {}) {
|
|
135
|
+
if (date === null || date === void 0) return "";
|
|
136
|
+
const time = toTime(date);
|
|
137
|
+
const reference = toTime(now);
|
|
138
|
+
if (Number.isNaN(time) || Number.isNaN(reference)) return "—";
|
|
139
|
+
const diff = time - reference;
|
|
140
|
+
const gap = Math.abs(diff);
|
|
141
|
+
const sign = diff < 0 ? -1 : 1;
|
|
142
|
+
const style = options.style ?? "long";
|
|
143
|
+
if (options.absoluteAfterDays !== void 0 && gap >= options.absoluteAfterDays * DAY) return formatDateTime(time, locale, {
|
|
144
|
+
day: "2-digit",
|
|
145
|
+
month: "2-digit",
|
|
146
|
+
year: "numeric",
|
|
147
|
+
...options.timeZone ? { timeZone: options.timeZone } : {}
|
|
148
|
+
});
|
|
149
|
+
if (gap < NOW_WINDOW) return relativeFormat(locale, style, "auto").format(0, "second");
|
|
150
|
+
const rtf = relativeFormat(locale, style, options.numeric ?? "auto");
|
|
151
|
+
for (const [unit, size, below] of RANKS) if (gap < below || unit === options.maxUnit) return rtf.format(sign * Math.trunc(gap / size), unit);
|
|
152
|
+
return rtf.format(sign * Math.trunc(gap / YEAR), "year");
|
|
153
|
+
}
|
|
154
|
+
const FIELD_OPTIONS = [
|
|
155
|
+
"dateStyle",
|
|
156
|
+
"timeStyle",
|
|
157
|
+
"weekday",
|
|
158
|
+
"era",
|
|
159
|
+
"year",
|
|
160
|
+
"month",
|
|
161
|
+
"day",
|
|
162
|
+
"dayPeriod",
|
|
163
|
+
"hour",
|
|
164
|
+
"minute",
|
|
165
|
+
"second",
|
|
166
|
+
"fractionalSecondDigits",
|
|
167
|
+
"timeZoneName"
|
|
168
|
+
];
|
|
169
|
+
function selectsFields(options) {
|
|
170
|
+
return options !== void 0 && FIELD_OPTIONS.some((field) => options[field] !== void 0);
|
|
171
|
+
}
|
|
172
|
+
function formatDateTime(date, locale, options) {
|
|
173
|
+
if (date === null || date === void 0) return "";
|
|
174
|
+
const time = toTime(date);
|
|
175
|
+
if (Number.isNaN(time)) return "—";
|
|
176
|
+
const resolved = selectsFields(options) ? options : {
|
|
177
|
+
dateStyle: "medium",
|
|
178
|
+
timeStyle: "short",
|
|
179
|
+
...options
|
|
180
|
+
};
|
|
181
|
+
return cachedIntl("datetime", locale, resolved, () => new Intl.DateTimeFormat(locale, resolved)).format(time);
|
|
182
|
+
}
|
|
183
|
+
var GbtRelativeTimePipe = class GbtRelativeTimePipe {
|
|
184
|
+
localeId = inject(LOCALE_ID);
|
|
185
|
+
transform(value, options = {}) {
|
|
186
|
+
const { locale, now, ...rest } = options;
|
|
187
|
+
return formatRelativeTime(value, locale ?? this.localeId, now, rest);
|
|
188
|
+
}
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
190
|
+
minVersion: "12.0.0",
|
|
191
|
+
version: "22.2.0",
|
|
192
|
+
ngImport: i0,
|
|
193
|
+
type: GbtRelativeTimePipe,
|
|
194
|
+
deps: [],
|
|
195
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
196
|
+
});
|
|
197
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
198
|
+
minVersion: "14.0.0",
|
|
199
|
+
version: "22.2.0",
|
|
200
|
+
ngImport: i0,
|
|
201
|
+
type: GbtRelativeTimePipe,
|
|
202
|
+
isStandalone: true,
|
|
203
|
+
name: "gbtRelativeTime"
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
207
|
+
minVersion: "12.0.0",
|
|
208
|
+
version: "22.2.0",
|
|
209
|
+
ngImport: i0,
|
|
210
|
+
type: GbtRelativeTimePipe,
|
|
211
|
+
decorators: [{
|
|
212
|
+
type: Pipe,
|
|
213
|
+
args: [{
|
|
214
|
+
name: "gbtRelativeTime",
|
|
215
|
+
standalone: true
|
|
216
|
+
}]
|
|
217
|
+
}]
|
|
218
|
+
});
|
|
219
|
+
var GbtBytesPipe = class GbtBytesPipe {
|
|
220
|
+
localeId = inject(LOCALE_ID);
|
|
221
|
+
transform(value, options = {}) {
|
|
222
|
+
if (value === null || value === void 0) return "";
|
|
223
|
+
const { locale, ...rest } = options;
|
|
224
|
+
return formatBytes(value, locale ?? this.localeId, rest);
|
|
225
|
+
}
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
227
|
+
minVersion: "12.0.0",
|
|
228
|
+
version: "22.2.0",
|
|
229
|
+
ngImport: i0,
|
|
230
|
+
type: GbtBytesPipe,
|
|
231
|
+
deps: [],
|
|
232
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
233
|
+
});
|
|
234
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
235
|
+
minVersion: "14.0.0",
|
|
236
|
+
version: "22.2.0",
|
|
237
|
+
ngImport: i0,
|
|
238
|
+
type: GbtBytesPipe,
|
|
239
|
+
isStandalone: true,
|
|
240
|
+
name: "gbtBytes"
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
244
|
+
minVersion: "12.0.0",
|
|
245
|
+
version: "22.2.0",
|
|
246
|
+
ngImport: i0,
|
|
247
|
+
type: GbtBytesPipe,
|
|
248
|
+
decorators: [{
|
|
249
|
+
type: Pipe,
|
|
250
|
+
args: [{
|
|
251
|
+
name: "gbtBytes",
|
|
252
|
+
standalone: true
|
|
253
|
+
}]
|
|
254
|
+
}]
|
|
255
|
+
});
|
|
256
|
+
var GbtDateTimePipe = class GbtDateTimePipe {
|
|
257
|
+
localeId = inject(LOCALE_ID);
|
|
258
|
+
transform(value, options) {
|
|
259
|
+
const { locale, ...rest } = options ?? {};
|
|
260
|
+
return formatDateTime(value, locale ?? this.localeId, rest);
|
|
261
|
+
}
|
|
262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
263
|
+
minVersion: "12.0.0",
|
|
264
|
+
version: "22.2.0",
|
|
265
|
+
ngImport: i0,
|
|
266
|
+
type: GbtDateTimePipe,
|
|
267
|
+
deps: [],
|
|
268
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
269
|
+
});
|
|
270
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
271
|
+
minVersion: "14.0.0",
|
|
272
|
+
version: "22.2.0",
|
|
273
|
+
ngImport: i0,
|
|
274
|
+
type: GbtDateTimePipe,
|
|
275
|
+
isStandalone: true,
|
|
276
|
+
name: "gbtDateTime"
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
280
|
+
minVersion: "12.0.0",
|
|
281
|
+
version: "22.2.0",
|
|
282
|
+
ngImport: i0,
|
|
283
|
+
type: GbtDateTimePipe,
|
|
284
|
+
decorators: [{
|
|
285
|
+
type: Pipe,
|
|
286
|
+
args: [{
|
|
287
|
+
name: "gbtDateTime",
|
|
288
|
+
standalone: true
|
|
289
|
+
}]
|
|
290
|
+
}]
|
|
291
|
+
});
|
|
292
|
+
function formatNumber(value, locale, decimals) {
|
|
293
|
+
return new Intl.NumberFormat(locale, {
|
|
294
|
+
minimumFractionDigits: decimals,
|
|
295
|
+
maximumFractionDigits: decimals
|
|
296
|
+
}).format(value);
|
|
297
|
+
}
|
|
298
|
+
function formatCompact(value, locale) {
|
|
299
|
+
return new Intl.NumberFormat(locale, {
|
|
300
|
+
notation: "compact",
|
|
301
|
+
maximumFractionDigits: 1
|
|
302
|
+
}).format(value);
|
|
303
|
+
}
|
|
304
|
+
function dayLabel(locale) {
|
|
305
|
+
return cachedIntl("day-label", locale, void 0, () => {
|
|
306
|
+
return new Intl.NumberFormat(locale, {
|
|
307
|
+
style: "unit",
|
|
308
|
+
unit: "day",
|
|
309
|
+
unitDisplay: "narrow"
|
|
310
|
+
}).formatToParts(1).find((part) => part.type === "unit")?.value ?? "d";
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function formatDuration(ms, locale, options = {}) {
|
|
314
|
+
if (ms < 1e3) return `${formatNumber(Math.round(ms), locale)} ms`;
|
|
315
|
+
const totalSeconds = Math.round(ms / 1e3);
|
|
316
|
+
const num = (value) => formatNumber(value, locale);
|
|
317
|
+
if (options.days && totalSeconds >= 86400) {
|
|
318
|
+
const days = Math.floor(totalSeconds / 86400);
|
|
319
|
+
const hours = Math.floor(totalSeconds % 86400 / 3600);
|
|
320
|
+
const unit = dayLabel(locale);
|
|
321
|
+
return hours > 0 ? `${num(days)} ${unit} ${num(hours)} h` : `${num(days)} ${unit}`;
|
|
322
|
+
}
|
|
323
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
324
|
+
const minutes = Math.floor(totalSeconds % 3600 / 60);
|
|
325
|
+
const seconds = totalSeconds % 60;
|
|
326
|
+
if (hours > 0) return minutes > 0 ? `${num(hours)} h ${num(minutes)} min` : `${num(hours)} h`;
|
|
327
|
+
if (minutes > 0) return seconds > 0 ? `${num(minutes)} min ${num(seconds)} s` : `${num(minutes)} min`;
|
|
328
|
+
return `${num(seconds)} s`;
|
|
329
|
+
}
|
|
330
|
+
function formatPercent(ratio, locale, decimals = 0) {
|
|
331
|
+
return new Intl.NumberFormat(locale, {
|
|
332
|
+
style: "percent",
|
|
333
|
+
minimumFractionDigits: decimals,
|
|
334
|
+
maximumFractionDigits: decimals
|
|
335
|
+
}).format(ratio);
|
|
336
|
+
}
|
|
337
|
+
function computeInitials(name) {
|
|
338
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
339
|
+
if (words.length === 0) return "";
|
|
340
|
+
if (words.length === 1) return words[0].slice(0, 2).toUpperCase();
|
|
341
|
+
return (words[0][0] + words[words.length - 1][0]).toUpperCase();
|
|
342
|
+
}
|
|
343
|
+
export { GbtBytesPipe, GbtDateTimePipe, GbtRelativeTimePipe, cachedIntl, computeInitials, formatBytes, formatCompact, formatDateTime, formatDuration, formatNumber, formatPercent, formatRelativeTime };
|
|
344
|
+
|
|
345
|
+
//# sourceMappingURL=masmarino-gabarit-format.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-format.mjs","names":[],"sources":["../../../projects/gabarit/format/intl-cache.ts","../../../projects/gabarit/format/no-value.ts","../../../projects/gabarit/format/format-bytes.ts","../../../projects/gabarit/format/format-time.ts","../../../projects/gabarit/format/format.pipes.ts","../../../projects/gabarit/format/format.ts","../../../projects/gabarit/format/initials.ts"],"sourcesContent":["const MAX_ENTRIES = 100\nconst cache = new Map<string, unknown>()\n\nexport function cachedIntl<T>(\n kind: string,\n locale: string,\n options: object | undefined,\n create: () => T,\n): T {\n const key = `${kind}|${locale}|${options === undefined ? '' : JSON.stringify(options)}`\n const hit = cache.get(key)\n if (hit !== undefined) return hit as T\n if (cache.size >= MAX_ENTRIES) cache.clear()\n const created = create()\n cache.set(key, created)\n return created\n}\n","export const NO_VALUE = '—'\n","import { cachedIntl } from './intl-cache'\nimport { NO_VALUE } from './no-value'\n\nexport interface FormatBytesOptions {\n base?: 1000 | 1024\n decimals?: number\n binaryUnits?: 'iec' | 'legacy'\n}\n\nconst NBSP = '\\u00a0'\n\nconst UNITS = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte', 'petabyte'] as const\n\nfunction siLabels(locale: string): string[] {\n return cachedIntl('bytes-labels', locale, undefined, () =>\n UNITS.map((unit) => {\n const parts = new Intl.NumberFormat(locale, {\n style: 'unit',\n unit,\n unitDisplay: 'narrow',\n }).formatToParts(1)\n return parts.find((part) => part.type === 'unit')?.value ?? unit\n }),\n )\n}\n\nconst IEC_SYMBOLS = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB']\n\nfunction label(locale: string, rank: number, options: FormatBytesOptions): string {\n const si = siLabels(locale)[rank]\n if (rank === 0 || options.base === 1000) return si\n const capital = si.charAt(0).toUpperCase()\n if (options.binaryUnits === 'legacy') return capital + si.slice(1)\n return /^\\p{Script=Latin}/u.test(si) ? `${capital}i${si.slice(1)}` : IEC_SYMBOLS[rank]\n}\n\nfunction round(value: number, decimals: number): number {\n const factor = 10 ** decimals\n return Math.round(value * factor) / factor\n}\n\nexport function formatBytes(\n bytes: number,\n locale: string,\n options: FormatBytesOptions = {},\n): string {\n if (!Number.isFinite(bytes)) return NO_VALUE\n const base = options.base === 1000 ? 1000 : 1024\n const requested = Math.trunc(options.decimals ?? 1)\n const decimals = Number.isFinite(requested) ? Math.max(0, Math.min(20, requested)) : 1\n const last = UNITS.length - 1\n\n let value = Math.abs(bytes)\n let rank = 0\n while (value >= base && rank < last) {\n value /= base\n rank++\n }\n let shown = round(value, rank === 0 ? 0 : decimals)\n if (shown >= base && rank < last) {\n shown = round(shown / base, decimals)\n rank++\n }\n\n const signed = bytes < 0 && shown !== 0 ? -shown : shown\n const number = cachedIntl(\n 'bytes-number',\n locale,\n { decimals: rank === 0 ? 0 : decimals },\n () =>\n new Intl.NumberFormat(locale, {\n minimumFractionDigits: 0,\n maximumFractionDigits: rank === 0 ? 0 : decimals,\n }),\n ).format(signed)\n return `${number}${NBSP}${label(locale, rank, { ...options, base })}`\n}\n","import { cachedIntl } from './intl-cache'\nimport { NO_VALUE } from './no-value'\n\nexport type DateInput = Date | string | number\n\nexport interface FormatRelativeTimeOptions {\n style?: 'long' | 'short' | 'narrow'\n numeric?: 'auto' | 'always'\n maxUnit?: 'hour' | 'day' | 'week' | 'month'\n absoluteAfterDays?: number\n timeZone?: string\n}\n\nconst SECOND = 1000\nconst MINUTE = 60 * SECOND\nconst HOUR = 60 * MINUTE\nconst DAY = 24 * HOUR\nconst WEEK = 7 * DAY\nconst MONTH = 30 * DAY\nconst YEAR = 365 * DAY\n\nconst RANKS: [Intl.RelativeTimeFormatUnit, number, number][] = [\n ['second', SECOND, MINUTE],\n ['minute', MINUTE, HOUR],\n ['hour', HOUR, DAY],\n ['day', DAY, WEEK],\n ['week', WEEK, MONTH],\n ['month', MONTH, YEAR],\n ['year', YEAR, Infinity],\n]\n\nconst NOW_WINDOW = 10 * SECOND\n\nfunction toTime(value: DateInput): number {\n return value instanceof Date ? value.getTime() : new Date(value).getTime()\n}\n\nfunction relativeFormat(locale: string, style: string, numeric: string): Intl.RelativeTimeFormat {\n return cachedIntl(\n 'relative',\n locale,\n { style, numeric },\n () =>\n new Intl.RelativeTimeFormat(locale, {\n style: style as Intl.RelativeTimeFormatStyle,\n numeric: numeric as Intl.RelativeTimeFormatNumeric,\n }),\n )\n}\n\nexport function formatRelativeTime(\n date: DateInput | null | undefined,\n locale: string,\n now: DateInput = Date.now(),\n options: FormatRelativeTimeOptions = {},\n): string {\n if (date === null || date === undefined) return ''\n const time = toTime(date)\n const reference = toTime(now)\n if (Number.isNaN(time) || Number.isNaN(reference)) return NO_VALUE\n\n const diff = time - reference\n const gap = Math.abs(diff)\n const sign = diff < 0 ? -1 : 1\n const style = options.style ?? 'long'\n\n if (options.absoluteAfterDays !== undefined && gap >= options.absoluteAfterDays * DAY) {\n return formatDateTime(time, locale, {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n ...(options.timeZone ? { timeZone: options.timeZone } : {}),\n })\n }\n\n if (gap < NOW_WINDOW) return relativeFormat(locale, style, 'auto').format(0, 'second')\n\n const numeric = options.numeric ?? 'auto'\n const rtf = relativeFormat(locale, style, numeric)\n for (const [unit, size, below] of RANKS) {\n if (gap < below || unit === options.maxUnit) {\n return rtf.format(sign * Math.trunc(gap / size), unit)\n }\n }\n return rtf.format(sign * Math.trunc(gap / YEAR), 'year')\n}\n\nconst FIELD_OPTIONS = [\n 'dateStyle',\n 'timeStyle',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'dayPeriod',\n 'hour',\n 'minute',\n 'second',\n 'fractionalSecondDigits',\n 'timeZoneName',\n] as const\n\nfunction selectsFields(options: Intl.DateTimeFormatOptions | undefined): boolean {\n return options !== undefined && FIELD_OPTIONS.some((field) => options[field] !== undefined)\n}\n\nexport function formatDateTime(\n date: DateInput | null | undefined,\n locale: string,\n options?: Intl.DateTimeFormatOptions,\n): string {\n if (date === null || date === undefined) return ''\n const time = toTime(date)\n if (Number.isNaN(time)) return NO_VALUE\n const resolved: Intl.DateTimeFormatOptions = selectsFields(options)\n ? (options as Intl.DateTimeFormatOptions)\n : { dateStyle: 'medium' as const, timeStyle: 'short' as const, ...options }\n return cachedIntl(\n 'datetime',\n locale,\n resolved,\n () => new Intl.DateTimeFormat(locale, resolved),\n ).format(time)\n}\n","import { inject, LOCALE_ID, Pipe, type PipeTransform } from '@angular/core'\nimport { formatBytes, type FormatBytesOptions } from './format-bytes'\nimport {\n formatDateTime,\n formatRelativeTime,\n type DateInput,\n type FormatRelativeTimeOptions,\n} from './format-time'\n\nexport interface GbtPipeLocale {\n locale?: string\n}\n\nexport type GbtRelativeTimePipeOptions = FormatRelativeTimeOptions &\n GbtPipeLocale & {\n now?: DateInput\n }\n\nexport type GbtBytesPipeOptions = FormatBytesOptions & GbtPipeLocale\n\nexport type GbtDateTimePipeOptions = Intl.DateTimeFormatOptions & GbtPipeLocale\n\n@Pipe({ name: 'gbtRelativeTime', standalone: true })\nexport class GbtRelativeTimePipe implements PipeTransform {\n private readonly localeId = inject(LOCALE_ID)\n\n transform(value: DateInput | null | undefined, options: GbtRelativeTimePipeOptions = {}): string {\n const { locale, now, ...rest } = options\n return formatRelativeTime(value, locale ?? this.localeId, now, rest)\n }\n}\n\n@Pipe({ name: 'gbtBytes', standalone: true })\nexport class GbtBytesPipe implements PipeTransform {\n private readonly localeId = inject(LOCALE_ID)\n\n transform(value: number | null | undefined, options: GbtBytesPipeOptions = {}): string {\n if (value === null || value === undefined) return ''\n const { locale, ...rest } = options\n return formatBytes(value, locale ?? this.localeId, rest)\n }\n}\n\n@Pipe({ name: 'gbtDateTime', standalone: true })\nexport class GbtDateTimePipe implements PipeTransform {\n private readonly localeId = inject(LOCALE_ID)\n\n transform(value: DateInput | null | undefined, options?: GbtDateTimePipeOptions): string {\n const { locale, ...rest } = options ?? {}\n return formatDateTime(value, locale ?? this.localeId, rest)\n }\n}\n","import { cachedIntl } from './intl-cache'\n\nexport function formatNumber(value: number, locale: string, decimals?: number): string {\n return new Intl.NumberFormat(locale, {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(value)\n}\n\nexport function formatCompact(value: number, locale: string): string {\n return new Intl.NumberFormat(locale, {\n notation: 'compact',\n maximumFractionDigits: 1,\n }).format(value)\n}\n\nexport interface FormatDurationOptions {\n days?: boolean\n}\n\nfunction dayLabel(locale: string): string {\n return cachedIntl('day-label', locale, undefined, () => {\n const parts = new Intl.NumberFormat(locale, {\n style: 'unit',\n unit: 'day',\n unitDisplay: 'narrow',\n }).formatToParts(1)\n return parts.find((part) => part.type === 'unit')?.value ?? 'd'\n })\n}\n\nexport function formatDuration(\n ms: number,\n locale: string,\n options: FormatDurationOptions = {},\n): string {\n if (ms < 1000) return `${formatNumber(Math.round(ms), locale)} ms`\n\n const totalSeconds = Math.round(ms / 1000)\n const num = (value: number) => formatNumber(value, locale)\n\n if (options.days && totalSeconds >= 86400) {\n const days = Math.floor(totalSeconds / 86400)\n const hours = Math.floor((totalSeconds % 86400) / 3600)\n const unit = dayLabel(locale)\n return hours > 0 ? `${num(days)} ${unit} ${num(hours)} h` : `${num(days)} ${unit}`\n }\n\n const hours = Math.floor(totalSeconds / 3600)\n const minutes = Math.floor((totalSeconds % 3600) / 60)\n const seconds = totalSeconds % 60\n\n if (hours > 0) return minutes > 0 ? `${num(hours)} h ${num(minutes)} min` : `${num(hours)} h`\n if (minutes > 0)\n return seconds > 0 ? `${num(minutes)} min ${num(seconds)} s` : `${num(minutes)} min`\n return `${num(seconds)} s`\n}\n\nexport function formatPercent(ratio: number, locale: string, decimals = 0): string {\n return new Intl.NumberFormat(locale, {\n style: 'percent',\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }).format(ratio)\n}\n","export function computeInitials(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean)\n if (words.length === 0) return ''\n if (words.length === 1) return words[0].slice(0, 2).toUpperCase()\n return (words[0][0] + words[words.length - 1][0]).toUpperCase()\n}\n"],"mappings":";;AAAA,MAAM,cAAc;AACpB,MAAM,wBAAQ,IAAI,IAAG;AAErB,SAAgB,WACd,MACA,QACA,SACA,QAAe;CAEf,MAAM,MAAM,GAAG,KAAI,GAAI,OAAM,GAAI,YAAY,SAAY,KAAK,KAAK,UAAU,OAAO;CACpF,MAAM,MAAM,MAAM,IAAI,GAAG;CACzB,IAAI,QAAQ,QAAW,OAAO;CAC9B,IAAI,MAAM,QAAQ,aAAa,MAAM,MAAK;CAC1C,MAAM,UAAU,OAAM;CACtB,MAAM,IAAI,KAAK,OAAO;CACtB,OAAO;AACT;AEPA,MAAM,OAAO;AAEb,MAAM,QAAQ;CAAC;CAAQ;CAAY;CAAY;CAAY;CAAY;AAAU;AAEjF,SAAS,SAAS,QAAc;CAC9B,OAAO,WAAW,gBAAgB,QAAQ,cACxC,MAAM,KAAK,SAAQ;EAMjB,OALc,IAAI,KAAK,aAAa,QAAQ;GAC1C,OAAO;GACP;GACA,aAAa;EACd,CAAA,CAAC,CAAC,cAAc,CACV,CAAA,CAAM,MAAM,SAAS,KAAK,SAAS,MAAM,CAAC,EAAE,SAAS;CAC9D,CAAC,CAAC;AAEN;AAEA,MAAM,cAAc;CAAC;CAAK;CAAO;CAAO;CAAO;CAAO;AAAK;AAE3D,SAAS,MAAM,QAAgB,MAAc,SAA2B;CACtE,MAAM,KAAK,SAAS,MAAM,CAAC,CAAC;CAC5B,IAAI,SAAS,KAAK,QAAQ,SAAS,KAAM,OAAO;CAChD,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,YAAW;CACxC,IAAI,QAAQ,gBAAgB,UAAU,OAAO,UAAU,GAAG,MAAM,CAAC;CACjE,OAAO,qBAAqB,KAAK,EAAE,IAAI,GAAG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KAAK,MAAO,eAAe,OAAQ,EAAE;CACrD,MAAM,UAAU,eAAe;CAE/B,IAAI,QAAQ,GAAG,OAAO,UAAU,IAAI,GAAG,IAAI,KAAK,EAAC,KAAM,IAAI,OAAO,EAAC,QAAS,GAAG,IAAI,KAAK,EAAC;CACzF,IAAI,UAAU,GACZ,OAAO,UAAU,IAAI,GAAG,IAAI,OAAO,EAAC,OAAQ,IAAI,OAAO,EAAC,MAAO,GAAG,IAAI,OAAO,EAAC;CAChF,OAAO,GAAG,IAAI,OAAO,EAAC;AACxB;AAEA,SAAgB,cAAc,OAAe,QAAgB,WAAW,GAAC;CACvE,OAAO,IAAI,KAAK,aAAa,QAAQ;EACnC,OAAO;EACP,uBAAuB;EACvB,uBAAuB;CACxB,CAAA,CAAC,CAAC,OAAO,KAAK;AACjB;AChEA,SAAgB,gBAAgB,MAAY;CAC1C,MAAM,QAAQ,KAAK,KAAI,CAAE,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO;CACrD,IAAI,MAAM,WAAW,GAAG,OAAO;CAC/B,IAAI,MAAM,WAAW,GAAG,OAAO,MAAM,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,YAAW;CAC/D,QAAQ,MAAM,EAAE,CAAC,KAAK,MAAM,MAAM,SAAS,EAAE,CAAC,GAAA,CAAI,YAAW;AAC/D"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input, signal } from "@angular/core";
|
|
3
|
+
import { ChartEmpty, ChartTable } from "@masmarino/gabarit/chart";
|
|
4
|
+
import { formatNumber, formatPercent } from "@masmarino/gabarit/format";
|
|
5
|
+
var FunnelChart = class FunnelChart {
|
|
6
|
+
steps = input.required(...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
|
|
7
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
8
|
+
locale = input.required(...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
9
|
+
emptyMessage = input.required(...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
10
|
+
tableCaption = input.required(...ngDevMode ? [{ debugName: "tableCaption" }] : /* istanbul ignore next */ []);
|
|
11
|
+
stepColumn = input.required(...ngDevMode ? [{ debugName: "stepColumn" }] : /* istanbul ignore next */ []);
|
|
12
|
+
valueColumn = input.required(...ngDevMode ? [{ debugName: "valueColumn" }] : /* istanbul ignore next */ []);
|
|
13
|
+
conversionColumn = input.required(...ngDevMode ? [{ debugName: "conversionColumn" }] : /* istanbul ignore next */ []);
|
|
14
|
+
stepAnnouncement = input.required(...ngDevMode ? [{ debugName: "stepAnnouncement" }] : /* istanbul ignore next */ []);
|
|
15
|
+
reference = computed(() => this.steps()[0]?.value ?? 0, ...ngDevMode ? [{ debugName: "reference" }] : /* istanbul ignore next */ []);
|
|
16
|
+
activeIndex = signal(null, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
17
|
+
onMouseLeave(event) {
|
|
18
|
+
const target = event.currentTarget;
|
|
19
|
+
if (target.ownerDocument.activeElement === target) return;
|
|
20
|
+
this.activeIndex.set(null);
|
|
21
|
+
}
|
|
22
|
+
renderedSteps = computed(() => {
|
|
23
|
+
const reference = this.reference();
|
|
24
|
+
const steps = this.steps();
|
|
25
|
+
return steps.map((step, index) => {
|
|
26
|
+
const previousValue = index === 0 ? step.value : steps[index - 1].value;
|
|
27
|
+
return {
|
|
28
|
+
label: step.label,
|
|
29
|
+
formattedValue: formatNumber(step.value, this.locale()),
|
|
30
|
+
part: reference <= 0 ? 0 : step.value / reference * 100,
|
|
31
|
+
conversionFromPrevious: formatPercent(previousValue <= 0 ? 0 : step.value / previousValue, this.locale())
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
}, ...ngDevMode ? [{ debugName: "renderedSteps" }] : /* istanbul ignore next */ []);
|
|
35
|
+
activeStep = computed(() => {
|
|
36
|
+
const index = this.activeIndex();
|
|
37
|
+
if (index === null) return null;
|
|
38
|
+
return this.renderedSteps()[index] ?? null;
|
|
39
|
+
}, ...ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []);
|
|
40
|
+
columns = computed(() => [
|
|
41
|
+
this.stepColumn(),
|
|
42
|
+
this.valueColumn(),
|
|
43
|
+
this.conversionColumn()
|
|
44
|
+
], ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
|
|
45
|
+
tableRows = computed(() => {
|
|
46
|
+
const reference = this.reference();
|
|
47
|
+
return this.steps().map((step) => [
|
|
48
|
+
step.label,
|
|
49
|
+
formatNumber(step.value, this.locale()),
|
|
50
|
+
formatPercent(reference <= 0 ? 0 : step.value / reference, this.locale())
|
|
51
|
+
]);
|
|
52
|
+
}, ...ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []);
|
|
53
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.0",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: FunnelChart,
|
|
58
|
+
deps: [],
|
|
59
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
60
|
+
});
|
|
61
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
62
|
+
minVersion: "17.0.0",
|
|
63
|
+
version: "22.2.0",
|
|
64
|
+
type: FunnelChart,
|
|
65
|
+
isStandalone: true,
|
|
66
|
+
selector: "gbt-funnel-chart",
|
|
67
|
+
inputs: {
|
|
68
|
+
steps: {
|
|
69
|
+
classPropertyName: "steps",
|
|
70
|
+
publicName: "steps",
|
|
71
|
+
isSignal: true,
|
|
72
|
+
isRequired: true,
|
|
73
|
+
transformFunction: null
|
|
74
|
+
},
|
|
75
|
+
label: {
|
|
76
|
+
classPropertyName: "label",
|
|
77
|
+
publicName: "label",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: true,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
},
|
|
82
|
+
locale: {
|
|
83
|
+
classPropertyName: "locale",
|
|
84
|
+
publicName: "locale",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: true,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
},
|
|
89
|
+
emptyMessage: {
|
|
90
|
+
classPropertyName: "emptyMessage",
|
|
91
|
+
publicName: "emptyMessage",
|
|
92
|
+
isSignal: true,
|
|
93
|
+
isRequired: true,
|
|
94
|
+
transformFunction: null
|
|
95
|
+
},
|
|
96
|
+
tableCaption: {
|
|
97
|
+
classPropertyName: "tableCaption",
|
|
98
|
+
publicName: "tableCaption",
|
|
99
|
+
isSignal: true,
|
|
100
|
+
isRequired: true,
|
|
101
|
+
transformFunction: null
|
|
102
|
+
},
|
|
103
|
+
stepColumn: {
|
|
104
|
+
classPropertyName: "stepColumn",
|
|
105
|
+
publicName: "stepColumn",
|
|
106
|
+
isSignal: true,
|
|
107
|
+
isRequired: true,
|
|
108
|
+
transformFunction: null
|
|
109
|
+
},
|
|
110
|
+
valueColumn: {
|
|
111
|
+
classPropertyName: "valueColumn",
|
|
112
|
+
publicName: "valueColumn",
|
|
113
|
+
isSignal: true,
|
|
114
|
+
isRequired: true,
|
|
115
|
+
transformFunction: null
|
|
116
|
+
},
|
|
117
|
+
conversionColumn: {
|
|
118
|
+
classPropertyName: "conversionColumn",
|
|
119
|
+
publicName: "conversionColumn",
|
|
120
|
+
isSignal: true,
|
|
121
|
+
isRequired: true,
|
|
122
|
+
transformFunction: null
|
|
123
|
+
},
|
|
124
|
+
stepAnnouncement: {
|
|
125
|
+
classPropertyName: "stepAnnouncement",
|
|
126
|
+
publicName: "stepAnnouncement",
|
|
127
|
+
isSignal: true,
|
|
128
|
+
isRequired: true,
|
|
129
|
+
transformFunction: null
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
ngImport: i0,
|
|
133
|
+
template: "@if (renderedSteps().length > 0) {\n <ol class=\"gbt-funnel-chart\" [attr.aria-label]=\"label()\">\n @for (step of renderedSteps(); track $index) {\n <li\n class=\"gbt-funnel-chart__step\"\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n tabindex=\"0\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"onMouseLeave($event)\"\n (focus)=\"activeIndex.set($index)\"\n (blur)=\"activeIndex.set(null)\"\n >\n <div class=\"gbt-funnel-chart__bar\" [style.width.%]=\"step.part\" aria-hidden=\"true\"></div>\n <span class=\"gbt-funnel-chart__label\">{{ step.label }}</span>\n <span class=\"gbt-funnel-chart__value\">{{ step.formattedValue }}</span>\n @if ($index === activeIndex()) {\n <span class=\"gbt-funnel-chart__tip\" aria-hidden=\"true\">{{\n step.conversionFromPrevious\n }}</span>\n }\n </li>\n }\n </ol>\n <div class=\"gbt-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n @if (activeStep(); as step) {\n {{ stepAnnouncement()(step.label, step.conversionFromPrevious) }}\n }\n </div>\n <gbt-chart-table [caption]=\"tableCaption()\" [columns]=\"columns()\" [rows]=\"tableRows()\" />\n} @else {\n <gbt-chart-empty [message]=\"emptyMessage()\" />\n}\n",
|
|
134
|
+
styles: [":host{display:block}.gbt-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-funnel-chart{margin:0;padding:0;list-style:none}.gbt-funnel-chart__step{position:relative;display:flex;justify-content:space-between;gap:.75rem;padding:.625rem .75rem;font-size:.875rem;color:var(--text-primary)}.gbt-funnel-chart__step+.gbt-funnel-chart__step{margin-top:.25rem}.gbt-funnel-chart__step[data-active]{background:var(--bg-hover)}.gbt-funnel-chart__step:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:-2px}.gbt-funnel-chart__bar{position:absolute;inset:0 auto 0 0;background:var(--chart-series-2-base);opacity:.14;border-radius:var(--site-border-radius)}.gbt-funnel-chart__label,.gbt-funnel-chart__value,.gbt-funnel-chart__tip{position:relative}.gbt-funnel-chart__value{font-variant-numeric:tabular-nums;color:var(--text-secondary)}.gbt-funnel-chart__tip{margin-left:.5rem;font-variant-numeric:tabular-nums;color:var(--text-secondary)}\n"],
|
|
135
|
+
dependencies: [{
|
|
136
|
+
kind: "component",
|
|
137
|
+
type: ChartTable,
|
|
138
|
+
selector: "gbt-chart-table",
|
|
139
|
+
inputs: [
|
|
140
|
+
"caption",
|
|
141
|
+
"columns",
|
|
142
|
+
"rows"
|
|
143
|
+
]
|
|
144
|
+
}, {
|
|
145
|
+
kind: "component",
|
|
146
|
+
type: ChartEmpty,
|
|
147
|
+
selector: "gbt-chart-empty",
|
|
148
|
+
inputs: ["message", "actionLabel"],
|
|
149
|
+
outputs: ["action"]
|
|
150
|
+
}],
|
|
151
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
155
|
+
minVersion: "12.0.0",
|
|
156
|
+
version: "22.2.0",
|
|
157
|
+
ngImport: i0,
|
|
158
|
+
type: FunnelChart,
|
|
159
|
+
decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{
|
|
162
|
+
selector: "gbt-funnel-chart",
|
|
163
|
+
standalone: true,
|
|
164
|
+
imports: [ChartTable, ChartEmpty],
|
|
165
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
166
|
+
template: "@if (renderedSteps().length > 0) {\n <ol class=\"gbt-funnel-chart\" [attr.aria-label]=\"label()\">\n @for (step of renderedSteps(); track $index) {\n <li\n class=\"gbt-funnel-chart__step\"\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n tabindex=\"0\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"onMouseLeave($event)\"\n (focus)=\"activeIndex.set($index)\"\n (blur)=\"activeIndex.set(null)\"\n >\n <div class=\"gbt-funnel-chart__bar\" [style.width.%]=\"step.part\" aria-hidden=\"true\"></div>\n <span class=\"gbt-funnel-chart__label\">{{ step.label }}</span>\n <span class=\"gbt-funnel-chart__value\">{{ step.formattedValue }}</span>\n @if ($index === activeIndex()) {\n <span class=\"gbt-funnel-chart__tip\" aria-hidden=\"true\">{{\n step.conversionFromPrevious\n }}</span>\n }\n </li>\n }\n </ol>\n <div class=\"gbt-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n @if (activeStep(); as step) {\n {{ stepAnnouncement()(step.label, step.conversionFromPrevious) }}\n }\n </div>\n <gbt-chart-table [caption]=\"tableCaption()\" [columns]=\"columns()\" [rows]=\"tableRows()\" />\n} @else {\n <gbt-chart-empty [message]=\"emptyMessage()\" />\n}\n",
|
|
167
|
+
styles: [":host{display:block}.gbt-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.gbt-funnel-chart{margin:0;padding:0;list-style:none}.gbt-funnel-chart__step{position:relative;display:flex;justify-content:space-between;gap:.75rem;padding:.625rem .75rem;font-size:.875rem;color:var(--text-primary)}.gbt-funnel-chart__step+.gbt-funnel-chart__step{margin-top:.25rem}.gbt-funnel-chart__step[data-active]{background:var(--bg-hover)}.gbt-funnel-chart__step:focus-visible{outline:2px solid var(--gbt-focus-ring, var(--focus-ring));outline-offset:-2px}.gbt-funnel-chart__bar{position:absolute;inset:0 auto 0 0;background:var(--chart-series-2-base);opacity:.14;border-radius:var(--site-border-radius)}.gbt-funnel-chart__label,.gbt-funnel-chart__value,.gbt-funnel-chart__tip{position:relative}.gbt-funnel-chart__value{font-variant-numeric:tabular-nums;color:var(--text-secondary)}.gbt-funnel-chart__tip{margin-left:.5rem;font-variant-numeric:tabular-nums;color:var(--text-secondary)}\n"]
|
|
168
|
+
}]
|
|
169
|
+
}],
|
|
170
|
+
propDecorators: {
|
|
171
|
+
steps: [{
|
|
172
|
+
type: i0.Input,
|
|
173
|
+
args: [{
|
|
174
|
+
isSignal: true,
|
|
175
|
+
alias: "steps",
|
|
176
|
+
required: true
|
|
177
|
+
}]
|
|
178
|
+
}],
|
|
179
|
+
label: [{
|
|
180
|
+
type: i0.Input,
|
|
181
|
+
args: [{
|
|
182
|
+
isSignal: true,
|
|
183
|
+
alias: "label",
|
|
184
|
+
required: true
|
|
185
|
+
}]
|
|
186
|
+
}],
|
|
187
|
+
locale: [{
|
|
188
|
+
type: i0.Input,
|
|
189
|
+
args: [{
|
|
190
|
+
isSignal: true,
|
|
191
|
+
alias: "locale",
|
|
192
|
+
required: true
|
|
193
|
+
}]
|
|
194
|
+
}],
|
|
195
|
+
emptyMessage: [{
|
|
196
|
+
type: i0.Input,
|
|
197
|
+
args: [{
|
|
198
|
+
isSignal: true,
|
|
199
|
+
alias: "emptyMessage",
|
|
200
|
+
required: true
|
|
201
|
+
}]
|
|
202
|
+
}],
|
|
203
|
+
tableCaption: [{
|
|
204
|
+
type: i0.Input,
|
|
205
|
+
args: [{
|
|
206
|
+
isSignal: true,
|
|
207
|
+
alias: "tableCaption",
|
|
208
|
+
required: true
|
|
209
|
+
}]
|
|
210
|
+
}],
|
|
211
|
+
stepColumn: [{
|
|
212
|
+
type: i0.Input,
|
|
213
|
+
args: [{
|
|
214
|
+
isSignal: true,
|
|
215
|
+
alias: "stepColumn",
|
|
216
|
+
required: true
|
|
217
|
+
}]
|
|
218
|
+
}],
|
|
219
|
+
valueColumn: [{
|
|
220
|
+
type: i0.Input,
|
|
221
|
+
args: [{
|
|
222
|
+
isSignal: true,
|
|
223
|
+
alias: "valueColumn",
|
|
224
|
+
required: true
|
|
225
|
+
}]
|
|
226
|
+
}],
|
|
227
|
+
conversionColumn: [{
|
|
228
|
+
type: i0.Input,
|
|
229
|
+
args: [{
|
|
230
|
+
isSignal: true,
|
|
231
|
+
alias: "conversionColumn",
|
|
232
|
+
required: true
|
|
233
|
+
}]
|
|
234
|
+
}],
|
|
235
|
+
stepAnnouncement: [{
|
|
236
|
+
type: i0.Input,
|
|
237
|
+
args: [{
|
|
238
|
+
isSignal: true,
|
|
239
|
+
alias: "stepAnnouncement",
|
|
240
|
+
required: true
|
|
241
|
+
}]
|
|
242
|
+
}]
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
export { FunnelChart };
|
|
246
|
+
|
|
247
|
+
//# sourceMappingURL=masmarino-gabarit-funnel-chart.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masmarino-gabarit-funnel-chart.mjs","names":[],"sources":["../../../projects/gabarit/funnel-chart/funnel-chart.ts","../../../projects/gabarit/funnel-chart/funnel-chart.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core'\nimport { ChartEmpty } from '@masmarino/gabarit/chart'\nimport { ChartTable } from '@masmarino/gabarit/chart'\nimport { formatNumber, formatPercent } from '@masmarino/gabarit/format'\n\nexport interface FunnelStep {\n label: string\n value: number\n}\n\ninterface RenderedStep {\n label: string\n formattedValue: string\n\n part: number\n\n conversionFromPrevious: string\n}\n\n@Component({\n selector: 'gbt-funnel-chart',\n standalone: true,\n imports: [ChartTable, ChartEmpty],\n templateUrl: './funnel-chart.html',\n styleUrl: './funnel-chart.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FunnelChart {\n steps = input.required<FunnelStep[]>()\n label = input.required<string>()\n locale = input.required<string>()\n emptyMessage = input.required<string>()\n tableCaption = input.required<string>()\n stepColumn = input.required<string>()\n valueColumn = input.required<string>()\n conversionColumn = input.required<string>()\n stepAnnouncement = input.required<(label: string, conversion: string) => string>()\n\n private readonly reference = computed(() => this.steps()[0]?.value ?? 0)\n\n protected readonly activeIndex = signal<number | null>(null)\n\n protected onMouseLeave(event: MouseEvent): void {\n const target = event.currentTarget as HTMLElement\n if (target.ownerDocument.activeElement === target) return\n this.activeIndex.set(null)\n }\n\n protected readonly renderedSteps = computed<RenderedStep[]>(() => {\n const reference = this.reference()\n const steps = this.steps()\n return steps.map((step, index) => {\n const previousValue = index === 0 ? step.value : steps[index - 1].value\n return {\n label: step.label,\n formattedValue: formatNumber(step.value, this.locale()),\n\n part: reference <= 0 ? 0 : (step.value / reference) * 100,\n conversionFromPrevious: formatPercent(\n previousValue <= 0 ? 0 : step.value / previousValue,\n this.locale(),\n ),\n }\n })\n })\n\n protected readonly activeStep = computed<RenderedStep | null>(() => {\n const index = this.activeIndex()\n if (index === null) return null\n return this.renderedSteps()[index] ?? null\n })\n\n protected readonly columns = computed(() => [\n this.stepColumn(),\n this.valueColumn(),\n this.conversionColumn(),\n ])\n\n protected readonly tableRows = computed<(string | number)[][]>(() => {\n const reference = this.reference()\n return this.steps().map((step) => [\n step.label,\n formatNumber(step.value, this.locale()),\n formatPercent(reference <= 0 ? 0 : step.value / reference, this.locale()),\n ])\n })\n}\n","@if (renderedSteps().length > 0) {\n <ol class=\"gbt-funnel-chart\" [attr.aria-label]=\"label()\">\n @for (step of renderedSteps(); track $index) {\n <li\n class=\"gbt-funnel-chart__step\"\n [attr.data-active]=\"$index === activeIndex() ? '' : null\"\n tabindex=\"0\"\n (mouseenter)=\"activeIndex.set($index)\"\n (mouseleave)=\"onMouseLeave($event)\"\n (focus)=\"activeIndex.set($index)\"\n (blur)=\"activeIndex.set(null)\"\n >\n <div class=\"gbt-funnel-chart__bar\" [style.width.%]=\"step.part\" aria-hidden=\"true\"></div>\n <span class=\"gbt-funnel-chart__label\">{{ step.label }}</span>\n <span class=\"gbt-funnel-chart__value\">{{ step.formattedValue }}</span>\n @if ($index === activeIndex()) {\n <span class=\"gbt-funnel-chart__tip\" aria-hidden=\"true\">{{\n step.conversionFromPrevious\n }}</span>\n }\n </li>\n }\n </ol>\n <div class=\"gbt-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n @if (activeStep(); as step) {\n {{ stepAnnouncement()(step.label, step.conversionFromPrevious) }}\n }\n </div>\n <gbt-chart-table [caption]=\"tableCaption()\" [columns]=\"columns()\" [rows]=\"tableRows()\" />\n} @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