mis-crystal-design-system 18.0.24 → 18.1.0-signal-test
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/action-list/action-list.component.d.ts +17 -15
- package/async-search-dropdown/async-dropdown.component.d.ts +43 -61
- package/button/button.component.d.ts +35 -13
- package/button/button.directive.d.ts +10 -8
- package/checkbox/checkbox.component.d.ts +15 -12
- package/chip/chip.component.d.ts +9 -11
- package/datepicker_v2/models/dp-config.model.d.ts +1 -0
- package/datepicker_v2/tz-datepicker.directive.d.ts +15 -18
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +42 -21
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +12 -14
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +46 -23
- package/drawer/drawer-body/drawer-body.component.d.ts +2 -2
- package/dropdown/calculate-container-height.directive.d.ts +7 -8
- package/dropdown/dropdown.component.d.ts +41 -49
- package/dynamic-form/dynamic-form.component.d.ts +20 -16
- package/esm2022/action-list/action-list.component.mjs +112 -89
- package/esm2022/async-search-dropdown/async-dropdown.component.mjs +256 -326
- package/esm2022/button/button.component.mjs +55 -48
- package/esm2022/button/button.directive.mjs +36 -40
- package/esm2022/checkbox/checkbox.component.mjs +75 -70
- package/esm2022/chip/chip.component.mjs +20 -33
- package/esm2022/datepicker_v2/models/dp-config.model.mjs +1 -1
- package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +42 -71
- package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +202 -172
- package/esm2022/datepicker_v2/utils/index.mjs +2 -1
- package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +26 -51
- package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +282 -235
- package/esm2022/drawer/drawer-body/drawer-body.component.mjs +8 -7
- package/esm2022/dropdown/calculate-container-height.directive.mjs +25 -22
- package/esm2022/dropdown/dropdown.component.mjs +162 -186
- package/esm2022/dynamic-form/dynamic-form.component.mjs +118 -72
- package/esm2022/fab/fab.component.mjs +29 -33
- package/esm2022/filter/filter-panel/filter-panel.component.mjs +60 -58
- package/esm2022/input/directives/input/input.directive.mjs +22 -26
- package/esm2022/input/mis-input.component.mjs +41 -45
- package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +40 -50
- package/esm2022/loader/loader.component.mjs +8 -11
- package/esm2022/mobile-filter/mobile-filter.component.mjs +61 -61
- package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +11 -9
- package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +235 -281
- package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +250 -287
- package/esm2022/phone-input/phone-input.component.mjs +21 -43
- package/esm2022/radio-button/radio-button.component.mjs +15 -27
- package/esm2022/ske-loader/ske-loader.component.mjs +15 -29
- package/esm2022/slider/slider.component.mjs +23 -33
- package/esm2022/slider/slider.module.mjs +4 -11
- package/esm2022/snackbar/snackbar/snackbar.component.mjs +21 -15
- package/esm2022/snackbar/snackbar.service.mjs +3 -2
- package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +230 -343
- package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +77 -105
- package/esm2022/star-rating/star-rating.component.mjs +57 -71
- package/esm2022/switch/switch.component.mjs +34 -36
- package/esm2022/table/actions-cell/actions-cell.component.mjs +55 -54
- package/esm2022/table/custom-table-cell.directive.mjs +22 -18
- package/esm2022/table/filter/filter.component.mjs +60 -42
- package/esm2022/table/sort-icons.directive.mjs +16 -8
- package/esm2022/table/sub-table/sub-table.component.mjs +41 -44
- package/esm2022/table/table.component.mjs +181 -165
- package/esm2022/timepicker/timepicker.component.mjs +244 -159
- package/esm2022/timepicker/timepicker.directive.mjs +3 -2
- package/esm2022/timerangepicker/timerangepicker.component.mjs +200 -159
- package/esm2022/toast/toast.component.mjs +6 -7
- package/esm2022/toast/toast.data.service.mjs +15 -9
- package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +12 -12
- package/esm2022/tooltip/tooltip.directive.mjs +4 -4
- package/esm2022/virtual-scroll/virtual-scroll.component.mjs +57 -59
- package/fab/fab.component.d.ts +12 -8
- package/fesm2022/mis-crystal-design-system-action-list.mjs +111 -88
- package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +253 -324
- package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-button.mjs +88 -85
- package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-checkbox.mjs +74 -69
- package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-chip.mjs +19 -32
- package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +242 -240
- package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +305 -283
- package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-drawer.mjs +7 -6
- package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dropdown.mjs +183 -204
- package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +118 -72
- package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-fab.mjs +28 -32
- package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-filter.mjs +59 -57
- package/fesm2022/mis-crystal-design-system-filter.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs +39 -49
- package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-input.mjs +62 -71
- package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-loader.mjs +7 -10
- package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +60 -60
- package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-modal.mjs +10 -8
- package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +233 -279
- package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +249 -286
- package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-phone-input.mjs +20 -42
- package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-radio-button.mjs +14 -26
- package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs +14 -28
- package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-slider.mjs +25 -42
- package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-snackbar.mjs +22 -15
- package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +304 -445
- package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-star-rating.mjs +56 -70
- package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-switch.mjs +33 -35
- package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-table.mjs +365 -321
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timepicker.mjs +245 -159
- package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +199 -158
- package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-toast.mjs +18 -13
- package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-tooltip.mjs +14 -14
- package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -1
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +57 -59
- package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -1
- package/filter/filter-panel/filter-panel.component.d.ts +14 -14
- package/input/directives/input/input.directive.d.ts +6 -10
- package/input/mis-input.component.d.ts +12 -13
- package/input-stepper/input-stepper/input-stepper.component.d.ts +8 -7
- package/loader/loader.component.d.ts +3 -6
- package/mobile-filter/mobile-filter.component.d.ts +15 -15
- package/modal/module-wrapper/module-wrapper.component.d.ts +2 -3
- package/multi-select-dropdown/multi-select-dropdown.component.d.ts +89 -51
- package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +99 -56
- package/package.json +17 -17
- package/phone-input/phone-input.component.d.ts +16 -18
- package/radio-button/radio-button.component.d.ts +9 -11
- package/ske-loader/ske-loader.component.d.ts +8 -11
- package/slider/slider.component.d.ts +8 -11
- package/slider/slider.module.d.ts +1 -2
- package/snackbar/snackbar/snackbar.component.d.ts +3 -3
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +35 -35
- package/specificdatepicker/tz-specificdatepicker.directive.d.ts +24 -28
- package/star-rating/star-rating.component.d.ts +18 -18
- package/switch/switch.component.d.ts +8 -10
- package/table/actions-cell/actions-cell.component.d.ts +14 -14
- package/table/custom-table-cell.directive.d.ts +3 -3
- package/table/filter/filter.component.d.ts +9 -9
- package/table/sub-table/sub-table.component.d.ts +5 -5
- package/table/table.component.d.ts +38 -35
- package/timepicker/timepicker.component.d.ts +29 -28
- package/timerangepicker/timerangepicker.component.d.ts +36 -33
- package/toast/toast.data.service.d.ts +1 -1
- package/tooltip/tooltip-container/tooltip.component.d.ts +4 -4
- package/virtual-scroll/virtual-scroll.component.d.ts +8 -9
|
@@ -1,57 +1,55 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter,
|
|
3
|
-
import * as
|
|
2
|
+
import { input, EventEmitter, effect, Component, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
4
|
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import * as i1 from '@angular/common';
|
|
6
5
|
import { CommonModule } from '@angular/common';
|
|
7
6
|
|
|
8
|
-
const _c0 = a0 => ({ "toggle-switch-mobile": a0 });
|
|
9
|
-
const _c1 = a0 => ({ "cursor": a0 });
|
|
10
7
|
class SwitchComponent {
|
|
11
|
-
set checked(value) {
|
|
12
|
-
this.control.setValue(value);
|
|
13
|
-
}
|
|
14
|
-
set disabled(value) {
|
|
15
|
-
if (value)
|
|
16
|
-
this.control.disable();
|
|
17
|
-
else
|
|
18
|
-
this.control.enable();
|
|
19
|
-
}
|
|
20
8
|
constructor() {
|
|
21
|
-
this.mobileView = false;
|
|
22
|
-
this.
|
|
23
|
-
|
|
9
|
+
this.mobileView = input(false);
|
|
10
|
+
this.checked = input(false);
|
|
11
|
+
this.disabled = input(false);
|
|
12
|
+
this.control = input(new UntypedFormControl(false));
|
|
24
13
|
this.valueChanged = new EventEmitter();
|
|
14
|
+
// keep control in sync with checked
|
|
15
|
+
effect(() => {
|
|
16
|
+
const ctrl = this.control();
|
|
17
|
+
const val = !!this.checked();
|
|
18
|
+
if (val) {
|
|
19
|
+
ctrl.setValue(val, { emitEvent: false });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
// keep control in sync with disabled
|
|
23
|
+
effect(() => {
|
|
24
|
+
const ctrl = this.control();
|
|
25
|
+
const dis = !!this.disabled();
|
|
26
|
+
if (dis || ctrl.disabled)
|
|
27
|
+
ctrl.disable({ emitEvent: false });
|
|
28
|
+
else
|
|
29
|
+
ctrl.enable({ emitEvent: false });
|
|
30
|
+
});
|
|
25
31
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.valueChanged.emit(this.control.value);
|
|
32
|
+
onChange() {
|
|
33
|
+
this.valueChanged.emit(this.control().value);
|
|
29
34
|
}
|
|
30
35
|
static { this.ɵfac = function SwitchComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SwitchComponent)(); }; }
|
|
31
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SwitchComponent, selectors: [["mis-switch"]], inputs: { mobileView: "mobileView", checked: "checked", disabled: "disabled", control: "control" }, outputs: { valueChanged: "valueChanged" }, decls: 3, vars:
|
|
36
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SwitchComponent, selectors: [["mis-switch"]], inputs: { mobileView: [1, "mobileView"], checked: [1, "checked"], disabled: [1, "disabled"], control: [1, "control"] }, outputs: { valueChanged: "valueChanged" }, decls: 3, vars: 5, consts: [[1, "toggle-switch"], ["type", "checkbox", 3, "change", "formControl"], [1, "slider"]], template: function SwitchComponent_Template(rf, ctx) { if (rf & 1) {
|
|
32
37
|
i0.ɵɵelementStart(0, "label", 0)(1, "input", 1);
|
|
33
|
-
i0.ɵɵlistener("change", function SwitchComponent_Template_input_change_1_listener(
|
|
38
|
+
i0.ɵɵlistener("change", function SwitchComponent_Template_input_change_1_listener() { return ctx.onChange(); });
|
|
34
39
|
i0.ɵɵelementEnd();
|
|
35
40
|
i0.ɵɵelement(2, "span", 2);
|
|
36
41
|
i0.ɵɵelementEnd();
|
|
37
42
|
} if (rf & 2) {
|
|
38
|
-
i0.ɵɵ
|
|
43
|
+
i0.ɵɵstyleProp("cursor", ctx.disabled() || ctx.control().disabled ? "not-allowed" : "pointer");
|
|
44
|
+
i0.ɵɵclassProp("toggle-switch-mobile", ctx.mobileView());
|
|
39
45
|
i0.ɵɵadvance();
|
|
40
|
-
i0.ɵɵproperty("formControl", ctx.control);
|
|
41
|
-
} }, dependencies: [i1.
|
|
46
|
+
i0.ɵɵproperty("formControl", ctx.control());
|
|
47
|
+
} }, dependencies: [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.FormControlDirective], styles: [".toggle-switch[_ngcontent-%COMP%]{height:28px;width:51px;display:inline-block;position:relative}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:#0937b2}.toggle-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:after{-webkit-transform:translateX(23px);-ms-transform:translateX(23px);transform:translate(23px)}.toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#e0e0e0;transition:.25s;border-radius:14px}.toggle-switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:after{position:absolute;content:\"\";height:24px;width:24px;background-color:#fff;border-radius:12px;left:2px;bottom:2px;transition:.25s}.toggle-switch-mobile[_ngcontent-%COMP%]{height:14px;width:34px;display:inline-block;position:relative}.toggle-switch-mobile[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.toggle-switch-mobile[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:#e0e0e0}.toggle-switch-mobile[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled + .slider[_ngcontent-%COMP%]{background-color:#f5f5f5!important}.toggle-switch-mobile[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:after{background-color:#0937b2;-webkit-transform:translateX(34px);-ms-transform:translateX(34px);transform:translate(34px)}.toggle-switch-mobile[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked:disabled + .slider[_ngcontent-%COMP%]:after{background-color:#929dab}.toggle-switch-mobile[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#e0e0e0;transition:.25s;border-radius:14px}.toggle-switch-mobile[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:after{position:absolute;content:\"\";height:20px;width:20px;background-color:#fff;box-shadow:0 0 6px -2px #929dab;border-radius:12px;top:-3px;left:-10px;transition:.25s}"] }); }
|
|
42
48
|
}
|
|
43
49
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SwitchComponent, [{
|
|
44
50
|
type: Component,
|
|
45
|
-
args: [{ selector: "mis-switch", template: "<label class=\"toggle-switch\" [
|
|
46
|
-
}], () => [], {
|
|
47
|
-
type: Input
|
|
48
|
-
}], checked: [{
|
|
49
|
-
type: Input
|
|
50
|
-
}], disabled: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}], control: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], valueChanged: [{
|
|
51
|
+
args: [{ selector: "mis-switch", template: "<label class=\"toggle-switch\" [class.toggle-switch-mobile]=\"mobileView()\" [style.cursor]=\"disabled() || control().disabled ? 'not-allowed' : 'pointer'\">\n <input type=\"checkbox\" [formControl]=\"control()\" (change)=\"onChange()\" />\n <span class=\"slider\"></span>\n</label>\n", styles: [".toggle-switch{height:28px;width:51px;display:inline-block;position:relative}.toggle-switch input{display:none}.toggle-switch input:checked+.slider{background-color:#0937b2}.toggle-switch input:checked+.slider:after{-webkit-transform:translateX(23px);-ms-transform:translateX(23px);transform:translate(23px)}.toggle-switch .slider{position:absolute;inset:0;background-color:#e0e0e0;transition:.25s;border-radius:14px}.toggle-switch .slider:after{position:absolute;content:\"\";height:24px;width:24px;background-color:#fff;border-radius:12px;left:2px;bottom:2px;transition:.25s}.toggle-switch-mobile{height:14px;width:34px;display:inline-block;position:relative}.toggle-switch-mobile input{display:none}.toggle-switch-mobile input:checked+.slider{background-color:#e0e0e0}.toggle-switch-mobile input:disabled+.slider{background-color:#f5f5f5!important}.toggle-switch-mobile input:checked+.slider:after{background-color:#0937b2;-webkit-transform:translateX(34px);-ms-transform:translateX(34px);transform:translate(34px)}.toggle-switch-mobile input:checked:disabled+.slider:after{background-color:#929dab}.toggle-switch-mobile .slider{position:absolute;inset:0;background-color:#e0e0e0;transition:.25s;border-radius:14px}.toggle-switch-mobile .slider:after{position:absolute;content:\"\";height:20px;width:20px;background-color:#fff;box-shadow:0 0 6px -2px #929dab;border-radius:12px;top:-3px;left:-10px;transition:.25s}\n"] }]
|
|
52
|
+
}], () => [], { valueChanged: [{
|
|
55
53
|
type: Output
|
|
56
54
|
}] }); })();
|
|
57
55
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SwitchComponent, { className: "SwitchComponent" }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mis-crystal-design-system-switch.mjs","sources":["../../../projects/mis-components/switch/switch.component.ts","../../../projects/mis-components/switch/switch.component.html","../../../projects/mis-components/switch/switch.module.ts","../../../projects/mis-components/switch/mis-crystal-design-system-switch.ts"],"sourcesContent":["import { Component,
|
|
1
|
+
{"version":3,"file":"mis-crystal-design-system-switch.mjs","sources":["../../../projects/mis-components/switch/switch.component.ts","../../../projects/mis-components/switch/switch.component.html","../../../projects/mis-components/switch/switch.module.ts","../../../projects/mis-components/switch/mis-crystal-design-system-switch.ts"],"sourcesContent":["import { Component, EventEmitter, Output, input, effect } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl } from \"@angular/forms\";\n\n@Component({\n selector: \"mis-switch\",\n templateUrl: \"./switch.component.html\",\n styleUrls: [\"./switch.component.scss\"]\n})\nexport class SwitchComponent {\n mobileView = input<boolean>(false);\n checked = input<boolean>(false);\n disabled = input<boolean>(false);\n control = input<AbstractControl>(new UntypedFormControl(false));\n\n @Output() valueChanged = new EventEmitter<boolean>();\n\n constructor() {\n // keep control in sync with checked\n effect(() => {\n const ctrl = this.control();\n const val = !!this.checked();\n if (val) {\n ctrl.setValue(val, { emitEvent: false });\n }\n });\n\n // keep control in sync with disabled\n effect(() => {\n const ctrl = this.control();\n const dis = !!this.disabled();\n if (dis || ctrl.disabled) ctrl.disable({ emitEvent: false });\n else ctrl.enable({ emitEvent: false });\n });\n }\n\n onChange(): void{\n this.valueChanged.emit(this.control().value);\n }\n}\n","<label class=\"toggle-switch\" [class.toggle-switch-mobile]=\"mobileView()\" [style.cursor]=\"disabled() || control().disabled ? 'not-allowed' : 'pointer'\">\n <input type=\"checkbox\" [formControl]=\"control()\" (change)=\"onChange()\" />\n <span class=\"slider\"></span>\n</label>\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { SwitchComponent } from \"./switch.component\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n@NgModule({\n declarations: [SwitchComponent],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [SwitchComponent]\n})\nexport class SwitchModule {\n static forRoot(): ModuleWithProviders<SwitchModule> {\n return { ngModule: SwitchModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,eAAe,CAAA;AAQ1B,IAAA,WAAA,GAAA;AAPA,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AACnC,QAAA,IAAA,CAAA,OAAO,GAAM,KAAK,CAAU,KAAK,CAAC,CAAC;AACnC,QAAA,IAAA,CAAA,QAAQ,GAAK,KAAK,CAAU,KAAK,CAAC,CAAC;QACnC,IAAO,CAAA,OAAA,GAAG,KAAK,CAAkB,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;AAEtD,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAW,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