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/fesm2020/ngwr.mjs CHANGED
@@ -1,517 +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
- if (this.disabled && event.target?.tagName === 'A') {
149
- event.preventDefault();
150
- event.stopImmediatePropagation();
151
- }
152
- });
153
- });
154
- }
155
- ngAfterViewInit() {
156
- this.insertSpan(this.elRef.nativeElement.childNodes, this.r2);
157
- }
158
- ngOnChanges(changes) {
159
- if (!changes['disabled']?.currentValue) {
160
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--disabled`);
161
- }
162
- if (!changes['disabled']?.currentValue) {
163
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--loading`);
164
- }
165
- this.setClasses();
166
- this.cdr.detectChanges();
167
- }
168
- insertSpan(nodes, renderer) {
169
- nodes.forEach(node => {
170
- if (node.nodeName === '#text') {
171
- const span = renderer.createElement('span');
172
- renderer.addClass(span, `${this.baseClass}__text`);
173
- const parent = renderer.parentNode(node);
174
- renderer.insertBefore(parent, span, node);
175
- renderer.appendChild(span, node);
176
- }
177
- });
178
- }
179
- setClasses() {
180
- const el = this.elRef.nativeElement;
181
- const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
182
- this.r2.addClass(el, this.baseClass);
183
- add(this.color);
184
- if (this.rounded) {
185
- add(`-rounded`);
186
- }
187
- if (this.loading) {
188
- add(`-loading`);
189
- }
190
- if (this.block) {
191
- add(`-block`);
192
- }
193
- add(`-${this.size}`);
194
- if (this.outlined) {
195
- add(`-outlined`);
196
- }
197
- if (this.disabled) {
198
- add('-disabled');
199
- }
200
- }
201
- }
202
- 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 });
203
- 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 });
204
- __decorate([
205
- InputBoolean()
206
- ], WrButtonComponent.prototype, "disabled", void 0);
207
- __decorate([
208
- InputBoolean()
209
- ], WrButtonComponent.prototype, "outlined", void 0);
210
- __decorate([
211
- InputBoolean()
212
- ], WrButtonComponent.prototype, "rounded", void 0);
213
- __decorate([
214
- InputBoolean()
215
- ], WrButtonComponent.prototype, "loading", void 0);
216
- __decorate([
217
- InputBoolean()
218
- ], WrButtonComponent.prototype, "block", void 0);
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonComponent, decorators: [{
220
- type: Component,
221
- args: [{
222
- selector: 'wr-btn, [wr-btn]',
223
- changeDetection: ChangeDetectionStrategy.OnPush,
224
- encapsulation: ViewEncapsulation.None,
225
- template: `<ng-content></ng-content><wr-spin *ngIf="loading"></wr-spin>`
226
- }]
227
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
228
- type: Input
229
- }], size: [{
230
- type: Input
231
- }], disabled: [{
232
- type: Input
233
- }], outlined: [{
234
- type: Input
235
- }], rounded: [{
236
- type: Input
237
- }], loading: [{
238
- type: Input
239
- }], block: [{
240
- type: Input
241
- }] } });
242
-
243
- class WrButtonModule {
244
- }
245
- WrButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
246
- WrButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, declarations: [WrButtonComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrButtonComponent] });
247
- WrButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, imports: [CommonModule, WrSpinnerModule] });
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrButtonModule, decorators: [{
249
- type: NgModule,
250
- args: [{
251
- imports: [CommonModule, WrSpinnerModule],
252
- declarations: [WrButtonComponent],
253
- exports: [WrButtonComponent]
254
- }]
255
- }] });
256
-
257
- class WrDividerComponent {
258
- constructor() {
259
- this.class = `${stylePrefix}-divider`;
260
- }
261
- }
262
- WrDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
263
- 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 });
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerComponent, decorators: [{
265
- type: Component,
266
- args: [{
267
- selector: 'wr-divider',
268
- template: '',
269
- changeDetection: ChangeDetectionStrategy.OnPush,
270
- encapsulation: ViewEncapsulation.None
271
- }]
272
- }], propDecorators: { class: [{
273
- type: HostBinding,
274
- args: ['class']
275
- }] } });
276
-
277
- class WrDividerModule {
278
- }
279
- WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
280
- WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, declarations: [WrDividerComponent], exports: [WrDividerComponent] });
281
- WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule });
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrDividerModule, decorators: [{
283
- type: NgModule,
284
- args: [{
285
- declarations: [WrDividerComponent],
286
- exports: [WrDividerComponent]
287
- }]
288
- }] });
289
-
290
- class WrInputDirective extends BaseComponent {
291
- constructor(ngControl) {
292
- super();
293
- this.ngControl = ngControl;
294
- this.class = `${stylePrefix}-input`;
295
- this._disabled = false;
296
- this.disabled$ = new Subject();
297
- }
298
- get disabled() {
299
- if (this.ngControl && this.ngControl.disabled !== null) {
300
- return this.ngControl.disabled;
301
- }
302
- return this._disabled;
303
- }
304
- set disabled(value) {
305
- this._disabled = value != null && `${value}` !== 'false';
306
- }
307
- ngOnInit() {
308
- if (this.ngControl) {
309
- this.ngControl.statusChanges
310
- ?.pipe(filter(() => this.ngControl.disabled !== null), takeUntil(this.ngUnsubscribe))
311
- .subscribe(() => this.disabled$.next(this.ngControl.disabled));
312
- }
313
- }
314
- ngOnChanges(changes) {
315
- const { disabled } = changes;
316
- if (disabled) {
317
- this.disabled$.next(this.disabled);
318
- }
319
- }
320
- }
321
- 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 });
322
- 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 });
323
- __decorate([
324
- InputBoolean()
325
- ], WrInputDirective.prototype, "disabled", null);
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputDirective, decorators: [{
327
- type: Directive,
328
- args: [{
329
- selector: 'wr-input, input[wr-input], textarea[wr-input]'
330
- }]
331
- }], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
332
- type: Optional
333
- }, {
334
- type: Self
335
- }] }]; }, propDecorators: { class: [{
336
- type: HostBinding,
337
- args: ['class']
338
- }], disabled: [{
339
- type: HostBinding,
340
- args: [`class.${stylePrefix}-input--disabled`]
341
- }, {
342
- type: HostBinding,
343
- args: ['disabled']
344
- }, {
345
- type: Input
346
- }] } });
347
-
348
- class WrInputModule {
349
- }
350
- WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
351
- WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, declarations: [WrInputDirective], imports: [CommonModule, PlatformModule], exports: [WrInputDirective] });
352
- WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, imports: [CommonModule, PlatformModule] });
353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrInputModule, decorators: [{
354
- type: NgModule,
355
- args: [{
356
- imports: [CommonModule, PlatformModule],
357
- declarations: [WrInputDirective],
358
- exports: [WrInputDirective]
359
- }]
360
- }] });
361
-
362
- class WrExtendedInputComponent {
363
- constructor(ngControl, elRef, r2) {
364
- this.ngControl = ngControl;
365
- this.elRef = elRef;
366
- this.r2 = r2;
367
- this.class = `${stylePrefix}-extended-input`;
368
- this.disabled = false;
369
- this.value = undefined;
370
- this.touched = false;
371
- this.onChange = (value) => { };
372
- this.onTouched = () => { };
373
- if (ngControl !== null) {
374
- ngControl.valueAccessor = this;
375
- }
376
- }
377
- ngOnInit() {
378
- const el = this.elRef.nativeElement;
379
- const add = (klass) => this.r2.addClass(el, `${this.class}-${klass}`);
380
- if (this.suffix) {
381
- add('-has-suffix');
382
- }
383
- if (this.prefix) {
384
- add('-has-prefix');
385
- }
386
- }
387
- onInput($event) {
388
- this.value = $event.currentTarget.value;
389
- this.touched = true;
390
- this.onChange(this.value);
391
- }
392
- onFocusOut() {
393
- this.touched = true;
394
- this.onTouched();
395
- }
396
- registerOnChange(fn) {
397
- this.onChange = fn;
398
- }
399
- registerOnTouched(fn) {
400
- this.onTouched = fn;
401
- }
402
- writeValue(obj) {
403
- this.value = obj;
404
- }
405
- }
406
- 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 });
407
- 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 });
408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputComponent, decorators: [{
409
- type: Component,
410
- 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" }]
411
- }], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
412
- type: Optional
413
- }, {
414
- type: Self
415
- }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { class: [{
416
- type: HostBinding,
417
- args: ['class']
418
- }], suffix: [{
419
- type: Input
420
- }], prefix: [{
421
- type: Input
422
- }] } });
423
-
424
- class WrExtendedInputModule {
425
- }
426
- WrExtendedInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
427
- WrExtendedInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, declarations: [WrExtendedInputComponent], imports: [CommonModule, PlatformModule, WrInputModule], exports: [WrExtendedInputComponent] });
428
- WrExtendedInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, imports: [CommonModule, PlatformModule, WrInputModule] });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrExtendedInputModule, decorators: [{
430
- type: NgModule,
431
- args: [{
432
- imports: [CommonModule, PlatformModule, WrInputModule],
433
- declarations: [WrExtendedInputComponent],
434
- exports: [WrExtendedInputComponent]
435
- }]
436
- }] });
437
-
438
- class WrFormErrorComponent {
439
- constructor() {
440
- this.class = `${stylePrefix}-form-error`;
441
- }
442
- }
443
- WrFormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
444
- 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 });
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormErrorComponent, decorators: [{
446
- type: Component,
447
- args: [{
448
- selector: 'wr-form-error',
449
- changeDetection: ChangeDetectionStrategy.OnPush,
450
- encapsulation: ViewEncapsulation.None,
451
- template: `<ng-content></ng-content>`
452
- }]
453
- }], propDecorators: { class: [{
454
- type: HostBinding,
455
- args: ['class']
456
- }] } });
457
-
458
- class WrFormItemComponent {
459
- constructor(cdr, elRef, r2) {
460
- this.cdr = cdr;
461
- this.elRef = elRef;
462
- this.r2 = r2;
463
- this.hasError = false;
464
- this.baseClass = `${stylePrefix}-form-item`;
465
- }
466
- ngOnInit() {
467
- this.setClasses();
468
- }
469
- ngOnChanges(changes) {
470
- if (!changes['hasError']?.currentValue) {
471
- this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--has-error`);
472
- }
473
- this.setClasses();
474
- this.cdr.detectChanges();
475
- }
476
- setClasses() {
477
- const el = this.elRef.nativeElement;
478
- const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
479
- this.r2.addClass(el, this.baseClass);
480
- if (this.hasError) {
481
- add('-has-error');
482
- }
483
- }
484
- }
485
- 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 });
486
- 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 });
487
- __decorate([
488
- InputBoolean()
489
- ], WrFormItemComponent.prototype, "hasError", void 0);
490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormItemComponent, decorators: [{
491
- type: Component,
492
- args: [{
493
- selector: 'wr-form-item',
494
- changeDetection: ChangeDetectionStrategy.OnPush,
495
- encapsulation: ViewEncapsulation.None,
496
- template: `<ng-content></ng-content>`
497
- }]
498
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hasError: [{
499
- type: Input
500
- }] } });
501
-
502
- class WrFormModule {
503
- }
504
- WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
505
- WrFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, declarations: [WrFormItemComponent, WrFormErrorComponent], imports: [CommonModule], exports: [WrFormItemComponent, WrFormErrorComponent] });
506
- WrFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, imports: [CommonModule] });
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrFormModule, decorators: [{
508
- type: NgModule,
509
- args: [{
510
- imports: [CommonModule],
511
- declarations: [WrFormItemComponent, WrFormErrorComponent],
512
- exports: [WrFormItemComponent, WrFormErrorComponent]
513
- }]
514
- }] });
515
14
 
516
15
  /* 🤖 this file was generated by svg-to-ts */
517
16
  const wrIconAddCircleOutline = {
@@ -897,94 +396,722 @@ const wrIconSet = [
897
396
  wrIconWarning
898
397
  ];
899
398
 
900
- class WrIconService {
901
- /**
902
- * Access icons registry
903
- */
904
- get registry() {
905
- return WrIconService.registry;
906
- }
907
- /**
908
- * Register all icons
909
- */
910
- static registerIcons() {
911
- 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 () { return [{ type: i0.ElementRef }, { type: WrIconService }, { type: undefined, decorators: [{
462
+ type: Optional
463
+ }, {
464
+ type: Inject,
465
+ args: [DOCUMENT]
466
+ }] }]; }, propDecorators: { class: [{
467
+ type: HostBinding,
468
+ args: ['class']
469
+ }], name: [{
470
+ type: Input
471
+ }] } });
472
+
473
+ class WrIconModule {
474
+ static forRoot() {
475
+ WrIconService.registerIcons();
476
+ return { ngModule: WrIconModule };
477
+ }
478
+ }
479
+ WrIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
480
+ WrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, declarations: [WrIconComponent], exports: [WrIconComponent] });
481
+ WrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule });
482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrIconModule, decorators: [{
483
+ type: NgModule,
484
+ args: [{
485
+ declarations: [WrIconComponent],
486
+ exports: [WrIconComponent]
487
+ }]
488
+ }] });
489
+
490
+ class BaseComponent {
491
+ constructor() {
492
+ this.ngUnsubscribe = new Subject();
493
+ }
494
+ ngOnDestroy() {
495
+ this.ngUnsubscribe.next();
496
+ this.ngUnsubscribe.complete();
497
+ }
498
+ }
499
+ BaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
500
+ BaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.8", type: BaseComponent, ngImport: i0 });
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: BaseComponent, decorators: [{
502
+ type: Directive
503
+ }] });
504
+
505
+ const stylePrefix = 'wr';
506
+
507
+ function toBoolean(value) {
508
+ return coerceBooleanProperty(value);
509
+ }
510
+ // eslint-disable
511
+ function propDecoratorFactory(name, fallback) {
512
+ function propDecorator(target, propName, originalDescriptor) {
513
+ const privatePropName = `$$__wrPropDecorator__${propName}`;
514
+ if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
515
+ console.warn(`The prop "${privatePropName}" is already exist, it will be overrided by ${name} decorator.`);
516
+ }
517
+ Object.defineProperty(target, privatePropName, {
518
+ configurable: true,
519
+ writable: true
520
+ });
521
+ return {
522
+ get() {
523
+ return originalDescriptor && originalDescriptor.get
524
+ ? originalDescriptor.get.bind(this)()
525
+ : this[privatePropName];
526
+ },
527
+ set(value) {
528
+ if (originalDescriptor && originalDescriptor.set) {
529
+ originalDescriptor.set.bind(this)(fallback(value));
530
+ }
531
+ this[privatePropName] = fallback(value);
532
+ }
533
+ };
534
+ }
535
+ return propDecorator;
536
+ }
537
+ /**
538
+ * Input decorator that handle a prop to do get/set automatically with toBoolean
539
+ *
540
+ * Why not using @InputBoolean alone without @Input? AOT needs @Input to be visible
541
+ *
542
+ * @howToUse
543
+ * ```
544
+ * @Input() @InputBoolean() visible: boolean = false;
545
+ *
546
+ * // Act as below:
547
+ * // @Input()
548
+ * // get visible() { return this.__visible; }
549
+ * // set visible(value) { this.__visible = value; }
550
+ * // __visible = false;
551
+ * ```
552
+ */
553
+ function InputBoolean() {
554
+ return propDecoratorFactory('InputBoolean', toBoolean);
555
+ }
556
+
557
+ // Components
558
+
559
+ class WrSpinnerComponent {
560
+ constructor() {
561
+ this.class = `${stylePrefix}-spin`;
562
+ }
563
+ }
564
+ WrSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
565
+ 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 });
566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerComponent, decorators: [{
567
+ type: Component,
568
+ args: [{
569
+ selector: 'wr-spin',
570
+ template: '<svg viewBox="0 0 50 50"><circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5"></circle></svg>',
571
+ encapsulation: ViewEncapsulation.None,
572
+ changeDetection: ChangeDetectionStrategy.OnPush
573
+ }]
574
+ }], propDecorators: { class: [{
575
+ type: HostBinding,
576
+ args: ['class']
577
+ }] } });
578
+
579
+ class WrSpinnerModule {
580
+ }
581
+ WrSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
582
+ WrSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, declarations: [WrSpinnerComponent], exports: [WrSpinnerComponent] });
583
+ WrSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule });
584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSpinnerModule, decorators: [{
585
+ type: NgModule,
586
+ args: [{
587
+ declarations: [WrSpinnerComponent],
588
+ exports: [WrSpinnerComponent]
589
+ }]
590
+ }] });
591
+
592
+ class WrButtonComponent extends BaseComponent {
593
+ constructor(cdr, elRef, ngZone, r2) {
594
+ super();
595
+ this.cdr = cdr;
596
+ this.elRef = elRef;
597
+ this.ngZone = ngZone;
598
+ this.r2 = r2;
599
+ this.color = 'primary';
600
+ this.size = 'default';
601
+ this.icon = null;
602
+ this.iconPosition = 'start';
603
+ this.disabled = false;
604
+ this.outlined = false;
605
+ this.rounded = false;
606
+ this.loading = false;
607
+ this.fullwidth = false;
608
+ this._disabled = this.disabled || null;
609
+ }
610
+ get elClasses() {
611
+ return {
612
+ 'wr-btn': true,
613
+ 'wr-btn--primary': this.color === 'primary',
614
+ 'wr-btn--secondary': this.color === 'secondary',
615
+ 'wr-btn--success': this.color === 'success',
616
+ 'wr-btn--warning': this.color === 'warning',
617
+ 'wr-btn--danger': this.color === 'danger',
618
+ 'wr-btn--light': this.color === 'light',
619
+ 'wr-btn--medium': this.color === 'medium',
620
+ 'wr-btn--dark': this.color === 'dark',
621
+ 'wr-btn--default': this.size === 'default',
622
+ 'wr-btn--small': this.size === 'small',
623
+ 'wr-btn--icon-start': this.icon && this.iconPosition === 'start',
624
+ 'wr-btn--icon-end': this.icon && this.iconPosition === 'end',
625
+ 'wr-btn--outlined': this.outlined,
626
+ 'wr-btn--rounded': this.rounded,
627
+ 'wr-btn--loading': this.loading,
628
+ 'wr-btn--full': this.fullwidth
629
+ };
630
+ }
631
+ ngOnInit() {
632
+ /**
633
+ * Event listener added to prevent default behavior, so we don't need to call change detection
634
+ * By default, compiler wraps HostListener to `ɵɵlistener`, which call `markDirty()` before running actual listener.
635
+ */
636
+ this.ngZone.runOutsideAngular(() => {
637
+ fromEvent(this.elRef.nativeElement, 'click')
638
+ .pipe(takeUntil(this.ngUnsubscribe))
639
+ .subscribe(event => {
640
+ if (this.disabled && event.target?.tagName === 'A') {
641
+ event.preventDefault();
642
+ event.stopImmediatePropagation();
643
+ }
644
+ });
645
+ });
646
+ }
647
+ ngAfterViewInit() {
648
+ this.insertSpan(this.elRef.nativeElement.childNodes, this.r2);
649
+ }
650
+ /**
651
+ * Sanitizing `<ng-content></ng-content>` from other content except #text
652
+ *
653
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName}
654
+ *
655
+ * @param {NodeList} nodes List of nodes from `nativeElement.childNodes`
656
+ * @param {Renderer2} r2 Renderer2 from `@angular/core`
657
+ */
658
+ insertSpan(nodes, r2) {
659
+ nodes.forEach(node => {
660
+ if (node.nodeName === '#text') {
661
+ const span = r2.createElement('span');
662
+ r2.addClass(span, `wr-btn__text`);
663
+ const parent = r2.parentNode(node);
664
+ r2.insertBefore(parent, span, node);
665
+ r2.appendChild(span, node);
666
+ }
667
+ });
668
+ }
669
+ }
670
+ 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 });
671
+ 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 });
672
+ __decorate([
673
+ InputBoolean()
674
+ ], WrButtonComponent.prototype, "disabled", void 0);
675
+ __decorate([
676
+ InputBoolean()
677
+ ], WrButtonComponent.prototype, "outlined", void 0);
678
+ __decorate([
679
+ InputBoolean()
680
+ ], WrButtonComponent.prototype, "rounded", void 0);
681
+ __decorate([
682
+ InputBoolean()
683
+ ], WrButtonComponent.prototype, "loading", void 0);
684
+ __decorate([
685
+ InputBoolean()
686
+ ], WrButtonComponent.prototype, "fullwidth", void 0);
687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonComponent, decorators: [{
688
+ type: Component,
689
+ 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" }]
690
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { color: [{
691
+ type: Input
692
+ }], size: [{
693
+ type: Input
694
+ }], icon: [{
695
+ type: Input
696
+ }], iconPosition: [{
697
+ type: Input
698
+ }], disabled: [{
699
+ type: Input
700
+ }], outlined: [{
701
+ type: Input
702
+ }], rounded: [{
703
+ type: Input
704
+ }], loading: [{
705
+ type: Input
706
+ }], fullwidth: [{
707
+ type: Input
708
+ }], elClasses: [{
709
+ type: HostBinding,
710
+ args: ['class']
711
+ }], _disabled: [{
712
+ type: HostBinding,
713
+ args: ['disabled']
714
+ }] } });
715
+
716
+ class WrButtonModule {
717
+ }
718
+ WrButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
719
+ WrButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, declarations: [WrButtonComponent], imports: [CommonModule, WrSpinnerModule, WrIconModule], exports: [WrButtonComponent] });
720
+ WrButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, imports: [CommonModule, WrSpinnerModule, WrIconModule] });
721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrButtonModule, decorators: [{
722
+ type: NgModule,
723
+ args: [{
724
+ imports: [CommonModule, WrSpinnerModule, WrIconModule],
725
+ declarations: [WrButtonComponent],
726
+ exports: [WrButtonComponent]
727
+ }]
728
+ }] });
729
+
730
+ class WrCheckboxComponent extends BaseComponent {
731
+ constructor(cdr, elRef, focusMonitor, ngZone) {
732
+ super();
733
+ this.cdr = cdr;
734
+ this.elRef = elRef;
735
+ this.focusMonitor = focusMonitor;
736
+ this.ngZone = ngZone;
737
+ this.onChange = () => { };
738
+ this.onTouch = () => { };
739
+ this.checked = false;
740
+ this.disabled = false;
741
+ this.autoFocus = false;
742
+ this.checkedChange = new EventEmitter();
743
+ this.class = `${stylePrefix}-checkbox`;
744
+ }
745
+ ngOnInit() {
746
+ this.ngZone.runOutsideAngular(() => {
747
+ fromEvent(this.elRef.nativeElement, 'click')
748
+ .pipe(takeUntil(this.ngUnsubscribe))
749
+ .subscribe(event => {
750
+ event.preventDefault();
751
+ this.focus();
752
+ if (this.disabled) {
753
+ event.stopImmediatePropagation();
754
+ return;
755
+ }
756
+ this.ngZone.run(() => {
757
+ this.onModelChange(!this.checked);
758
+ this.cdr.markForCheck();
759
+ });
760
+ });
761
+ fromEvent(this.inputElement.nativeElement, 'click')
762
+ .pipe(takeUntil(this.ngUnsubscribe))
763
+ .subscribe(event => event.stopPropagation());
764
+ });
765
+ }
766
+ ngAfterViewInit() {
767
+ if (this.autoFocus) {
768
+ this.focus();
769
+ }
770
+ }
771
+ ngOnDestroy() {
772
+ super.ngOnDestroy();
773
+ this.focusMonitor.stopMonitoring(this.elRef);
774
+ }
775
+ writeValue(value) {
776
+ this.checked = value;
777
+ this.cdr.markForCheck();
778
+ }
779
+ registerOnChange(fn) {
780
+ this.onChange = fn;
781
+ }
782
+ registerOnTouched(fn) {
783
+ this.onTouch = fn;
784
+ }
785
+ setDisabledState(isDisabled) {
786
+ this.disabled = isDisabled;
787
+ this.cdr.markForCheck();
788
+ }
789
+ focus() {
790
+ this.focusMonitor.focusVia(this.inputElement, 'keyboard');
791
+ }
792
+ blur() {
793
+ this.inputElement.nativeElement.blur();
794
+ }
795
+ onModelChange(checked) {
796
+ if (!this.disabled) {
797
+ this.checked = checked;
798
+ this.onChange(this.checked);
799
+ this.checkedChange.emit(this.checked);
800
+ }
801
+ }
802
+ }
803
+ 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 });
804
+ 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: [
805
+ {
806
+ provide: NG_VALUE_ACCESSOR,
807
+ useExisting: forwardRef(() => WrCheckboxComponent),
808
+ multi: true
809
+ }
810
+ ], 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 });
811
+ __decorate([
812
+ InputBoolean()
813
+ ], WrCheckboxComponent.prototype, "checked", void 0);
814
+ __decorate([
815
+ InputBoolean()
816
+ ], WrCheckboxComponent.prototype, "disabled", void 0);
817
+ __decorate([
818
+ InputBoolean()
819
+ ], WrCheckboxComponent.prototype, "autoFocus", void 0);
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxComponent, decorators: [{
821
+ type: Component,
822
+ args: [{ selector: 'wr-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
823
+ {
824
+ provide: NG_VALUE_ACCESSOR,
825
+ useExisting: forwardRef(() => WrCheckboxComponent),
826
+ multi: true
827
+ }
828
+ ], 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" }]
829
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { inputElement: [{
830
+ type: ViewChild,
831
+ args: ['inputElement', { static: true }]
832
+ }], checked: [{
833
+ type: Input
834
+ }], disabled: [{
835
+ type: Input
836
+ }], autoFocus: [{
837
+ type: Input
838
+ }], checkedChange: [{
839
+ type: Output
840
+ }], class: [{
841
+ type: HostBinding,
842
+ args: ['class']
843
+ }] } });
844
+
845
+ class WrCheckboxModule {
846
+ }
847
+ WrCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
848
+ WrCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, declarations: [WrCheckboxComponent], imports: [CommonModule, FormsModule, A11yModule], exports: [WrCheckboxComponent] });
849
+ WrCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, imports: [CommonModule, FormsModule, A11yModule] });
850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrCheckboxModule, decorators: [{
851
+ type: NgModule,
852
+ args: [{
853
+ imports: [CommonModule, FormsModule, A11yModule],
854
+ declarations: [WrCheckboxComponent],
855
+ exports: [WrCheckboxComponent]
856
+ }]
857
+ }] });
858
+
859
+ class WrDividerComponent {
860
+ constructor() {
861
+ this.class = `${stylePrefix}-divider`;
912
862
  }
913
863
  }
914
- /**
915
- * Icons registry
916
- */
917
- WrIconService.registry = new Map();
918
- WrIconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
919
- WrIconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, providedIn: 'root' });
920
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconService, decorators: [{
921
- type: Injectable,
864
+ WrDividerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
865
+ 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 });
866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerComponent, decorators: [{
867
+ type: Component,
922
868
  args: [{
923
- providedIn: 'root'
869
+ selector: 'wr-divider',
870
+ template: '',
871
+ changeDetection: ChangeDetectionStrategy.OnPush,
872
+ encapsulation: ViewEncapsulation.None
873
+ }]
874
+ }], propDecorators: { class: [{
875
+ type: HostBinding,
876
+ args: ['class']
877
+ }] } });
878
+
879
+ class WrDividerModule {
880
+ }
881
+ WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
882
+ WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, declarations: [WrDividerComponent], exports: [WrDividerComponent] });
883
+ WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule });
884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrDividerModule, decorators: [{
885
+ type: NgModule,
886
+ args: [{
887
+ declarations: [WrDividerComponent],
888
+ exports: [WrDividerComponent]
924
889
  }]
925
890
  }] });
926
891
 
927
- class WrIconComponent {
928
- constructor(elRef, iconService, doc) {
929
- this.elRef = elRef;
930
- this.iconService = iconService;
931
- this.doc = doc;
932
- this.class = 'wr-icon';
892
+ class WrInputDirective extends BaseComponent {
893
+ constructor(ngControl) {
894
+ super();
895
+ this.ngControl = ngControl;
896
+ this.class = `${stylePrefix}-input`;
897
+ this._disabled = false;
898
+ this.disabled$ = new Subject();
933
899
  }
934
- set name(name) {
935
- if (!this.iconService.registry.has(name)) {
936
- console.warn(`Icon ${name} was not found`);
937
- return;
900
+ get disabled() {
901
+ if (this.ngControl && this.ngControl.disabled !== null) {
902
+ return this.ngControl.disabled;
938
903
  }
939
- if (this.svgIcon) {
940
- this.elRef.nativeElement.removeChild(this.svgIcon);
904
+ return this._disabled;
905
+ }
906
+ set disabled(value) {
907
+ this._disabled = value != null && `${value}` !== 'false';
908
+ }
909
+ ngOnInit() {
910
+ if (this.ngControl) {
911
+ this.ngControl.statusChanges
912
+ ?.pipe(filter(() => this.ngControl.disabled !== null), takeUntil(this.ngUnsubscribe))
913
+ .subscribe(() => this.disabled$.next(this.ngControl.disabled));
941
914
  }
942
- const svgData = this.iconService.registry.get(name) || '';
943
- this.svgIcon = this.svgElementFromString(svgData);
944
- this.elRef.nativeElement.appendChild(this.svgIcon);
945
915
  }
946
- svgElementFromString(svgContent) {
947
- const div = this.doc.createElement('div');
948
- div.innerHTML = svgContent;
949
- return div.querySelector('svg') || this.doc.createElementNS('http://www.w3.org/2000/svg', 'path');
916
+ ngOnChanges(changes) {
917
+ const { disabled } = changes;
918
+ if (disabled) {
919
+ this.disabled$.next(this.disabled);
920
+ }
950
921
  }
951
922
  }
952
- 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 });
953
- 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 });
954
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconComponent, decorators: [{
955
- type: Component,
923
+ 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 });
924
+ 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 });
925
+ __decorate([
926
+ InputBoolean()
927
+ ], WrInputDirective.prototype, "disabled", null);
928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputDirective, decorators: [{
929
+ type: Directive,
956
930
  args: [{
957
- selector: 'wr-icon[name]',
958
- template: '',
959
- encapsulation: ViewEncapsulation.None,
960
- changeDetection: ChangeDetectionStrategy.OnPush
931
+ selector: 'wr-input, input[wr-input], textarea[wr-input]'
961
932
  }]
962
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: WrIconService }, { type: undefined, decorators: [{
933
+ }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
963
934
  type: Optional
964
935
  }, {
965
- type: Inject,
966
- args: [DOCUMENT]
936
+ type: Self
967
937
  }] }]; }, propDecorators: { class: [{
968
938
  type: HostBinding,
969
939
  args: ['class']
970
- }], name: [{
940
+ }], disabled: [{
941
+ type: HostBinding,
942
+ args: [`class.${stylePrefix}-input--disabled`]
943
+ }, {
944
+ type: HostBinding,
945
+ args: ['disabled']
946
+ }, {
971
947
  type: Input
972
948
  }] } });
973
949
 
974
- class WrIconModule {
975
- static forRoot() {
976
- WrIconService.registerIcons();
977
- return { ngModule: WrIconModule };
950
+ class WrInputModule {
951
+ }
952
+ WrInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
953
+ WrInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, declarations: [WrInputDirective], imports: [CommonModule, PlatformModule], exports: [WrInputDirective] });
954
+ WrInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, imports: [CommonModule, PlatformModule] });
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrInputModule, decorators: [{
956
+ type: NgModule,
957
+ args: [{
958
+ imports: [CommonModule, PlatformModule],
959
+ declarations: [WrInputDirective],
960
+ exports: [WrInputDirective]
961
+ }]
962
+ }] });
963
+
964
+ class WrExtendedInputComponent {
965
+ constructor(ngControl, elRef, r2) {
966
+ this.ngControl = ngControl;
967
+ this.elRef = elRef;
968
+ this.r2 = r2;
969
+ this.class = `${stylePrefix}-extended-input`;
970
+ this.disabled = false;
971
+ this.value = undefined;
972
+ this.touched = false;
973
+ this.onChange = (value) => { };
974
+ this.onTouched = () => { };
975
+ if (ngControl !== null) {
976
+ ngControl.valueAccessor = this;
977
+ }
978
+ }
979
+ ngOnInit() {
980
+ const el = this.elRef.nativeElement;
981
+ const add = (klass) => this.r2.addClass(el, `${this.class}-${klass}`);
982
+ if (this.suffix) {
983
+ add('-has-suffix');
984
+ }
985
+ if (this.prefix) {
986
+ add('-has-prefix');
987
+ }
988
+ }
989
+ onInput($event) {
990
+ this.value = $event.currentTarget.value;
991
+ this.touched = true;
992
+ this.onChange(this.value);
993
+ }
994
+ onFocusOut() {
995
+ this.touched = true;
996
+ this.onTouched();
997
+ }
998
+ registerOnChange(fn) {
999
+ this.onChange = fn;
1000
+ }
1001
+ registerOnTouched(fn) {
1002
+ this.onTouched = fn;
978
1003
  }
1004
+ writeValue(obj) {
1005
+ this.value = obj;
1006
+ }
1007
+ }
1008
+ 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 });
1009
+ 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 });
1010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputComponent, decorators: [{
1011
+ type: Component,
1012
+ 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" }]
1013
+ }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1014
+ type: Optional
1015
+ }, {
1016
+ type: Self
1017
+ }] }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { class: [{
1018
+ type: HostBinding,
1019
+ args: ['class']
1020
+ }], suffix: [{
1021
+ type: Input
1022
+ }], prefix: [{
1023
+ type: Input
1024
+ }] } });
1025
+
1026
+ class WrExtendedInputModule {
979
1027
  }
980
- WrIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
981
- WrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, declarations: [WrIconComponent], exports: [WrIconComponent] });
982
- WrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule });
983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrIconModule, decorators: [{
1028
+ WrExtendedInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1029
+ WrExtendedInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, declarations: [WrExtendedInputComponent], imports: [CommonModule, PlatformModule, WrInputModule], exports: [WrExtendedInputComponent] });
1030
+ WrExtendedInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, imports: [CommonModule, PlatformModule, WrInputModule] });
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrExtendedInputModule, decorators: [{
984
1032
  type: NgModule,
985
1033
  args: [{
986
- declarations: [WrIconComponent],
987
- exports: [WrIconComponent]
1034
+ imports: [CommonModule, PlatformModule, WrInputModule],
1035
+ declarations: [WrExtendedInputComponent],
1036
+ exports: [WrExtendedInputComponent]
1037
+ }]
1038
+ }] });
1039
+
1040
+ class WrFormErrorComponent {
1041
+ constructor() {
1042
+ this.class = `${stylePrefix}-form-error`;
1043
+ }
1044
+ }
1045
+ WrFormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1046
+ 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 });
1047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormErrorComponent, decorators: [{
1048
+ type: Component,
1049
+ args: [{
1050
+ selector: 'wr-form-error',
1051
+ changeDetection: ChangeDetectionStrategy.OnPush,
1052
+ encapsulation: ViewEncapsulation.None,
1053
+ template: `<ng-content></ng-content>`
1054
+ }]
1055
+ }], propDecorators: { class: [{
1056
+ type: HostBinding,
1057
+ args: ['class']
1058
+ }] } });
1059
+
1060
+ class WrFormItemComponent {
1061
+ constructor(cdr, elRef, r2) {
1062
+ this.cdr = cdr;
1063
+ this.elRef = elRef;
1064
+ this.r2 = r2;
1065
+ this.hasError = false;
1066
+ this.baseClass = `${stylePrefix}-form-item`;
1067
+ }
1068
+ ngOnInit() {
1069
+ this.setClasses();
1070
+ }
1071
+ ngOnChanges(changes) {
1072
+ if (!changes['hasError']?.currentValue) {
1073
+ this.r2.removeClass(this.elRef.nativeElement, `${this.baseClass}--has-error`);
1074
+ }
1075
+ this.setClasses();
1076
+ this.cdr.detectChanges();
1077
+ }
1078
+ setClasses() {
1079
+ const el = this.elRef.nativeElement;
1080
+ const add = (klass) => this.r2.addClass(el, `${this.baseClass}-${klass}`);
1081
+ this.r2.addClass(el, this.baseClass);
1082
+ if (this.hasError) {
1083
+ add('-has-error');
1084
+ }
1085
+ }
1086
+ }
1087
+ 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 });
1088
+ 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 });
1089
+ __decorate([
1090
+ InputBoolean()
1091
+ ], WrFormItemComponent.prototype, "hasError", void 0);
1092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormItemComponent, decorators: [{
1093
+ type: Component,
1094
+ args: [{
1095
+ selector: 'wr-form-item',
1096
+ changeDetection: ChangeDetectionStrategy.OnPush,
1097
+ encapsulation: ViewEncapsulation.None,
1098
+ template: `<ng-content></ng-content>`
1099
+ }]
1100
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hasError: [{
1101
+ type: Input
1102
+ }] } });
1103
+
1104
+ class WrFormModule {
1105
+ }
1106
+ WrFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1107
+ WrFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, declarations: [WrFormItemComponent, WrFormErrorComponent], imports: [CommonModule], exports: [WrFormItemComponent, WrFormErrorComponent] });
1108
+ WrFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, imports: [CommonModule] });
1109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrFormModule, decorators: [{
1110
+ type: NgModule,
1111
+ args: [{
1112
+ imports: [CommonModule],
1113
+ declarations: [WrFormItemComponent, WrFormErrorComponent],
1114
+ exports: [WrFormItemComponent, WrFormErrorComponent]
988
1115
  }]
989
1116
  }] });
990
1117
 
@@ -1025,12 +1152,12 @@ class WrPasswordInputComponent {
1025
1152
  this.value = obj;
1026
1153
  }
1027
1154
  }
1028
- 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 });
1029
- 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 });
1030
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputComponent, decorators: [{
1155
+ 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 });
1156
+ 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 });
1157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputComponent, decorators: [{
1031
1158
  type: Component,
1032
1159
  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" }]
1033
- }], ctorParameters: function () { return [{ type: i1.NgControl, decorators: [{
1160
+ }], ctorParameters: function () { return [{ type: i1$1.NgControl, decorators: [{
1034
1161
  type: Optional
1035
1162
  }, {
1036
1163
  type: Self
@@ -1041,10 +1168,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1041
1168
 
1042
1169
  class WrPasswordInputModule {
1043
1170
  }
1044
- WrPasswordInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1045
- 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] });
1046
- WrPasswordInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule] });
1047
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrPasswordInputModule, decorators: [{
1171
+ WrPasswordInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1172
+ 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] });
1173
+ WrPasswordInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule] });
1174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrPasswordInputModule, decorators: [{
1048
1175
  type: NgModule,
1049
1176
  args: [{
1050
1177
  imports: [CommonModule, PlatformModule, WrInputModule, WrIconModule],
@@ -1064,9 +1191,9 @@ class WrSkeletonComponent {
1064
1191
  this.elRef.nativeElement.style.setProperty('--skeleton-style', style);
1065
1192
  }
1066
1193
  }
1067
- WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1068
- 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 });
1069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonComponent, decorators: [{
1194
+ WrSkeletonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1195
+ 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 });
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonComponent, decorators: [{
1070
1197
  type: Component,
1071
1198
  args: [{
1072
1199
  selector: 'wr-skeleton',
@@ -1083,10 +1210,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1083
1210
 
1084
1211
  class WrSkeletonModule {
1085
1212
  }
1086
- WrSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1087
- WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrSkeletonComponent] });
1088
- WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule, WrSpinnerModule] });
1089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrSkeletonModule, decorators: [{
1213
+ WrSkeletonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1214
+ WrSkeletonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, declarations: [WrSkeletonComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrSkeletonComponent] });
1215
+ WrSkeletonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, imports: [CommonModule, WrSpinnerModule] });
1216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrSkeletonModule, decorators: [{
1090
1217
  type: NgModule,
1091
1218
  args: [{
1092
1219
  imports: [CommonModule, WrSpinnerModule],
@@ -1134,8 +1261,8 @@ class WrTagComponent {
1134
1261
  }
1135
1262
  }
1136
1263
  }
1137
- 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 });
1138
- 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 });
1264
+ 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 });
1265
+ 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 });
1139
1266
  __decorate([
1140
1267
  InputBoolean()
1141
1268
  ], WrTagComponent.prototype, "transparent", void 0);
@@ -1151,7 +1278,7 @@ __decorate([
1151
1278
  __decorate([
1152
1279
  InputBoolean()
1153
1280
  ], WrTagComponent.prototype, "hoverable", void 0);
1154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagComponent, decorators: [{
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagComponent, decorators: [{
1155
1282
  type: Component,
1156
1283
  args: [{
1157
1284
  selector: 'wr-tag',
@@ -1175,10 +1302,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1175
1302
 
1176
1303
  class WrTagModule {
1177
1304
  }
1178
- WrTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1179
- WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrTagComponent] });
1180
- WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrSpinnerModule] });
1181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: WrTagModule, decorators: [{
1305
+ WrTagModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1306
+ WrTagModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, declarations: [WrTagComponent], imports: [CommonModule, WrSpinnerModule], exports: [WrTagComponent] });
1307
+ WrTagModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, imports: [CommonModule, WrSpinnerModule] });
1308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: WrTagModule, decorators: [{
1182
1309
  type: NgModule,
1183
1310
  args: [{
1184
1311
  imports: [CommonModule, WrSpinnerModule],
@@ -1191,5 +1318,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1191
1318
  * Generated bundle index. Do not edit.
1192
1319
  */
1193
1320
 
1194
- 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 };
1321
+ 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 };
1195
1322
  //# sourceMappingURL=ngwr.mjs.map