ngwr 0.0.14 → 0.1.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/README.md +7 -13
- package/_core/index.d.ts +1 -1
- package/_core/types/color.d.ts +1 -0
- package/_core/types/index.d.ts +1 -0
- package/button/button.component.d.ts +4 -7
- package/button/index.d.ts +2 -2
- package/checkbox/checkbox.component.d.ts +5 -5
- package/checkbox/index.d.ts +2 -2
- package/divider/divider.component.d.ts +24 -2
- package/divider/index.d.ts +2 -2
- package/esm2020/_core/index.mjs +2 -2
- package/esm2020/_core/types/color.mjs +2 -0
- package/esm2020/_core/types/index.mjs +1 -1
- package/esm2020/button/button.component.mjs +2 -2
- package/esm2020/button/index.mjs +3 -3
- package/esm2020/checkbox/checkbox.component.mjs +14 -10
- package/esm2020/checkbox/index.mjs +3 -3
- package/esm2020/divider/divider.component.mjs +55 -6
- package/esm2020/divider/index.mjs +3 -3
- package/esm2020/form/form-error.component.mjs +5 -5
- package/esm2020/form/form-item.component.mjs +15 -28
- package/esm2020/form/index.mjs +4 -4
- package/esm2020/icon/index.mjs +5 -5
- package/esm2020/input/index.mjs +3 -3
- package/esm2020/input/input.component.mjs +159 -0
- package/esm2020/input/input.module.mjs +9 -8
- package/esm2020/public-api.mjs +11 -12
- package/esm2020/skeleton/index.mjs +3 -3
- package/esm2020/skeleton/skeleton.component.mjs +29 -13
- package/esm2020/skeleton/skeleton.module.mjs +4 -5
- package/esm2020/spinner/index.mjs +3 -3
- package/esm2020/spinner/spinner.component.mjs +4 -4
- package/esm2020/tag/index.mjs +3 -3
- package/esm2020/tag/tag.component.mjs +47 -51
- package/esm2020/tag/tag.module.mjs +5 -4
- package/fesm2015/ngwr.mjs +440 -443
- package/fesm2015/ngwr.mjs.map +1 -1
- package/fesm2020/ngwr.mjs +440 -437
- package/fesm2020/ngwr.mjs.map +1 -1
- package/form/form-error.component.d.ts +1 -1
- package/form/form-item.component.d.ts +3 -11
- package/form/index.d.ts +3 -3
- package/icon/index.d.ts +4 -4
- package/input/index.d.ts +2 -2
- package/input/input.component.d.ts +41 -0
- package/input/input.module.d.ts +4 -3
- package/ngwr.min.css +1 -1
- package/package.json +4 -4
- package/public-api.d.ts +10 -11
- package/skeleton/index.d.ts +2 -2
- package/skeleton/skeleton.component.d.ts +6 -8
- package/skeleton/skeleton.module.d.ts +1 -2
- package/spinner/index.d.ts +2 -2
- package/spinner/spinner.component.d.ts +1 -1
- package/tag/index.d.ts +2 -2
- package/tag/tag.component.d.ts +10 -16
- package/tag/tag.module.d.ts +3 -2
- package/esm2020/extended-input/extended-input.component.mjs +0 -68
- package/esm2020/extended-input/extended-input.module.mjs +0 -20
- package/esm2020/extended-input/index.mjs +0 -3
- package/esm2020/input/input.directive.mjs +0 -65
- package/esm2020/password-input/index.mjs +0 -3
- package/esm2020/password-input/password-input.component.mjs +0 -58
- package/esm2020/password-input/password-input.module.mjs +0 -21
- package/extended-input/extended-input.component.d.ts +0 -26
- package/extended-input/extended-input.module.d.ts +0 -10
- package/extended-input/index.d.ts +0 -2
- package/input/input.directive.d.ts +0 -18
- package/password-input/index.d.ts +0 -2
- package/password-input/password-input.component.d.ts +0 -22
- package/password-input/password-input.module.d.ts +0 -11
package/fesm2015/ngwr.mjs
CHANGED
|
@@ -1,16 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
3
|
+
import { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, Injectable, Optional, Inject, Input, NgModule, EventEmitter, forwardRef, ViewChild, Output } from '@angular/core';
|
|
5
4
|
import { Subject, fromEvent } from 'rxjs';
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
6
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
10
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
|
-
import * as i1$1 from '@angular/forms';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
|
+
import * as i2 from '@angular/forms';
|
|
12
10
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
13
|
-
import
|
|
11
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
|
12
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
13
|
+
|
|
14
|
+
class BaseComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.ngUnsubscribe = new Subject();
|
|
17
|
+
}
|
|
18
|
+
ngOnDestroy() {
|
|
19
|
+
this.ngUnsubscribe.next();
|
|
20
|
+
this.ngUnsubscribe.complete();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: BaseComponent, ngImport: i0 });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, decorators: [{
|
|
26
|
+
type: Directive
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
const stylePrefix = 'wr';
|
|
30
|
+
|
|
31
|
+
function toBoolean(value) {
|
|
32
|
+
return coerceBooleanProperty(value);
|
|
33
|
+
}
|
|
34
|
+
// eslint-disable
|
|
35
|
+
function propDecoratorFactory(name, fallback) {
|
|
36
|
+
function propDecorator(target, propName, originalDescriptor) {
|
|
37
|
+
const privatePropName = `$$__wrPropDecorator__${propName}`;
|
|
38
|
+
if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
|
|
39
|
+
console.warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
|
|
40
|
+
}
|
|
41
|
+
Object.defineProperty(target, privatePropName, {
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
get() {
|
|
47
|
+
return originalDescriptor && originalDescriptor.get
|
|
48
|
+
? originalDescriptor.get.bind(this)()
|
|
49
|
+
: this[privatePropName];
|
|
50
|
+
},
|
|
51
|
+
set(value) {
|
|
52
|
+
if (originalDescriptor && originalDescriptor.set) {
|
|
53
|
+
originalDescriptor.set.bind(this)(fallback(value));
|
|
54
|
+
}
|
|
55
|
+
this[privatePropName] = fallback(value);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return propDecorator;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Input decorator that handle a prop to do get/set automatically with toBoolean
|
|
63
|
+
*
|
|
64
|
+
* Why not using @InputBoolean alone without @Input? AOT needs @Input to be visible
|
|
65
|
+
*
|
|
66
|
+
* @howToUse
|
|
67
|
+
* ```
|
|
68
|
+
* @Input() @InputBoolean() visible: boolean = false;
|
|
69
|
+
*
|
|
70
|
+
* // Act as below:
|
|
71
|
+
* // @Input()
|
|
72
|
+
* // get visible() { return this.__visible; }
|
|
73
|
+
* // set visible(value) { this.__visible = value; }
|
|
74
|
+
* // __visible = false;
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
function InputBoolean() {
|
|
78
|
+
return propDecoratorFactory('InputBoolean', toBoolean);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Components
|
|
82
|
+
|
|
83
|
+
class WrSpinnerComponent {
|
|
84
|
+
constructor() {
|
|
85
|
+
this.class = 'wr-spin';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
WrSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
+
WrSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrSpinnerComponent, selector: "wr-spin", host: { properties: { "class": "this.class" } }, exportAs: ["wrSpin"], ngImport: i0, template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, decorators: [{
|
|
91
|
+
type: Component,
|
|
92
|
+
args: [{
|
|
93
|
+
selector: 'wr-spin',
|
|
94
|
+
exportAs: 'wrSpin',
|
|
95
|
+
template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>',
|
|
96
|
+
encapsulation: ViewEncapsulation.None,
|
|
97
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
98
|
+
}]
|
|
99
|
+
}], propDecorators: { class: [{
|
|
100
|
+
type: HostBinding,
|
|
101
|
+
args: ['class']
|
|
102
|
+
}] } });
|
|
14
103
|
|
|
15
104
|
/* 🤖 this file was generated by svg-to-ts */
|
|
16
105
|
const wrIconAddCircleOutline = {
|
|
@@ -472,125 +561,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
472
561
|
type: Input
|
|
473
562
|
}] } });
|
|
474
563
|
|
|
475
|
-
class WrIconModule {
|
|
476
|
-
static forRoot() {
|
|
477
|
-
WrIconService.registerIcons();
|
|
478
|
-
return { ngModule: WrIconModule };
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
WrIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
482
|
-
WrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, declarations: [WrIconComponent], exports: [WrIconComponent] });
|
|
483
|
-
WrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule });
|
|
484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, decorators: [{
|
|
485
|
-
type: NgModule,
|
|
486
|
-
args: [{
|
|
487
|
-
declarations: [WrIconComponent],
|
|
488
|
-
exports: [WrIconComponent]
|
|
489
|
-
}]
|
|
490
|
-
}] });
|
|
491
|
-
|
|
492
|
-
class BaseComponent {
|
|
493
|
-
constructor() {
|
|
494
|
-
this.ngUnsubscribe = new Subject();
|
|
495
|
-
}
|
|
496
|
-
ngOnDestroy() {
|
|
497
|
-
this.ngUnsubscribe.next();
|
|
498
|
-
this.ngUnsubscribe.complete();
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
502
|
-
BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: BaseComponent, ngImport: i0 });
|
|
503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, decorators: [{
|
|
504
|
-
type: Directive
|
|
505
|
-
}] });
|
|
506
|
-
|
|
507
|
-
const stylePrefix = 'wr';
|
|
508
|
-
|
|
509
|
-
function toBoolean(value) {
|
|
510
|
-
return coerceBooleanProperty(value);
|
|
511
|
-
}
|
|
512
|
-
// eslint-disable
|
|
513
|
-
function propDecoratorFactory(name, fallback) {
|
|
514
|
-
function propDecorator(target, propName, originalDescriptor) {
|
|
515
|
-
const privatePropName = `$$__wrPropDecorator__${propName}`;
|
|
516
|
-
if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
|
|
517
|
-
console.warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
|
|
518
|
-
}
|
|
519
|
-
Object.defineProperty(target, privatePropName, {
|
|
520
|
-
configurable: true,
|
|
521
|
-
writable: true
|
|
522
|
-
});
|
|
523
|
-
return {
|
|
524
|
-
get() {
|
|
525
|
-
return originalDescriptor && originalDescriptor.get
|
|
526
|
-
? originalDescriptor.get.bind(this)()
|
|
527
|
-
: this[privatePropName];
|
|
528
|
-
},
|
|
529
|
-
set(value) {
|
|
530
|
-
if (originalDescriptor && originalDescriptor.set) {
|
|
531
|
-
originalDescriptor.set.bind(this)(fallback(value));
|
|
532
|
-
}
|
|
533
|
-
this[privatePropName] = fallback(value);
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
return propDecorator;
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* Input decorator that handle a prop to do get/set automatically with toBoolean
|
|
541
|
-
*
|
|
542
|
-
* Why not using @InputBoolean alone without @Input? AOT needs @Input to be visible
|
|
543
|
-
*
|
|
544
|
-
* @howToUse
|
|
545
|
-
* ```
|
|
546
|
-
* @Input() @InputBoolean() visible: boolean = false;
|
|
547
|
-
*
|
|
548
|
-
* // Act as below:
|
|
549
|
-
* // @Input()
|
|
550
|
-
* // get visible() { return this.__visible; }
|
|
551
|
-
* // set visible(value) { this.__visible = value; }
|
|
552
|
-
* // __visible = false;
|
|
553
|
-
* ```
|
|
554
|
-
*/
|
|
555
|
-
function InputBoolean() {
|
|
556
|
-
return propDecoratorFactory('InputBoolean', toBoolean);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// Components
|
|
560
|
-
|
|
561
|
-
class WrSpinnerComponent {
|
|
562
|
-
constructor() {
|
|
563
|
-
this.class = `${stylePrefix}-spin`;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
WrSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
567
|
-
WrSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrSpinnerComponent, selector: "wr-spin", host: { properties: { "class": "this.class" } }, ngImport: i0, template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, decorators: [{
|
|
569
|
-
type: Component,
|
|
570
|
-
args: [{
|
|
571
|
-
selector: 'wr-spin',
|
|
572
|
-
template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>',
|
|
573
|
-
encapsulation: ViewEncapsulation.None,
|
|
574
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
575
|
-
}]
|
|
576
|
-
}], propDecorators: { class: [{
|
|
577
|
-
type: HostBinding,
|
|
578
|
-
args: ['class']
|
|
579
|
-
}] } });
|
|
580
|
-
|
|
581
|
-
class WrSpinnerModule {
|
|
582
|
-
}
|
|
583
|
-
WrSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
584
|
-
WrSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, declarations: [WrSpinnerComponent], exports: [WrSpinnerComponent] });
|
|
585
|
-
WrSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule });
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, decorators: [{
|
|
587
|
-
type: NgModule,
|
|
588
|
-
args: [{
|
|
589
|
-
declarations: [WrSpinnerComponent],
|
|
590
|
-
exports: [WrSpinnerComponent]
|
|
591
|
-
}]
|
|
592
|
-
}] });
|
|
593
|
-
|
|
594
564
|
class WrButtonComponent extends BaseComponent {
|
|
595
565
|
constructor(cdr, elRef, ngZone, r2) {
|
|
596
566
|
super();
|
|
@@ -671,7 +641,7 @@ class WrButtonComponent extends BaseComponent {
|
|
|
671
641
|
}
|
|
672
642
|
}
|
|
673
643
|
WrButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
674
|
-
WrButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrButtonComponent, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", icon: "icon", iconPosition: "iconPosition", disabled: "disabled", outlined: "outlined", rounded: "rounded", loading: "loading", fullwidth: "fullwidth" }, host: { properties: { "class": "this.elClasses", "disabled": "this._disabled" } }, exportAs: ["wrBtn"], usesInheritance: true, ngImport: i0, template: "<wr-spin class=\"wr-btn__spin\" *ngIf=\"loading\"></wr-spin>\n<wr-icon class=\"wr-btn__icon\" *ngIf=\"icon && iconPosition === 'start'\" [name]=\"icon\"></wr-icon>\n<ng-content></ng-content>\n<wr-icon class=\"wr-btn__icon\" *ngIf=\"icon && iconPosition === 'end'\" [name]=\"icon\"></wr-icon>\n", dependencies: [{ kind: "directive", type:
|
|
644
|
+
WrButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrButtonComponent, selector: "wr-btn, button[wr-btn], a[wr-btn]", inputs: { color: "color", size: "size", icon: "icon", iconPosition: "iconPosition", disabled: "disabled", outlined: "outlined", rounded: "rounded", loading: "loading", fullwidth: "fullwidth" }, host: { properties: { "class": "this.elClasses", "disabled": "this._disabled" } }, exportAs: ["wrBtn"], usesInheritance: true, ngImport: i0, template: "<wr-spin class=\"wr-btn__spin\" *ngIf=\"loading\"></wr-spin>\n<wr-icon class=\"wr-btn__icon\" *ngIf=\"icon && iconPosition === 'start'\" [name]=\"icon\"></wr-icon>\n<ng-content></ng-content>\n<wr-icon class=\"wr-btn__icon\" *ngIf=\"icon && iconPosition === 'end'\" [name]=\"icon\"></wr-icon>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin", exportAs: ["wrSpin"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
675
645
|
__decorate([
|
|
676
646
|
InputBoolean()
|
|
677
647
|
], WrButtonComponent.prototype, "disabled", void 0);
|
|
@@ -716,6 +686,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
716
686
|
args: ['disabled']
|
|
717
687
|
}] } });
|
|
718
688
|
|
|
689
|
+
class WrIconModule {
|
|
690
|
+
static forRoot() {
|
|
691
|
+
WrIconService.registerIcons();
|
|
692
|
+
return { ngModule: WrIconModule };
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
WrIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
696
|
+
WrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, declarations: [WrIconComponent], exports: [WrIconComponent] });
|
|
697
|
+
WrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule });
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, decorators: [{
|
|
699
|
+
type: NgModule,
|
|
700
|
+
args: [{
|
|
701
|
+
declarations: [WrIconComponent],
|
|
702
|
+
exports: [WrIconComponent]
|
|
703
|
+
}]
|
|
704
|
+
}] });
|
|
705
|
+
|
|
706
|
+
class WrSpinnerModule {
|
|
707
|
+
}
|
|
708
|
+
WrSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
709
|
+
WrSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, declarations: [WrSpinnerComponent], exports: [WrSpinnerComponent] });
|
|
710
|
+
WrSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule });
|
|
711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, decorators: [{
|
|
712
|
+
type: NgModule,
|
|
713
|
+
args: [{
|
|
714
|
+
declarations: [WrSpinnerComponent],
|
|
715
|
+
exports: [WrSpinnerComponent]
|
|
716
|
+
}]
|
|
717
|
+
}] });
|
|
718
|
+
|
|
719
719
|
class WrButtonModule {
|
|
720
720
|
}
|
|
721
721
|
WrButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -742,8 +742,12 @@ class WrCheckboxComponent extends BaseComponent {
|
|
|
742
742
|
this.checked = false;
|
|
743
743
|
this.disabled = false;
|
|
744
744
|
this.autoFocus = false;
|
|
745
|
-
this.
|
|
746
|
-
|
|
745
|
+
this.valueChange = new EventEmitter();
|
|
746
|
+
}
|
|
747
|
+
get elClasses() {
|
|
748
|
+
return {
|
|
749
|
+
'wr-checkbox': true
|
|
750
|
+
};
|
|
747
751
|
}
|
|
748
752
|
ngOnInit() {
|
|
749
753
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -799,18 +803,18 @@ class WrCheckboxComponent extends BaseComponent {
|
|
|
799
803
|
if (!this.disabled) {
|
|
800
804
|
this.checked = checked;
|
|
801
805
|
this.onChange(this.checked);
|
|
802
|
-
this.
|
|
806
|
+
this.valueChange.emit(this.checked);
|
|
803
807
|
}
|
|
804
808
|
}
|
|
805
809
|
}
|
|
806
|
-
WrCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
807
|
-
WrCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrCheckboxComponent, selector: "wr-checkbox", inputs: { checked: "checked", disabled: "disabled", autoFocus: "autoFocus" }, outputs: {
|
|
810
|
+
WrCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
811
|
+
WrCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrCheckboxComponent, selector: "wr-checkbox", inputs: { checked: "checked", disabled: "disabled", autoFocus: "autoFocus" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class": "this.elClasses" } }, providers: [
|
|
808
812
|
{
|
|
809
813
|
provide: NG_VALUE_ACCESSOR,
|
|
810
814
|
useExisting: forwardRef(() => WrCheckboxComponent),
|
|
811
815
|
multi: true
|
|
812
816
|
}
|
|
813
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<label\n class=\"wr-checkbox-container\"\n [class.wr-checkbox-container--checked]=\"this.checked\"\n [class.wr-checkbox-container--disabled]=\"this.disabled\"\n>\n <input\n #inputElement\n type=\"checkbox\"\n class=\"wr-checkbox-container__input\"\n [attr.autofocus]=\"autoFocus ? 'autofocus' : null\"\n [checked]=\"checked\"\n [ngModel]=\"checked\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div class=\"wr-checkbox-container-inner\">\n <div class=\"wr-checkbox-container-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n", dependencies: [{ kind: "directive", type:
|
|
817
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<label\n class=\"wr-checkbox-container\"\n [class.wr-checkbox-container--checked]=\"this.checked\"\n [class.wr-checkbox-container--disabled]=\"this.disabled\"\n>\n <input\n #inputElement\n type=\"checkbox\"\n class=\"wr-checkbox-container__input\"\n [attr.autofocus]=\"autoFocus ? 'autofocus' : null\"\n [checked]=\"checked\"\n [ngModel]=\"checked\"\n [disabled]=\"!!disabled\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div class=\"wr-checkbox-container-inner\">\n <div class=\"wr-checkbox-container-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n", dependencies: [{ kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
814
818
|
__decorate([
|
|
815
819
|
InputBoolean()
|
|
816
820
|
], WrCheckboxComponent.prototype, "checked", void 0);
|
|
@@ -828,8 +832,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
828
832
|
useExisting: forwardRef(() => WrCheckboxComponent),
|
|
829
833
|
multi: true
|
|
830
834
|
}
|
|
831
|
-
], template: "<label\n class=\"wr-checkbox-container\"\n [class.wr-checkbox-container--checked]=\"this.checked\"\n [class.wr-checkbox-container--disabled]=\"this.disabled\"\n>\n <input\n #inputElement\n type=\"checkbox\"\n class=\"wr-checkbox-container__input\"\n [attr.autofocus]=\"autoFocus ? 'autofocus' : null\"\n [checked]=\"checked\"\n [ngModel]=\"checked\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div class=\"wr-checkbox-container-inner\">\n <div class=\"wr-checkbox-container-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n" }]
|
|
832
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { inputElement: [{
|
|
835
|
+
], template: "<label\n class=\"wr-checkbox-container\"\n [class.wr-checkbox-container--checked]=\"this.checked\"\n [class.wr-checkbox-container--disabled]=\"this.disabled\"\n>\n <input\n #inputElement\n type=\"checkbox\"\n class=\"wr-checkbox-container__input\"\n [attr.autofocus]=\"autoFocus ? 'autofocus' : null\"\n [checked]=\"checked\"\n [ngModel]=\"checked\"\n [disabled]=\"!!disabled\"\n (ngModelChange)=\"onModelChange($event)\"\n />\n <div class=\"wr-checkbox-container-inner\">\n <div class=\"wr-checkbox-container-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n" }]
|
|
836
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { inputElement: [{
|
|
833
837
|
type: ViewChild,
|
|
834
838
|
args: ['inputElement', { static: true }]
|
|
835
839
|
}], checked: [{
|
|
@@ -838,9 +842,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
838
842
|
type: Input
|
|
839
843
|
}], autoFocus: [{
|
|
840
844
|
type: Input
|
|
841
|
-
}],
|
|
845
|
+
}], valueChange: [{
|
|
842
846
|
type: Output
|
|
843
|
-
}],
|
|
847
|
+
}], elClasses: [{
|
|
844
848
|
type: HostBinding,
|
|
845
849
|
args: ['class']
|
|
846
850
|
}] } });
|
|
@@ -861,22 +865,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
861
865
|
|
|
862
866
|
class WrDividerComponent {
|
|
863
867
|
constructor() {
|
|
864
|
-
|
|
868
|
+
/**
|
|
869
|
+
* Divider color
|
|
870
|
+
*
|
|
871
|
+
* @default 'light';
|
|
872
|
+
*/
|
|
873
|
+
this.color = 'light';
|
|
874
|
+
/**
|
|
875
|
+
* Divider style
|
|
876
|
+
*
|
|
877
|
+
* @default 'solid';
|
|
878
|
+
*/
|
|
879
|
+
this.type = 'solid';
|
|
880
|
+
/**
|
|
881
|
+
* Divider width
|
|
882
|
+
*
|
|
883
|
+
* @default 1px;
|
|
884
|
+
*/
|
|
885
|
+
this.width = '1px';
|
|
865
886
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
887
|
+
/** Set element classes **/
|
|
888
|
+
get elClasses() {
|
|
889
|
+
return {
|
|
890
|
+
'wr-divider': true,
|
|
891
|
+
'wr-divider--primary': this.color === 'primary',
|
|
892
|
+
'wr-divider--secondary': this.color === 'secondary',
|
|
893
|
+
'wr-divider--success': this.color === 'success',
|
|
894
|
+
'wr-divider--warning': this.color === 'warning',
|
|
895
|
+
'wr-divider--danger': this.color === 'danger',
|
|
896
|
+
'wr-divider--light': this.color === 'light',
|
|
897
|
+
'wr-divider--medium': this.color === 'medium',
|
|
898
|
+
'wr-divider--dark': this.color === 'dark',
|
|
899
|
+
'wr-divider--solid': this.type === 'solid',
|
|
900
|
+
'wr-divider--dashed': this.type === 'dashed',
|
|
901
|
+
'wr-divider--dotted': this.type === 'dotted'
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
/** Set element style **/
|
|
905
|
+
get elStyles() {
|
|
906
|
+
return {
|
|
907
|
+
'--wr-divider-width': this.width
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
WrDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
912
|
+
WrDividerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrDividerComponent, selector: "wr-divider", inputs: { color: "color", type: "type", width: "width" }, host: { properties: { "class": "this.elClasses", "style": "this.elStyles" } }, exportAs: ["wrDivider"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, decorators: [{
|
|
914
|
+
type: Component,
|
|
915
|
+
args: [{
|
|
872
916
|
selector: 'wr-divider',
|
|
917
|
+
exportAs: 'wrDivider',
|
|
873
918
|
template: '',
|
|
874
919
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
875
920
|
encapsulation: ViewEncapsulation.None
|
|
876
921
|
}]
|
|
877
|
-
}], propDecorators: {
|
|
922
|
+
}], propDecorators: { color: [{
|
|
923
|
+
type: Input
|
|
924
|
+
}], type: [{
|
|
925
|
+
type: Input
|
|
926
|
+
}], width: [{
|
|
927
|
+
type: Input
|
|
928
|
+
}], elClasses: [{
|
|
878
929
|
type: HostBinding,
|
|
879
930
|
args: ['class']
|
|
931
|
+
}], elStyles: [{
|
|
932
|
+
type: HostBinding,
|
|
933
|
+
args: ['style']
|
|
880
934
|
}] } });
|
|
881
935
|
|
|
882
936
|
class WrDividerModule {
|
|
@@ -892,222 +946,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
892
946
|
}]
|
|
893
947
|
}] });
|
|
894
948
|
|
|
895
|
-
class
|
|
896
|
-
constructor(
|
|
897
|
-
|
|
898
|
-
this.ngControl = ngControl;
|
|
899
|
-
this.class = `${stylePrefix}-input`;
|
|
900
|
-
this._disabled = false;
|
|
901
|
-
this.disabled$ = new Subject();
|
|
902
|
-
}
|
|
903
|
-
get disabled() {
|
|
904
|
-
if (this.ngControl && this.ngControl.disabled !== null) {
|
|
905
|
-
return this.ngControl.disabled;
|
|
906
|
-
}
|
|
907
|
-
return this._disabled;
|
|
908
|
-
}
|
|
909
|
-
set disabled(value) {
|
|
910
|
-
this._disabled = value != null && `${value}` !== 'false';
|
|
911
|
-
}
|
|
912
|
-
ngOnInit() {
|
|
913
|
-
var _a;
|
|
914
|
-
if (this.ngControl) {
|
|
915
|
-
(_a = this.ngControl.statusChanges) === null || _a === void 0 ? void 0 : _a.pipe(filter(() => this.ngControl.disabled !== null), takeUntil(this.ngUnsubscribe)).subscribe(() => this.disabled$.next(this.ngControl.disabled));
|
|
916
|
-
}
|
|
949
|
+
class WrFormItemComponent {
|
|
950
|
+
constructor() {
|
|
951
|
+
this.hasError = false;
|
|
917
952
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
this.
|
|
922
|
-
}
|
|
953
|
+
get elClasses() {
|
|
954
|
+
return {
|
|
955
|
+
'wr-form-item': true,
|
|
956
|
+
'wr-form-item--has-error': this.hasError
|
|
957
|
+
};
|
|
923
958
|
}
|
|
924
959
|
}
|
|
925
|
-
|
|
926
|
-
|
|
960
|
+
WrFormItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
961
|
+
WrFormItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrFormItemComponent, selector: "wr-form-item", inputs: { hasError: "hasError" }, host: { properties: { "class": "this.elClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
927
962
|
__decorate([
|
|
928
963
|
InputBoolean()
|
|
929
|
-
],
|
|
930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type:
|
|
931
|
-
type:
|
|
964
|
+
], WrFormItemComponent.prototype, "hasError", void 0);
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormItemComponent, decorators: [{
|
|
966
|
+
type: Component,
|
|
932
967
|
args: [{
|
|
933
|
-
selector: 'wr-
|
|
968
|
+
selector: 'wr-form-item',
|
|
969
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
970
|
+
encapsulation: ViewEncapsulation.None,
|
|
971
|
+
template: `<ng-content></ng-content>`
|
|
934
972
|
}]
|
|
935
|
-
}],
|
|
936
|
-
return [{ type: i1$1.NgControl, decorators: [{
|
|
937
|
-
type: Optional
|
|
938
|
-
}, {
|
|
939
|
-
type: Self
|
|
940
|
-
}] }];
|
|
941
|
-
}, propDecorators: { class: [{
|
|
942
|
-
type: HostBinding,
|
|
943
|
-
args: ['class']
|
|
944
|
-
}], disabled: [{
|
|
945
|
-
type: HostBinding,
|
|
946
|
-
args: [`class.${stylePrefix}-input--disabled`]
|
|
947
|
-
}, {
|
|
948
|
-
type: HostBinding,
|
|
949
|
-
args: ['disabled']
|
|
950
|
-
}, {
|
|
973
|
+
}], propDecorators: { hasError: [{
|
|
951
974
|
type: Input
|
|
952
|
-
}]
|
|
953
|
-
|
|
954
|
-
class WrInputModule {
|
|
955
|
-
}
|
|
956
|
-
WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
957
|
-
WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, declarations: [WrInputDirective], imports: [CommonModule, PlatformModule], exports: [WrInputDirective] });
|
|
958
|
-
WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, imports: [CommonModule, PlatformModule] });
|
|
959
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, decorators: [{
|
|
960
|
-
type: NgModule,
|
|
961
|
-
args: [{
|
|
962
|
-
imports: [CommonModule, PlatformModule],
|
|
963
|
-
declarations: [WrInputDirective],
|
|
964
|
-
exports: [WrInputDirective]
|
|
965
|
-
}]
|
|
966
|
-
}] });
|
|
967
|
-
|
|
968
|
-
class WrExtendedInputComponent {
|
|
969
|
-
constructor(ngControl, elRef, r2) {
|
|
970
|
-
this.ngControl = ngControl;
|
|
971
|
-
this.elRef = elRef;
|
|
972
|
-
this.r2 = r2;
|
|
973
|
-
this.class = `${stylePrefix}-extended-input`;
|
|
974
|
-
this.disabled = false;
|
|
975
|
-
this.value = undefined;
|
|
976
|
-
this.touched = false;
|
|
977
|
-
this.onChange = (value) => { };
|
|
978
|
-
this.onTouched = () => { };
|
|
979
|
-
if (ngControl !== null) {
|
|
980
|
-
ngControl.valueAccessor = this;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
ngOnInit() {
|
|
984
|
-
const el = this.elRef.nativeElement;
|
|
985
|
-
const add = (klass) => this.r2.addClass(el, `${this.class}-${klass}`);
|
|
986
|
-
if (this.suffix) {
|
|
987
|
-
add('-has-suffix');
|
|
988
|
-
}
|
|
989
|
-
if (this.prefix) {
|
|
990
|
-
add('-has-prefix');
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
onInput($event) {
|
|
994
|
-
this.value = $event.currentTarget.value;
|
|
995
|
-
this.touched = true;
|
|
996
|
-
this.onChange(this.value);
|
|
997
|
-
}
|
|
998
|
-
onFocusOut() {
|
|
999
|
-
this.touched = true;
|
|
1000
|
-
this.onTouched();
|
|
1001
|
-
}
|
|
1002
|
-
registerOnChange(fn) {
|
|
1003
|
-
this.onChange = fn;
|
|
1004
|
-
}
|
|
1005
|
-
registerOnTouched(fn) {
|
|
1006
|
-
this.onTouched = fn;
|
|
1007
|
-
}
|
|
1008
|
-
writeValue(obj) {
|
|
1009
|
-
this.value = obj;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
WrExtendedInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1013
|
-
WrExtendedInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrExtendedInputComponent, selector: "wr-extended-input", inputs: { suffix: "suffix", prefix: "prefix" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<div class=\"wr-extended-input-prefix\" *ngIf=\"prefix\">\n <span class=\"wr-extended-input-prefix__text\">{{ prefix }}</span>\n</div>\n<input wr-input [disabled]=\"disabled\" [value]=\"value\" (focusout)=\"onFocusOut()\" (input)=\"onInput($event)\" />\n<div class=\"wr-extended-input-suffix\" *ngIf=\"suffix\">\n <span class=\"wr-extended-input-suffix__text\">{{ suffix }}</span>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: WrInputDirective, selector: "wr-input, input[wr-input], textarea[wr-input]", inputs: ["disabled"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputComponent, decorators: [{
|
|
1015
|
-
type: Component,
|
|
1016
|
-
args: [{ selector: 'wr-extended-input', encapsulation: ViewEncapsulation.None, template: "<div class=\"wr-extended-input-prefix\" *ngIf=\"prefix\">\n <span class=\"wr-extended-input-prefix__text\">{{ prefix }}</span>\n</div>\n<input wr-input [disabled]=\"disabled\" [value]=\"value\" (focusout)=\"onFocusOut()\" (input)=\"onInput($event)\" />\n<div class=\"wr-extended-input-suffix\" *ngIf=\"suffix\">\n <span class=\"wr-extended-input-suffix__text\">{{ suffix }}</span>\n</div>\n" }]
|
|
1017
|
-
}], ctorParameters: function () {
|
|
1018
|
-
return [{ type: i1$1.NgControl, decorators: [{
|
|
1019
|
-
type: Optional
|
|
1020
|
-
}, {
|
|
1021
|
-
type: Self
|
|
1022
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }];
|
|
1023
|
-
}, propDecorators: { class: [{
|
|
975
|
+
}], elClasses: [{
|
|
1024
976
|
type: HostBinding,
|
|
1025
977
|
args: ['class']
|
|
1026
|
-
}], suffix: [{
|
|
1027
|
-
type: Input
|
|
1028
|
-
}], prefix: [{
|
|
1029
|
-
type: Input
|
|
1030
978
|
}] } });
|
|
1031
979
|
|
|
1032
|
-
class WrExtendedInputModule {
|
|
1033
|
-
}
|
|
1034
|
-
WrExtendedInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1035
|
-
WrExtendedInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, declarations: [WrExtendedInputComponent], imports: [CommonModule, PlatformModule, WrInputModule], exports: [WrExtendedInputComponent] });
|
|
1036
|
-
WrExtendedInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, imports: [CommonModule, PlatformModule, WrInputModule] });
|
|
1037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, decorators: [{
|
|
1038
|
-
type: NgModule,
|
|
1039
|
-
args: [{
|
|
1040
|
-
imports: [CommonModule, PlatformModule, WrInputModule],
|
|
1041
|
-
declarations: [WrExtendedInputComponent],
|
|
1042
|
-
exports: [WrExtendedInputComponent]
|
|
1043
|
-
}]
|
|
1044
|
-
}] });
|
|
1045
|
-
|
|
1046
980
|
class WrFormErrorComponent {
|
|
1047
981
|
constructor() {
|
|
1048
|
-
this.class =
|
|
982
|
+
this.class = 'wr-form-error';
|
|
1049
983
|
}
|
|
1050
984
|
}
|
|
1051
985
|
WrFormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1052
|
-
WrFormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrFormErrorComponent, selector: "wr-form-error", host: { properties: { "class": "this.class" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
986
|
+
WrFormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrFormErrorComponent, selector: "wr-form-error", host: { properties: { "class": "this.class" } }, exportAs: ["wrFormError"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1053
987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormErrorComponent, decorators: [{
|
|
1054
988
|
type: Component,
|
|
1055
989
|
args: [{
|
|
1056
990
|
selector: 'wr-form-error',
|
|
991
|
+
exportAs: 'wrFormError',
|
|
992
|
+
template: `<ng-content></ng-content>`,
|
|
1057
993
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1058
994
|
encapsulation: ViewEncapsulation.None,
|
|
1059
|
-
template: `<ng-content></ng-content>`
|
|
1060
995
|
}]
|
|
1061
996
|
}], propDecorators: { class: [{
|
|
1062
997
|
type: HostBinding,
|
|
1063
998
|
args: ['class']
|
|
1064
999
|
}] } });
|
|
1065
1000
|
|
|
1066
|
-
class WrFormItemComponent {
|
|
1067
|
-
constructor(cdr, elRef, r2) {
|
|
1068
|
-
this.cdr = cdr;
|
|
1069
|
-
this.elRef = elRef;
|
|
1070
|
-
this.r2 = r2;
|
|
1071
|
-
this.hasError = false;
|
|
1072
|
-
this.baseClass = `${stylePrefix}-form-item`;
|
|
1073
|
-
}
|
|
1074
|
-
ngOnInit() {
|
|
1075
|
-
this.setClasses();
|
|
1076
|
-
}
|
|
1077
|
-
ngOnChanges(changes) {
|
|
1078
|
-
var _a;
|
|
1079
|
-
if (!((_a = changes['hasError']) === null || _a === void 0 ? void 0 : _a.currentValue)) {
|
|
1080
|
-
this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--has-error`);
|
|
1081
|
-
}
|
|
1082
|
-
this.setClasses();
|
|
1083
|
-
this.cdr.detectChanges();
|
|
1084
|
-
}
|
|
1085
|
-
setClasses() {
|
|
1086
|
-
const el = this.elRef.nativeElement;
|
|
1087
|
-
const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
|
|
1088
|
-
this.r2.addClass(el, this.baseClass);
|
|
1089
|
-
if (this.hasError) {
|
|
1090
|
-
add('-has-error');
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
WrFormItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1095
|
-
WrFormItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrFormItemComponent, selector: "wr-form-item", inputs: { hasError: "hasError" }, usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1096
|
-
__decorate([
|
|
1097
|
-
InputBoolean()
|
|
1098
|
-
], WrFormItemComponent.prototype, "hasError", void 0);
|
|
1099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormItemComponent, decorators: [{
|
|
1100
|
-
type: Component,
|
|
1101
|
-
args: [{
|
|
1102
|
-
selector: 'wr-form-item',
|
|
1103
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1104
|
-
encapsulation: ViewEncapsulation.None,
|
|
1105
|
-
template: `<ng-content></ng-content>`
|
|
1106
|
-
}]
|
|
1107
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hasError: [{
|
|
1108
|
-
type: Input
|
|
1109
|
-
}] } });
|
|
1110
|
-
|
|
1111
1001
|
class WrFormModule {
|
|
1112
1002
|
}
|
|
1113
1003
|
WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1122,97 +1012,207 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1122
1012
|
}]
|
|
1123
1013
|
}] });
|
|
1124
1014
|
|
|
1125
|
-
class
|
|
1126
|
-
constructor(
|
|
1127
|
-
|
|
1128
|
-
this.
|
|
1129
|
-
this.
|
|
1130
|
-
this.
|
|
1015
|
+
class WrInputComponent extends BaseComponent {
|
|
1016
|
+
constructor(cdr, elRef, focusMonitor, ngZone) {
|
|
1017
|
+
super();
|
|
1018
|
+
this.cdr = cdr;
|
|
1019
|
+
this.elRef = elRef;
|
|
1020
|
+
this.focusMonitor = focusMonitor;
|
|
1021
|
+
this.ngZone = ngZone;
|
|
1131
1022
|
this.value = null;
|
|
1132
|
-
this.
|
|
1133
|
-
this.
|
|
1134
|
-
this.
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1023
|
+
this.type = 'text';
|
|
1024
|
+
this.autocomplete = 'on';
|
|
1025
|
+
this.inputmode = 'text';
|
|
1026
|
+
this.disabled = false;
|
|
1027
|
+
this.readonly = false;
|
|
1028
|
+
this.autofocus = false;
|
|
1029
|
+
this.passwordIcons = false;
|
|
1030
|
+
this.placeholder = undefined;
|
|
1031
|
+
this.prefix = null;
|
|
1032
|
+
this.suffix = null;
|
|
1033
|
+
this.eyeOn = true;
|
|
1034
|
+
this.onChange = () => { };
|
|
1035
|
+
this.onTouch = () => { };
|
|
1138
1036
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1037
|
+
get elClasses() {
|
|
1038
|
+
return {
|
|
1039
|
+
'wr-input': true,
|
|
1040
|
+
'wr-input--has-prefix': this.prefix,
|
|
1041
|
+
'wr-input--has-suffix': this.suffix,
|
|
1042
|
+
'wr-input--password': this.passwordIcons,
|
|
1043
|
+
'wr-input--disabled': this.disabled
|
|
1044
|
+
};
|
|
1142
1045
|
}
|
|
1143
|
-
|
|
1144
|
-
this.
|
|
1145
|
-
|
|
1146
|
-
|
|
1046
|
+
ngOnInit() {
|
|
1047
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1048
|
+
fromEvent(this.elRef.nativeElement, 'click')
|
|
1049
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1050
|
+
.subscribe(event => {
|
|
1051
|
+
event.preventDefault();
|
|
1052
|
+
this.focus();
|
|
1053
|
+
if (this.disabled) {
|
|
1054
|
+
event.stopImmediatePropagation();
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
fromEvent(this.inputElement.nativeElement, 'click')
|
|
1059
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1060
|
+
.subscribe(event => event.stopPropagation());
|
|
1061
|
+
});
|
|
1147
1062
|
}
|
|
1148
|
-
|
|
1149
|
-
this.
|
|
1150
|
-
|
|
1063
|
+
ngAfterViewInit() {
|
|
1064
|
+
if (this.autofocus) {
|
|
1065
|
+
this.focus();
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
ngOnDestroy() {
|
|
1069
|
+
super.ngOnDestroy();
|
|
1070
|
+
this.focusMonitor.stopMonitoring(this.elRef);
|
|
1071
|
+
}
|
|
1072
|
+
writeValue(value) {
|
|
1073
|
+
this.value = value;
|
|
1074
|
+
this.cdr.markForCheck();
|
|
1151
1075
|
}
|
|
1152
1076
|
registerOnChange(fn) {
|
|
1153
1077
|
this.onChange = fn;
|
|
1154
1078
|
}
|
|
1155
1079
|
registerOnTouched(fn) {
|
|
1156
|
-
this.
|
|
1080
|
+
this.onTouch = fn;
|
|
1081
|
+
}
|
|
1082
|
+
setDisabledState(isDisabled) {
|
|
1083
|
+
this.disabled = isDisabled;
|
|
1084
|
+
this.cdr.markForCheck();
|
|
1085
|
+
}
|
|
1086
|
+
focus() {
|
|
1087
|
+
this.focusMonitor.focusVia(this.inputElement, 'keyboard');
|
|
1088
|
+
}
|
|
1089
|
+
blur() {
|
|
1090
|
+
this.inputElement.nativeElement.blur();
|
|
1157
1091
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1092
|
+
onPasswordVisibilityChange(event) {
|
|
1093
|
+
event.stopPropagation();
|
|
1094
|
+
this.type === 'password' ? (this.type = 'text') : (this.type = 'password');
|
|
1095
|
+
this.eyeOn = !this.eyeOn;
|
|
1096
|
+
}
|
|
1097
|
+
onModelChange(value) {
|
|
1098
|
+
if (!this.disabled) {
|
|
1099
|
+
this.value = value;
|
|
1100
|
+
this.onChange(this.value);
|
|
1101
|
+
}
|
|
1160
1102
|
}
|
|
1161
1103
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1104
|
+
WrInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1105
|
+
WrInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrInputComponent, selector: "wr-input", inputs: { value: "value", type: "type", autocomplete: "autocomplete", inputmode: "inputmode", disabled: "disabled", readonly: "readonly", autofocus: "autofocus", passwordIcons: "passwordIcons", placeholder: "placeholder", prefix: "prefix", suffix: "suffix" }, host: { properties: { "class": "this.elClasses" } }, providers: [
|
|
1106
|
+
{
|
|
1107
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1108
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1109
|
+
multi: true
|
|
1110
|
+
}
|
|
1111
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], exportAs: ["wrInput"], usesInheritance: true, ngImport: i0, template: "<div class=\"wr-input-prefix\" *ngIf=\"prefix\">\n <span class=\"wr-input-prefix__text\">{{ prefix }}</span>\n</div>\n<div class=\"wr-input-el\">\n <div\n *ngIf=\"passwordIcons\"\n class=\"wr-input-el-icon\"\n (click)=\"onPasswordVisibilityChange($event)\"\n >\n <wr-icon class=\"wr-input-el-icon__icon\" [name]=\"eyeOn ? 'eye' : 'eye-off'\"></wr-icon>\n </div>\n <input\n #inputElement\n class=\"wr-input-el__native\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [attr.readonly]=\"readonly ? 'readonly' : null\"\n [attr.autofocus]=\"autofocus ? 'autofocus' : null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange(value)\"\n />\n</div>\n<div class=\"wr-input-suffix\" *ngIf=\"suffix\">\n <span class=\"wr-input-suffix__text\">{{ suffix }}</span>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1112
|
+
__decorate([
|
|
1113
|
+
InputBoolean()
|
|
1114
|
+
], WrInputComponent.prototype, "disabled", void 0);
|
|
1115
|
+
__decorate([
|
|
1116
|
+
InputBoolean()
|
|
1117
|
+
], WrInputComponent.prototype, "readonly", void 0);
|
|
1118
|
+
__decorate([
|
|
1119
|
+
InputBoolean()
|
|
1120
|
+
], WrInputComponent.prototype, "autofocus", void 0);
|
|
1121
|
+
__decorate([
|
|
1122
|
+
InputBoolean()
|
|
1123
|
+
], WrInputComponent.prototype, "passwordIcons", void 0);
|
|
1124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputComponent, decorators: [{
|
|
1165
1125
|
type: Component,
|
|
1166
|
-
args: [{ selector: 'wr-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}] }]
|
|
1173
|
-
|
|
1126
|
+
args: [{ selector: 'wr-input', exportAs: 'wrInput', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
1127
|
+
{
|
|
1128
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1129
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1130
|
+
multi: true
|
|
1131
|
+
}
|
|
1132
|
+
], template: "<div class=\"wr-input-prefix\" *ngIf=\"prefix\">\n <span class=\"wr-input-prefix__text\">{{ prefix }}</span>\n</div>\n<div class=\"wr-input-el\">\n <div\n *ngIf=\"passwordIcons\"\n class=\"wr-input-el-icon\"\n (click)=\"onPasswordVisibilityChange($event)\"\n >\n <wr-icon class=\"wr-input-el-icon__icon\" [name]=\"eyeOn ? 'eye' : 'eye-off'\"></wr-icon>\n </div>\n <input\n #inputElement\n class=\"wr-input-el__native\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [attr.readonly]=\"readonly ? 'readonly' : null\"\n [attr.autofocus]=\"autofocus ? 'autofocus' : null\"\n [attr.disabled]=\"disabled ? 'disabled' : null\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onModelChange(value)\"\n />\n</div>\n<div class=\"wr-input-suffix\" *ngIf=\"suffix\">\n <span class=\"wr-input-suffix__text\">{{ suffix }}</span>\n</div>\n" }]
|
|
1133
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { value: [{
|
|
1134
|
+
type: Input
|
|
1135
|
+
}], type: [{
|
|
1136
|
+
type: Input
|
|
1137
|
+
}], autocomplete: [{
|
|
1138
|
+
type: Input
|
|
1139
|
+
}], inputmode: [{
|
|
1140
|
+
type: Input
|
|
1141
|
+
}], disabled: [{
|
|
1142
|
+
type: Input
|
|
1143
|
+
}], readonly: [{
|
|
1144
|
+
type: Input
|
|
1145
|
+
}], autofocus: [{
|
|
1146
|
+
type: Input
|
|
1147
|
+
}], passwordIcons: [{
|
|
1148
|
+
type: Input
|
|
1149
|
+
}], placeholder: [{
|
|
1150
|
+
type: Input
|
|
1151
|
+
}], prefix: [{
|
|
1152
|
+
type: Input
|
|
1153
|
+
}], suffix: [{
|
|
1154
|
+
type: Input
|
|
1155
|
+
}], inputElement: [{
|
|
1156
|
+
type: ViewChild,
|
|
1157
|
+
args: ['inputElement', { static: true }]
|
|
1158
|
+
}], elClasses: [{
|
|
1174
1159
|
type: HostBinding,
|
|
1175
1160
|
args: ['class']
|
|
1176
1161
|
}] } });
|
|
1177
1162
|
|
|
1178
|
-
class
|
|
1163
|
+
class WrInputModule {
|
|
1179
1164
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type:
|
|
1165
|
+
WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1166
|
+
WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, declarations: [WrInputComponent], imports: [CommonModule, FormsModule, WrIconModule], exports: [WrInputComponent] });
|
|
1167
|
+
WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, imports: [CommonModule, FormsModule, WrIconModule] });
|
|
1168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, decorators: [{
|
|
1184
1169
|
type: NgModule,
|
|
1185
1170
|
args: [{
|
|
1186
|
-
imports: [CommonModule,
|
|
1187
|
-
declarations: [
|
|
1188
|
-
exports: [
|
|
1171
|
+
imports: [CommonModule, FormsModule, WrIconModule],
|
|
1172
|
+
declarations: [WrInputComponent],
|
|
1173
|
+
exports: [WrInputComponent]
|
|
1189
1174
|
}]
|
|
1190
1175
|
}] });
|
|
1191
1176
|
|
|
1192
1177
|
class WrSkeletonComponent {
|
|
1193
|
-
constructor(
|
|
1194
|
-
this.elRef = elRef;
|
|
1178
|
+
constructor() {
|
|
1195
1179
|
this.color = 'dark';
|
|
1196
|
-
this.
|
|
1180
|
+
this.animated = true;
|
|
1197
1181
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1182
|
+
get elClasses() {
|
|
1183
|
+
return {
|
|
1184
|
+
'wr-skeleton': true,
|
|
1185
|
+
'wr-skeleton--animated': this.animated,
|
|
1186
|
+
'wr-skeleton--primary': this.color === 'primary',
|
|
1187
|
+
'wr-skeleton--secondary': this.color === 'secondary',
|
|
1188
|
+
'wr-skeleton--success': this.color === 'success',
|
|
1189
|
+
'wr-skeleton--warning': this.color === 'warning',
|
|
1190
|
+
'wr-skeleton--danger': this.color === 'danger',
|
|
1191
|
+
'wr-skeleton--light': this.color === 'light',
|
|
1192
|
+
'wr-skeleton--medium': this.color === 'medium',
|
|
1193
|
+
'wr-skeleton--dark': this.color === 'dark'
|
|
1194
|
+
};
|
|
1201
1195
|
}
|
|
1202
1196
|
}
|
|
1203
|
-
WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, deps: [
|
|
1204
|
-
WrSkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrSkeletonComponent, selector: "wr-skeleton", inputs: { color: "color" }, host: { properties: { "class": "this.
|
|
1197
|
+
WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1198
|
+
WrSkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrSkeletonComponent, selector: "wr-skeleton", inputs: { color: "color", animated: "animated" }, host: { properties: { "class": "this.elClasses" } }, exportAs: ["wrSkeleton"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1199
|
+
__decorate([
|
|
1200
|
+
InputBoolean()
|
|
1201
|
+
], WrSkeletonComponent.prototype, "animated", void 0);
|
|
1205
1202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, decorators: [{
|
|
1206
1203
|
type: Component,
|
|
1207
1204
|
args: [{
|
|
1208
1205
|
selector: 'wr-skeleton',
|
|
1209
|
-
|
|
1206
|
+
exportAs: 'wrSkeleton',
|
|
1207
|
+
template: '',
|
|
1210
1208
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1211
1209
|
encapsulation: ViewEncapsulation.None
|
|
1212
1210
|
}]
|
|
1213
|
-
}],
|
|
1211
|
+
}], propDecorators: { color: [{
|
|
1212
|
+
type: Input
|
|
1213
|
+
}], animated: [{
|
|
1214
1214
|
type: Input
|
|
1215
|
-
}],
|
|
1215
|
+
}], elClasses: [{
|
|
1216
1216
|
type: HostBinding,
|
|
1217
1217
|
args: ['class']
|
|
1218
1218
|
}] } });
|
|
@@ -1220,112 +1220,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1220
1220
|
class WrSkeletonModule {
|
|
1221
1221
|
}
|
|
1222
1222
|
WrSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1223
|
-
WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule
|
|
1224
|
-
WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule
|
|
1223
|
+
WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule], exports: [WrSkeletonComponent] });
|
|
1224
|
+
WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule] });
|
|
1225
1225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, decorators: [{
|
|
1226
1226
|
type: NgModule,
|
|
1227
1227
|
args: [{
|
|
1228
|
-
imports: [CommonModule
|
|
1228
|
+
imports: [CommonModule],
|
|
1229
1229
|
declarations: [WrSkeletonComponent],
|
|
1230
1230
|
exports: [WrSkeletonComponent]
|
|
1231
1231
|
}]
|
|
1232
1232
|
}] });
|
|
1233
1233
|
|
|
1234
1234
|
class WrTagComponent {
|
|
1235
|
-
constructor(
|
|
1236
|
-
this.cdr = cdr;
|
|
1237
|
-
this.elRef = elRef;
|
|
1238
|
-
this.r2 = r2;
|
|
1235
|
+
constructor() {
|
|
1239
1236
|
this.color = 'primary';
|
|
1240
|
-
this.
|
|
1241
|
-
this.
|
|
1237
|
+
this.icon = null;
|
|
1238
|
+
this.iconPosition = 'start';
|
|
1242
1239
|
this.outlined = false;
|
|
1243
1240
|
this.rounded = false;
|
|
1241
|
+
this.transparent = false;
|
|
1244
1242
|
this.hoverable = false;
|
|
1245
|
-
this.
|
|
1246
|
-
}
|
|
1247
|
-
ngOnInit() {
|
|
1248
|
-
this.setClasses();
|
|
1249
|
-
}
|
|
1250
|
-
ngOnChanges(changes) {
|
|
1251
|
-
this.setClasses();
|
|
1252
|
-
this.cdr.detectChanges();
|
|
1243
|
+
this.loading = false;
|
|
1253
1244
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1245
|
+
get elClasses() {
|
|
1246
|
+
return {
|
|
1247
|
+
'wr-tag': true,
|
|
1248
|
+
'wr-tag--primary': this.color === 'primary',
|
|
1249
|
+
'wr-tag--secondary': this.color === 'secondary',
|
|
1250
|
+
'wr-tag--success': this.color === 'success',
|
|
1251
|
+
'wr-tag--warning': this.color === 'warning',
|
|
1252
|
+
'wr-tag--danger': this.color === 'danger',
|
|
1253
|
+
'wr-tag--light': this.color === 'light',
|
|
1254
|
+
'wr-tag--medium': this.color === 'medium',
|
|
1255
|
+
'wr-tag--dark': this.color === 'dark',
|
|
1256
|
+
'wr-tag--icon-start': (this.icon || this.loading) && this.iconPosition === 'start',
|
|
1257
|
+
'wr-tag--icon-end': (this.icon || this.loading) && this.iconPosition === 'end',
|
|
1258
|
+
'wr-tag--loading': this.loading,
|
|
1259
|
+
'wr-tag--rounded': this.rounded,
|
|
1260
|
+
'wr-tag--outlined': this.outlined,
|
|
1261
|
+
'wr-tag--transparent': this.transparent,
|
|
1262
|
+
'wr-tag--hoverable': this.hoverable
|
|
1263
|
+
};
|
|
1271
1264
|
}
|
|
1272
1265
|
}
|
|
1273
|
-
WrTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, deps: [
|
|
1274
|
-
WrTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrTagComponent, selector: "wr-tag", inputs: { color: "color",
|
|
1266
|
+
WrTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1267
|
+
WrTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrTagComponent, selector: "wr-tag", inputs: { color: "color", icon: "icon", iconPosition: "iconPosition", outlined: "outlined", rounded: "rounded", transparent: "transparent", hoverable: "hoverable", loading: "loading" }, host: { properties: { "class": "this.elClasses" } }, exportAs: ["wrTag"], ngImport: i0, template: "<wr-spin class=\"wr-tag__spin\" *ngIf=\"loading && iconPosition === 'start'\"></wr-spin>\n<wr-icon class=\"wr-tag__icon\" *ngIf=\"icon && !loading && iconPosition === 'start'\" [name]=\"icon\"></wr-icon>\n<ng-content></ng-content>\n<wr-spin class=\"wr-tag__spin\" *ngIf=\"loading && iconPosition === 'end'\"></wr-spin>\n<wr-icon class=\"wr-tag__icon\" *ngIf=\"icon && !loading && iconPosition === 'end'\" [name]=\"icon\"></wr-icon>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin", exportAs: ["wrSpin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1275
1268
|
__decorate([
|
|
1276
1269
|
InputBoolean()
|
|
1277
|
-
], WrTagComponent.prototype, "
|
|
1270
|
+
], WrTagComponent.prototype, "outlined", void 0);
|
|
1278
1271
|
__decorate([
|
|
1279
1272
|
InputBoolean()
|
|
1280
|
-
], WrTagComponent.prototype, "
|
|
1273
|
+
], WrTagComponent.prototype, "rounded", void 0);
|
|
1281
1274
|
__decorate([
|
|
1282
1275
|
InputBoolean()
|
|
1283
|
-
], WrTagComponent.prototype, "
|
|
1276
|
+
], WrTagComponent.prototype, "transparent", void 0);
|
|
1284
1277
|
__decorate([
|
|
1285
1278
|
InputBoolean()
|
|
1286
|
-
], WrTagComponent.prototype, "
|
|
1279
|
+
], WrTagComponent.prototype, "hoverable", void 0);
|
|
1287
1280
|
__decorate([
|
|
1288
1281
|
InputBoolean()
|
|
1289
|
-
], WrTagComponent.prototype, "
|
|
1282
|
+
], WrTagComponent.prototype, "loading", void 0);
|
|
1290
1283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, decorators: [{
|
|
1291
1284
|
type: Component,
|
|
1292
|
-
args: [{
|
|
1293
|
-
|
|
1294
|
-
template: '<wr-spin *ngIf="loading"></wr-spin><ng-content></ng-content>',
|
|
1295
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1296
|
-
encapsulation: ViewEncapsulation.None
|
|
1297
|
-
}]
|
|
1298
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
|
|
1285
|
+
args: [{ selector: 'wr-tag', exportAs: 'wrTag', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<wr-spin class=\"wr-tag__spin\" *ngIf=\"loading && iconPosition === 'start'\"></wr-spin>\n<wr-icon class=\"wr-tag__icon\" *ngIf=\"icon && !loading && iconPosition === 'start'\" [name]=\"icon\"></wr-icon>\n<ng-content></ng-content>\n<wr-spin class=\"wr-tag__spin\" *ngIf=\"loading && iconPosition === 'end'\"></wr-spin>\n<wr-icon class=\"wr-tag__icon\" *ngIf=\"icon && !loading && iconPosition === 'end'\" [name]=\"icon\"></wr-icon>\n" }]
|
|
1286
|
+
}], propDecorators: { color: [{
|
|
1299
1287
|
type: Input
|
|
1300
|
-
}],
|
|
1288
|
+
}], icon: [{
|
|
1301
1289
|
type: Input
|
|
1302
|
-
}],
|
|
1290
|
+
}], iconPosition: [{
|
|
1303
1291
|
type: Input
|
|
1304
1292
|
}], outlined: [{
|
|
1305
1293
|
type: Input
|
|
1306
1294
|
}], rounded: [{
|
|
1307
1295
|
type: Input
|
|
1296
|
+
}], transparent: [{
|
|
1297
|
+
type: Input
|
|
1308
1298
|
}], hoverable: [{
|
|
1309
1299
|
type: Input
|
|
1300
|
+
}], loading: [{
|
|
1301
|
+
type: Input
|
|
1302
|
+
}], elClasses: [{
|
|
1303
|
+
type: HostBinding,
|
|
1304
|
+
args: ['class']
|
|
1310
1305
|
}] } });
|
|
1311
1306
|
|
|
1312
1307
|
class WrTagModule {
|
|
1313
1308
|
}
|
|
1314
1309
|
WrTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1315
|
-
WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrTagComponent] });
|
|
1316
|
-
WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrSpinnerModule] });
|
|
1310
|
+
WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrIconModule, WrSpinnerModule], exports: [WrTagComponent] });
|
|
1311
|
+
WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrIconModule, WrSpinnerModule] });
|
|
1317
1312
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, decorators: [{
|
|
1318
1313
|
type: NgModule,
|
|
1319
1314
|
args: [{
|
|
1320
|
-
imports: [CommonModule, WrSpinnerModule],
|
|
1315
|
+
imports: [CommonModule, WrIconModule, WrSpinnerModule],
|
|
1321
1316
|
declarations: [WrTagComponent],
|
|
1322
1317
|
exports: [WrTagComponent]
|
|
1323
1318
|
}]
|
|
1324
1319
|
}] });
|
|
1325
1320
|
|
|
1321
|
+
// Components
|
|
1322
|
+
|
|
1326
1323
|
/**
|
|
1327
1324
|
* Generated bundle index. Do not edit.
|
|
1328
1325
|
*/
|
|
1329
1326
|
|
|
1330
|
-
export { WrButtonComponent, WrButtonModule, WrCheckboxComponent, WrCheckboxModule, WrDividerComponent, WrDividerModule,
|
|
1327
|
+
export { WrButtonComponent, WrButtonModule, WrCheckboxComponent, WrCheckboxModule, WrDividerComponent, WrDividerModule, WrFormErrorComponent, WrFormItemComponent, WrFormModule, WrIconComponent, WrIconModule, WrIconService, WrInputComponent, WrInputModule, WrSkeletonComponent, WrSkeletonModule, WrSpinnerComponent, WrSpinnerModule, WrTagComponent, WrTagModule, wrIconSet };
|
|
1331
1328
|
//# sourceMappingURL=ngwr.mjs.map
|