ngwr 0.0.12 → 0.0.14

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.
Files changed (48) hide show
  1. package/_core/components/base.component.d.ts +0 -2
  2. package/_core/index.d.ts +1 -2
  3. package/_core/types/index.d.ts +4 -0
  4. package/_core/types/on-change-type.d.ts +2 -0
  5. package/_core/types/on-touched-type.d.ts +2 -0
  6. package/button/button.component.d.ts +20 -9
  7. package/button/button.module.d.ts +2 -1
  8. package/checkbox/checkbox.component.d.ts +32 -0
  9. package/checkbox/checkbox.module.d.ts +10 -0
  10. package/checkbox/index.d.ts +2 -0
  11. package/esm2020/_core/components/base.component.mjs +5 -10
  12. package/esm2020/_core/index.mjs +2 -3
  13. package/esm2020/_core/types/index.mjs +2 -0
  14. package/esm2020/_core/types/on-change-type.mjs +2 -0
  15. package/esm2020/_core/types/on-touched-type.mjs +2 -0
  16. package/esm2020/button/button.component.mjs +63 -62
  17. package/esm2020/button/button.module.mjs +7 -6
  18. package/esm2020/checkbox/checkbox.component.mjs +124 -0
  19. package/esm2020/checkbox/checkbox.module.mjs +20 -0
  20. package/esm2020/checkbox/index.mjs +3 -0
  21. package/esm2020/divider/divider.component.mjs +3 -3
  22. package/esm2020/divider/divider.module.mjs +4 -4
  23. package/esm2020/extended-input/extended-input.component.mjs +3 -3
  24. package/esm2020/extended-input/extended-input.module.mjs +4 -4
  25. package/esm2020/form/form-error.component.mjs +3 -3
  26. package/esm2020/form/form-item.component.mjs +4 -4
  27. package/esm2020/form/form.module.mjs +4 -4
  28. package/esm2020/icon/wr-icon.component.mjs +3 -3
  29. package/esm2020/icon/wr-icon.module.mjs +4 -4
  30. package/esm2020/icon/wr-icon.service.mjs +3 -3
  31. package/esm2020/input/input.directive.mjs +4 -4
  32. package/esm2020/input/input.module.mjs +4 -4
  33. package/esm2020/password-input/password-input.component.mjs +3 -3
  34. package/esm2020/password-input/password-input.module.mjs +4 -4
  35. package/esm2020/public-api.mjs +2 -1
  36. package/esm2020/skeleton/skeleton.component.mjs +3 -3
  37. package/esm2020/skeleton/skeleton.module.mjs +4 -4
  38. package/esm2020/spinner/spinner.component.mjs +3 -3
  39. package/esm2020/spinner/spinner.module.mjs +4 -4
  40. package/esm2020/tag/tag.component.mjs +4 -4
  41. package/esm2020/tag/tag.module.mjs +4 -4
  42. package/fesm2015/ngwr.mjs +724 -598
  43. package/fesm2015/ngwr.mjs.map +1 -1
  44. package/fesm2020/ngwr.mjs +719 -592
  45. package/fesm2020/ngwr.mjs.map +1 -1
  46. package/ngwr.min.css +1 -1
  47. package/package.json +8 -5
  48. package/public-api.d.ts +1 -0
package/fesm2015/ngwr.mjs CHANGED
@@ -1,523 +1,16 @@
1
1
  import * as i2 from '@angular/common';
2
- import { CommonModule, DOCUMENT } from '@angular/common';
2
+ import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, NgModule, Input, Optional, Self, Injectable, Inject } from '@angular/core';
4
+ import { Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, HostBinding, Input, NgModule, Directive, EventEmitter, forwardRef, ViewChild, Output, Self } from '@angular/core';
5
5
  import { Subject, fromEvent } from 'rxjs';
6
6
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
7
7
  import { __decorate } from 'tslib';
8
8
  import { takeUntil, filter } from 'rxjs/operators';
9
+ import * as i1 from '@angular/cdk/a11y';
10
+ import { A11yModule } from '@angular/cdk/a11y';
11
+ import * as i1$1 from '@angular/forms';
12
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
9
13
  import { PlatformModule } from '@angular/cdk/platform';
