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,8 +1,6 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, Output, EventEmitter, HostBinding, input, computed } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/common";
|
|
4
|
-
const _c0 = (a0, a1, a2, a3, a4, a5, a6, a7, a8) => ({ solid: a0, outline: a1, text: a2, large: a3, medium: a4, small: a5, "large-mobile": a6, "small-mobile": a7, loading: a8 });
|
|
5
|
-
const _c1 = (a0, a1, a2, a3, a4) => ({ "border-top-left-radius": a0, "border-bottom-left-radius": a1, "border-top-right-radius": a2, "border-bottom-right-radius": a3, width: a4 });
|
|
6
4
|
function ButtonComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
7
5
|
i0.ɵɵelementStart(0, "div", 5);
|
|
8
6
|
i0.ɵɵelement(1, "div", 6);
|
|
@@ -15,7 +13,7 @@ function ButtonComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
15
13
|
} if (rf & 2) {
|
|
16
14
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
17
15
|
i0.ɵɵadvance();
|
|
18
|
-
i0.ɵɵproperty("src", ctx_r0.iconUrl, i0.ɵɵsanitizeUrl);
|
|
16
|
+
i0.ɵɵproperty("src", ctx_r0.iconUrl(), i0.ɵɵsanitizeUrl);
|
|
19
17
|
} }
|
|
20
18
|
function ButtonComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
21
19
|
i0.ɵɵelementStart(0, "span", 9);
|
|
@@ -24,32 +22,60 @@ function ButtonComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
24
22
|
} if (rf & 2) {
|
|
25
23
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
26
24
|
i0.ɵɵadvance();
|
|
27
|
-
i0.ɵɵproperty("src", ctx_r0.iconUrl, i0.ɵɵsanitizeUrl);
|
|
25
|
+
i0.ɵɵproperty("src", ctx_r0.iconUrl(), i0.ɵɵsanitizeUrl);
|
|
28
26
|
} }
|
|
29
27
|
export class ButtonComponent {
|
|
30
28
|
constructor() {
|
|
31
|
-
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
|
|
29
|
+
// Inputs
|
|
30
|
+
this.name = input("Enabled");
|
|
31
|
+
this.type = input("Solid");
|
|
32
|
+
this.size = input("Medium");
|
|
33
|
+
this.width = input("");
|
|
34
|
+
this.showIcon = input(false);
|
|
35
|
+
this.iconUrl = input("");
|
|
36
|
+
this.iconPosition = input("Left");
|
|
37
|
+
this.disabled = input(false);
|
|
38
|
+
this.disableLeftBorderRadius = input(false);
|
|
39
|
+
this.disableRightBorderRadius = input(false);
|
|
40
|
+
this.showLoader = input(false);
|
|
41
|
+
// Computed signals for template bindings
|
|
42
|
+
this.classes = computed(() => ({
|
|
43
|
+
solid: this.type() === 'Solid',
|
|
44
|
+
outline: this.type() === 'Outline',
|
|
45
|
+
text: this.type() === 'Text',
|
|
46
|
+
large: this.size() === 'Large',
|
|
47
|
+
medium: this.size() === 'Medium',
|
|
48
|
+
small: this.size() === 'Small',
|
|
49
|
+
'large-mobile': this.size() === 'Large-M',
|
|
50
|
+
'small-mobile': this.size() === 'Small-M',
|
|
51
|
+
loading: this.showLoader()
|
|
52
|
+
}));
|
|
53
|
+
this.styles = computed(() => ({
|
|
54
|
+
'border-top-left-radius': this.disableLeftBorderRadius() ? '0px' : '',
|
|
55
|
+
'border-bottom-left-radius': this.disableLeftBorderRadius() ? '0px' : '',
|
|
56
|
+
'border-top-right-radius': this.disableRightBorderRadius() ? '0px' : '',
|
|
57
|
+
'border-bottom-right-radius': this.disableRightBorderRadius() ? '0px' : '',
|
|
58
|
+
width: this.width()
|
|
59
|
+
}));
|
|
60
|
+
this.showLeftIcon = computed(() => this.showIcon() && this.iconPosition() === 'Left');
|
|
61
|
+
this.showRightIcon = computed(() => this.showIcon() && this.iconPosition() === 'Right');
|
|
62
|
+
this.showSpinner = computed(() => this.showLoader());
|
|
63
|
+
// Computed disabled state
|
|
64
|
+
this.isDisabled = computed(() => this.disabled() || this.showLoader());
|
|
65
|
+
this.hostDisabled = this.isDisabled();
|
|
66
|
+
// Output
|
|
43
67
|
this.click = new EventEmitter();
|
|
44
68
|
}
|
|
45
69
|
ngOnInit() { }
|
|
46
70
|
onClick(event) {
|
|
47
|
-
if (!this.
|
|
71
|
+
if (!this.isDisabled()) {
|
|
48
72
|
this.click.emit(event);
|
|
49
73
|
}
|
|
50
74
|
}
|
|
51
75
|
static { this.ɵfac = function ButtonComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ButtonComponent)(); }; }
|
|
52
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ButtonComponent, selectors: [["mis-button"]],
|
|
76
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ButtonComponent, selectors: [["mis-button"]], hostVars: 1, hostBindings: function ButtonComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
77
|
+
i0.ɵɵhostProperty("disabled", ctx.hostDisabled);
|
|
78
|
+
} }, inputs: { name: [1, "name"], type: [1, "type"], size: [1, "size"], width: [1, "width"], showIcon: [1, "showIcon"], iconUrl: [1, "iconUrl"], iconPosition: [1, "iconPosition"], disabled: [1, "disabled"], disableLeftBorderRadius: [1, "disableLeftBorderRadius"], disableRightBorderRadius: [1, "disableRightBorderRadius"], showLoader: [1, "showLoader"] }, outputs: { click: "click" }, decls: 6, vars: 6, consts: [[3, "click", "ngClass", "ngStyle"], ["class", "loader", 4, "ngIf"], ["id", "left-icon", 4, "ngIf"], [1, "button-text"], ["id", "right-icon", 4, "ngIf"], [1, "loader"], [1, "spinner"], ["id", "left-icon"], ["alt", "", 3, "src"], ["id", "right-icon"]], template: function ButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
53
79
|
i0.ɵɵelementStart(0, "button", 0);
|
|
54
80
|
i0.ɵɵlistener("click", function ButtonComponent_Template_button_click_0_listener($event) { return ctx.onClick($event); });
|
|
55
81
|
i0.ɵɵtemplate(1, ButtonComponent_div_1_Template, 2, 0, "div", 1)(2, ButtonComponent_span_2_Template, 2, 1, "span", 2);
|
|
@@ -59,44 +85,25 @@ export class ButtonComponent {
|
|
|
59
85
|
i0.ɵɵtemplate(5, ButtonComponent_span_5_Template, 2, 1, "span", 4);
|
|
60
86
|
i0.ɵɵelementEnd();
|
|
61
87
|
} if (rf & 2) {
|
|
62
|
-
i0.ɵɵproperty("
|
|
88
|
+
i0.ɵɵproperty("ngClass", ctx.classes())("ngStyle", ctx.styles());
|
|
63
89
|
i0.ɵɵadvance();
|
|
64
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
90
|
+
i0.ɵɵproperty("ngIf", ctx.showSpinner());
|
|
65
91
|
i0.ɵɵadvance();
|
|
66
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
92
|
+
i0.ɵɵproperty("ngIf", ctx.showLeftIcon());
|
|
67
93
|
i0.ɵɵadvance(2);
|
|
68
|
-
i0.ɵɵtextInterpolate(ctx.name);
|
|
94
|
+
i0.ɵɵtextInterpolate(ctx.name());
|
|
69
95
|
i0.ɵɵadvance();
|
|
70
|
-
i0.ɵɵproperty("ngIf", ctx.
|
|
96
|
+
i0.ɵɵproperty("ngIf", ctx.showRightIcon());
|
|
71
97
|
} }, dependencies: [i1.NgClass, i1.NgIf, i1.NgStyle], styles: ["button[_ngcontent-%COMP%]{font-family:Lato,sans-serif!important;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#181f33;background-color:#fff}.solid[_ngcontent-%COMP%]{color:#fff;background:#0937b2}.solid[_ngcontent-%COMP%]:hover:enabled{background:#062a99}.solid[_ngcontent-%COMP%]:active:enabled{background:#041f80}.solid[_ngcontent-%COMP%]:disabled{color:#929dab;background:#f5f5f5}.outline[_ngcontent-%COMP%]{border:1px solid #0937b2;color:#0937b2;background:#fff}.outline[_ngcontent-%COMP%]:hover:enabled{background:#f0f3fa}.outline[_ngcontent-%COMP%]:active:enabled{background:#dae1f3}.outline[_ngcontent-%COMP%]:disabled{color:#929dab;border:1px solid #929dab}.text[_ngcontent-%COMP%]{color:#181f33;background:#fff}.text[_ngcontent-%COMP%]:hover:enabled{background:#f0f3fa}.text[_ngcontent-%COMP%]:active:enabled{background:#dae1f3}.text[_ngcontent-%COMP%]:disabled{color:#929dab}.large[_ngcontent-%COMP%]{height:56px;padding:16px;border-radius:10px;font-style:normal;font-weight:700;font-size:16px;line-height:24px;letter-spacing:.5px}.medium[_ngcontent-%COMP%]{height:44px;padding:10px 16px;border-radius:8px;font-style:normal;font-weight:400;font-size:16px;line-height:24px;letter-spacing:.2px}.small[_ngcontent-%COMP%]{height:32px;padding:6px 16px;border-radius:6px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.25px}.large-mobile[_ngcontent-%COMP%]{height:44px;padding:12px;border-radius:8px;font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.1px}.small-mobile[_ngcontent-%COMP%]{height:32px;padding:6px 12px;border-radius:8px;font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.1px}span[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}#left-icon[_ngcontent-%COMP%]{margin-right:8px}#right-icon[_ngcontent-%COMP%]{margin-left:8px}.loader[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.spinner[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid transparent;color:#0937b2;border-top:2px solid currentColor;border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite}button.loading[_ngcontent-%COMP%] .button-text[_ngcontent-%COMP%], button.loading[_ngcontent-%COMP%] #left-icon[_ngcontent-%COMP%], button.loading[_ngcontent-%COMP%] #right-icon[_ngcontent-%COMP%]{visibility:hidden}button.loading[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{visibility:visible;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}button.loading[_ngcontent-%COMP%]{position:relative}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] }); }
|
|
72
98
|
}
|
|
73
99
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ButtonComponent, [{
|
|
74
100
|
type: Component,
|
|
75
|
-
args: [{ selector: "mis-button", template: "<button\n (click)=\"onClick($event)\"\n [
|
|
76
|
-
}], () => [], {
|
|
77
|
-
type:
|
|
78
|
-
|
|
79
|
-
type: Input
|
|
80
|
-
}], size: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], width: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}], showIcon: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], iconUrl: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}], iconPosition: [{
|
|
89
|
-
type: Input
|
|
90
|
-
}], disabled: [{
|
|
91
|
-
type: Input
|
|
92
|
-
}], disableLeftBorderRadius: [{
|
|
93
|
-
type: Input
|
|
94
|
-
}], disableRightBorderRadius: [{
|
|
95
|
-
type: Input
|
|
96
|
-
}], showLoader: [{
|
|
97
|
-
type: Input
|
|
101
|
+
args: [{ selector: "mis-button", template: "<button\n (click)=\"onClick($event)\"\n [ngClass]=\"classes()\"\n [ngStyle]=\"styles()\"\n>\n <!-- Loader -->\n <div class=\"loader\" *ngIf=\"showSpinner()\">\n <div class=\"spinner\"></div>\n </div>\n\n <!-- Left Icon -->\n <span id=\"left-icon\" *ngIf=\"showLeftIcon()\">\n <img [src]=\"iconUrl()\" alt=\"\" />\n </span>\n\n <!-- Button Text -->\n <span class=\"button-text\">{{ name() }}</span>\n\n <!-- Right Icon -->\n <span id=\"right-icon\" *ngIf=\"showRightIcon()\">\n <img [src]=\"iconUrl()\" alt=\"\" />\n </span>\n</button>\n", styles: ["button{font-family:Lato,sans-serif!important;border:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#181f33;background-color:#fff}.solid{color:#fff;background:#0937b2}.solid:hover:enabled{background:#062a99}.solid:active:enabled{background:#041f80}.solid:disabled{color:#929dab;background:#f5f5f5}.outline{border:1px solid #0937b2;color:#0937b2;background:#fff}.outline:hover:enabled{background:#f0f3fa}.outline:active:enabled{background:#dae1f3}.outline:disabled{color:#929dab;border:1px solid #929dab}.text{color:#181f33;background:#fff}.text:hover:enabled{background:#f0f3fa}.text:active:enabled{background:#dae1f3}.text:disabled{color:#929dab}.large{height:56px;padding:16px;border-radius:10px;font-style:normal;font-weight:700;font-size:16px;line-height:24px;letter-spacing:.5px}.medium{height:44px;padding:10px 16px;border-radius:8px;font-style:normal;font-weight:400;font-size:16px;line-height:24px;letter-spacing:.2px}.small{height:32px;padding:6px 16px;border-radius:6px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.25px}.large-mobile{height:44px;padding:12px;border-radius:8px;font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.1px}.small-mobile{height:32px;padding:6px 12px;border-radius:8px;font-style:normal;font-weight:700;font-size:14px;line-height:20px;letter-spacing:.1px}span{display:flex;justify-content:center;align-items:center}#left-icon{margin-right:8px}#right-icon{margin-left:8px}.loader{display:flex;justify-content:center;align-items:center}.spinner{width:16px;height:16px;border:2px solid transparent;color:#0937b2;border-top:2px solid currentColor;border-radius:50%;animation:spin 1s linear infinite}button.loading .button-text,button.loading #left-icon,button.loading #right-icon{visibility:hidden}button.loading .loader{visibility:visible;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}button.loading{position:relative}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
102
|
+
}], () => [], { hostDisabled: [{
|
|
103
|
+
type: HostBinding,
|
|
104
|
+
args: ['disabled']
|
|
98
105
|
}], click: [{
|
|
99
106
|
type: Output
|
|
100
107
|
}] }); })();
|
|
101
108
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ButtonComponent, { className: "ButtonComponent" }); })();
|
|
102
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
109
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21pcy1jb21wb25lbnRzL2J1dHRvbi9idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvYnV0dG9uL2J1dHRvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sRUFBRSxZQUFZLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7SUNNcEcsOEJBQTBDO0lBQ3hDLHlCQUEyQjtJQUM3QixpQkFBTTs7O0lBR04sK0JBQTRDO0lBQzFDLHlCQUFnQztJQUNsQyxpQkFBTzs7O0lBREEsY0FBaUI7SUFBakIsd0RBQWlCOzs7SUFPeEIsK0JBQThDO0lBQzVDLHlCQUFnQztJQUNsQyxpQkFBTzs7O0lBREEsY0FBaUI7SUFBakIsd0RBQWlCOztBRGIxQixNQUFNLE9BQU8sZUFBZTtJQThDMUI7UUE3Q0EsU0FBUztRQUNULFNBQUksR0FBRyxLQUFLLENBQVMsU0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FtuZ1N0eWxlXT1cInN0eWxlcygpXCJcbj5cbiAgPCEtLSBMb2FkZXIgLS0+XG4gIDxkaXYgY2xhc3M9XCJsb2FkZXJcIiAqbmdJZj1cInNob3dTcGlubmVyKClcIj5cbiAgICA8ZGl2IGNsYXNzPVwic3Bpbm5lclwiPjwvZGl2PlxuICA8L2Rpdj5cblxuICA8IS0tIExlZnQgSWNvbiAtLT5cbiAgPHNwYW4gaWQ9XCJsZWZ0LWljb25cIiAqbmdJZj1cInNob3dMZWZ0SWNvbigpXCI+XG4gICAgPGltZyBbc3JjXT1cImljb25VcmwoKVwiIGFsdD1cIlwiIC8+XG4gIDwvc3Bhbj5cblxuICA8IS0tIEJ1dHRvbiBUZXh0IC0tPlxuICA8c3BhbiBjbGFzcz1cImJ1dHRvbi10ZXh0XCI+e3sgbmFtZSgpIH19PC9zcGFuPlxuXG4gIDwhLS0gUmlnaHQgSWNvbiAtLT5cbiAgPHNwYW4gaWQ9XCJyaWdodC1pY29uXCIgKm5nSWY9XCJzaG93UmlnaHRJY29uKClcIj5cbiAgICA8aW1nIFtzcmNdPVwiaWNvblVybCgpXCIgYWx0PVwiXCIgLz5cbiAgPC9zcGFuPlxuPC9idXR0b24+XG4iXX0=
|
|
@@ -1,61 +1,57 @@
|
|
|
1
|
-
import { Directive, HostBinding,
|
|
1
|
+
import { Directive, HostBinding, input, effect } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export class ButtonDirective {
|
|
4
4
|
constructor(el, renderer) {
|
|
5
5
|
this.el = el;
|
|
6
6
|
this.renderer = renderer;
|
|
7
|
-
this.type = "none";
|
|
8
|
-
this.size = "md";
|
|
7
|
+
this.type = input("none");
|
|
8
|
+
this.size = input("md");
|
|
9
9
|
this.elementClass = "mis-btn";
|
|
10
|
+
this.previousTypeClass = "";
|
|
11
|
+
this.previousSizeClass = "";
|
|
12
|
+
// Maps for easier maintenance
|
|
13
|
+
this.typeClassMap = {
|
|
14
|
+
primary: "mis-primary",
|
|
15
|
+
outline: "mis-outline",
|
|
16
|
+
none: "mis-none",
|
|
17
|
+
};
|
|
18
|
+
this.sizeClassMap = {
|
|
19
|
+
lg: "mis-btn-lg",
|
|
20
|
+
md: "mis-btn-md",
|
|
21
|
+
sm: "mis-btn-sm",
|
|
22
|
+
};
|
|
23
|
+
// React to type changes
|
|
24
|
+
effect(() => {
|
|
25
|
+
const typeClass = this.typeClassMap[this.type()] || "mis-none";
|
|
26
|
+
this.updateClass(typeClass, "type");
|
|
27
|
+
this.previousTypeClass = typeClass;
|
|
28
|
+
});
|
|
29
|
+
// React to size changes
|
|
30
|
+
effect(() => {
|
|
31
|
+
const sizeClass = this.sizeClassMap[this.size()] || "mis-btn-md";
|
|
32
|
+
this.updateClass(sizeClass, "size");
|
|
33
|
+
this.previousSizeClass = sizeClass;
|
|
34
|
+
});
|
|
10
35
|
}
|
|
11
|
-
|
|
12
|
-
this.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
bindTypeClass() {
|
|
16
|
-
let className = "";
|
|
17
|
-
switch (this.type) {
|
|
18
|
-
case "primary":
|
|
19
|
-
className = "mis-primary";
|
|
20
|
-
break;
|
|
21
|
-
case "outline":
|
|
22
|
-
className = "mis-outline";
|
|
23
|
-
break;
|
|
24
|
-
default:
|
|
25
|
-
className = "mis-none";
|
|
26
|
-
}
|
|
27
|
-
this.renderer.addClass(this.el.nativeElement, className);
|
|
28
|
-
}
|
|
29
|
-
bindSizeClass() {
|
|
30
|
-
let className = "";
|
|
31
|
-
switch (this.size) {
|
|
32
|
-
case "lg":
|
|
33
|
-
className = "mis-btn-lg";
|
|
34
|
-
break;
|
|
35
|
-
case "sm":
|
|
36
|
-
className = "mis-btn-sm";
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
className = "mis-btn-md";
|
|
36
|
+
updateClass(newClass, kind) {
|
|
37
|
+
const prevClass = kind === "type" ? this.previousTypeClass : this.previousSizeClass;
|
|
38
|
+
if (prevClass) {
|
|
39
|
+
this.renderer.removeClass(this.el.nativeElement, prevClass);
|
|
40
40
|
}
|
|
41
|
-
this.renderer.addClass(this.el.nativeElement,
|
|
41
|
+
this.renderer.addClass(this.el.nativeElement, newClass);
|
|
42
42
|
}
|
|
43
43
|
static { this.ɵfac = function ButtonDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ButtonDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
44
44
|
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ButtonDirective, selectors: [["", "mis-button", ""]], hostVars: 2, hostBindings: function ButtonDirective_HostBindings(rf, ctx) { if (rf & 2) {
|
|
45
45
|
i0.ɵɵclassMap(ctx.elementClass);
|
|
46
|
-
} }, inputs: { type: "type", size: "size" } }); }
|
|
46
|
+
} }, inputs: { type: [1, "type"], size: [1, "size"] } }); }
|
|
47
47
|
}
|
|
48
48
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ButtonDirective, [{
|
|
49
49
|
type: Directive,
|
|
50
50
|
args: [{
|
|
51
51
|
selector: "[mis-button]"
|
|
52
52
|
}]
|
|
53
|
-
}], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], {
|
|
54
|
-
type: Input
|
|
55
|
-
}], size: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], elementClass: [{
|
|
53
|
+
}], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], { elementClass: [{
|
|
58
54
|
type: HostBinding,
|
|
59
55
|
args: ["class"]
|
|
60
56
|
}] }); })();
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL21pcy1jb21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ufVxuIl19
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventEmitter,
|
|
1
|
+
import { Component, EventEmitter, Output, ViewChild, ChangeDetectionStrategy, input, signal, effect } from "@angular/core";
|
|
2
2
|
import { UntypedFormControl } from "@angular/forms";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
@@ -10,115 +10,120 @@ function CheckboxComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
10
10
|
i0.ɵɵelement(0, "span", 4);
|
|
11
11
|
} if (rf & 2) {
|
|
12
12
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
13
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.
|
|
13
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.isDisabledComputed, ctx_r0.isErrorComputed && !ctx_r0.isDisabledComputed));
|
|
14
14
|
} }
|
|
15
15
|
function CheckboxComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
16
16
|
i0.ɵɵelement(0, "span", 5);
|
|
17
17
|
} if (rf & 2) {
|
|
18
18
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
19
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.
|
|
19
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.isDisabledComputed, ctx_r0.isErrorComputed && !ctx_r0.isDisabledComputed));
|
|
20
20
|
} }
|
|
21
21
|
export class CheckboxComponent {
|
|
22
|
-
set type(value) {
|
|
23
|
-
this.isError = value === "Error";
|
|
24
|
-
}
|
|
25
|
-
set indeterminate(value) {
|
|
26
|
-
if (value) {
|
|
27
|
-
this.formControl.setValue(true);
|
|
28
|
-
this.valueChange.emit({
|
|
29
|
-
name: this.name,
|
|
30
|
-
value: true
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this.formControl.setValue(false);
|
|
35
|
-
this.valueChange.emit({
|
|
36
|
-
name: this.name,
|
|
37
|
-
value: false
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
this.isIndeterminate = value;
|
|
41
|
-
}
|
|
42
|
-
set checked(value) {
|
|
43
|
-
if (value)
|
|
44
|
-
this.formControl.setValue(true);
|
|
45
|
-
else
|
|
46
|
-
this.formControl.setValue(false);
|
|
47
|
-
}
|
|
48
|
-
set disabled(value) {
|
|
49
|
-
if (value)
|
|
50
|
-
this.formControl.disable();
|
|
51
|
-
else
|
|
52
|
-
this.formControl.enable();
|
|
53
|
-
}
|
|
54
22
|
constructor() {
|
|
55
|
-
this.isError = false;
|
|
56
|
-
this.isIndeterminate = false;
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
23
|
+
this.isError = signal(false);
|
|
24
|
+
this.isIndeterminate = signal(false);
|
|
25
|
+
this.isChecked = signal(false);
|
|
26
|
+
this.isDisabled = signal(false);
|
|
27
|
+
this.type = input("Default");
|
|
28
|
+
this.indeterminate = input(false);
|
|
29
|
+
this.checked = input(false);
|
|
30
|
+
this.disabled = input(false);
|
|
31
|
+
this.name = input("");
|
|
32
|
+
this.formControl = input(new UntypedFormControl());
|
|
59
33
|
this.valueChange = new EventEmitter();
|
|
34
|
+
// Handle input signal changes
|
|
35
|
+
effect(() => {
|
|
36
|
+
// Update error state based on type
|
|
37
|
+
this.isError.set(this.type() === "Error");
|
|
38
|
+
}, { allowSignalWrites: true });
|
|
39
|
+
effect(() => {
|
|
40
|
+
// Handle indeterminate state
|
|
41
|
+
const indeterminateValue = this.indeterminate();
|
|
42
|
+
this.isIndeterminate.set(indeterminateValue);
|
|
43
|
+
if (indeterminateValue) {
|
|
44
|
+
this.formControl().setValue(true);
|
|
45
|
+
this.valueChange.emit({
|
|
46
|
+
name: this.name(),
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, { allowSignalWrites: true });
|
|
51
|
+
effect(() => {
|
|
52
|
+
// Handle checked state
|
|
53
|
+
if (this.checked()) {
|
|
54
|
+
this.formControl().setValue(true);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.formControl().setValue(false);
|
|
58
|
+
}
|
|
59
|
+
}, { allowSignalWrites: true });
|
|
60
|
+
effect(() => {
|
|
61
|
+
// Handle disabled state
|
|
62
|
+
if (this.disabled()) {
|
|
63
|
+
this.formControl().disable();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.formControl().enable();
|
|
67
|
+
}
|
|
68
|
+
}, { allowSignalWrites: true });
|
|
60
69
|
}
|
|
61
|
-
ngOnInit() { }
|
|
62
70
|
toggleState() {
|
|
63
|
-
if (this.isIndeterminate) {
|
|
64
|
-
this.isIndeterminate
|
|
65
|
-
this.formControl.setValue(true);
|
|
71
|
+
if (this.isIndeterminate()) {
|
|
72
|
+
this.isIndeterminate.set(false);
|
|
73
|
+
this.formControl().setValue(true);
|
|
66
74
|
}
|
|
67
75
|
else {
|
|
68
|
-
if (this.formControl.value)
|
|
69
|
-
this.formControl.setValue(false);
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
if (this.formControl().value) {
|
|
77
|
+
this.formControl().setValue(false);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.formControl().setValue(true);
|
|
81
|
+
}
|
|
72
82
|
}
|
|
73
83
|
this.valueChange.emit({
|
|
74
|
-
name: this.name,
|
|
75
|
-
value: this.formControl.value
|
|
84
|
+
name: this.name(),
|
|
85
|
+
value: this.formControl().value
|
|
76
86
|
});
|
|
77
87
|
}
|
|
88
|
+
// Computed signals for reactive updates
|
|
89
|
+
get isErrorComputed() {
|
|
90
|
+
return this.isError();
|
|
91
|
+
}
|
|
92
|
+
get isDisabledComputed() {
|
|
93
|
+
return this.formControl().disabled;
|
|
94
|
+
}
|
|
78
95
|
static { this.ɵfac = function CheckboxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxComponent)(); }; }
|
|
79
96
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckboxComponent, selectors: [["mis-checkbox"]], viewQuery: function CheckboxComponent_Query(rf, ctx) { if (rf & 1) {
|
|
80
97
|
i0.ɵɵviewQuery(_c0, 5);
|
|
81
98
|
} if (rf & 2) {
|
|
82
99
|
let _t;
|
|
83
100
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputBox = _t.first);
|
|
84
|
-
} }, inputs: { type: "type", indeterminate: "indeterminate", checked: "checked", disabled: "disabled", name: "name", formControl: "formControl" }, outputs: { valueChange: "valueChange" }, decls: 4, vars: 6, consts: [[1, "checkbox-container", 3, "click", "keyup.enter", "ngStyle"], ["hidden", "", "type", "checkbox", 3, "click", "formControl"], ["class", "checkmark", 3, "ngClass", 4, "ngIf"], ["class", "checkmark indeterminate", "tabindex", "0", 3, "ngClass", 4, "ngIf"], [1, "checkmark", 3, "ngClass"], ["tabindex", "0", 1, "checkmark", "indeterminate", 3, "ngClass"]], template: function CheckboxComponent_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
} }, inputs: { type: [1, "type"], indeterminate: [1, "indeterminate"], checked: [1, "checked"], disabled: [1, "disabled"], name: [1, "name"], formControl: [1, "formControl"] }, outputs: { valueChange: "valueChange" }, decls: 4, vars: 6, consts: [[1, "checkbox-container", 3, "click", "keyup.enter", "ngStyle"], ["hidden", "", "type", "checkbox", 3, "click", "formControl"], ["class", "checkmark", 3, "ngClass", 4, "ngIf"], ["class", "checkmark indeterminate", "tabindex", "0", 3, "ngClass", 4, "ngIf"], [1, "checkmark", 3, "ngClass"], ["tabindex", "0", 1, "checkmark", "indeterminate", 3, "ngClass"]], template: function CheckboxComponent_Template(rf, ctx) { if (rf & 1) {
|
|
85
102
|
i0.ɵɵelementStart(0, "div", 0);
|
|
86
|
-
i0.ɵɵlistener("click", function CheckboxComponent_Template_div_click_0_listener() { return !ctx.
|
|
103
|
+
i0.ɵɵlistener("click", function CheckboxComponent_Template_div_click_0_listener() { return !ctx.isDisabledComputed && ctx.toggleState(); })("keyup.enter", function CheckboxComponent_Template_div_keyup_enter_0_listener() { return !ctx.isDisabledComputed && ctx.toggleState(); });
|
|
87
104
|
i0.ɵɵelementStart(1, "input", 1);
|
|
88
105
|
i0.ɵɵlistener("click", function CheckboxComponent_Template_input_click_1_listener($event) { return $event.stopPropagation(); });
|
|
89
106
|
i0.ɵɵelementEnd();
|
|
90
107
|
i0.ɵɵtemplate(2, CheckboxComponent_span_2_Template, 1, 4, "span", 2)(3, CheckboxComponent_span_3_Template, 1, 4, "span", 3);
|
|
91
108
|
i0.ɵɵelementEnd();
|
|
92
109
|
} if (rf & 2) {
|
|
93
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c1, ctx.
|
|
110
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c1, ctx.isDisabledComputed ? "not-allowed" : "pointer"));
|
|
94
111
|
i0.ɵɵadvance();
|
|
95
|
-
i0.ɵɵproperty("formControl", ctx.formControl);
|
|
112
|
+
i0.ɵɵproperty("formControl", ctx.formControl());
|
|
96
113
|
i0.ɵɵadvance();
|
|
97
|
-
i0.ɵɵproperty("ngIf", !ctx.isIndeterminate);
|
|
114
|
+
i0.ɵɵproperty("ngIf", !ctx.isIndeterminate());
|
|
98
115
|
i0.ɵɵadvance();
|
|
99
|
-
i0.ɵɵproperty("ngIf", ctx.isIndeterminate);
|
|
100
|
-
} }, dependencies: [i1.NgClass, i1.NgIf, i1.NgStyle, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.FormControlDirective], styles: [".checkbox-container[_ngcontent-%COMP%]{height:20px;width:20px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:sub}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:20px;width:20px}.checkmark[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:0;height:20px;width:20px;border-radius:4px;background-color:#fff;border:solid 2px #6a737d;box-sizing:border-box}.checkmark[_ngcontent-%COMP%]:hover{border-color:#929dab}.checkmark[_ngcontent-%COMP%]:focus-within, .checkmark[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .09em #fff,0 0 .01em .2em #0937b2;outline:none}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background-color:#0937b2;border-color:#0937b2}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark.disabled-checkbox[_ngcontent-%COMP%]{background-color:#c8cdd3;border-color:#c8cdd3}.checkmark[_ngcontent-%COMP%]:after{content:\"\";position:absolute;display:none}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]:after{display:block}.checkbox-container[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{top:1px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container[_ngcontent-%COMP%] .checkmark.indeterminate[_ngcontent-%COMP%]:after{top:2px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.disabled-checkbox[_ngcontent-%COMP%]{pointer-events:none;border-color:#c8cdd3}.error[_ngcontent-%COMP%]{border-color:#b00020}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .error.checkmark[_ngcontent-%COMP%]{border:#b00020!important;background:#b00020!important}.checkbox-container[_ngcontent-%COMP%] .error.checkmark[_ngcontent-%COMP%]:after{top:3px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container[_ngcontent-%COMP%] .error.checkmark.indeterminate[_ngcontent-%COMP%]:after{top:4px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.error[_ngcontent-%COMP%]:focus-within, .error[_ngcontent-%COMP%]:focus{box-shadow:none!important;outline:none}"] }); }
|
|
116
|
+
i0.ɵɵproperty("ngIf", ctx.isIndeterminate());
|
|
117
|
+
} }, dependencies: [i1.NgClass, i1.NgIf, i1.NgStyle, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.FormControlDirective], styles: [".checkbox-container[_ngcontent-%COMP%]{height:20px;width:20px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:sub}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer;height:20px;width:20px}.checkmark[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:0;height:20px;width:20px;border-radius:4px;background-color:#fff;border:solid 2px #6a737d;box-sizing:border-box}.checkmark[_ngcontent-%COMP%]:hover{border-color:#929dab}.checkmark[_ngcontent-%COMP%]:focus-within, .checkmark[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .09em #fff,0 0 .01em .2em #0937b2;outline:none}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]{background-color:#0937b2;border-color:#0937b2}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark.disabled-checkbox[_ngcontent-%COMP%]{background-color:#c8cdd3;border-color:#c8cdd3}.checkmark[_ngcontent-%COMP%]:after{content:\"\";position:absolute;display:none}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .checkmark[_ngcontent-%COMP%]:after{display:block}.checkbox-container[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{top:1px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container[_ngcontent-%COMP%] .checkmark.indeterminate[_ngcontent-%COMP%]:after{top:2px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.disabled-checkbox[_ngcontent-%COMP%]{pointer-events:none;border-color:#c8cdd3}.error[_ngcontent-%COMP%]{border-color:#b00020}.checkbox-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .error.checkmark[_ngcontent-%COMP%]{border:#b00020!important;background:#b00020!important}.checkbox-container[_ngcontent-%COMP%] .error.checkmark[_ngcontent-%COMP%]:after{top:3px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container[_ngcontent-%COMP%] .error.checkmark.indeterminate[_ngcontent-%COMP%]:after{top:4px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.error[_ngcontent-%COMP%]:focus-within, .error[_ngcontent-%COMP%]:focus{box-shadow:none!important;outline:none}"], changeDetection: 0 }); }
|
|
101
118
|
}
|
|
102
119
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxComponent, [{
|
|
103
120
|
type: Component,
|
|
104
|
-
args: [{ selector: "mis-checkbox", template: "<div\n class=\"checkbox-container\"\n [ngStyle]=\"{ cursor:
|
|
121
|
+
args: [{ selector: "mis-checkbox", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"checkbox-container\"\n [ngStyle]=\"{ cursor: isDisabledComputed ? 'not-allowed' : 'pointer' }\"\n (click)=\"!isDisabledComputed && toggleState()\"\n (keyup.enter)=\"!isDisabledComputed && toggleState()\"\n>\n <input \n hidden \n type=\"checkbox\" \n [formControl]=\"formControl()\"\n (click)=\"$event.stopPropagation()\" \n />\n <span\n class=\"checkmark\"\n *ngIf=\"!isIndeterminate()\"\n [ngClass]=\"{\n 'disabled-checkbox': isDisabledComputed,\n error: isErrorComputed && !isDisabledComputed\n }\"\n ></span>\n <span\n class=\"checkmark indeterminate\"\n tabindex=\"0\"\n *ngIf=\"isIndeterminate()\"\n [ngClass]=\"{\n 'disabled-checkbox': isDisabledComputed,\n error: isErrorComputed && !isDisabledComputed\n }\"\n ></span>\n</div>\n", styles: [".checkbox-container{height:20px;width:20px;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:sub}.checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:20px;width:20px}.checkmark{position:absolute;display:flex;justify-content:center;align-items:center;top:0;left:0;height:20px;width:20px;border-radius:4px;background-color:#fff;border:solid 2px #6a737d;box-sizing:border-box}.checkmark:hover{border-color:#929dab}.checkmark:focus-within,.checkmark:focus{box-shadow:0 0 0 .09em #fff,0 0 .01em .2em #0937b2;outline:none}.checkbox-container input:checked~.checkmark{background-color:#0937b2;border-color:#0937b2}.checkbox-container input:checked~.checkmark.disabled-checkbox{background-color:#c8cdd3;border-color:#c8cdd3}.checkmark:after{content:\"\";position:absolute;display:none}.checkbox-container input:checked~.checkmark:after{display:block}.checkbox-container .checkmark:after{top:1px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container .checkmark.indeterminate:after{top:2px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.disabled-checkbox{pointer-events:none;border-color:#c8cdd3}.error{border-color:#b00020}.checkbox-container input:checked~.error.checkmark{border:#b00020!important;background:#b00020!important}.checkbox-container .error.checkmark:after{top:3px;width:4px;height:9px;border:solid white;border-width:0 2px 2px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.checkbox-container .error.checkmark.indeterminate:after{top:4px;width:2px;height:0px;border:solid white;border-width:0 0px 12px 0;border-radius:14px;transform:rotate(90deg);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg)}.error:focus-within,.error:focus{box-shadow:none!important;outline:none}\n"] }]
|
|
105
122
|
}], () => [], { inputBox: [{
|
|
106
123
|
type: ViewChild,
|
|
107
124
|
args: ["input"]
|
|
108
|
-
}], type: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}], indeterminate: [{
|
|
111
|
-
type: Input
|
|
112
|
-
}], checked: [{
|
|
113
|
-
type: Input
|
|
114
|
-
}], disabled: [{
|
|
115
|
-
type: Input
|
|
116
|
-
}], name: [{
|
|
117
|
-
type: Input
|
|
118
|
-
}], formControl: [{
|
|
119
|
-
type: Input
|
|
120
125
|
}], valueChange: [{
|
|
121
126
|
type: Output
|
|
122
127
|
}] }); })();
|
|
123
128
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckboxComponent, { className: "CheckboxComponent" }); })();
|
|
124
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
129
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3guY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvY2hlY2tib3gvY2hlY2tib3guY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWlzLWNvbXBvbmVudHMvY2hlY2tib3gvY2hlY2tib3guY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsTUFBTSxF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