@raintonic/formaui 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +145 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs +806 -0
- package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs +86 -0
- package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs +1757 -0
- package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +287 -0
- package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs +217 -0
- package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs +161 -0
- package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs +726 -0
- package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs +92 -0
- package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs +107 -0
- package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs +68 -0
- package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +55 -0
- package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-button.mjs +241 -0
- package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-card.mjs +270 -0
- package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs +295 -0
- package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs +631 -0
- package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs +1331 -0
- package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs +41 -0
- package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs +190 -0
- package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +266 -0
- package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs +33 -0
- package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs +246 -0
- package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs +482 -0
- package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs +117 -0
- package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-input.mjs +327 -0
- package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-list.mjs +149 -0
- package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs +896 -0
- package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs +345 -0
- package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs +139 -0
- package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs +306 -0
- package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs +451 -0
- package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs +148 -0
- package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs +260 -0
- package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-select.mjs +1011 -0
- package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs +150 -0
- package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs +257 -0
- package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs +50 -0
- package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs +347 -0
- package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs +63 -0
- package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs +317 -0
- package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs +197 -0
- package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs +78 -0
- package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs +644 -0
- package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs +171 -0
- package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs +140 -0
- package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs +555 -0
- package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs +314 -0
- package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs +103 -0
- package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs +430 -0
- package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-core.mjs +62 -0
- package/fesm2022/raintonic-formaui-core.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs +798 -0
- package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs +391 -0
- package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs +248 -0
- package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs +66 -0
- package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -0
- package/fesm2022/raintonic-formaui.mjs +15 -0
- package/fesm2022/raintonic-formaui.mjs.map +1 -0
- package/llms-full.txt +1627 -0
- package/llms.txt +60 -0
- package/package.json +251 -0
- package/styles/_fonts-entry.scss +3 -0
- package/styles/fonts/dm-mono-400-latin.woff2 +0 -0
- package/styles/fonts/inter-tight-latin-italic.woff2 +0 -0
- package/styles/fonts/inter-tight-latin.woff2 +0 -0
- package/styles/index.scss +127 -0
- package/styles/partials/_constants.scss +29 -0
- package/styles/partials/_fonts.scss +36 -0
- package/styles/partials/_grid.scss +171 -0
- package/styles/partials/_mixins.scss +145 -0
- package/styles/partials/_motion.scss +252 -0
- package/styles/partials/_theme.scss +275 -0
- package/styles/partials/_typography.scss +112 -0
- package/styles/partials/_utilities.scss +480 -0
- package/styles/partials/themes/_dark.scss +254 -0
- package/styles/partials/themes/_light.scss +254 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts +196 -0
- package/types/raintonic-formaui-cdk-drag-drop.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts +62 -0
- package/types/raintonic-formaui-cdk-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts +843 -0
- package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts +112 -0
- package/types/raintonic-formaui-cdk-virtual-scroll.d.ts.map +1 -0
- package/types/raintonic-formaui-components-accordion.d.ts +124 -0
- package/types/raintonic-formaui-components-accordion.d.ts.map +1 -0
- package/types/raintonic-formaui-components-alert.d.ts +143 -0
- package/types/raintonic-formaui-components-alert.d.ts.map +1 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts +193 -0
- package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -0
- package/types/raintonic-formaui-components-avatar.d.ts +52 -0
- package/types/raintonic-formaui-components-avatar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-badge.d.ts +47 -0
- package/types/raintonic-formaui-components-badge.d.ts.map +1 -0
- package/types/raintonic-formaui-components-big-menu.d.ts +62 -0
- package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts +26 -0
- package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button-group.d.ts +61 -0
- package/types/raintonic-formaui-components-button-group.d.ts.map +1 -0
- package/types/raintonic-formaui-components-button.d.ts +116 -0
- package/types/raintonic-formaui-components-button.d.ts.map +1 -0
- package/types/raintonic-formaui-components-card.d.ts +191 -0
- package/types/raintonic-formaui-components-card.d.ts.map +1 -0
- package/types/raintonic-formaui-components-checkbox.d.ts +132 -0
- package/types/raintonic-formaui-components-checkbox.d.ts.map +1 -0
- package/types/raintonic-formaui-components-data-table.d.ts +368 -0
- package/types/raintonic-formaui-components-data-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-date-picker.d.ts +341 -0
- package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-divider.d.ts +21 -0
- package/types/raintonic-formaui-components-divider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-drawer.d.ts +48 -0
- package/types/raintonic-formaui-components-drawer.d.ts.map +1 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts +412 -0
- package/types/raintonic-formaui-components-dynamic-form.d.ts.map +1 -0
- package/types/raintonic-formaui-components-empty-state.d.ts +14 -0
- package/types/raintonic-formaui-components-empty-state.d.ts.map +1 -0
- package/types/raintonic-formaui-components-file-upload.d.ts +77 -0
- package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -0
- package/types/raintonic-formaui-components-form-field.d.ts +271 -0
- package/types/raintonic-formaui-components-form-field.d.ts.map +1 -0
- package/types/raintonic-formaui-components-icon.d.ts +61 -0
- package/types/raintonic-formaui-components-icon.d.ts.map +1 -0
- package/types/raintonic-formaui-components-input.d.ts +149 -0
- package/types/raintonic-formaui-components-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-list.d.ts +48 -0
- package/types/raintonic-formaui-components-list.d.ts.map +1 -0
- package/types/raintonic-formaui-components-menu.d.ts +403 -0
- package/types/raintonic-formaui-components-menu.d.ts.map +1 -0
- package/types/raintonic-formaui-components-number-input.d.ts +127 -0
- package/types/raintonic-formaui-components-number-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-paginator.d.ts +37 -0
- package/types/raintonic-formaui-components-paginator.d.ts.map +1 -0
- package/types/raintonic-formaui-components-password-input.d.ts +111 -0
- package/types/raintonic-formaui-components-password-input.d.ts.map +1 -0
- package/types/raintonic-formaui-components-popover.d.ts +131 -0
- package/types/raintonic-formaui-components-popover.d.ts.map +1 -0
- package/types/raintonic-formaui-components-progressbar.d.ts +111 -0
- package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-radio.d.ts +95 -0
- package/types/raintonic-formaui-components-radio.d.ts.map +1 -0
- package/types/raintonic-formaui-components-select.d.ts +307 -0
- package/types/raintonic-formaui-components-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-side-panel.d.ts +51 -0
- package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -0
- package/types/raintonic-formaui-components-sidebar.d.ts +174 -0
- package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-skeleton.d.ts +20 -0
- package/types/raintonic-formaui-components-skeleton.d.ts.map +1 -0
- package/types/raintonic-formaui-components-slider.d.ts +108 -0
- package/types/raintonic-formaui-components-slider.d.ts.map +1 -0
- package/types/raintonic-formaui-components-spinner.d.ts +42 -0
- package/types/raintonic-formaui-components-spinner.d.ts.map +1 -0
- package/types/raintonic-formaui-components-stepper.d.ts +126 -0
- package/types/raintonic-formaui-components-stepper.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tab.d.ts +96 -0
- package/types/raintonic-formaui-components-tab.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tag.d.ts +34 -0
- package/types/raintonic-formaui-components-tag.d.ts.map +1 -0
- package/types/raintonic-formaui-components-time-picker.d.ts +172 -0
- package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toggle.d.ts +70 -0
- package/types/raintonic-formaui-components-toggle.d.ts.map +1 -0
- package/types/raintonic-formaui-components-toolbar.d.ts +128 -0
- package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tooltip.d.ts +268 -0
- package/types/raintonic-formaui-components-tooltip.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-select.d.ts +80 -0
- package/types/raintonic-formaui-components-tree-select.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree-table.d.ts +90 -0
- package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -0
- package/types/raintonic-formaui-components-tree.d.ts +104 -0
- package/types/raintonic-formaui-components-tree.d.ts.map +1 -0
- package/types/raintonic-formaui-core.d.ts +115 -0
- package/types/raintonic-formaui-core.d.ts.map +1 -0
- package/types/raintonic-formaui-services-dialog.d.ts +451 -0
- package/types/raintonic-formaui-services-dialog.d.ts.map +1 -0
- package/types/raintonic-formaui-services-notification.d.ts +221 -0
- package/types/raintonic-formaui-services-notification.d.ts.map +1 -0
- package/types/raintonic-formaui-services-theme.d.ts +126 -0
- package/types/raintonic-formaui-services-theme.d.ts.map +1 -0
- package/types/raintonic-formaui-test-utils.d.ts +24 -0
- package/types/raintonic-formaui-test-utils.d.ts.map +1 -0
- package/types/raintonic-formaui.d.ts +4 -0
- package/types/raintonic-formaui.d.ts.map +1 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, signal, output, computed, effect, ViewChild, Component } from '@angular/core';
|
|
3
|
+
import { FuiButtonDirective } from '@raintonic/formaui/components/button';
|
|
4
|
+
import { FuiIconComponent } from '@raintonic/formaui/components/icon';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* # Paginator Component
|
|
8
|
+
*
|
|
9
|
+
* A pagination component that handles navigation through pages with:
|
|
10
|
+
* - Previous/Next navigation buttons (disabled at boundaries)
|
|
11
|
+
* - Page number buttons (at least 4 visible)
|
|
12
|
+
* - Ellipsis (...) for remaining pages when there are more than 4 pages
|
|
13
|
+
* - Emits page selection via output signal
|
|
14
|
+
* - Keyboard support for accessibility
|
|
15
|
+
*/
|
|
16
|
+
class FuiPaginatorComponent {
|
|
17
|
+
// Input properties
|
|
18
|
+
numberOfItems = input.required(...(ngDevMode ? [{ debugName: "numberOfItems" }] : /* istanbul ignore next */ []));
|
|
19
|
+
pageSize = input.required(...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
20
|
+
currentPage = input(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
|
|
21
|
+
// Internal state
|
|
22
|
+
_currentPage = signal(1, ...(ngDevMode ? [{ debugName: "_currentPage" }] : /* istanbul ignore next */ []));
|
|
23
|
+
// Output events
|
|
24
|
+
pageSelected = output();
|
|
25
|
+
_pageAnnouncer;
|
|
26
|
+
// Computed properties
|
|
27
|
+
totalPages = computed(() => {
|
|
28
|
+
const total = this.numberOfItems();
|
|
29
|
+
const size = this.pageSize();
|
|
30
|
+
return Math.ceil(total / size);
|
|
31
|
+
}, ...(ngDevMode ? [{ debugName: "totalPages" }] : /* istanbul ignore next */ []));
|
|
32
|
+
isFirstPage = computed(() => this._currentPage() === 1, ...(ngDevMode ? [{ debugName: "isFirstPage" }] : /* istanbul ignore next */ []));
|
|
33
|
+
isLastPage = computed(() => this._currentPage() === this.totalPages(), ...(ngDevMode ? [{ debugName: "isLastPage" }] : /* istanbul ignore next */ []));
|
|
34
|
+
pageNumbers = computed(() => {
|
|
35
|
+
const currentPage = this._currentPage();
|
|
36
|
+
const total = this.totalPages();
|
|
37
|
+
if (total <= 4) {
|
|
38
|
+
// Show all pages if 4 or fewer
|
|
39
|
+
return Array.from({ length: total }, (_, i) => i + 1);
|
|
40
|
+
}
|
|
41
|
+
// Show at least 4 buttons with ellipsis for remaining pages
|
|
42
|
+
const pages = [];
|
|
43
|
+
// Always include first page
|
|
44
|
+
pages.push(1);
|
|
45
|
+
// Determine the range around current page
|
|
46
|
+
let start = Math.max(2, currentPage - 1);
|
|
47
|
+
let end = Math.min(total - 1, currentPage + 1);
|
|
48
|
+
// Ensure we show at least 4 page buttons (including first and last)
|
|
49
|
+
if (end - start < 2) {
|
|
50
|
+
if (start === 2) {
|
|
51
|
+
end = Math.min(total - 1, start + 2);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
start = Math.max(2, end - 2);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Add ellipsis and pages
|
|
58
|
+
if (start > 2) {
|
|
59
|
+
pages.push('...');
|
|
60
|
+
}
|
|
61
|
+
for (let i = start; i <= end; i++) {
|
|
62
|
+
pages.push(i);
|
|
63
|
+
}
|
|
64
|
+
if (end < total - 1) {
|
|
65
|
+
pages.push('...');
|
|
66
|
+
}
|
|
67
|
+
// Always include last page
|
|
68
|
+
pages.push(total);
|
|
69
|
+
return pages;
|
|
70
|
+
}, ...(ngDevMode ? [{ debugName: "pageNumbers" }] : /* istanbul ignore next */ []));
|
|
71
|
+
constructor() {
|
|
72
|
+
// Sync currentPage input to internal state
|
|
73
|
+
effect(() => {
|
|
74
|
+
const page = this.currentPage();
|
|
75
|
+
this._currentPage.set(page);
|
|
76
|
+
});
|
|
77
|
+
// Reset to first page when numberOfItems or pageSize change
|
|
78
|
+
effect(() => {
|
|
79
|
+
this.numberOfItems();
|
|
80
|
+
this.pageSize();
|
|
81
|
+
this._currentPage.set(1);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
onPageClick(page) {
|
|
85
|
+
if (typeof page === 'number') {
|
|
86
|
+
this._currentPage.set(page);
|
|
87
|
+
this.pageSelected.emit(page);
|
|
88
|
+
this._announce(`Page ${page} of ${this.totalPages()}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
onPreviousClick() {
|
|
92
|
+
if (!this.isFirstPage()) {
|
|
93
|
+
const newPage = this._currentPage() - 1;
|
|
94
|
+
this._currentPage.set(newPage);
|
|
95
|
+
this.pageSelected.emit(newPage);
|
|
96
|
+
this._announce(`Page ${newPage} of ${this.totalPages()}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
onNextClick() {
|
|
100
|
+
if (!this.isLastPage()) {
|
|
101
|
+
const newPage = this._currentPage() + 1;
|
|
102
|
+
this._currentPage.set(newPage);
|
|
103
|
+
this.pageSelected.emit(newPage);
|
|
104
|
+
this._announce(`Page ${newPage} of ${this.totalPages()}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
_announce(message) {
|
|
108
|
+
if (this._pageAnnouncer?.nativeElement) {
|
|
109
|
+
this._pageAnnouncer.nativeElement.textContent = message;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
getCurrentPage() {
|
|
113
|
+
return this._currentPage();
|
|
114
|
+
}
|
|
115
|
+
isPageActive(page) {
|
|
116
|
+
return typeof page === 'number' && page === this._currentPage();
|
|
117
|
+
}
|
|
118
|
+
isPageClickable(page) {
|
|
119
|
+
return typeof page === 'number';
|
|
120
|
+
}
|
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiPaginatorComponent, isStandalone: true, selector: "fui-paginator", inputs: { numberOfItems: { classPropertyName: "numberOfItems", publicName: "numberOfItems", isSignal: true, isRequired: true, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: true, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSelected: "pageSelected" }, host: { classAttribute: "fui-paginator" }, viewQueries: [{ propertyName: "_pageAnnouncer", first: true, predicate: ["pageAnnouncer"], descendants: true }], ngImport: i0, template: "<nav role=\"navigation\" aria-label=\"Pagination\" class=\"fui-paginator__container\">\n <!-- Live region for page change announcements -->\n <div class=\"fui-sr-only\" aria-live=\"polite\" aria-atomic=\"true\" #pageAnnouncer></div>\n\n <!-- Previous Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isFirstPage()\"\n [attr.aria-disabled]=\"isFirstPage()\"\n (click)=\"onPreviousClick()\"\n aria-label=\"Go to previous page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-left\" size=\"md\"></fui-icon>\n </button>\n\n <!-- Page Numbers -->\n <div class=\"fui-paginator__page-buttons\">\n @for (page of pageNumbers(); track page) {\n @if (typeof page === 'string') {\n <!-- Ellipsis -->\n <span class=\"fui-paginator__ellipsis\" aria-hidden=\"true\">\n {{ page }}\n </span>\n } @else {\n <!-- Page Number Button -->\n <button\n fuiButton\n [variant]=\"isPageActive(page) ? 'primary' : 'ghost'\"\n size=\"md\"\n [disabled]=\"false\"\n (click)=\"onPageClick(page)\"\n [attr.aria-current]=\"isPageActive(page) ? 'page' : null\"\n [attr.aria-label]=\"'Page ' + page + ' of ' + totalPages()\"\n class=\"fui-paginator__page-button\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <!-- Next Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isLastPage()\"\n [attr.aria-disabled]=\"isLastPage()\"\n (click)=\"onNextClick()\"\n aria-label=\"Go to next page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-right\" size=\"md\"></fui-icon>\n </button>\n</nav>\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-paginator{--fui-paginator-bg: transparent;--fui-paginator-button-size: 2.5rem;--fui-paginator-font-size: var(--fui-font-size-sm);--fui-paginator-border-radius: var(--fui-border-radius-sm);--fui-paginator-gap: var(--fui-spacing-02);--fui-paginator-active-bg: var(--fui-primary);--fui-paginator-active-color: var(--fui-primary-text);--fui-paginator-active-hover-bg: var(--fui-primary-hover);--fui-paginator-hover-bg: var(--fui-primary-20)}.fui-paginator__container{display:flex;align-items:center;justify-content:center;gap:var(--fui-spacing-02);background-color:var(--fui-paginator-bg);flex-wrap:wrap}.fui-paginator__nav-button{flex-shrink:0;min-width:auto;padding:var(--fui-spacing-02)}.fui-paginator__nav-button:disabled{cursor:not-allowed;opacity:var(--fui-opacity-disabled)}.fui-paginator__page-buttons{display:flex;align-items:center;gap:var(--fui-spacing-01);flex-wrap:wrap;justify-content:center}.fui-paginator__page-button{min-width:var(--fui-paginator-button-size);height:var(--fui-paginator-button-size);padding:0;border-radius:var(--fui-paginator-border-radius);font-weight:500;font-size:var(--fui-paginator-font-size)}.fui-paginator__page-button:not(:disabled){cursor:pointer}.fui-paginator__page-button:not(:disabled):hover{background-color:var(--fui-paginator-hover-bg)}.fui-paginator__page-button:disabled{cursor:not-allowed}.fui-paginator__page-button[aria-current=page]{background-color:var(--fui-paginator-active-bg);color:var(--fui-paginator-active-color);font-weight:600}.fui-paginator__page-button[aria-current=page]:hover{background-color:var(--fui-paginator-active-hover-bg)}.fui-paginator__page-button{transition:all var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-paginator__page-button:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--fui-paginator-button-size);height:var(--fui-paginator-button-size);color:var(--fui-text-secondary);font-weight:500;font-size:var(--fui-font-size-sm);-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: FuiButtonDirective, selector: "button[fuiButton], a[fuiButton]", inputs: ["variant", "size", "disabled", "fullWidth", "loading", "iconOnly", "aria-label", "type"] }, { kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }] });
|
|
123
|
+
}
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiPaginatorComponent, decorators: [{
|
|
125
|
+
type: Component,
|
|
126
|
+
args: [{ selector: 'fui-paginator', standalone: true, imports: [FuiButtonDirective, FuiIconComponent], host: {
|
|
127
|
+
class: 'fui-paginator',
|
|
128
|
+
}, template: "<nav role=\"navigation\" aria-label=\"Pagination\" class=\"fui-paginator__container\">\n <!-- Live region for page change announcements -->\n <div class=\"fui-sr-only\" aria-live=\"polite\" aria-atomic=\"true\" #pageAnnouncer></div>\n\n <!-- Previous Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isFirstPage()\"\n [attr.aria-disabled]=\"isFirstPage()\"\n (click)=\"onPreviousClick()\"\n aria-label=\"Go to previous page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-left\" size=\"md\"></fui-icon>\n </button>\n\n <!-- Page Numbers -->\n <div class=\"fui-paginator__page-buttons\">\n @for (page of pageNumbers(); track page) {\n @if (typeof page === 'string') {\n <!-- Ellipsis -->\n <span class=\"fui-paginator__ellipsis\" aria-hidden=\"true\">\n {{ page }}\n </span>\n } @else {\n <!-- Page Number Button -->\n <button\n fuiButton\n [variant]=\"isPageActive(page) ? 'primary' : 'ghost'\"\n size=\"md\"\n [disabled]=\"false\"\n (click)=\"onPageClick(page)\"\n [attr.aria-current]=\"isPageActive(page) ? 'page' : null\"\n [attr.aria-label]=\"'Page ' + page + ' of ' + totalPages()\"\n class=\"fui-paginator__page-button\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <!-- Next Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isLastPage()\"\n [attr.aria-disabled]=\"isLastPage()\"\n (click)=\"onNextClick()\"\n aria-label=\"Go to next page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-right\" size=\"md\"></fui-icon>\n </button>\n</nav>\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-paginator{--fui-paginator-bg: transparent;--fui-paginator-button-size: 2.5rem;--fui-paginator-font-size: var(--fui-font-size-sm);--fui-paginator-border-radius: var(--fui-border-radius-sm);--fui-paginator-gap: var(--fui-spacing-02);--fui-paginator-active-bg: var(--fui-primary);--fui-paginator-active-color: var(--fui-primary-text);--fui-paginator-active-hover-bg: var(--fui-primary-hover);--fui-paginator-hover-bg: var(--fui-primary-20)}.fui-paginator__container{display:flex;align-items:center;justify-content:center;gap:var(--fui-spacing-02);background-color:var(--fui-paginator-bg);flex-wrap:wrap}.fui-paginator__nav-button{flex-shrink:0;min-width:auto;padding:var(--fui-spacing-02)}.fui-paginator__nav-button:disabled{cursor:not-allowed;opacity:var(--fui-opacity-disabled)}.fui-paginator__page-buttons{display:flex;align-items:center;gap:var(--fui-spacing-01);flex-wrap:wrap;justify-content:center}.fui-paginator__page-button{min-width:var(--fui-paginator-button-size);height:var(--fui-paginator-button-size);padding:0;border-radius:var(--fui-paginator-border-radius);font-weight:500;font-size:var(--fui-paginator-font-size)}.fui-paginator__page-button:not(:disabled){cursor:pointer}.fui-paginator__page-button:not(:disabled):hover{background-color:var(--fui-paginator-hover-bg)}.fui-paginator__page-button:disabled{cursor:not-allowed}.fui-paginator__page-button[aria-current=page]{background-color:var(--fui-paginator-active-bg);color:var(--fui-paginator-active-color);font-weight:600}.fui-paginator__page-button[aria-current=page]:hover{background-color:var(--fui-paginator-active-hover-bg)}.fui-paginator__page-button{transition:all var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-paginator__page-button:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-paginator__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:var(--fui-paginator-button-size);height:var(--fui-paginator-button-size);color:var(--fui-text-secondary);font-weight:500;font-size:var(--fui-font-size-sm);-webkit-user-select:none;user-select:none}\n"] }]
|
|
129
|
+
}], ctorParameters: () => [], propDecorators: { numberOfItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "numberOfItems", required: true }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: true }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], pageSelected: [{ type: i0.Output, args: ["pageSelected"] }], _pageAnnouncer: [{
|
|
130
|
+
type: ViewChild,
|
|
131
|
+
args: ['pageAnnouncer']
|
|
132
|
+
}] } });
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
export { FuiPaginatorComponent };
|
|
139
|
+
//# sourceMappingURL=raintonic-formaui-components-paginator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-paginator.mjs","sources":["../../../lib/components/paginator/paginator.component.ts","../../../lib/components/paginator/paginator.component.html","../../../lib/components/paginator/raintonic-formaui-components-paginator.ts"],"sourcesContent":["import { Component, computed, ElementRef, input, output, signal, effect, ViewChild } from '@angular/core';\n\nimport { FuiButtonDirective } from '@raintonic/formaui/components/button';\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\n\n/**\n * # Paginator Component\n *\n * A pagination component that handles navigation through pages with:\n * - Previous/Next navigation buttons (disabled at boundaries)\n * - Page number buttons (at least 4 visible)\n * - Ellipsis (...) for remaining pages when there are more than 4 pages\n * - Emits page selection via output signal\n * - Keyboard support for accessibility\n */\n@Component({\n selector: 'fui-paginator',\n standalone: true,\n imports: [FuiButtonDirective, FuiIconComponent],\n templateUrl: './paginator.component.html',\n styleUrl: './paginator.component.scss',\n host: {\n class: 'fui-paginator',\n },\n})\nexport class FuiPaginatorComponent {\n // Input properties\n readonly numberOfItems = input.required<number>();\n readonly pageSize = input.required<number>();\n readonly currentPage = input(1);\n\n // Internal state\n private readonly _currentPage = signal(1);\n\n // Output events\n readonly pageSelected = output<number>();\n\n @ViewChild('pageAnnouncer') private _pageAnnouncer?: ElementRef<HTMLElement>;\n\n // Computed properties\n readonly totalPages = computed(() => {\n const total = this.numberOfItems();\n const size = this.pageSize();\n\n return Math.ceil(total / size);\n });\n\n readonly isFirstPage = computed(() => this._currentPage() === 1);\n readonly isLastPage = computed(() => this._currentPage() === this.totalPages());\n\n readonly pageNumbers = computed(() => {\n const currentPage = this._currentPage();\n const total = this.totalPages();\n\n if (total <= 4) {\n // Show all pages if 4 or fewer\n return Array.from({ length: total }, (_, i) => i + 1);\n }\n\n // Show at least 4 buttons with ellipsis for remaining pages\n const pages: (number | string)[] = [];\n\n // Always include first page\n pages.push(1);\n\n // Determine the range around current page\n let start = Math.max(2, currentPage - 1);\n let end = Math.min(total - 1, currentPage + 1);\n\n // Ensure we show at least 4 page buttons (including first and last)\n if (end - start < 2) {\n if (start === 2) {\n end = Math.min(total - 1, start + 2);\n } else {\n start = Math.max(2, end - 2);\n }\n }\n\n // Add ellipsis and pages\n if (start > 2) {\n pages.push('...');\n }\n\n for (let i = start; i <= end; i++) {\n pages.push(i);\n }\n\n if (end < total - 1) {\n pages.push('...');\n }\n\n // Always include last page\n pages.push(total);\n\n return pages;\n });\n\n constructor() {\n // Sync currentPage input to internal state\n effect(() => {\n const page = this.currentPage();\n this._currentPage.set(page);\n });\n\n // Reset to first page when numberOfItems or pageSize change\n effect(() => {\n this.numberOfItems();\n this.pageSize();\n this._currentPage.set(1);\n });\n }\n\n onPageClick(page: number | string): void {\n if (typeof page === 'number') {\n this._currentPage.set(page);\n this.pageSelected.emit(page);\n this._announce(`Page ${page} of ${this.totalPages()}`);\n }\n }\n\n onPreviousClick(): void {\n if (!this.isFirstPage()) {\n const newPage = this._currentPage() - 1;\n this._currentPage.set(newPage);\n this.pageSelected.emit(newPage);\n this._announce(`Page ${newPage} of ${this.totalPages()}`);\n }\n }\n\n onNextClick(): void {\n if (!this.isLastPage()) {\n const newPage = this._currentPage() + 1;\n this._currentPage.set(newPage);\n this.pageSelected.emit(newPage);\n this._announce(`Page ${newPage} of ${this.totalPages()}`);\n }\n }\n\n private _announce(message: string): void {\n if (this._pageAnnouncer?.nativeElement) {\n this._pageAnnouncer.nativeElement.textContent = message;\n }\n }\n\n getCurrentPage(): number {\n return this._currentPage();\n }\n\n isPageActive(page: number | string): boolean {\n return typeof page === 'number' && page === this._currentPage();\n }\n\n isPageClickable(page: number | string): boolean {\n return typeof page === 'number';\n }\n}\n","<nav role=\"navigation\" aria-label=\"Pagination\" class=\"fui-paginator__container\">\n <!-- Live region for page change announcements -->\n <div class=\"fui-sr-only\" aria-live=\"polite\" aria-atomic=\"true\" #pageAnnouncer></div>\n\n <!-- Previous Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isFirstPage()\"\n [attr.aria-disabled]=\"isFirstPage()\"\n (click)=\"onPreviousClick()\"\n aria-label=\"Go to previous page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-left\" size=\"md\"></fui-icon>\n </button>\n\n <!-- Page Numbers -->\n <div class=\"fui-paginator__page-buttons\">\n @for (page of pageNumbers(); track page) {\n @if (typeof page === 'string') {\n <!-- Ellipsis -->\n <span class=\"fui-paginator__ellipsis\" aria-hidden=\"true\">\n {{ page }}\n </span>\n } @else {\n <!-- Page Number Button -->\n <button\n fuiButton\n [variant]=\"isPageActive(page) ? 'primary' : 'ghost'\"\n size=\"md\"\n [disabled]=\"false\"\n (click)=\"onPageClick(page)\"\n [attr.aria-current]=\"isPageActive(page) ? 'page' : null\"\n [attr.aria-label]=\"'Page ' + page + ' of ' + totalPages()\"\n class=\"fui-paginator__page-button\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <!-- Next Button -->\n <button\n fuiButton\n variant=\"outline\"\n size=\"md\"\n iconOnly\n [disabled]=\"isLastPage()\"\n [attr.aria-disabled]=\"isLastPage()\"\n (click)=\"onNextClick()\"\n aria-label=\"Go to next page\"\n class=\"fui-paginator__nav-button\"\n >\n <fui-icon name=\"caret-right\" size=\"md\"></fui-icon>\n </button>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;AASG;MAWU,qBAAqB,CAAA;;AAEvB,IAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,mFAAU;AACxC,IAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,8EAAU;AACnC,IAAA,WAAW,GAAG,KAAK,CAAC,CAAC,kFAAC;;AAGd,IAAA,YAAY,GAAG,MAAM,CAAC,CAAC,mFAAC;;IAGhC,YAAY,GAAG,MAAM,EAAU;AAEJ,IAAA,cAAc;;AAGzC,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AAClC,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE;AAClC,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE;QAE5B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAChC,IAAA,CAAC,iFAAC;AAEO,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,kFAAC;AACvD,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,iFAAC;AAEtE,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AACnC,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE;AACvC,QAAA,MAAM,KAAK,GAAG,I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ategy, Component } from '@angular/core';
|
|
3
|
+
import { NgForm, FormGroupDirective, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { DefaultErrorStateMatcher, FUI_FORM_FIELD_CONTROL } from '@raintonic/formaui/core';
|
|
6
|
+
import { injectNgControl, updateErrorState, syncRequiredState, syncNgControlDisabled } from '@raintonic/formaui/cdk/form-field';
|
|
7
|
+
import { FuiIconComponent } from '@raintonic/formaui/components/icon';
|
|
8
|
+
|
|
9
|
+
const DEFAULT_STRENGTH_CONFIG = {
|
|
10
|
+
minLength: 8,
|
|
11
|
+
requireUppercase: true,
|
|
12
|
+
requireLowercase: true,
|
|
13
|
+
requireNumbers: true,
|
|
14
|
+
requireSpecial: false,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* # FuiPasswordInputComponent
|
|
19
|
+
*
|
|
20
|
+
* A password input component with visibility toggle and optional strength meter.
|
|
21
|
+
* Integrates with fui-form-field and Angular Forms.
|
|
22
|
+
*
|
|
23
|
+
* ## Features
|
|
24
|
+
* - Password visibility toggle
|
|
25
|
+
* - Optional password strength meter
|
|
26
|
+
* - Full Reactive Forms integration (ControlValueAccessor)
|
|
27
|
+
* - FuiFormFieldControl integration for fui-form-field
|
|
28
|
+
* - Error state handling
|
|
29
|
+
* - Accessibility (ARIA)
|
|
30
|
+
*
|
|
31
|
+
* ## Usage
|
|
32
|
+
*
|
|
33
|
+
* ### Basic Password Input
|
|
34
|
+
* ```html
|
|
35
|
+
* <fui-form-field>
|
|
36
|
+
* <fui-label>Password</fui-label>
|
|
37
|
+
* <fui-password-input formControlName="password"></fui-password-input>
|
|
38
|
+
* </fui-form-field>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* ### With Strength Meter
|
|
42
|
+
* ```html
|
|
43
|
+
* <fui-form-field>
|
|
44
|
+
* <fui-label>Password</fui-label>
|
|
45
|
+
* <fui-password-input
|
|
46
|
+
* formControlName="password"
|
|
47
|
+
* [showStrengthMeter]="true"
|
|
48
|
+
* ></fui-password-input>
|
|
49
|
+
* </fui-form-field>
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
class FuiPasswordInputComponent {
|
|
53
|
+
// Static properties
|
|
54
|
+
static nextId = 0;
|
|
55
|
+
controlType = 'fui-password-input';
|
|
56
|
+
// Inputs
|
|
57
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
58
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
59
|
+
transform: booleanAttribute });
|
|
60
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
61
|
+
showStrengthMeter = input(false, { ...(ngDevMode ? { debugName: "showStrengthMeter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
62
|
+
strengthConfig = input(DEFAULT_STRENGTH_CONFIG, ...(ngDevMode ? [{ debugName: "strengthConfig" }] : /* istanbul ignore next */ []));
|
|
63
|
+
errorStateMatcher = input(null, ...(ngDevMode ? [{ debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
|
|
64
|
+
// Internal state
|
|
65
|
+
_passwordVisible = signal(false, ...(ngDevMode ? [{ debugName: "_passwordVisible" }] : /* istanbul ignore next */ []));
|
|
66
|
+
_value = signal('', ...(ngDevMode ? [{ debugName: "_value" }] : /* istanbul ignore next */ []));
|
|
67
|
+
_focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : /* istanbul ignore next */ []));
|
|
68
|
+
focused = this._focused.asReadonly();
|
|
69
|
+
_disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
70
|
+
_ngControlDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_ngControlDisabled" }] : /* istanbul ignore next */ []));
|
|
71
|
+
_errorState = signal(false, ...(ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []));
|
|
72
|
+
errorState = this._errorState.asReadonly();
|
|
73
|
+
_required = signal(false, ...(ngDevMode ? [{ debugName: "_required" }] : /* istanbul ignore next */ []));
|
|
74
|
+
required = this._required.asReadonly();
|
|
75
|
+
// Computed
|
|
76
|
+
disabled = computed(() => this._disabled() || this.disabledInput() || this._ngControlDisabled(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
77
|
+
_inputType = computed(() => (this._passwordVisible() ? 'text' : 'password'), ...(ngDevMode ? [{ debugName: "_inputType" }] : /* istanbul ignore next */ []));
|
|
78
|
+
value = this._value.asReadonly();
|
|
79
|
+
empty = computed(() => {
|
|
80
|
+
const v = this._value();
|
|
81
|
+
return !v || v.length === 0;
|
|
82
|
+
}, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
|
|
83
|
+
_strength = computed(() => {
|
|
84
|
+
return this._calculateStrength(this._value());
|
|
85
|
+
}, ...(ngDevMode ? [{ debugName: "_strength" }] : /* istanbul ignore next */ []));
|
|
86
|
+
_strengthPercent = computed(() => {
|
|
87
|
+
switch (this._strength()) {
|
|
88
|
+
case 'weak':
|
|
89
|
+
return 25;
|
|
90
|
+
case 'fair':
|
|
91
|
+
return 50;
|
|
92
|
+
case 'good':
|
|
93
|
+
return 75;
|
|
94
|
+
case 'strong':
|
|
95
|
+
return 100;
|
|
96
|
+
default:
|
|
97
|
+
return 0;
|
|
98
|
+
}
|
|
99
|
+
}, ...(ngDevMode ? [{ debugName: "_strengthPercent" }] : /* istanbul ignore next */ []));
|
|
100
|
+
// State changes subject for form field compatibility
|
|
101
|
+
stateChanges = new Subject();
|
|
102
|
+
_uid = `fui-password-input-${FuiPasswordInputComponent.nextId++}`;
|
|
103
|
+
id = this._uid;
|
|
104
|
+
_ariaDescribedby = null;
|
|
105
|
+
// Form control references
|
|
106
|
+
_parentForm = inject(NgForm, { optional: true });
|
|
107
|
+
_parentFormGroup = inject(FormGroupDirective, { optional: true });
|
|
108
|
+
_defaultErrorStateMatcher = inject(DefaultErrorStateMatcher);
|
|
109
|
+
_ngControlRef = injectNgControl();
|
|
110
|
+
get ngControl() {
|
|
111
|
+
return this._ngControlRef.ngControl;
|
|
112
|
+
}
|
|
113
|
+
// ViewChild for input element
|
|
114
|
+
inputElement = viewChild('inputElement', ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
|
|
115
|
+
// ControlValueAccessor callbacks
|
|
116
|
+
_onChange = () => {
|
|
117
|
+
/* noop */
|
|
118
|
+
};
|
|
119
|
+
_onTouched = () => {
|
|
120
|
+
/* noop */
|
|
121
|
+
};
|
|
122
|
+
constructor() {
|
|
123
|
+
void Promise.resolve().then(() => {
|
|
124
|
+
if (this._ngControlRef.ngControl) {
|
|
125
|
+
this._ngControlRef.ngControl.valueAccessor = this;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
// Effect to emit state changes
|
|
129
|
+
effect(() => {
|
|
130
|
+
// Track all reactive inputs and internal signals
|
|
131
|
+
this.placeholder();
|
|
132
|
+
this.disabledInput();
|
|
133
|
+
this.readonly();
|
|
134
|
+
this.showStrengthMeter();
|
|
135
|
+
this.strengthConfig();
|
|
136
|
+
this.errorStateMatcher();
|
|
137
|
+
this._passwordVisible();
|
|
138
|
+
this._value();
|
|
139
|
+
this._focused();
|
|
140
|
+
this._disabled();
|
|
141
|
+
this._ngControlDisabled();
|
|
142
|
+
this._required();
|
|
143
|
+
this._errorState();
|
|
144
|
+
// Emit state change
|
|
145
|
+
this.stateChanges.next();
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
ngDoCheck() {
|
|
149
|
+
if (this.ngControl) {
|
|
150
|
+
updateErrorState(this.ngControl, this._errorState, this.errorStateMatcher(), this._defaultErrorStateMatcher, this._parentForm, this._parentFormGroup, this.stateChanges);
|
|
151
|
+
syncRequiredState(this.ngControl, this._required, this.stateChanges);
|
|
152
|
+
syncNgControlDisabled(this.ngControl, this._ngControlDisabled, this.stateChanges);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
ngOnDestroy() {
|
|
156
|
+
this.stateChanges.complete();
|
|
157
|
+
}
|
|
158
|
+
// ControlValueAccessor implementation
|
|
159
|
+
writeValue(value) {
|
|
160
|
+
const v = value ?? '';
|
|
161
|
+
this._value.set(v);
|
|
162
|
+
// Sync the DOM element value if available
|
|
163
|
+
const el = this.inputElement();
|
|
164
|
+
if (el) {
|
|
165
|
+
el.nativeElement.value = v;
|
|
166
|
+
}
|
|
167
|
+
this.stateChanges.next();
|
|
168
|
+
}
|
|
169
|
+
registerOnChange(fn) {
|
|
170
|
+
this._onChange = fn;
|
|
171
|
+
}
|
|
172
|
+
registerOnTouched(fn) {
|
|
173
|
+
this._onTouched = fn;
|
|
174
|
+
}
|
|
175
|
+
setDisabledState(isDisabled) {
|
|
176
|
+
this._disabled.set(isDisabled);
|
|
177
|
+
this.stateChanges.next();
|
|
178
|
+
}
|
|
179
|
+
onContainerClick(_event) {
|
|
180
|
+
if (!this._focused()) {
|
|
181
|
+
this.inputElement()?.nativeElement.focus();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
setDescribedByIds(ids) {
|
|
185
|
+
this._ariaDescribedby = ids.length ? ids.join(' ') : null;
|
|
186
|
+
}
|
|
187
|
+
// Event handlers
|
|
188
|
+
_onInput(event) {
|
|
189
|
+
const target = event.target;
|
|
190
|
+
const newValue = target.value;
|
|
191
|
+
if (newValue !== this._value()) {
|
|
192
|
+
this._value.set(newValue);
|
|
193
|
+
this._onChange(newValue);
|
|
194
|
+
this.stateChanges.next();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
_onFocus() {
|
|
198
|
+
if (!this._focused()) {
|
|
199
|
+
this._focused.set(true);
|
|
200
|
+
this.stateChanges.next();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
_onBlur() {
|
|
204
|
+
if (this._focused()) {
|
|
205
|
+
this._focused.set(false);
|
|
206
|
+
this._onTouched();
|
|
207
|
+
this.stateChanges.next();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
toggleVisibility() {
|
|
211
|
+
this._passwordVisible.update((v) => !v);
|
|
212
|
+
}
|
|
213
|
+
// Public API
|
|
214
|
+
focus() {
|
|
215
|
+
this.inputElement()?.nativeElement.focus();
|
|
216
|
+
}
|
|
217
|
+
blur() {
|
|
218
|
+
this.inputElement()?.nativeElement.blur();
|
|
219
|
+
}
|
|
220
|
+
// Strength calculation
|
|
221
|
+
_calculateStrength(password) {
|
|
222
|
+
if (!password || password.length === 0) {
|
|
223
|
+
return 'weak';
|
|
224
|
+
}
|
|
225
|
+
const config = this.strengthConfig();
|
|
226
|
+
let score = 0;
|
|
227
|
+
const maxScore = 5;
|
|
228
|
+
// Length check
|
|
229
|
+
const minLen = config.minLength ?? 8;
|
|
230
|
+
if (password.length >= minLen) {
|
|
231
|
+
score++;
|
|
232
|
+
}
|
|
233
|
+
// Bonus for longer passwords
|
|
234
|
+
if (password.length >= minLen + 4) {
|
|
235
|
+
score++;
|
|
236
|
+
}
|
|
237
|
+
// Uppercase check
|
|
238
|
+
if (/[A-Z]/.test(password)) {
|
|
239
|
+
score++;
|
|
240
|
+
}
|
|
241
|
+
// Lowercase check
|
|
242
|
+
if (/[a-z]/.test(password)) {
|
|
243
|
+
score++;
|
|
244
|
+
}
|
|
245
|
+
// Numbers check
|
|
246
|
+
if (/[0-9]/.test(password)) {
|
|
247
|
+
score++;
|
|
248
|
+
}
|
|
249
|
+
// Special characters check
|
|
250
|
+
if (/[^A-Za-z0-9]/.test(password)) {
|
|
251
|
+
score++;
|
|
252
|
+
}
|
|
253
|
+
// Normalize to strength levels
|
|
254
|
+
const ratio = score / maxScore;
|
|
255
|
+
if (ratio <= 0.3) {
|
|
256
|
+
return 'weak';
|
|
257
|
+
}
|
|
258
|
+
if (ratio <= 0.5) {
|
|
259
|
+
return 'fair';
|
|
260
|
+
}
|
|
261
|
+
if (ratio <= 0.8) {
|
|
262
|
+
return 'good';
|
|
263
|
+
}
|
|
264
|
+
return 'strong';
|
|
265
|
+
}
|
|
266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiPasswordInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: FuiPasswordInputComponent, isStandalone: true, selector: "fui-password-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showStrengthMeter: { classPropertyName: "showStrengthMeter", publicName: "showStrengthMeter", isSignal: true, isRequired: false, transformFunction: null }, strengthConfig: { classPropertyName: "strengthConfig", publicName: "strengthConfig", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fui-password-input--focused": "focused()", "class.fui-password-input--disabled": "disabled()", "class.fui-password-input--readonly": "readonly()", "class.fui-password-input--error": "errorState()", "attr.id": "id" }, classAttribute: "fui-password-input" }, providers: [
|
|
268
|
+
{
|
|
269
|
+
provide: NG_VALUE_ACCESSOR,
|
|
270
|
+
useExisting: FuiPasswordInputComponent,
|
|
271
|
+
multi: true,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
provide: FUI_FORM_FIELD_CONTROL,
|
|
275
|
+
useExisting: FuiPasswordInputComponent,
|
|
276
|
+
},
|
|
277
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"fui-password-input__wrapper\">\n <input\n #inputElement\n class=\"fui-password-input__input\"\n [attr.type]=\"_inputType()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [attr.readonly]=\"readonly() ? '' : null\"\n [attr.aria-invalid]=\"errorState()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"_ariaDescribedby\"\n autocomplete=\"current-password\"\n (input)=\"_onInput($event)\"\n (focus)=\"_onFocus()\"\n (blur)=\"_onBlur()\"\n />\n <button\n type=\"button\"\n class=\"fui-password-input__toggle\"\n (click)=\"toggleVisibility()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"_passwordVisible() ? 'Hide password' : 'Show password'\"\n tabindex=\"-1\"\n >\n <fui-icon [name]=\"_passwordVisible() ? 'eye-slash' : 'eye'\" size=\"sm\"></fui-icon>\n </button>\n</div>\n\n@if (showStrengthMeter() && _value()) {\n <div class=\"fui-password-input__strength-meter\" aria-live=\"polite\">\n <div\n class=\"fui-password-input__strength-bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"_strengthPercent()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'Password strength: ' + _strength()\"\n >\n <div\n class=\"fui-password-input__strength-fill\"\n [style.width.%]=\"_strengthPercent()\"\n [class.fui-password-input__strength-fill--weak]=\"_strength() === 'weak'\"\n [class.fui-password-input__strength-fill--fair]=\"_strength() === 'fair'\"\n [class.fui-password-input__strength-fill--good]=\"_strength() === 'good'\"\n [class.fui-password-input__strength-fill--strong]=\"_strength() === 'strong'\"\n ></div>\n </div>\n <span class=\"fui-password-input__strength-label\" aria-hidden=\"true\">{{ _strength() }}</span>\n </div>\n}\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-password-input{display:block;width:100%}.fui-password-input__wrapper{display:flex;flex-direction:row;align-items:center;width:100%;gap:var(--fui-gap-4)}.fui-password-input__input{flex:1;min-width:0;border:none;outline:none;background:transparent;font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);line-height:1.5;color:var(--fui-text-primary);padding:0}.fui-password-input__input::placeholder{color:var(--fui-text-placeholder, var(--fui-text-disabled))}.fui-password-input__input:disabled{color:var(--fui-text-disabled);cursor:not-allowed}.fui-password-input__toggle{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-password-input__toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-password-input__toggle:hover:not(:disabled){opacity:1;color:var(--fui-text-primary)}.fui-password-input__toggle:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-password-input__toggle:disabled{opacity:.4;cursor:not-allowed}.fui-password-input__strength-meter{display:flex;flex-direction:column;gap:var(--fui-gap-4);padding-top:var(--fui-gap-8)}.fui-password-input__strength-bar{width:100%;height:4px;background-color:var(--fui-surface-05, var(--fui-secondary-20));border-radius:var(--fui-border-radius-pill);overflow:hidden}.fui-password-input__strength-fill{height:100%;border-radius:var(--fui-border-radius-pill);transition:width,background-color var(--fui-duration-moderate-01) var(--fui-ease-standard) 0ms}.fui-password-input__strength-fill--weak{background-color:var(--fui-state-error)}.fui-password-input__strength-fill--fair{background-color:var(--fui-state-warning)}.fui-password-input__strength-fill--good{background-color:var(--fui-state-info)}.fui-password-input__strength-fill--strong{background-color:var(--fui-state-success)}.fui-password-input__strength-label{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);font-weight:var(--fui-font-weight-regular);color:var(--fui-text-secondary);text-transform:capitalize}.fui-password-input--disabled{opacity:var(--fui-opacity-disabled);cursor:not-allowed}.fui-password-input--disabled .fui-password-input__input{cursor:not-allowed}.fui-password-input--readonly .fui-password-input__input{cursor:default}.fui-password-input--readonly .fui-password-input__toggle{display:none}.fui-password-input--error .fui-password-input__input{color:var(--fui-state-error)}@media(prefers-reduced-motion:reduce){.fui-password-input__strength-fill,.fui-password-input__toggle{transition:none}}\n"], dependencies: [{ kind: "component", type: FuiIconComponent, selector: "fui-icon", inputs: ["name", "size", "weight", "color", "ariaLabel", "spin", "pulse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
278
|
+
}
|
|
279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuiPasswordInputComponent, decorators: [{
|
|
280
|
+
type: Component,
|
|
281
|
+
args: [{ selector: 'fui-password-input', standalone: true, imports: [FuiIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
282
|
+
class: 'fui-password-input',
|
|
283
|
+
'[class.fui-password-input--focused]': 'focused()',
|
|
284
|
+
'[class.fui-password-input--disabled]': 'disabled()',
|
|
285
|
+
'[class.fui-password-input--readonly]': 'readonly()',
|
|
286
|
+
'[class.fui-password-input--error]': 'errorState()',
|
|
287
|
+
'[attr.id]': 'id',
|
|
288
|
+
}, providers: [
|
|
289
|
+
{
|
|
290
|
+
provide: NG_VALUE_ACCESSOR,
|
|
291
|
+
useExisting: FuiPasswordInputComponent,
|
|
292
|
+
multi: true,
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
provide: FUI_FORM_FIELD_CONTROL,
|
|
296
|
+
useExisting: FuiPasswordInputComponent,
|
|
297
|
+
},
|
|
298
|
+
], template: "<div class=\"fui-password-input__wrapper\">\n <input\n #inputElement\n class=\"fui-password-input__input\"\n [attr.type]=\"_inputType()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [attr.readonly]=\"readonly() ? '' : null\"\n [attr.aria-invalid]=\"errorState()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"_ariaDescribedby\"\n autocomplete=\"current-password\"\n (input)=\"_onInput($event)\"\n (focus)=\"_onFocus()\"\n (blur)=\"_onBlur()\"\n />\n <button\n type=\"button\"\n class=\"fui-password-input__toggle\"\n (click)=\"toggleVisibility()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"_passwordVisible() ? 'Hide password' : 'Show password'\"\n tabindex=\"-1\"\n >\n <fui-icon [name]=\"_passwordVisible() ? 'eye-slash' : 'eye'\" size=\"sm\"></fui-icon>\n </button>\n</div>\n\n@if (showStrengthMeter() && _value()) {\n <div class=\"fui-password-input__strength-meter\" aria-live=\"polite\">\n <div\n class=\"fui-password-input__strength-bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"_strengthPercent()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'Password strength: ' + _strength()\"\n >\n <div\n class=\"fui-password-input__strength-fill\"\n [style.width.%]=\"_strengthPercent()\"\n [class.fui-password-input__strength-fill--weak]=\"_strength() === 'weak'\"\n [class.fui-password-input__strength-fill--fair]=\"_strength() === 'fair'\"\n [class.fui-password-input__strength-fill--good]=\"_strength() === 'good'\"\n [class.fui-password-input__strength-fill--strong]=\"_strength() === 'strong'\"\n ></div>\n </div>\n <span class=\"fui-password-input__strength-label\" aria-hidden=\"true\">{{ _strength() }}</span>\n </div>\n}\n", styles: ["@keyframes fui-skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}@keyframes fui-spin{to{transform:rotate(360deg)}}@keyframes fui-shake{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-2px)}20%,40%,60%,80%{transform:translate(2px)}}.fui-motion-fade-in{transition:opacity var(--fui-duration-fast-02) var(--fui-ease-entrance) 0ms}.fui-motion-fade-out{transition:opacity var(--fui-duration-fast-01) var(--fui-ease-exit) 0ms}.fui-motion-slide-in-bottom{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-bottom.fui-motion-entering{transform:translateY(1rem)}.fui-motion-slide-in-top{transition:transform var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:translateY(0)}.fui-motion-slide-in-top.fui-motion-entering{transform:translateY(-1rem)}.fui-motion-scale-in{transition:transform,opacity var(--fui-duration-moderate-01) var(--fui-ease-entrance) 0ms;transform:scale(1);opacity:1}.fui-motion-scale-in.fui-motion-entering{transform:scale(.95);opacity:0}.fui-no-motion{transition:none!important;animation:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@keyframes fui-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}@keyframes fui-slide-in{0%{transform:translate(120%)}to{transform:translate(0)}}.fui-slide-in{animation:fui-slide-in var(--fui-duration-moderate-01) var(--fui-ease-entrance)}.fui-password-input{display:block;width:100%}.fui-password-input__wrapper{display:flex;flex-direction:row;align-items:center;width:100%;gap:var(--fui-gap-4)}.fui-password-input__input{flex:1;min-width:0;border:none;outline:none;background:transparent;font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-02);line-height:1.5;color:var(--fui-text-primary);padding:0}.fui-password-input__input::placeholder{color:var(--fui-text-placeholder, var(--fui-text-disabled))}.fui-password-input__input:disabled{color:var(--fui-text-disabled);cursor:not-allowed}.fui-password-input__toggle{background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;outline:none}.fui-password-input__toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:1.5rem;height:1.5rem;border-radius:var(--fui-border-radius-sm);color:var(--fui-text-secondary);cursor:pointer;opacity:.7;transition:opacity,color var(--fui-duration-fast-02) var(--fui-ease-standard) 0ms}.fui-password-input__toggle:hover:not(:disabled){opacity:1;color:var(--fui-text-primary)}.fui-password-input__toggle:focus-visible{outline:2px solid var(--fui-primary);outline-offset:2px}.fui-password-input__toggle:disabled{opacity:.4;cursor:not-allowed}.fui-password-input__strength-meter{display:flex;flex-direction:column;gap:var(--fui-gap-4);padding-top:var(--fui-gap-8)}.fui-password-input__strength-bar{width:100%;height:4px;background-color:var(--fui-surface-05, var(--fui-secondary-20));border-radius:var(--fui-border-radius-pill);overflow:hidden}.fui-password-input__strength-fill{height:100%;border-radius:var(--fui-border-radius-pill);transition:width,background-color var(--fui-duration-moderate-01) var(--fui-ease-standard) 0ms}.fui-password-input__strength-fill--weak{background-color:var(--fui-state-error)}.fui-password-input__strength-fill--fair{background-color:var(--fui-state-warning)}.fui-password-input__strength-fill--good{background-color:var(--fui-state-info)}.fui-password-input__strength-fill--strong{background-color:var(--fui-state-success)}.fui-password-input__strength-label{font-family:var(--fui-font-family-sans);font-size:var(--fui-font-size-01);font-weight:var(--fui-font-weight-regular);color:var(--fui-text-secondary);text-transform:capitalize}.fui-password-input--disabled{opacity:var(--fui-opacity-disabled);cursor:not-allowed}.fui-password-input--disabled .fui-password-input__input{cursor:not-allowed}.fui-password-input--readonly .fui-password-input__input{cursor:default}.fui-password-input--readonly .fui-password-input__toggle{display:none}.fui-password-input--error .fui-password-input__input{color:var(--fui-state-error)}@media(prefers-reduced-motion:reduce){.fui-password-input__strength-fill,.fui-password-input__toggle{transition:none}}\n"] }]
|
|
299
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], showStrengthMeter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showStrengthMeter", required: false }] }], strengthConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "strengthConfig", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], inputElement: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }] } });
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Generated bundle index. Do not edit.
|
|
303
|
+
*/
|
|
304
|
+
|
|
305
|
+
export { DEFAULT_STRENGTH_CONFIG, FuiPasswordInputComponent };
|
|
306
|
+
//# sourceMappingURL=raintonic-formaui-components-password-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raintonic-formaui-components-password-input.mjs","sources":["../../../lib/components/password-input/password-input.types.ts","../../../lib/components/password-input/password-input.component.ts","../../../lib/components/password-input/password-input.component.html","../../../lib/components/password-input/raintonic-formaui-components-password-input.ts"],"sourcesContent":["export type PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';\n\nexport interface PasswordStrengthConfig {\n minLength?: number;\n requireUppercase?: boolean;\n requireLowercase?: boolean;\n requireNumbers?: boolean;\n requireSpecial?: boolean;\n}\n\nexport const DEFAULT_STRENGTH_CONFIG: PasswordStrengthConfig = {\n minLength: 8,\n requireUppercase: true,\n requireLowercase: true,\n requireNumbers: true,\n requireSpecial: false,\n};\n","import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n input,\n computed,\n signal,\n viewChild,\n ElementRef,\n Signal,\n WritableSignal,\n OnDestroy,\n DoCheck,\n inject,\n effect,\n booleanAttribute,\n} from '@angular/core';\n\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { Subject } from 'rxjs';\nimport { FUI_FORM_FIELD_CONTROL, FuiFormFieldControl } from '@raintonic/formaui/core';\nimport { DefaultErrorStateMatcher, ErrorStateMatcher } from '@raintonic/formaui/core';\nimport { injectNgControl, updateErrorState, syncRequiredState, syncNgControlDisabled } from '@raintonic/formaui/cdk/form-field';\nimport { FuiIconComponent } from '@raintonic/formaui/components/icon';\nimport { DEFAULT_STRENGTH_CONFIG, PasswordStrength, PasswordStrengthConfig } from './password-input.types';\n\n/**\n * # FuiPasswordInputComponent\n *\n * A password input component with visibility toggle and optional strength meter.\n * Integrates with fui-form-field and Angular Forms.\n *\n * ## Features\n * - Password visibility toggle\n * - Optional password strength meter\n * - Full Reactive Forms integration (ControlValueAccessor)\n * - FuiFormFieldControl integration for fui-form-field\n * - Error state handling\n * - Accessibility (ARIA)\n *\n * ## Usage\n *\n * ### Basic Password Input\n * ```html\n * <fui-form-field>\n * <fui-label>Password</fui-label>\n * <fui-password-input formControlName=\"password\"></fui-password-input>\n * </fui-form-field>\n * ```\n *\n * ### With Strength Meter\n * ```html\n * <fui-form-field>\n * <fui-label>Password</fui-label>\n * <fui-password-input\n * formControlName=\"password\"\n * [showStrengthMeter]=\"true\"\n * ></fui-password-input>\n * </fui-form-field>\n * ```\n */\n@Component({\n selector: 'fui-password-input',\n standalone: true,\n imports: [FuiIconComponent],\n templateUrl: './password-input.component.html',\n styleUrls: ['./password-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'fui-password-input',\n '[class.fui-password-input--focused]': 'focused()',\n '[class.fui-password-input--disabled]': 'disabled()',\n '[class.fui-password-input--readonly]': 'readonly()',\n '[class.fui-password-input--error]': 'errorState()',\n '[attr.id]': 'id',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: FuiPasswordInputComponent,\n multi: true,\n },\n {\n provide: FUI_FORM_FIELD_CONTROL,\n useExisting: FuiPasswordInputComponent,\n },\n ],\n})\nexport class FuiPasswordInputComponent\n implements ControlValueAccessor, FuiFormFieldControl<string>, DoCheck, OnDestroy\n{\n // Static properties\n static nextId = 0;\n readonly controlType = 'fui-password-input';\n\n // Inputs\n readonly placeholder = input('');\n readonly disabledInput = input<boolean, unknown>(false, {\n alias: 'disabled',\n transform: booleanAttribute,\n });\n readonly readonly = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly showStrengthMeter = input<boolean, unknown>(false, {\n transform: booleanAttribute,\n });\n readonly strengthConfig = input(DEFAULT_STRENGTH_CONFIG);\n readonly errorStateMatcher = input<ErrorStateMatcher | null>(null);\n\n // Internal state\n readonly _passwordVisible: WritableSignal<boolean> = signal(false);\n readonly _value: WritableSignal<string> = signal('');\n private readonly _focused: WritableSignal<boolean> = signal(false);\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n private readonly _disabled: WritableSignal<boolean> = signal(false);\n private readonly _ngControlDisabled: WritableSignal<boolean> = signal(false);\n private readonly _errorState: WritableSignal<boolean> = signal(false);\n readonly errorState: Signal<boolean> = this._errorState.asReadonly();\n private readonly _required: WritableSignal<boolean> = signal(false);\n readonly required: Signal<boolean> = this._required.asReadonly();\n\n // Computed\n readonly disabled: Signal<boolean> = computed(\n () => this._disabled() || this.disabledInput() || this._ngControlDisabled(),\n );\n readonly _inputType: Signal<string> = computed(() => (this._passwordVisible() ? 'text' : 'password'));\n readonly value: Signal<string> = this._value.asReadonly();\n readonly empty: Signal<boolean> = computed(() => {\n const v = this._value();\n return !v || v.length === 0;\n });\n\n readonly _strength: Signal<PasswordStrength> = computed(() => {\n return this._calculateStrength(this._value());\n });\n\n readonly _strengthPercent: Signal<number> = computed(() => {\n switch (this._strength()) {\n case 'weak':\n return 25;\n case 'fair':\n return 50;\n case 'good':\n return 75;\n case 'strong':\n return 100;\n default:\n return 0;\n }\n });\n\n // State changes subject for form field compatibility\n readonly stateChanges = new Subject<void>();\n private _uid = `fui-password-input-${FuiPasswordInputComponent.nextId++}`;\n readonly id = this._uid;\n _ariaDescribedby: string | null = null;\n\n // Form control references\n private _parentForm = inject(NgForm, { optional: true });\n private _parentFormGroup = inject(FormGroupDirective, { optional: true });\n private _defaultErrorStateMatcher = inject(DefaultErrorStateMatcher);\n private readonly _ngControlRef = injectNgControl();\n get ngControl(): NgControl | null {\n return this._ngControlRef.ngControl;\n }\n\n // ViewChild for input element\n readonly inputElement: Signal<ElementRef<HTMLInputElement> | undefined> =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n // ControlValueAccessor callbacks\n private _onChange: (value: string) => void = () => {\n /* noop */\n };\n private _onTouched: () => void = () => {\n /* noop */\n };\n\n constructor() {\n void Promise.resolve().then(() => {\n if (this._ngControlRef.ngControl) {\n this._ngControlRef.ngControl.valueAccessor = this;\n }\n });\n\n // Effect to emit state changes\n effect(() => {\n // Track all reactive inputs and internal signals\n this.placeholder();\n this.disabledInput();\n this.readonly();\n this.showStrengthMeter();\n this.strengthConfig();\n this.errorStateMatcher();\n this._passwordVisible();\n this._value();\n this._focused();\n this._disabled();\n this._ngControlDisabled();\n this._required();\n this._errorState();\n\n // Emit state change\n this.stateChanges.next();\n });\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n updateErrorState(\n this.ngControl,\n this._errorState,\n this.errorStateMatcher(),\n this._defaultErrorStateMatcher,\n this._parentForm,\n this._parentFormGroup,\n this.stateChanges,\n );\n syncRequiredState(this.ngControl, this._required, this.stateChanges);\n syncNgControlDisabled(this.ngControl, this._ngControlDisabled, this.stateChanges);\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n // ControlValueAccessor implementation\n writeValue(value: string | null): void {\n const v = value ?? '';\n this._value.set(v);\n // Sync the DOM element value if available\n const el = this.inputElement();\n if (el) {\n el.nativeElement.value = v;\n }\n this.stateChanges.next();\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n this.stateChanges.next();\n }\n\n onContainerClick(_event: MouseEvent): void {\n if (!this._focused()) {\n this.inputElement()?.nativeElement.focus();\n }\n }\n\n setDescribedByIds(ids: string[]): void {\n this._ariaDescribedby = ids.length ? ids.join(' ') : null;\n }\n\n // Event handlers\n _onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n const newValue = target.value;\n if (newValue !== this._value()) {\n this._value.set(newValue);\n this._onChange(newValue);\n this.stateChanges.next();\n }\n }\n\n _onFocus(): void {\n if (!this._focused()) {\n this._focused.set(true);\n this.stateChanges.next();\n }\n }\n\n _onBlur(): void {\n if (this._focused()) {\n this._focused.set(false);\n this._onTouched();\n this.stateChanges.next();\n }\n }\n\n toggleVisibility(): void {\n this._passwordVisible.update((v) => !v);\n }\n\n // Public API\n focus(): void {\n this.inputElement()?.nativeElement.focus();\n }\n\n blur(): void {\n this.inputElement()?.nativeElement.blur();\n }\n\n // Strength calculation\n _calculateStrength(password: string): PasswordStrength {\n if (!password || password.length === 0) {\n return 'weak';\n }\n\n const config = this.strengthConfig();\n let score = 0;\n const maxScore = 5;\n\n // Length check\n const minLen = config.minLength ?? 8;\n if (password.length >= minLen) {\n score++;\n }\n // Bonus for longer passwords\n if (password.length >= minLen + 4) {\n score++;\n }\n\n // Uppercase check\n if (/[A-Z]/.test(password)) {\n score++;\n }\n\n // Lowercase check\n if (/[a-z]/.test(password)) {\n score++;\n }\n\n // Numbers check\n if (/[0-9]/.test(password)) {\n score++;\n }\n\n // Special characters check\n if (/[^A-Za-z0-9]/.test(password)) {\n score++;\n }\n\n // Normalize to strength levels\n const ratio = score / maxScore;\n if (ratio <= 0.3) {\n return 'weak';\n }\n if (ratio <= 0.5) {\n return 'fair';\n }\n if (ratio <= 0.8) {\n return 'good';\n }\n return 'strong';\n }\n}\n","<div class=\"fui-password-input__wrapper\">\n <input\n #inputElement\n class=\"fui-password-input__input\"\n [attr.type]=\"_inputType()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [attr.readonly]=\"readonly() ? '' : null\"\n [attr.aria-invalid]=\"errorState()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-describedby]=\"_ariaDescribedby\"\n autocomplete=\"current-password\"\n (input)=\"_onInput($event)\"\n (focus)=\"_onFocus()\"\n (blur)=\"_onBlur()\"\n />\n <button\n type=\"button\"\n class=\"fui-password-input__toggle\"\n (click)=\"toggleVisibility()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"_passwordVisible() ? 'Hide password' : 'Show password'\"\n tabindex=\"-1\"\n >\n <fui-icon [name]=\"_passwordVisible() ? 'eye-slash' : 'eye'\" size=\"sm\"></fui-icon>\n </button>\n</div>\n\n@if (showStrengthMeter() && _value()) {\n <div class=\"fui-password-input__strength-meter\" aria-live=\"polite\">\n <div\n class=\"fui-password-input__strength-bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"_strengthPercent()\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'Password strength: ' + _strength()\"\n >\n <div\n class=\"fui-password-input__strength-fill\"\n [style.width.%]=\"_strengthPercent()\"\n [class.fui-password-input__strength-fill--weak]=\"_strength() === 'weak'\"\n [class.fui-password-input__strength-fill--fair]=\"_strength() === 'fair'\"\n [class.fui-password-input__strength-fill--good]=\"_strength() === 'good'\"\n [class.fui-password-input__strength-fill--strong]=\"_strength() === 'strong'\"\n ></div>\n </div>\n <span class=\"fui-password-input__strength-label\" aria-hidden=\"true\">{{ _strength() }}</span>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAUO,MAAM,uBAAuB,GAA2B;AAC7D,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,cAAc,EAAE,KAAK;;;ACWvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;MA6BU,yBAAyB,CAAA;;AAIpC,IAAA,OAAO,MAAM,GAAG,CAAC;IACR,WAAW,GAAG,oBAAoB;;AAGlC,IAAA,WAAW,GAAG,KAAK,CAAC,EAAE,kFAAC;AACvB,IAAA,aAAa,GAAG,KAAK,CAAmB,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,CAAA,EACpD,KAAK,EAAE,UAAU;QACjB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;IACO,QAAQ,GAAG,KAAK,CAAmB,KAAK,gFAC/C,SAAS,EAAE,gBAAgB,EAAA,CAC3B;IACO,iBAAiB,GAAG,KAAK,CAAmB,KAAK,yFACxD,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACO,IAAA,cAAc,GAAG,KAAK,CAAC,uBAAuB,qFAAC;AAC/C,IAAA,iBAAiB,GAAG,KAAK,CAA2B,IAAI,wFAAC;;AAGzD,IAAA,gBAAgB,GAA4B,MAAM,CAAC,KAAK,uFAAC;AACzD,IAAA,MAAM,GAA2B,M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