10
- import * as i1 from '@angular/forms';
11
-
12
- class BaseComponent {
13
- constructor() {
14
- this.ngUnsubscribe = new Subject();
15
- this._isDestroyed = false;
16
- }
17
- get isDestroyed() {
18
- return this._isDestroyed;
19
- }
20
- ngOnDestroy() {
21
- this._isDestroyed = true;
22
- this.ngUnsubscribe.next(undefined);
23
- this.ngUnsubscribe.complete();
24
- }
25
- }
26
- BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
- BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: BaseComponent, ngImport: i0 });
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BaseComponent, decorators: [{
29
- type: Directive
30
- }] });
31
-
32
- const stylePrefix = 'wr';
33
-
34
- function toBoolean(value) {
35
- return coerceBooleanProperty(value);
36
- }
37
- // eslint-disable
38
- function propDecoratorFactory(name, fallback) {
39
- function propDecorator(target, propName, originalDescriptor) {
40
- const privatePropName = `$$__wrPropDecorator__${propName}`;
41
- if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
42
- console.warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
43
- }
44
- Object.defineProperty(target, privatePropName, {
45
- configurable: true,
46
- writable: true
47
- });
48
- return {
49
- get() {
50
- return originalDescriptor && originalDescriptor.get
51
- ? originalDescriptor.get.bind(this)()
52
- : this[privatePropName];
53
- },
54
- set(value) {
55
- if (originalDescriptor && originalDescriptor.set) {
56
- originalDescriptor.set.bind(this)(fallback(value));
57
- }
58
- this[privatePropName] = fallback(value);
59
- }
60
- };
61
- }
62
- return propDecorator;
63
- }
64
- /**
65
- * Input decorator that handle a prop to do get/set automatically with toBoolean
66
- *
67
- * Why not using @InputBoolean alone without @Input? AOT needs @Input to be visible
68
- *
69
- * @howToUse
70
- * ```
71
- * @Input() @InputBoolean() visible: boolean = false;
72
- *
73
- * // Act as below:
74
- * // @Input()
75
- * // get visible() { return this.__visible; }
76
- * // set visible(value) { this.__visible = value; }
77
- * // __visible = false;
78
- * ```
79
- */
80
- function InputBoolean() {
81
- return propDecoratorFactory('InputBoolean', toBoolean);
82
- }
83
-
84
- // Components
85
-
86
- class WrSpinnerComponent {
87
- constructor() {
88
- this.class = `${stylePrefix}-spin`;
89
- }
90
- }
91
- WrSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
92
- WrSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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 });
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerComponent, decorators: [{
94
- type: Component,
95
- args: [{
96
- selector: 'wr-spin',
97
- template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>',
98
- encapsulation: ViewEncapsulation.None,
99
- changeDetection: ChangeDetectionStrategy.OnPush
100
- }]
101
- }], propDecorators: { class: [{
102
- type: HostBinding,
103
- args: ['class']
104
- }] } });
105
-
106
- class WrSpinnerModule {
107
- }
108
- WrSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
109
- WrSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerModule, declarations: [WrSpinnerComponent], exports: [WrSpinnerComponent] });
110
- WrSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerModule });
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSpinnerModule, decorators: [{
112
- type: NgModule,
113
- args: [{
114
- declarations: [WrSpinnerComponent],
115
- exports: [WrSpinnerComponent]
116
- }]
117
- }] });
118
-
119
- class WrButtonComponent extends BaseComponent {
120
- constructor(cdr, elRef, ngZone, r2) {
121
- super();
122
- this.cdr = cdr;
123
- this.elRef = elRef;
124
- this.ngZone = ngZone;
125
- this.r2 = r2;
126
- this.color = 'primary';
127
- this.size = 'default';
128
- this.disabled = false;
129
- this.outlined = false;
130
- this.rounded = false;
131
- this.loading = false;
132
- this.block = false;
133
- this.baseClass = `${stylePrefix}-btn`;
134
- }
135
- ngOnInit() {
136
- this.setClasses();
137
- this.ngZone.runOutsideAngular(() => {
138
- /**
139
- * Caretaker note: this event listener could've been added through `host.click` or `HostListener`.
140
- * The compiler generates the `ɵɵlistener` instruction which wraps the actual listener internally into the
141
- * function, which runs `markDirty()` before running the actual listener (the decorated class method).
142
- * Since we're preventing the default behavior and stopping event propagation
143
- * this doesn't require Angular to run the change detection.
144
- */
145
- fromEvent(this.elRef.nativeElement, 'click')
146
- .pipe(takeUntil(this.ngUnsubscribe))
147
- .subscribe(event => {
148
- var _a;
149
- if (this.disabled && ((_a = event.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'A') {
150
- event.preventDefault();
151
- event.stopImmediatePropagation();
152
- }
153
- });
154
- });
155
- }
156
- ngAfterViewInit() {
157
- this.insertSpan(this.elRef.nativeElement.childNodes, this.r2);
158
- }
159
- ngOnChanges(changes) {
160
- var _a, _b;
161
- if (!((_a = changes['disabled']) === null || _a === void 0 ? void 0 : _a.currentValue)) {
162
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--disabled`);
163
- }
164
- if (!((_b = changes['disabled']) === null || _b === void 0 ? void 0 : _b.currentValue)) {
165
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--loading`);
166
- }
167
- this.setClasses();
168
- this.cdr.detectChanges();
169
- }
170
- insertSpan(nodes, renderer) {
171
- nodes.forEach(node => {
172
- if (node.nodeName === '#text') {
173
- const span = renderer.createElement('span');
174
- renderer.addClass(span, `${this.baseClass}__text`);
175
- const parent = renderer.parentNode(node);
176
- renderer.insertBefore(parent, span, node);
177
- renderer.appendChild(span, node);
178
- }
179
- });
180
- }
181
- setClasses() {
182
- const el = this.elRef.nativeElement;
183
- const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
184
- this.r2.addClass(el, this.baseClass);
185
- add(this.color);
186
- if (this.rounded) {
187
- add(`-rounded`);
188
- }
189
- if (this.loading) {
190
- add(`-loading`);
191
- }
192
- if (this.block) {
193
- add(`-block`);
194
- }
195
- add(`-${this.size}`);
196
- if (this.outlined) {
197
- add(`-outlined`);
198
- }
199
- if (this.disabled) {
200
- add('-disabled');
201
- }
202
- }
203
- }
204
- WrButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
205
- WrButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrButtonComponent, selector: "wr-btn, [wr-btn]", inputs: { color: "color", size: "size", disabled: "disabled", outlined: "outlined", rounded: "rounded", loading: "loading", block: "block" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content><wr-spin *ngIf="loading"></wr-spin>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
206
- __decorate([
207
- InputBoolean()
208
- ], WrButtonComponent.prototype, "disabled", void 0);
209
- __decorate([
210
- InputBoolean()
211
- ], WrButtonComponent.prototype, "outlined", void 0);
212
- __decorate([
213
- InputBoolean()
214
- ], WrButtonComponent.prototype, "rounded", void 0);
215
- __decorate([
216
- InputBoolean()
217
- ], WrButtonComponent.prototype, "loading", void 0);
218
- __decorate([
219
- InputBoolean()
220
- ], WrButtonComponent.prototype, "block", void 0);
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonComponent, decorators: [{
222
- type: Component,
223
- args: [{
224
- selector: 'wr-btn, [wr-btn]',
225
- changeDetection: ChangeDetectionStrategy.OnPush,
226
- encapsulation: ViewEncapsulation.None,
227
- template: `<ng-content></ng-content><wr-spin *ngIf="loading"></wr-spin>`
228
- }]
229
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
230
- type: Input
231
- }], size: [{
232
- type: Input
233
- }], disabled: [{
234
- type: Input
235
- }], outlined: [{
236
- type: Input
237
- }], rounded: [{
238
- type: Input
239
- }], loading: [{
240
- type: Input
241
- }], block: [{
242
- type: Input
243
- }] } });
244
-
245
- class WrButtonModule {
246
- }
247
- WrButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
248
- WrButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, declarations: [WrButtonComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrButtonComponent] });
249
- WrButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, imports: [CommonModule, WrSpinnerModule] });
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, decorators: [{
251
- type: NgModule,
252
- args: [{
253
- imports: [CommonModule, WrSpinnerModule],
254
- declarations: [WrButtonComponent],
255
- exports: [WrButtonComponent]
256
- }]
257
- }] });
258
-
259
- class WrDividerComponent {
260
- constructor() {
261
- this.class = `${stylePrefix}-divider`;
262
- }
263
- }
264
- WrDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
265
- WrDividerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrDividerComponent, selector: "wr-divider", host: { properties: { "class": "this.class" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerComponent, decorators: [{
267
- type: Component,
268
- args: [{
269
- selector: 'wr-divider',
270
- template: '',
271
- changeDetection: ChangeDetectionStrategy.OnPush,
272
- encapsulation: ViewEncapsulation.None
273
- }]
274
- }], propDecorators: { class: [{
275
- type: HostBinding,
276
- args: ['class']
277
- }] } });
278
-
279
- class WrDividerModule {
280
- }
281
- WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
282
- WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, declarations: [WrDividerComponent], exports: [WrDividerComponent] });
283
- WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule });
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, decorators: [{
285
- type: NgModule,
286
- args: [{
287
- declarations: [WrDividerComponent],
288
- exports: [WrDividerComponent]
289
- }]
290
- }] });
291
-
292
- class WrInputDirective extends BaseComponent {
293
- constructor(ngControl) {
294
- super();
295
- this.ngControl = ngControl;
296
- this.class = `${stylePrefix}-input`;
297
- this._disabled = false;
298
- this.disabled$ = new Subject();
299
- }
300
- get disabled() {
301
- if (this.ngControl && this.ngControl.disabled !== null) {
302
- return this.ngControl.disabled;
303
- }
304
- return this._disabled;
305
- }
306
- set disabled(value) {
307
- this._disabled = value != null && `${value}` !== 'false';
308
- }
309
- ngOnInit() {
310
- var _a;
311
- if (this.ngControl) {
312
- (_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));
313
- }
314
- }
315
- ngOnChanges(changes) {
316
- const { disabled } = changes;
317
- if (disabled) {
318
- this.disabled$.next(this.disabled);
319
- }
320
- }
321
- }
322
- WrInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputDirective, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
323
- WrInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: WrInputDirective, selector: "wr-input, input[wr-input], textarea[wr-input]", inputs: { disabled: "disabled" }, host: { properties: { "class": "this.class", "class.wr-input--disabled": "this.disabled", "disabled": "this.disabled" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
324
- __decorate([
325
- InputBoolean()
326
- ], WrInputDirective.prototype, "disabled", null);
327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputDirective, decorators: [{
328
- type: Directive,
329
- args: [{
330
- selector: 'wr-input, input[wr-input], textarea[wr-input]'
331
- }]
332
- }], ctorParameters: function () {
333
- return [{ type: i1.NgControl, decorators: [{
334
- type: Optional
335
- }, {
336
- type: Self
337
- }] }];
338
- }, propDecorators: { class: [{
339
- type: HostBinding,
340
- args: ['class']
341
- }], disabled: [{
342
- type: HostBinding,
343
- args: [`class.${stylePrefix}-input--disabled`]
344
- }, {
345
- type: HostBinding,
346
- args: ['disabled']
347
- }, {
348
- type: Input
349
- }] } });
350
-
351
- class WrInputModule {
352
- }
353
- WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
354
- WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, declarations: [WrInputDirective], imports: [CommonModule, PlatformModule], exports: [WrInputDirective] });
355
- WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, imports: [CommonModule, PlatformModule] });
356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, decorators: [{
357
- type: NgModule,
358
- args: [{
359
- imports: [CommonModule, PlatformModule],
360
- declarations: [WrInputDirective],
361
- exports: [WrInputDirective]
362
- }]
363
- }] });
364
-
365
- class WrExtendedInputComponent {
366
- constructor(ngControl, elRef, r2) {
367
- this.ngControl = ngControl;
368
- this.elRef = elRef;
369
- this.r2 = r2;
370
- this.class = `${stylePrefix}-extended-input`;
371
- this.disabled = false;
372
- this.value = undefined;
373
- this.touched = false;
374
- this.onChange = (value) => { };
375
- this.onTouched = () => { };
376
- if (ngControl !== null) {
377
- ngControl.valueAccessor = this;
378
- }
379
- }
380
- ngOnInit() {
381
- const el = this.elRef.nativeElement;
382
- const add = (klass) => this.r2.addClass(el, `${this.class}-${klass}`);
383
- if (this.suffix) {
384
- add('-has-suffix');
385
- }
386
- if (this.prefix) {
387
- add('-has-prefix');
388
- }
389
- }
390
- onInput($event) {
391
- this.value = $event.currentTarget.value;
392
- this.touched = true;
393
- this.onChange(this.value);
394
- }
395
- onFocusOut() {
396
- this.touched = true;
397
- this.onTouched();
398
- }
399
- registerOnChange(fn) {
400
- this.onChange = fn;
401
- }
402
- registerOnTouched(fn) {
403
- this.onTouched = fn;
404
- }
405
- writeValue(obj) {
406
- this.value = obj;
407
- }
408
- }
409
- WrExtendedInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
410
- WrExtendedInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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 });
411
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputComponent, decorators: [{
412
- type: Component,
413
- 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" }]
414
- }], ctorParameters: function () {
415
- return [{ type: i1.NgControl, decorators: [{
416
- type: Optional
417
- }, {
418
- type: Self
419
- }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }];
420
- }, propDecorators: { class: [{
421
- type: HostBinding,
422
- args: ['class']
423
- }], suffix: [{
424
- type: Input
425
- }], prefix: [{
426
- type: Input
427
- }] } });
428
-
429
- class WrExtendedInputModule {
430
- }
431
- WrExtendedInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
432
- WrExtendedInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, declarations: [WrExtendedInputComponent], imports: [CommonModule, PlatformModule, WrInputModule], exports: [WrExtendedInputComponent] });
433
- WrExtendedInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, imports: [CommonModule, PlatformModule, WrInputModule] });
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, decorators: [{
435
- type: NgModule,
436
- args: [{
437
- imports: [CommonModule, PlatformModule, WrInputModule],
438
- declarations: [WrExtendedInputComponent],
439
- exports: [WrExtendedInputComponent]
440
- }]
441
- }] });
442
-
443
- class WrFormErrorComponent {
444
- constructor() {
445
- this.class = `${stylePrefix}-form-error`;
446
- }
447
- }
448
- WrFormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
449
- WrFormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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 });
450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormErrorComponent, decorators: [{
451
- type: Component,
452
- args: [{
453
- selector: 'wr-form-error',
454
- changeDetection: ChangeDetectionStrategy.OnPush,
455
- encapsulation: ViewEncapsulation.None,
456
- template: `<ng-content></ng-content>`
457
- }]
458
- }], propDecorators: { class: [{
459
- type: HostBinding,
460
- args: ['class']
461
- }] } });
462
-
463
- class WrFormItemComponent {
464
- constructor(cdr, elRef, r2) {
465
- this.cdr = cdr;
466
- this.elRef = elRef;
467
- this.r2 = r2;
468
- this.hasError = false;
469
- this.baseClass = `${stylePrefix}-form-item`;
470
- }
471
- ngOnInit() {
472
- this.setClasses();
473
- }
474
- ngOnChanges(changes) {
475
- var _a;
476
- if (!((_a = changes['hasError']) === null || _a === void 0 ? void 0 : _a.currentValue)) {
477
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--has-error`);
478
- }
479
- this.setClasses();
480
- this.cdr.detectChanges();
481
- }
482
- setClasses() {
483
- const el = this.elRef.nativeElement;
484
- const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
485
- this.r2.addClass(el, this.baseClass);
486
- if (this.hasError) {
487
- add('-has-error');
488
- }
489
- }
490
- }
491
- WrFormItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
492
- WrFormItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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 });
493
- __decorate([
494
- InputBoolean()
495
- ], WrFormItemComponent.prototype, "hasError", void 0);
496
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormItemComponent, decorators: [{
497
- type: Component,
498
- args: [{
499
- selector: 'wr-form-item',
500
- changeDetection: ChangeDetectionStrategy.OnPush,
501
- encapsulation: ViewEncapsulation.None,
502
- template: `<ng-content></ng-content>`
503
- }]
504
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hasError: [{
505
- type: Input
506
- }] } });
507
-
508
- class WrFormModule {
509
- }
510
- WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
511
- WrFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, declarations: [WrFormItemComponent, WrFormErrorComponent], imports: [CommonModule], exports: [WrFormItemComponent, WrFormErrorComponent] });
512
- WrFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, imports: [CommonModule] });
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, decorators: [{
514
- type: NgModule,
515
- args: [{
516
- imports: [CommonModule],
517
- declarations: [WrFormItemComponent, WrFormErrorComponent],
518
- exports: [WrFormItemComponent, WrFormErrorComponent]
519
- }]
520
- }] });
521
14
 
522
15
  /* 🤖 this file was generated by svg-to-ts */
523
16
  const wrIconAddCircleOutline = {
@@ -903,96 +396,729 @@ const wrIconSet = [
903
396
  wrIconWarning
904
397
  ];
905
398
 
906
- class WrIconService {
907
- /**
908
- * Access icons registry
909
- */
910
- get registry() {
911
- return WrIconService.registry;
912
- }
913
- /**
914
- * Register all icons
915
- */
916
- static registerIcons() {
917
- wrIconSet.forEach((icon) => WrIconService.registry.set(icon.name, icon.data));
399
+ class WrIconService {
400
+ /**
401
+ * Access icons registry
402
+ */
403
+ get registry() {
404
+ return WrIconService.registry;
405
+ }
406
+ /**
407
+ * Register all icons
408
+ */
409
+ static registerIcons() {
410
+ wrIconSet.forEach((icon) => WrIconService.registry.set(icon.name, icon.data));
411
+ }
412
+ }
413
+ /**
414
+ * Icons registry
415
+ */
416
+ WrIconService.registry = new Map();
417
+ WrIconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
418
+ WrIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconService, providedIn: 'root' });
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconService, decorators: [{
420
+ type: Injectable,
421
+ args: [{
422
+ providedIn: 'root'
423
+ }]
424
+ }] });
425
+
426
+ class WrIconComponent {
427
+ constructor(elRef, iconService, doc) {
428
+ this.elRef = elRef;
429
+ this.iconService = iconService;
430
+ this.doc = doc;
431
+ this.class = 'wr-icon';
432
+ }
433
+ set name(name) {
434
+ if (!this.iconService.registry.has(name)) {
435
+ console.warn(`Icon ${name} was not found`);
436
+ return;
437
+ }
438
+ if (this.svgIcon) {
439
+ this.elRef.nativeElement.removeChild(this.svgIcon);
440
+ }
441
+ const svgData = this.iconService.registry.get(name) || '';
442
+ this.svgIcon = this.svgElementFromString(svgData);
443
+ this.elRef.nativeElement.appendChild(this.svgIcon);
444
+ }
445
+ svgElementFromString(svgContent) {
446
+ const div = this.doc.createElement('div');
447
+ div.innerHTML = svgContent;
448
+ return div.querySelector('svg') || this.doc.createElementNS('http://www.w3.org/2000/svg', 'path');
449
+ }
450
+ }
451
+ WrIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconComponent, deps: [{ token: i0.ElementRef }, { token: WrIconService }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
452
+ WrIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrIconComponent, selector: "wr-icon[name]", inputs: { name: "name" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconComponent, decorators: [{
454
+ type: Component,
455
+ args: [{
456
+ selector: 'wr-icon[name]',
457
+ template: '',
458
+ encapsulation: ViewEncapsulation.None,
459
+ changeDetection: ChangeDetectionStrategy.OnPush
460
+ }]
461
+ }], ctorParameters: function () {
462
+ return [{ type: i0.ElementRef }, { type: WrIconService }, { type: undefined, decorators: [{
463
+ type: Optional
464
+ }, {
465
+ type: Inject,
466
+ args: [DOCUMENT]
467
+ }] }];
468
+ }, propDecorators: { class: [{
469
+ type: HostBinding,
470
+ args: ['class']
471
+ }], name: [{
472
+ type: Input
473
+ }] } });
474
+
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
+ class WrButtonComponent extends BaseComponent {
595
+ constructor(cdr, elRef, ngZone, r2) {
596
+ super();
597
+ this.cdr = cdr;
598
+ this.elRef = elRef;
599
+ this.ngZone = ngZone;
600
+ this.r2 = r2;
601
+ this.color = 'primary';
602
+ this.size = 'default';
603
+ this.icon = null;
604
+ this.iconPosition = 'start';
605
+ this.disabled = false;
606
+ this.outlined = false;
607
+ this.rounded = false;
608
+ this.loading = false;
609
+ this.fullwidth = false;
610
+ this._disabled = this.disabled || null;
611
+ }
612
+ get elClasses() {
613
+ return {
614
+ 'wr-btn': true,
615
+ 'wr-btn--primary': this.color === 'primary',
616
+ 'wr-btn--secondary': this.color === 'secondary',
617
+ 'wr-btn--success': this.color === 'success',
618
+ 'wr-btn--warning': this.color === 'warning',
619
+ 'wr-btn--danger': this.color === 'danger',
620
+ 'wr-btn--light': this.color === 'light',
621
+ 'wr-btn--medium': this.color === 'medium',
622
+ 'wr-btn--dark': this.color === 'dark',
623
+ 'wr-btn--default': this.size === 'default',
624
+ 'wr-btn--small': this.size === 'small',
625
+ 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',
626
+ 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',
627
+ 'wr-btn--outlined': this.outlined,
628
+ 'wr-btn--rounded': this.rounded,
629
+ 'wr-btn--loading': this.loading,
630
+ 'wr-btn--full': this.fullwidth
631
+ };
632
+ }
633
+ ngOnInit() {
634
+ /**
635
+ * Event listener added to prevent default behavior, so we don't need to call change detection
636
+ * By default, compiler wraps HostListener to `ɵɵlistener`, which call `markDirty()` before running actual listener.
637
+ */
638
+ this.ngZone.runOutsideAngular(() => {
639
+ fromEvent(this.elRef.nativeElement, 'click')
640
+ .pipe(takeUntil(this.ngUnsubscribe))
641
+ .subscribe(event => {
642
+ var _a;
643
+ if (this.disabled && ((_a = event.target) === null || _a === void 0 ? void 0 : _a.tagName) === 'A') {
644
+ event.preventDefault();
645
+ event.stopImmediatePropagation();
646
+ }
647
+ });
648
+ });
649
+ }
650
+ ngAfterViewInit() {
651
+ this.insertSpan(this.elRef.nativeElement.childNodes, this.r2);
652
+ }
653
+ /**
654
+ * Sanitizing `<ng-content></ng-content>` from other content except #text
655
+ *
656
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName}
657
+ *
658
+ * @param {NodeList} nodes List of nodes from `nativeElement.childNodes`
659
+ * @param {Renderer2} r2 Renderer2 from `@angular/core`
660
+ */
661
+ insertSpan(nodes, r2) {
662
+ nodes.forEach(node => {
663
+ if (node.nodeName === '#text') {
664
+ const span = r2.createElement('span');
665
+ r2.addClass(span, `wr-btn__text`);
666
+ const parent = r2.parentNode(node);
667
+ r2.insertBefore(parent, span, node);
668
+ r2.appendChild(span, node);
669
+ }
670
+ });
671
+ }
672
+ }
673
+ 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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin" }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
675
+ __decorate([
676
+ InputBoolean()
677
+ ], WrButtonComponent.prototype, "disabled", void 0);
678
+ __decorate([
679
+ InputBoolean()
680
+ ], WrButtonComponent.prototype, "outlined", void 0);
681
+ __decorate([
682
+ InputBoolean()
683
+ ], WrButtonComponent.prototype, "rounded", void 0);
684
+ __decorate([
685
+ InputBoolean()
686
+ ], WrButtonComponent.prototype, "loading", void 0);
687
+ __decorate([
688
+ InputBoolean()
689
+ ], WrButtonComponent.prototype, "fullwidth", void 0);
690
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonComponent, decorators: [{
691
+ type: Component,
692
+ args: [{ selector: 'wr-btn, button[wr-btn], a[wr-btn]', exportAs: 'wrBtn', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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" }]
693
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
694
+ type: Input
695
+ }], size: [{
696
+ type: Input
697
+ }], icon: [{
698
+ type: Input
699
+ }], iconPosition: [{
700
+ type: Input
701
+ }], disabled: [{
702
+ type: Input
703
+ }], outlined: [{
704
+ type: Input
705
+ }], rounded: [{
706
+ type: Input
707
+ }], loading: [{
708
+ type: Input
709
+ }], fullwidth: [{
710
+ type: Input
711
+ }], elClasses: [{
712
+ type: HostBinding,
713
+ args: ['class']
714
+ }], _disabled: [{
715
+ type: HostBinding,
716
+ args: ['disabled']
717
+ }] } });
718
+
719
+ class WrButtonModule {
720
+ }
721
+ WrButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
722
+ WrButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, declarations: [WrButtonComponent], imports: [CommonModule, WrSpinnerModule, WrIconModule], exports: [WrButtonComponent] });
723
+ WrButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, imports: [CommonModule, WrSpinnerModule, WrIconModule] });
724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, decorators: [{
725
+ type: NgModule,
726
+ args: [{
727
+ imports: [CommonModule, WrSpinnerModule, WrIconModule],
728
+ declarations: [WrButtonComponent],
729
+ exports: [WrButtonComponent]
730
+ }]
731
+ }] });
732
+
733
+ class WrCheckboxComponent extends BaseComponent {
734
+ constructor(cdr, elRef, focusMonitor, ngZone) {
735
+ super();
736
+ this.cdr = cdr;
737
+ this.elRef = elRef;
738
+ this.focusMonitor = focusMonitor;
739
+ this.ngZone = ngZone;
740
+ this.onChange = () => { };
741
+ this.onTouch = () => { };
742
+ this.checked = false;
743
+ this.disabled = false;
744
+ this.autoFocus = false;
745
+ this.checkedChange = new EventEmitter();
746
+ this.class = `${stylePrefix}-checkbox`;
747
+ }
748
+ ngOnInit() {
749
+ this.ngZone.runOutsideAngular(() => {
750
+ fromEvent(this.elRef.nativeElement, 'click')
751
+ .pipe(takeUntil(this.ngUnsubscribe))
752
+ .subscribe(event => {
753
+ event.preventDefault();
754
+ this.focus();
755
+ if (this.disabled) {
756
+ event.stopImmediatePropagation();
757
+ return;
758
+ }
759
+ this.ngZone.run(() => {
760
+ this.onModelChange(!this.checked);
761
+ this.cdr.markForCheck();
762
+ });
763
+ });
764
+ fromEvent(this.inputElement.nativeElement, 'click')
765
+ .pipe(takeUntil(this.ngUnsubscribe))
766
+ .subscribe(event => event.stopPropagation());
767
+ });
768
+ }
769
+ ngAfterViewInit() {
770
+ if (this.autoFocus) {
771
+ this.focus();
772
+ }
773
+ }
774
+ ngOnDestroy() {
775
+ super.ngOnDestroy();
776
+ this.focusMonitor.stopMonitoring(this.elRef);
777
+ }
778
+ writeValue(value) {
779
+ this.checked = value;
780
+ this.cdr.markForCheck();
781
+ }
782
+ registerOnChange(fn) {
783
+ this.onChange = fn;
784
+ }
785
+ registerOnTouched(fn) {
786
+ this.onTouch = fn;
787
+ }
788
+ setDisabledState(isDisabled) {
789
+ this.disabled = isDisabled;
790
+ this.cdr.markForCheck();
791
+ }
792
+ focus() {
793
+ this.focusMonitor.focusVia(this.inputElement, 'keyboard');
794
+ }
795
+ blur() {
796
+ this.inputElement.nativeElement.blur();
797
+ }
798
+ onModelChange(checked) {
799
+ if (!this.disabled) {
800
+ this.checked = checked;
801
+ this.onChange(this.checked);
802
+ this.checkedChange.emit(this.checked);
803
+ }
804
+ }
805
+ }
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: { checkedChange: "checkedChange" }, host: { properties: { "class": "this.class" } }, providers: [
808
+ {
809
+ provide: NG_VALUE_ACCESSOR,
810
+ useExisting: forwardRef(() => WrCheckboxComponent),
811
+ multi: true
812
+ }
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: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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
+ __decorate([
815
+ InputBoolean()
816
+ ], WrCheckboxComponent.prototype, "checked", void 0);
817
+ __decorate([
818
+ InputBoolean()
819
+ ], WrCheckboxComponent.prototype, "disabled", void 0);
820
+ __decorate([
821
+ InputBoolean()
822
+ ], WrCheckboxComponent.prototype, "autoFocus", void 0);
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxComponent, decorators: [{
824
+ type: Component,
825
+ args: [{ selector: 'wr-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
826
+ {
827
+ provide: NG_VALUE_ACCESSOR,
828
+ useExisting: forwardRef(() => WrCheckboxComponent),
829
+ multi: true
830
+ }
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: [{
833
+ type: ViewChild,
834
+ args: ['inputElement', { static: true }]
835
+ }], checked: [{
836
+ type: Input
837
+ }], disabled: [{
838
+ type: Input
839
+ }], autoFocus: [{
840
+ type: Input
841
+ }], checkedChange: [{
842
+ type: Output
843
+ }], class: [{
844
+ type: HostBinding,
845
+ args: ['class']
846
+ }] } });
847
+
848
+ class WrCheckboxModule {
849
+ }
850
+ WrCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
851
+ WrCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, declarations: [WrCheckboxComponent], imports: [CommonModule, FormsModule, A11yModule], exports: [WrCheckboxComponent] });
852
+ WrCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, imports: [CommonModule, FormsModule, A11yModule] });
853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, decorators: [{
854
+ type: NgModule,
855
+ args: [{
856
+ imports: [CommonModule, FormsModule, A11yModule],
857
+ declarations: [WrCheckboxComponent],
858
+ exports: [WrCheckboxComponent]
859
+ }]
860
+ }] });
861
+
862
+ class WrDividerComponent {
863
+ constructor() {
864
+ this.class = `${stylePrefix}-divider`;
918
865
  }
919
866
  }
920
- /**
921
- * Icons registry
922
- */
923
- WrIconService.registry = new Map();
924
- WrIconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
925
- WrIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, providedIn: 'root' });
926
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, decorators: [{
927
- type: Injectable,
867
+ 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.class" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, decorators: [{
870
+ type: Component,
928
871
  args: [{
929
- providedIn: 'root'
872
+ selector: 'wr-divider',
873
+ template: '',
874
+ changeDetection: ChangeDetectionStrategy.OnPush,
875
+ encapsulation: ViewEncapsulation.None
876
+ }]
877
+ }], propDecorators: { class: [{
878
+ type: HostBinding,
879
+ args: ['class']
880
+ }] } });
881
+
882
+ class WrDividerModule {
883
+ }
884
+ WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
885
+ WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, declarations: [WrDividerComponent], exports: [WrDividerComponent] });
886
+ WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule });
887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, decorators: [{
888
+ type: NgModule,
889
+ args: [{
890
+ declarations: [WrDividerComponent],
891
+ exports: [WrDividerComponent]
930
892
  }]
931
893
  }] });
932
894
 
933
- class WrIconComponent {
934
- constructor(elRef, iconService, doc) {
935
- this.elRef = elRef;
936
- this.iconService = iconService;
937
- this.doc = doc;
938
- this.class = 'wr-icon';
895
+ class WrInputDirective extends BaseComponent {
896
+ constructor(ngControl) {
897
+ super();
898
+ this.ngControl = ngControl;
899
+ this.class = `${stylePrefix}-input`;
900
+ this._disabled = false;
901
+ this.disabled$ = new Subject();
939
902
  }
940
- set name(name) {
941
- if (!this.iconService.registry.has(name)) {
942
- console.warn(`Icon ${name} was not found`);
943
- return;
903
+ get disabled() {
904
+ if (this.ngControl && this.ngControl.disabled !== null) {
905
+ return this.ngControl.disabled;
944
906
  }
945
- if (this.svgIcon) {
946
- this.elRef.nativeElement.removeChild(this.svgIcon);
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));
947
916
  }
948
- const svgData = this.iconService.registry.get(name) || '';
949
- this.svgIcon = this.svgElementFromString(svgData);
950
- this.elRef.nativeElement.appendChild(this.svgIcon);
951
917
  }
952
- svgElementFromString(svgContent) {
953
- const div = this.doc.createElement('div');
954
- div.innerHTML = svgContent;
955
- return div.querySelector('svg') || this.doc.createElementNS('http://www.w3.org/2000/svg', 'path');
918
+ ngOnChanges(changes) {
919
+ const { disabled } = changes;
920
+ if (disabled) {
921
+ this.disabled$.next(this.disabled);
922
+ }
956
923
  }
957
924
  }
958
- WrIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconComponent, deps: [{ token: i0.ElementRef }, { token: WrIconService }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
959
- WrIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrIconComponent, selector: "wr-icon[name]", inputs: { name: "name" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
960
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconComponent, decorators: [{
961
- type: Component,
925
+ WrInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputDirective, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
926
+ WrInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: WrInputDirective, selector: "wr-input, input[wr-input], textarea[wr-input]", inputs: { disabled: "disabled" }, host: { properties: { "class": "this.class", "class.wr-input--disabled": "this.disabled", "disabled": "this.disabled" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
927
+ __decorate([
928
+ InputBoolean()
929
+ ], WrInputDirective.prototype, "disabled", null);
930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputDirective, decorators: [{
931
+ type: Directive,
962
932
  args: [{
963
- selector: 'wr-icon[name]',
964
- template: '',
965
- encapsulation: ViewEncapsulation.None,
966
- changeDetection: ChangeDetectionStrategy.OnPush
933
+ selector: 'wr-input, input[wr-input], textarea[wr-input]'
967
934
  }]
968
935
  }], ctorParameters: function () {
969
- return [{ type: i0.ElementRef }, { type: WrIconService }, { type: undefined, decorators: [{
936
+ return [{ type: i1$1.NgControl, decorators: [{
970
937
  type: Optional
971
938
  }, {
972
- type: Inject,
973
- args: [DOCUMENT]
939
+ type: Self
974
940
  }] }];
975
941
  }, propDecorators: { class: [{
976
942
  type: HostBinding,
977
943
  args: ['class']
978
- }], name: [{
944
+ }], disabled: [{
945
+ type: HostBinding,
946
+ args: [`class.${stylePrefix}-input--disabled`]
947
+ }, {
948
+ type: HostBinding,
949
+ args: ['disabled']
950
+ }, {
979
951
  type: Input
980
952
  }] } });
981
953
 
982
- class WrIconModule {
983
- static forRoot() {
984
- WrIconService.registerIcons();
985
- return { ngModule: WrIconModule };
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;
986
1010
  }
987
1011
  }
988
- WrIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
989
- WrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, declarations: [WrIconComponent], exports: [WrIconComponent] });
990
- WrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule });
991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, decorators: [{
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: [{
1024
+ type: HostBinding,
1025
+ args: ['class']
1026
+ }], suffix: [{
1027
+ type: Input
1028
+ }], prefix: [{
1029
+ type: Input
1030
+ }] } });
1031
+
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: [{
992
1038
  type: NgModule,
993
1039
  args: [{
994
- declarations: [WrIconComponent],
995
- exports: [WrIconComponent]
1040
+ imports: [CommonModule, PlatformModule, WrInputModule],
1041
+ declarations: [WrExtendedInputComponent],
1042
+ exports: [WrExtendedInputComponent]
1043
+ }]
1044
+ }] });
1045
+
1046
+ class WrFormErrorComponent {
1047
+ constructor() {
1048
+ this.class = `${stylePrefix}-form-error`;
1049
+ }
1050
+ }
1051
+ 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 });
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormErrorComponent, decorators: [{
1054
+ type: Component,
1055
+ args: [{
1056
+ selector: 'wr-form-error',
1057
+ changeDetection: ChangeDetectionStrategy.OnPush,
1058
+ encapsulation: ViewEncapsulation.None,
1059
+ template: `<ng-content></ng-content>`
1060
+ }]
1061
+ }], propDecorators: { class: [{
1062
+ type: HostBinding,
1063
+ args: ['class']
1064
+ }] } });
1065
+
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
+ class WrFormModule {
1112
+ }
1113
+ WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1114
+ WrFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, declarations: [WrFormItemComponent, WrFormErrorComponent], imports: [CommonModule], exports: [WrFormItemComponent, WrFormErrorComponent] });
1115
+ WrFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, imports: [CommonModule] });
1116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, decorators: [{
1117
+ type: NgModule,
1118
+ args: [{
1119
+ imports: [CommonModule],
1120
+ declarations: [WrFormItemComponent, WrFormErrorComponent],
1121
+ exports: [WrFormItemComponent, WrFormErrorComponent]
996
1122
  }]
997
1123
  }] });
998
1124
 
@@ -1033,13 +1159,13 @@ class WrPasswordInputComponent {
1033
1159
  this.value = obj;
1034
1160
  }
1035
1161
  }
1036
- WrPasswordInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1037
- WrPasswordInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrPasswordInputComponent, selector: "wr-password-input", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<input\n wr-input\n [disabled]=\"disabled\"\n [type]=\"type\"\n [value]=\"value\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onInput($event)\"\n/>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'input'\"\n name=\"eye\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'password'\"\n name=\"eye-off\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\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"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
1038
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputComponent, decorators: [{
1162
+ WrPasswordInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1163
+ WrPasswordInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrPasswordInputComponent, selector: "wr-password-input", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<input\n wr-input\n [disabled]=\"disabled\"\n [type]=\"type\"\n [value]=\"value\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onInput($event)\"\n/>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'input'\"\n name=\"eye\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'password'\"\n name=\"eye-off\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\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"] }, { kind: "component", type: WrIconComponent, selector: "wr-icon[name]", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputComponent, decorators: [{
1039
1165
  type: Component,
1040
1166
  args: [{ selector: 'wr-password-input', encapsulation: ViewEncapsulation.None, template: "<input\n wr-input\n [disabled]=\"disabled\"\n [type]=\"type\"\n [value]=\"value\"\n (focusout)=\"onFocusOut()\"\n (input)=\"onInput($event)\"\n/>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'input'\"\n name=\"eye\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\n<wr-icon\n class=\"wr-password-input-icon\"\n *ngIf=\"type === 'password'\"\n name=\"eye-off\"\n (click)=\"onVisibilityClick($event)\"\n></wr-icon>\n" }]
1041
1167
  }], ctorParameters: function () {
1042
- return [{ type: i1.NgControl, decorators: [{
1168
+ return [{ type: i1$1.NgControl, decorators: [{
1043
1169
  type: Optional
1044
1170
  }, {
1045
1171
  type: Self
@@ -1051,10 +1177,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1051
1177
 
1052
1178
  class WrPasswordInputModule {
1053
1179
  }
1054
- WrPasswordInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1055
- WrPasswordInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, declarations: [WrPasswordInputComponent], imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule], exports: [WrPasswordInputComponent] });
1056
- WrPasswordInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule] });
1057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, decorators: [{
1180
+ WrPasswordInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1181
+ WrPasswordInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, declarations: [WrPasswordInputComponent], imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule], exports: [WrPasswordInputComponent] });
1182
+ WrPasswordInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule] });
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, decorators: [{
1058
1184
  type: NgModule,
1059
1185
  args: [{
1060
1186
  imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule],
@@ -1074,9 +1200,9 @@ class WrSkeletonComponent {
1074
1200
  this.elRef.nativeElement.style.setProperty('--skeleton-style', style);
1075
1201
  }
1076
1202
  }
1077
- WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1078
- WrSkeletonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrSkeletonComponent, selector: "wr-skeleton", inputs: { color: "color" }, host: { properties: { "class": "this.class" } }, ngImport: i0, template: '<span>&nbsp;</span>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1079
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonComponent, decorators: [{
1203
+ WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
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.class" } }, ngImport: i0, template: '<span>&nbsp;</span>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, decorators: [{
1080
1206
  type: Component,
1081
1207
  args: [{
1082
1208
  selector: 'wr-skeleton',
@@ -1093,10 +1219,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1093
1219
 
1094
1220
  class WrSkeletonModule {
1095
1221
  }
1096
- WrSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1097
- WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrSkeletonComponent] });
1098
- WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule, WrSpinnerModule] });
1099
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, decorators: [{
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, WrSpinnerModule], exports: [WrSkeletonComponent] });
1224
+ WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule, WrSpinnerModule] });
1225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, decorators: [{
1100
1226
  type: NgModule,
1101
1227
  args: [{
1102
1228
  imports: [CommonModule, WrSpinnerModule],
@@ -1144,8 +1270,8 @@ class WrTagComponent {
1144
1270
  }
1145
1271
  }
1146
1272
  }
1147
- WrTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1148
- WrTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: WrTagComponent, selector: "wr-tag", inputs: { color: "color", transparent: "transparent", loading: "loading", outlined: "outlined", rounded: "rounded", hoverable: "hoverable" }, usesOnChanges: true, ngImport: i0, template: '<wr-spin *ngIf="loading"></wr-spin><ng-content></ng-content>', isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1273
+ WrTagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1274
+ WrTagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: WrTagComponent, selector: "wr-tag", inputs: { color: "color", transparent: "transparent", loading: "loading", outlined: "outlined", rounded: "rounded", hoverable: "hoverable" }, usesOnChanges: true, ngImport: i0, template: '<wr-spin *ngIf="loading"></wr-spin><ng-content></ng-content>', isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WrSpinnerComponent, selector: "wr-spin" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1149
1275
  __decorate([
1150
1276
  InputBoolean()
1151
1277
  ], WrTagComponent.prototype, "transparent", void 0);
@@ -1161,7 +1287,7 @@ __decorate([
1161
1287
  __decorate([
1162
1288
  InputBoolean()
1163
1289
  ], WrTagComponent.prototype, "hoverable", void 0);
1164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagComponent, decorators: [{
1290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, decorators: [{
1165
1291
  type: Component,
1166
1292
  args: [{
1167
1293
  selector: 'wr-tag',
@@ -1185,10 +1311,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1185
1311
 
1186
1312
  class WrTagModule {
1187
1313
  }
1188
- WrTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1189
- WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrTagComponent] });
1190
- WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrSpinnerModule] });
1191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, decorators: [{
1314
+ 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] });
1317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, decorators: [{
1192
1318
  type: NgModule,
1193
1319
  args: [{
1194
1320
  imports: [CommonModule, WrSpinnerModule],
@@ -1201,5 +1327,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1201
1327
  * Generated bundle index. Do not edit.
1202
1328
  */
1203
1329
 
1204
- export { WrButtonComponent, WrButtonModule, WrDividerComponent, WrDividerModule, WrExtendedInputComponent, WrExtendedInputModule, WrFormErrorComponent, WrFormItemComponent, WrFormModule, WrIconComponent, WrIconModule, WrIconService, WrInputDirective, WrInputModule, WrPasswordInputComponent, WrPasswordInputModule, WrSkeletonComponent, WrSkeletonModule, WrSpinnerComponent, WrSpinnerModule, WrTagComponent, WrTagModule, wrIconAdd, wrIconAddCircle, wrIconAddCircleOutline, wrIconAlert, wrIconAlertCircle, wrIconAlertCircleOutline, wrIconAlertSquircle, wrIconArrowBack, wrIconArrowBackCircle, wrIconArrowBottom, wrIconArrowBottomCircle, wrIconArrowForward, wrIconArrowForwardCircle, wrIconArrowTop, wrIconArrowTopCircle, wrIconBug, wrIconBugOutline, wrIconCaretBack, wrIconCaretForward, wrIconCheckmark, wrIconCheckmarkCircle, wrIconCheckmarkCircleOutline, wrIconChevronDown, wrIconChevronUp, wrIconClock, wrIconCloseCircle, wrIconCog, wrIconCopy, wrIconCopyOutline, wrIconDiscover, wrIconDocument, wrIconDotsHorizontal, wrIconDotsVertical, wrIconDownload, wrIconEye, wrIconEyeOff, wrIconFileAab, wrIconFileApk, wrIconFileIpa, wrIconFileZip, wrIconFilter, wrIconFilterOutline, wrIconFlash, wrIconFolder, wrIconHelp, wrIconHome, wrIconInfoCircleOutline, wrIconLock, wrIconLockOpened, wrIconLogoAndroid, wrIconLogoApple, wrIconLogoAppscreener, wrIconLogoGithub, wrIconLogoOversecured, wrIconLogoStingray, wrIconModules, wrIconPlay, wrIconPlayBack, wrIconPlayCircle, wrIconPlayForward, wrIconPlusCircle, wrIconReader, wrIconRepeat, wrIconSearch, wrIconSet, wrIconShield, wrIconShieldCheckmark, wrIconShieldCheckmarkOutline, wrIconShieldOutline, wrIconStop, wrIconStopCircle, wrIconTrash, wrIconUser, wrIconUserAdd, wrIconUserCircle, wrIconUserRemove, wrIconWarning };
1330
+ export { WrButtonComponent, WrButtonModule, WrCheckboxComponent, WrCheckboxModule, WrDividerComponent, WrDividerModule, WrExtendedInputComponent, WrExtendedInputModule, WrFormErrorComponent, WrFormItemComponent, WrFormModule, WrIconComponent, WrIconModule, WrIconService, WrInputDirective, WrInputModule, WrPasswordInputComponent, WrPasswordInputModule, WrSkeletonComponent, WrSkeletonModule, WrSpinnerComponent, WrSpinnerModule, WrTagComponent, WrTagModule, wrIconAdd, wrIconAddCircle, wrIconAddCircleOutline, wrIconAlert, wrIconAlertCircle, wrIconAlertCircleOutline, wrIconAlertSquircle, wrIconArrowBack, wrIconArrowBackCircle, wrIconArrowBottom, wrIconArrowBottomCircle, wrIconArrowForward, wrIconArrowForwardCircle, wrIconArrowTop, wrIconArrowTopCircle, wrIconBug, wrIconBugOutline, wrIconCaretBack, wrIconCaretForward, wrIconCheckmark, wrIconCheckmarkCircle, wrIconCheckmarkCircleOutline, wrIconChevronDown, wrIconChevronUp, wrIconClock, wrIconCloseCircle, wrIconCog, wrIconCopy, wrIconCopyOutline, wrIconDiscover, wrIconDocument, wrIconDotsHorizontal, wrIconDotsVertical, wrIconDownload, wrIconEye, wrIconEyeOff, wrIconFileAab, wrIconFileApk, wrIconFileIpa, wrIconFileZip, wrIconFilter, wrIconFilterOutline, wrIconFlash, wrIconFolder, wrIconHelp, wrIconHome, wrIconInfoCircleOutline, wrIconLock, wrIconLockOpened, wrIconLogoAndroid, wrIconLogoApple, wrIconLogoAppscreener, wrIconLogoGithub, wrIconLogoOversecured, wrIconLogoStingray, wrIconModules, wrIconPlay, wrIconPlayBack, wrIconPlayCircle, wrIconPlayForward, wrIconPlusCircle, wrIconReader, wrIconRepeat, wrIconSearch, wrIconSet, wrIconShield, wrIconShieldCheckmark, wrIconShieldCheckmarkOutline, wrIconShieldOutline, wrIconStop, wrIconStopCircle, wrIconTrash, wrIconUser, wrIconUserAdd, wrIconUserCircle, wrIconUserRemove, wrIconWarning };
1205
1331
  //# sourceMappingURL=ngwr.mjs.map