@taiga-ui/addon-mobile 5.0.0-rc.0 → 5.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +3 -3
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +4 -6
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +3 -3
- package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +14 -18
- package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +11 -13
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +10 -12
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +7 -9
- package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +6 -6
- package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +4 -6
- package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-services.mjs +9 -15
- package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
- package/package.json +15 -15
|
@@ -26,10 +26,10 @@ class TuiBottomSheet {
|
|
|
26
26
|
this.el.style.setProperty('overflow', 'scroll');
|
|
27
27
|
this.el.animate([{ transform }], OPTIONS);
|
|
28
28
|
}
|
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiBottomSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiBottomSheet, isStandalone: true, selector: "tui-bottom-sheet", inputs: { stops: { classPropertyName: "stops", publicName: "stops", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "scroll.zoneless": "onScroll()", "resize": "onScroll()" }, properties: { "style.--t-initial": "stops()[0]", "style.scroll-snap-type": "stops().length > 1 ? \"y mandatory\" : null" } }, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], viewQueries: [{ propertyName: "elements", predicate: ["stops"], descendants: true, isSignal: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (stop of stops(); track $index) {\n <div\n #stops\n class=\"t-stop\"\n [style.inset-block-start]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:100%;left:0;right:0;display:block;block-size:calc(100% - 1rem);max-inline-size:40rem;margin:calc(-1 * var(--t-initial)) auto 0;background:var(--tui-background-elevation-1);border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l);overflow:auto;box-shadow:0 1rem var(--tui-background-elevation-1),var(--tui-shadow-medium)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host:before{content:\"\";position:sticky;top:.625rem;left:50%;z-index:1;display:block;inset-inline-start:50%;inline-size:2rem;block-size:.25rem;margin-block-end:-.25rem;transform:translate(calc(-50% * var(--tui-inline)));background:var(--tui-background-elevation-1);box-shadow:0 0 0 20rem var(--tui-background-elevation-1),inset 0 0 0 1rem var(--tui-border-normal);border-radius:1rem;clip-path:polygon(-100vw -1rem,100vw -1rem,100vw calc(100% + .625rem),-100vw calc(100% + .625rem))}:host:after{content:\"\";position:absolute;top:calc(100% - var(--t-initial));inline-size:1rem;block-size:calc(var(--t-height) - 100% + var(--t-initial));scroll-snap-align:start;scroll-snap-stop:always}.t-content{position:sticky;top:0;padding:2.25rem 1rem 1.5rem}.t-bottom{block-size:calc(100% - var(--t-initial))}.t-stop{position:absolute;block-size:var(--t-initial);inline-size:1rem;pointer-events:none;transform:translateY(-100%);scroll-snap-align:start;scroll-snap-stop:always}.t-stop:last-child{scroll-snap-align:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiBottomSheet, decorators: [{
|
|
33
33
|
type: Component,
|
|
34
34
|
args: [{ selector: 'tui-bottom-sheet', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHeaderOptionsProvider({ size: 'h5' })], host: {
|
|
35
35
|
'[style.--t-initial]': 'stops()[0]',
|
|
@@ -29,8 +29,8 @@ class TuiMobileCalendarDropdown {
|
|
|
29
29
|
get date() {
|
|
30
30
|
return this.single() || this.range() || this.dateTime();
|
|
31
31
|
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
33
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarDropdown, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.18", type: TuiMobileCalendarDropdown, isStandalone: true, selector: "[tuiMobileCalendar]", providers: [
|
|
34
34
|
{
|
|
35
35
|
provide: TUI_DROPDOWN_COMPONENT,
|
|
36
36
|
useFactory: () => inject(WA_IS_MOBILE)
|
|
@@ -39,7 +39,7 @@ class TuiMobileCalendarDropdown {
|
|
|
39
39
|
},
|
|
40
40
|
], queries: [{ propertyName: "single", first: true, predicate: TuiInputDateDirective, descendants: true, isSignal: true }, { propertyName: "range", first: true, predicate: TuiInputDateRangeDirective, descendants: true, isSignal: true }, { propertyName: "dateTime", first: true, predicate: TuiInputDateTimeDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarDropdown, decorators: [{
|
|
43
43
|
type: Directive,
|
|
44
44
|
args: [{
|
|
45
45
|
selector: '[tuiMobileCalendar]',
|
|
@@ -128,10 +128,10 @@ class TuiMobileCalendarDropdownComponent {
|
|
|
128
128
|
is(selector) {
|
|
129
129
|
return !!this.dropdown?.el.closest(selector);
|
|
130
130
|
}
|
|
131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: TuiMobileCalendarDropdownComponent, isStandalone: true, selector: "tui-mobile-calendar-dropdown", hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<tui-mobile-calendar\n [disabledItemHandler]=\"handler | tuiMapper: mapper : selectedPeriod : control?.minLength\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"], dependencies: [{ kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiMobileCalendar, selector: "tui-mobile-calendar", inputs: ["single", "multi", "min", "max", "disabledItemHandler", "value"], outputs: ["cancel", "confirm", "valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarDropdownComponent, decorators: [{
|
|
135
135
|
type: Component,
|
|
136
136
|
args: [{ selector: 'tui-mobile-calendar-dropdown', imports: [TuiMapperPipe, TuiMobileCalendar], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], template: "<tui-mobile-calendar\n [disabledItemHandler]=\"handler | tuiMapper: mapper : selectedPeriod : control?.minLength\"\n [max]=\"max()\"\n [min]=\"min()\"\n [multi]=\"multi\"\n [single]=\"single\"\n [value]=\"value()\"\n (cancel)=\"close()\"\n (confirm)=\"confirm($event)\"\n (valueChange)=\"onValueChange($event)\"\n/>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;background:var(--tui-background-elevation-1);box-shadow:0 10rem var(--tui-background-elevation-1),0 -90vh 1rem 2rem var(--tui-service-backdrop);block-size:calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}\n"] }]
|
|
137
137
|
}], ctorParameters: () => [] });
|
|
@@ -9,14 +9,12 @@ class TuiMobileCalendarSheet extends TuiCalendarSheet {
|
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.isIOS = inject(WA_IS_IOS);
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarSheet, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiMobileCalendarSheet, isStandalone: true, selector: "tui-mobile-calendar-sheet", host: { properties: { "class._ios": "isIOS" } }, usesInheritance: true, ngImport: i0, template: "@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-body-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{mask:none}\n"], dependencies: [{ kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendarSheet, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
|
-
args: [{ selector: 'tui-mobile-calendar-sheet', imports: [TuiCalendarSheetPipe, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
18
|
-
'[class._ios]': 'isIOS',
|
|
19
|
-
}, template: "@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-body-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{mask:none}\n"] }]
|
|
17
|
+
args: [{ selector: 'tui-mobile-calendar-sheet', imports: [TuiCalendarSheetPipe, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class._ios]': 'isIOS' }, template: "@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-body-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;inline-size:20.75rem;max-inline-size:100vw}:host._ios{inline-size:22.625rem}:host._ios .t-row{block-size:3.125rem;font-size:1.0625rem}:host._ios .t-cell[data-range=start],:host._ios .t-cell[data-range=end],:host._ios .t-cell[data-range=active]{font-weight:600}.t-row{block-size:3rem;justify-content:space-between!important;font-family:inherit;font-size:1.125rem;padding:.125rem;box-sizing:border-box}.t-row:first-child .t-cell:not(.t-cell_empty)~.t-cell_empty,.t-row:last-child .t-cell_empty{display:none}.t-row:last-child .t-cell:not(.t-cell_empty)~.t-cell_empty{display:flex}.t-cell{inline-size:2.5rem;block-size:2.5rem;border-radius:100%;overflow:hidden;mask:none;border:none;text-decoration:none}.t-cell_empty{visibility:hidden}.t-cell_today:after{content:\"\\2022\";text-align:center;line-height:4rem;font-size:1.5rem;color:var(--tui-text-action)}.t-cell_today[data-range=start]:after,.t-cell_today[data-range=end]:after,.t-cell_today[data-range=active]:after{color:inherit}.t-cell[data-range=start],.t-cell[data-range=end],.t-cell[data-range=active]{font-weight:500}.t-cell:after{mask:none}\n"] }]
|
|
20
18
|
}] });
|
|
21
19
|
|
|
22
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.component.ts","../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.template.html","../../../projects/addon-mobile/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiCalendarSheet, TuiCalendarSheetPipe} from '@taiga-ui/core/components/calendar';\n\n@Component({\n selector: 'tui-mobile-calendar-sheet',\n imports: [TuiCalendarSheetPipe, TuiRipple],\n templateUrl: './mobile-calendar-sheet.template.html',\n styleUrl: './mobile-calendar-sheet.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs","sources":["../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.component.ts","../../../projects/addon-mobile/components/mobile-calendar-sheet/mobile-calendar-sheet.template.html","../../../projects/addon-mobile/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives/ripple';\nimport {TuiCalendarSheet, TuiCalendarSheetPipe} from '@taiga-ui/core/components/calendar';\n\n@Component({\n selector: 'tui-mobile-calendar-sheet',\n imports: [TuiCalendarSheetPipe, TuiRipple],\n templateUrl: './mobile-calendar-sheet.template.html',\n styleUrl: './mobile-calendar-sheet.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'[class._ios]': 'isIOS'},\n})\nexport class TuiMobileCalendarSheet extends TuiCalendarSheet {\n protected readonly isIOS = inject(WA_IS_IOS);\n}\n","@let sheet = month | tuiCalendarSheet;\n@for (_ of '-'.repeat(sheet.length); track $index) {\n @let rowIndex = $index;\n <div\n automation-id=\"tui-primitive-calendar-mobile__row\"\n class=\"t-row\"\n >\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n @for (_ of '-'.repeat(sheet[rowIndex]?.length ?? 0); track $index) {\n @if (sheet[rowIndex]?.[$index]; as item) {\n <div\n automation-id=\"tui-primitive-calendar-mobile__cell\"\n tuiRipple\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n (click)=\"onItemClick(item)\"\n >\n {{ item.day }}\n </div>\n }\n }\n @for (_ of '-'.repeat(7 - (sheet[rowIndex]?.length ?? 0)); track $index) {\n <div class=\"t-cell t-cell_empty\"></div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAR5D,IAAA,WAAA,GAAA;;AASuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;AAC/C;+GAFY,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,ECbnC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,OAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,irCA8BA,EDvBc,MAAA,EAAA,CAAA,skIAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,oBAAoB,yDAAE,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAMhC,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,EAC5B,OAAA,EAAA,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,cAAc,EAAE,OAAO,EAAC,EAAA,QAAA,EAAA,irCAAA,EAAA,MAAA,EAAA,CAAA,skIAAA,CAAA,EAAA;;;AEXnC;;AAEG;;;;"}
|
|
@@ -416,10 +416,10 @@ class TuiMobileCalendar {
|
|
|
416
416
|
getMonthOffset(year) {
|
|
417
417
|
return (year - this.activeYear) * MONTHS_IN_YEAR;
|
|
418
418
|
}
|
|
419
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiMobileCalendar, isStandalone: true, selector: "tui-mobile-calendar", inputs: { single: { classPropertyName: "single", publicName: "single", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabledItemHandler: { classPropertyName: "disabledItemHandler", publicName: "disabledItemHandler", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cancel: "cancel", confirm: "confirm", value: "valueChange" }, host: { listeners: { "mousedown.prevent": "0" }, properties: { "class._ios": "isIOS", "class._initialized": "initialized" } }, providers: TUI_MOBILE_CALENDAR_PROVIDERS, viewQueries: [{ propertyName: "yearsScroll", first: true, predicate: ["yearsScroll"], descendants: true, isSignal: true }, { propertyName: "monthsScroll", first: true, predicate: ["monthsScroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (chooseDayOrRangeTexts?.(); as texts) {\n <header class=\"t-header\">\n <button\n appearance=\"\"\n automation-id=\"tui-mobile-calendar__cancel\"\n tuiIconButton\n tuiRipple\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"onClose()\"\n >\n {{ closeWord() }}\n </button>\n <button\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link t-link_close\"\n (click)=\"onClose()\"\n >\n {{ cancelWord() }}\n </button>\n <h2\n automation-id=\"tui-mobile-calendar__label\"\n class=\"t-label\"\n >\n {{ single() ? texts[0] : multi() ? texts[2] : texts[1] }}\n </h2>\n <button\n automation-id=\"tui-mobile-calendar__confirm\"\n tuiLink\n tuiTouchable=\"opacity\"\n type=\"button\"\n class=\"t-link\"\n (click)=\"onConfirm()\"\n >\n {{ doneWord() }}\n </button>\n </header>\n}\n<cdk-virtual-scroll-viewport\n #yearsScroll\n orientation=\"horizontal\"\n class=\"t-years\"\n [itemSize]=\"yearWidth\"\n>\n <div class=\"t-years-wrapper\">\n <button\n *cdkVirtualFor=\"let index of years\"\n type=\"button\"\n class=\"t-year\"\n [attr.data-state]=\"getState(index)\"\n (click)=\"setYear(index)\"\n >\n {{ index }}\n </button>\n </div>\n</cdk-virtual-scroll-viewport>\n<div class=\"t-week\">\n @for (day of unorderedWeekDays$ | tuiOrderWeekDays | async; track day) {\n <div class=\"t-day\">\n {{ day }}\n </div>\n }\n</div>\n<cdk-virtual-scroll-viewport\n #monthsScroll\n itemSize=\"354\"\n maxBufferPx=\"5000\"\n minBufferPx=\"0\"\n class=\"t-months\"\n (scrolledIndexChange)=\"onMonthChange($event)\"\n>\n <section\n *cdkVirtualFor=\"let month of months; templateCacheSize: 10\"\n class=\"t-month-wrapper\"\n >\n <h2 class=\"t-month\">{{ monthNames()[month.month] }}</h2>\n <tui-mobile-calendar-sheet\n class=\"t-calendar\"\n [disabledItemHandler]=\"disabledItemHandler() | tuiMapper: disabledItemHandlerMapper : min() : max()\"\n [month]=\"month\"\n [single]=\"single()\"\n [value]=\"value()\"\n (dayClick)=\"onDayClick($event)\"\n />\n </section>\n</cdk-virtual-scroll-viewport>\n", styles: [":host{display:block;block-size:100%;color:var(--tui-text-primary);overscroll-behavior:none;-webkit-tap-highlight-color:transparent}:host ::ng-deep .t-cell:before,:host ::ng-deep .t-cell:after{transform:translateZ(1px)}.t-header{position:relative;display:flex;align-items:center;block-size:3.5rem;padding:0 1rem;border-block-end:.5px solid var(--tui-border-normal)}:host._ios .t-header{block-size:2.75rem;border-block-end:none}.t-close{inline-size:1.5rem;block-size:1.5rem;margin-inline-end:2rem}:host._ios .t-close{display:none}.t-link{margin-inline-start:auto;flex-shrink:0;font-size:.875rem;line-height:1rem;font-weight:500;text-transform:uppercase;color:var(--tui-text-action)}.t-link_close{display:none}:host._ios .t-link{min-inline-size:3.75rem;text-align:end;font-size:.9375rem;line-height:1.125rem;font-weight:400;letter-spacing:.018125rem;text-transform:none}:host._ios .t-link_close{display:block;margin:0 auto 0 0;text-align:start}.t-label{flex-grow:1;margin:0;font-size:1.25rem;line-height:3.5rem;font-weight:500;letter-spacing:-.0125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-label+.t-link{padding-inline-start:1rem}:host._ios .t-label{font-size:1.0625rem;font-weight:600;letter-spacing:-.025625rem;text-align:center}.t-years{scrollbar-width:none;-ms-overflow-style:none;block-size:4.0625rem;background-color:var(--tui-background-base);box-shadow:0 .5px var(--tui-border-normal)}.t-years::-webkit-scrollbar,.t-years::-webkit-scrollbar-thumb{display:none}:host._ios .t-years{background-color:transparent}.t-years-wrapper{display:flex;block-size:4.0625rem}.t-year{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;outline:none;inline-size:20vw;flex-shrink:0;font-size:.9375rem;font-weight:700;letter-spacing:.015625rem;cursor:pointer;opacity:.1;transform:scale(.73);transition:color,opacity,transform .2s}.t-year[data-state=adjacent]{transform:scale(.86);opacity:.3}.t-year[data-state=active]{color:var(--tui-text-action);opacity:1;transform:scale(1)}.t-week{display:flex;align-items:center;block-size:1.875rem;inline-size:20.75rem;max-inline-size:100%;margin:0 auto;font-size:.75rem}:host._ios .t-week{inline-size:22.625rem;font-size:.6875rem;font-weight:500;color:var(--tui-text-secondary)}.t-day{flex:1;text-align:center}.t-months{scrollbar-width:none;-ms-overflow-style:none;block-size:calc(100% - 9.5rem);box-shadow:0 -1px var(--tui-border-normal);overflow-x:hidden}.t-months::-webkit-scrollbar,.t-months::-webkit-scrollbar-thumb{display:none}:host._ios .t-months{block-size:calc(100% - 8.75rem)}.t-month-wrapper{display:flex;margin:.625rem 0 -.625rem;block-size:22.125rem;flex-direction:column}.t-month{block-size:2.75rem;inline-size:100%;line-height:2.75rem;padding-inline-start:1rem;font-size:.875rem;font-weight:500;text-transform:uppercase;margin:0 0 1.25rem;box-sizing:border-box;border-block-end:.5px solid var(--tui-border-normal)}:host._ios .t-month{block-size:3.125rem;margin:0;border-block-end:none;text-transform:none;font-size:1.375rem;line-height:3.125rem;letter-spacing:.02rem;font-weight:700}.t-calendar{margin:0 auto;transition:opacity .2s}.t-week,.t-years,.t-months{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:0}:host(._initialized) .t-week,:host(._initialized) .t-years,:host(._initialized) .t-months{opacity:1}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiLink, selector: "a[tuiLink], button[tuiLink]" }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "component", type: TuiMobileCalendarSheet, selector: "tui-mobile-calendar-sheet" }, { kind: "pipe", type: TuiOrderWeekDaysPipe, name: "tuiOrderWeekDays" }, { kind: "directive", type: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }, { kind: "directive", type: TuiTouchable, selector: "[tuiTouchable]", inputs: ["tuiTouchable"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
421
421
|
}
|
|
422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileCalendar, decorators: [{
|
|
423
423
|
type: Component,
|
|
424
424
|
args: [{ selector: 'tui-mobile-calendar', imports: [
|
|
425
425
|
AsyncPipe,
|
|
@@ -33,10 +33,10 @@ class TuiMobileLoaderIOS {
|
|
|
33
33
|
calculateAnimationBegin(index) {
|
|
34
34
|
return `${(index * LOADED_STEP) / 100}s`;
|
|
35
35
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileLoaderIOS, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiMobileLoaderIOS, isStandalone: true, selector: "tui-mobile-ios-loader", ngImport: i0, template: "<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n @for (_ of '-'.repeat(steps); track $index) {\n @if (isShown($index)) {\n <g [attr.transform]=\"calculateTransform($index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin($index)\"\n />\n }\n </rect>\n </g>\n }\n }\n</svg>\n", styles: [":host{position:absolute;top:-.5rem;left:50%;margin-inline-start:-1.125rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileLoaderIOS, decorators: [{
|
|
40
40
|
type: Component,
|
|
41
41
|
args: [{ selector: 'tui-mobile-ios-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n @for (_ of '-'.repeat(steps); track $index) {\n @if (isShown($index)) {\n <g [attr.transform]=\"calculateTransform($index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin($index)\"\n />\n }\n </rect>\n </g>\n }\n }\n</svg>\n", styles: [":host{position:absolute;top:-.5rem;left:50%;margin-inline-start:-1.125rem}\n"] }]
|
|
42
42
|
}] });
|
|
@@ -45,15 +45,11 @@ const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOS);
|
|
|
45
45
|
/**
|
|
46
46
|
* Stream that emits when loading is over
|
|
47
47
|
*/
|
|
48
|
-
const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken(ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '', {
|
|
49
|
-
factory: () => EMPTY,
|
|
50
|
-
});
|
|
48
|
+
const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken(ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '', { factory: () => EMPTY });
|
|
51
49
|
/**
|
|
52
50
|
* Pull threshold in pixels until loading starts
|
|
53
51
|
*/
|
|
54
|
-
const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '', {
|
|
55
|
-
factory: () => 50,
|
|
56
|
-
});
|
|
52
|
+
const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '', { factory: () => 50 });
|
|
57
53
|
/**
|
|
58
54
|
* Loading indicator component that gets current pull distance in pixels as context
|
|
59
55
|
*/
|
|
@@ -84,10 +80,10 @@ class TuiPullToRefreshService extends Observable {
|
|
|
84
80
|
: current + current * MICRO_OFFSET, 0), takeWhile((distance) => distance !== this.threshold, true), startWith(0))), debounceTime(0, tuiZonefreeScheduler()), distinctUntilChanged(), tuiZoneOptimized(), share())
|
|
85
81
|
: EMPTY;
|
|
86
82
|
}
|
|
87
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
88
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiPullToRefreshService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
84
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiPullToRefreshService }); }
|
|
89
85
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiPullToRefreshService, decorators: [{
|
|
91
87
|
type: Injectable
|
|
92
88
|
}], ctorParameters: () => [] });
|
|
93
89
|
|
|
@@ -116,10 +112,10 @@ class TuiMobileLoaderAndroid {
|
|
|
116
112
|
const rotateX = Math.min(ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER, ROTATE_X_MAX);
|
|
117
113
|
return `rotate(${rotateX} 0 0)`;
|
|
118
114
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileLoaderAndroid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiMobileLoaderAndroid, isStandalone: true, selector: "tui-mobile-android-loader", host: { properties: { "class._visible": "percent", "class._dropped": "dropped", "style.transform": "hostTransform" } }, ngImport: i0, template: "<div class=\"t-wrapper\">\n @if (percent !== 100) {\n <svg\n fill=\"none\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n [style.opacity]=\"opacity\"\n >\n <defs>\n <mask id=\"mask-1\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"white\"\n fill-rule=\"evenodd\"\n />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"black\"\n fill-rule=\"evenodd\"\n />\n </g>\n </svg>\n } @else {\n <tui-loader\n size=\"s\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n />\n }\n</div>\n", styles: [":host{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:sticky;top:0;z-index:1;display:block;block-size:0;opacity:0}:host._visible{opacity:1}:host._dropped{transition:transform var(--tui-duration) cubic-bezier(.4,0,.2,1),opacity var(--tui-duration) var(--tui-duration)}.t-wrapper{position:absolute;top:-2.5rem;left:50%;display:flex;box-shadow:var(--tui-shadow-medium);block-size:2.25rem;inline-size:2.25rem;background-color:var(--tui-background-neutral-1);border-radius:6.25rem;align-items:center;justify-content:center;margin-inline-start:-1.125rem}.t-loader{color:var(--tui-text-primary)}\n"], dependencies: [{ kind: "component", type: TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
121
117
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiMobileLoaderAndroid, decorators: [{
|
|
123
119
|
type: Component,
|
|
124
120
|
args: [{ selector: 'tui-mobile-android-loader', imports: [TuiLoader], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
125
121
|
'[class._visible]': 'percent',
|
|
@@ -149,10 +145,10 @@ class TuiPullToRefresh {
|
|
|
149
145
|
});
|
|
150
146
|
}
|
|
151
147
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiPullToRefresh, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.18", type: TuiPullToRefresh, isStandalone: true, selector: "tui-pull-to-refresh", inputs: { styleHandler: { classPropertyName: "styleHandler", publicName: "styleHandler", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pulled: "pulled" }, providers: [TuiPullToRefreshService], ngImport: i0, template: "<ng-container *polymorpheusOutlet=\"component; context: {$implicit: pulling()}\" />\n\n<div\n [class.t-drop]=\"dropped()\"\n [style.position]=\"'relative'\"\n [style]=\"style()\"\n>\n <ng-content />\n</div>\n", styles: [".t-drop{transition:all var(--tui-duration) cubic-bezier(.4,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
154
150
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiPullToRefresh, decorators: [{
|
|
156
152
|
type: Component,
|
|
157
153
|
args: [{ selector: 'tui-pull-to-refresh', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [TuiPullToRefreshService], template: "<ng-container *polymorpheusOutlet=\"component; context: {$implicit: pulling()}\" />\n\n<div\n [class.t-drop]=\"dropped()\"\n [style.position]=\"'relative'\"\n [style]=\"style()\"\n>\n <ng-content />\n</div>\n", styles: [".t-drop{transition:all var(--tui-duration) cubic-bezier(.4,0,.2,1)}\n"] }]
|
|
158
154
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.mjs","sources":["../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.providers.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.template.html","../../../projects/addon-mobile/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\n\nconst LOADED_STEP = 8;\nconst ROTATE_X_STEP = 30;\n\n@Component({\n selector: 'tui-mobile-ios-loader',\n templateUrl: './loader-ios.template.html',\n styleUrl: './loader-ios.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderIOS {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly steps = 12;\n\n protected get finished(): boolean {\n return this.percent >= 100;\n }\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected isShown(index: number): boolean {\n return this.percent > (index + 1) * LOADED_STEP;\n }\n\n protected calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n protected calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n\nexport const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOS);\n","<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n @for (_ of '-'.repeat(steps); track $index) {\n @if (isShown($index)) {\n <g [attr.transform]=\"calculateTransform($index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin($index)\"\n />\n }\n </rect>\n </g>\n }\n }\n</svg>\n","import {inject, InjectionToken} from '@angular/core';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {EMPTY, type Observable} from 'rxjs';\n\nimport {TUI_ANDROID_LOADER} from './loader-android/loader-android.component';\nimport {TUI_IOS_LOADER} from './loader-ios/loader-ios.component';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '',\n {\n factory: () => EMPTY,\n },\n);\n\n/**\n * Pull threshold in pixels until loading starts\n */\nexport const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '',\n {\n factory: () => 50,\n },\n);\n\n/**\n * Loading indicator component that gets current pull distance in pixels as context\n */\nexport const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken<\n PolymorpheusContent<TuiContext<number>>\n>(ngDevMode ? 'TUI_PULL_TO_REFRESH_COMPONENT' : '', {\n factory: () => (inject(WA_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),\n});\n","import {type ElementRef, inject, Injectable} from '@angular/core';\nimport {\n tuiScrollFrom,\n tuiTypedFromEvent,\n tuiZonefreeScheduler,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/components/scrollbar';\nimport {\n debounceTime,\n distinctUntilChanged,\n EMPTY,\n endWith,\n filter,\n map,\n Observable,\n scan,\n share,\n startWith,\n switchMap,\n takeUntil,\n takeWhile,\n tap,\n} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_LOADED,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\n\nexport const MICRO_OFFSET = 10 ** -6;\nconst EXCLUSION_SELECTORS =\n 'tui-dialog, tui-sheet-dialog, tui-dropdown, tui-dropdown-mobile';\n\n@Injectable()\nexport class TuiPullToRefreshService extends Observable<number> {\n private readonly el = tuiInjectElement();\n private readonly scrollRef: ElementRef<HTMLElement> = inject(TUI_SCROLL_REF);\n private readonly loaded$ = inject(TUI_PULL_TO_REFRESH_LOADED);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n // Hack for iOS to determine if pulling stopped due to scroll\n // because Safari does not support `touch-action: pan-down`\n private touched = false;\n\n private readonly pulling$ = inject(TUI_PULL_TO_REFRESH_COMPONENT)\n ? this.loaded$.pipe(\n startWith(null),\n switchMap(() =>\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true}).pipe(\n filter(\n () =>\n !this.scrollRef.nativeElement.scrollTop &&\n !this.el.querySelector(EXCLUSION_SELECTORS),\n ),\n map(({touches}) => touches[0]?.clientY ?? 0),\n switchMap((start) =>\n tuiTypedFromEvent(this.el, 'touchmove').pipe(\n tap((): void => {\n this.touched = true;\n }),\n map(({touches}) => (touches[0]?.clientY ?? 0) - start),\n filter((distance) => distance > 0),\n takeUntil(\n tuiTypedFromEvent(this.el, 'touchend').pipe(\n tap((): void => {\n this.touched = false;\n }),\n ),\n ),\n takeUntil(tuiScrollFrom(this.scrollRef.nativeElement)),\n endWith(0),\n ),\n ),\n scan(\n (prev, current) =>\n !current && !this.touched && prev > this.threshold\n ? this.threshold\n : current + current * MICRO_OFFSET,\n 0,\n ),\n takeWhile((distance) => distance !== this.threshold, true),\n startWith(0),\n ),\n ),\n debounceTime(0, tuiZonefreeScheduler()),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n share(),\n )\n : EMPTY;\n\n constructor() {\n super((subscriber) => this.pulling$.subscribe(subscriber));\n }\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\nimport {MICRO_OFFSET} from '../pull-to-refresh.service';\n\nconst ROTATE_X_DEFAULT = 180;\nconst ROTATE_X_MAX = 500;\nconst ROTATE_X_MULTIPLIER = 2.3;\n\n@Component({\n selector: 'tui-mobile-android-loader',\n imports: [TuiLoader],\n templateUrl: './loader-android.template.html',\n styleUrl: './loader-android.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._visible]': 'percent',\n '[class._dropped]': 'dropped',\n '[style.transform]': 'hostTransform',\n },\n})\nexport class TuiMobileLoaderAndroid {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected get dropped(): boolean {\n return (\n this.context.$implicit <= MICRO_OFFSET ||\n this.context.$implicit === this.threshold\n );\n }\n\n protected get hostTransform(): string {\n return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;\n }\n\n protected get opacity(): number {\n return this.context.$implicit / (this.threshold * 1.5);\n }\n\n protected get transform(): string {\n const rotateX = Math.min(\n ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER,\n ROTATE_X_MAX,\n );\n\n return `rotate(${rotateX} 0 0)`;\n }\n}\n\nexport const TUI_ANDROID_LOADER = new PolymorpheusComponent(TuiMobileLoaderAndroid);\n","<div class=\"t-wrapper\">\n @if (percent !== 100) {\n <svg\n fill=\"none\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n [style.opacity]=\"opacity\"\n >\n <defs>\n <mask id=\"mask-1\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"white\"\n fill-rule=\"evenodd\"\n />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"black\"\n fill-rule=\"evenodd\"\n />\n </g>\n </svg>\n } @else {\n <tui-loader\n size=\"s\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n />\n }\n</div>\n","import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {\n outputFromObservable,\n takeUntilDestroyed,\n toSignal,\n} from '@angular/core/rxjs-interop';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {tuiScrollFrom, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiContext, type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/components/scrollbar';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, filter, map, startWith} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\nimport {MICRO_OFFSET, TuiPullToRefreshService} from './pull-to-refresh.service';\n\n@Component({\n selector: 'tui-pull-to-refresh',\n imports: [PolymorpheusOutlet],\n templateUrl: './pull-to-refresh.template.html',\n styleUrl: './pull-to-refresh.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiPullToRefreshService],\n})\nexport class TuiPullToRefresh {\n private readonly isIOS = inject(WA_IS_IOS);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n private readonly service = inject(TuiPullToRefreshService);\n private readonly el = inject(TUI_SCROLL_REF).nativeElement;\n\n protected readonly pulling = toSignal(this.service, {initialValue: 0});\n protected readonly component = inject<PolymorpheusContent<TuiContext<number>>>(\n TUI_PULL_TO_REFRESH_COMPONENT,\n );\n\n protected readonly style = computed(() => this.styleHandler()(this.pulling()));\n protected readonly dropped = toSignal(\n this.service.pipe(\n map((distance) => distance <= MICRO_OFFSET || distance === this.threshold),\n distinctUntilChanged(),\n ),\n );\n\n public readonly styleHandler = input<\n TuiHandler<number, Record<string, unknown> | null>\n >(this.isIOS ? (distance) => ({top: tuiPx(distance / 2)}) : () => null);\n\n public readonly pulled = outputFromObservable(\n this.service.pipe(filter((distance) => distance === this.threshold)),\n );\n\n constructor() {\n if (this.component) {\n tuiScrollFrom(this.el)\n .pipe(startWith(null), tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n this.el.style.setProperty(\n 'touch-action',\n this.el.scrollTop ? '' : 'pan-down',\n );\n });\n }\n }\n}\n","<ng-container *polymorpheusOutlet=\"component; context: {$implicit: pulling()}\" />\n\n<div\n [class.t-drop]=\"dropped()\"\n [style.position]=\"'relative'\"\n [style]=\"style()\"\n>\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,aAAa,GAAG,E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CAAC,IAAI,CAAC,EAAE;iBAChB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,EAAE;iBACzD,SAAS,CAAC,MAAK;gBACZ,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CACrB,cAAc,EACd,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,GAAG,UAAU,CACtC;AACL,aAAC,CAAC;;;+GApCL,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,0PAFd,CAAC,uBAAuB,CAAC,EC1BxC,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,8NASA,+HDac,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAMnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,SAAS;+BACI,qBAAqB,EAAA,OAAA,EACtB,CAAC,kBAAkB,CAAC,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,8NAAA,EAAA,MAAA,EAAA,CAAA,uEAAA,CAAA,EAAA;;;AE1BxC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.mjs","sources":["../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.providers.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.template.html","../../../projects/addon-mobile/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\n\nconst LOADED_STEP = 8;\nconst ROTATE_X_STEP = 30;\n\n@Component({\n selector: 'tui-mobile-ios-loader',\n templateUrl: './loader-ios.template.html',\n styleUrl: './loader-ios.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderIOS {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly steps = 12;\n\n protected get finished(): boolean {\n return this.percent >= 100;\n }\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected isShown(index: number): boolean {\n return this.percent > (index + 1) * LOADED_STEP;\n }\n\n protected calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n protected calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n\nexport const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOS);\n","<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n @for (_ of '-'.repeat(steps); track $index) {\n @if (isShown($index)) {\n <g [attr.transform]=\"calculateTransform($index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin($index)\"\n />\n }\n </rect>\n </g>\n }\n }\n</svg>\n","import {inject, InjectionToken} from '@angular/core';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {EMPTY, type Observable} from 'rxjs';\n\nimport {TUI_ANDROID_LOADER} from './loader-android/loader-android.component';\nimport {TUI_IOS_LOADER} from './loader-ios/loader-ios.component';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '',\n {factory: () => EMPTY},\n);\n\n/**\n * Pull threshold in pixels until loading starts\n */\nexport const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '',\n {factory: () => 50},\n);\n\n/**\n * Loading indicator component that gets current pull distance in pixels as context\n */\nexport const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken<\n PolymorpheusContent<TuiContext<number>>\n>(ngDevMode ? 'TUI_PULL_TO_REFRESH_COMPONENT' : '', {\n factory: () => (inject(WA_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),\n});\n","import {type ElementRef, inject, Injectable} from '@angular/core';\nimport {\n tuiScrollFrom,\n tuiTypedFromEvent,\n tuiZonefreeScheduler,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/components/scrollbar';\nimport {\n debounceTime,\n distinctUntilChanged,\n EMPTY,\n endWith,\n filter,\n map,\n Observable,\n scan,\n share,\n startWith,\n switchMap,\n takeUntil,\n takeWhile,\n tap,\n} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_LOADED,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\n\nexport const MICRO_OFFSET = 10 ** -6;\nconst EXCLUSION_SELECTORS =\n 'tui-dialog, tui-sheet-dialog, tui-dropdown, tui-dropdown-mobile';\n\n@Injectable()\nexport class TuiPullToRefreshService extends Observable<number> {\n private readonly el = tuiInjectElement();\n private readonly scrollRef: ElementRef<HTMLElement> = inject(TUI_SCROLL_REF);\n private readonly loaded$ = inject(TUI_PULL_TO_REFRESH_LOADED);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n // Hack for iOS to determine if pulling stopped due to scroll\n // because Safari does not support `touch-action: pan-down`\n private touched = false;\n\n private readonly pulling$ = inject(TUI_PULL_TO_REFRESH_COMPONENT)\n ? this.loaded$.pipe(\n startWith(null),\n switchMap(() =>\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true}).pipe(\n filter(\n () =>\n !this.scrollRef.nativeElement.scrollTop &&\n !this.el.querySelector(EXCLUSION_SELECTORS),\n ),\n map(({touches}) => touches[0]?.clientY ?? 0),\n switchMap((start) =>\n tuiTypedFromEvent(this.el, 'touchmove').pipe(\n tap((): void => {\n this.touched = true;\n }),\n map(({touches}) => (touches[0]?.clientY ?? 0) - start),\n filter((distance) => distance > 0),\n takeUntil(\n tuiTypedFromEvent(this.el, 'touchend').pipe(\n tap((): void => {\n this.touched = false;\n }),\n ),\n ),\n takeUntil(tuiScrollFrom(this.scrollRef.nativeElement)),\n endWith(0),\n ),\n ),\n scan(\n (prev, current) =>\n !current && !this.touched && prev > this.threshold\n ? this.threshold\n : current + current * MICRO_OFFSET,\n 0,\n ),\n takeWhile((distance) => distance !== this.threshold, true),\n startWith(0),\n ),\n ),\n debounceTime(0, tuiZonefreeScheduler()),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n share(),\n )\n : EMPTY;\n\n constructor() {\n super((subscriber) => this.pulling$.subscribe(subscriber));\n }\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\nimport {MICRO_OFFSET} from '../pull-to-refresh.service';\n\nconst ROTATE_X_DEFAULT = 180;\nconst ROTATE_X_MAX = 500;\nconst ROTATE_X_MULTIPLIER = 2.3;\n\n@Component({\n selector: 'tui-mobile-android-loader',\n imports: [TuiLoader],\n templateUrl: './loader-android.template.html',\n styleUrl: './loader-android.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._visible]': 'percent',\n '[class._dropped]': 'dropped',\n '[style.transform]': 'hostTransform',\n },\n})\nexport class TuiMobileLoaderAndroid {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected get dropped(): boolean {\n return (\n this.context.$implicit <= MICRO_OFFSET ||\n this.context.$implicit === this.threshold\n );\n }\n\n protected get hostTransform(): string {\n return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;\n }\n\n protected get opacity(): number {\n return this.context.$implicit / (this.threshold * 1.5);\n }\n\n protected get transform(): string {\n const rotateX = Math.min(\n ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER,\n ROTATE_X_MAX,\n );\n\n return `rotate(${rotateX} 0 0)`;\n }\n}\n\nexport const TUI_ANDROID_LOADER = new PolymorpheusComponent(TuiMobileLoaderAndroid);\n","<div class=\"t-wrapper\">\n @if (percent !== 100) {\n <svg\n fill=\"none\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n [style.opacity]=\"opacity\"\n >\n <defs>\n <mask id=\"mask-1\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"white\"\n fill-rule=\"evenodd\"\n />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"black\"\n fill-rule=\"evenodd\"\n />\n </g>\n </svg>\n } @else {\n <tui-loader\n size=\"s\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n />\n }\n</div>\n","import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {\n outputFromObservable,\n takeUntilDestroyed,\n toSignal,\n} from '@angular/core/rxjs-interop';\nimport {WA_IS_IOS} from '@ng-web-apis/platform';\nimport {tuiScrollFrom, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {type TuiContext, type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/components/scrollbar';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, filter, map, startWith} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\nimport {MICRO_OFFSET, TuiPullToRefreshService} from './pull-to-refresh.service';\n\n@Component({\n selector: 'tui-pull-to-refresh',\n imports: [PolymorpheusOutlet],\n templateUrl: './pull-to-refresh.template.html',\n styleUrl: './pull-to-refresh.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiPullToRefreshService],\n})\nexport class TuiPullToRefresh {\n private readonly isIOS = inject(WA_IS_IOS);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n private readonly service = inject(TuiPullToRefreshService);\n private readonly el = inject(TUI_SCROLL_REF).nativeElement;\n\n protected readonly pulling = toSignal(this.service, {initialValue: 0});\n protected readonly component = inject<PolymorpheusContent<TuiContext<number>>>(\n TUI_PULL_TO_REFRESH_COMPONENT,\n );\n\n protected readonly style = computed(() => this.styleHandler()(this.pulling()));\n protected readonly dropped = toSignal(\n this.service.pipe(\n map((distance) => distance <= MICRO_OFFSET || distance === this.threshold),\n distinctUntilChanged(),\n ),\n );\n\n public readonly styleHandler = input<\n TuiHandler<number, Record<string, unknown> | null>\n >(this.isIOS ? (distance) => ({top: tuiPx(distance / 2)}) : () => null);\n\n public readonly pulled = outputFromObservable(\n this.service.pipe(filter((distance) => distance === this.threshold)),\n );\n\n constructor() {\n if (this.component) {\n tuiScrollFrom(this.el)\n .pipe(startWith(null), tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n this.el.style.setProperty(\n 'touch-action',\n this.el.scrollTop ? '' : 'pan-down',\n );\n });\n }\n }\n}\n","<ng-container *polymorpheusOutlet=\"component; context: {$implicit: pulling()}\" />\n\n<div\n [class.t-drop]=\"dropped()\"\n [style.position]=\"'relative'\"\n [style]=\"style()\"\n>\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,aAAa,GAAG,EAAE;MAQX,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;QAOqB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAsB;AAC7C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,6BAA6B,CAAC;QAE/C,IAAK,CAAA,KAAA,GAAG,EAAE;AAqBhC;AAnBG,IAAA,IAAc,QAAQ,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,OAAO,IAAI,GAAG;;AAG9B,IAAA,IAAc,OAAO,GAAA;AACjB,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS;;AAGhD,IAAA,OAAO,CAAC,KAAa,EAAA;QAC3B,OAAO,IAAI,CAAC,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,WAAW;;AAGzC,IAAA,kBAAkB,CAAC,KAAa,EAAA;AACtC,QAAA,OAAO,CAAU,OAAA,EAAA,KAAK,GAAG,aAAa,SAAS;;AAGzC,IAAA,uBAAuB,CAAC,KAAa,EAAA;QAC3C,OAAO,CAAA,EAAG,CAAC,KAAK,GAAG,WAAW,IAAI,GAAG,CAAA,CAAA,CAAG;;+GAvBnC,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,iFCf/B,onCAmCA,EAAA,MAAA,EAAA,CAAA,8EAAA,CAAA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,10 +60,10 @@ class TuiSheetDialogComponent {
|
|
|
60
60
|
this.context.$implicit.complete();
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "attr.data-appearance": "context.appearance", "style.--tui-offset.px": "context.offset", "class._bar": "context.bar", "class._closeable": "context.closable" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:sticky;display:flex;inset-inline-start:0;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-body-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list{margin-inline-start:calc(-1 * var(--tui-data-list-padding));margin-inline-end:calc(-1 * var(--tui-data-list-padding))}:host ::ng-deep tui-data-list [tuiOption][data-size]{margin-inline:-.5rem;padding-inline:.5rem}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-bar{position:sticky;top:0;z-index:1;display:none;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;top:var(--t-top);z-index:1;margin:0 -1rem;padding:.75rem 1rem;border-radius:inherit;background:var(--tui-background-elevation-1);font:var(--tui-font-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialogComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
68
|
args: [{ selector: 'tui-sheet-dialog', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], hostDirectives: [TuiAnimated], host: {
|
|
69
69
|
'[attr.data-appearance]': 'context.appearance',
|
|
@@ -75,7 +75,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
75
75
|
'(document:touchcancel.zoneless)': 'onPointerChange(-1)',
|
|
76
76
|
'(scroll.zoneless)': 'onPointerChange(0)',
|
|
77
77
|
'(click.self)': 'close$.next()',
|
|
78
|
-
}, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:sticky;display:flex;inset-inline-start:0;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-body-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:
|
|
78
|
+
}, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:sticky;display:flex;inset-inline-start:0;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-body-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list{margin-inline-start:calc(-1 * var(--tui-data-list-padding));margin-inline-end:calc(-1 * var(--tui-data-list-padding))}:host ::ng-deep tui-data-list [tuiOption][data-size]{margin-inline:-.5rem;padding-inline:.5rem}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-bar{position:sticky;top:0;z-index:1;display:none;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;top:var(--t-top);z-index:1;margin:0 -1rem;padding:.75rem 1rem;border-radius:inherit;background:var(--tui-background-elevation-1);font:var(--tui-font-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}\n"] }]
|
|
79
79
|
}] });
|
|
80
80
|
|
|
81
81
|
const TUI_SHEET_DIALOG_DEFAULT_OPTIONS = {
|
|
@@ -116,24 +116,22 @@ class TuiSheetDialogService extends TuiModalService {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
120
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
120
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialogService, providedIn: 'root' }); }
|
|
121
121
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialogService, decorators: [{
|
|
123
123
|
type: Injectable,
|
|
124
|
-
args: [{
|
|
125
|
-
providedIn: 'root',
|
|
126
|
-
}]
|
|
124
|
+
args: [{ providedIn: 'root' }]
|
|
127
125
|
}] });
|
|
128
126
|
|
|
129
127
|
class TuiSheetDialog {
|
|
130
128
|
constructor() {
|
|
131
129
|
this.tuiSheetDialogOptions = input({});
|
|
132
130
|
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
134
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialog, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
132
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.18", type: TuiSheetDialog, isStandalone: true, selector: "ng-template[tuiSheetDialog]", inputs: { tuiSheetDialogOptions: { classPropertyName: "tuiSheetDialogOptions", publicName: "tuiSheetDialogOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsPortal(TuiSheetDialogService)], hostDirectives: [{ directive: i1$1.TuiPortalDirective, inputs: ["options", "tuiSheetDialogOptions", "open", "tuiSheetDialog"], outputs: ["openChange", "tuiSheetDialogChange"] }], ngImport: i0 }); }
|
|
135
133
|
}
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TuiSheetDialog, decorators: [{
|
|
137
135
|
type: Directive,
|
|
138
136
|
args: [{
|
|
139
137
|
selector: 'ng-template[tuiSheetDialog]',
|