@covalent/core 4.2.0 → 4.4.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/breadcrumbs/breadcrumbs.component.d.ts +1 -2
- package/esm2020/breadcrumbs/breadcrumbs.component.mjs +10 -9
- package/esm2020/layout/navigation-drawer/navigation-drawer.component.mjs +8 -6
- package/esm2020/loading/covalent-core-loading.mjs +5 -0
- package/esm2020/loading/directives/loading.directive.mjs +126 -0
- package/esm2020/loading/loading.component.mjs +187 -0
- package/esm2020/loading/loading.module.mjs +43 -0
- package/esm2020/loading/public_api.mjs +6 -0
- package/esm2020/loading/services/loading.factory.mjs +207 -0
- package/esm2020/loading/services/loading.service.mjs +213 -0
- package/fesm2015/covalent-core-breadcrumbs.mjs +9 -8
- package/fesm2015/covalent-core-breadcrumbs.mjs.map +1 -1
- package/fesm2015/covalent-core-common.mjs.map +1 -1
- package/fesm2015/covalent-core-dialogs.mjs.map +1 -1
- package/fesm2015/covalent-core-dynamic-menu.mjs.map +1 -1
- package/fesm2015/covalent-core-file.mjs.map +1 -1
- package/fesm2015/covalent-core-json-formatter.mjs.map +1 -1
- package/fesm2015/covalent-core-layout.mjs +7 -5
- package/fesm2015/covalent-core-layout.mjs.map +1 -1
- package/fesm2015/covalent-core-loading.mjs +768 -0
- package/fesm2015/covalent-core-loading.mjs.map +1 -0
- package/fesm2015/covalent-core-menu.mjs.map +1 -1
- package/fesm2015/covalent-core-message.mjs.map +1 -1
- package/fesm2015/covalent-core-search.mjs.map +1 -1
- package/fesm2015/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2015/covalent-core-user-profile.mjs.map +1 -1
- package/fesm2015/covalent-core.mjs.map +1 -1
- package/fesm2020/covalent-core-breadcrumbs.mjs +9 -8
- package/fesm2020/covalent-core-breadcrumbs.mjs.map +1 -1
- package/fesm2020/covalent-core-common.mjs.map +1 -1
- package/fesm2020/covalent-core-dialogs.mjs.map +1 -1
- package/fesm2020/covalent-core-dynamic-menu.mjs.map +1 -1
- package/fesm2020/covalent-core-file.mjs.map +1 -1
- package/fesm2020/covalent-core-json-formatter.mjs.map +1 -1
- package/fesm2020/covalent-core-layout.mjs +7 -5
- package/fesm2020/covalent-core-layout.mjs.map +1 -1
- package/fesm2020/covalent-core-loading.mjs +760 -0
- package/fesm2020/covalent-core-loading.mjs.map +1 -0
- package/fesm2020/covalent-core-menu.mjs.map +1 -1
- package/fesm2020/covalent-core-message.mjs.map +1 -1
- package/fesm2020/covalent-core-search.mjs.map +1 -1
- package/fesm2020/covalent-core-side-sheet.mjs.map +1 -1
- package/fesm2020/covalent-core-user-profile.mjs.map +1 -1
- package/fesm2020/covalent-core.mjs.map +1 -1
- package/layout/navigation-drawer/navigation-drawer.component.d.ts +1 -1
- package/loading/README.md +188 -0
- package/loading/_loading-theme.scss +11 -0
- package/loading/covalent-core-loading.d.ts +5 -0
- package/loading/directives/loading.directive.d.ts +70 -0
- package/loading/loading.component.d.ts +90 -0
- package/loading/loading.module.d.ts +13 -0
- package/loading/package.json +10 -0
- package/loading/public_api.d.ts +5 -0
- package/loading/services/loading.factory.d.ts +69 -0
- package/loading/services/loading.service.d.ts +118 -0
- package/package.json +10 -2
- package/side-sheet/README.md +3 -3
- package/theming/_all-theme.scss +2 -0
- package/theming/prebuilt/blue-grey-deep-orange.css +1 -1
- package/theming/prebuilt/blue-grey-deep-orange.css.map +1 -1
- package/theming/prebuilt/blue-orange.css +1 -1
- package/theming/prebuilt/blue-orange.css.map +1 -1
- package/theming/prebuilt/indigo-pink.css +1 -1
- package/theming/prebuilt/indigo-pink.css.map +1 -1
- package/theming/prebuilt/orange-light-blue.css +1 -1
- package/theming/prebuilt/orange-light-blue.css.map +1 -1
- package/theming/prebuilt/teal-orange.css +1 -1
- package/theming/prebuilt/teal-orange.css.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"covalent-core-user-profile.mjs","sources":["../../../../libs/angular/user-profile/src/user-profile-menu/user-profile-menu.component.ts","../../../../libs/angular/user-profile/src/user-profile-menu/user-profile-menu.component.html","../../../../libs/angular/user-profile/src/user-profile.component.ts","../../../../libs/angular/user-profile/src/user-profile.component.html","../../../../libs/angular/user-profile/src/user-profile.module.ts","../../../../libs/angular/user-profile/src/covalent-core-user-profile.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'td-user-profile-menu',\n templateUrl: './user-profile-menu.component.html',\n styleUrls: ['./user-profile-menu.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdUserProfileMenuComponent {\n @Input() email?: string;\n @Input() name?: string;\n\n _blockEvent(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","<td-menu class=\"user-profile-menu\">\n <!--header-->\n <mat-list td-menu-header>\n <mat-list-item *ngIf=\"name || email\" (click)=\"_blockEvent($event)\">\n <mat-icon matListAvatar>person</mat-icon>\n <span matLine *ngIf=\"name\" class=\"mat-body-1\">{{ name }}</span>\n <span matLine *ngIf=\"email\">{{ email }}</span>\n </mat-list-item>\n <ng-content select=\"[td-user-info-list]\"></ng-content>\n </mat-list>\n <!--content-->\n <mat-action-list>\n <ng-content select=\"[td-user-action-list]\"></ng-content>\n </mat-action-list>\n</td-menu>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'td-user-profile',\n templateUrl: './user-profile.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdUserProfileComponent {\n @Input() name?: string;\n @Input() email?: string;\n}\n","<button mat-icon-button [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon>person</mat-icon>\n</button>\n\n<mat-menu #accountMenu=\"matMenu\" [overlapTrigger]=\"false\">\n <td-user-profile-menu [name]=\"name\" [email]=\"email\">\n <ng-content select=\"[td-user-info-list]\" td-user-info-list></ng-content>\n <ng-content select=\"[td-user-action-list]\" td-user-action-list></ng-content>\n </td-user-profile-menu>\n</mat-menu>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatListModule } from '@angular/material/list';\n\nimport { TdUserProfileMenuComponent } from './user-profile-menu/user-profile-menu.component';\nimport { TdUserProfileComponent } from './user-profile.component';\nimport { CovalentMenuModule } from '@covalent/core/menu';\n\n@NgModule({\n declarations: [TdUserProfileComponent, TdUserProfileMenuComponent],\n imports: [\n CommonModule,\n MatMenuModule,\n MatIconModule,\n MatButtonModule,\n MatListModule,\n CovalentMenuModule,\n ],\n providers: [],\n exports: [TdUserProfileComponent, TdUserProfileMenuComponent],\n})\nexport class CovalentUserProfileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAQa,0BAA0B;
|
1
|
+
{"version":3,"file":"covalent-core-user-profile.mjs","sources":["../../../../libs/angular/user-profile/src/user-profile-menu/user-profile-menu.component.ts","../../../../libs/angular/user-profile/src/user-profile-menu/user-profile-menu.component.html","../../../../libs/angular/user-profile/src/user-profile.component.ts","../../../../libs/angular/user-profile/src/user-profile.component.html","../../../../libs/angular/user-profile/src/user-profile.module.ts","../../../../libs/angular/user-profile/src/covalent-core-user-profile.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'td-user-profile-menu',\n templateUrl: './user-profile-menu.component.html',\n styleUrls: ['./user-profile-menu.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdUserProfileMenuComponent {\n @Input() email?: string;\n @Input() name?: string;\n\n _blockEvent(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","<td-menu class=\"user-profile-menu\">\n <!--header-->\n <mat-list td-menu-header>\n <mat-list-item *ngIf=\"name || email\" (click)=\"_blockEvent($event)\">\n <mat-icon matListAvatar>person</mat-icon>\n <span matLine *ngIf=\"name\" class=\"mat-body-1\">{{ name }}</span>\n <span matLine *ngIf=\"email\">{{ email }}</span>\n </mat-list-item>\n <ng-content select=\"[td-user-info-list]\"></ng-content>\n </mat-list>\n <!--content-->\n <mat-action-list>\n <ng-content select=\"[td-user-action-list]\"></ng-content>\n </mat-action-list>\n</td-menu>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'td-user-profile',\n templateUrl: './user-profile.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TdUserProfileComponent {\n @Input() name?: string;\n @Input() email?: string;\n}\n","<button mat-icon-button [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon>person</mat-icon>\n</button>\n\n<mat-menu #accountMenu=\"matMenu\" [overlapTrigger]=\"false\">\n <td-user-profile-menu [name]=\"name\" [email]=\"email\">\n <ng-content select=\"[td-user-info-list]\" td-user-info-list></ng-content>\n <ng-content select=\"[td-user-action-list]\" td-user-action-list></ng-content>\n </td-user-profile-menu>\n</mat-menu>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatListModule } from '@angular/material/list';\n\nimport { TdUserProfileMenuComponent } from './user-profile-menu/user-profile-menu.component';\nimport { TdUserProfileComponent } from './user-profile.component';\nimport { CovalentMenuModule } from '@covalent/core/menu';\n\n@NgModule({\n declarations: [TdUserProfileComponent, TdUserProfileMenuComponent],\n imports: [\n CommonModule,\n MatMenuModule,\n MatIconModule,\n MatButtonModule,\n MatListModule,\n CovalentMenuModule,\n ],\n providers: [],\n exports: [TdUserProfileComponent, TdUserProfileMenuComponent],\n})\nexport class CovalentUserProfileModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3","i4.TdUserProfileMenuComponent"],"mappings":";;;;;;;;;;;;;;;;MAQa,0BAA0B,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AA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,aAAa;wBACb,kBAAkB;AACnB,qBAAA;AACD,oBAAA,SAAS,EAAE,EAAE;AACb,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC9D,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"covalent-core.mjs","sources":["../../../../libs/angular/covalent-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;;"}
|
1
|
+
{"version":3,"file":"covalent-core.mjs","sources":["../../../../libs/angular/covalent-core.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;;AAEG"}
|
@@ -16,9 +16,9 @@ export declare class TdNavigationDrawerComponent implements OnInit, OnDestroy {
|
|
16
16
|
private _layout;
|
17
17
|
private _router;
|
18
18
|
private _sanitize;
|
19
|
-
private _closeSubscription?;
|
20
19
|
private _menuToggled;
|
21
20
|
private _backgroundImage;
|
21
|
+
private _destroy$;
|
22
22
|
get menuToggled(): boolean;
|
23
23
|
_drawerMenu: QueryList<TdNavigationDrawerMenuDirective>;
|
24
24
|
_toolbar: QueryList<TdNavigationDrawerToolbarDirective>;
|
@@ -0,0 +1,188 @@
|
|
1
|
+
# tdLoading
|
2
|
+
|
3
|
+
Simply add the `tdLoading` attribute with a [name] value to the element you want to mask.
|
4
|
+
|
5
|
+
Dont forget to add the asterisk syntax before the `tdLoading` directive if its not used in a `<ng-template>` element. More ingo on the asterisk (\*) syntax [here](https://angular.io/guide/structural-directives#asterisk)
|
6
|
+
|
7
|
+
## API Summary
|
8
|
+
|
9
|
+
#### Inputs
|
10
|
+
|
11
|
+
- tdLoading: string
|
12
|
+
- Name reference of the loading mask, used to register/resolve requests to the mask.
|
13
|
+
- tdLoadingType?: LoadingType or ["linear" | "circular"]
|
14
|
+
- Sets the type of loading mask depending on value.
|
15
|
+
- Defaults to [LoadingType.Circular | "circular"]
|
16
|
+
- tdLoadingMode?: LoadingMode or ["determinate" | "indeterminate"]
|
17
|
+
- Sets the mode of loading mask depending on value.
|
18
|
+
- Defaults to [LoadingMode.Indeterminate | "indeterminate"].
|
19
|
+
- tdLoadingStrategy?: LoadingStrategy or ["replace" | "overlay"]
|
20
|
+
- Sets the strategy of loading mask depending on value.
|
21
|
+
- Defaults to [LoadingMode.Replace | "replace"]
|
22
|
+
- tdLoadingColor?: "primary" | "accent" | "warn"
|
23
|
+
- Sets the theme color of the loading component.
|
24
|
+
- Defaults to "primary"
|
25
|
+
- tdLoadingUntil?: any
|
26
|
+
- If its null, undefined or false it will be used to register requests to the mask.
|
27
|
+
- Else if its any value that can be resolved as true, it will resolve the mask.
|
28
|
+
- [name] is optional when using [until], but can still be used to register/resolve it manually.
|
29
|
+
|
30
|
+
# tdLoadingService
|
31
|
+
|
32
|
+
This service is designed to be a factory of loading masks and serves as a facade for their usage.
|
33
|
+
|
34
|
+
Simply add this service as a provider to be able to use it in a component.
|
35
|
+
|
36
|
+
TdLoadingService.create() method receives as parameter an object that implements the [ITdLoadingConfig] interface.
|
37
|
+
|
38
|
+
```typescript
|
39
|
+
interface ITdLoadingConfig {
|
40
|
+
name: string;
|
41
|
+
type?: LoadingType;
|
42
|
+
mode?: LoadingMode;
|
43
|
+
color?: 'primary' | 'accent' | 'warn';
|
44
|
+
}
|
45
|
+
```
|
46
|
+
|
47
|
+
## API Summary
|
48
|
+
|
49
|
+
#### Methods
|
50
|
+
|
51
|
+
- register: function(name?: string, registers: number = 1)
|
52
|
+
- Registers a request for the loading mask referenced by the name parameter.
|
53
|
+
- Can optionally pass registers argument to set a number of register calls.
|
54
|
+
- If no paramemeters are used, then default main mask will be used
|
55
|
+
- resolve: function(name?: string, resolves: number = 1)
|
56
|
+
- Resolves a request for the loading mask referenced by the name parameter.
|
57
|
+
- Can optionally pass resolves argument to set a number of resolve calls.
|
58
|
+
- If no paramemeters are used, then default main mask will be used.
|
59
|
+
- resolveAll: function(name?: string)
|
60
|
+
- Resolves all requests for the loading mask referenced by the name parameter.
|
61
|
+
- If no paramemeters are used, then default main mask will be used.
|
62
|
+
- setValue: function(name: string, value: number)
|
63
|
+
- Set value on a loading mask referenced by the name parameter.
|
64
|
+
- Usage only available if its mode is 'determinate'.
|
65
|
+
- create: function(options: ITdLoadingConfig
|
66
|
+
- Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
|
67
|
+
- Only displayed when the mask has a request registered on it.
|
68
|
+
|
69
|
+
## Setup
|
70
|
+
|
71
|
+
Import the [CovalentLoadingModule] in your NgModule:
|
72
|
+
|
73
|
+
```typescript
|
74
|
+
import { CovalentLoadingModule } from '@covalent/core/loading';
|
75
|
+
@NgModule({
|
76
|
+
imports: [
|
77
|
+
CovalentLoadingModule,
|
78
|
+
...
|
79
|
+
],
|
80
|
+
...
|
81
|
+
})
|
82
|
+
export class MyModule {}
|
83
|
+
```
|
84
|
+
|
85
|
+
## Usage
|
86
|
+
|
87
|
+
Example for (\*) syntax:
|
88
|
+
|
89
|
+
```html
|
90
|
+
<div
|
91
|
+
*tdLoading="'stringName'; type:'circular'; mode:'indeterminate'; strategy:'replace'; color:'primary'"
|
92
|
+
>
|
93
|
+
...
|
94
|
+
</div>
|
95
|
+
```
|
96
|
+
|
97
|
+
```typescript
|
98
|
+
import { TdLoadingService } from '@covalent/core/loading';
|
99
|
+
...
|
100
|
+
})
|
101
|
+
export class Demo {
|
102
|
+
constructor(private _loadingService: TdLoadingService) {
|
103
|
+
...
|
104
|
+
}
|
105
|
+
|
106
|
+
registerLoading(): void {
|
107
|
+
this._loadingService.register('stringName');
|
108
|
+
}
|
109
|
+
|
110
|
+
resolveLoading(): void {
|
111
|
+
this._loadingService.resolve('stringName');
|
112
|
+
}
|
113
|
+
}
|
114
|
+
```
|
115
|
+
|
116
|
+
Exmaple for (\*) until async syntax:
|
117
|
+
|
118
|
+
```html
|
119
|
+
<div
|
120
|
+
*tdLoading="let item until observable | async; type:'circular'; color:'primary'"
|
121
|
+
>
|
122
|
+
{{item}}
|
123
|
+
</div>
|
124
|
+
```
|
125
|
+
|
126
|
+
Example for `<ng-template>` syntax:
|
127
|
+
|
128
|
+
```html
|
129
|
+
<ng-template
|
130
|
+
tdLoading="stringName"
|
131
|
+
tdLoadingType="circular"
|
132
|
+
tdLoadingMode="indeterminate"
|
133
|
+
tdLoadingStrategy="replace"
|
134
|
+
tdLoadingColor="primary"
|
135
|
+
>
|
136
|
+
...
|
137
|
+
</ng-template>
|
138
|
+
```
|
139
|
+
|
140
|
+
```typescript
|
141
|
+
import { TdLoadingService } from '@covalent/core/loading';
|
142
|
+
...
|
143
|
+
})
|
144
|
+
export class Demo {
|
145
|
+
constructor(private _loadingService: TdLoadingService) {
|
146
|
+
...
|
147
|
+
}
|
148
|
+
|
149
|
+
registerLoading(): void {
|
150
|
+
this._loadingService.register('stringName');
|
151
|
+
}
|
152
|
+
|
153
|
+
resolveLoading(): void {
|
154
|
+
this._loadingService.resolve('stringName');
|
155
|
+
}
|
156
|
+
}
|
157
|
+
```
|
158
|
+
|
159
|
+
Example for `<ng-template>` until syntax:
|
160
|
+
|
161
|
+
```html
|
162
|
+
<ng-template tdLoading [tdLoadingUntil]="boolean"> ... </ng-template>
|
163
|
+
```
|
164
|
+
|
165
|
+
Example creating a global mask with the `tdLoadingService`:
|
166
|
+
|
167
|
+
```typescript
|
168
|
+
import { TdLoadingService, LoadingType, LoadingMode } from '@covalent/core/loading';
|
169
|
+
...
|
170
|
+
export class Demo {
|
171
|
+
constructor(private _loadingService: TdLoadingService) {
|
172
|
+
this._loadingService.create({
|
173
|
+
name: 'stringName',
|
174
|
+
type: LoadingType.Circular,
|
175
|
+
mode: LoadingMode.Indeterminate,
|
176
|
+
color: 'accent',
|
177
|
+
});
|
178
|
+
}
|
179
|
+
|
180
|
+
registerLoading(): void {
|
181
|
+
this._loadingService.register('stringName');
|
182
|
+
}
|
183
|
+
|
184
|
+
resolveLoading(): void {
|
185
|
+
this._loadingService.resolve('stringName'); // or this._loadingService.resolveAll('stringName');
|
186
|
+
}
|
187
|
+
}
|
188
|
+
```
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
2
|
+
import { ViewContainerRef, TemplateRef } from '@angular/core';
|
3
|
+
import { LoadingType, LoadingMode, LoadingStrategy } from '../loading.component';
|
4
|
+
import { TdLoadingService } from '../services/loading.service';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
/**
|
7
|
+
* Context class for variable reference
|
8
|
+
*/
|
9
|
+
export declare class TdLoadingContext {
|
10
|
+
$implicit: any;
|
11
|
+
tdLoading: any;
|
12
|
+
}
|
13
|
+
export declare class TdLoadingDirective implements OnInit, OnDestroy {
|
14
|
+
private _viewContainerRef;
|
15
|
+
private _templateRef;
|
16
|
+
private _loadingService;
|
17
|
+
private _context;
|
18
|
+
private _loadingRef?;
|
19
|
+
/**
|
20
|
+
* tdLoading: string
|
21
|
+
* Name reference of the loading mask, used to register/resolve requests to the mask.
|
22
|
+
*/
|
23
|
+
name: string;
|
24
|
+
/**
|
25
|
+
* tdLoadingUntil?: any
|
26
|
+
* If its null, undefined or false it will be used to register requests to the mask.
|
27
|
+
* Else if its any value that can be resolved as true, it will resolve the mask.
|
28
|
+
* [name] is optional when using [until], but can still be used to register/resolve it manually.
|
29
|
+
*/
|
30
|
+
set until(until: any);
|
31
|
+
/**
|
32
|
+
* tdLoadingType?: LoadingType or ['linear' | 'circular']
|
33
|
+
* Sets the type of loading mask depending on value.
|
34
|
+
* Defaults to [LoadingType.Circular | 'circular'].
|
35
|
+
*/
|
36
|
+
type: LoadingType;
|
37
|
+
/**
|
38
|
+
* tdLoadingMode?: LoadingMode or ['determinate' | 'indeterminate']
|
39
|
+
* Sets the mode of loading mask depending on value.
|
40
|
+
* Defaults to [LoadingMode.Indeterminate | 'indeterminate'].
|
41
|
+
*/
|
42
|
+
mode: LoadingMode;
|
43
|
+
/**
|
44
|
+
* tdLoadingStrategy?: LoadingStrategy or ['replace' | 'overlay']
|
45
|
+
* Sets the strategy of loading mask depending on value.
|
46
|
+
* Defaults to [LoadingMode.Replace | 'replace'].
|
47
|
+
*/
|
48
|
+
strategy: LoadingStrategy.Overlay | LoadingStrategy.Replace;
|
49
|
+
/**
|
50
|
+
* tdLoadingColor?: "primary" | "accent" | "warn"
|
51
|
+
* Sets the theme color of the loading component. Defaults to "primary"
|
52
|
+
*/
|
53
|
+
color: 'primary' | 'accent' | 'warn';
|
54
|
+
constructor(_viewContainerRef: ViewContainerRef, _templateRef: TemplateRef<TdLoadingContext>, _loadingService: TdLoadingService);
|
55
|
+
/**
|
56
|
+
* Registers component in the DOM, so it will be available when calling resolve/register.
|
57
|
+
*/
|
58
|
+
ngOnInit(): void;
|
59
|
+
/**
|
60
|
+
* Remove component when directive is destroyed.
|
61
|
+
*/
|
62
|
+
ngOnDestroy(): void;
|
63
|
+
/**
|
64
|
+
* Creates [TdLoadingComponent] and attaches it to this directive's [ViewContainerRef].
|
65
|
+
* Passes this directive's [TemplateRef] to modify DOM depending on loading `strategy`.
|
66
|
+
*/
|
67
|
+
private _registerComponent;
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdLoadingDirective, never>;
|
69
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TdLoadingDirective, "[tdLoading]", never, { "name": "tdLoading"; "until": "tdLoadingUntil"; "type": "tdLoadingType"; "mode": "tdLoadingMode"; "strategy": "tdLoadingStrategy"; "color": "tdLoadingColor"; }, {}, never>;
|
70
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, DoCheck } from '@angular/core';
|
2
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare enum LoadingType {
|
5
|
+
Circular = "circular",
|
6
|
+
Linear = "linear"
|
7
|
+
}
|
8
|
+
export declare enum LoadingMode {
|
9
|
+
Determinate = "determinate",
|
10
|
+
Indeterminate = "indeterminate"
|
11
|
+
}
|
12
|
+
export declare enum LoadingStrategy {
|
13
|
+
Overlay = "overlay",
|
14
|
+
Replace = "replace"
|
15
|
+
}
|
16
|
+
export declare enum LoadingStyle {
|
17
|
+
FullScreen = "fullscreen",
|
18
|
+
Overlay = "overlay",
|
19
|
+
None = "none"
|
20
|
+
}
|
21
|
+
export declare const TD_CIRCLE_DIAMETER = 40;
|
22
|
+
export declare class TdLoadingComponent implements DoCheck {
|
23
|
+
private _elementRef;
|
24
|
+
private _changeDetectorRef;
|
25
|
+
private _mode;
|
26
|
+
private _defaultMode;
|
27
|
+
private _value;
|
28
|
+
private _circleDiameter;
|
29
|
+
/**
|
30
|
+
* Flag for animation
|
31
|
+
*/
|
32
|
+
animation: boolean;
|
33
|
+
/**
|
34
|
+
* Content injected into loading component.
|
35
|
+
*/
|
36
|
+
content: TemplatePortal<any>;
|
37
|
+
/**
|
38
|
+
* Sets mode of [TdLoadingComponent] to LoadingMode.Determinate or LoadingMode.Indeterminate
|
39
|
+
*/
|
40
|
+
set mode(mode: LoadingMode);
|
41
|
+
get mode(): LoadingMode;
|
42
|
+
/**
|
43
|
+
* Sets value of [TdLoadingComponent] if mode is 'LoadingMode.Determinate'
|
44
|
+
*/
|
45
|
+
set value(value: number);
|
46
|
+
get value(): number;
|
47
|
+
style: LoadingStyle;
|
48
|
+
/**
|
49
|
+
* height: number
|
50
|
+
* Sets height of [TdLoadingComponent].
|
51
|
+
*/
|
52
|
+
height: number;
|
53
|
+
/**
|
54
|
+
* type: LoadingType
|
55
|
+
* Sets type of [TdLoadingComponent] rendered.
|
56
|
+
*/
|
57
|
+
type: LoadingType;
|
58
|
+
/**
|
59
|
+
* color: primary' | 'accent' | 'warn'
|
60
|
+
* Sets theme color of [TdLoadingComponent] rendered.
|
61
|
+
*/
|
62
|
+
color: 'primary' | 'accent' | 'warn';
|
63
|
+
constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef);
|
64
|
+
ngDoCheck(): void;
|
65
|
+
getHeight(): string | undefined;
|
66
|
+
getCircleDiameter(): number;
|
67
|
+
getCircleStrokeWidth(): number;
|
68
|
+
isCircular(): boolean;
|
69
|
+
isLinear(): boolean;
|
70
|
+
isFullScreen(): boolean;
|
71
|
+
isOverlay(): boolean;
|
72
|
+
/**
|
73
|
+
* Starts in animation and returns an observable for completition event.
|
74
|
+
*/
|
75
|
+
show(): void;
|
76
|
+
/**
|
77
|
+
* Starts out animation and returns an observable for completition event.
|
78
|
+
*/
|
79
|
+
hide(): void;
|
80
|
+
/**
|
81
|
+
* Calculate the proper diameter for the circle and set it
|
82
|
+
*/
|
83
|
+
private _setCircleDiameter;
|
84
|
+
/**
|
85
|
+
* Returns the host height of the loading component
|
86
|
+
*/
|
87
|
+
private _hostHeight;
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdLoadingComponent, never>;
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TdLoadingComponent, "td-loading", never, {}, {}, never, never>;
|
90
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./loading.component";
|
3
|
+
import * as i2 from "./directives/loading.directive";
|
4
|
+
import * as i3 from "@angular/common";
|
5
|
+
import * as i4 from "@angular/material/progress-bar";
|
6
|
+
import * as i5 from "@angular/material/progress-spinner";
|
7
|
+
import * as i6 from "@angular/cdk/overlay";
|
8
|
+
import * as i7 from "@angular/cdk/portal";
|
9
|
+
export declare class CovalentLoadingModule {
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CovalentLoadingModule, never>;
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentLoadingModule, [typeof i1.TdLoadingComponent, typeof i2.TdLoadingDirective], [typeof i3.CommonModule, typeof i4.MatProgressBarModule, typeof i5.MatProgressSpinnerModule, typeof i6.OverlayModule, typeof i7.PortalModule], [typeof i1.TdLoadingComponent, typeof i2.TdLoadingDirective]>;
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CovalentLoadingModule>;
|
13
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"module": "../fesm2015/covalent-core-loading.mjs",
|
3
|
+
"es2020": "../fesm2020/covalent-core-loading.mjs",
|
4
|
+
"esm2020": "../esm2020/loading/covalent-core-loading.mjs",
|
5
|
+
"fesm2020": "../fesm2020/covalent-core-loading.mjs",
|
6
|
+
"fesm2015": "../fesm2015/covalent-core-loading.mjs",
|
7
|
+
"typings": "covalent-core-loading.d.ts",
|
8
|
+
"sideEffects": false,
|
9
|
+
"name": "@covalent/core/loading"
|
10
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { ComponentFactoryResolver, Provider } from '@angular/core';
|
2
|
+
import { Injector, ComponentRef, ViewContainerRef, TemplateRef } from '@angular/core';
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
5
|
+
import { TdLoadingContext } from '../directives/loading.directive';
|
6
|
+
import { LoadingStyle } from '../loading.component';
|
7
|
+
import { ITdLoadingConfig } from './loading.service';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
export interface IInternalLoadingOptions extends ITdLoadingConfig {
|
10
|
+
height?: number;
|
11
|
+
style?: LoadingStyle;
|
12
|
+
}
|
13
|
+
export interface ILoadingRef {
|
14
|
+
observable: Observable<any>;
|
15
|
+
componentRef?: ComponentRef<any>;
|
16
|
+
subject: Subject<any>;
|
17
|
+
times: number;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* NOTE: @internal usage only.
|
21
|
+
*/
|
22
|
+
export declare class TdLoadingFactory {
|
23
|
+
private _componentFactoryResolver;
|
24
|
+
private _overlay;
|
25
|
+
private _injector;
|
26
|
+
constructor(_componentFactoryResolver: ComponentFactoryResolver, _overlay: Overlay, _injector: Injector);
|
27
|
+
/**
|
28
|
+
* Uses material `Overlay` services to create a DOM element and attach the loading component
|
29
|
+
* into it. Leveraging the state and configuration from it.
|
30
|
+
*
|
31
|
+
* Saves a reference in context to be called when registering/resolving the loading element.
|
32
|
+
*/
|
33
|
+
createFullScreenComponent(options: ITdLoadingConfig): ILoadingRef;
|
34
|
+
/**
|
35
|
+
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
36
|
+
* Leverages TemplatePortals from material to inject the template inside of it so it fits
|
37
|
+
* perfectly when overlaying it.
|
38
|
+
*
|
39
|
+
* Saves a reference in context to be called when registering/resolving the loading element.
|
40
|
+
*/
|
41
|
+
createOverlayComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef, templateRef: TemplateRef<object>): ILoadingRef;
|
42
|
+
/**
|
43
|
+
* Creates a loading component dynamically and attaches it into the given viewContainerRef.
|
44
|
+
* Replaces the template with the loading component depending if it was registered or resolved.
|
45
|
+
*
|
46
|
+
* Saves a reference in context to be called when registering/resolving the loading element.
|
47
|
+
*/
|
48
|
+
createReplaceComponent(options: ITdLoadingConfig, viewContainerRef: ViewContainerRef, templateRef: TemplateRef<object>, context: TdLoadingContext): ILoadingRef;
|
49
|
+
/**
|
50
|
+
* Creates a fullscreen overlay for the loading usage.
|
51
|
+
*/
|
52
|
+
private _createOverlay;
|
53
|
+
/**
|
54
|
+
* Creates a generic component dynamically waiting to be attached to a viewContainerRef.
|
55
|
+
*/
|
56
|
+
private _createComponent;
|
57
|
+
/**
|
58
|
+
* Initialize context for loading component.
|
59
|
+
*/
|
60
|
+
private _initializeContext;
|
61
|
+
/**
|
62
|
+
* Maps configuration to the loading component instance.
|
63
|
+
*/
|
64
|
+
private _mapOptions;
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdLoadingFactory, never>;
|
66
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TdLoadingFactory>;
|
67
|
+
}
|
68
|
+
export declare function LOADING_FACTORY_PROVIDER_FACTORY(parent: TdLoadingFactory, componentFactoryResolver: ComponentFactoryResolver, overlay: Overlay, injector: Injector): TdLoadingFactory;
|
69
|
+
export declare const LOADING_FACTORY_PROVIDER: Provider;
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import { Provider } from '@angular/core';
|
2
|
+
import { ViewContainerRef, TemplateRef } from '@angular/core';
|
3
|
+
import { TdLoadingContext } from '../directives/loading.directive';
|
4
|
+
import { LoadingMode, LoadingStrategy, LoadingType } from '../loading.component';
|
5
|
+
import { TdLoadingFactory, ILoadingRef } from './loading.factory';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export interface ITdLoadingConfig {
|
8
|
+
name: string;
|
9
|
+
type?: LoadingType;
|
10
|
+
mode?: LoadingMode;
|
11
|
+
color?: 'primary' | 'accent' | 'warn';
|
12
|
+
}
|
13
|
+
export declare class TdLoadingConfig implements ITdLoadingConfig {
|
14
|
+
name: string;
|
15
|
+
type?: LoadingType;
|
16
|
+
mode?: LoadingMode;
|
17
|
+
color?: 'primary' | 'accent' | 'warn';
|
18
|
+
constructor(config: ITdLoadingConfig);
|
19
|
+
}
|
20
|
+
export interface ITdLoadingDirectiveConfig extends ITdLoadingConfig {
|
21
|
+
strategy?: LoadingStrategy;
|
22
|
+
}
|
23
|
+
export declare class TdLoadingDirectiveConfig extends TdLoadingConfig implements ITdLoadingDirectiveConfig {
|
24
|
+
strategy: LoadingStrategy;
|
25
|
+
constructor(config: ITdLoadingDirectiveConfig);
|
26
|
+
}
|
27
|
+
export declare class TdLoadingService {
|
28
|
+
private _loadingFactory;
|
29
|
+
private _context;
|
30
|
+
private _timeouts;
|
31
|
+
constructor(_loadingFactory: TdLoadingFactory);
|
32
|
+
/**
|
33
|
+
* params:
|
34
|
+
* - config: ILoadingDirectiveConfig
|
35
|
+
* - viewContainerRef: ViewContainerRef
|
36
|
+
* - templateRef: TemplateRef<Object>
|
37
|
+
*
|
38
|
+
* Creates an replace loading mask and attaches it to the viewContainerRef.
|
39
|
+
* Replaces the templateRef with the mask when a request is registered on it.
|
40
|
+
*
|
41
|
+
* NOTE: @internal usage only.
|
42
|
+
*/
|
43
|
+
createComponent(config: ITdLoadingDirectiveConfig, viewContainerRef: ViewContainerRef, templateRef: TemplateRef<object>, context: TdLoadingContext): ILoadingRef;
|
44
|
+
/**
|
45
|
+
* params:
|
46
|
+
* - config: ITdLoadingConfig
|
47
|
+
*
|
48
|
+
* Creates a fullscreen loading mask and attaches it to the DOM with the given configuration.
|
49
|
+
* Only displayed when the mask has a request registered on it.
|
50
|
+
*/
|
51
|
+
create(config: ITdLoadingConfig): void;
|
52
|
+
/**
|
53
|
+
* params:
|
54
|
+
* - name: string
|
55
|
+
*
|
56
|
+
* Removes `loading` component from service context.
|
57
|
+
*/
|
58
|
+
removeComponent(name: string): void;
|
59
|
+
/**
|
60
|
+
* params:
|
61
|
+
* - name: string
|
62
|
+
* - registers?: number
|
63
|
+
* returns: true if successful
|
64
|
+
*
|
65
|
+
* Resolves a request for the loading mask referenced by the name parameter.
|
66
|
+
* Can optionally pass registers argument to set a number of register calls.
|
67
|
+
*
|
68
|
+
* If no paramemeters are used, then default main mask will be used.
|
69
|
+
*
|
70
|
+
* e.g. loadingService.register()
|
71
|
+
*/
|
72
|
+
register(name?: string, registers?: number): boolean;
|
73
|
+
/**
|
74
|
+
* params:
|
75
|
+
* - name: string
|
76
|
+
* - resolves?: number
|
77
|
+
* returns: true if successful
|
78
|
+
*
|
79
|
+
* Resolves a request for the loading mask referenced by the name parameter.
|
80
|
+
* Can optionally pass resolves argument to set a number of resolve calls.
|
81
|
+
*
|
82
|
+
* If no paramemeters are used, then default main mask will be used.
|
83
|
+
*
|
84
|
+
* e.g. loadingService.resolve()
|
85
|
+
*/
|
86
|
+
resolve(name?: string, resolves?: number): boolean;
|
87
|
+
/**
|
88
|
+
* params:
|
89
|
+
* - name: string
|
90
|
+
* returns: true if successful
|
91
|
+
*
|
92
|
+
* Resolves all request for the loading mask referenced by the name parameter.
|
93
|
+
*
|
94
|
+
* If no paramemeters are used, then default main mask will be used.
|
95
|
+
*
|
96
|
+
* e.g. loadingService.resolveAll()
|
97
|
+
*/
|
98
|
+
resolveAll(name?: string): boolean;
|
99
|
+
/**
|
100
|
+
* params:
|
101
|
+
* - name: string
|
102
|
+
* - value: number
|
103
|
+
* returns: true if successful
|
104
|
+
*
|
105
|
+
* Set value on a loading mask referenced by the name parameter.
|
106
|
+
* Usage only available if its mode is 'determinate' and if loading is showing.
|
107
|
+
*/
|
108
|
+
setValue(name: string, value: number): boolean;
|
109
|
+
/**
|
110
|
+
* Clears timeout linked to the name.
|
111
|
+
* @param name Name of the loading component to be cleared
|
112
|
+
*/
|
113
|
+
private _clearTimeout;
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TdLoadingService, never>;
|
115
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TdLoadingService>;
|
116
|
+
}
|
117
|
+
export declare function LOADING_PROVIDER_FACTORY(parent: TdLoadingService, loadingFactory: TdLoadingFactory): TdLoadingService;
|
118
|
+
export declare const LOADING_PROVIDER: Provider;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@covalent/core",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.4.0",
|
4
4
|
"exports": {
|
5
5
|
".": {
|
6
6
|
"sass": "./theming/_all-theme.scss",
|
@@ -70,6 +70,14 @@
|
|
70
70
|
"node": "./fesm2015/covalent-core-layout.mjs",
|
71
71
|
"default": "./fesm2020/covalent-core-layout.mjs"
|
72
72
|
},
|
73
|
+
"./loading": {
|
74
|
+
"types": "./loading/covalent-core-loading.d.ts",
|
75
|
+
"esm2020": "./esm2020/loading/covalent-core-loading.mjs",
|
76
|
+
"es2020": "./fesm2020/covalent-core-loading.mjs",
|
77
|
+
"es2015": "./fesm2015/covalent-core-loading.mjs",
|
78
|
+
"node": "./fesm2015/covalent-core-loading.mjs",
|
79
|
+
"default": "./fesm2020/covalent-core-loading.mjs"
|
80
|
+
},
|
73
81
|
"./menu": {
|
74
82
|
"types": "./menu/covalent-core-menu.d.ts",
|
75
83
|
"esm2020": "./esm2020/menu/covalent-core-menu.mjs",
|
@@ -127,7 +135,7 @@
|
|
127
135
|
"@angular/router": "^13.2.0",
|
128
136
|
"@angular/cdk": "^13.2.1",
|
129
137
|
"@angular/material": "^13.2.1",
|
130
|
-
"@covalent/core": "4.
|
138
|
+
"@covalent/core": "4.4.0",
|
131
139
|
"@angular/platform-browser": "^13.2.0",
|
132
140
|
"rxjs": "^7.4.0",
|
133
141
|
"@angular/animations": "^13.2.0",
|