ngwr 0.6.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/_index.scss +21 -21
- package/button/button.d.ts +1 -1
- package/button/button.scss +2 -2
- package/checkbox/checkbox.d.ts +1 -1
- package/core/color/color.d.ts +1 -1
- package/core/overlay/connected-overlay-directive.d.ts +1 -1
- package/core/overlay/position-type.d.ts +1 -1
- package/core/types/on-change-type.d.ts +1 -1
- package/core/types/on-touched-type.d.ts +1 -1
- package/core/types/safe-any.d.ts +1 -1
- package/dialog/dialog-content-directives.d.ts +1 -1
- package/divider/divider.d.ts +1 -1
- package/divider/divider.scss +2 -2
- package/{esm2020 → esm2022}/button/button-module.mjs +5 -5
- package/esm2022/button/button.mjs +187 -0
- package/{esm2020 → esm2022}/checkbox/checkbox-module.mjs +5 -5
- package/esm2022/checkbox/checkbox.mjs +154 -0
- package/{esm2020 → esm2022}/core/abstract/base.mjs +4 -4
- package/esm2022/core/overlay/connected-overlay-directive.mjs +98 -0
- package/{esm2020 → esm2022}/core/overlay/overlay-module.mjs +5 -5
- package/{esm2020 → esm2022}/dialog/dialog-base.mjs +4 -4
- package/esm2022/dialog/dialog-container.mjs +58 -0
- package/esm2022/dialog/dialog-content-directives.mjs +98 -0
- package/{esm2020 → esm2022}/dialog/dialog-module.mjs +5 -5
- package/{esm2020 → esm2022}/dialog/dialog-service.mjs +11 -11
- package/{esm2020 → esm2022}/divider/divider-module.mjs +5 -5
- package/esm2022/divider/divider.mjs +100 -0
- package/{esm2020 → esm2022}/form/form-error.mjs +4 -4
- package/esm2022/form/form-item.mjs +46 -0
- package/{esm2020 → esm2022}/form/form-module.mjs +5 -5
- package/{esm2020 → esm2022}/icon/icon-module.mjs +5 -5
- package/esm2022/icon/icon-service.mjs +21 -0
- package/esm2022/icon/icon.mjs +60 -0
- package/esm2022/icon/icons.mjs +464 -0
- package/{esm2020 → esm2022}/input/input-module.mjs +5 -5
- package/esm2022/input/input.mjs +240 -0
- package/{esm2020 → esm2022}/skeleton/skeleton-module.mjs +5 -5
- package/{esm2020 → esm2022}/skeleton/skeleton.mjs +4 -4
- package/{esm2020 → esm2022}/spinner/spinner-module.mjs +5 -5
- package/{esm2020 → esm2022}/spinner/spinner.mjs +4 -4
- package/{esm2020 → esm2022}/tag/tag-module.mjs +5 -5
- package/{esm2020 → esm2022}/tag/tag.mjs +4 -4
- package/esm2022/tooltip/tooltip-component.mjs +93 -0
- package/esm2022/tooltip/tooltip-directive.mjs +85 -0
- package/{esm2020 → esm2022}/tooltip/tooltip-module.mjs +5 -5
- package/{fesm2015 → fesm2022}/ngwr-button.mjs +29 -30
- package/{fesm2020 → fesm2022}/ngwr-button.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngwr-checkbox.mjs +39 -40
- package/fesm2022/ngwr-checkbox.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngwr-core-abstract.mjs +3 -4
- package/{fesm2020 → fesm2022}/ngwr-core-abstract.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngwr-core-color.mjs +0 -1
- package/{fesm2020 → fesm2022}/ngwr-core-decorators.mjs +0 -1
- package/{fesm2015 → fesm2022}/ngwr-core-overlay.mjs +13 -14
- package/{fesm2015 → fesm2022}/ngwr-core-overlay.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngwr-core-types.mjs +0 -1
- package/{fesm2020 → fesm2022}/ngwr-dialog.mjs +44 -45
- package/{fesm2020 → fesm2022}/ngwr-dialog.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngwr-divider.mjs +15 -16
- package/{fesm2015 → fesm2022}/ngwr-divider.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngwr-form.mjs +14 -15
- package/fesm2022/ngwr-form.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngwr-icon.mjs +81 -81
- package/fesm2022/ngwr-icon.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngwr-input.mjs +41 -42
- package/fesm2022/ngwr-input.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngwr-skeleton.mjs +7 -8
- package/{fesm2020 → fesm2022}/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +43 -0
- package/fesm2022/ngwr-spinner.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngwr-tag.mjs +7 -8
- package/{fesm2020 → fesm2022}/ngwr-tag.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngwr-tooltip.mjs +26 -27
- package/{fesm2015 → fesm2022}/ngwr-tooltip.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngwr.mjs +0 -1
- package/form/form-item.d.ts +1 -1
- package/icon/icon.d.ts +1 -1
- package/icon/icons.d.ts +2 -2
- package/input/input-types.d.ts +3 -3
- package/input/input.d.ts +1 -1
- package/package.json +76 -114
- package/skeleton/skeleton.d.ts +1 -1
- package/skeleton/skeleton.scss +2 -2
- package/styles/functions.scss +11 -0
- package/styles/grid.scss +51 -36
- package/styles/maps.scss +31 -0
- package/styles/mixins.scss +23 -0
- package/styles/root.scss +3 -3
- package/tag/tag.d.ts +1 -1
- package/tag/tag.scss +2 -2
- package/tooltip/tooltip-component.d.ts +1 -1
- package/tooltip/tooltip-directive.d.ts +1 -1
- package/tooltip/tooltip-trigger.d.ts +1 -1
- package/esm2020/button/button.mjs +0 -187
- package/esm2020/checkbox/checkbox.mjs +0 -154
- package/esm2020/core/overlay/connected-overlay-directive.mjs +0 -98
- package/esm2020/dialog/dialog-container.mjs +0 -58
- package/esm2020/dialog/dialog-content-directives.mjs +0 -98
- package/esm2020/divider/divider.mjs +0 -100
- package/esm2020/form/form-item.mjs +0 -46
- package/esm2020/icon/icon-service.mjs +0 -21
- package/esm2020/icon/icon.mjs +0 -60
- package/esm2020/icon/icons.mjs +0 -464
- package/esm2020/input/input.mjs +0 -240
- package/esm2020/tooltip/tooltip-component.mjs +0 -93
- package/esm2020/tooltip/tooltip-directive.mjs +0 -85
- package/fesm2015/ngwr-button.mjs.map +0 -1
- package/fesm2015/ngwr-checkbox.mjs.map +0 -1
- package/fesm2015/ngwr-core-abstract.mjs.map +0 -1
- package/fesm2015/ngwr-core-color.mjs +0 -26
- package/fesm2015/ngwr-core-decorators.mjs +0 -23
- package/fesm2015/ngwr-dialog.mjs +0 -454
- package/fesm2015/ngwr-dialog.mjs.map +0 -1
- package/fesm2015/ngwr-form.mjs +0 -90
- package/fesm2015/ngwr-form.mjs.map +0 -1
- package/fesm2015/ngwr-icon.mjs +0 -567
- package/fesm2015/ngwr-icon.mjs.map +0 -1
- package/fesm2015/ngwr-input.mjs +0 -263
- package/fesm2015/ngwr-input.mjs.map +0 -1
- package/fesm2015/ngwr-skeleton.mjs.map +0 -1
- package/fesm2015/ngwr-spinner.mjs +0 -44
- package/fesm2015/ngwr-spinner.mjs.map +0 -1
- package/fesm2015/ngwr-tag.mjs.map +0 -1
- package/fesm2015/ngwr-tooltip.mjs +0 -208
- package/fesm2015/ngwr.mjs +0 -8
- package/fesm2020/ngwr-button.mjs +0 -212
- package/fesm2020/ngwr-checkbox.mjs +0 -178
- package/fesm2020/ngwr-checkbox.mjs.map +0 -1
- package/fesm2020/ngwr-core-abstract.mjs +0 -26
- package/fesm2020/ngwr-core-color.mjs.map +0 -1
- package/fesm2020/ngwr-core-decorators.mjs.map +0 -1
- package/fesm2020/ngwr-core-overlay.mjs +0 -147
- package/fesm2020/ngwr-core-overlay.mjs.map +0 -1
- package/fesm2020/ngwr-core-types.mjs +0 -5
- package/fesm2020/ngwr-core-types.mjs.map +0 -1
- package/fesm2020/ngwr-divider.mjs +0 -121
- package/fesm2020/ngwr-divider.mjs.map +0 -1
- package/fesm2020/ngwr-form.mjs.map +0 -1
- package/fesm2020/ngwr-icon.mjs.map +0 -1
- package/fesm2020/ngwr-input.mjs.map +0 -1
- package/fesm2020/ngwr-skeleton.mjs +0 -67
- package/fesm2020/ngwr-spinner.mjs +0 -44
- package/fesm2020/ngwr-spinner.mjs.map +0 -1
- package/fesm2020/ngwr-tag.mjs +0 -105
- package/fesm2020/ngwr-tooltip.mjs.map +0 -1
- package/fesm2020/ngwr.mjs.map +0 -1
- package/styles/vars.scss +0 -2
- /package/{esm2020 → esm2022}/button/index.mjs +0 -0
- /package/{esm2020 → esm2022}/button/ngwr-button.mjs +0 -0
- /package/{esm2020 → esm2022}/checkbox/index.mjs +0 -0
- /package/{esm2020 → esm2022}/checkbox/ngwr-checkbox.mjs +0 -0
- /package/{esm2020 → esm2022}/core/abstract/index.mjs +0 -0
- /package/{esm2020 → esm2022}/core/abstract/ngwr-core-abstract.mjs +0 -0
- /package/{esm2020 → esm2022}/core/color/color.mjs +0 -0
- /package/{esm2020 → esm2022}/core/color/index.mjs +0 -0
- /package/{esm2020 → esm2022}/core/color/is-theme-color.mjs +0 -0
- /package/{esm2020 → esm2022}/core/color/ngwr-core-color.mjs +0 -0
- /package/{esm2020 → esm2022}/core/decorators/index.mjs +0 -0
- /package/{esm2020 → esm2022}/core/decorators/input-boolean.mjs +0 -0
- /package/{esm2020 → esm2022}/core/decorators/ngwr-core-decorators.mjs +0 -0
- /package/{esm2020 → esm2022}/core/overlay/get-placement-name.mjs +0 -0
- /package/{esm2020 → esm2022}/core/overlay/index.mjs +0 -0
- /package/{esm2020 → esm2022}/core/overlay/ngwr-core-overlay.mjs +0 -0
- /package/{esm2020 → esm2022}/core/overlay/position-map.mjs +0 -0
- /package/{esm2020 → esm2022}/core/overlay/position-type.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/index.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/ng-style-interface.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/ngwr-core-types.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/on-change-type.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/on-touched-type.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/property-mapping.mjs +0 -0
- /package/{esm2020 → esm2022}/core/types/safe-any.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/dialog-animations.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/dialog-ref.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/dialog-tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/index.mjs +0 -0
- /package/{esm2020 → esm2022}/dialog/ngwr-dialog.mjs +0 -0
- /package/{esm2020 → esm2022}/divider/index.mjs +0 -0
- /package/{esm2020 → esm2022}/divider/ngwr-divider.mjs +0 -0
- /package/{esm2020 → esm2022}/form/index.mjs +0 -0
- /package/{esm2020 → esm2022}/form/ngwr-form.mjs +0 -0
- /package/{esm2020 → esm2022}/icon/index.mjs +0 -0
- /package/{esm2020 → esm2022}/icon/ngwr-icon.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/input/index.mjs +0 -0
- /package/{esm2020 → esm2022}/input/input-types.mjs +0 -0
- /package/{esm2020 → esm2022}/input/ngwr-input.mjs +0 -0
- /package/{esm2020 → esm2022}/ngwr.mjs +0 -0
- /package/{esm2020 → esm2022}/skeleton/index.mjs +0 -0
- /package/{esm2020 → esm2022}/skeleton/ngwr-skeleton.mjs +0 -0
- /package/{esm2020 → esm2022}/spinner/index.mjs +0 -0
- /package/{esm2020 → esm2022}/spinner/ngwr-spinner.mjs +0 -0
- /package/{esm2020 → esm2022}/tag/index.mjs +0 -0
- /package/{esm2020 → esm2022}/tag/ngwr-tag.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/index.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/ngwr-tooltip.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/tooltip-default-positions.mjs +0 -0
- /package/{esm2020 → esm2022}/tooltip/tooltip-trigger.mjs +0 -0
- /package/{fesm2015 → fesm2022}/ngwr-core-color.mjs.map +0 -0
- /package/{fesm2015 → fesm2022}/ngwr-core-decorators.mjs.map +0 -0
- /package/{fesm2015 → fesm2022}/ngwr-core-types.mjs.map +0 -0
- /package/{fesm2015 → fesm2022}/ngwr.mjs.map +0 -0
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
|
|
5
|
-
import * as i2 from '@angular/forms';
|
|
6
|
-
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
7
|
-
import { WrAbstractBase } from 'ngwr/core/abstract';
|
|
8
|
-
import { InputBoolean } from 'ngwr/core/decorators';
|
|
9
|
-
import * as i1 from '@angular/cdk/a11y';
|
|
10
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
|
-
import { CommonModule } from '@angular/common';
|
|
12
|
-
|
|
13
|
-
class WrCheckbox extends WrAbstractBase {
|
|
14
|
-
constructor(cdr, elRef, focusMonitor, ngZone) {
|
|
15
|
-
super();
|
|
16
|
-
this.cdr = cdr;
|
|
17
|
-
this.elRef = elRef;
|
|
18
|
-
this.focusMonitor = focusMonitor;
|
|
19
|
-
this.ngZone = ngZone;
|
|
20
|
-
this._checked = false;
|
|
21
|
-
this._autofocus = false;
|
|
22
|
-
this._disabled = false;
|
|
23
|
-
this._focused = false;
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
this.onChange = () => { };
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
this.onTouched = () => { };
|
|
28
|
-
/**
|
|
29
|
-
* A disabled checkbox shouldn't apply any actions
|
|
30
|
-
*
|
|
31
|
-
* @param event
|
|
32
|
-
*/
|
|
33
|
-
this.preventEventsWhenDisabled = (event) => {
|
|
34
|
-
if (this.disabled) {
|
|
35
|
-
event.preventDefault();
|
|
36
|
-
event.stopImmediatePropagation();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
get checked() {
|
|
41
|
-
return this._checked;
|
|
42
|
-
}
|
|
43
|
-
set checked(value) {
|
|
44
|
-
const checked = coerceBooleanProperty(value);
|
|
45
|
-
if (checked != this.checked) {
|
|
46
|
-
this._checked = checked;
|
|
47
|
-
this.onChange(checked);
|
|
48
|
-
this.onTouched();
|
|
49
|
-
this.cdr.markForCheck();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
/** Set autofocus for checkbox; */
|
|
53
|
-
get autofocus() {
|
|
54
|
-
return this._autofocus;
|
|
55
|
-
}
|
|
56
|
-
set autofocus(value) {
|
|
57
|
-
this._autofocus = coerceBooleanProperty(value);
|
|
58
|
-
this.cdr.markForCheck();
|
|
59
|
-
}
|
|
60
|
-
/** Set disabled state of `wr-btn`; */
|
|
61
|
-
get disabled() {
|
|
62
|
-
return this._disabled;
|
|
63
|
-
}
|
|
64
|
-
set disabled(value) {
|
|
65
|
-
this._disabled = coerceBooleanProperty(value);
|
|
66
|
-
this.cdr.markForCheck();
|
|
67
|
-
}
|
|
68
|
-
get focused() {
|
|
69
|
-
return this._focused;
|
|
70
|
-
}
|
|
71
|
-
set focused(value) {
|
|
72
|
-
this._focused = coerceBooleanProperty(value);
|
|
73
|
-
this.cdr.markForCheck();
|
|
74
|
-
}
|
|
75
|
-
/** Set element classes */
|
|
76
|
-
get elClasses() {
|
|
77
|
-
return {
|
|
78
|
-
'wr-checkbox': true,
|
|
79
|
-
'wr-checkbox--checked': this.checked,
|
|
80
|
-
'wr-checkbox--focused': this.focused,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
ngOnInit() {
|
|
84
|
-
this.ngZone.runOutsideAngular(() => {
|
|
85
|
-
this.elRef.nativeElement.addEventListener('click', this.preventEventsWhenDisabled);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
ngAfterViewInit() {
|
|
89
|
-
this.focusMonitor.monitor(this.inputElement, true).subscribe(origin => {
|
|
90
|
-
this.ngZone.run(() => (this.focused = origin !== null));
|
|
91
|
-
});
|
|
92
|
-
if (this.autofocus) {
|
|
93
|
-
this.focus();
|
|
94
|
-
this.cdr.markForCheck();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
ngOnDestroy() {
|
|
98
|
-
super.ngOnDestroy();
|
|
99
|
-
this.elRef.nativeElement.removeEventListener('click', this.preventEventsWhenDisabled);
|
|
100
|
-
this.focusMonitor.stopMonitoring(this.inputElement);
|
|
101
|
-
}
|
|
102
|
-
focus(origin = 'program', options) {
|
|
103
|
-
if (origin) {
|
|
104
|
-
this.focusMonitor.focusVia(this.inputElement, origin, options);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
this.inputElement.focus(options);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
writeValue(value) {
|
|
111
|
-
this.checked = value;
|
|
112
|
-
}
|
|
113
|
-
registerOnChange(fn) {
|
|
114
|
-
this.onChange = fn;
|
|
115
|
-
}
|
|
116
|
-
registerOnTouched(fn) {
|
|
117
|
-
this.onTouched = fn;
|
|
118
|
-
}
|
|
119
|
-
setDisabledState(isDisabled) {
|
|
120
|
-
this.disabled = isDisabled;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
WrCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrCheckbox, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
-
WrCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WrCheckbox, selector: "wr-checkbox", inputs: { autofocus: "autofocus", disabled: "disabled" }, host: { properties: { "class": "this.elClasses" } }, providers: [
|
|
125
|
-
{
|
|
126
|
-
provide: NG_VALUE_ACCESSOR,
|
|
127
|
-
useExisting: forwardRef(() => WrCheckbox),
|
|
128
|
-
multi: true,
|
|
129
|
-
},
|
|
130
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }], exportAs: ["wrCheckbox"], usesInheritance: true, ngImport: i0, template: "<label class=\"wr-checkbox__container\">\n <input\n #inputElement\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [ngModel]=\"checked\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n", dependencies: [{ kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
131
|
-
__decorate([
|
|
132
|
-
InputBoolean()
|
|
133
|
-
], WrCheckbox.prototype, "autofocus", null);
|
|
134
|
-
__decorate([
|
|
135
|
-
InputBoolean()
|
|
136
|
-
], WrCheckbox.prototype, "disabled", null);
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrCheckbox, decorators: [{
|
|
138
|
-
type: Component,
|
|
139
|
-
args: [{ selector: 'wr-checkbox', exportAs: 'wrCheckbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
140
|
-
{
|
|
141
|
-
provide: NG_VALUE_ACCESSOR,
|
|
142
|
-
useExisting: forwardRef(() => WrCheckbox),
|
|
143
|
-
multi: true,
|
|
144
|
-
},
|
|
145
|
-
], template: "<label class=\"wr-checkbox__container\">\n <input\n #inputElement\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [ngModel]=\"checked\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n" }]
|
|
146
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { inputElement: [{
|
|
147
|
-
type: ViewChild,
|
|
148
|
-
args: ['inputElement', { static: true }]
|
|
149
|
-
}], autofocus: [{
|
|
150
|
-
type: Input
|
|
151
|
-
}], disabled: [{
|
|
152
|
-
type: Input
|
|
153
|
-
}], elClasses: [{
|
|
154
|
-
type: HostBinding,
|
|
155
|
-
args: ['class']
|
|
156
|
-
}] } });
|
|
157
|
-
|
|
158
|
-
class WrCheckboxModule {
|
|
159
|
-
}
|
|
160
|
-
WrCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
161
|
-
WrCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: WrCheckboxModule, declarations: [WrCheckbox], imports: [CommonModule, FormsModule, A11yModule], exports: [WrCheckbox] });
|
|
162
|
-
WrCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrCheckboxModule, imports: [CommonModule, FormsModule, A11yModule] });
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrCheckboxModule, decorators: [{
|
|
164
|
-
type: NgModule,
|
|
165
|
-
args: [{
|
|
166
|
-
imports: [CommonModule, FormsModule, A11yModule],
|
|
167
|
-
declarations: [WrCheckbox],
|
|
168
|
-
exports: [WrCheckbox],
|
|
169
|
-
}]
|
|
170
|
-
}] });
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Generated bundle index. Do not edit.
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
export { WrCheckbox, WrCheckboxModule };
|
|
177
|
-
//# sourceMappingURL=ngwr-checkbox.mjs.map
|
|
178
|
-
//# sourceMappingURL=ngwr-checkbox.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-checkbox.mjs","sources":["../../../projects/lib/checkbox/checkbox.ts","../../../projects/lib/checkbox/checkbox.html","../../../projects/lib/checkbox/checkbox-module.ts","../../../projects/lib/checkbox/ngwr-checkbox.ts"],"sourcesContent":["import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WrAbstractBase } from 'ngwr/core/abstract';\nimport { InputBoolean } from 'ngwr/core/decorators';\nimport { OnChangeType, OnTouchedType, SafeAny } from 'ngwr/core/types';\n\n@Component({\n selector: 'wr-checkbox',\n exportAs: 'wrCheckbox',\n templateUrl: './checkbox.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WrCheckbox),\n multi: true,\n },\n ],\n})\nexport class WrCheckbox extends WrAbstractBase implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {\n @ViewChild('inputElement', { static: true }) inputElement!: HTMLInputElement;\n\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: BooleanInput) {\n const checked = coerceBooleanProperty(value);\n\n if (checked != this.checked) {\n this._checked = checked;\n this.onChange(checked);\n this.onTouched();\n this.cdr.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /** Set autofocus for checkbox; */\n @Input()\n @InputBoolean()\n get autofocus(): boolean {\n return this._autofocus;\n }\n set autofocus(value: BooleanInput) {\n this._autofocus = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _autofocus: boolean = false;\n\n /** Set disabled state of `wr-btn`; */\n @Input()\n @InputBoolean()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _disabled: boolean = false;\n\n get focused(): boolean {\n return this._focused;\n }\n set focused(value: BooleanInput) {\n this._focused = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _focused: boolean = false;\n\n // @ts-ignore\n private onChange: OnChangeType = () => {};\n // @ts-ignore\n private onTouched: OnTouchedType = () => {};\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-checkbox': true,\n 'wr-checkbox--checked': this.checked,\n 'wr-checkbox--focused': this.focused,\n };\n }\n\n constructor(\n private readonly cdr: ChangeDetectorRef,\n private readonly elRef: ElementRef<HTMLElement>,\n private readonly focusMonitor: FocusMonitor,\n private readonly ngZone: NgZone\n ) {\n super();\n }\n\n ngOnInit(): void {\n this.ngZone.runOutsideAngular(() => {\n this.elRef.nativeElement.addEventListener('click', this.preventEventsWhenDisabled);\n });\n }\n\n ngAfterViewInit(): void {\n this.focusMonitor.monitor(this.inputElement, true).subscribe(origin => {\n this.ngZone.run(() => (this.focused = origin !== null));\n });\n\n if (this.autofocus) {\n this.focus();\n this.cdr.markForCheck();\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.elRef.nativeElement.removeEventListener('click', this.preventEventsWhenDisabled);\n this.focusMonitor.stopMonitoring(this.inputElement);\n }\n\n focus(origin: FocusOrigin = 'program', options?: FocusOptions): void {\n if (origin) {\n this.focusMonitor.focusVia(this.inputElement, origin, options);\n } else {\n this.inputElement.focus(options);\n }\n }\n\n writeValue(value: BooleanInput): void {\n this.checked = value;\n }\n\n registerOnChange(fn: OnChangeType): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: OnTouchedType): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /**\n * A disabled checkbox shouldn't apply any actions\n *\n * @param event\n */\n private preventEventsWhenDisabled = (event: Event): void => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n}\n","<label class=\"wr-checkbox__container\">\n <input\n #inputElement\n class=\"wr-checkbox__input\"\n type=\"checkbox\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [ngModel]=\"checked\"\n (ngModelChange)=\"writeValue($event)\"\n />\n <div class=\"wr-checkbox-inner\">\n <div class=\"wr-checkbox-inner__mark\"></div>\n </div>\n <ng-content></ng-content>\n</label>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { WrCheckbox } from './checkbox';\n\n@NgModule({\n imports: [CommonModule, FormsModule, A11yModule],\n declarations: [WrCheckbox],\n exports: [WrCheckbox],\n})\nexport class WrCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAqCM,MAAO,UAAW,SAAQ,cAAc,CAAA;AAkE5C,IAAA,WAAA,CACmB,GAAsB,EACtB,KAA8B,EAC9B,YAA0B,EAC1B,MAAc,EAAA;AAE/B,QAAA,KAAK,EAAE,CAAC;QALS,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QACtB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAyB;QAC9B,IAAY,CAAA,YAAA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AE,UAAU,CAAA,EAAA,OAAA,EAAA,CAErC,UAAU,CAAA,EAAA,CAAA,CAAA;AAET,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAJjB,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAIpC,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,UAAU,CAAC;oBAChD,YAAY,EAAE,CAAC,UAAU,CAAC;oBAC1B,OAAO,EAAE,CAAC,UAAU,CAAC;AACtB,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
class WrAbstractBase {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.destroyed$ = new Subject();
|
|
8
|
-
}
|
|
9
|
-
ngOnDestroy() {
|
|
10
|
-
this.destroyed$.next();
|
|
11
|
-
this.destroyed$.complete();
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
WrAbstractBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrAbstractBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
-
WrAbstractBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: WrAbstractBase, ngImport: i0 });
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrAbstractBase, decorators: [{
|
|
17
|
-
type: Directive
|
|
18
|
-
}] });
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Generated bundle index. Do not edit.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
export { WrAbstractBase };
|
|
25
|
-
//# sourceMappingURL=ngwr-core-abstract.mjs.map
|
|
26
|
-
//# sourceMappingURL=ngwr-core-abstract.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-core-color.mjs","sources":["../../../projects/lib/core/color/color.ts","../../../projects/lib/core/color/is-theme-color.ts","../../../projects/lib/core/color/ngwr-core-color.ts"],"sourcesContent":["export const wrThemeColors = [\n 'primary',\n 'secondary',\n 'success',\n 'warning',\n 'danger',\n 'light',\n 'medium',\n 'dark',\n] as const;\n\nexport type WrThemeColor = typeof wrThemeColors[number];\n","import { SafeAny } from 'ngwr/core/types';\n\nimport { wrThemeColors, WrThemeColor } from './color';\n\nexport function isThemeColor(color: string): color is WrThemeColor {\n const is: boolean = wrThemeColors.indexOf(color as SafeAny) !== -1;\n\n if (!is) {\n console.warn(`${color} is not NGWR theme color`);\n }\n\n return is;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAa,MAAA,aAAa,GAAG;IAC3B,SAAS;IACT,WAAW;IACX,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;;;ACJF,SAAU,YAAY,CAAC,KAAa,EAAA;IACxC,MAAM,EAAE,GAAY,aAAa,CAAC,OAAO,CAAC,KAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnE,IAAI,CAAC,EAAE,EAAE;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA,wBAAA,CAA0B,CAAC,CAAC;AAClD,KAAA;AAED,IAAA,OAAO,EAAE,CAAC;AACZ;;ACZA;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-core-decorators.mjs","sources":["../../../projects/lib/core/decorators/input-boolean.ts","../../../projects/lib/core/decorators/ngwr-core-decorators.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\n\nimport { SafeAny } from 'ngwr/core/types';\n\nexport function InputBoolean(): PropertyDecorator {\n return (target: SafeAny, propertyKey: string | symbol): void => {\n const coercedBooleanKey = `$$__wr__${String(propertyKey)}`;\n\n Object.defineProperty(target, propertyKey, {\n get: function (): boolean {\n return this[coercedBooleanKey] || false;\n },\n set: function (value: boolean | unknown): void {\n this[coercedBooleanKey] = coerceBooleanProperty(value);\n },\n });\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAIgB,YAAY,GAAA;AAC1B,IAAA,OAAO,CAAC,MAAe,EAAE,WAA4B,KAAU;QAC7D,MAAM,iBAAiB,GAAG,CAAW,QAAA,EAAA,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;AAE3D,QAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;AACzC,YAAA,GAAG,EAAE,YAAA;AACH,gBAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC;aACzC;YACD,GAAG,EAAE,UAAU,KAAwB,EAAA;gBACrC,IAAI,CAAC,iBAAiB,CAAC,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;aACxD;AACF,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;AACJ;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
-
import * as i1 from '@angular/cdk/overlay';
|
|
4
|
-
import { ConnectionPositionPair, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
5
|
-
import * as i0 from '@angular/core';
|
|
6
|
-
import { ElementRef, Directive, Input, NgModule } from '@angular/core';
|
|
7
|
-
import { takeUntil } from 'rxjs';
|
|
8
|
-
import { WrAbstractBase } from 'ngwr/core/abstract';
|
|
9
|
-
import { InputBoolean } from 'ngwr/core/decorators';
|
|
10
|
-
|
|
11
|
-
const WR_POSITION_MAP = {
|
|
12
|
-
top: new ConnectionPositionPair({ originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }),
|
|
13
|
-
topCenter: new ConnectionPositionPair({ originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }),
|
|
14
|
-
topLeft: new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
|
|
15
|
-
topRight: new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }),
|
|
16
|
-
right: new ConnectionPositionPair({ originX: 'end', originY: 'center' }, { overlayX: 'start', overlayY: 'center' }),
|
|
17
|
-
rightTop: new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'start', overlayY: 'top' }),
|
|
18
|
-
rightBottom: new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'start', overlayY: 'bottom' }),
|
|
19
|
-
bottom: new ConnectionPositionPair({ originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }),
|
|
20
|
-
bottomCenter: new ConnectionPositionPair({ originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }),
|
|
21
|
-
bottomLeft: new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
|
|
22
|
-
bottomRight: new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }),
|
|
23
|
-
left: new ConnectionPositionPair({ originX: 'start', originY: 'center' }, { overlayX: 'end', overlayY: 'center' }),
|
|
24
|
-
leftTop: new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'top' }),
|
|
25
|
-
leftBottom: new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'end', overlayY: 'bottom' }),
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
function getPlacementName(position) {
|
|
29
|
-
for (const placement in WR_POSITION_MAP) {
|
|
30
|
-
if (position.connectionPair.originX === WR_POSITION_MAP[placement].originX &&
|
|
31
|
-
position.connectionPair.originY === WR_POSITION_MAP[placement].originY &&
|
|
32
|
-
position.connectionPair.overlayX === WR_POSITION_MAP[placement].overlayX &&
|
|
33
|
-
position.connectionPair.overlayY === WR_POSITION_MAP[placement].overlayY) {
|
|
34
|
-
return placement;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
class WrConnectedOverlayDirective extends WrAbstractBase {
|
|
41
|
-
constructor(cdkConnectedOverlay) {
|
|
42
|
-
super();
|
|
43
|
-
this.cdkConnectedOverlay = cdkConnectedOverlay;
|
|
44
|
-
this._arrowPointAtCenter = false;
|
|
45
|
-
this.cdkConnectedOverlay.backdropClass = 'wr-overlay__backdrop--transparent';
|
|
46
|
-
this.cdkConnectedOverlay.positionChange
|
|
47
|
-
.pipe(takeUntil(this.destroyed$))
|
|
48
|
-
.subscribe((position) => {
|
|
49
|
-
if (this.wrArrowPointAtCenter) {
|
|
50
|
-
this.updateArrowPosition(position);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
get wrArrowPointAtCenter() {
|
|
55
|
-
return this._arrowPointAtCenter;
|
|
56
|
-
}
|
|
57
|
-
set wrArrowPointAtCenter(value) {
|
|
58
|
-
this._arrowPointAtCenter = coerceBooleanProperty(value);
|
|
59
|
-
}
|
|
60
|
-
updateArrowPosition(position) {
|
|
61
|
-
const originRect = this.getOriginRect();
|
|
62
|
-
const placement = getPlacementName(position);
|
|
63
|
-
let offsetX = 0;
|
|
64
|
-
let offsetY = 0;
|
|
65
|
-
if (placement === 'topLeft' || placement === 'bottomLeft') {
|
|
66
|
-
offsetX = originRect.width / 2 - 14;
|
|
67
|
-
}
|
|
68
|
-
else if (placement === 'topRight' || placement === 'bottomRight') {
|
|
69
|
-
offsetX = -(originRect.width / 2 - 14);
|
|
70
|
-
}
|
|
71
|
-
else if (placement === 'leftTop' || placement === 'rightTop') {
|
|
72
|
-
offsetY = originRect.height / 2 - 10;
|
|
73
|
-
}
|
|
74
|
-
else if (placement === 'leftBottom' || placement === 'rightBottom') {
|
|
75
|
-
offsetY = -(originRect.height / 2 - 10);
|
|
76
|
-
}
|
|
77
|
-
if (this.cdkConnectedOverlay.offsetX !== offsetX || this.cdkConnectedOverlay.offsetY !== offsetY) {
|
|
78
|
-
this.cdkConnectedOverlay.offsetY = offsetY;
|
|
79
|
-
this.cdkConnectedOverlay.offsetX = offsetX;
|
|
80
|
-
this.cdkConnectedOverlay.overlayRef.updatePosition();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
getFlexibleConnectedPositionStrategyOrigin() {
|
|
84
|
-
if (this.cdkConnectedOverlay.origin instanceof CdkOverlayOrigin) {
|
|
85
|
-
return this.cdkConnectedOverlay.origin.elementRef;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
return this.cdkConnectedOverlay.origin;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
getOriginRect() {
|
|
92
|
-
const origin = this.getFlexibleConnectedPositionStrategyOrigin();
|
|
93
|
-
if (origin instanceof ElementRef) {
|
|
94
|
-
return origin.nativeElement.getBoundingClientRect();
|
|
95
|
-
}
|
|
96
|
-
// Check for Element so SVG elements are also supported.
|
|
97
|
-
if (origin instanceof Element) {
|
|
98
|
-
return origin.getBoundingClientRect();
|
|
99
|
-
}
|
|
100
|
-
const width = origin.width || 0;
|
|
101
|
-
const height = origin.height || 0;
|
|
102
|
-
// If the origin is a point, return a dom rect as if it was a 0x0 element at the point.
|
|
103
|
-
return {
|
|
104
|
-
top: origin.y,
|
|
105
|
-
bottom: origin.y + height,
|
|
106
|
-
left: origin.x,
|
|
107
|
-
right: origin.x + width,
|
|
108
|
-
height,
|
|
109
|
-
width,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
WrConnectedOverlayDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrConnectedOverlayDirective, deps: [{ token: i1.CdkConnectedOverlay }], target: i0.ɵɵFactoryTarget.Directive });
|
|
114
|
-
WrConnectedOverlayDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: WrConnectedOverlayDirective, selector: "[cdkConnectedOverlay][wrConnectedOverlay]", inputs: { wrArrowPointAtCenter: "wrArrowPointAtCenter" }, exportAs: ["wrConnectedOverlay"], usesInheritance: true, ngImport: i0 });
|
|
115
|
-
__decorate([
|
|
116
|
-
InputBoolean()
|
|
117
|
-
], WrConnectedOverlayDirective.prototype, "wrArrowPointAtCenter", null);
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrConnectedOverlayDirective, decorators: [{
|
|
119
|
-
type: Directive,
|
|
120
|
-
args: [{
|
|
121
|
-
selector: '[cdkConnectedOverlay][wrConnectedOverlay]',
|
|
122
|
-
exportAs: 'wrConnectedOverlay',
|
|
123
|
-
}]
|
|
124
|
-
}], ctorParameters: function () { return [{ type: i1.CdkConnectedOverlay }]; }, propDecorators: { wrArrowPointAtCenter: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}] } });
|
|
127
|
-
|
|
128
|
-
class WrOverlayModule {
|
|
129
|
-
}
|
|
130
|
-
WrOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
131
|
-
WrOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: WrOverlayModule, declarations: [WrConnectedOverlayDirective], exports: [WrConnectedOverlayDirective] });
|
|
132
|
-
WrOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrOverlayModule });
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrOverlayModule, decorators: [{
|
|
134
|
-
type: NgModule,
|
|
135
|
-
args: [{
|
|
136
|
-
declarations: [WrConnectedOverlayDirective],
|
|
137
|
-
exports: [WrConnectedOverlayDirective],
|
|
138
|
-
}]
|
|
139
|
-
}] });
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Generated bundle index. Do not edit.
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
export { WR_POSITION_MAP, WrConnectedOverlayDirective, WrOverlayModule, getPlacementName };
|
|
146
|
-
//# sourceMappingURL=ngwr-core-overlay.mjs.map
|
|
147
|
-
//# sourceMappingURL=ngwr-core-overlay.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-core-overlay.mjs","sources":["../../../projects/lib/core/overlay/position-map.ts","../../../projects/lib/core/overlay/get-placement-name.ts","../../../projects/lib/core/overlay/connected-overlay-directive.ts","../../../projects/lib/core/overlay/overlay-module.ts","../../../projects/lib/core/overlay/ngwr-core-overlay.ts"],"sourcesContent":["import { ConnectionPositionPair } from '@angular/cdk/overlay';\n\nexport const WR_POSITION_MAP = {\n top: new ConnectionPositionPair({ originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }),\n topCenter: new ConnectionPositionPair(\n { originX: 'center', originY: 'top' },\n { overlayX: 'center', overlayY: 'bottom' }\n ),\n topLeft: new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),\n topRight: new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }),\n right: new ConnectionPositionPair({ originX: 'end', originY: 'center' }, { overlayX: 'start', overlayY: 'center' }),\n rightTop: new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'start', overlayY: 'top' }),\n rightBottom: new ConnectionPositionPair(\n { originX: 'end', originY: 'bottom' },\n { overlayX: 'start', overlayY: 'bottom' }\n ),\n bottom: new ConnectionPositionPair({ originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }),\n bottomCenter: new ConnectionPositionPair(\n { originX: 'center', originY: 'bottom' },\n { overlayX: 'center', overlayY: 'top' }\n ),\n bottomLeft: new ConnectionPositionPair(\n { originX: 'start', originY: 'bottom' },\n { overlayX: 'start', overlayY: 'top' }\n ),\n bottomRight: new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }),\n left: new ConnectionPositionPair({ originX: 'start', originY: 'center' }, { overlayX: 'end', overlayY: 'center' }),\n leftTop: new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'top' }),\n leftBottom: new ConnectionPositionPair(\n { originX: 'start', originY: 'bottom' },\n { overlayX: 'end', overlayY: 'bottom' }\n ),\n};\n","import { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\n\nimport { WR_POSITION_MAP } from './position-map';\nimport { WR_POSITION_TYPE } from './position-type';\n\nexport function getPlacementName(position: ConnectedOverlayPositionChange): string | undefined {\n for (const placement in WR_POSITION_MAP) {\n if (\n position.connectionPair.originX === WR_POSITION_MAP[placement as WR_POSITION_TYPE].originX &&\n position.connectionPair.originY === WR_POSITION_MAP[placement as WR_POSITION_TYPE].originY &&\n position.connectionPair.overlayX === WR_POSITION_MAP[placement as WR_POSITION_TYPE].overlayX &&\n position.connectionPair.overlayY === WR_POSITION_MAP[placement as WR_POSITION_TYPE].overlayY\n ) {\n return placement;\n }\n }\n return undefined;\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n CdkConnectedOverlay,\n CdkOverlayOrigin,\n ConnectedOverlayPositionChange,\n FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { Directive, ElementRef, Input } from '@angular/core';\nimport { takeUntil } from 'rxjs';\n\nimport { WrAbstractBase } from 'ngwr/core/abstract';\nimport { InputBoolean } from 'ngwr/core/decorators';\n\nimport { getPlacementName } from './get-placement-name';\n\ntype Dimensions = Omit<DOMRect, 'x' | 'y' | 'toJSON'>;\n\n@Directive({\n selector: '[cdkConnectedOverlay][wrConnectedOverlay]',\n exportAs: 'wrConnectedOverlay',\n})\nexport class WrConnectedOverlayDirective extends WrAbstractBase {\n @Input()\n @InputBoolean()\n get wrArrowPointAtCenter(): boolean {\n return this._arrowPointAtCenter;\n }\n set wrArrowPointAtCenter(value: BooleanInput) {\n this._arrowPointAtCenter = coerceBooleanProperty(value);\n }\n private _arrowPointAtCenter: boolean = false;\n\n constructor(private readonly cdkConnectedOverlay: CdkConnectedOverlay) {\n super();\n\n this.cdkConnectedOverlay.backdropClass = 'wr-overlay__backdrop--transparent';\n\n this.cdkConnectedOverlay.positionChange\n .pipe(takeUntil(this.destroyed$))\n .subscribe((position: ConnectedOverlayPositionChange) => {\n if (this.wrArrowPointAtCenter) {\n this.updateArrowPosition(position);\n }\n });\n }\n\n private updateArrowPosition(position: ConnectedOverlayPositionChange): void {\n const originRect = this.getOriginRect();\n const placement = getPlacementName(position);\n\n let offsetX: number | undefined = 0;\n let offsetY: number | undefined = 0;\n\n if (placement === 'topLeft' || placement === 'bottomLeft') {\n offsetX = originRect.width / 2 - 14;\n } else if (placement === 'topRight' || placement === 'bottomRight') {\n offsetX = -(originRect.width / 2 - 14);\n } else if (placement === 'leftTop' || placement === 'rightTop') {\n offsetY = originRect.height / 2 - 10;\n } else if (placement === 'leftBottom' || placement === 'rightBottom') {\n offsetY = -(originRect.height / 2 - 10);\n }\n\n if (this.cdkConnectedOverlay.offsetX !== offsetX || this.cdkConnectedOverlay.offsetY !== offsetY) {\n this.cdkConnectedOverlay.offsetY = offsetY;\n this.cdkConnectedOverlay.offsetX = offsetX;\n this.cdkConnectedOverlay.overlayRef.updatePosition();\n }\n }\n\n private getFlexibleConnectedPositionStrategyOrigin(): FlexibleConnectedPositionStrategyOrigin {\n if (this.cdkConnectedOverlay.origin instanceof CdkOverlayOrigin) {\n return this.cdkConnectedOverlay.origin.elementRef;\n } else {\n return this.cdkConnectedOverlay.origin;\n }\n }\n\n private getOriginRect(): Dimensions {\n const origin = this.getFlexibleConnectedPositionStrategyOrigin();\n\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n\n const width = origin.width || 0;\n const height = origin.height || 0;\n\n // If the origin is a point, return a dom rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width,\n };\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrConnectedOverlayDirective } from './connected-overlay-directive';\n\n@NgModule({\n declarations: [WrConnectedOverlayDirective],\n exports: [WrConnectedOverlayDirective],\n})\nexport class WrOverlayModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAEa,MAAA,eAAe,GAAG;IAC7B,GAAG,EAAE,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAClH,SAAS,EAAE,IAAI,sBAAsB,CACnC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,EACrC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAC3C;IACD,OAAO,EAAE,IAAI,sBAAsB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,O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A,CAAA;6GAE1B,eAAe,EAAA,CAAA,CAAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,2BAA2B,CAAC;oBAC3C,OAAO,EAAE,CAAC,2BAA2B,CAAC;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-core-types.mjs","sources":["../../../projects/lib/core/types/ngwr-core-types.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;AAEG"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
|
|
3
|
-
import { isThemeColor } from 'ngwr/core/color';
|
|
4
|
-
|
|
5
|
-
class WrDivider {
|
|
6
|
-
constructor(cdr) {
|
|
7
|
-
this.cdr = cdr;
|
|
8
|
-
this._color = 'light';
|
|
9
|
-
this._type = 'solid';
|
|
10
|
-
this._width = '1px';
|
|
11
|
-
/** Set element role **/
|
|
12
|
-
this.role = 'separator';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Set color of `wr-divider`
|
|
16
|
-
*
|
|
17
|
-
* @default 'light';
|
|
18
|
-
*/
|
|
19
|
-
get color() {
|
|
20
|
-
return this._color;
|
|
21
|
-
}
|
|
22
|
-
set color(value) {
|
|
23
|
-
this._color = isThemeColor(value) ? value : 'primary';
|
|
24
|
-
this.cdr.markForCheck();
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Set style of `wr-divider`
|
|
28
|
-
*
|
|
29
|
-
* @default `solid`;
|
|
30
|
-
*/
|
|
31
|
-
get type() {
|
|
32
|
-
return this._type;
|
|
33
|
-
}
|
|
34
|
-
set type(value) {
|
|
35
|
-
this._type = value;
|
|
36
|
-
this.cdr.markForCheck();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Set width of `wr-divider`
|
|
40
|
-
*
|
|
41
|
-
* @default 1px;
|
|
42
|
-
*/
|
|
43
|
-
get width() {
|
|
44
|
-
return this._width;
|
|
45
|
-
}
|
|
46
|
-
set width(value) {
|
|
47
|
-
this._width = value;
|
|
48
|
-
this.cdr.markForCheck();
|
|
49
|
-
}
|
|
50
|
-
/** Set element classes */
|
|
51
|
-
get elClasses() {
|
|
52
|
-
return {
|
|
53
|
-
'wr-divider': true,
|
|
54
|
-
'wr-divider--primary': this.color === 'primary',
|
|
55
|
-
'wr-divider--secondary': this.color === 'secondary',
|
|
56
|
-
'wr-divider--success': this.color === 'success',
|
|
57
|
-
'wr-divider--warning': this.color === 'warning',
|
|
58
|
-
'wr-divider--danger': this.color === 'danger',
|
|
59
|
-
'wr-divider--light': this.color === 'light',
|
|
60
|
-
'wr-divider--medium': this.color === 'medium',
|
|
61
|
-
'wr-divider--dark': this.color === 'dark',
|
|
62
|
-
'wr-divider--solid': this.type === 'solid',
|
|
63
|
-
'wr-divider--dashed': this.type === 'dashed',
|
|
64
|
-
'wr-divider--dotted': this.type === 'dotted',
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/** Set element style **/
|
|
68
|
-
get elStyles() {
|
|
69
|
-
return {
|
|
70
|
-
'--wr-divider-width': this.width,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
WrDivider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrDivider, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
-
WrDivider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: WrDivider, selector: "wr-divider", inputs: { color: "color", type: "type", width: "width" }, host: { properties: { "class": "this.elClasses", "style": "this.elStyles", "role": "this.role" } }, exportAs: ["wrDivider"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrDivider, decorators: [{
|
|
77
|
-
type: Component,
|
|
78
|
-
args: [{
|
|
79
|
-
selector: 'wr-divider',
|
|
80
|
-
exportAs: 'wrDivider',
|
|
81
|
-
template: '',
|
|
82
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
83
|
-
encapsulation: ViewEncapsulation.None,
|
|
84
|
-
}]
|
|
85
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
|
|
86
|
-
type: Input
|
|
87
|
-
}], type: [{
|
|
88
|
-
type: Input
|
|
89
|
-
}], width: [{
|
|
90
|
-
type: Input
|
|
91
|
-
}], elClasses: [{
|
|
92
|
-
type: HostBinding,
|
|
93
|
-
args: ['class']
|
|
94
|
-
}], elStyles: [{
|
|
95
|
-
type: HostBinding,
|
|
96
|
-
args: ['style']
|
|
97
|
-
}], role: [{
|
|
98
|
-
type: HostBinding,
|
|
99
|
-
args: ['role']
|
|
100
|
-
}] } });
|
|
101
|
-
|
|
102
|
-
class WrDividerModule {
|
|
103
|
-
}
|
|
104
|
-
WrDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
105
|
-
WrDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: WrDividerModule, declarations: [WrDivider], exports: [WrDivider] });
|
|
106
|
-
WrDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrDividerModule });
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: WrDividerModule, decorators: [{
|
|
108
|
-
type: NgModule,
|
|
109
|
-
args: [{
|
|
110
|
-
declarations: [WrDivider],
|
|
111
|
-
exports: [WrDivider],
|
|
112
|
-
}]
|
|
113
|
-
}] });
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Generated bundle index. Do not edit.
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
|
-
export { WrDivider, WrDividerModule };
|
|
120
|
-
//# sourceMappingURL=ngwr-divider.mjs.map
|
|
121
|
-
//# sourceMappingURL=ngwr-divider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-divider.mjs","sources":["../../../projects/lib/divider/divider.ts","../../../projects/lib/divider/divider-module.ts","../../../projects/lib/divider/ngwr-divider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { isThemeColor, WrThemeColor } from 'ngwr/core/color';\nimport { SafeAny } from 'ngwr/core/types';\n\n@Component({\n selector: 'wr-divider',\n exportAs: 'wrDivider',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrDivider {\n /**\n * Set color of `wr-divider`\n *\n * @default 'light';\n */\n @Input()\n get color(): WrThemeColor {\n return this._color;\n }\n set color(value: WrThemeColor) {\n this._color = isThemeColor(value) ? value : 'primary';\n this.cdr.markForCheck();\n }\n private _color: WrThemeColor = 'light';\n /**\n * Set style of `wr-divider`\n *\n * @default `solid`;\n */\n @Input()\n get type(): 'solid' | 'dashed' | 'dotted' {\n return this._type;\n }\n set type(value: 'solid' | 'dashed' | 'dotted') {\n this._type = value;\n this.cdr.markForCheck();\n }\n private _type: 'solid' | 'dashed' | 'dotted' = 'solid';\n /**\n * Set width of `wr-divider`\n *\n * @default 1px;\n */\n @Input()\n get width(): string {\n return this._width;\n }\n set width(value: string) {\n this._width = value;\n this.cdr.markForCheck();\n }\n private _width: string = '1px';\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-divider': true,\n 'wr-divider--primary': this.color === 'primary',\n 'wr-divider--secondary': this.color === 'secondary',\n 'wr-divider--success': this.color === 'success',\n 'wr-divider--warning': this.color === 'warning',\n 'wr-divider--danger': this.color === 'danger',\n 'wr-divider--light': this.color === 'light',\n 'wr-divider--medium': this.color === 'medium',\n 'wr-divider--dark': this.color === 'dark',\n 'wr-divider--solid': this.type === 'solid',\n 'wr-divider--dashed': this.type === 'dashed',\n 'wr-divider--dotted': this.type === 'dotted',\n };\n }\n\n /** Set element style **/\n @HostBinding('style')\n get elStyles(): SafeAny {\n return {\n '--wr-divider-width': this.width,\n };\n }\n\n /** Set element role **/\n @HostBinding('role') role = 'separator';\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n}\n","import { NgModule } from '@angular/core';\n\nimport { WrDivider } from './divider';\n\n@NgModule({\n declarations: [WrDivider],\n exports: [WrDivider],\n})\nexport class WrDividerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAmBa,SAAS,CAAA;AA0EpB,IAAA,WAAA,CAA6B,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QA5D3C,IAAM,CAAA,MAAA,GAAiB,OAAO,CAAC;QAc/B,IAAK,CAAA,KAAA,GAAkC,OAAO,CAAC;QAc/C,IAAM,CAAA,MAAA,GAAW,KAAK,CAAC;;QA8BV,IAAI,CAAA,IAAA,GAAG,WAAW,CAAC;KAEe;AAzEvD;;;;AAIG;AACH,IAAA,IACI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IACD,IAAI,KAAK,CAAC,KAAmB,EAAA;AAC3B,QAAA,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,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AA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAHX,SAAS,CAAA,EAAA,OAAA,EAAA,CACd,SAAS,CAAA,EAAA,CAAA,CAAA;6GAER,eAAe,EAAA,CAAA,CAAA;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,SAAS,CAAC;oBACzB,OAAO,EAAE,CAAC,SAAS,CAAC;AACrB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-form.mjs","sources":["../../../projects/lib/form/form-item.ts","../../../projects/lib/form/form-error.ts","../../../projects/lib/form/form-module.ts","../../../projects/lib/form/ngwr-form.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { InputBoolean } from 'ngwr/core/decorators';\nimport { SafeAny } from 'ngwr/core/types';\n\n@Component({\n selector: 'wr-form-item',\n exportAs: 'wrFormItem',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrFormItem {\n @Input()\n @InputBoolean()\n get hasError(): boolean {\n return this._hasError;\n }\n set hasError(value: BooleanInput) {\n this._hasError = coerceBooleanProperty(value);\n this.cdr.markForCheck();\n }\n private _hasError: boolean = false;\n\n /** Set element classes */\n @HostBinding('class')\n get elClasses(): SafeAny {\n return {\n 'wr-form-item': true,\n 'wr-form-item--has-error': this.hasError,\n };\n }\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'wr-form-error',\n exportAs: 'wrFormError',\n template: `<ng-content></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class WrFormError {\n @HostBinding('class') class = 'wr-form-error';\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { WrFormError } from './form-error';\nimport { WrFormItem } from './form-item';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [WrFormItem, WrFormError],\n exports: [WrFormItem, WrFormError],\n})\nexport class WrFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoBa,UAAU,CAAA;AAqBrB,IAAA,WAAA,CAA6B,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAX3C,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;KAWoB;AAlBvD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAI,QAAQ,CAAC,KAAmB,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAC9C,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACzB;;AAID,IAAA,IACI,SAAS,GAAA;QACX,OAAO;AACL,YAAA,cAAc,EAAE,IAAI;YACpB,yBAAyB,EAAE,IAAI,CAAC,QAAQ;SACzC,CAAC;KACH;;uGAnBU,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,qKAJX,CAA2B,yBAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA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