@taiga-ui/addon-mobile 3.28.0 → 3.29.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/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +228 -114
- package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile.umd.js +4 -10
- package/bundles/taiga-ui-addon-mobile.umd.js.map +1 -1
- package/components/pull-to-refresh/index.d.ts +1 -0
- package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +11 -3
- package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +8 -2
- package/components/pull-to-refresh/pull-to-refresh.component.d.ts +8 -6
- package/components/pull-to-refresh/pull-to-refresh.module.d.ts +2 -1
- package/components/pull-to-refresh/pull-to-refresh.providers.d.ts +17 -6
- package/components/pull-to-refresh/pull-to-refresh.service.d.ts +15 -0
- package/esm2015/components/pull-to-refresh/index.js +2 -1
- package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +38 -14
- package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +23 -13
- package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +29 -32
- package/esm2015/components/pull-to-refresh/pull-to-refresh.module.js +21 -4
- package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +26 -29
- package/esm2015/components/pull-to-refresh/pull-to-refresh.service.js +51 -0
- package/esm2015/index.js +1 -2
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +184 -100
- package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
- package/fesm2015/taiga-ui-addon-mobile.js +0 -1
- package/fesm2015/taiga-ui-addon-mobile.js.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +4 -4
- package/bundles/taiga-ui-addon-mobile-tokens.umd.js +0 -23
- package/bundles/taiga-ui-addon-mobile-tokens.umd.js.map +0 -1
- package/esm2015/tokens/index.js +0 -2
- package/esm2015/tokens/loaded.js +0 -9
- package/esm2015/tokens/taiga-ui-addon-mobile-tokens.js +0 -5
- package/fesm2015/taiga-ui-addon-mobile-tokens.js +0 -16
- package/fesm2015/taiga-ui-addon-mobile-tokens.js.map +0 -1
- package/tokens/index.d.ts +0 -1
- package/tokens/loaded.d.ts +0 -6
- package/tokens/package.json +0 -10
- package/tokens/taiga-ui-addon-mobile-tokens.d.ts +0 -5
|
@@ -1,61 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Inject, InjectionToken, inject, ElementRef, Injectable, HostBinding, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2$1 from '@tinkoff/ng-polymorpheus';
|
|
4
|
+
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk';
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import { TUI_IS_IOS, tuiTypedFromEvent, TuiOverscrollModule, TuiRepeatTimesModule } from '@taiga-ui/cdk';
|
|
7
|
+
import * as i1$1 from 'rxjs';
|
|
8
|
+
import { EMPTY, Observable, merge, of } from 'rxjs';
|
|
9
|
+
import * as i2 from '@angular/common';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
10
11
|
import { filter, switchMap, map, takeUntil, endWith, scan, distinctUntilChanged } from 'rxjs/operators';
|
|
11
|
-
import { TUI_LOADED } from '@taiga-ui/addon-mobile/tokens';
|
|
12
12
|
import { TuiSvgModule } from '@taiga-ui/core';
|
|
13
13
|
|
|
14
|
-
const HIDDEN_DISTANCE = 2;
|
|
15
|
-
const ROTATE_X_DEFAULT = 180;
|
|
16
|
-
const ROTATE_X_MAX = 500;
|
|
17
|
-
const ROTATE_X_MULTIPLIER = 2.3;
|
|
18
|
-
class TuiMobileLoaderAndroidComponent {
|
|
19
|
-
constructor() {
|
|
20
|
-
this.pulled = 0;
|
|
21
|
-
}
|
|
22
|
-
get transform() {
|
|
23
|
-
const rotateX = Math.min(ROTATE_X_DEFAULT + this.pulled * ROTATE_X_MULTIPLIER, ROTATE_X_MAX);
|
|
24
|
-
return `rotate(${rotateX} 0 0)`;
|
|
25
|
-
}
|
|
26
|
-
get hidden() {
|
|
27
|
-
return this.pulled < HIDDEN_DISTANCE;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
TuiMobileLoaderAndroidComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderAndroidComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
TuiMobileLoaderAndroidComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileLoaderAndroidComponent, selector: "tui-mobile-android-loader", inputs: { pulled: "pulled" }, host: { properties: { "class._hidden": "this.hidden" } }, ngImport: i0, template: "<svg\n *ngIf=\"pulled !== 100; else loading\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n>\n <defs>\n <mask id=\"mask-1\">\n <path\n fill-rule=\"evenodd\"\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 />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n fill-rule=\"evenodd\"\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 />\n </g>\n</svg>\n<ng-template #loading>\n <svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-loading\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n</ng-template>\n", styles: [":host{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;display:flex;height:2.25rem;width:2.25rem;background-color:#fff;border-radius:6.25rem;align-items:center;justify-content:center}:host._hidden{visibility:hidden;transition:0s}.t-loading{display:block;width:1rem;border-radius:100%;animation:tuiLoaderRotate 3s linear infinite}.t-circle{fill:none;stroke:var(--tui-text-01);stroke-width:1.5rem;animation:tuiLoaderDashOffset 3s linear infinite}\n"], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderAndroidComponent, decorators: [{
|
|
33
|
-
type: Component,
|
|
34
|
-
args: [{
|
|
35
|
-
selector: 'tui-mobile-android-loader',
|
|
36
|
-
templateUrl: './loader-android.template.html',
|
|
37
|
-
styleUrls: ['./loader-android.style.less'],
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
-
}]
|
|
40
|
-
}], propDecorators: { pulled: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}], hidden: [{
|
|
43
|
-
type: HostBinding,
|
|
44
|
-
args: ['class._hidden']
|
|
45
|
-
}] } });
|
|
46
|
-
|
|
47
14
|
const LOADED_STEP = 8;
|
|
48
15
|
const ROTATE_X_STEP = 30;
|
|
49
16
|
class TuiMobileLoaderIOSComponent {
|
|
50
|
-
constructor() {
|
|
51
|
-
this.
|
|
17
|
+
constructor(context, threshold) {
|
|
18
|
+
this.context = context;
|
|
19
|
+
this.threshold = threshold;
|
|
52
20
|
this.steps = 12;
|
|
53
21
|
}
|
|
54
22
|
get finished() {
|
|
55
|
-
return this.
|
|
23
|
+
return this.percent >= 100;
|
|
24
|
+
}
|
|
25
|
+
get percent() {
|
|
26
|
+
return (this.context.$implicit * 100) / this.threshold;
|
|
56
27
|
}
|
|
57
28
|
isShown(index) {
|
|
58
|
-
return this.
|
|
29
|
+
return this.percent > (index + 1) * LOADED_STEP;
|
|
59
30
|
}
|
|
60
31
|
calculateTransform(index) {
|
|
61
32
|
return `rotate(${index * ROTATE_X_STEP} 50 50)`;
|
|
@@ -64,71 +35,162 @@ class TuiMobileLoaderIOSComponent {
|
|
|
64
35
|
return `${(index * LOADED_STEP) / 100}s`;
|
|
65
36
|
}
|
|
66
37
|
}
|
|
67
|
-
TuiMobileLoaderIOSComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderIOSComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
TuiMobileLoaderIOSComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileLoaderIOSComponent, selector: "tui-mobile-ios-loader",
|
|
38
|
+
TuiMobileLoaderIOSComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderIOSComponent, deps: [{ token: POLYMORPHEUS_CONTEXT }, { token: TUI_PULL_TO_REFRESH_THRESHOLD }], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
TuiMobileLoaderIOSComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileLoaderIOSComponent, selector: "tui-mobile-ios-loader", ngImport: i0, template: "<svg\n width=\"36\"\n height=\"36\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid\"\n>\n <ng-container *tuiRepeatTimes=\"let index of steps\">\n <g\n *ngIf=\"isShown(index)\"\n [attr.transform]=\"calculateTransform(index)\"\n >\n <rect\n x=\"47\"\n y=\"22\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n height=\"16\"\n fill=\"#c7c9cc\"\n >\n <animate\n *ngIf=\"finished\"\n attributeName=\"opacity\"\n values=\"1;0\"\n keyTimes=\"0;1\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n [attr.begin]=\"calculateAnimationBegin(index)\"\n ></animate>\n </rect>\n </g>\n </ng-container>\n</svg>\n", styles: [":host{position:absolute;top:-.5rem;left:50%;margin-left:-1.125rem}\n"], directives: [{ type: i1.TuiRepeatTimesDirective, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderIOSComponent, decorators: [{
|
|
70
41
|
type: Component,
|
|
71
42
|
args: [{
|
|
72
43
|
selector: 'tui-mobile-ios-loader',
|
|
73
44
|
templateUrl: './loader-ios.template.html',
|
|
45
|
+
styleUrls: ['./loader-ios.style.less'],
|
|
74
46
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
|
-
providers: [TuiDestroyService],
|
|
76
47
|
}]
|
|
77
|
-
}],
|
|
78
|
-
|
|
79
|
-
|
|
48
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
49
|
+
type: Inject,
|
|
50
|
+
args: [POLYMORPHEUS_CONTEXT]
|
|
51
|
+
}] }, { type: undefined, decorators: [{
|
|
52
|
+
type: Inject,
|
|
53
|
+
args: [TUI_PULL_TO_REFRESH_THRESHOLD]
|
|
54
|
+
}] }]; } });
|
|
55
|
+
const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOSComponent);
|
|
80
56
|
|
|
81
|
-
const MICRO_OFFSET = Math.pow(10, -6);
|
|
82
|
-
const PULLED_DISTANCE = 50;
|
|
83
57
|
/**
|
|
84
|
-
* Stream that emits
|
|
58
|
+
* Stream that emits when loading is over
|
|
59
|
+
*/
|
|
60
|
+
const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken(`[TUI_PULL_TO_REFRESH_LOADED]`, {
|
|
61
|
+
factory: () => EMPTY,
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Pull threshold in pixels until loading starts
|
|
65
|
+
*/
|
|
66
|
+
const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(`[TUI_PULL_TO_REFRESH_THRESHOLD]`, {
|
|
67
|
+
factory: () => 50,
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Loading indicator component that gets current pull distance in pixels as context
|
|
71
|
+
*/
|
|
72
|
+
const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken(`[TUI_PULL_TO_REFRESH_COMPONENT]`, {
|
|
73
|
+
factory: () => (inject(TUI_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated renamed to {@link TUI_PULL_TO_REFRESH_LOADED}
|
|
85
77
|
*/
|
|
86
|
-
const
|
|
87
|
-
const TUI_PULL_TO_REFRESH_PROVIDERS = [
|
|
88
|
-
{
|
|
89
|
-
provide: TUI_PULLING,
|
|
90
|
-
deps: [TUI_IS_IOS, TUI_LOADED, ElementRef],
|
|
91
|
-
useFactory: (isIOS, loaded$, { nativeElement }) => {
|
|
92
|
-
return merge(tuiTypedFromEvent(nativeElement, `touchstart`, { passive: true }).pipe(filter(() => nativeElement.scrollTop === 0), switchMap(touchStart => tuiTypedFromEvent(nativeElement, `touchmove`).pipe(map(touchMove => touchMove.touches[0].clientY -
|
|
93
|
-
touchStart.touches[0].clientY), takeUntil(tuiTypedFromEvent(nativeElement, `touchend`)), endWith(0)))), loaded$.pipe(map(() => NaN))).pipe(scan((max, current) => {
|
|
94
|
-
if (Number.isNaN(current)) {
|
|
95
|
-
return 0;
|
|
96
|
-
}
|
|
97
|
-
const androidLoading = !isIOS && max === PULLED_DISTANCE;
|
|
98
|
-
const dropped = current === 0 && max > PULLED_DISTANCE;
|
|
99
|
-
return androidLoading || dropped
|
|
100
|
-
? PULLED_DISTANCE
|
|
101
|
-
: current + MICRO_OFFSET;
|
|
102
|
-
}, 0));
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
];
|
|
78
|
+
const TUI_LOADED = TUI_PULL_TO_REFRESH_LOADED;
|
|
106
79
|
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
80
|
+
const MICRO_OFFSET = Math.pow(10, -6);
|
|
81
|
+
class TuiPullToRefreshService extends Observable {
|
|
82
|
+
constructor(el, isIos, loaded$, threshold, component) {
|
|
83
|
+
super(subscriber => (component ? this.pulling$ : EMPTY).subscribe(subscriber));
|
|
84
|
+
this.el = el;
|
|
85
|
+
this.isIos = isIos;
|
|
86
|
+
this.loaded$ = loaded$;
|
|
87
|
+
this.threshold = threshold;
|
|
88
|
+
this.pulling$ = merge(tuiTypedFromEvent(this.element, `touchstart`, { passive: true }).pipe(filter(() => this.element.scrollTop === 0), switchMap(touchStart => tuiTypedFromEvent(this.element, `touchmove`).pipe(map(touchMove => touchMove.touches[0].clientY - touchStart.touches[0].clientY), takeUntil(tuiTypedFromEvent(this.element, `touchend`)), endWith(0)))), this.loaded$.pipe(map(() => NaN))).pipe(scan((max, current) => {
|
|
89
|
+
if (Number.isNaN(current)) {
|
|
90
|
+
return 0;
|
|
91
|
+
}
|
|
92
|
+
const androidLoading = !this.isIos && max === this.threshold;
|
|
93
|
+
const dropped = current === 0 && max > this.threshold;
|
|
94
|
+
return androidLoading || dropped
|
|
95
|
+
? this.threshold
|
|
96
|
+
: current + current * MICRO_OFFSET;
|
|
97
|
+
}, 0));
|
|
98
|
+
}
|
|
99
|
+
get element() {
|
|
100
|
+
return this.el.nativeElement;
|
|
101
|
+
}
|
|
111
102
|
}
|
|
103
|
+
TuiPullToRefreshService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshService, deps: [{ token: ElementRef }, { token: TUI_IS_IOS }, { token: TUI_PULL_TO_REFRESH_LOADED }, { token: TUI_PULL_TO_REFRESH_THRESHOLD }, { token: TUI_PULL_TO_REFRESH_COMPONENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
104
|
+
TuiPullToRefreshService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshService });
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshService, decorators: [{
|
|
106
|
+
type: Injectable
|
|
107
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
108
|
+
type: Inject,
|
|
109
|
+
args: [ElementRef]
|
|
110
|
+
}] }, { type: undefined, decorators: [{
|
|
111
|
+
type: Inject,
|
|
112
|
+
args: [TUI_IS_IOS]
|
|
113
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
114
|
+
type: Inject,
|
|
115
|
+
args: [TUI_PULL_TO_REFRESH_LOADED]
|
|
116
|
+
}] }, { type: undefined, decorators: [{
|
|
117
|
+
type: Inject,
|
|
118
|
+
args: [TUI_PULL_TO_REFRESH_THRESHOLD]
|
|
119
|
+
}] }, { type: undefined, decorators: [{
|
|
120
|
+
type: Inject,
|
|
121
|
+
args: [TUI_PULL_TO_REFRESH_COMPONENT]
|
|
122
|
+
}] }]; } });
|
|
123
|
+
|
|
124
|
+
const ROTATE_X_DEFAULT = 180;
|
|
125
|
+
const ROTATE_X_MAX = 500;
|
|
126
|
+
const ROTATE_X_MULTIPLIER = 2.3;
|
|
127
|
+
class TuiMobileLoaderAndroidComponent {
|
|
128
|
+
constructor(context, threshold) {
|
|
129
|
+
this.context = context;
|
|
130
|
+
this.threshold = threshold;
|
|
131
|
+
}
|
|
132
|
+
get transform() {
|
|
133
|
+
const rotateX = Math.min(ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER, ROTATE_X_MAX);
|
|
134
|
+
return `rotate(${rotateX} 0 0)`;
|
|
135
|
+
}
|
|
136
|
+
get percent() {
|
|
137
|
+
return (this.context.$implicit * 100) / this.threshold;
|
|
138
|
+
}
|
|
139
|
+
get opacity() {
|
|
140
|
+
return this.context.$implicit / (this.threshold * 1.5);
|
|
141
|
+
}
|
|
142
|
+
get dropped() {
|
|
143
|
+
return (this.context.$implicit <= MICRO_OFFSET ||
|
|
144
|
+
this.context.$implicit === this.threshold);
|
|
145
|
+
}
|
|
146
|
+
get hostTransform() {
|
|
147
|
+
return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
TuiMobileLoaderAndroidComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderAndroidComponent, deps: [{ token: POLYMORPHEUS_CONTEXT }, { token: TUI_PULL_TO_REFRESH_THRESHOLD }], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
TuiMobileLoaderAndroidComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiMobileLoaderAndroidComponent, selector: "tui-mobile-android-loader", host: { properties: { "class._visible": "this.percent", "class._dropped": "this.dropped", "style.transform": "this.hostTransform" } }, ngImport: i0, template: "<svg\n *ngIf=\"percent !== 100; else loading\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\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 fill-rule=\"evenodd\"\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 />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n fill-rule=\"evenodd\"\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 />\n </g>\n</svg>\n<ng-template #loading>\n <svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-loading\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n</ng-template>\n", styles: [":host{box-shadow:0 1.5rem 1rem #00000008,0 .75rem .75rem #0000000a,0 .25rem .375rem #0000000d;transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:-1.5rem;left:50%;display:flex;height:2.25rem;width:2.25rem;background-color:var(--tui-secondary);border-radius:6.25rem;align-items:center;justify-content:center;margin-left:-1.125rem;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-loading{display:block;width:1rem;border-radius:100%;animation:tuiLoaderRotate 3s linear infinite}.t-circle{fill:none;stroke:var(--tui-text-01);stroke-width:1.5rem;animation:tuiLoaderDashOffset 3s linear infinite}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiMobileLoaderAndroidComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{
|
|
155
|
+
selector: 'tui-mobile-android-loader',
|
|
156
|
+
templateUrl: './loader-android.template.html',
|
|
157
|
+
styleUrls: ['./loader-android.style.less'],
|
|
158
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
159
|
+
}]
|
|
160
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
161
|
+
type: Inject,
|
|
162
|
+
args: [POLYMORPHEUS_CONTEXT]
|
|
163
|
+
}] }, { type: undefined, decorators: [{
|
|
164
|
+
type: Inject,
|
|
165
|
+
args: [TUI_PULL_TO_REFRESH_THRESHOLD]
|
|
166
|
+
}] }]; }, propDecorators: { percent: [{
|
|
167
|
+
type: HostBinding,
|
|
168
|
+
args: ['class._visible']
|
|
169
|
+
}], dropped: [{
|
|
170
|
+
type: HostBinding,
|
|
171
|
+
args: ['class._dropped']
|
|
172
|
+
}], hostTransform: [{
|
|
173
|
+
type: HostBinding,
|
|
174
|
+
args: ['style.transform']
|
|
175
|
+
}] } });
|
|
176
|
+
const TUI_ANDROID_LOADER = new PolymorpheusComponent(TuiMobileLoaderAndroidComponent);
|
|
177
|
+
|
|
112
178
|
class TuiPullToRefreshComponent {
|
|
113
|
-
constructor(isIOS, pulling$) {
|
|
179
|
+
constructor(isIOS, threshold, component, pulling$) {
|
|
114
180
|
this.isIOS = isIOS;
|
|
181
|
+
this.threshold = threshold;
|
|
182
|
+
this.component = component;
|
|
115
183
|
this.pulling$ = pulling$;
|
|
116
|
-
this.pulled = this.pulling$.pipe(distinctUntilChanged(), filter(distance => distance ===
|
|
117
|
-
|
|
118
|
-
this.dropped$ = this.pulling$.pipe(map(distance => distance <= MICRO_OFFSET || distance ===
|
|
119
|
-
this.contentTransform$ = this.isIOS
|
|
120
|
-
? this.pulling$.pipe(map(distance => distance
|
|
184
|
+
this.pulled = this.pulling$.pipe(distinctUntilChanged(), filter(distance => distance === this.threshold));
|
|
185
|
+
// TODO: Move to iOS loader somehow, like contentTransform$ below
|
|
186
|
+
this.dropped$ = this.pulling$.pipe(map(distance => distance <= MICRO_OFFSET || distance === this.threshold), distinctUntilChanged());
|
|
187
|
+
this.contentTransform$ = this.isIOS && this.component === TUI_IOS_LOADER
|
|
188
|
+
? this.pulling$.pipe(map(distance => `translateY(${distance / 2}px)`))
|
|
121
189
|
: of(null);
|
|
122
190
|
}
|
|
123
|
-
get loaderTransform$() {
|
|
124
|
-
return this.pulling$.pipe(map(distance => translateY(Math.min(distance, ANDROID_MAX_DISTANCE))));
|
|
125
|
-
}
|
|
126
191
|
}
|
|
127
|
-
TuiPullToRefreshComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshComponent, deps: [{ token: TUI_IS_IOS }, { token:
|
|
128
|
-
TuiPullToRefreshComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPullToRefreshComponent, selector: "tui-pull-to-refresh", outputs: { pulled: "pulled" }, providers:
|
|
129
|
-
__decorate([
|
|
130
|
-
tuiPure
|
|
131
|
-
], TuiPullToRefreshComponent.prototype, "loaderTransform$", null);
|
|
192
|
+
TuiPullToRefreshComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshComponent, deps: [{ token: TUI_IS_IOS }, { token: TUI_PULL_TO_REFRESH_THRESHOLD }, { token: TUI_PULL_TO_REFRESH_COMPONENT }, { token: TuiPullToRefreshService }], target: i0.ɵɵFactoryTarget.Component });
|
|
193
|
+
TuiPullToRefreshComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiPullToRefreshComponent, selector: "tui-pull-to-refresh", outputs: { pulled: "pulled" }, providers: [TuiPullToRefreshService], ngImport: i0, template: "<div\n tuiOverscroll\n [class.t-drop-animation]=\"dropped$ | async\"\n [style.transform]=\"contentTransform$ | async\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-container *polymorpheusOutlet=\"component; context: {$implicit: (pulling$ | async) || 0}\"></ng-container>\n", styles: [":host{position:relative;display:block;overflow:hidden}.t-drop-animation{transition:all var(--tui-duration) cubic-bezier(.4,0,.2,1)}\n"], directives: [{ type: i1.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i2$1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshComponent, decorators: [{
|
|
133
195
|
type: Component,
|
|
134
196
|
args: [{
|
|
@@ -136,29 +198,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
136
198
|
templateUrl: './pull-to-refresh.template.html',
|
|
137
199
|
styleUrls: ['./pull-to-refresh.style.less'],
|
|
138
200
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
139
|
-
providers:
|
|
201
|
+
providers: [TuiPullToRefreshService],
|
|
140
202
|
}]
|
|
141
203
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
142
204
|
type: Inject,
|
|
143
205
|
args: [TUI_IS_IOS]
|
|
144
|
-
}] }, { type:
|
|
206
|
+
}] }, { type: undefined, decorators: [{
|
|
145
207
|
type: Inject,
|
|
146
|
-
args: [
|
|
208
|
+
args: [TUI_PULL_TO_REFRESH_THRESHOLD]
|
|
209
|
+
}] }, { type: undefined, decorators: [{
|
|
210
|
+
type: Inject,
|
|
211
|
+
args: [TUI_PULL_TO_REFRESH_COMPONENT]
|
|
212
|
+
}] }, { type: i1$1.Observable, decorators: [{
|
|
213
|
+
type: Inject,
|
|
214
|
+
args: [TuiPullToRefreshService]
|
|
147
215
|
}] }]; }, propDecorators: { pulled: [{
|
|
148
216
|
type: Output
|
|
149
|
-
}]
|
|
217
|
+
}] } });
|
|
150
218
|
|
|
151
219
|
class TuiPullToRefreshModule {
|
|
152
220
|
}
|
|
153
221
|
TuiPullToRefreshModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
154
222
|
TuiPullToRefreshModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshModule, declarations: [TuiPullToRefreshComponent,
|
|
155
223
|
TuiMobileLoaderAndroidComponent,
|
|
156
|
-
TuiMobileLoaderIOSComponent], imports: [CommonModule,
|
|
157
|
-
|
|
224
|
+
TuiMobileLoaderIOSComponent], imports: [CommonModule,
|
|
225
|
+
TuiSvgModule,
|
|
226
|
+
TuiOverscrollModule,
|
|
227
|
+
TuiRepeatTimesModule,
|
|
228
|
+
PolymorpheusModule], exports: [TuiPullToRefreshComponent] });
|
|
229
|
+
TuiPullToRefreshModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshModule, imports: [[
|
|
230
|
+
CommonModule,
|
|
231
|
+
TuiSvgModule,
|
|
232
|
+
TuiOverscrollModule,
|
|
233
|
+
TuiRepeatTimesModule,
|
|
234
|
+
PolymorpheusModule,
|
|
235
|
+
]] });
|
|
158
236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiPullToRefreshModule, decorators: [{
|
|
159
237
|
type: NgModule,
|
|
160
238
|
args: [{
|
|
161
|
-
imports: [
|
|
239
|
+
imports: [
|
|
240
|
+
CommonModule,
|
|
241
|
+
TuiSvgModule,
|
|
242
|
+
TuiOverscrollModule,
|
|
243
|
+
TuiRepeatTimesModule,
|
|
244
|
+
PolymorpheusModule,
|
|
245
|
+
],
|
|
162
246
|
declarations: [
|
|
163
247
|
TuiPullToRefreshComponent,
|
|
164
248
|
TuiMobileLoaderAndroidComponent,
|
|
@@ -172,5 +256,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
172
256
|
* Generated bundle index. Do not edit.
|
|
173
257
|
*/
|
|
174
258
|
|
|
175
|
-
export { MICRO_OFFSET,
|
|
259
|
+
export { MICRO_OFFSET, TUI_ANDROID_LOADER, TUI_IOS_LOADER, TUI_LOADED, TUI_PULL_TO_REFRESH_COMPONENT, TUI_PULL_TO_REFRESH_LOADED, TUI_PULL_TO_REFRESH_THRESHOLD, TuiMobileLoaderAndroidComponent, TuiMobileLoaderIOSComponent, TuiPullToRefreshComponent, TuiPullToRefreshModule, TuiPullToRefreshService };
|
|
176
260
|
//# sourceMappingURL=taiga-ui-addon-mobile-components-pull-to-refresh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.js","sources":["../../../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/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.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.module.ts","../../../projects/addon-mobile/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\n\nconst HIDDEN_DISTANCE = 2;\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 templateUrl: './loader-android.template.html',\n styleUrls: ['./loader-android.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderAndroidComponent {\n @Input()\n pulled = 0;\n\n get transform(): string {\n const rotateX = Math.min(\n ROTATE_X_DEFAULT + this.pulled * ROTATE_X_MULTIPLIER,\n ROTATE_X_MAX,\n );\n\n return `rotate(${rotateX} 0 0)`;\n }\n\n @HostBinding('class._hidden')\n get hidden(): boolean {\n return this.pulled < HIDDEN_DISTANCE;\n }\n}\n","<svg\n *ngIf=\"pulled !== 100; else loading\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n>\n <defs>\n <mask id=\"mask-1\">\n <path\n fill-rule=\"evenodd\"\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 />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n fill-rule=\"evenodd\"\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 />\n </g>\n</svg>\n<ng-template #loading>\n <svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-loading\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n</ng-template>\n","import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\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 changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n})\nexport class TuiMobileLoaderIOSComponent {\n @Input()\n pulled = 0;\n\n readonly steps = 12;\n\n get finished(): boolean {\n return this.pulled >= 100;\n }\n\n isShown(index: number): boolean {\n return this.pulled > (index + 1) * LOADED_STEP;\n }\n\n calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n","<svg\n width=\"36\"\n height=\"36\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid\"\n>\n <ng-container *tuiRepeatTimes=\"let index of steps\">\n <g\n *ngIf=\"isShown(index)\"\n [attr.transform]=\"calculateTransform(index)\"\n >\n <rect\n x=\"47\"\n y=\"22\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n height=\"16\"\n fill=\"#c7c9cc\"\n >\n <animate\n *ngIf=\"finished\"\n attributeName=\"opacity\"\n values=\"1;0\"\n keyTimes=\"0;1\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n [attr.begin]=\"calculateAnimationBegin(index)\"\n ></animate>\n </rect>\n </g>\n </ng-container>\n</svg>\n","import {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {TUI_LOADED} from '@taiga-ui/addon-mobile/tokens';\nimport {TUI_IS_IOS, tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {merge, Observable} from 'rxjs';\nimport {endWith, filter, map, scan, switchMap, takeUntil} from 'rxjs/operators';\n\nexport const MICRO_OFFSET = 10 ** -6;\nexport const PULLED_DISTANCE = 50;\n\n/**\n * Stream that emits content pulling\n */\nexport const TUI_PULLING = new InjectionToken<Observable<number>>(`[TUI_PULLING]`);\n\nexport const TUI_PULL_TO_REFRESH_PROVIDERS: Provider[] = [\n {\n provide: TUI_PULLING,\n deps: [TUI_IS_IOS, TUI_LOADED, ElementRef],\n useFactory: (\n isIOS: boolean,\n loaded$: Observable<unknown>,\n {nativeElement}: ElementRef<HTMLElement>,\n ): Observable<number> => {\n return merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}).pipe(\n filter(() => nativeElement.scrollTop === 0),\n switchMap(touchStart =>\n tuiTypedFromEvent(nativeElement, `touchmove`).pipe(\n map(\n touchMove =>\n touchMove.touches[0].clientY -\n touchStart.touches[0].clientY,\n ),\n takeUntil(tuiTypedFromEvent(nativeElement, `touchend`)),\n endWith(0),\n ),\n ),\n ),\n loaded$.pipe(map(() => NaN)),\n ).pipe(\n scan((max, current) => {\n if (Number.isNaN(current)) {\n return 0;\n }\n\n const androidLoading = !isIOS && max === PULLED_DISTANCE;\n const dropped = current === 0 && max > PULLED_DISTANCE;\n\n return androidLoading || dropped\n ? PULLED_DISTANCE\n : current + MICRO_OFFSET;\n }, 0),\n );\n },\n },\n];\n","import {ChangeDetectionStrategy, Component, Inject, Output} from '@angular/core';\nimport {TUI_IS_IOS, tuiPure} from '@taiga-ui/cdk';\nimport {Observable, of} from 'rxjs';\nimport {distinctUntilChanged, filter, map} from 'rxjs/operators';\n\nimport {\n MICRO_OFFSET,\n PULLED_DISTANCE,\n TUI_PULL_TO_REFRESH_PROVIDERS,\n TUI_PULLING,\n} from './pull-to-refresh.providers';\n\nconst IOS_LOADING_DISTANCE = PULLED_DISTANCE / 2;\nconst ANDROID_MAX_DISTANCE = PULLED_DISTANCE * 1.5;\n\nfunction translateY(distance: number): string {\n return `translateY(${distance}px)`;\n}\n\n@Component({\n selector: 'tui-pull-to-refresh',\n templateUrl: './pull-to-refresh.template.html',\n styleUrls: ['./pull-to-refresh.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: TUI_PULL_TO_REFRESH_PROVIDERS,\n})\nexport class TuiPullToRefreshComponent {\n @Output()\n readonly pulled: Observable<void> = this.pulling$.pipe(\n distinctUntilChanged(),\n filter(distance => distance === PULLED_DISTANCE),\n map(() => undefined),\n );\n\n readonly pulledInPercent$: Observable<number> = this.pulling$.pipe(\n map(distance => (distance * 100) / PULLED_DISTANCE),\n );\n\n readonly dropped$: Observable<boolean> = this.pulling$.pipe(\n map(distance => distance <= MICRO_OFFSET || distance === PULLED_DISTANCE),\n distinctUntilChanged(),\n );\n\n readonly contentTransform$: Observable<string | null> = this.isIOS\n ? this.pulling$.pipe(\n map(distance =>\n distance === PULLED_DISTANCE ? IOS_LOADING_DISTANCE : distance,\n ),\n map(translateY),\n )\n : of(null);\n\n constructor(\n @Inject(TUI_IS_IOS) readonly isIOS: boolean,\n @Inject(TUI_PULLING) private readonly pulling$: Observable<number>,\n ) {}\n\n @tuiPure\n get loaderTransform$(): Observable<string> {\n return this.pulling$.pipe(\n map(distance => translateY(Math.min(distance, ANDROID_MAX_DISTANCE))),\n );\n }\n}\n","<div\n tuiOverscroll\n [class.t-drop-animation]=\"dropped$ | async\"\n [style.transform]=\"contentTransform$ | async\"\n>\n <ng-content></ng-content>\n</div>\n\n<tui-mobile-ios-loader\n *ngIf=\"isIOS; else androidLoader\"\n class=\"t-ios-spinner\"\n [pulled]=\"(pulledInPercent$ | async) || 0\"\n></tui-mobile-ios-loader>\n\n<ng-template #androidLoader>\n <tui-mobile-android-loader\n class=\"t-android-loader\"\n [class.t-drop-animation]=\"dropped$ | async\"\n [style.transform]=\"loaderTransform$ | async\"\n [pulled]=\"(pulledInPercent$ | async) || 0\"\n ></tui-mobile-android-loader>\n</ng-template>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiOverscrollModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiMobileLoaderAndroidComponent} from './loader-android/loader-android.component';\nimport {TuiMobileLoaderIOSComponent} from './loader-ios/loader-ios.component';\nimport {TuiPullToRefreshComponent} from './pull-to-refresh.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, TuiOverscrollModule, TuiRepeatTimesModule],\n declarations: [\n TuiPullToRefreshComponent,\n TuiMobileLoaderAndroidComponent,\n TuiMobileLoaderIOSComponent,\n ],\n exports: [TuiPullToRefreshComponent],\n})\nexport class TuiPullToRefreshModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i1.TuiMobileLoaderIOSComponent","i2.TuiMobileLoaderAndroidComponent","i3"],"mappings":";;;;;;;;;;;;;AAEA,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,mBAAmB,GAAG,GAAG,CAA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AA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,iBAN3B,yBAAyB;QACzB,+BAA+B;QAC/B,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAJrB,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAMrE,yBAAyB,CAAA,EAAA,CAAA,CAAA;qHAE1B,sBAAsB,EAAA,OAAA,EAAA,CARtB,CAAC,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAQvE,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBATlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;AAChF,oBAAA,YAAY,EAAE;wBACV,yBAAyB;wBACzB,+BAA+B;wBAC/B,2BAA2B;AAC9B,qBAAA;oBACD,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.js","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/pull-to-refresh.module.ts","../../../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 {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusComponent} from '@tinkoff/ng-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 styleUrls: ['./loader-ios.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderIOSComponent {\n readonly steps = 12;\n\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<number>,\n @Inject(TUI_PULL_TO_REFRESH_THRESHOLD) private readonly threshold: number,\n ) {}\n\n get finished(): boolean {\n return this.percent >= 100;\n }\n\n get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n isShown(index: number): boolean {\n return this.percent > (index + 1) * LOADED_STEP;\n }\n\n calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n\nexport const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOSComponent);\n","<svg\n width=\"36\"\n height=\"36\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid\"\n>\n <ng-container *tuiRepeatTimes=\"let index of steps\">\n <g\n *ngIf=\"isShown(index)\"\n [attr.transform]=\"calculateTransform(index)\"\n >\n <rect\n x=\"47\"\n y=\"22\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n height=\"16\"\n fill=\"#c7c9cc\"\n >\n <animate\n *ngIf=\"finished\"\n attributeName=\"opacity\"\n values=\"1;0\"\n keyTimes=\"0;1\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n [attr.begin]=\"calculateAnimationBegin(index)\"\n ></animate>\n </rect>\n </g>\n </ng-container>\n</svg>\n","import {inject, InjectionToken} from '@angular/core';\nimport {TUI_IS_IOS, TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, 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 `[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<number>(\n `[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<TuiContextWithImplicit<number>>\n>(`[TUI_PULL_TO_REFRESH_COMPONENT]`, {\n factory: () => (inject(TUI_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),\n});\n\n/**\n * @deprecated renamed to {@link TUI_PULL_TO_REFRESH_LOADED}\n */\nexport const TUI_LOADED = TUI_PULL_TO_REFRESH_LOADED;\n","import {ElementRef, Inject, Injectable} from '@angular/core';\nimport {TUI_IS_IOS, tuiTypedFromEvent} from '@taiga-ui/cdk';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {endWith, filter, map, scan, switchMap, takeUntil} from 'rxjs/operators';\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;\n\n@Injectable()\nexport class TuiPullToRefreshService extends Observable<number> {\n private readonly pulling$ = merge(\n tuiTypedFromEvent(this.element, `touchstart`, {passive: true}).pipe(\n filter(() => this.element.scrollTop === 0),\n switchMap(touchStart =>\n tuiTypedFromEvent(this.element, `touchmove`).pipe(\n map(\n touchMove =>\n touchMove.touches[0].clientY - touchStart.touches[0].clientY,\n ),\n takeUntil(tuiTypedFromEvent(this.element, `touchend`)),\n endWith(0),\n ),\n ),\n ),\n this.loaded$.pipe(map(() => NaN)),\n ).pipe(\n scan((max, current) => {\n if (Number.isNaN(current)) {\n return 0;\n }\n\n const androidLoading = !this.isIos && max === this.threshold;\n const dropped = current === 0 && max > this.threshold;\n\n return androidLoading || dropped\n ? this.threshold\n : current + current * MICRO_OFFSET;\n }, 0),\n );\n\n constructor(\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(TUI_PULL_TO_REFRESH_LOADED) private readonly loaded$: Observable<unknown>,\n @Inject(TUI_PULL_TO_REFRESH_THRESHOLD) private readonly threshold: number,\n @Inject(TUI_PULL_TO_REFRESH_COMPONENT) component: unknown,\n ) {\n super(subscriber => (component ? this.pulling$ : EMPTY).subscribe(subscriber));\n }\n\n private get element(): HTMLElement {\n return this.el.nativeElement;\n }\n}\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusComponent} from '@tinkoff/ng-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 templateUrl: './loader-android.template.html',\n styleUrls: ['./loader-android.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderAndroidComponent {\n constructor(\n @Inject(POLYMORPHEUS_CONTEXT)\n private readonly context: TuiContextWithImplicit<number>,\n @Inject(TUI_PULL_TO_REFRESH_THRESHOLD) private readonly threshold: number,\n ) {}\n\n 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 @HostBinding('class._visible')\n get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n get opacity(): number {\n return this.context.$implicit / (this.threshold * 1.5);\n }\n\n @HostBinding('class._dropped')\n get dropped(): boolean {\n return (\n this.context.$implicit <= MICRO_OFFSET ||\n this.context.$implicit === this.threshold\n );\n }\n\n @HostBinding('style.transform')\n get hostTransform(): string {\n return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;\n }\n}\n\nexport const TUI_ANDROID_LOADER = new PolymorpheusComponent(\n TuiMobileLoaderAndroidComponent,\n);\n","<svg\n *ngIf=\"percent !== 100; else loading\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\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 fill-rule=\"evenodd\"\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 />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n fill-rule=\"evenodd\"\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 />\n </g>\n</svg>\n<ng-template #loading>\n <svg\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"t-loading\"\n >\n <circle\n cx=\"50\"\n cy=\"50\"\n r=\"50\"\n stroke-dasharray=\"314\"\n class=\"t-circle\"\n ></circle>\n </svg>\n</ng-template>\n","import {ChangeDetectionStrategy, Component, Inject, Output} from '@angular/core';\nimport {TUI_IS_IOS, TuiContextWithImplicit} from '@taiga-ui/cdk';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {distinctUntilChanged, filter, map} from 'rxjs/operators';\n\nimport {TUI_IOS_LOADER} from './loader-ios/loader-ios.component';\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 templateUrl: './pull-to-refresh.template.html',\n styleUrls: ['./pull-to-refresh.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiPullToRefreshService],\n})\nexport class TuiPullToRefreshComponent {\n @Output()\n readonly pulled: Observable<unknown> = this.pulling$.pipe(\n distinctUntilChanged(),\n filter(distance => distance === this.threshold),\n );\n\n // TODO: Move to iOS loader somehow, like contentTransform$ below\n readonly dropped$: Observable<boolean> = this.pulling$.pipe(\n map(distance => distance <= MICRO_OFFSET || distance === this.threshold),\n distinctUntilChanged(),\n );\n\n readonly contentTransform$: Observable<string | null> =\n this.isIOS && this.component === TUI_IOS_LOADER\n ? this.pulling$.pipe(map(distance => `translateY(${distance / 2}px)`))\n : of(null);\n\n constructor(\n @Inject(TUI_IS_IOS) private readonly isIOS: boolean,\n @Inject(TUI_PULL_TO_REFRESH_THRESHOLD) private readonly threshold: number,\n @Inject(TUI_PULL_TO_REFRESH_COMPONENT)\n readonly component: PolymorpheusContent<TuiContextWithImplicit<number>>,\n @Inject(TuiPullToRefreshService) readonly pulling$: Observable<number>,\n ) {}\n}\n","<div\n tuiOverscroll\n [class.t-drop-animation]=\"dropped$ | async\"\n [style.transform]=\"contentTransform$ | async\"\n>\n <ng-content></ng-content>\n</div>\n\n<ng-container *polymorpheusOutlet=\"component; context: {$implicit: (pulling$ | async) || 0}\"></ng-container>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiOverscrollModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiMobileLoaderAndroidComponent} from './loader-android/loader-android.component';\nimport {TuiMobileLoaderIOSComponent} from './loader-ios/loader-ios.component';\nimport {TuiPullToRefreshComponent} from './pull-to-refresh.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiSvgModule,\n TuiOverscrollModule,\n TuiRepeatTimesModule,\n PolymorpheusModule,\n ],\n declarations: [\n TuiPullToRefreshComponent,\n TuiMobileLoaderAndroidComponent,\n TuiMobileLoaderIOSComponent,\n ],\n exports: [TuiPullToRefreshComponent],\n})\nexport class TuiPullToRefreshModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;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CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,EAdtB,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,YAAY;YACZ,mBAAmB;YACnB,oBAAoB;YACpB,kBAAkB;AACrB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAQQ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,kBAAkB;AACrB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,yBAAyB;wBACzB,+BAA+B;wBAC/B,2BAA2B;AAC9B,qBAAA;oBACD,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACvC,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -2,7 +2,6 @@ export * from '@taiga-ui/addon-mobile/components';
|
|
|
2
2
|
export * from '@taiga-ui/addon-mobile/const';
|
|
3
3
|
export * from '@taiga-ui/addon-mobile/directives';
|
|
4
4
|
export * from '@taiga-ui/addon-mobile/interfaces';
|
|
5
|
-
export * from '@taiga-ui/addon-mobile/tokens';
|
|
6
5
|
export * from '@taiga-ui/addon-mobile/types';
|
|
7
6
|
export * from '@taiga-ui/addon-mobile/utils';
|
|
8
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile.js","sources":["../../../projects/addon-mobile/taiga-ui-addon-mobile.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile.js","sources":["../../../projects/addon-mobile/taiga-ui-addon-mobile.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
|
package/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export * from '@taiga-ui/addon-mobile/components';
|
|
|
2
2
|
export * from '@taiga-ui/addon-mobile/const';
|
|
3
3
|
export * from '@taiga-ui/addon-mobile/directives';
|
|
4
4
|
export * from '@taiga-ui/addon-mobile/interfaces';
|
|
5
|
-
export * from '@taiga-ui/addon-mobile/tokens';
|
|
6
5
|
export * from '@taiga-ui/addon-mobile/types';
|
|
7
6
|
export * from '@taiga-ui/addon-mobile/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"@angular/common": ">=12.0.0",
|
|
16
16
|
"@angular/core": ">=12.0.0",
|
|
17
17
|
"@ng-web-apis/common": ">=2.0.0",
|
|
18
|
-
"@taiga-ui/cdk": ">=3.
|
|
19
|
-
"@taiga-ui/core": ">=3.
|
|
20
|
-
"@taiga-ui/kit": ">=3.
|
|
18
|
+
"@taiga-ui/cdk": ">=3.29.0",
|
|
19
|
+
"@taiga-ui/core": ">=3.29.0",
|
|
20
|
+
"@taiga-ui/kit": ">=3.29.0",
|
|
21
21
|
"@tinkoff/ng-polymorpheus": ">=4.0.0",
|
|
22
22
|
"rxjs": ">=6.0.0"
|
|
23
23
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/addon-mobile/tokens', ['exports', '@angular/core', 'rxjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"]["addon-mobile"] = global["taiga-ui"]["addon-mobile"] || {}, global["taiga-ui"]["addon-mobile"].tokens = {}), global.ng.core, global.rxjs));
|
|
5
|
-
})(this, (function (exports, core, rxjs) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Stream that emits when loading is over
|
|
9
|
-
*/
|
|
10
|
-
var TUI_LOADED = new core.InjectionToken("[TUI_LOADED]", {
|
|
11
|
-
factory: function () { return rxjs.EMPTY; },
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Generated bundle index. Do not edit.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
exports.TUI_LOADED = TUI_LOADED;
|
|
19
|
-
|
|
20
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
21
|
-
|
|
22
|
-
}));
|
|
23
|
-
//# sourceMappingURL=taiga-ui-addon-mobile-tokens.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-tokens.umd.js","sources":["../../../projects/addon-mobile/tokens/loaded.ts","../../../projects/addon-mobile/tokens/taiga-ui-addon-mobile-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {EMPTY, Observable} from 'rxjs';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_LOADED = new InjectionToken<Observable<unknown>>(`[TUI_LOADED]`, {\n factory: () => EMPTY,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["InjectionToken","EMPTY"],"mappings":";;;;;;IAGA;;IAEG;QACU,UAAU,GAAG,IAAIA,mBAAc,CAAsB,cAAc,EAAE;IAC9E,IAAA,OAAO,EAAE,YAAA,EAAM,OAAAC,UAAK,GAAA;IACvB,CAAA;;ICRD;;IAEG;;;;;;;;;;"}
|
package/esm2015/tokens/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './loaded';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hZGRvbi1tb2JpbGUvdG9rZW5zL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsVUFBVSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9sb2FkZWQnO1xuIl19
|
package/esm2015/tokens/loaded.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { EMPTY } from 'rxjs';
|
|
3
|
-
/**
|
|
4
|
-
* Stream that emits when loading is over
|
|
5
|
-
*/
|
|
6
|
-
export const TUI_LOADED = new InjectionToken(`[TUI_LOADED]`, {
|
|
7
|
-
factory: () => EMPTY,
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYWRkb24tbW9iaWxlL3Rva2Vucy9sb2FkZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUM3QyxPQUFPLEVBQUMsS0FBSyxFQUFhLE1BQU0sTUFBTSxDQUFDO0FBRXZDOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLElBQUksY0FBYyxDQUFzQixjQUFjLEVBQUU7SUFDOUUsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLEtBQUs7Q0FDdkIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtJbmplY3Rpb25Ub2tlbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQge0VNUFRZLCBPYnNlcnZhYmxlfSBmcm9tICdyeGpzJztcblxuLyoqXG4gKiBTdHJlYW0gdGhhdCBlbWl0cyB3aGVuIGxvYWRpbmcgaXMgb3ZlclxuICovXG5leHBvcnQgY29uc3QgVFVJX0xPQURFRCA9IG5ldyBJbmplY3Rpb25Ub2tlbjxPYnNlcnZhYmxlPHVua25vd24+PihgW1RVSV9MT0FERURdYCwge1xuICAgIGZhY3Rvcnk6ICgpID0+IEVNUFRZLFxufSk7XG4iXX0=
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktYWRkb24tbW9iaWxlLXRva2Vucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FkZG9uLW1vYmlsZS90b2tlbnMvdGFpZ2EtdWktYWRkb24tbW9iaWxlLXRva2Vucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { EMPTY } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Stream that emits when loading is over
|
|
6
|
-
*/
|
|
7
|
-
const TUI_LOADED = new InjectionToken(`[TUI_LOADED]`, {
|
|
8
|
-
factory: () => EMPTY,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Generated bundle index. Do not edit.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export { TUI_LOADED };
|
|
16
|
-
//# sourceMappingURL=taiga-ui-addon-mobile-tokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-tokens.js","sources":["../../../projects/addon-mobile/tokens/loaded.ts","../../../projects/addon-mobile/tokens/taiga-ui-addon-mobile-tokens.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {EMPTY, Observable} from 'rxjs';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_LOADED = new InjectionToken<Observable<unknown>>(`[TUI_LOADED]`, {\n factory: () => EMPTY,\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;AAEG;MACU,UAAU,GAAG,IAAI,cAAc,CAAsB,cAAc,EAAE;AAC9E,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA;;ACRD;;AAEG;;;;"}
|
package/tokens/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loaded';
|