Skip to content

Commit ed13036

Browse files
committed
Deprecated NGX_POSITIONS, SPINNER_TYPES, PB_DIRECTIONS
1 parent a54e11b commit ed13036

File tree

11 files changed

+133
-73
lines changed

11 files changed

+133
-73
lines changed

README.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ See [API - NgxUiLoaderService](#api_ngxuiloaderservice) for more details.
183183

184184
You can configure `ngx-ui-loader` in the template as below:
185185

186-
Import the constant `SPINNER_TYPES` from `ngx-ui-loader` in your controller. Then in your template:
186+
Import the constant `SPINNER` from `ngx-ui-loader` in your controller. Then in your template:
187187

188188
```html
189-
<ngx-ui-loader fgsSize="75" [fgsType]="SPINNER_TYPES.wanderingCubes"></ngx-ui-loader>
189+
<ngx-ui-loader fgsSize="75" [fgsType]="SPINNER.wanderingCubes"></ngx-ui-loader>
190190
```
191191

192192
All attributes are listed below:
@@ -195,26 +195,26 @@ All attributes are listed below:
195195
| ---------------- | --------- | -------- | ------------------ | ----------------------------------------------------------------------------------------------- |
196196
| `bgsColor` | *string* | optional | `#00ACC1` | Background spinner color |
197197
| `bgsOpacity` | *number* | optional | `0.5` | Background spinner opacity |
198-
| `bgsPosition` | *string* | optional | `bottom-right` | Background spinner postion. All available positions can be accessed via `NGX_POSITIONS` |
198+
| `bgsPosition` | *string* | optional | `bottom-right` | Background spinner postion. All available positions can be accessed via `POSITION` |
199199
| `bgsSize` | *number* | optional | `60` | Background spinner size. |
200-
| `bgsType` | *string* | optional | `rectangle-bounce` | Background spinner type. All available types can be accessed via `SPINNER_TYPES` |
200+
| `bgsType` | *string* | optional | `rectangle-bounce` | Background spinner type. All available types can be accessed via `SPINNER` |
201201
| | | | | |
202202
| `fgsColor` | *string* | optional | `#00ACC1` | Foreground spinner color |
203-
| `fgsPosition` | *string* | optional | `center-center` | Foreground spinner position. All available positions can be accessed via `NGX_POSITIONS` |
203+
| `fgsPosition` | *string* | optional | `center-center` | Foreground spinner position. All available positions can be accessed via `POSITION` |
204204
| `fgsSize` | *number* | optional | `60` | Foreground spinner size. |
205-
| `fgsType` | *string* | optional | `rectangle-bounce` | Foreground spinner type. All available types can be accessed via `SPINNER_TYPES` |
205+
| `fgsType` | *string* | optional | `rectangle-bounce` | Foreground spinner type. All available types can be accessed via `SPINNER` |
206206
| | | | | |
207-
| `logoPosition` | *string* | optional | `center-center` | Logo position. All available positions can be accessed via `NGX_POSITIONS` |
207+
| `logoPosition` | *string* | optional | `center-center` | Logo position. All available positions can be accessed via `POSITION` |
208208
| `logoSize` | *number* | optional | `120` | Logo size (px) |
209209
| `logoUrl` | *string* | optional | (*empty string*) | Logo url |
210210
| | | | | |
211211
| `pbColor` | *string* | optional | `#00ACC1` | Progress bar color |
212-
| `pbDirection` | *string* | optional | `ltr` | Progress bar direction. All directions type can be accessed via `PB_DIRECTIONS` |
212+
| `pbDirection` | *string* | optional | `ltr` | Progress bar direction. All directions type can be accessed via `PB_DIRECTION` |
213213
| `pbThickness` | *number* | optional | `5` | Progress bar thickness |
214214
| | | | | |
215215
| `text` | *string* | optional | (*empty string*) | Loading text |
216216
| `textColor` | *string* | optional | `#FFFFFF` | Loading text color |
217-
| `textPosition` | *string* | optional | `center-center` | Loading text position. All available positions can be accessed via `NGX_POSITIONS` |
217+
| `textPosition` | *string* | optional | `center-center` | Loading text position. All available positions can be accessed via `POSITION` |
218218
| | | | | |
219219
| `gap` | *number* | optional | `24` | The gap between logo, foreground spinner and text when their positions are `center-center` |
220220
| `overlayColor` | *string* | optional | `rgba(40,40,40,.8)`| Overlay background color |
@@ -262,14 +262,14 @@ import { NgModule } from '@angular/core';
262262

263263
import { AppComponent } from './app.component';
264264

265-
import { NgxUiLoaderModule, NgxUiLoaderConfig, SPINNER_TYPES, NGX_POSITIONS, PB_DIRECTIONS } from 'ngx-ui-loader';
265+
import { NgxUiLoaderModule, NgxUiLoaderConfig, SPINNER, POSITION, PB_DIRECTION } from 'ngx-ui-loader';
266266

267267
const ngxUiLoaderConfig: NgxUiLoaderConfig = {
268268
bgsColor: 'red',
269-
bgsPosition: NGX_POSITIONS.bottomCenter,
269+
bgsPosition: POSITION.bottomCenter,
270270
bgsSize: 40,
271-
bgsType: SPINNER_TYPES.rectangleBounce,
272-
pbDirection: PB_DIRECTIONS.leftToRight, // progress bar direction
271+
bgsType: SPINNER.rectangleBounce,
272+
pbDirection: PB_DIRECTION.leftToRight, // progress bar direction
273273
pbThickness: 5, // progress bar thickness
274274
};
275275

@@ -297,26 +297,26 @@ export class AppModule { }
297297
| ---------------- | --------- | -------- | ------------------ | ----------------------------------------------------------------------------------------------- |
298298
| `bgsColor` | *string* | optional | `#00ACC1` | Background spinner color |
299299
| `bgsOpacity` | *number* | optional | `0.5` | Background spinner opacity |
300-
| `bgsPosition` | *string* | optional | `bottom-right` | Background spinner postion. All available positions can be accessed via `NGX_POSITIONS` |
300+
| `bgsPosition` | *string* | optional | `bottom-right` | Background spinner postion. All available positions can be accessed via `POSITION` |
301301
| `bgsSize` | *number* | optional | `60` | Background spinner size. |
302-
| `bgsType` | *string* | optional | `rectangle-bounce` | Background spinner type. All available types can be accessed via `SPINNER_TYPES` |
302+
| `bgsType` | *string* | optional | `rectangle-bounce` | Background spinner type. All available types can be accessed via `SPINNER` |
303303
| | | | | |
304304
| `fgsColor` | *string* | optional | `#00ACC1` | Foreground spinner color |
305-
| `fgsPosition` | *string* | optional | `center-center` | Foreground spinner position. All available positions can be accessed via `NGX_POSITIONS` |
305+
| `fgsPosition` | *string* | optional | `center-center` | Foreground spinner position. All available positions can be accessed via `POSITION` |
306306
| `fgsSize` | *number* | optional | `60` | Foreground spinner size. |
307-
| `fgsType` | *string* | optional | `rectangle-bounce` | Foreground spinner type. All available types can be accessed via `SPINNER_TYPES` |
307+
| `fgsType` | *string* | optional | `rectangle-bounce` | Foreground spinner type. All available types can be accessed via `SPINNER` |
308308
| | | | | |
309-
| `logoPosition` | *string* | optional | `center-center` | Logo position. All available positions can be accessed via `NGX_POSITIONS` |
309+
| `logoPosition` | *string* | optional | `center-center` | Logo position. All available positions can be accessed via `POSITION` |
310310
| `logoSize` | *number* | optional | `120` | Logo size (px) |
311311
| `logoUrl` | *string* | optional | (*empty string*) | Logo url |
312312
| | | | | |
313313
| `pbColor` | *string* | optional | `#00ACC1` | Progress bar color |
314-
| `pbDirection` | *string* | optional | `ltr` | Progress bar direction. All directions type can be accessed via `PB_DIRECTIONS` |
314+
| `pbDirection` | *string* | optional | `ltr` | Progress bar direction. All directions type can be accessed via `PB_DIRECTION` |
315315
| `pbThickness` | *number* | optional | `5` | Progress bar thickness |
316316
| | | | | |
317317
| `text` | *string* | optional | (*empty string*) | Loading text |
318318
| `textColor` | *string* | optional | `#FFFFFF` | Loading text color |
319-
| `textPosition` | *string* | optional | `center-center` | Loading text position. All available positions can be accessed via `NGX_POSITIONS` |
319+
| `textPosition` | *string* | optional | `center-center` | Loading text position. All available positions can be accessed via `POSITION` |
320320
| | | | | |
321321
| `blur` | *number* | optional | `5` | Blur the page content while showing foreground loader. Only applied when using [ngxUiLoaderBlurred](#ngxuiloaderblurred_directive) directive. |
322322
| `gap` | *number* | optional | `24` | The gap between logo, foreground spinner and text when their positions are `center-center` |
@@ -361,7 +361,7 @@ export class AppModule { }
361361

362362
```
363363

364-
<a name="router_events_usage"></a>
364+
<a name="router_events_parameters"></a>
365365

366366
### 7.2 Parameters of `forRoot()` method
367367

@@ -433,16 +433,22 @@ NgxUiLoaderHttpModule.forRoot({ exclude: ['/api/auth'] });
433433

434434
## 9. Changelog
435435

436+
**v.1.2.0**
437+
* Add NgxUiLoaderBlurred directive for blurring the page content while the foreground loading is showed. See [NgxUiLoaderBlurred](#ngxuiloaderblurred_directive)
438+
* `NGX_POSITIONS` is deprecated. Use `POSITION` instead
439+
* `PB_DIRECTIONS` is deprecated. Use `PB_DIRECTION` instead
440+
* `SPINNER_TYPES` is deprecated. Use `SPINNER` instead
441+
436442
**v.1.1.8**
437-
* Http interceptor - Can configure to not show loader for some API urls.
438-
* Npm packages - version bump.
443+
* Http interceptor - Can configure to not show loader for some API urls
444+
* Npm packages - version bump
439445

440446
**v.1.1.5**
441447
* Be able to show loader automatically for http requests - Http interceptor
442448

443449
**v.1.1.2**
444450
* Add more spinner types (total 22 spinners)
445-
* BugFix: Background spinner (if active) should be showed after the foreground spinner is closed out.
451+
* BugFix: Background spinner (if active) should be showed after the foreground spinner is closed out
446452

447453
**v.1.1.1**
448454
* Bugs fixed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-ui-loader-app",
3-
"version": "1.1.9",
3+
"version": "1.2.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/ngx-ui-loader/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ngx-ui-loader",
33
"description": "An all-in-one and fully customizable loader/spinner for Angular 5+ (5+ and 6+ are tested) applications. It supports foreground, background spinner/loader and indicative progress bar.",
4-
"version": "1.1.9",
4+
"version": "1.2.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/t-ho/ngx-ui-loader.git"
@@ -15,7 +15,6 @@
1515
"@angular/core": ">=4.4.0"
1616
},
1717
"keywords": [
18-
"ngx",
1918
"ngx-ui-loader",
2019
"ngx-loader",
2120
"loader",

0 commit comments

Comments
 (0)