ngwr 0.0.15 → 0.1.1
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 +4 -0
- package/_core/types/input-autocomplete-type.d.ts +1 -0
- package/_core/types/input-mode-type.d.ts +1 -0
- package/_core/types/input-type.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/_core/types/input-autocomplete-type.mjs +2 -0
- package/esm2020/_core/types/input-mode-type.mjs +2 -0
- package/esm2020/_core/types/input-type.mjs +2 -0
- 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 +238 -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 +514 -440
- package/fesm2015/ngwr.mjs.map +1 -1
- package/fesm2020/ngwr.mjs +515 -434
- 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 +62 -0
- package/input/input.module.d.ts +4 -3
- package/ngwr.min.css +1 -1
- package/package.json +1 -1
- 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';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
|
+
import * as i2 from '@angular/forms';
|
|
10
|
+
import { NG_VALUE_ACCESSOR, FormsModule, NG_VALIDATORS } from '@angular/forms';
|
|
11
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
|
10
12
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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';
|
|
886
|
+
}
|
|
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
|
+
};
|
|
865
909
|
}
|
|
866
910
|
}
|
|
867
911
|
WrDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
868
|
-
WrDividerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrDividerComponent, selector: "wr-divider", host: { properties: { "class": "this.
|
|
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 });
|
|
869
913
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, decorators: [{
|
|
870
914
|
type: Component,
|
|
871
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,284 @@ 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.
|
|
1131
|
-
this.
|
|
1132
|
-
this.
|
|
1133
|
-
this.
|
|
1134
|
-
this.
|
|
1135
|
-
|
|
1136
|
-
|
|
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;
|
|
1022
|
+
this.placeholder = '';
|
|
1023
|
+
this.prefix = null;
|
|
1024
|
+
this.suffix = null;
|
|
1025
|
+
this.passwordIcons = false;
|
|
1026
|
+
this.eyeOn = true;
|
|
1027
|
+
this._value = '';
|
|
1028
|
+
this._disabled = false;
|
|
1029
|
+
this._readonly = false;
|
|
1030
|
+
this._required = false;
|
|
1031
|
+
this._autofocus = false;
|
|
1032
|
+
this._focused = false;
|
|
1033
|
+
this._autocomplete = 'off';
|
|
1034
|
+
this._type = 'text';
|
|
1035
|
+
this._mode = 'text';
|
|
1036
|
+
this.onChangeCallback = () => { };
|
|
1037
|
+
this.onTouchedCallback = () => { };
|
|
1038
|
+
}
|
|
1039
|
+
get type() {
|
|
1040
|
+
return this._type;
|
|
1041
|
+
}
|
|
1042
|
+
set type(type) {
|
|
1043
|
+
this._type = type;
|
|
1044
|
+
}
|
|
1045
|
+
get inputmode() {
|
|
1046
|
+
return this._mode;
|
|
1047
|
+
}
|
|
1048
|
+
set inputmode(mode) {
|
|
1049
|
+
this._mode = mode;
|
|
1050
|
+
}
|
|
1051
|
+
get disabled() {
|
|
1052
|
+
return this._disabled;
|
|
1053
|
+
}
|
|
1054
|
+
set disabled(disabled) {
|
|
1055
|
+
this._disabled = coerceBooleanProperty(disabled);
|
|
1056
|
+
}
|
|
1057
|
+
get readonly() {
|
|
1058
|
+
return this._readonly;
|
|
1059
|
+
}
|
|
1060
|
+
set readonly(readonly) {
|
|
1061
|
+
this._readonly = coerceBooleanProperty(readonly);
|
|
1062
|
+
}
|
|
1063
|
+
get required() {
|
|
1064
|
+
return this._required;
|
|
1065
|
+
}
|
|
1066
|
+
set required(required) {
|
|
1067
|
+
this._required = coerceBooleanProperty(required);
|
|
1068
|
+
}
|
|
1069
|
+
get autofocus() {
|
|
1070
|
+
return this._autofocus;
|
|
1071
|
+
}
|
|
1072
|
+
set autofocus(autofocus) {
|
|
1073
|
+
this._autofocus = coerceBooleanProperty(autofocus);
|
|
1074
|
+
}
|
|
1075
|
+
get autocomplete() {
|
|
1076
|
+
return this._autocomplete;
|
|
1077
|
+
}
|
|
1078
|
+
set autocomplete(autofocus) {
|
|
1079
|
+
this._autocomplete = autofocus;
|
|
1080
|
+
}
|
|
1081
|
+
get value() {
|
|
1082
|
+
return this.type === 'number' ? this.valueAsNumber : this._value;
|
|
1083
|
+
}
|
|
1084
|
+
set value(val) {
|
|
1085
|
+
if (val !== this._value) {
|
|
1086
|
+
this._value = val;
|
|
1087
|
+
this.onChangeCallback(this.value);
|
|
1137
1088
|
}
|
|
1138
1089
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1090
|
+
get valueAsString() {
|
|
1091
|
+
if (this._value == null || typeof this._value === 'undefined')
|
|
1092
|
+
return '';
|
|
1093
|
+
return String(this._value);
|
|
1094
|
+
}
|
|
1095
|
+
get valueAsNumber() {
|
|
1096
|
+
return coerceNumberProperty(this._value);
|
|
1142
1097
|
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
this.
|
|
1146
|
-
|
|
1098
|
+
get isBadInput() {
|
|
1099
|
+
var _a, _b;
|
|
1100
|
+
const validity = (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.validity;
|
|
1101
|
+
return validity && validity.badInput;
|
|
1147
1102
|
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1103
|
+
get elClasses() {
|
|
1104
|
+
return {
|
|
1105
|
+
'wr-input': true,
|
|
1106
|
+
'wr-input--has-prefix': this.prefix,
|
|
1107
|
+
'wr-input--has-suffix': this.suffix,
|
|
1108
|
+
'wr-input--password': this.passwordIcons,
|
|
1109
|
+
'wr-input--disabled': this.disabled
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
ngOnInit() {
|
|
1113
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1114
|
+
fromEvent(this.elRef.nativeElement, 'click')
|
|
1115
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1116
|
+
.subscribe(event => {
|
|
1117
|
+
event.preventDefault();
|
|
1118
|
+
this.onFocus();
|
|
1119
|
+
if (this.disabled) {
|
|
1120
|
+
event.stopImmediatePropagation();
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
fromEvent(this.inputElement.nativeElement, 'click')
|
|
1125
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
1126
|
+
.subscribe(event => event.stopPropagation());
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
ngAfterViewInit() {
|
|
1130
|
+
if (this.autofocus) {
|
|
1131
|
+
this.onFocus();
|
|
1132
|
+
this.cdr.markForCheck();
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
ngOnDestroy() {
|
|
1136
|
+
super.ngOnDestroy();
|
|
1137
|
+
this.focusMonitor.stopMonitoring(this.elRef);
|
|
1138
|
+
}
|
|
1139
|
+
onFocus(event) {
|
|
1140
|
+
if (event) {
|
|
1141
|
+
event.stopPropagation();
|
|
1142
|
+
}
|
|
1143
|
+
this._focused = true;
|
|
1144
|
+
this.focusMonitor.focusVia(this.inputElement, 'keyboard');
|
|
1145
|
+
}
|
|
1146
|
+
onBlur(event) {
|
|
1147
|
+
if (event) {
|
|
1148
|
+
event.stopPropagation();
|
|
1149
|
+
}
|
|
1150
|
+
this._focused = false;
|
|
1151
|
+
// this.inputElement.nativeElement.blur();
|
|
1152
|
+
this.onTouchedCallback();
|
|
1153
|
+
}
|
|
1154
|
+
validate(control) {
|
|
1155
|
+
return Object.assign({}, (this.isBadInput ? { badInput: true } : null));
|
|
1156
|
+
}
|
|
1157
|
+
writeValue(value) {
|
|
1158
|
+
if (value !== this._value) {
|
|
1159
|
+
this._value = value;
|
|
1160
|
+
}
|
|
1161
|
+
this.cdr.markForCheck();
|
|
1151
1162
|
}
|
|
1152
1163
|
registerOnChange(fn) {
|
|
1153
|
-
this.
|
|
1164
|
+
this.onChangeCallback = fn;
|
|
1154
1165
|
}
|
|
1155
1166
|
registerOnTouched(fn) {
|
|
1156
|
-
this.
|
|
1167
|
+
this.onTouchedCallback = fn;
|
|
1157
1168
|
}
|
|
1158
|
-
|
|
1159
|
-
this.
|
|
1169
|
+
onPasswordVisibilityChange() {
|
|
1170
|
+
this.type === 'password' ? (this.type = 'text') : (this.type = 'password');
|
|
1171
|
+
this.eyeOn = !this.eyeOn;
|
|
1172
|
+
this.onFocus();
|
|
1173
|
+
}
|
|
1174
|
+
setDisabledState(isDisabled) {
|
|
1175
|
+
this.disabled = coerceBooleanProperty(isDisabled);
|
|
1160
1176
|
}
|
|
1161
1177
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1178
|
+
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 });
|
|
1179
|
+
WrInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrInputComponent, selector: "wr-input", inputs: { placeholder: "placeholder", prefix: "prefix", suffix: "suffix", passwordIcons: "passwordIcons", type: "type", inputmode: "inputmode", disabled: "disabled", readonly: "readonly", required: "required", autofocus: "autofocus", autocomplete: "autocomplete", value: "value" }, host: { properties: { "class": "this.elClasses" } }, providers: [
|
|
1180
|
+
{
|
|
1181
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1182
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1183
|
+
multi: true
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
provide: NG_VALIDATORS,
|
|
1187
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1188
|
+
multi: true
|
|
1189
|
+
}
|
|
1190
|
+
], 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 *ngIf=\"passwordIcons\" class=\"wr-input-el-icon\" (click)=\"onPasswordVisibilityChange()\">\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 [ngModel]=\"valueAsString\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [type]=\"type\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (ngModelChange)=\"value = $event\"\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 });
|
|
1191
|
+
__decorate([
|
|
1192
|
+
InputBoolean()
|
|
1193
|
+
], WrInputComponent.prototype, "passwordIcons", void 0);
|
|
1194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputComponent, decorators: [{
|
|
1165
1195
|
type: Component,
|
|
1166
|
-
args: [{ selector: 'wr-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1196
|
+
args: [{ selector: 'wr-input', exportAs: 'wrInput', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
1197
|
+
{
|
|
1198
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1199
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1200
|
+
multi: true
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
provide: NG_VALIDATORS,
|
|
1204
|
+
useExisting: forwardRef(() => WrInputComponent),
|
|
1205
|
+
multi: true
|
|
1206
|
+
}
|
|
1207
|
+
], 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 *ngIf=\"passwordIcons\" class=\"wr-input-el-icon\" (click)=\"onPasswordVisibilityChange()\">\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 [ngModel]=\"valueAsString\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [type]=\"type\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (ngModelChange)=\"value = $event\"\n />\n</div>\n<div class=\"wr-input-suffix\" *ngIf=\"suffix\">\n <span class=\"wr-input-suffix__text\">{{ suffix }}</span>\n</div>\n" }]
|
|
1208
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { placeholder: [{
|
|
1209
|
+
type: Input
|
|
1210
|
+
}], prefix: [{
|
|
1211
|
+
type: Input
|
|
1212
|
+
}], suffix: [{
|
|
1213
|
+
type: Input
|
|
1214
|
+
}], passwordIcons: [{
|
|
1215
|
+
type: Input
|
|
1216
|
+
}], type: [{
|
|
1217
|
+
type: Input
|
|
1218
|
+
}], inputmode: [{
|
|
1219
|
+
type: Input
|
|
1220
|
+
}], disabled: [{
|
|
1221
|
+
type: Input
|
|
1222
|
+
}], readonly: [{
|
|
1223
|
+
type: Input
|
|
1224
|
+
}], required: [{
|
|
1225
|
+
type: Input
|
|
1226
|
+
}], autofocus: [{
|
|
1227
|
+
type: Input
|
|
1228
|
+
}], autocomplete: [{
|
|
1229
|
+
type: Input
|
|
1230
|
+
}], value: [{
|
|
1231
|
+
type: Input
|
|
1232
|
+
}], inputElement: [{
|
|
1233
|
+
type: ViewChild,
|
|
1234
|
+
args: ['inputElement', { static: true }]
|
|
1235
|
+
}], elClasses: [{
|
|
1174
1236
|
type: HostBinding,
|
|
1175
1237
|
args: ['class']
|
|
1176
1238
|
}] } });
|
|
1177
1239
|
|
|
1178
|
-
class
|
|
1240
|
+
class WrInputModule {
|
|
1179
1241
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type:
|
|
1242
|
+
WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1243
|
+
WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, declarations: [WrInputComponent], imports: [CommonModule, FormsModule, WrIconModule], exports: [WrInputComponent] });
|
|
1244
|
+
WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, imports: [CommonModule, FormsModule, WrIconModule] });
|
|
1245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, decorators: [{
|
|
1184
1246
|
type: NgModule,
|
|
1185
1247
|
args: [{
|
|
1186
|
-
imports: [CommonModule,
|
|
1187
|
-
declarations: [
|
|
1188
|
-
exports: [
|
|
1248
|
+
imports: [CommonModule, FormsModule, WrIconModule],
|
|
1249
|
+
declarations: [WrInputComponent],
|
|
1250
|
+
exports: [WrInputComponent]
|
|
1189
1251
|
}]
|
|
1190
1252
|
}] });
|
|
1191
1253
|
|
|
1192
1254
|
class WrSkeletonComponent {
|
|
1193
|
-
constructor(
|
|
1194
|
-
this.elRef = elRef;
|
|
1255
|
+
constructor() {
|
|
1195
1256
|
this.color = 'dark';
|
|
1196
|
-
this.
|
|
1257
|
+
this.animated = true;
|
|
1197
1258
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1259
|
+
get elClasses() {
|
|
1260
|
+
return {
|
|
1261
|
+
'wr-skeleton': true,
|
|
1262
|
+
'wr-skeleton--animated': this.animated,
|
|
1263
|
+
'wr-skeleton--primary': this.color === 'primary',
|
|
1264
|
+
'wr-skeleton--secondary': this.color === 'secondary',
|
|
1265
|
+
'wr-skeleton--success': this.color === 'success',
|
|
1266
|
+
'wr-skeleton--warning': this.color === 'warning',
|
|
1267
|
+
'wr-skeleton--danger': this.color === 'danger',
|
|
1268
|
+
'wr-skeleton--light': this.color === 'light',
|
|
1269
|
+
'wr-skeleton--medium': this.color === 'medium',
|
|
1270
|
+
'wr-skeleton--dark': this.color === 'dark'
|
|
1271
|
+
};
|
|
1201
1272
|
}
|
|
1202
1273
|
}
|
|
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.
|
|
1274
|
+
WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1275
|
+
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 });
|
|
1276
|
+
__decorate([
|
|
1277
|
+
InputBoolean()
|
|
1278
|
+
], WrSkeletonComponent.prototype, "animated", void 0);
|
|
1205
1279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, decorators: [{
|
|
1206
1280
|
type: Component,
|
|
1207
1281
|
args: [{
|
|
1208
1282
|
selector: 'wr-skeleton',
|
|
1209
|
-
|
|
1283
|
+
exportAs: 'wrSkeleton',
|
|
1284
|
+
template: '',
|
|
1210
1285
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1211
1286
|
encapsulation: ViewEncapsulation.None
|
|
1212
1287
|
}]
|
|
1213
|
-
}],
|
|
1288
|
+
}], propDecorators: { color: [{
|
|
1214
1289
|
type: Input
|
|
1215
|
-
}],
|
|
1290
|
+
}], animated: [{
|
|
1291
|
+
type: Input
|
|
1292
|
+
}], elClasses: [{
|
|
1216
1293
|
type: HostBinding,
|
|
1217
1294
|
args: ['class']
|
|
1218
1295
|
}] } });
|
|
@@ -1220,112 +1297,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1220
1297
|
class WrSkeletonModule {
|
|
1221
1298
|
}
|
|
1222
1299
|
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
|
|
1300
|
+
WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule], exports: [WrSkeletonComponent] });
|
|
1301
|
+
WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule] });
|
|
1225
1302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, decorators: [{
|
|
1226
1303
|
type: NgModule,
|
|
1227
1304
|
args: [{
|
|
1228
|
-
imports: [CommonModule
|
|
1305
|
+
imports: [CommonModule],
|
|
1229
1306
|
declarations: [WrSkeletonComponent],
|
|
1230
1307
|
exports: [WrSkeletonComponent]
|
|
1231
1308
|
}]
|
|
1232
1309
|
}] });
|
|
1233
1310
|
|
|
1234
1311
|
class WrTagComponent {
|
|
1235
|
-
constructor(
|
|
1236
|
-
this.cdr = cdr;
|
|
1237
|
-
this.elRef = elRef;
|
|
1238
|
-
this.r2 = r2;
|
|
1312
|
+
constructor() {
|
|
1239
1313
|
this.color = 'primary';
|
|
1240
|
-
this.
|
|
1241
|
-
this.
|
|
1314
|
+
this.icon = null;
|
|
1315
|
+
this.iconPosition = 'start';
|
|
1242
1316
|
this.outlined = false;
|
|
1243
1317
|
this.rounded = false;
|
|
1318
|
+
this.transparent = false;
|
|
1244
1319
|
this.hoverable = false;
|
|
1245
|
-
this.
|
|
1320
|
+
this.loading = false;
|
|
1246
1321
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
add(`-hoverable`);
|
|
1267
|
-
}
|
|
1268
|
-
if (this.outlined) {
|
|
1269
|
-
add(`-outlined`);
|
|
1270
|
-
}
|
|
1322
|
+
get elClasses() {
|
|
1323
|
+
return {
|
|
1324
|
+
'wr-tag': true,
|
|
1325
|
+
'wr-tag--primary': this.color === 'primary',
|
|
1326
|
+
'wr-tag--secondary': this.color === 'secondary',
|
|
1327
|
+
'wr-tag--success': this.color === 'success',
|
|
1328
|
+
'wr-tag--warning': this.color === 'warning',
|
|
1329
|
+
'wr-tag--danger': this.color === 'danger',
|
|
1330
|
+
'wr-tag--light': this.color === 'light',
|
|
1331
|
+
'wr-tag--medium': this.color === 'medium',
|
|
1332
|
+
'wr-tag--dark': this.color === 'dark',
|
|
1333
|
+
'wr-tag--icon-start': (this.icon || this.loading) && this.iconPosition === 'start',
|
|
1334
|
+
'wr-tag--icon-end': (this.icon || this.loading) && this.iconPosition === 'end',
|
|
1335
|
+
'wr-tag--loading': this.loading,
|
|
1336
|
+
'wr-tag--rounded': this.rounded,
|
|
1337
|
+
'wr-tag--outlined': this.outlined,
|
|
1338
|
+
'wr-tag--transparent': this.transparent,
|
|
1339
|
+
'wr-tag--hoverable': this.hoverable
|
|
1340
|
+
};
|
|
1271
1341
|
}
|
|
1272
1342
|
}
|
|
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",
|
|
1343
|
+
WrTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1344
|
+
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
1345
|
__decorate([
|
|
1276
1346
|
InputBoolean()
|
|
1277
|
-
], WrTagComponent.prototype, "
|
|
1347
|
+
], WrTagComponent.prototype, "outlined", void 0);
|
|
1278
1348
|
__decorate([
|
|
1279
1349
|
InputBoolean()
|
|
1280
|
-
], WrTagComponent.prototype, "
|
|
1350
|
+
], WrTagComponent.prototype, "rounded", void 0);
|
|
1281
1351
|
__decorate([
|
|
1282
1352
|
InputBoolean()
|
|
1283
|
-
], WrTagComponent.prototype, "
|
|
1353
|
+
], WrTagComponent.prototype, "transparent", void 0);
|
|
1284
1354
|
__decorate([
|
|
1285
1355
|
InputBoolean()
|
|
1286
|
-
], WrTagComponent.prototype, "
|
|
1356
|
+
], WrTagComponent.prototype, "hoverable", void 0);
|
|
1287
1357
|
__decorate([
|
|
1288
1358
|
InputBoolean()
|
|
1289
|
-
], WrTagComponent.prototype, "
|
|
1359
|
+
], WrTagComponent.prototype, "loading", void 0);
|
|
1290
1360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, decorators: [{
|
|
1291
1361
|
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: [{
|
|
1362
|
+
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" }]
|
|
1363
|
+
}], propDecorators: { color: [{
|
|
1299
1364
|
type: Input
|
|
1300
|
-
}],
|
|
1365
|
+
}], icon: [{
|
|
1301
1366
|
type: Input
|
|
1302
|
-
}],
|
|
1367
|
+
}], iconPosition: [{
|
|
1303
1368
|
type: Input
|
|
1304
1369
|
}], outlined: [{
|
|
1305
1370
|
type: Input
|
|
1306
1371
|
}], rounded: [{
|
|
1307
1372
|
type: Input
|
|
1373
|
+
}], transparent: [{
|
|
1374
|
+
type: Input
|
|
1308
1375
|
}], hoverable: [{
|
|
1309
1376
|
type: Input
|
|
1377
|
+
}], loading: [{
|
|
1378
|
+
type: Input
|
|
1379
|
+
}], elClasses: [{
|
|
1380
|
+
type: HostBinding,
|
|
1381
|
+
args: ['class']
|
|
1310
1382
|
}] } });
|
|
1311
1383
|
|
|
1312
1384
|
class WrTagModule {
|
|
1313
1385
|
}
|
|
1314
1386
|
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] });
|
|
1387
|
+
WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrIconModule, WrSpinnerModule], exports: [WrTagComponent] });
|
|
1388
|
+
WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrIconModule, WrSpinnerModule] });
|
|
1317
1389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, decorators: [{
|
|
1318
1390
|
type: NgModule,
|
|
1319
1391
|
args: [{
|
|
1320
|
-
imports: [CommonModule, WrSpinnerModule],
|
|
1392
|
+
imports: [CommonModule, WrIconModule, WrSpinnerModule],
|
|
1321
1393
|
declarations: [WrTagComponent],
|
|
1322
1394
|
exports: [WrTagComponent]
|
|
1323
1395
|
}]
|
|
1324
1396
|
}] });
|
|
1325
1397
|
|
|
1398
|
+
// Components
|
|
1399
|
+
|
|
1326
1400
|
/**
|
|
1327
1401
|
* Generated bundle index. Do not edit.
|
|
1328
1402
|
*/
|
|
1329
1403
|
|
|
1330
|
-
export { WrButtonComponent, WrButtonModule, WrCheckboxComponent, WrCheckboxModule, WrDividerComponent, WrDividerModule,
|
|
1404
|
+
export { WrButtonComponent, WrButtonModule, WrCheckboxComponent, WrCheckboxModule, WrDividerComponent, WrDividerModule, WrFormErrorComponent, WrFormItemComponent, WrFormModule, WrIconComponent, WrIconModule, WrIconService, WrInputComponent, WrInputModule, WrSkeletonComponent, WrSkeletonModule, WrSpinnerComponent, WrSpinnerModule, WrTagComponent, WrTagModule, wrIconSet };
|
|
1331
1405
|
//# sourceMappingURL=ngwr.mjs.map
|