@cute-widgets/base 20.0.5 → 21.0.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/fesm2022/cute-widgets-base-abstract.mjs +15 -15
- package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-alert.mjs +10 -10
- package/fesm2022/cute-widgets-base-alert.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-autocomplete.mjs +14 -14
- package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-badge.mjs +46 -14
- package/fesm2022/cute-widgets-base-badge.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs +11 -11
- package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button-toggle.mjs +29 -12
- package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-button.mjs +20 -20
- package/fesm2022/cute-widgets-base-button.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-card.mjs +40 -40
- package/fesm2022/cute-widgets-base-card.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-checkbox.mjs +28 -28
- package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-chips.mjs +49 -49
- package/fesm2022/cute-widgets-base-chips.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-collapse.mjs +14 -14
- package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-datetime.mjs +11 -11
- package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-directives.mjs +21 -21
- package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-error.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-line.mjs +7 -7
- package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-nav.mjs +30 -28
- package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-observers.mjs +16 -16
- package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-option.mjs +10 -10
- package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-pipes.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-ripple.mjs +3 -3
- package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-theming.mjs +6 -6
- package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core-utils.mjs +3 -3
- package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-core.mjs +36 -36
- package/fesm2022/cute-widgets-base-core.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-datepicker.mjs +100 -99
- package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-dialog.mjs +31 -31
- package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-divider.mjs +7 -7
- package/fesm2022/cute-widgets-base-divider.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-expansion.mjs +27 -27
- package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-form-field.mjs +28 -28
- package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-grid-list.mjs +22 -22
- package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-icon.mjs +10 -10
- package/fesm2022/cute-widgets-base-icon.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-input.mjs +7 -7
- package/fesm2022/cute-widgets-base-input.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout-container.mjs +10 -10
- package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout-stack.mjs +13 -13
- package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-layout.mjs +23 -23
- package/fesm2022/cute-widgets-base-layout.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-list.mjs +56 -56
- package/fesm2022/cute-widgets-base-list.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-menu.mjs +579 -364
- package/fesm2022/cute-widgets-base-menu.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-navbar.mjs +27 -27
- package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-paginator.mjs +11 -11
- package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-progress.mjs +10 -10
- package/fesm2022/cute-widgets-base-progress.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-radio.mjs +11 -11
- package/fesm2022/cute-widgets-base-radio.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-select.mjs +11 -11
- package/fesm2022/cute-widgets-base-select.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sidenav.mjs +26 -26
- package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-slider.mjs +10 -10
- package/fesm2022/cute-widgets-base-slider.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-snack-bar.mjs +28 -28
- package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-sort.mjs +13 -13
- package/fesm2022/cute-widgets-base-sort.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-spinner.mjs +8 -8
- package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-stepper.mjs +40 -40
- package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-table.mjs +58 -66
- package/fesm2022/cute-widgets-base-table.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tabs.mjs +16 -16
- package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-timepicker.mjs +34 -63
- package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-toolbar.mjs +13 -13
- package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tooltip.mjs +10 -10
- package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -1
- package/fesm2022/cute-widgets-base-tree.mjs +25 -25
- package/fesm2022/cute-widgets-base-tree.mjs.map +1 -1
- package/fesm2022/cute-widgets-base.mjs +4 -4
- package/package.json +118 -118
- package/{abstract/index.d.ts → types/cute-widgets-base-abstract.d.ts} +1 -1
- package/{autocomplete/index.d.ts → types/cute-widgets-base-autocomplete.d.ts} +2 -2
- package/{badge/index.d.ts → types/cute-widgets-base-badge.d.ts} +6 -5
- package/{bottom-sheet/index.d.ts → types/cute-widgets-base-bottom-sheet.d.ts} +1 -1
- package/{button-toggle/index.d.ts → types/cute-widgets-base-button-toggle.d.ts} +7 -1
- package/{button/index.d.ts → types/cute-widgets-base-button.d.ts} +1 -1
- package/{checkbox/index.d.ts → types/cute-widgets-base-checkbox.d.ts} +1 -1
- package/{chips/index.d.ts → types/cute-widgets-base-chips.d.ts} +1 -1
- package/{core/nav/index.d.ts → types/cute-widgets-base-core-nav.d.ts} +2 -1
- package/{core/observers/index.d.ts → types/cute-widgets-base-core-observers.d.ts} +1 -1
- package/{core/option/index.d.ts → types/cute-widgets-base-core-option.d.ts} +1 -1
- package/{datepicker/index.d.ts → types/cute-widgets-base-datepicker.d.ts} +2 -2
- package/{expansion/index.d.ts → types/cute-widgets-base-expansion.d.ts} +4 -14
- package/{form-field/index.d.ts → types/cute-widgets-base-form-field.d.ts} +1 -1
- package/{icon/index.d.ts → types/cute-widgets-base-icon.d.ts} +1 -1
- package/{input/index.d.ts → types/cute-widgets-base-input.d.ts} +1 -1
- package/{menu/index.d.ts → types/cute-widgets-base-menu.d.ts} +202 -121
- package/{progress/index.d.ts → types/cute-widgets-base-progress.d.ts} +1 -1
- package/{radio/index.d.ts → types/cute-widgets-base-radio.d.ts} +2 -2
- package/{sidenav/index.d.ts → types/cute-widgets-base-sidenav.d.ts} +1 -1
- package/{snack-bar/index.d.ts → types/cute-widgets-base-snack-bar.d.ts} +1 -1
- package/{sort/index.d.ts → types/cute-widgets-base-sort.d.ts} +1 -1
- package/{table/index.d.ts → types/cute-widgets-base-table.d.ts} +1 -1
- package/{tree/index.d.ts → types/cute-widgets-base-tree.d.ts} +2 -2
- /package/{alert/index.d.ts → types/cute-widgets-base-alert.d.ts} +0 -0
- /package/{card/index.d.ts → types/cute-widgets-base-card.d.ts} +0 -0
- /package/{collapse/index.d.ts → types/cute-widgets-base-collapse.d.ts} +0 -0
- /package/{core/animation/index.d.ts → types/cute-widgets-base-core-animation.d.ts} +0 -0
- /package/{core/datetime/index.d.ts → types/cute-widgets-base-core-datetime.d.ts} +0 -0
- /package/{core/directives/index.d.ts → types/cute-widgets-base-core-directives.d.ts} +0 -0
- /package/{core/error/index.d.ts → types/cute-widgets-base-core-error.d.ts} +0 -0
- /package/{core/interfaces/index.d.ts → types/cute-widgets-base-core-interfaces.d.ts} +0 -0
- /package/{core/layout/index.d.ts → types/cute-widgets-base-core-layout.d.ts} +0 -0
- /package/{core/line/index.d.ts → types/cute-widgets-base-core-line.d.ts} +0 -0
- /package/{core/pipes/index.d.ts → types/cute-widgets-base-core-pipes.d.ts} +0 -0
- /package/{core/ripple/index.d.ts → types/cute-widgets-base-core-ripple.d.ts} +0 -0
- /package/{core/testing/index.d.ts → types/cute-widgets-base-core-testing.d.ts} +0 -0
- /package/{core/theming/index.d.ts → types/cute-widgets-base-core-theming.d.ts} +0 -0
- /package/{core/types/index.d.ts → types/cute-widgets-base-core-types.d.ts} +0 -0
- /package/{core/utils/index.d.ts → types/cute-widgets-base-core-utils.d.ts} +0 -0
- /package/{core/index.d.ts → types/cute-widgets-base-core.d.ts} +0 -0
- /package/{dialog/index.d.ts → types/cute-widgets-base-dialog.d.ts} +0 -0
- /package/{divider/index.d.ts → types/cute-widgets-base-divider.d.ts} +0 -0
- /package/{grid-list/index.d.ts → types/cute-widgets-base-grid-list.d.ts} +0 -0
- /package/{layout/container/index.d.ts → types/cute-widgets-base-layout-container.d.ts} +0 -0
- /package/{layout/stack/index.d.ts → types/cute-widgets-base-layout-stack.d.ts} +0 -0
- /package/{layout/index.d.ts → types/cute-widgets-base-layout.d.ts} +0 -0
- /package/{list/index.d.ts → types/cute-widgets-base-list.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/cute-widgets-base-navbar.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/cute-widgets-base-paginator.d.ts} +0 -0
- /package/{select/index.d.ts → types/cute-widgets-base-select.d.ts} +0 -0
- /package/{slider/index.d.ts → types/cute-widgets-base-slider.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/cute-widgets-base-spinner.d.ts} +0 -0
- /package/{stepper/index.d.ts → types/cute-widgets-base-stepper.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/cute-widgets-base-tabs.d.ts} +0 -0
- /package/{timepicker/index.d.ts → types/cute-widgets-base-timepicker.d.ts} +0 -0
- /package/{toolbar/index.d.ts → types/cute-widgets-base-toolbar.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/cute-widgets-base-tooltip.d.ts} +0 -0
- /package/{index.d.ts → types/cute-widgets-base.d.ts} +0 -0
|
@@ -135,10 +135,10 @@ class CuteSort {
|
|
|
135
135
|
this._stateChanges.complete();
|
|
136
136
|
this._initializedStream.complete();
|
|
137
137
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
139
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSort, deps: [{ token: CUTE_SORT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
139
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.0", type: CuteSort, isStandalone: true, selector: "[cuteSort]", inputs: { active: ["cuteSortActive", "active"], start: ["cuteSortStart", "start"], direction: ["cuteSortDirection", "direction"], disableClear: ["cuteSortDisableClear", "disableClear", booleanAttribute], disabled: ["cuteSortDisabled", "disabled", booleanAttribute] }, outputs: { sortChange: "cuteSortChange" }, host: { classAttribute: "cute-sort" }, exportAs: ["cuteSort"], usesOnChanges: true, ngImport: i0 }); }
|
|
140
140
|
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSort, decorators: [{
|
|
142
142
|
type: Directive,
|
|
143
143
|
args: [{
|
|
144
144
|
selector: '[cuteSort]',
|
|
@@ -207,10 +207,10 @@ class CuteSortHeaderIntl {
|
|
|
207
207
|
*/
|
|
208
208
|
this.changes = new Subject();
|
|
209
209
|
}
|
|
210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
211
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortHeaderIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
211
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortHeaderIntl, providedIn: 'root' }); }
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortHeaderIntl, decorators: [{
|
|
214
214
|
type: Injectable,
|
|
215
215
|
args: [{ providedIn: 'root' }]
|
|
216
216
|
}] });
|
|
@@ -377,10 +377,10 @@ class CuteSortHeader {
|
|
|
377
377
|
}
|
|
378
378
|
this._sortActionDescription = newDescription;
|
|
379
379
|
}
|
|
380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
381
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
381
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: CuteSortHeader, isStandalone: true, selector: "[cute-sort-header]", inputs: { id: ["cute-sort-header", "id"], arrowPosition: "arrowPosition", start: "start", disabled: ["disabled", "disabled", booleanAttribute], sortActionDescription: "sortActionDescription", disableClear: ["disableClear", "disableClear", booleanAttribute] }, host: { listeners: { "click": "_toggleOnInteraction()", "keydown": "_handleKeydown($event)", "mouseleave": "_recentlyCleared.set(null)" }, properties: { "attr.aria-sort": "_getAriaSortAttribute()", "class.cute-sort-header-disabled": "_isDisabled()" }, classAttribute: "cute-sort-header" }, exportAs: ["cuteSortHeader"], ngImport: i0, template: "<!--\r\n We set the `tabindex` on an element inside the table header, rather than the header itself,\r\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\r\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\r\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\r\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\r\n will be read out as the user is navigating the table's cell (see #13012).\r\n\r\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\r\n-->\r\n<div class=\"cute-sort-header-container cute-focus-indicator\"\r\n [class.cute-sort-header-sorted]=\"_isSorted()\"\r\n [class.cute-sort-header-position-before]=\"arrowPosition === 'before'\"\r\n [class.cute-sort-header-descending]=\"_sort.direction === 'desc'\"\r\n [class.cute-sort-header-ascending]=\"_sort.direction === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-ascending]=\"_recentlyCleared() === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-descending]=\"_recentlyCleared() === 'desc'\"\r\n [class.cute-sort-header-animations-disabled]=\"_animationsDisabled\"\r\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\r\n [attr.role]=\"_isDisabled() ? null : 'button'\">\r\n\r\n <!--\r\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\r\n number of screenshot diff failures. It should be removed eventually. Note that the difference\r\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\r\n causes it to be center-aligned, whereas removing it will keep the text to the left.\r\n -->\r\n <div class=\"cute-sort-header-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Disable animations while a current animation is running -->\r\n @if (_renderArrow()) {\r\n <div class=\"cute-sort-header-arrow\">\r\n <ng-content select=\"[cuteSortHeaderIcon]\">\r\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\r\n <path d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\"/>\r\n </svg>\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".cute-sort-header{cursor:pointer}.cute-sort-header-disabled{cursor:default}.cute-sort-header-container{display:flex;align-items:center;letter-spacing:normal;outline:0}[cute-sort-header].cdk-keyboard-focused .cute-sort-header-container,[cute-sort-header].cdk-program-focused .cute-sort-header-container{border-bottom:solid 1px currentColor}.cute-sort-header-container:before{margin:calc(calc(var(--cute-focus-indicator-border-width, 1px) + 2px) * -1)}.cute-sort-header-content{display:flex;align-items:center;text-align:center}.cute-sort-header-position-before{flex-direction:row-reverse}@keyframes _cute-sort-header-recently-cleared-ascending{0%{transform:translateY(0);opacity:.68}to{transform:translateY(-25%);opacity:0}}@keyframes _cute-sort-header-recently-cleared-descending{0%{transform:translateY(0) rotate(180deg);opacity:.68}to{transform:translateY(25%) rotate(180deg);opacity:0}}.cute-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;transition:transform 225ms cubic-bezier(.4,0,.2,1),opacity 225ms cubic-bezier(.4,0,.2,1);opacity:0;overflow:visible}.cute-sort-header.cdk-keyboard-focused .cute-sort-header-arrow,.cute-sort-header.cdk-program-focused .cute-sort-header-arrow,.cute-sort-header:hover .cute-sort-header-arrow{opacity:.38}.cute-sort-header .cute-sort-header-sorted .cute-sort-header-arrow{opacity:.68}.cute-sort-header-descending .cute-sort-header-arrow{transform:rotate(180deg)}.cute-sort-header-recently-cleared-ascending .cute-sort-header-arrow{transform:translateY(-25%)}.cute-sort-header-recently-cleared-ascending .cute-sort-header-arrow{transition:none;animation:_cute-sort-header-recently-cleared-ascending 225ms cubic-bezier(.4,0,.2,1) forwards}.cute-sort-header-recently-cleared-descending .cute-sort-header-arrow{transition:none;animation:_cute-sort-header-recently-cleared-descending 225ms cubic-bezier(.4,0,.2,1) forwards}.cute-sort-header-animations-disabled .cute-sort-header-arrow{transition-duration:0ms;animation-duration:0ms}.cute-sort-header-arrow>svg,.cute-sort-header-arrow [cuteSortHeaderIcon]{width:24px;height:24px;fill:currentColor;position:absolute;top:50%;left:50%;margin:-12px 0 0 -12px;transform:translateZ(0)}.cute-sort-header-arrow,[dir=rtl] .cute-sort-header-position-before .cute-sort-header-arrow{margin:0 0 0 6px}.cute-sort-header-position-before .cute-sort-header-arrow,[dir=rtl] .cute-sort-header-arrow{margin:0 6px 0 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
382
382
|
}
|
|
383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortHeader, decorators: [{
|
|
384
384
|
type: Component,
|
|
385
385
|
args: [{ selector: '[cute-sort-header]', exportAs: 'cuteSortHeader', host: {
|
|
386
386
|
'class': 'cute-sort-header',
|
|
@@ -420,11 +420,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
420
420
|
*/
|
|
421
421
|
const TYPES = [CuteSort, CuteSortHeader];
|
|
422
422
|
class CuteSortModule {
|
|
423
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
424
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
425
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
424
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: CuteSortModule, imports: [CommonModule, CuteSort, CuteSortHeader], exports: [CuteSort, CuteSortHeader] }); }
|
|
425
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortModule, providers: [CUTE_SORT_HEADER_INTL_PROVIDER], imports: [CommonModule] }); }
|
|
426
426
|
}
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteSortModule, decorators: [{
|
|
428
428
|
type: NgModule,
|
|
429
429
|
args: [{
|
|
430
430
|
imports: [CommonModule, ...TYPES],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cute-widgets-base-sort.mjs","sources":["../../../../projects/cute-widgets/base/sort/src/sort-errors.ts","../../../../projects/cute-widgets/base/sort/src/sort.ts","../../../../projects/cute-widgets/base/sort/src/sort-header-intl.ts","../../../../projects/cute-widgets/base/sort/src/sort-header.ts","../../../../projects/cute-widgets/base/sort/src/sort-header.html","../../../../projects/cute-widgets/base/sort/src/sort.module.ts","../../../../projects/cute-widgets/base/sort/cute-widgets-base-sort.ts"],"sourcesContent":["\r\n/** @docs-private */\r\nexport function getSortDuplicateSortableIdError(id: string): Error {\r\n return Error(`Cannot have two CuteSortables with the same id (${id}).`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortHeaderNotContainedWithinSortError(): Error {\r\n return Error(`CuteSortHeader must be placed within a parent element with the CuteSort directive.`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortHeaderMissingIdError(): Error {\r\n return Error(`CuteSortHeader must be provided with a unique id.`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortInvalidDirectionError(direction: string): Error {\r\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {\r\n Directive,\r\n EventEmitter,\r\n Inject,\r\n InjectionToken,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional,\r\n Output,\r\n booleanAttribute, isDevMode, SimpleChanges,\r\n} from '@angular/core';\r\nimport {Observable, ReplaySubject, Subject} from 'rxjs';\r\nimport {SortDirection} from './sort-direction';\r\nimport {\r\n getSortDuplicateSortableIdError,\r\n getSortHeaderMissingIdError,\r\n getSortInvalidDirectionError,\r\n} from './sort-errors';\r\n\r\n/** Position of the arrow that displays when sorted. */\r\nexport type SortHeaderArrowPosition = 'before' | 'after';\r\n\r\n/** Interface for a directive that holds sorting state consumed by `CuteSortHeader`. */\r\nexport interface CuteSortable {\r\n /** The id of the column being sorted. */\r\n id: string;\r\n\r\n /** Starting a sort direction. */\r\n start: SortDirection;\r\n\r\n /** Whether to disable clearing the sorting state. */\r\n disableClear: boolean;\r\n}\r\n\r\n/** The current sort state. */\r\nexport interface Sort {\r\n /** The id of the column being sorted. */\r\n active: string;\r\n\r\n /** The sort direction. */\r\n direction: SortDirection;\r\n}\r\n\r\n/** Default options for `cute-sort`. */\r\nexport interface CuteSortDefaultOptions {\r\n /** Whether to disable clearing the sorting state. */\r\n disableClear?: boolean;\r\n /** Position of the arrow that displays when sorted. */\r\n arrowPosition?: SortHeaderArrowPosition;\r\n}\r\n\r\n/** Injection token to be used to override the default options for `cute-sort`. */\r\nexport const CUTE_SORT_DEFAULT_OPTIONS = new InjectionToken<CuteSortDefaultOptions>(\r\n 'CUTE_SORT_DEFAULT_OPTIONS',\r\n);\r\n\r\n// CWT: Changes to Sort interface implementation\r\n/** Container for `CuteSortable`s to manage the sort state and provide default sort parameters. */\r\n@Directive({\r\n selector: '[cuteSort]',\r\n exportAs: 'cuteSort',\r\n host: {\r\n 'class': 'cute-sort',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSort implements OnChanges, OnDestroy, OnInit, Sort {\r\n private _initializedStream = new ReplaySubject<void>(1);\r\n\r\n /** Collection of all registered sortables that this directive manages. */\r\n sortables = new Map<string, CuteSortable>();\r\n\r\n /** Used to notify any child components listening to state changes. */\r\n readonly _stateChanges = new Subject<void>();\r\n\r\n /** The id of the most recently sorted CuteSortable. */\r\n @Input('cuteSortActive') active: string = \"\";\r\n\r\n /**\r\n * The direction to set when a CuteSortable is initially sorted.\r\n * May be overridden by the CuteSortable's sort start.\r\n */\r\n @Input('cuteSortStart') start: SortDirection = 'asc';\r\n\r\n /** The sort direction of the currently active CuteSortable. */\r\n @Input('cuteSortDirection')\r\n get direction(): SortDirection { return this._direction; }\r\n set direction(direction: SortDirection) {\r\n if (\r\n direction &&\r\n direction !== 'asc' &&\r\n direction !== 'desc' &&\r\n isDevMode()\r\n ) {\r\n throw getSortInvalidDirectionError(direction);\r\n }\r\n this._direction = direction;\r\n }\r\n private _direction: SortDirection = '';\r\n\r\n /**\r\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\r\n * May be overridden by the CuteSortable's disable clear input.\r\n */\r\n @Input({alias: 'cuteSortDisableClear', transform: booleanAttribute})\r\n protected disableClear: boolean = false;\r\n\r\n /** Whether the sortable is disabled. */\r\n @Input({alias: 'cuteSortDisabled', transform: booleanAttribute})\r\n disabled: boolean = false;\r\n\r\n /** Event emitted when the user changes either the active sort or sort direction. */\r\n @Output('cuteSortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\r\n\r\n /** Emits when the paginator is initialized. */\r\n initialized$: Observable<void> = this._initializedStream;\r\n\r\n constructor(\r\n @Optional()\r\n @Inject(CUTE_SORT_DEFAULT_OPTIONS)\r\n private _defaultOptions?: CuteSortDefaultOptions,\r\n ) {}\r\n\r\n /**\r\n * Register function to be used by the contained CuteSortables. Adds the CuteSortable to the\r\n * collection of CuteSortables.\r\n */\r\n register(sortable: CuteSortable): void {\r\n if (isDevMode()) {\r\n if (!sortable.id) {\r\n throw getSortHeaderMissingIdError();\r\n }\r\n\r\n if (this.sortables.has(sortable.id)) {\r\n throw getSortDuplicateSortableIdError(sortable.id);\r\n }\r\n }\r\n\r\n this.sortables.set(sortable.id, sortable);\r\n }\r\n\r\n /**\r\n * Unregister function to be used by the contained CuteSortables. Removes the CuteSortable from the\r\n * collection of contained CuteSortables.\r\n */\r\n deregister(sortable: CuteSortable): void {\r\n this.sortables.delete(sortable.id);\r\n }\r\n\r\n /** Sets the active sort id and determines the new sort direction. */\r\n sort(sortable: CuteSortable): void {\r\n if (this.active != sortable.id) {\r\n this.active = sortable.id;\r\n this.direction = sortable.start ? sortable.start : this.start;\r\n } else {\r\n this.direction = this.getNextSortDirection(sortable);\r\n }\r\n\r\n this.sortChange.emit({active: this.active, direction: this.direction});\r\n }\r\n\r\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\r\n getNextSortDirection(sortable: CuteSortable): SortDirection {\r\n if (!sortable) {\r\n return '';\r\n }\r\n\r\n // Get the sort direction cycle with the potential sortable overrides.\r\n const disableClear =\r\n sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\r\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\r\n\r\n // Get and return the next direction in the cycle\r\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\r\n if (nextDirectionIndex >= sortDirectionCycle.length) {\r\n nextDirectionIndex = 0;\r\n }\r\n return sortDirectionCycle[nextDirectionIndex];\r\n }\r\n\r\n ngOnInit() {\r\n this._initializedStream.next();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n this._stateChanges.next();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._stateChanges.complete();\r\n this._initializedStream.complete();\r\n }\r\n}\r\n\r\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\r\nfunction getSortDirectionCycle(start: SortDirection, disableClear: boolean): SortDirection[] {\r\n let sortOrder: SortDirection[] = ['asc', 'desc'];\r\n if (start == 'desc') {\r\n sortOrder.reverse();\r\n }\r\n if (!disableClear) {\r\n sortOrder.push('');\r\n }\r\n\r\n return sortOrder;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Injectable, SkipSelf, Optional} from '@angular/core';\r\nimport {Subject} from 'rxjs';\r\n\r\n/**\r\n * To modify the labels and text displayed, create a new instance of CuteSortHeaderIntl and\r\n * include it in a custom provider.\r\n */\r\n@Injectable({providedIn: 'root'})\r\nexport class CuteSortHeaderIntl {\r\n /**\r\n * Stream that emits whenever the labels here are changed. Use this to notify\r\n * components if the labels have changed after initialization.\r\n */\r\n readonly changes: Subject<void> = new Subject<void>();\r\n}\r\n\r\n/** @docs-private */\r\nexport function CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: CuteSortHeaderIntl) {\r\n return parentIntl || new CuteSortHeaderIntl();\r\n}\r\n\r\n/** @docs-private */\r\nexport const CUTE_SORT_HEADER_INTL_PROVIDER = {\r\n // If there is already an CuteSortHeaderIntl available, use that. Otherwise, provide a new one.\r\n provide: CuteSortHeaderIntl,\r\n deps: [[new Optional(), new SkipSelf(), CuteSortHeaderIntl]],\r\n useFactory: CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY,\r\n};\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\r\nimport {ENTER, SPACE} from '@angular/cdk/keycodes';\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n inject,\r\n signal,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport {merge, Subscription} from 'rxjs';\r\nimport {\r\n CUTE_SORT_DEFAULT_OPTIONS,\r\n CuteSort,\r\n CuteSortable,\r\n CuteSortDefaultOptions,\r\n SortHeaderArrowPosition,\r\n} from './sort';\r\nimport {SortDirection} from './sort-direction';\r\nimport {getSortHeaderNotContainedWithinSortError} from './sort-errors';\r\nimport {CuteSortHeaderIntl} from './sort-header-intl';\r\nimport {_animationsDisabled} from '@cute-widgets/base/core/animation';\r\n\r\n/** Column definition associated with a `CuteSortHeader`. */\r\ninterface CuteSortHeaderColumnDef {\r\n name: string;\r\n}\r\n\r\n/**\r\n * Applies sorting behavior (click to change sort) and styles to an element, including an\r\n * arrow to display the current sort direction.\r\n *\r\n * Must be provided with an id and contained within a parent CuteSort directive.\r\n *\r\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\r\n * column definition.\r\n */\r\n@Component({\r\n selector: '[cute-sort-header]',\r\n exportAs: 'cuteSortHeader',\r\n templateUrl: './sort-header.html',\r\n styleUrl: './sort-header.scss',\r\n host: {\r\n 'class': 'cute-sort-header',\r\n '(click)': '_toggleOnInteraction()',\r\n '(keydown)': '_handleKeydown($event)',\r\n '(mouseleave)': '_recentlyCleared.set(null)',\r\n '[attr.aria-sort]': '_getAriaSortAttribute()',\r\n '[class.cute-sort-header-disabled]': '_isDisabled()',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterViewInit {\r\n _intl = inject(CuteSortHeaderIntl);\r\n _sort = inject(CuteSort, {optional: true})!;\r\n _columnDef = inject<CuteSortHeaderColumnDef>('CUTE_SORT_HEADER_COLUMN_DEF' as any, {\r\n optional: true,\r\n });\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _focusMonitor = inject(FocusMonitor);\r\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private _ariaDescriber = inject(AriaDescriber, {optional: true});\r\n private _renderChanges: Subscription | undefined;\r\n protected _animationsDisabled = _animationsDisabled();\r\n\r\n /**\r\n * Indicates which state was just cleared from the sort header.\r\n * Will be reset on the next interaction. Used for coordinating animations.\r\n */\r\n protected _recentlyCleared = signal<SortDirection | null>(null);\r\n\r\n /**\r\n * The element with role=\"button\" inside this component's view. We need this\r\n * in order to apply a description with AriaDescriber.\r\n */\r\n private _sortButton!: HTMLElement;\r\n\r\n /**\r\n * ID of this sort header. If used within the context of a CdkColumnDef, this will default to\r\n * the column's name.\r\n */\r\n @Input('cute-sort-header') id!: string;\r\n\r\n /** Sets the position of the arrow that displays when sorted. */\r\n @Input() arrowPosition: SortHeaderArrowPosition = 'after';\r\n\r\n /** Overrides the sort start value of the containing CuteSort for this CuteSortable. */\r\n @Input() start!: SortDirection;\r\n\r\n /** whether the sort header is disabled. */\r\n @Input({transform: booleanAttribute})\r\n disabled: boolean = false;\r\n\r\n /**\r\n * Description applied to CuteSortHeader's button element with aria-describedby. This text should\r\n * describe the action that will occur when the user clicks the sort header.\r\n */\r\n @Input()\r\n get sortActionDescription(): string {\r\n return this._sortActionDescription;\r\n }\r\n set sortActionDescription(value: string) {\r\n this._updateSortActionDescription(value);\r\n }\r\n // Default the action description to \"Sort\" because it's better than nothing.\r\n // Without a description, the button's label comes from the sort header text content,\r\n // which doesn't give any indication that it performs a sorting operation.\r\n private _sortActionDescription: string = 'Sort';\r\n\r\n /** Overrides the disable clear value of the containing CuteSort for this CuteSortable. */\r\n @Input({transform: booleanAttribute})\r\n disableClear: boolean = false;\r\n\r\n constructor(...args: unknown[]);\r\n\r\n constructor() {\r\n //inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\r\n const defaultOptions = inject<CuteSortDefaultOptions>(CUTE_SORT_DEFAULT_OPTIONS, {\r\n optional: true,\r\n });\r\n\r\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\r\n // `cute/table` and `cdk/table` and we can't have the CDK depending on Material, CuteWidgets etc.,\r\n // and we want to avoid having the sort header depending on the CDK table because\r\n // of this single reference.\r\n if (!this._sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\r\n throw getSortHeaderNotContainedWithinSortError();\r\n }\r\n\r\n if (defaultOptions?.arrowPosition) {\r\n this.arrowPosition = defaultOptions?.arrowPosition;\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.id && this._columnDef) {\r\n this.id = this._columnDef.name;\r\n }\r\n\r\n this._sort.register(this);\r\n this._renderChanges = merge(this._sort._stateChanges, this._sort.sortChange).subscribe(() =>\r\n this._changeDetectorRef.markForCheck(),\r\n );\r\n this._sortButton = this._elementRef.nativeElement.querySelector('.cute-sort-header-container')!;\r\n this._updateSortActionDescription(this._sortActionDescription);\r\n }\r\n\r\n ngAfterViewInit() {\r\n // We use the focus monitor because we also want to style\r\n // things differently based on the focus origin.\r\n this._focusMonitor.monitor(this._elementRef, true).subscribe(() => {\r\n // We need the delay here, because we can trigger a signal write error if the header\r\n // has a signal bound to `disabled` which causes it to be blurred (see #31723.)\r\n Promise.resolve().then(() => this._recentlyCleared.set(null));\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n this._sort.deregister(this);\r\n this._renderChanges?.unsubscribe();\r\n\r\n if (this._sortButton) {\r\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\r\n }\r\n }\r\n\r\n /** Triggers the sort on this sort header and removes the indicator hint. */\r\n _toggleOnInteraction() {\r\n if (!this._isDisabled()) {\r\n const wasSorted = this._isSorted();\r\n const prevDirection = this._sort.direction;\r\n this._sort.sort(this);\r\n this._recentlyCleared.set(wasSorted && !this._isSorted() ? prevDirection : null);\r\n }\r\n }\r\n\r\n _handleKeydown(event: KeyboardEvent) {\r\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\r\n event.preventDefault();\r\n this._toggleOnInteraction();\r\n }\r\n }\r\n\r\n /** Whether this CuteSortHeader is currently sorted in either ascending or descending order. */\r\n _isSorted() {\r\n return (\r\n this._sort.active == this.id &&\r\n (this._sort.direction === 'asc' || this._sort.direction === 'desc')\r\n );\r\n }\r\n\r\n _isDisabled() {\r\n return this._sort.disabled || this.disabled;\r\n }\r\n\r\n /**\r\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\r\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\r\n * says that the aria-sort property should only be present on one header at a time, so removing\r\n * ensures this is true.\r\n */\r\n _getAriaSortAttribute() {\r\n if (!this._isSorted()) {\r\n return 'none';\r\n }\r\n\r\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\r\n }\r\n\r\n /** Whether the arrow inside the sort header should be rendered. */\r\n _renderArrow() {\r\n return !this._isDisabled() || this._isSorted();\r\n }\r\n\r\n private _updateSortActionDescription(newDescription: string) {\r\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\r\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\r\n // for every *cell* in the table, creating a lot of unnecessary noise.\r\n\r\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\r\n // nothing to update in the DOM.\r\n if (this._sortButton) {\r\n // removeDescription will no-op if there is no existing message.\r\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\r\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\r\n this._ariaDescriber?.describe(this._sortButton, newDescription);\r\n }\r\n\r\n this._sortActionDescription = newDescription;\r\n }\r\n}\r\n","<!--\r\n We set the `tabindex` on an element inside the table header, rather than the header itself,\r\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\r\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\r\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\r\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\r\n will be read out as the user is navigating the table's cell (see #13012).\r\n\r\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\r\n-->\r\n<div class=\"cute-sort-header-container cute-focus-indicator\"\r\n [class.cute-sort-header-sorted]=\"_isSorted()\"\r\n [class.cute-sort-header-position-before]=\"arrowPosition === 'before'\"\r\n [class.cute-sort-header-descending]=\"_sort.direction === 'desc'\"\r\n [class.cute-sort-header-ascending]=\"_sort.direction === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-ascending]=\"_recentlyCleared() === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-descending]=\"_recentlyCleared() === 'desc'\"\r\n [class.cute-sort-header-animations-disabled]=\"_animationsDisabled\"\r\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\r\n [attr.role]=\"_isDisabled() ? null : 'button'\">\r\n\r\n <!--\r\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\r\n number of screenshot diff failures. It should be removed eventually. Note that the difference\r\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\r\n causes it to be center-aligned, whereas removing it will keep the text to the left.\r\n -->\r\n <div class=\"cute-sort-header-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Disable animations while a current animation is running -->\r\n @if (_renderArrow()) {\r\n <div class=\"cute-sort-header-arrow\">\r\n <ng-content select=\"[cuteSortHeaderIcon]\">\r\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\r\n <path d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\"/>\r\n </svg>\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteSort} from \"./sort\";\r\nimport {CuteSortHeader} from \"./sort-header\";\r\nimport {CUTE_SORT_HEADER_INTL_PROVIDER} from \"./sort-header-intl\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [CuteSort, CuteSortHeader];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n providers: [CUTE_SORT_HEADER_INTL_PROVIDER],\r\n declarations: [],\r\n})\r\nexport class CuteSortModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AACA;AACM,SAAU,+BAA+B,CAAC,EAAU,EAAA;AACxD,IAAA,OAAO,KAAK,CAAC,CAAA,gDAAA,EAAmD,EAAE,CAAA,EAAA,CAAI,CAAC;AACzE;AAEA;SACgB,wCAAwC,GAAA;AACtD,IAAA,OAAO,KAAK,CAAC,CAAA,kFAAA,CAAoF,CAAC;AACpG;AAEA;SACgB,2BAA2B,GAAA;AACzC,IAAA,OAAO,KAAK,CAAC,CAAA,iDAAA,CAAmD,CAAC;AACnE;AAEA;AACM,SAAU,4BAA4B,CAAC,SAAiB,EAAA;AAC5D,IAAA,OAAO,KAAK,CAAC,CAAA,EAAG,SAAS,CAAA,iDAAA,CAAmD,CAAC;AAC/E;;ACnBA;;;;;;;;;;AAUG;AAsDH;MACa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B;AAG7B;AACA;MASa,QAAQ,CAAA;;IAmBnB,IACI,SAAS,KAAoB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;IACzD,IAAI,SAAS,CAAC,SAAwB,EAAA;AACpC,QAAA,IACE,SAAS;AACT,YAAA,SAAS,KAAK,KAAK;AACnB,YAAA,SAAS,KAAK,MAAM;YACpB,SAAS,EAAE,EACX;AACA,YAAA,MAAM,4BAA4B,CAAC,SAAS,CAAC;QAC/C;AACA,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;IAC7B;AAoBA,IAAA,WAAA,CAGU,eAAwC,EAAA;QAAxC,IAAA,CAAA,eAAe,GAAf,eAAe;AArDjB,QAAA,IAAA,CAAA,kBAAkB,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AAA,EAAA,IAAA,EAAA,cAAc,EAAA,SAAA,EAHd,CAAC,8BAA8B,CAAC,YAFjC,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC;AACjC,oBAAA,OAAO,EAAE,KAAK;oBACd,SAAS,EAAE,CAAC,8BAA8B,CAAC;AAC3C,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cute-widgets-base-sort.mjs","sources":["../../../../projects/cute-widgets/base/sort/src/sort-errors.ts","../../../../projects/cute-widgets/base/sort/src/sort.ts","../../../../projects/cute-widgets/base/sort/src/sort-header-intl.ts","../../../../projects/cute-widgets/base/sort/src/sort-header.ts","../../../../projects/cute-widgets/base/sort/src/sort-header.html","../../../../projects/cute-widgets/base/sort/src/sort.module.ts","../../../../projects/cute-widgets/base/sort/cute-widgets-base-sort.ts"],"sourcesContent":["\r\n/** @docs-private */\r\nexport function getSortDuplicateSortableIdError(id: string): Error {\r\n return Error(`Cannot have two CuteSortables with the same id (${id}).`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortHeaderNotContainedWithinSortError(): Error {\r\n return Error(`CuteSortHeader must be placed within a parent element with the CuteSort directive.`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortHeaderMissingIdError(): Error {\r\n return Error(`CuteSortHeader must be provided with a unique id.`);\r\n}\r\n\r\n/** @docs-private */\r\nexport function getSortInvalidDirectionError(direction: string): Error {\r\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {\r\n Directive,\r\n EventEmitter,\r\n Inject,\r\n InjectionToken,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional,\r\n Output,\r\n booleanAttribute, isDevMode, SimpleChanges,\r\n} from '@angular/core';\r\nimport {Observable, ReplaySubject, Subject} from 'rxjs';\r\nimport {SortDirection} from './sort-direction';\r\nimport {\r\n getSortDuplicateSortableIdError,\r\n getSortHeaderMissingIdError,\r\n getSortInvalidDirectionError,\r\n} from './sort-errors';\r\n\r\n/** Position of the arrow that displays when sorted. */\r\nexport type SortHeaderArrowPosition = 'before' | 'after';\r\n\r\n/** Interface for a directive that holds sorting state consumed by `CuteSortHeader`. */\r\nexport interface CuteSortable {\r\n /** The id of the column being sorted. */\r\n id: string;\r\n\r\n /** Starting a sort direction. */\r\n start: SortDirection;\r\n\r\n /** Whether to disable clearing the sorting state. */\r\n disableClear: boolean;\r\n}\r\n\r\n/** The current sort state. */\r\nexport interface Sort {\r\n /** The id of the column being sorted. */\r\n active: string;\r\n\r\n /** The sort direction. */\r\n direction: SortDirection;\r\n}\r\n\r\n/** Default options for `cute-sort`. */\r\nexport interface CuteSortDefaultOptions {\r\n /** Whether to disable clearing the sorting state. */\r\n disableClear?: boolean;\r\n /** Position of the arrow that displays when sorted. */\r\n arrowPosition?: SortHeaderArrowPosition;\r\n}\r\n\r\n/** Injection token to be used to override the default options for `cute-sort`. */\r\nexport const CUTE_SORT_DEFAULT_OPTIONS = new InjectionToken<CuteSortDefaultOptions>(\r\n 'CUTE_SORT_DEFAULT_OPTIONS',\r\n);\r\n\r\n// CWT: Changes to Sort interface implementation\r\n/** Container for `CuteSortable`s to manage the sort state and provide default sort parameters. */\r\n@Directive({\r\n selector: '[cuteSort]',\r\n exportAs: 'cuteSort',\r\n host: {\r\n 'class': 'cute-sort',\r\n },\r\n standalone: true,\r\n})\r\nexport class CuteSort implements OnChanges, OnDestroy, OnInit, Sort {\r\n private _initializedStream = new ReplaySubject<void>(1);\r\n\r\n /** Collection of all registered sortables that this directive manages. */\r\n sortables = new Map<string, CuteSortable>();\r\n\r\n /** Used to notify any child components listening to state changes. */\r\n readonly _stateChanges = new Subject<void>();\r\n\r\n /** The id of the most recently sorted CuteSortable. */\r\n @Input('cuteSortActive') active: string = \"\";\r\n\r\n /**\r\n * The direction to set when a CuteSortable is initially sorted.\r\n * May be overridden by the CuteSortable's sort start.\r\n */\r\n @Input('cuteSortStart') start: SortDirection = 'asc';\r\n\r\n /** The sort direction of the currently active CuteSortable. */\r\n @Input('cuteSortDirection')\r\n get direction(): SortDirection { return this._direction; }\r\n set direction(direction: SortDirection) {\r\n if (\r\n direction &&\r\n direction !== 'asc' &&\r\n direction !== 'desc' &&\r\n isDevMode()\r\n ) {\r\n throw getSortInvalidDirectionError(direction);\r\n }\r\n this._direction = direction;\r\n }\r\n private _direction: SortDirection = '';\r\n\r\n /**\r\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\r\n * May be overridden by the CuteSortable's disable clear input.\r\n */\r\n @Input({alias: 'cuteSortDisableClear', transform: booleanAttribute})\r\n protected disableClear: boolean = false;\r\n\r\n /** Whether the sortable is disabled. */\r\n @Input({alias: 'cuteSortDisabled', transform: booleanAttribute})\r\n disabled: boolean = false;\r\n\r\n /** Event emitted when the user changes either the active sort or sort direction. */\r\n @Output('cuteSortChange') readonly sortChange: EventEmitter<Sort> = new EventEmitter<Sort>();\r\n\r\n /** Emits when the paginator is initialized. */\r\n initialized$: Observable<void> = this._initializedStream;\r\n\r\n constructor(\r\n @Optional()\r\n @Inject(CUTE_SORT_DEFAULT_OPTIONS)\r\n private _defaultOptions?: CuteSortDefaultOptions,\r\n ) {}\r\n\r\n /**\r\n * Register function to be used by the contained CuteSortables. Adds the CuteSortable to the\r\n * collection of CuteSortables.\r\n */\r\n register(sortable: CuteSortable): void {\r\n if (isDevMode()) {\r\n if (!sortable.id) {\r\n throw getSortHeaderMissingIdError();\r\n }\r\n\r\n if (this.sortables.has(sortable.id)) {\r\n throw getSortDuplicateSortableIdError(sortable.id);\r\n }\r\n }\r\n\r\n this.sortables.set(sortable.id, sortable);\r\n }\r\n\r\n /**\r\n * Unregister function to be used by the contained CuteSortables. Removes the CuteSortable from the\r\n * collection of contained CuteSortables.\r\n */\r\n deregister(sortable: CuteSortable): void {\r\n this.sortables.delete(sortable.id);\r\n }\r\n\r\n /** Sets the active sort id and determines the new sort direction. */\r\n sort(sortable: CuteSortable): void {\r\n if (this.active != sortable.id) {\r\n this.active = sortable.id;\r\n this.direction = sortable.start ? sortable.start : this.start;\r\n } else {\r\n this.direction = this.getNextSortDirection(sortable);\r\n }\r\n\r\n this.sortChange.emit({active: this.active, direction: this.direction});\r\n }\r\n\r\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\r\n getNextSortDirection(sortable: CuteSortable): SortDirection {\r\n if (!sortable) {\r\n return '';\r\n }\r\n\r\n // Get the sort direction cycle with the potential sortable overrides.\r\n const disableClear =\r\n sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\r\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\r\n\r\n // Get and return the next direction in the cycle\r\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\r\n if (nextDirectionIndex >= sortDirectionCycle.length) {\r\n nextDirectionIndex = 0;\r\n }\r\n return sortDirectionCycle[nextDirectionIndex];\r\n }\r\n\r\n ngOnInit() {\r\n this._initializedStream.next();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n this._stateChanges.next();\r\n }\r\n\r\n ngOnDestroy() {\r\n this._stateChanges.complete();\r\n this._initializedStream.complete();\r\n }\r\n}\r\n\r\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\r\nfunction getSortDirectionCycle(start: SortDirection, disableClear: boolean): SortDirection[] {\r\n let sortOrder: SortDirection[] = ['asc', 'desc'];\r\n if (start == 'desc') {\r\n sortOrder.reverse();\r\n }\r\n if (!disableClear) {\r\n sortOrder.push('');\r\n }\r\n\r\n return sortOrder;\r\n}\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {Injectable, SkipSelf, Optional} from '@angular/core';\r\nimport {Subject} from 'rxjs';\r\n\r\n/**\r\n * To modify the labels and text displayed, create a new instance of CuteSortHeaderIntl and\r\n * include it in a custom provider.\r\n */\r\n@Injectable({providedIn: 'root'})\r\nexport class CuteSortHeaderIntl {\r\n /**\r\n * Stream that emits whenever the labels here are changed. Use this to notify\r\n * components if the labels have changed after initialization.\r\n */\r\n readonly changes: Subject<void> = new Subject<void>();\r\n}\r\n\r\n/** @docs-private */\r\nexport function CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: CuteSortHeaderIntl) {\r\n return parentIntl || new CuteSortHeaderIntl();\r\n}\r\n\r\n/** @docs-private */\r\nexport const CUTE_SORT_HEADER_INTL_PROVIDER = {\r\n // If there is already an CuteSortHeaderIntl available, use that. Otherwise, provide a new one.\r\n provide: CuteSortHeaderIntl,\r\n deps: [[new Optional(), new SkipSelf(), CuteSortHeaderIntl]],\r\n useFactory: CUTE_SORT_HEADER_INTL_PROVIDER_FACTORY,\r\n};\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\r\nimport {ENTER, SPACE} from '@angular/cdk/keycodes';\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n inject,\r\n signal,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport {merge, Subscription} from 'rxjs';\r\nimport {\r\n CUTE_SORT_DEFAULT_OPTIONS,\r\n CuteSort,\r\n CuteSortable,\r\n CuteSortDefaultOptions,\r\n SortHeaderArrowPosition,\r\n} from './sort';\r\nimport {SortDirection} from './sort-direction';\r\nimport {getSortHeaderNotContainedWithinSortError} from './sort-errors';\r\nimport {CuteSortHeaderIntl} from './sort-header-intl';\r\nimport {_animationsDisabled} from '@cute-widgets/base/core/animation';\r\n\r\n/** Column definition associated with a `CuteSortHeader`. */\r\ninterface CuteSortHeaderColumnDef {\r\n name: string;\r\n}\r\n\r\n/**\r\n * Applies sorting behavior (click to change sort) and styles to an element, including an\r\n * arrow to display the current sort direction.\r\n *\r\n * Must be provided with an id and contained within a parent CuteSort directive.\r\n *\r\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\r\n * column definition.\r\n */\r\n@Component({\r\n selector: '[cute-sort-header]',\r\n exportAs: 'cuteSortHeader',\r\n templateUrl: './sort-header.html',\r\n styleUrl: './sort-header.scss',\r\n host: {\r\n 'class': 'cute-sort-header',\r\n '(click)': '_toggleOnInteraction()',\r\n '(keydown)': '_handleKeydown($event)',\r\n '(mouseleave)': '_recentlyCleared.set(null)',\r\n '[attr.aria-sort]': '_getAriaSortAttribute()',\r\n '[class.cute-sort-header-disabled]': '_isDisabled()',\r\n },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CuteSortHeader implements CuteSortable, OnDestroy, OnInit, AfterViewInit {\r\n _intl = inject(CuteSortHeaderIntl);\r\n _sort = inject(CuteSort, {optional: true})!;\r\n _columnDef = inject<CuteSortHeaderColumnDef>('CUTE_SORT_HEADER_COLUMN_DEF' as any, {\r\n optional: true,\r\n });\r\n private _changeDetectorRef = inject(ChangeDetectorRef);\r\n private _focusMonitor = inject(FocusMonitor);\r\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n private _ariaDescriber = inject(AriaDescriber, {optional: true});\r\n private _renderChanges: Subscription | undefined;\r\n protected _animationsDisabled = _animationsDisabled();\r\n\r\n /**\r\n * Indicates which state was just cleared from the sort header.\r\n * Will be reset on the next interaction. Used for coordinating animations.\r\n */\r\n protected _recentlyCleared = signal<SortDirection | null>(null);\r\n\r\n /**\r\n * The element with role=\"button\" inside this component's view. We need this\r\n * in order to apply a description with AriaDescriber.\r\n */\r\n private _sortButton!: HTMLElement;\r\n\r\n /**\r\n * ID of this sort header. If used within the context of a CdkColumnDef, this will default to\r\n * the column's name.\r\n */\r\n @Input('cute-sort-header') id!: string;\r\n\r\n /** Sets the position of the arrow that displays when sorted. */\r\n @Input() arrowPosition: SortHeaderArrowPosition = 'after';\r\n\r\n /** Overrides the sort start value of the containing CuteSort for this CuteSortable. */\r\n @Input() start!: SortDirection;\r\n\r\n /** whether the sort header is disabled. */\r\n @Input({transform: booleanAttribute})\r\n disabled: boolean = false;\r\n\r\n /**\r\n * Description applied to CuteSortHeader's button element with aria-describedby. This text should\r\n * describe the action that will occur when the user clicks the sort header.\r\n */\r\n @Input()\r\n get sortActionDescription(): string {\r\n return this._sortActionDescription;\r\n }\r\n set sortActionDescription(value: string) {\r\n this._updateSortActionDescription(value);\r\n }\r\n // Default the action description to \"Sort\" because it's better than nothing.\r\n // Without a description, the button's label comes from the sort header text content,\r\n // which doesn't give any indication that it performs a sorting operation.\r\n private _sortActionDescription: string = 'Sort';\r\n\r\n /** Overrides the disable clear value of the containing CuteSort for this CuteSortable. */\r\n @Input({transform: booleanAttribute})\r\n disableClear: boolean = false;\r\n\r\n constructor(...args: unknown[]);\r\n\r\n constructor() {\r\n //inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\r\n const defaultOptions = inject<CuteSortDefaultOptions>(CUTE_SORT_DEFAULT_OPTIONS, {\r\n optional: true,\r\n });\r\n\r\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\r\n // `cute/table` and `cdk/table` and we can't have the CDK depending on Material, CuteWidgets etc.,\r\n // and we want to avoid having the sort header depending on the CDK table because\r\n // of this single reference.\r\n if (!this._sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\r\n throw getSortHeaderNotContainedWithinSortError();\r\n }\r\n\r\n if (defaultOptions?.arrowPosition) {\r\n this.arrowPosition = defaultOptions?.arrowPosition;\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.id && this._columnDef) {\r\n this.id = this._columnDef.name;\r\n }\r\n\r\n this._sort.register(this);\r\n this._renderChanges = merge(this._sort._stateChanges, this._sort.sortChange).subscribe(() =>\r\n this._changeDetectorRef.markForCheck(),\r\n );\r\n this._sortButton = this._elementRef.nativeElement.querySelector('.cute-sort-header-container')!;\r\n this._updateSortActionDescription(this._sortActionDescription);\r\n }\r\n\r\n ngAfterViewInit() {\r\n // We use the focus monitor because we also want to style\r\n // things differently based on the focus origin.\r\n this._focusMonitor.monitor(this._elementRef, true).subscribe(() => {\r\n // We need the delay here, because we can trigger a signal write error if the header\r\n // has a signal bound to `disabled` which causes it to be blurred (see #31723.)\r\n Promise.resolve().then(() => this._recentlyCleared.set(null));\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n this._sort.deregister(this);\r\n this._renderChanges?.unsubscribe();\r\n\r\n if (this._sortButton) {\r\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\r\n }\r\n }\r\n\r\n /** Triggers the sort on this sort header and removes the indicator hint. */\r\n _toggleOnInteraction() {\r\n if (!this._isDisabled()) {\r\n const wasSorted = this._isSorted();\r\n const prevDirection = this._sort.direction;\r\n this._sort.sort(this);\r\n this._recentlyCleared.set(wasSorted && !this._isSorted() ? prevDirection : null);\r\n }\r\n }\r\n\r\n _handleKeydown(event: KeyboardEvent) {\r\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\r\n event.preventDefault();\r\n this._toggleOnInteraction();\r\n }\r\n }\r\n\r\n /** Whether this CuteSortHeader is currently sorted in either ascending or descending order. */\r\n _isSorted() {\r\n return (\r\n this._sort.active == this.id &&\r\n (this._sort.direction === 'asc' || this._sort.direction === 'desc')\r\n );\r\n }\r\n\r\n _isDisabled() {\r\n return this._sort.disabled || this.disabled;\r\n }\r\n\r\n /**\r\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\r\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\r\n * says that the aria-sort property should only be present on one header at a time, so removing\r\n * ensures this is true.\r\n */\r\n _getAriaSortAttribute() {\r\n if (!this._isSorted()) {\r\n return 'none';\r\n }\r\n\r\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\r\n }\r\n\r\n /** Whether the arrow inside the sort header should be rendered. */\r\n _renderArrow() {\r\n return !this._isDisabled() || this._isSorted();\r\n }\r\n\r\n private _updateSortActionDescription(newDescription: string) {\r\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\r\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\r\n // for every *cell* in the table, creating a lot of unnecessary noise.\r\n\r\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\r\n // nothing to update in the DOM.\r\n if (this._sortButton) {\r\n // removeDescription will no-op if there is no existing message.\r\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\r\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\r\n this._ariaDescriber?.describe(this._sortButton, newDescription);\r\n }\r\n\r\n this._sortActionDescription = newDescription;\r\n }\r\n}\r\n","<!--\r\n We set the `tabindex` on an element inside the table header, rather than the header itself,\r\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\r\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\r\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\r\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\r\n will be read out as the user is navigating the table's cell (see #13012).\r\n\r\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\r\n-->\r\n<div class=\"cute-sort-header-container cute-focus-indicator\"\r\n [class.cute-sort-header-sorted]=\"_isSorted()\"\r\n [class.cute-sort-header-position-before]=\"arrowPosition === 'before'\"\r\n [class.cute-sort-header-descending]=\"_sort.direction === 'desc'\"\r\n [class.cute-sort-header-ascending]=\"_sort.direction === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-ascending]=\"_recentlyCleared() === 'asc'\"\r\n [class.cute-sort-header-recently-cleared-descending]=\"_recentlyCleared() === 'desc'\"\r\n [class.cute-sort-header-animations-disabled]=\"_animationsDisabled\"\r\n [attr.tabindex]=\"_isDisabled() ? null : 0\"\r\n [attr.role]=\"_isDisabled() ? null : 'button'\">\r\n\r\n <!--\r\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\r\n number of screenshot diff failures. It should be removed eventually. Note that the difference\r\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\r\n causes it to be center-aligned, whereas removing it will keep the text to the left.\r\n -->\r\n <div class=\"cute-sort-header-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <!-- Disable animations while a current animation is running -->\r\n @if (_renderArrow()) {\r\n <div class=\"cute-sort-header-arrow\">\r\n <ng-content select=\"[cuteSortHeaderIcon]\">\r\n <svg viewBox=\"0 -960 960 960\" focusable=\"false\" aria-hidden=\"true\">\r\n <path d=\"M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z\"/>\r\n </svg>\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * This code is a modification of the `@angular/material` original\r\n * code licensed under MIT-style License (https://angular.dev/license).\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteSort} from \"./sort\";\r\nimport {CuteSortHeader} from \"./sort-header\";\r\nimport {CUTE_SORT_HEADER_INTL_PROVIDER} from \"./sort-header-intl\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [CuteSort, CuteSortHeader];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n providers: [CUTE_SORT_HEADER_INTL_PROVIDER],\r\n declarations: [],\r\n})\r\nexport class CuteSortModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AACA;AACM,SAAU,+BAA+B,CAAC,EAAU,EAAA;AACxD,IAAA,OAAO,KAAK,CAAC,CAAA,gDAAA,EAAmD,EAAE,CAAA,EAAA,CAAI,CAAC;AACzE;AAEA;SACgB,wCAAwC,GAAA;AACtD,IAAA,OAAO,KAAK,CAAC,CAAA,kFAAA,CAAoF,CAAC;AACpG;AAEA;SACgB,2BAA2B,GAAA;AACzC,IAAA,OAAO,KAAK,CAAC,CAAA,iDAAA,CAAmD,CAAC;AACnE;AAEA;AACM,SAAU,4BAA4B,CAAC,SAAiB,EAAA;AAC5D,IAAA,OAAO,KAAK,CAAC,CAAA,EAAG,SAAS,CAAA,iDAAA,CAAmD,CAAC;AAC/E;;ACnBA;;;;;;;;;;AAUG;AAsDH;MACa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B;AAG7B;AACA;MASa,QAAQ,CAAA;;IAmBnB,IACI,SAAS,KAAoB,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC;IACzD,IAAI,SAAS,CAAC,SAAwB,EAAA;AACpC,QAAA,IACE,SAAS;AACT,YAAA,SAAS,KAAK,KAAK;AACnB,YAAA,SAAS,KAAK,MAAM;YACpB,SAAS,EAAE,E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CAAA,EAAA,OAAA,EAAA,CAAxB,QAAQ,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAQ/C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,SAAA,EAHd,CAAC,8BAA8B,CAAC,YAFjC,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAKX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC;AACjC,oBAAA,OAAO,EAAE,KAAK;oBACd,SAAS,EAAE,CAAC,8BAA8B,CAAC;AAC3C,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -78,10 +78,10 @@ class CuteProgressSpinner extends CuteBaseControl {
|
|
|
78
78
|
generateId() {
|
|
79
79
|
return "";
|
|
80
80
|
}
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
82
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
82
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "21.2.0", type: CuteProgressSpinner, isStandalone: true, selector: "cute-progress-spinner, cute-spinner", inputs: { mode: "mode", value: ["value", "value", numberAttribute], growing: ["growing", "growing", booleanAttribute], magnitude: "magnitude", strokeWidth: "strokeWidth", diameter: "diameter" }, host: { attributes: { "tabindex": "-1" }, properties: { "class.spinner-border": "!growing", "class.spinner-grow": "growing", "class.spinner-border-sm": "magnitude==\"small\" && !growing", "class.spinner-grow-sm": "magnitude==\"small\" && growing", "class.cute-spinner-border-lg": "magnitude==\"large\" && !growing", "class.cute-spinner-grow-lg": "magnitude==\"large\" && growing", "class": "color ? \"text-\"+color : \"\"", "style.--bs-spinner-border-width": "strokeWidth || null", "style.--bs-spinner-width": "diameter || null", "style.--bs-spinner-height": "diameter || null", "attr.aria-valuemin": "0", "attr.aria-valuemax": "100", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.aria-label": "ariaLabel || null", "attr.mode": "mode", "attr.role": "mode===\"indeterminate\"? \"status\": \"progressbar\"" }, classAttribute: "cute-progress-spinner" }, exportAs: ["cuteProgressSpinner"], usesInheritance: true, ngImport: i0, template: "<span class=\"visually-hidden\">Processing...</span>\r\n", styles: [".cute-progress-spinner{display:inline-block}.cute-progress-spinner.cute-spinner-border-lg{--bs-spinner-width: 3rem;--bs-spinner-height: 3rem;--bs-spinner-border-width: .5rem}.cute-progress-spinner.cute-spinner-grow-lg{--bs-spinner-width: 3rem;--bs-spinner-height: 3rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinner, decorators: [{
|
|
85
85
|
type: Component,
|
|
86
86
|
args: [{ selector: 'cute-progress-spinner, cute-spinner', exportAs: 'cuteProgressSpinner', host: {
|
|
87
87
|
'class': 'cute-progress-spinner',
|
|
@@ -103,7 +103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
103
103
|
// set tab index to -1 so screen readers will read the aria-label
|
|
104
104
|
// Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox
|
|
105
105
|
'tabindex': '-1',
|
|
106
|
-
'[role]': 'mode==="indeterminate"? "status": "progressbar"',
|
|
106
|
+
'[attr.role]': 'mode==="indeterminate"? "status": "progressbar"',
|
|
107
107
|
}, standalone: true, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span class=\"visually-hidden\">Processing...</span>\r\n", styles: [".cute-progress-spinner{display:inline-block}.cute-progress-spinner.cute-spinner-border-lg{--bs-spinner-width: 3rem;--bs-spinner-height: 3rem;--bs-spinner-border-width: .5rem}.cute-progress-spinner.cute-spinner-grow-lg{--bs-spinner-width: 3rem;--bs-spinner-height: 3rem}\n"] }]
|
|
108
108
|
}], ctorParameters: () => [], propDecorators: { mode: [{
|
|
109
109
|
type: Input
|
|
@@ -133,11 +133,11 @@ const TYPES = [
|
|
|
133
133
|
CuteProgressSpinner,
|
|
134
134
|
];
|
|
135
135
|
class CuteProgressSpinnerModule {
|
|
136
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
137
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
138
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
137
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinnerModule, imports: [CommonModule, CuteProgressSpinner], exports: [CuteProgressSpinner] }); }
|
|
138
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinnerModule, imports: [CommonModule] }); }
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CuteProgressSpinnerModule, decorators: [{
|
|
141
141
|
type: NgModule,
|
|
142
142
|
args: [{
|
|
143
143
|
imports: [CommonModule, ...TYPES],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cute-widgets-base-spinner.mjs","sources":["../../../../projects/cute-widgets/base/spinner/src/progress-spinner.component.ts","../../../../projects/cute-widgets/base/spinner/src/progress-spinner.component.html","../../../../projects/cute-widgets/base/spinner/src/progress-spinner.module.ts","../../../../projects/cute-widgets/base/spinner/cute-widgets-base-spinner.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component, inject, InjectionToken,\r\n Input,\r\n numberAttribute,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport {CuteBaseControl} from \"@cute-widgets/base/abstract\";\r\nimport {RelativeSize3} from \"@cute-widgets/base/core\";\r\nimport {RichThemeColor} from '@cute-widgets/base/core/theming';\r\n\r\n/** Possible mode for a progress spinner. */\r\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\r\n\r\n/** Default `cute-progress-spinner` options that can be overridden. */\r\nexport interface CuteProgressSpinnerDefaultOptions {\r\n /**\r\n * Default theme color of the progress spinner. */\r\n color?: RichThemeColor;\r\n /** Diameter of the spinner. */\r\n diameter?: number;\r\n /** Relative size of the spinner. */\r\n magnitude?: RelativeSize3;\r\n /** Width of the spinner's stroke. */\r\n strokeWidth?: number;\r\n /**\r\n * Whether the animations should be force to be enabled, ignoring if the current environment\r\n * disables them.\r\n */\r\n // _forceAnimations?: boolean;\r\n}\r\n\r\n/** Injection token to be used to override the default options for `cute-progress-spinner`. */\r\nexport const CUTE_PROGRESS_SPINNER_DEFAULT_OPTIONS =\r\n new InjectionToken<CuteProgressSpinnerDefaultOptions>('cute-progress-spinner-default-options', {\r\n providedIn: 'root',\r\n factory: () => ({magnitude: 'middle'}),\r\n });\r\n\r\n/**\r\n * Spinner can be used to indicate the loading state or the execution of some time-consuming process in the project.\r\n */\r\n@Component({\r\n selector: 'cute-progress-spinner, cute-spinner',\r\n templateUrl: './progress-spinner.component.html',\r\n styleUrls: ['./progress-spinner.component.scss'],\r\n exportAs: 'cuteProgressSpinner',\r\n host: {\r\n 'class': 'cute-progress-spinner',\r\n '[class.spinner-border]': '!growing',\r\n '[class.spinner-grow]': 'growing',\r\n '[class.spinner-border-sm]': 'magnitude==\"small\" && !growing',\r\n '[class.spinner-grow-sm]': 'magnitude==\"small\" && growing',\r\n '[class.cute-spinner-border-lg]': 'magnitude==\"large\" && !growing',\r\n '[class.cute-spinner-grow-lg]': 'magnitude==\"large\" && growing',\r\n '[class]': 'color ? \"text-\"+color : \"\"',\r\n '[style.--bs-spinner-border-width]': 'strokeWidth || null',\r\n '[style.--bs-spinner-width]': 'diameter || null',\r\n '[style.--bs-spinner-height]': 'diameter || null',\r\n '[attr.aria-valuemin]': '0',\r\n '[attr.aria-valuemax]': '100',\r\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.mode]': 'mode',\r\n // set tab index to -1 so screen readers will read the aria-label\r\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\r\n 'tabindex': '-1',\r\n '[role]': 'mode===\"indeterminate\"? \"status\": \"progressbar\"',\r\n },\r\n standalone: true,\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CuteProgressSpinner extends CuteBaseControl {\r\n\r\n /** Mode of the progress spinner. Default is `indeterminate`. */\r\n @Input() mode: ProgressSpinnerMode = \"indeterminate\";\r\n\r\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\r\n @Input({transform: numberAttribute})\r\n get value(): number { return this.mode === 'determinate' ? this._value : 0; }\r\n set value(v: number) {\r\n this._value = Math.max(0, Math.min(100, v || 0));\r\n }\r\n private _value = 0;\r\n\r\n /** Switch to grow-type spinner. */\r\n @Input({transform: booleanAttribute}) growing: boolean = false;\r\n\r\n /** Relative size of the spinner */\r\n @Input() magnitude: RelativeSize3 | undefined;\r\n\r\n /** Stroke width of the bordered progress spinner. */\r\n @Input()\r\n get strokeWidth(): string|undefined {return this._strokeWidth}\r\n set strokeWidth(value: string|number|undefined) {\r\n if (typeof value === \"number\") {\r\n value = value+\"px\";\r\n } else if (typeof value === \"string\") {\r\n if (value.trimEnd().match(/[0-9]$/)) {\r\n value = Number.parseInt(value)+\"px\";\r\n }\r\n }\r\n this._strokeWidth = value;\r\n }\r\n private _strokeWidth: string | undefined;\r\n\r\n /** Diameter of the progress spinner. */\r\n @Input()\r\n get diameter(): string|undefined {return this._diameter}\r\n set diameter(value: string|number|undefined) {\r\n if (typeof value === \"number\") {\r\n value = value+\"px\";\r\n } else if (typeof value === \"string\") {\r\n if (value.trimEnd().match(/[0-9]$/)) {\r\n value = Number.parseInt(value)+\"px\";\r\n }\r\n }\r\n this._diameter = value;\r\n }\r\n private _diameter: string | undefined;\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const defaults = inject<CuteProgressSpinnerDefaultOptions>(CUTE_PROGRESS_SPINNER_DEFAULT_OPTIONS, {optional: true});\r\n\r\n this.mode = this._nativeElement.nodeName.toLowerCase()==='cute-spinner' ? 'indeterminate' : 'determinate';\r\n\r\n if (defaults) {\r\n if (defaults.color) { this.color = this.defaultColor = defaults.color; }\r\n if (defaults.diameter) { this.diameter = defaults.diameter; }\r\n if (defaults.magnitude) { this.magnitude = defaults.magnitude; }\r\n if (defaults.strokeWidth) { this.strokeWidth = defaults.strokeWidth; }\r\n }\r\n }\r\n\r\n protected generateId(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n","<span class=\"visually-hidden\">Processing...</span>\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteProgressSpinner} from \"./progress-spinner.component\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteProgressSpinner,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteProgressSpinnerModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AAkCH;MACa,qCAAqC,GAChD,IAAI,cAAc,CAAoC,uCAAuC,EAAE;AAC7F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,CAAC;AACvC,CAAA;AAEH;;AAEG;AAgCG,MAAO,mBAAoB,SAAQ,eAAe,CAAA;;IAMtD,IACI,KAAK,KAAa,OAAO,IAAI,CAAC,IAAI,KAAK,aAAa,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC5E,IAAI,KAAK,CAAC,CAAS,EAAA;QACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD;;IAUA,IACI,WAAW,KAAsB,OAAO,IAAI,CAAC,YAAY,CAAA,CAAA;IAC7D,IAAI,WAAW,CAAC,KAA8B,EAAA;AAC5C,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,KAAK,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AA,OAAA,EAAA,CAJ1B,YAAY,EAJtB,mBAAmB,aAAnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAQR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAJ1B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAIX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,CAAC;AACjC,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,YAAY,EAAE,EAAE;AACjB,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cute-widgets-base-spinner.mjs","sources":["../../../../projects/cute-widgets/base/spinner/src/progress-spinner.component.ts","../../../../projects/cute-widgets/base/spinner/src/progress-spinner.component.html","../../../../projects/cute-widgets/base/spinner/src/progress-spinner.module.ts","../../../../projects/cute-widgets/base/spinner/cute-widgets-base-spinner.ts"],"sourcesContent":["/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {\r\n booleanAttribute,\r\n ChangeDetectionStrategy,\r\n Component, inject, InjectionToken,\r\n Input,\r\n numberAttribute,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\nimport {CuteBaseControl} from \"@cute-widgets/base/abstract\";\r\nimport {RelativeSize3} from \"@cute-widgets/base/core\";\r\nimport {RichThemeColor} from '@cute-widgets/base/core/theming';\r\n\r\n/** Possible mode for a progress spinner. */\r\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\r\n\r\n/** Default `cute-progress-spinner` options that can be overridden. */\r\nexport interface CuteProgressSpinnerDefaultOptions {\r\n /**\r\n * Default theme color of the progress spinner. */\r\n color?: RichThemeColor;\r\n /** Diameter of the spinner. */\r\n diameter?: number;\r\n /** Relative size of the spinner. */\r\n magnitude?: RelativeSize3;\r\n /** Width of the spinner's stroke. */\r\n strokeWidth?: number;\r\n /**\r\n * Whether the animations should be force to be enabled, ignoring if the current environment\r\n * disables them.\r\n */\r\n // _forceAnimations?: boolean;\r\n}\r\n\r\n/** Injection token to be used to override the default options for `cute-progress-spinner`. */\r\nexport const CUTE_PROGRESS_SPINNER_DEFAULT_OPTIONS =\r\n new InjectionToken<CuteProgressSpinnerDefaultOptions>('cute-progress-spinner-default-options', {\r\n providedIn: 'root',\r\n factory: () => ({magnitude: 'middle'}),\r\n });\r\n\r\n/**\r\n * Spinner can be used to indicate the loading state or the execution of some time-consuming process in the project.\r\n */\r\n@Component({\r\n selector: 'cute-progress-spinner, cute-spinner',\r\n templateUrl: './progress-spinner.component.html',\r\n styleUrls: ['./progress-spinner.component.scss'],\r\n exportAs: 'cuteProgressSpinner',\r\n host: {\r\n 'class': 'cute-progress-spinner',\r\n '[class.spinner-border]': '!growing',\r\n '[class.spinner-grow]': 'growing',\r\n '[class.spinner-border-sm]': 'magnitude==\"small\" && !growing',\r\n '[class.spinner-grow-sm]': 'magnitude==\"small\" && growing',\r\n '[class.cute-spinner-border-lg]': 'magnitude==\"large\" && !growing',\r\n '[class.cute-spinner-grow-lg]': 'magnitude==\"large\" && growing',\r\n '[class]': 'color ? \"text-\"+color : \"\"',\r\n '[style.--bs-spinner-border-width]': 'strokeWidth || null',\r\n '[style.--bs-spinner-width]': 'diameter || null',\r\n '[style.--bs-spinner-height]': 'diameter || null',\r\n '[attr.aria-valuemin]': '0',\r\n '[attr.aria-valuemax]': '100',\r\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\r\n '[attr.aria-label]': 'ariaLabel || null',\r\n '[attr.mode]': 'mode',\r\n // set tab index to -1 so screen readers will read the aria-label\r\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\r\n 'tabindex': '-1',\r\n '[attr.role]': 'mode===\"indeterminate\"? \"status\": \"progressbar\"',\r\n },\r\n standalone: true,\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CuteProgressSpinner extends CuteBaseControl {\r\n\r\n /** Mode of the progress spinner. Default is `indeterminate`. */\r\n @Input() mode: ProgressSpinnerMode = \"indeterminate\";\r\n\r\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\r\n @Input({transform: numberAttribute})\r\n get value(): number { return this.mode === 'determinate' ? this._value : 0; }\r\n set value(v: number) {\r\n this._value = Math.max(0, Math.min(100, v || 0));\r\n }\r\n private _value = 0;\r\n\r\n /** Switch to grow-type spinner. */\r\n @Input({transform: booleanAttribute}) growing: boolean = false;\r\n\r\n /** Relative size of the spinner */\r\n @Input() magnitude: RelativeSize3 | undefined;\r\n\r\n /** Stroke width of the bordered progress spinner. */\r\n @Input()\r\n get strokeWidth(): string|undefined {return this._strokeWidth}\r\n set strokeWidth(value: string|number|undefined) {\r\n if (typeof value === \"number\") {\r\n value = value+\"px\";\r\n } else if (typeof value === \"string\") {\r\n if (value.trimEnd().match(/[0-9]$/)) {\r\n value = Number.parseInt(value)+\"px\";\r\n }\r\n }\r\n this._strokeWidth = value;\r\n }\r\n private _strokeWidth: string | undefined;\r\n\r\n /** Diameter of the progress spinner. */\r\n @Input()\r\n get diameter(): string|undefined {return this._diameter}\r\n set diameter(value: string|number|undefined) {\r\n if (typeof value === \"number\") {\r\n value = value+\"px\";\r\n } else if (typeof value === \"string\") {\r\n if (value.trimEnd().match(/[0-9]$/)) {\r\n value = Number.parseInt(value)+\"px\";\r\n }\r\n }\r\n this._diameter = value;\r\n }\r\n private _diameter: string | undefined;\r\n\r\n constructor(...args: unknown[]);\r\n constructor() {\r\n super();\r\n const defaults = inject<CuteProgressSpinnerDefaultOptions>(CUTE_PROGRESS_SPINNER_DEFAULT_OPTIONS, {optional: true});\r\n\r\n this.mode = this._nativeElement.nodeName.toLowerCase()==='cute-spinner' ? 'indeterminate' : 'determinate';\r\n\r\n if (defaults) {\r\n if (defaults.color) { this.color = this.defaultColor = defaults.color; }\r\n if (defaults.diameter) { this.diameter = defaults.diameter; }\r\n if (defaults.magnitude) { this.magnitude = defaults.magnitude; }\r\n if (defaults.strokeWidth) { this.strokeWidth = defaults.strokeWidth; }\r\n }\r\n }\r\n\r\n protected generateId(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n","<span class=\"visually-hidden\">Processing...</span>\r\n","/**\r\n * @license Apache-2.0\r\n *\r\n * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.\r\n *\r\n * You may not use this file except in compliance with the License\r\n * that can be found at http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nimport {NgModule, Type} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {CuteProgressSpinner} from \"./progress-spinner.component\";\r\n\r\nconst TYPES: (any | Type<any>)[] = [\r\n CuteProgressSpinner,\r\n];\r\n\r\n@NgModule({\r\n imports: [CommonModule, ...TYPES],\r\n exports: TYPES,\r\n declarations: [],\r\n})\r\nexport class CuteProgressSpinnerModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AAkCH;MACa,qCAAqC,GAChD,IAAI,cAAc,CAAoC,uCAAuC,EAAE;AAC7F,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,CAAC;AACvC,CAAA;AAEH;;AAEG;AAgCG,MAAO,mBAAoB,SAAQ,eAAe,CAAA;;IAMtD,IACI,KAAK,KAAa,OAAO,IAAI,CAAC,IAAI,KAAK,aAAa,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC5E,IAAI,KAA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