@taiga-ui/addon-mobile 2.84.0 → 2.85.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-app-bar.umd.js +411 -0
- package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.js.map +1 -0
- package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.min.js +2 -0
- package/bundles/taiga-ui-addon-mobile-components-app-bar.umd.min.js.map +1 -0
- package/bundles/taiga-ui-addon-mobile-components.umd.js +12 -4
- package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
- package/bundles/taiga-ui-addon-mobile-components.umd.min.js +1 -1
- package/components/app-bar/app-bar-back.component.d.ts +2 -0
- package/components/app-bar/app-bar.component.d.ts +11 -0
- package/components/app-bar/app-bar.directive.d.ts +3 -0
- package/components/app-bar/app-bar.module.d.ts +2 -0
- package/components/app-bar/index.d.ts +4 -0
- package/components/app-bar/package.json +13 -0
- package/components/app-bar/taiga-ui-addon-mobile-components-app-bar.d.ts +4 -0
- package/components/app-bar/taiga-ui-addon-mobile-components-app-bar.metadata.json +1 -0
- package/components/index.d.ts +1 -0
- package/components/taiga-ui-addon-mobile-components.metadata.json +1 -1
- package/esm2015/components/app-bar/app-bar-back.component.js +14 -0
- package/esm2015/components/app-bar/app-bar.component.js +64 -0
- package/esm2015/components/app-bar/app-bar.directive.js +17 -0
- package/esm2015/components/app-bar/app-bar.module.js +18 -0
- package/esm2015/components/app-bar/index.js +5 -0
- package/esm2015/components/app-bar/taiga-ui-addon-mobile-components-app-bar.js +5 -0
- package/esm2015/components/index.js +2 -1
- package/esm5/components/app-bar/app-bar-back.component.js +17 -0
- package/esm5/components/app-bar/app-bar.component.js +66 -0
- package/esm5/components/app-bar/app-bar.directive.js +18 -0
- package/esm5/components/app-bar/app-bar.module.js +21 -0
- package/esm5/components/app-bar/index.js +5 -0
- package/esm5/components/app-bar/taiga-ui-addon-mobile-components-app-bar.js +5 -0
- package/esm5/components/index.js +2 -1
- package/fesm2015/taiga-ui-addon-mobile-components-app-bar.js +106 -0
- package/fesm2015/taiga-ui-addon-mobile-components-app-bar.js.map +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components.js +1 -0
- package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
- package/fesm5/taiga-ui-addon-mobile-components-app-bar.js +115 -0
- package/fesm5/taiga-ui-addon-mobile-components-app-bar.js.map +1 -0
- package/fesm5/taiga-ui-addon-mobile-components.js +1 -0
- package/fesm5/taiga-ui-addon-mobile-components.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __assign, __decorate, __param } from 'tslib';
|
|
2
|
+
import { Inject, ViewChildren, Component, ChangeDetectionStrategy, Input, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { MUTATION_OBSERVER_INIT, MutationObserverService } from '@ng-web-apis/mutation-observer';
|
|
4
|
+
import { EMPTY_QUERY, TuiResizeService, TuiDestroyService } from '@taiga-ui/cdk';
|
|
5
|
+
import { TUI_BUTTON_OPTIONS, TUI_BUTTON_DEFAULT_OPTIONS, TuiSvgModule } from '@taiga-ui/core';
|
|
6
|
+
import { merge, Observable } from 'rxjs';
|
|
7
|
+
import { map } from 'rxjs/operators';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
|
|
10
|
+
// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };
|
|
11
|
+
function tuiProvideMutationOptionsForAppBar() {
|
|
12
|
+
return {
|
|
13
|
+
provide: TUI_BUTTON_OPTIONS,
|
|
14
|
+
useValue: {
|
|
15
|
+
characterData: true,
|
|
16
|
+
childList: true,
|
|
17
|
+
subtree: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };
|
|
22
|
+
function tuiProvideButtonOptionsForAppBar() {
|
|
23
|
+
return {
|
|
24
|
+
provide: MUTATION_OBSERVER_INIT,
|
|
25
|
+
useValue: __assign(__assign({}, TUI_BUTTON_DEFAULT_OPTIONS), { size: 'm', appearance: '' }),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
// @dynamic
|
|
29
|
+
var TuiAppBarComponent = /** @class */ (function () {
|
|
30
|
+
function TuiAppBarComponent(resize$, mutation$) {
|
|
31
|
+
var _this = this;
|
|
32
|
+
this.resize$ = resize$;
|
|
33
|
+
this.mutation$ = mutation$;
|
|
34
|
+
this.side = EMPTY_QUERY;
|
|
35
|
+
this.width$ = merge(this.resize$, this.mutation$).pipe(map(function () {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return 2 *
|
|
38
|
+
Math.max((_a = _this.side.first) === null || _a === void 0 ? void 0 : _a.nativeElement.clientWidth, (_b = _this.side.last) === null || _b === void 0 ? void 0 : _b.nativeElement.clientWidth);
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
TuiAppBarComponent.ctorParameters = function () { return [
|
|
42
|
+
{ type: Observable, decorators: [{ type: Inject, args: [TuiResizeService,] }] },
|
|
43
|
+
{ type: Observable, decorators: [{ type: Inject, args: [MutationObserverService,] }] }
|
|
44
|
+
]; };
|
|
45
|
+
__decorate([
|
|
46
|
+
ViewChildren('sideLeft, sideRight')
|
|
47
|
+
], TuiAppBarComponent.prototype, "side", void 0);
|
|
48
|
+
TuiAppBarComponent = __decorate([
|
|
49
|
+
Component({
|
|
50
|
+
selector: 'tui-app-bar',
|
|
51
|
+
template: "<div\n #sideLeft\n class=\"t-left\"\n>\n <ng-content select=\"[tuiSlot='left']\"></ng-content>\n</div>\n<div\n class=\"t-content\"\n [style.--sides.px]=\"width$ | async\"\n>\n <ng-content></ng-content>\n</div>\n<div\n #sideRight\n class=\"t-right\"\n>\n <ng-content select=\"[tuiSlot='right']\"></ng-content>\n</div>\n",
|
|
52
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
53
|
+
providers: [
|
|
54
|
+
TuiDestroyService,
|
|
55
|
+
TuiResizeService,
|
|
56
|
+
MutationObserverService,
|
|
57
|
+
tuiProvideMutationOptionsForAppBar(),
|
|
58
|
+
tuiProvideButtonOptionsForAppBar(),
|
|
59
|
+
],
|
|
60
|
+
styles: [":host{--tui-padding:0.625rem;position:relative;display:flex;height:3rem;align-items:center;justify-content:space-between;border:solid transparent;border-width:0 .375rem;box-sizing:border-box;font:var(--tui-font-text-m);font-weight:700;color:var(--tui-text-01);background:var(--tui-base-01)}:host ::ng-deep [tuiButton][data-size='m']{font-weight:400}.t-content{top:50%;left:50%;transform:translate(-50%,-50%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:absolute;max-width:calc(100% - var(--sides,0px));flex:1;padding:0 .375rem;box-sizing:border-box;text-align:center;color:var(--tui-text-01)}"]
|
|
61
|
+
}),
|
|
62
|
+
__param(0, Inject(TuiResizeService)),
|
|
63
|
+
__param(1, Inject(MutationObserverService))
|
|
64
|
+
], TuiAppBarComponent);
|
|
65
|
+
return TuiAppBarComponent;
|
|
66
|
+
}());
|
|
67
|
+
|
|
68
|
+
var TuiAppBarDirective = /** @class */ (function () {
|
|
69
|
+
function TuiAppBarDirective() {
|
|
70
|
+
this.tuiSlot = 'left';
|
|
71
|
+
}
|
|
72
|
+
__decorate([
|
|
73
|
+
Input()
|
|
74
|
+
], TuiAppBarDirective.prototype, "tuiSlot", void 0);
|
|
75
|
+
TuiAppBarDirective = __decorate([
|
|
76
|
+
Directive({
|
|
77
|
+
selector: '[tuiSlot]',
|
|
78
|
+
})
|
|
79
|
+
], TuiAppBarDirective);
|
|
80
|
+
return TuiAppBarDirective;
|
|
81
|
+
}());
|
|
82
|
+
|
|
83
|
+
var TuiAppBarBackComponent = /** @class */ (function () {
|
|
84
|
+
function TuiAppBarBackComponent() {
|
|
85
|
+
}
|
|
86
|
+
TuiAppBarBackComponent = __decorate([
|
|
87
|
+
Component({
|
|
88
|
+
selector: 'button[tuiAppBarBack], a[tuiAppBarBack]',
|
|
89
|
+
template: '<tui-svg src="tuiIconChevronLeftLarge"></tui-svg><ng-content></ng-content>',
|
|
90
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
91
|
+
styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0 .625rem 0 .125rem;border:0;background:0 0;font-size:inherit;line-height:inherit;display:flex;align-items:center}"]
|
|
92
|
+
})
|
|
93
|
+
], TuiAppBarBackComponent);
|
|
94
|
+
return TuiAppBarBackComponent;
|
|
95
|
+
}());
|
|
96
|
+
|
|
97
|
+
var TuiAppBarModule = /** @class */ (function () {
|
|
98
|
+
function TuiAppBarModule() {
|
|
99
|
+
}
|
|
100
|
+
TuiAppBarModule = __decorate([
|
|
101
|
+
NgModule({
|
|
102
|
+
imports: [CommonModule, TuiSvgModule],
|
|
103
|
+
declarations: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],
|
|
104
|
+
exports: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],
|
|
105
|
+
})
|
|
106
|
+
], TuiAppBarModule);
|
|
107
|
+
return TuiAppBarModule;
|
|
108
|
+
}());
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Generated bundle index. Do not edit.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
export { TuiAppBarBackComponent, TuiAppBarComponent, TuiAppBarDirective, TuiAppBarModule, tuiProvideButtonOptionsForAppBar, tuiProvideMutationOptionsForAppBar };
|
|
115
|
+
//# sourceMappingURL=taiga-ui-addon-mobile-components-app-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-app-bar.js","sources":["ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.component.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.directive.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar-back.component.ts","ng://@taiga-ui/addon-mobile/components/app-bar/app-bar.module.ts","ng://@taiga-ui/addon-mobile/components/app-bar/taiga-ui-addon-mobile-components-app-bar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n Provider,\n QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {\n MUTATION_OBSERVER_INIT,\n MutationObserverService,\n} from '@ng-web-apis/mutation-observer';\nimport {EMPTY_QUERY, TuiDestroyService, TuiResizeService} from '@taiga-ui/cdk';\nimport {TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS} from '@taiga-ui/core';\nimport {merge, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };\nexport function tuiProvideMutationOptionsForAppBar(): Provider {\n return {\n provide: TUI_BUTTON_OPTIONS,\n useValue: {\n characterData: true,\n childList: true,\n subtree: true,\n },\n };\n}\n\n// note: fix problem for strange behavior in viewEngine with export { ɵ_0, ɵ_1 };\nexport function tuiProvideButtonOptionsForAppBar(): Provider {\n return {\n provide: MUTATION_OBSERVER_INIT,\n useValue: {\n ...TUI_BUTTON_DEFAULT_OPTIONS,\n size: 'm',\n appearance: '',\n },\n };\n}\n\n// @dynamic\n@Component({\n selector: 'tui-app-bar',\n templateUrl: './app-bar.template.html',\n styleUrls: ['./app-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n TuiDestroyService,\n TuiResizeService,\n MutationObserverService,\n tuiProvideMutationOptionsForAppBar(),\n tuiProvideButtonOptionsForAppBar(),\n ],\n})\nexport class TuiAppBarComponent {\n @ViewChildren('sideLeft, sideRight')\n private readonly side: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n readonly width$ = merge(this.resize$, this.mutation$).pipe(\n map(\n () =>\n 2 *\n Math.max(\n this.side.first?.nativeElement.clientWidth,\n this.side.last?.nativeElement.clientWidth,\n ),\n ),\n );\n\n constructor(\n @Inject(TuiResizeService) private readonly resize$: Observable<unknown>,\n @Inject(MutationObserverService) private readonly mutation$: Observable<unknown>,\n ) {}\n}\n","import {Directive, Input} from '@angular/core';\n\n@Directive({\n selector: '[tuiSlot]',\n})\nexport class TuiAppBarDirective {\n @Input()\n tuiSlot: 'left' | 'right' = 'left';\n}\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\n@Component({\n selector: 'button[tuiAppBarBack], a[tuiAppBarBack]',\n template:\n '<tui-svg src=\"tuiIconChevronLeftLarge\"></tui-svg><ng-content></ng-content>',\n styleUrls: ['./app-bar-back.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiAppBarBackComponent {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\n\nimport {TuiAppBarComponent} from './app-bar.component';\nimport {TuiAppBarDirective} from './app-bar.directive';\nimport {TuiAppBarBackComponent} from './app-bar-back.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule],\n declarations: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],\n exports: [TuiAppBarComponent, TuiAppBarDirective, TuiAppBarBackComponent],\n})\nexport class TuiAppBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAkBA;SACgB,kCAAkC;IAC9C,OAAO;QACH,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,EAAE;YACN,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;SAChB;KACJ,CAAC;AACN,CAAC;AAED;SACgB,gCAAgC;IAC5C,OAAO;QACH,OAAO,EAAE,sBAAsB;QAC/B,QAAQ,wBACD,0BAA0B,KAC7B,IAAI,EAAE,GAAG,EACT,UAAU,EAAE,EAAE,GACjB;KACJ,CAAC;AACN,CAAC;AAED;;IA6BI,4BAC+C,OAA4B,EACrB,SAA8B;QAFpF,iBAGI;QAF2C,YAAO,GAAP,OAAO,CAAqB;QACrB,cAAS,G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sB,CAAG;IAAD,6BAAC;CAAtC;;;ICIA;KAA+B;IAAlB,eAAe;QAL3B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;YACrC,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;YAC9E,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;SAC5E,CAAC;OACW,eAAe,CAAG;IAAD,sBAAC;CAA/B;;ACbA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.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-components.js","sources":["ng://@taiga-ui/addon-mobile/components/taiga-ui-addon-mobile-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.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": ">=9.0.0",
|
|
16
16
|
"@angular/core": ">=9.0.0",
|
|
17
17
|
"@ng-web-apis/common": ">=1.12.1 < 2",
|
|
18
|
-
"@taiga-ui/cdk": ">=2.
|
|
19
|
-
"@taiga-ui/core": ">=2.
|
|
20
|
-
"@taiga-ui/kit": ">=2.
|
|
18
|
+
"@taiga-ui/cdk": ">=2.85.0",
|
|
19
|
+
"@taiga-ui/core": ">=2.85.0",
|
|
20
|
+
"@taiga-ui/kit": ">=2.85.0",
|
|
21
21
|
"@tinkoff/ng-polymorpheus": ">=3.1.12 < 4",
|
|
22
22
|
"rxjs": ">=6.0.0"
|
|
23
23
|
},
|