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.
Files changed (163) hide show
  1. package/action-list/action-list.component.d.ts +17 -15
  2. package/async-search-dropdown/async-dropdown.component.d.ts +43 -61
  3. package/button/button.component.d.ts +35 -13
  4. package/button/button.directive.d.ts +10 -8
  5. package/checkbox/checkbox.component.d.ts +15 -12
  6. package/chip/chip.component.d.ts +9 -11
  7. package/datepicker_v2/models/dp-config.model.d.ts +1 -0
  8. package/datepicker_v2/tz-datepicker.directive.d.ts +15 -18
  9. package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +42 -21
  10. package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +12 -14
  11. package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +46 -23
  12. package/drawer/drawer-body/drawer-body.component.d.ts +2 -2
  13. package/dropdown/calculate-container-height.directive.d.ts +7 -8
  14. package/dropdown/dropdown.component.d.ts +41 -49
  15. package/dynamic-form/dynamic-form.component.d.ts +20 -16
  16. package/esm2022/action-list/action-list.component.mjs +112 -89
  17. package/esm2022/async-search-dropdown/async-dropdown.component.mjs +256 -326
  18. package/esm2022/button/button.component.mjs +55 -48
  19. package/esm2022/button/button.directive.mjs +36 -40
  20. package/esm2022/checkbox/checkbox.component.mjs +75 -70
  21. package/esm2022/chip/chip.component.mjs +20 -33
  22. package/esm2022/datepicker_v2/models/dp-config.model.mjs +1 -1
  23. package/esm2022/datepicker_v2/tz-datepicker.directive.mjs +42 -71
  24. package/esm2022/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +202 -172
  25. package/esm2022/datepicker_v2/utils/index.mjs +2 -1
  26. package/esm2022/daterangepicker_v2/tz-daterangepicker.directive.mjs +26 -51
  27. package/esm2022/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +282 -235
  28. package/esm2022/drawer/drawer-body/drawer-body.component.mjs +8 -7
  29. package/esm2022/dropdown/calculate-container-height.directive.mjs +25 -22
  30. package/esm2022/dropdown/dropdown.component.mjs +162 -186
  31. package/esm2022/dynamic-form/dynamic-form.component.mjs +118 -72
  32. package/esm2022/fab/fab.component.mjs +29 -33
  33. package/esm2022/filter/filter-panel/filter-panel.component.mjs +60 -58
  34. package/esm2022/input/directives/input/input.directive.mjs +22 -26
  35. package/esm2022/input/mis-input.component.mjs +41 -45
  36. package/esm2022/input-stepper/input-stepper/input-stepper.component.mjs +40 -50
  37. package/esm2022/loader/loader.component.mjs +8 -11
  38. package/esm2022/mobile-filter/mobile-filter.component.mjs +61 -61
  39. package/esm2022/modal/module-wrapper/module-wrapper.component.mjs +11 -9
  40. package/esm2022/multi-select-dropdown/multi-select-dropdown.component.mjs +235 -281
  41. package/esm2022/nested-multi-select-dropdown/nested-multi-select-dropdown.component.mjs +250 -287
  42. package/esm2022/phone-input/phone-input.component.mjs +21 -43
  43. package/esm2022/radio-button/radio-button.component.mjs +15 -27
  44. package/esm2022/ske-loader/ske-loader.component.mjs +15 -29
  45. package/esm2022/slider/slider.component.mjs +23 -33
  46. package/esm2022/slider/slider.module.mjs +4 -11
  47. package/esm2022/snackbar/snackbar/snackbar.component.mjs +21 -15
  48. package/esm2022/snackbar/snackbar.service.mjs +3 -2
  49. package/esm2022/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +230 -343
  50. package/esm2022/specificdatepicker/tz-specificdatepicker.directive.mjs +77 -105
  51. package/esm2022/star-rating/star-rating.component.mjs +57 -71
  52. package/esm2022/switch/switch.component.mjs +34 -36
  53. package/esm2022/table/actions-cell/actions-cell.component.mjs +55 -54
  54. package/esm2022/table/custom-table-cell.directive.mjs +22 -18
  55. package/esm2022/table/filter/filter.component.mjs +60 -42
  56. package/esm2022/table/sort-icons.directive.mjs +16 -8
  57. package/esm2022/table/sub-table/sub-table.component.mjs +41 -44
  58. package/esm2022/table/table.component.mjs +181 -165
  59. package/esm2022/timepicker/timepicker.component.mjs +244 -159
  60. package/esm2022/timepicker/timepicker.directive.mjs +3 -2
  61. package/esm2022/timerangepicker/timerangepicker.component.mjs +200 -159
  62. package/esm2022/toast/toast.component.mjs +6 -7
  63. package/esm2022/toast/toast.data.service.mjs +15 -9
  64. package/esm2022/tooltip/tooltip-container/tooltip.component.mjs +12 -12
  65. package/esm2022/tooltip/tooltip.directive.mjs +4 -4
  66. package/esm2022/virtual-scroll/virtual-scroll.component.mjs +57 -59
  67. package/fab/fab.component.d.ts +12 -8
  68. package/fesm2022/mis-crystal-design-system-action-list.mjs +111 -88
  69. package/fesm2022/mis-crystal-design-system-action-list.mjs.map +1 -1
  70. package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs +253 -324
  71. package/fesm2022/mis-crystal-design-system-async-search-dropdown.mjs.map +1 -1
  72. package/fesm2022/mis-crystal-design-system-button.mjs +88 -85
  73. package/fesm2022/mis-crystal-design-system-button.mjs.map +1 -1
  74. package/fesm2022/mis-crystal-design-system-checkbox.mjs +74 -69
  75. package/fesm2022/mis-crystal-design-system-checkbox.mjs.map +1 -1
  76. package/fesm2022/mis-crystal-design-system-chip.mjs +19 -32
  77. package/fesm2022/mis-crystal-design-system-chip.mjs.map +1 -1
  78. package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs +242 -240
  79. package/fesm2022/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
  80. package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs +305 -283
  81. package/fesm2022/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
  82. package/fesm2022/mis-crystal-design-system-drawer.mjs +7 -6
  83. package/fesm2022/mis-crystal-design-system-drawer.mjs.map +1 -1
  84. package/fesm2022/mis-crystal-design-system-dropdown.mjs +183 -204
  85. package/fesm2022/mis-crystal-design-system-dropdown.mjs.map +1 -1
  86. package/fesm2022/mis-crystal-design-system-dynamic-form.mjs +118 -72
  87. package/fesm2022/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
  88. package/fesm2022/mis-crystal-design-system-fab.mjs +28 -32
  89. package/fesm2022/mis-crystal-design-system-fab.mjs.map +1 -1
  90. package/fesm2022/mis-crystal-design-system-filter.mjs +59 -57
  91. package/fesm2022/mis-crystal-design-system-filter.mjs.map +1 -1
  92. package/fesm2022/mis-crystal-design-system-input-stepper.mjs +39 -49
  93. package/fesm2022/mis-crystal-design-system-input-stepper.mjs.map +1 -1
  94. package/fesm2022/mis-crystal-design-system-input.mjs +62 -71
  95. package/fesm2022/mis-crystal-design-system-input.mjs.map +1 -1
  96. package/fesm2022/mis-crystal-design-system-loader.mjs +7 -10
  97. package/fesm2022/mis-crystal-design-system-loader.mjs.map +1 -1
  98. package/fesm2022/mis-crystal-design-system-mobile-filter.mjs +60 -60
  99. package/fesm2022/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
  100. package/fesm2022/mis-crystal-design-system-modal.mjs +10 -8
  101. package/fesm2022/mis-crystal-design-system-modal.mjs.map +1 -1
  102. package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs +233 -279
  103. package/fesm2022/mis-crystal-design-system-multi-select-dropdown.mjs.map +1 -1
  104. package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs +249 -286
  105. package/fesm2022/mis-crystal-design-system-nested-multi-select-dropdown.mjs.map +1 -1
  106. package/fesm2022/mis-crystal-design-system-phone-input.mjs +20 -42
  107. package/fesm2022/mis-crystal-design-system-phone-input.mjs.map +1 -1
  108. package/fesm2022/mis-crystal-design-system-radio-button.mjs +14 -26
  109. package/fesm2022/mis-crystal-design-system-radio-button.mjs.map +1 -1
  110. package/fesm2022/mis-crystal-design-system-ske-loader.mjs +14 -28
  111. package/fesm2022/mis-crystal-design-system-ske-loader.mjs.map +1 -1
  112. package/fesm2022/mis-crystal-design-system-slider.mjs +25 -42
  113. package/fesm2022/mis-crystal-design-system-slider.mjs.map +1 -1
  114. package/fesm2022/mis-crystal-design-system-snackbar.mjs +22 -15
  115. package/fesm2022/mis-crystal-design-system-snackbar.mjs.map +1 -1
  116. package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs +304 -445
  117. package/fesm2022/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
  118. package/fesm2022/mis-crystal-design-system-star-rating.mjs +56 -70
  119. package/fesm2022/mis-crystal-design-system-star-rating.mjs.map +1 -1
  120. package/fesm2022/mis-crystal-design-system-switch.mjs +33 -35
  121. package/fesm2022/mis-crystal-design-system-switch.mjs.map +1 -1
  122. package/fesm2022/mis-crystal-design-system-table.mjs +365 -321
  123. package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
  124. package/fesm2022/mis-crystal-design-system-timepicker.mjs +245 -159
  125. package/fesm2022/mis-crystal-design-system-timepicker.mjs.map +1 -1
  126. package/fesm2022/mis-crystal-design-system-timerangepicker.mjs +199 -158
  127. package/fesm2022/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
  128. package/fesm2022/mis-crystal-design-system-toast.mjs +18 -13
  129. package/fesm2022/mis-crystal-design-system-toast.mjs.map +1 -1
  130. package/fesm2022/mis-crystal-design-system-tooltip.mjs +14 -14
  131. package/fesm2022/mis-crystal-design-system-tooltip.mjs.map +1 -1
  132. package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs +57 -59
  133. package/fesm2022/mis-crystal-design-system-virtual-scroll.mjs.map +1 -1
  134. package/filter/filter-panel/filter-panel.component.d.ts +14 -14
  135. package/input/directives/input/input.directive.d.ts +6 -10
  136. package/input/mis-input.component.d.ts +12 -13
  137. package/input-stepper/input-stepper/input-stepper.component.d.ts +8 -7
  138. package/loader/loader.component.d.ts +3 -6
  139. package/mobile-filter/mobile-filter.component.d.ts +15 -15
  140. package/modal/module-wrapper/module-wrapper.component.d.ts +2 -3
  141. package/multi-select-dropdown/multi-select-dropdown.component.d.ts +89 -51
  142. package/nested-multi-select-dropdown/nested-multi-select-dropdown.component.d.ts +99 -56
  143. package/package.json +17 -17
  144. package/phone-input/phone-input.component.d.ts +16 -18
  145. package/radio-button/radio-button.component.d.ts +9 -11
  146. package/ske-loader/ske-loader.component.d.ts +8 -11
  147. package/slider/slider.component.d.ts +8 -11
  148. package/slider/slider.module.d.ts +1 -2
  149. package/snackbar/snackbar/snackbar.component.d.ts +3 -3
  150. package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +35 -35
  151. package/specificdatepicker/tz-specificdatepicker.directive.d.ts +24 -28
  152. package/star-rating/star-rating.component.d.ts +18 -18
  153. package/switch/switch.component.d.ts +8 -10
  154. package/table/actions-cell/actions-cell.component.d.ts +14 -14
  155. package/table/custom-table-cell.directive.d.ts +3 -3
  156. package/table/filter/filter.component.d.ts +9 -9
  157. package/table/sub-table/sub-table.component.d.ts +5 -5
  158. package/table/table.component.d.ts +38 -35
  159. package/timepicker/timepicker.component.d.ts +29 -28
  160. package/timerangepicker/timerangepicker.component.d.ts +36 -33
  161. package/toast/toast.data.service.d.ts +1 -1
  162. package/tooltip/tooltip-container/tooltip.component.d.ts +4 -4
  163. package/virtual-scroll/virtual-scroll.component.d.ts +8 -9
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ViewChild, Input, Output, NgModule } from '@angular/core';
2
+ import { signal, input, EventEmitter, effect, Component, ChangeDetectionStrategy, ViewChild, Output, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/forms';
4
4
  import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i1 from '@angular/common';
@@ -12,113 +12,118 @@ function CheckboxComponent_span_2_Template(rf, ctx) { if (rf & 1) {
12
12
  i0.ɵɵelement(0, "span", 4);
13
13
  } if (rf & 2) {
14
14
  const ctx_r0 = i0.ɵɵnextContext();
15
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.formControl.disabled, ctx_r0.isError && !ctx_r0.formControl.disabled));
15
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.isDisabledComputed, ctx_r0.isErrorComputed && !ctx_r0.isDisabledComputed));
16
16
  } }
17
17
  function CheckboxComponent_span_3_Template(rf, ctx) { if (rf & 1) {
18
18
  i0.ɵɵelement(0, "span", 5);
19
19
  } if (rf & 2) {
20
20
  const ctx_r0 = i0.ɵɵnextContext();
21
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.formControl.disabled, ctx_r0.isError && !ctx_r0.formControl.disabled));
21
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c2, ctx_r0.isDisabledComputed, ctx_r0.isErrorComputed && !ctx_r0.isDisabledComputed));
22
22
  } }
23
23
  class CheckboxComponent {
24
- set type(value) {
25
- this.isError = value === "Error";
26
- }
27
- set indeterminate(value) {
28
- if (value) {
29
- this.formControl.setValue(true);
30
- this.valueChange.emit({
31
- name: this.name,
32
- value: true
33
- });
34
- }
35
- else {
36
- this.formControl.setValue(false);
37
- this.valueChange.emit({
38
- name: this.name,
39
- value: false
40
- });
41
- }
42
- this.isIndeterminate = value;
43
- }
44
- set checked(value) {
45
- if (value)
46
- this.formControl.setValue(true);
47
- else
48
- this.formControl.setValue(false);
49
- }
50
- set disabled(value) {
51
- if (value)
52
- this.formControl.disable();
53
- else
54
- this.formControl.enable();
55
- }
56
24
  constructor() {
57
- this.isError = false;
58
- this.isIndeterminate = false;
59
- this.name = "";
60
- this.formControl = new UntypedFormControl();
25
+ this.isError = signal(false);
26
+ this.isIndeterminate = signal(false);
27
+ this.isChecked = signal(false);
28
+ this.isDisabled = signal(false);
29
+ this.type = input("Default");
30
+ this.indeterminate = input(false);
31
+ this.checked = input(false);
32
+ this.disabled = input(false);
33
+ this.name = input("");
34
+ this.formControl = input(new UntypedFormControl());
61
35
  this.valueChange = new EventEmitter();
36
+ // Handle input signal changes
37
+ effect(() => {
38
+ // Update error state based on type
39
+ this.isError.set(this.type() === "Error");
40
+ }, { allowSignalWrites: true });
41
+ effect(() => {
42
+ // Handle indeterminate state
43
+ const indeterminateValue = this.indeterminate();
44
+ this.isIndeterminate.set(indeterminateValue);
45
+ if (indeterminateValue) {
46
+ this.formControl().setValue(true);
47
+ this.valueChange.emit({
48
+ name: this.name(),
49
+ value: true
50
+ });
51
+ }
52
+ }, { allowSignalWrites: true });
53
+ effect(() => {
54
+ // Handle checked state
55
+ if (this.checked()) {
56
+ this.formControl().setValue(true);
57
+ }
58
+ else {
59
+ this.formControl().setValue(false);
60
+ }
61
+ }, { allowSignalWrites: true });
62
+ effect(() => {
63
+ // Handle disabled state
64
+ if (this.disabled()) {
65
+ this.formControl().disable();
66
+ }
67
+ else {
68
+ this.formControl().enable();
69
+ }
70
+ }, { allowSignalWrites: true });
62
71
  }
63
- ngOnInit() { }
64
72
  toggleState() {
65
- if (this.isIndeterminate) {
66
- this.isIndeterminate = false;
67
- this.formControl.setValue(true);
73
+ if (this.isIndeterminate()) {
74
+ this.isIndeterminate.set(false);
75
+ this.formControl().setValue(true);
68
76
  }
69
77
  else {
70
- if (this.formControl.value)
71
- this.formControl.setValue(false);
72
- else
73
- this.formControl.setValue(true);
78
+ if (this.formControl().value) {
79
+ this.formControl().setValue(false);
80
+ }
81
+ else {
82
+ this.formControl().setValue(true);
83
+ }
74
84
  }
75
85
  this.valueChange.emit({
76
- name: this.name,
77
- value: this.formControl.value
86
+ name: this.name(),
87
+ value: this.formControl().value
78
88
  });
79
89
  }
90
+ // Computed signals for reactive updates
91
+ get isErrorComputed() {
92
+ return this.isError();
93
+ }
94
+ get isDisabledComputed() {
95
+ return this.formControl().disabled;
96
+ }
80
97
  static { this.ɵfac = function CheckboxComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxComponent)(); }; }
81
98
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckboxComponent, selectors: [["mis-checkbox"]], viewQuery: function CheckboxComponent_Query(rf, ctx) { if (rf & 1) {
82
99
  i0.ɵɵviewQuery(_c0, 5);
83
100
  } if (rf & 2) {
84
101
  let _t;
85
102
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputBox = _t.first);
86
- } }, 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) {
103
+ } }, 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) {
87
104
  i0.ɵɵelementStart(0, "div", 0);
88
- i0.ɵɵlistener("click", function CheckboxComponent_Template_div_click_0_listener() { return !ctx.formControl.disabled && ctx.toggleState(); })("keyup.enter", function CheckboxComponent_Template_div_keyup_enter_0_listener() { return !ctx.formControl.disabled && ctx.toggleState(); });
105
+ 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(); });
89
106
  i0.ɵɵelementStart(1, "input", 1);
90
107
  i0.ɵɵlistener("click", function CheckboxComponent_Template_input_click_1_listener($event) { return $event.stopPropagation(); });
91
108
  i0.ɵɵelementEnd();
92
109
  i0.ɵɵtemplate(2, CheckboxComponent_span_2_Template, 1, 4, "span", 2)(3, CheckboxComponent_span_3_Template, 1, 4, "span", 3);
93
110
  i0.ɵɵelementEnd();
94
111
  } if (rf & 2) {
95
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c1, ctx.formControl.disabled ? "not-allowed" : "pointer"));
112
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c1, ctx.isDisabledComputed ? "not-allowed" : "pointer"));
96
113
  i0.ɵɵadvance();
97
- i0.ɵɵproperty("formControl", ctx.formControl);
114
+ i0.ɵɵproperty("formControl", ctx.formControl());
98
115
  i0.ɵɵadvance();
99
- i0.ɵɵproperty("ngIf", !ctx.isIndeterminate);
116
+ i0.ɵɵproperty("ngIf", !ctx.isIndeterminate());
100
117
  i0.ɵɵadvance();
101
- i0.ɵɵproperty("ngIf", ctx.isIndeterminate);
102
- } }, 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}"] }); }
118
+ i0.ɵɵproperty("ngIf", ctx.isIndeterminate());
119
+ } }, 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 }); }
103
120
  }
104
121
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxComponent, [{
105
122
  type: Component,
106
- args: [{ selector: "mis-checkbox", template: "<div\n class=\"checkbox-container\"\n [ngStyle]=\"{ cursor: formControl.disabled ? 'not-allowed' : 'pointer' }\"\n (click)=\"!formControl.disabled && toggleState()\"\n (keyup.enter)=\"!formControl.disabled && toggleState()\"\n>\n <input hidden type=\"checkbox\" [formControl]=\"formControl\" (click)=\"$event.stopPropagation()\" />\n <span\n class=\"checkmark\"\n *ngIf=\"!isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\n }\"\n ></span>\n <span\n class=\"checkmark indeterminate\"\n tabindex=\"0\"\n *ngIf=\"isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\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"] }]
123
+ 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"] }]
107
124
  }], () => [], { inputBox: [{
108
125
  type: ViewChild,
109
126
  args: ["input"]
110
- }], type: [{
111
- type: Input
112
- }], indeterminate: [{
113
- type: Input
114
- }], checked: [{
115
- type: Input
116
- }], disabled: [{
117
- type: Input
118
- }], name: [{
119
- type: Input
120
- }], formControl: [{
121
- type: Input
122
127
  }], valueChange: [{
123
128
  type: Output
124
129
  }] }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-checkbox.mjs","sources":["../../../projects/mis-components/checkbox/checkbox.component.html","../../../projects/mis-components/checkbox/checkbox.component.ts","../../../projects/mis-components/checkbox/checkbox.module.ts","../../../projects/mis-components/checkbox/mis-crystal-design-system-checkbox.ts"],"sourcesContent":["<div\n class=\"checkbox-container\"\n [ngStyle]=\"{ cursor: formControl.disabled ? 'not-allowed' : 'pointer' }\"\n (click)=\"!formControl.disabled && toggleState()\"\n (keyup.enter)=\"!formControl.disabled && toggleState()\"\n>\n <input hidden type=\"checkbox\" [formControl]=\"formControl\" (click)=\"$event.stopPropagation()\" />\n <span\n class=\"checkmark\"\n *ngIf=\"!isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\n }\"\n ></span>\n <span\n class=\"checkmark indeterminate\"\n tabindex=\"0\"\n *ngIf=\"isIndeterminate\"\n [ngClass]=\"{\n 'disabled-checkbox': formControl.disabled,\n error: isError && !formControl.disabled\n }\"\n ></span>\n</div>\n","import { Component, OnInit, EventEmitter, Input, Output, ViewChild, ElementRef, Renderer2 } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl } from \"@angular/forms\";\n\n@Component({\n selector: \"mis-checkbox\",\n templateUrl: \"./checkbox.component.html\",\n styleUrls: [\"./checkbox.component.scss\"]\n})\nexport class CheckboxComponent implements OnInit {\n public isError: boolean = false;\n public isIndeterminate: boolean = false;\n\n @ViewChild(\"input\") inputBox: ElementRef;\n @Input() set type(value: \"Default\" | \"Error\") {\n this.isError = value === \"Error\";\n }\n @Input() set indeterminate(value: boolean) {\n if (value) {\n this.formControl.setValue(true);\n this.valueChange.emit({\n name: this.name,\n value: true\n });\n } else {\n this.formControl.setValue(false);\n this.valueChange.emit({\n name: this.name,\n value: false\n });\n }\n this.isIndeterminate = value;\n }\n @Input() set checked(value: boolean) {\n if (value) this.formControl.setValue(true);\n else this.formControl.setValue(false);\n }\n @Input() set disabled(value: boolean) {\n if (value) this.formControl.disable();\n else this.formControl.enable();\n }\n @Input() name: string = \"\";\n @Input() formControl: AbstractControl = new UntypedFormControl();\n @Output() valueChange = new EventEmitter<{ name: string; value: boolean }>();\n\n constructor() {}\n ngOnInit() {}\n\n toggleState() {\n if (this.isIndeterminate) {\n this.isIndeterminate = false;\n this.formControl.setValue(true);\n } else {\n if (this.formControl.value) this.formControl.setValue(false);\n else this.formControl.setValue(true);\n }\n this.valueChange.emit({\n name: this.name,\n value: this.formControl.value\n });\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { CheckboxComponent } from \"./checkbox.component\";\n\n@NgModule({\n declarations: [CheckboxComponent],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [CheckboxComponent]\n})\nexport class CheckboxModule {\n static forRoot(): ModuleWithProviders<CheckboxModule> {\n return { ngModule: CheckboxModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;IAOE,EAOQ,CAAA,SAAA,CAAA,CAAA,EAAA,MAAA,EAA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CAAC;gBAC5C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,cAAc,mBAJV,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACtB,YAAY,EAAE,mBAAmB,aACjC,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACT7B;;AAEG;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-checkbox.mjs","sources":["../../../projects/mis-components/checkbox/checkbox.component.html","../../../projects/mis-components/checkbox/checkbox.component.ts","../../../projects/mis-components/checkbox/checkbox.module.ts","../../../projects/mis-components/checkbox/mis-crystal-design-system-checkbox.ts"],"sourcesContent":["<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","import { Component, EventEmitter, Output, ViewChild, ElementRef, Renderer2, ChangeDetectionStrategy, input, signal, WritableSignal, effect } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl } from \"@angular/forms\";\n\n@Component({\n selector: \"mis-checkbox\",\n templateUrl: \"./checkbox.component.html\",\n styleUrls: [\"./checkbox.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CheckboxComponent {\n public isError: WritableSignal<boolean> = signal(false);\n public isIndeterminate: WritableSignal<boolean> = signal(false);\n public isChecked: WritableSignal<boolean> = signal(false);\n public isDisabled: WritableSignal<boolean> = signal(false);\n\n @ViewChild(\"input\") inputBox: ElementRef;\n \n type = input<\"Default\" | \"Error\">(\"Default\");\n indeterminate = input<boolean>(false);\n checked = input<boolean>(false);\n disabled = input<boolean>(false);\n name = input<string>(\"\");\n formControl = input<AbstractControl>(new UntypedFormControl());\n \n @Output() valueChange = new EventEmitter<{ name: string; value: boolean }>();\n\n constructor() {\n // Handle input signal changes\n effect(() => {\n // Update error state based on type\n this.isError.set(this.type() === \"Error\");\n }, { allowSignalWrites: true });\n\n effect(() => {\n // Handle indeterminate state\n const indeterminateValue = this.indeterminate();\n this.isIndeterminate.set(indeterminateValue);\n \n if (indeterminateValue) {\n this.formControl().setValue(true);\n this.valueChange.emit({\n name: this.name(),\n value: true\n });\n }\n }, { allowSignalWrites: true });\n\n effect(() => {\n // Handle checked state\n if (this.checked()) {\n this.formControl().setValue(true);\n } else {\n this.formControl().setValue(false);\n }\n }, { allowSignalWrites: true });\n\n effect(() => {\n // Handle disabled state\n if (this.disabled()) {\n this.formControl().disable();\n } else {\n this.formControl().enable();\n }\n }, { allowSignalWrites: true });\n }\n\n toggleState() {\n if (this.isIndeterminate()) {\n this.isIndeterminate.set(false);\n this.formControl().setValue(true);\n } else {\n if (this.formControl().value) {\n this.formControl().setValue(false);\n } else {\n this.formControl().setValue(true);\n }\n }\n \n this.valueChange.emit({\n name: this.name(),\n value: this.formControl().value\n });\n }\n\n // Computed signals for reactive updates\n get isErrorComputed() {\n return this.isError();\n }\n\n get isDisabledComputed() {\n return this.formControl().disabled;\n }\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { CheckboxComponent } from \"./checkbox.component\";\n\n@NgModule({\n declarations: [CheckboxComponent],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [CheckboxComponent]\n})\nexport class CheckboxModule {\n static forRoot(): ModuleWithProviders<CheckboxModule> {\n return { ngModule: CheckboxModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;IAYE,EAOQ,CAAA,SAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,CAAA;;;IAJN,EAGE,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,eAAA,CAAA,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,kBAAA,EAAA,MAAA,CAAA,eAAA,IAAA,CAAA,MAAA,CAAA,kBAAA,CAAA,CAAA,CAAA;;;IAEJ,EAQQ,CAAA,SAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,CAAA;;;IAJN,EAGE,CAAA,UAAA,CAAA,SAAA,EAAA,EAAA,CAAA,eAAA,CAAA,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,kBAAA,EAAA,MAAA,CAAA,eAAA,IAAA,CAAA,MAAA,CAAA,kBAAA,CAAA,CAAA,CAAA;;MClBO,iBAAiB,CAAA;AAiB5B,IAAA,WAAA,GAAA;AAhBO,QAAA,IAAA,CAAA,OAAO,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;AACjD,QAAA,IAAA,CAAA,eAAe,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;AACzD,QAAA,IAAA,CAAA,SAAS,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;AACnD,QAAA,IAAA,CAAA,UAAU,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;AAI3D,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAsB,SAAS,CAAC,CAAC;AAC7C,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AACtC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,C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;;ACT7B;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
2
+ import { input, EventEmitter, Component, ChangeDetectionStrategy, Output, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
 
@@ -8,7 +8,7 @@ function ChipComponent_img_1_Template(rf, ctx) { if (rf & 1) {
8
8
  i0.ɵɵelement(0, "img", 5);
9
9
  } if (rf & 2) {
10
10
  const ctx_r0 = i0.ɵɵnextContext();
11
- i0.ɵɵproperty("src", ctx_r0.iconUrl, i0.ɵɵsanitizeUrl);
11
+ i0.ɵɵproperty("src", ctx_r0.iconUrl(), i0.ɵɵsanitizeUrl);
12
12
  } }
13
13
  function ChipComponent_div_4_Template(rf, ctx) { if (rf & 1) {
14
14
  i0.ɵɵelementStart(0, "div", 6);
@@ -19,12 +19,12 @@ function ChipComponent_div_4_Template(rf, ctx) { if (rf & 1) {
19
19
  } if (rf & 2) {
20
20
  const ctx_r0 = i0.ɵɵnextContext();
21
21
  i0.ɵɵadvance(3);
22
- i0.ɵɵtextInterpolate(ctx_r0.count);
22
+ i0.ɵɵtextInterpolate(ctx_r0.count());
23
23
  } }
24
24
  function ChipComponent_span_5_Template(rf, ctx) { if (rf & 1) {
25
25
  const _r2 = i0.ɵɵgetCurrentView();
26
26
  i0.ɵɵelementStart(0, "span", 9);
27
- i0.ɵɵlistener("keyup.enter", function ChipComponent_span_5_Template_span_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.cancel.emit(ctx_r0.value)); })("click", function ChipComponent_span_5_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.cancel.emit(ctx_r0.value)); });
27
+ i0.ɵɵlistener("keyup.enter", function ChipComponent_span_5_Template_span_keyup_enter_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.cancel.emit(ctx_r0.value())); })("click", function ChipComponent_span_5_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.cancel.emit(ctx_r0.value())); });
28
28
  i0.ɵɵnamespaceSVG();
29
29
  i0.ɵɵelementStart(1, "svg", 10);
30
30
  i0.ɵɵelement(2, "path", 11);
@@ -32,17 +32,16 @@ function ChipComponent_span_5_Template(rf, ctx) { if (rf & 1) {
32
32
  } }
33
33
  class ChipComponent {
34
34
  constructor() {
35
- this.label = "";
36
- this.value = "";
37
- this.size = "Medium";
38
- this.iconUrl = null;
39
- this.count = null;
40
- this.dismissible = false;
35
+ this.label = input("");
36
+ this.value = input("");
37
+ this.size = input("Medium");
38
+ this.iconUrl = input(null);
39
+ this.count = input(null);
40
+ this.dismissible = input(false);
41
41
  this.cancel = new EventEmitter();
42
42
  }
43
- ngOnInit() { }
44
43
  static { this.ɵfac = function ChipComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ChipComponent)(); }; }
45
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChipComponent, selectors: [["mis-chip"]], inputs: { label: "label", value: "value", size: "size", iconUrl: "iconUrl", count: "count", dismissible: "dismissible" }, outputs: { cancel: "cancel" }, decls: 6, vars: 10, consts: [["id", "chip-container", "tabindex", "0", 3, "ngClass"], ["alt", "chip icon", 3, "src", 4, "ngIf"], ["tabindex", "0"], ["id", "count-container", 4, "ngIf"], ["tabindex", "0", "id", "close-icon", "aria-label", "remove chip", 3, "keyup.enter", "click", 4, "ngIf"], ["alt", "chip icon", 3, "src"], ["id", "count-container"], ["id", "separator"], ["id", "count-text"], ["tabindex", "0", "id", "close-icon", "aria-label", "remove chip", 3, "keyup.enter", "click"], ["width", "16", "height", "16", "viewBox", "0 0 16 16", "fill", "none", "xmlns", "http://www.w3.org/2000/svg"], ["fill-rule", "evenodd", "clip-rule", "evenodd", "d", "M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z", "fill", "#181F33"]], template: function ChipComponent_Template(rf, ctx) { if (rf & 1) {
44
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChipComponent, selectors: [["mis-chip"]], inputs: { label: [1, "label"], value: [1, "value"], size: [1, "size"], iconUrl: [1, "iconUrl"], count: [1, "count"], dismissible: [1, "dismissible"] }, outputs: { cancel: "cancel" }, decls: 6, vars: 10, consts: [["id", "chip-container", "tabindex", "0", 3, "ngClass"], ["alt", "chip icon", 3, "src", 4, "ngIf"], ["tabindex", "0"], ["id", "count-container", 4, "ngIf"], ["tabindex", "0", "id", "close-icon", "aria-label", "remove chip", 3, "keyup.enter", "click", 4, "ngIf"], ["alt", "chip icon", 3, "src"], ["id", "count-container"], ["id", "separator"], ["id", "count-text"], ["tabindex", "0", "id", "close-icon", "aria-label", "remove chip", 3, "keyup.enter", "click"], ["width", "16", "height", "16", "viewBox", "0 0 16 16", "fill", "none", "xmlns", "http://www.w3.org/2000/svg"], ["fill-rule", "evenodd", "clip-rule", "evenodd", "d", "M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z", "fill", "#181F33"]], template: function ChipComponent_Template(rf, ctx) { if (rf & 1) {
46
45
  i0.ɵɵelementStart(0, "div", 0);
47
46
  i0.ɵɵtemplate(1, ChipComponent_img_1_Template, 1, 1, "img", 1);
48
47
  i0.ɵɵelementStart(2, "span", 2);
@@ -51,33 +50,21 @@ class ChipComponent {
51
50
  i0.ɵɵtemplate(4, ChipComponent_div_4_Template, 4, 1, "div", 3)(5, ChipComponent_span_5_Template, 3, 0, "span", 4);
52
51
  i0.ɵɵelementEnd();
53
52
  } if (rf & 2) {
54
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction4(5, _c0, ctx.size === "Small", ctx.size === "Medium", ctx.size === "Small-M", ctx.size === "Medium-M"));
53
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction4(5, _c0, ctx.size() === "Small", ctx.size() === "Medium", ctx.size() === "Small-M", ctx.size() === "Medium-M"));
55
54
  i0.ɵɵadvance();
56
- i0.ɵɵproperty("ngIf", ctx.iconUrl && ctx.iconUrl.length > 0);
55
+ i0.ɵɵproperty("ngIf", ctx.iconUrl() && ctx.iconUrl().length > 0);
57
56
  i0.ɵɵadvance(2);
58
- i0.ɵɵtextInterpolate(ctx.label);
57
+ i0.ɵɵtextInterpolate(ctx.label());
59
58
  i0.ɵɵadvance();
60
- i0.ɵɵproperty("ngIf", ctx.count != null || ctx.count != undefined);
59
+ i0.ɵɵproperty("ngIf", ctx.count() != null || ctx.count() != undefined);
61
60
  i0.ɵɵadvance();
62
- i0.ɵɵproperty("ngIf", ctx.dismissible);
63
- } }, dependencies: [i1.NgClass, i1.NgIf], styles: ["#chip-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif!important;background-color:#e0e0e0;box-sizing:border-box;cursor:default}#chip-container[_ngcontent-%COMP%]:hover{background:#d7d9de}img[_ngcontent-%COMP%]{margin-right:4px}#close-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-left:4px;cursor:pointer}#count-container[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}#separator[_ngcontent-%COMP%]{height:100%;width:1px;background-color:#c8cdd3;margin:0 8px}#count-text[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px}.small[_ngcontent-%COMP%]{height:24px;padding:4px 8px;border-radius:7px;font-style:normal;font-weight:700;font-size:12px;line-height:16px;letter-spacing:.7px;color:#181f33}.medium[_ngcontent-%COMP%]{height:32px;padding:6px 12px;border-radius:16px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.small-m[_ngcontent-%COMP%]{height:20px;padding:4px 8px;border-radius:10px;font-style:normal;font-weight:400;font-size:11px;line-height:12px;letter-spacing:.1px;color:#181f33}.medium-m[_ngcontent-%COMP%]{height:24px;padding:4px 12px;border-radius:12px;font-style:normal;font-weight:400;font-size:12px;line-height:16px;letter-spacing:.25px;color:#181f33}"] }); }
61
+ i0.ɵɵproperty("ngIf", ctx.dismissible());
62
+ } }, dependencies: [i1.NgClass, i1.NgIf], styles: ["#chip-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif!important;background-color:#e0e0e0;box-sizing:border-box;cursor:default}#chip-container[_ngcontent-%COMP%]:hover{background:#d7d9de}img[_ngcontent-%COMP%]{margin-right:4px}#close-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-left:4px;cursor:pointer}#count-container[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}#separator[_ngcontent-%COMP%]{height:100%;width:1px;background-color:#c8cdd3;margin:0 8px}#count-text[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px}.small[_ngcontent-%COMP%]{height:24px;padding:4px 8px;border-radius:7px;font-style:normal;font-weight:700;font-size:12px;line-height:16px;letter-spacing:.7px;color:#181f33}.medium[_ngcontent-%COMP%]{height:32px;padding:6px 12px;border-radius:16px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.small-m[_ngcontent-%COMP%]{height:20px;padding:4px 8px;border-radius:10px;font-style:normal;font-weight:400;font-size:11px;line-height:12px;letter-spacing:.1px;color:#181f33}.medium-m[_ngcontent-%COMP%]{height:24px;padding:4px 12px;border-radius:12px;font-style:normal;font-weight:400;font-size:12px;line-height:16px;letter-spacing:.25px;color:#181f33}"], changeDetection: 0 }); }
64
63
  }
65
64
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChipComponent, [{
66
65
  type: Component,
67
- args: [{ selector: "mis-chip", template: "<div\n id=\"chip-container\"\n tabindex=\"0\"\n [ngClass]=\"{\n small: size === 'Small',\n medium: size === 'Medium',\n 'small-m': size === 'Small-M',\n 'medium-m': size === 'Medium-M'\n }\"\n>\n <img *ngIf=\"iconUrl && iconUrl.length > 0\" [src]=\"iconUrl\" alt=\"chip icon\" />\n <span tabindex=\"0\">{{ label }}</span>\n <div *ngIf=\"count != null || count != undefined\" id=\"count-container\">\n <div id=\"separator\"></div>\n <span id=\"count-text\">{{ count }}</span>\n </div>\n <span *ngIf=\"dismissible\" tabindex=\"0\" id=\"close-icon\" aria-label=\"remove chip\" (keyup.enter)=\"cancel.emit(value)\" (click)=\"cancel.emit(value)\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z\"\n fill=\"#181F33\"\n />\n </svg>\n </span>\n</div>\n", styles: ["#chip-container{display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif!important;background-color:#e0e0e0;box-sizing:border-box;cursor:default}#chip-container:hover{background:#d7d9de}img{margin-right:4px}#close-icon{display:flex;justify-content:center;align-items:center;margin-left:4px;cursor:pointer}#count-container{display:flex;height:100%;justify-content:center;align-items:center}#separator{height:100%;width:1px;background-color:#c8cdd3;margin:0 8px}#count-text{font-weight:700;letter-spacing:.25px}.small{height:24px;padding:4px 8px;border-radius:7px;font-style:normal;font-weight:700;font-size:12px;line-height:16px;letter-spacing:.7px;color:#181f33}.medium{height:32px;padding:6px 12px;border-radius:16px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.small-m{height:20px;padding:4px 8px;border-radius:10px;font-style:normal;font-weight:400;font-size:11px;line-height:12px;letter-spacing:.1px;color:#181f33}.medium-m{height:24px;padding:4px 12px;border-radius:12px;font-style:normal;font-weight:400;font-size:12px;line-height:16px;letter-spacing:.25px;color:#181f33}\n"] }]
68
- }], () => [], { label: [{
69
- type: Input
70
- }], value: [{
71
- type: Input
72
- }], size: [{
73
- type: Input
74
- }], iconUrl: [{
75
- type: Input
76
- }], count: [{
77
- type: Input
78
- }], dismissible: [{
79
- type: Input
80
- }], cancel: [{
66
+ args: [{ selector: "mis-chip", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n id=\"chip-container\"\n tabindex=\"0\"\n [ngClass]=\"{\n small: size() === 'Small',\n medium: size() === 'Medium',\n 'small-m': size() === 'Small-M',\n 'medium-m': size() === 'Medium-M'\n }\"\n>\n <img *ngIf=\"iconUrl() && iconUrl().length > 0\" [src]=\"iconUrl()\" alt=\"chip icon\" />\n <span tabindex=\"0\">{{ label() }}</span>\n <div *ngIf=\"count() != null || count() != undefined\" id=\"count-container\">\n <div id=\"separator\"></div>\n <span id=\"count-text\">{{ count() }}</span>\n </div>\n <span *ngIf=\"dismissible()\" tabindex=\"0\" id=\"close-icon\" aria-label=\"remove chip\" (keyup.enter)=\"cancel.emit(value())\" (click)=\"cancel.emit(value())\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z\"\n fill=\"#181F33\"\n />\n </svg>\n </span>\n</div>\n", styles: ["#chip-container{display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif!important;background-color:#e0e0e0;box-sizing:border-box;cursor:default}#chip-container:hover{background:#d7d9de}img{margin-right:4px}#close-icon{display:flex;justify-content:center;align-items:center;margin-left:4px;cursor:pointer}#count-container{display:flex;height:100%;justify-content:center;align-items:center}#separator{height:100%;width:1px;background-color:#c8cdd3;margin:0 8px}#count-text{font-weight:700;letter-spacing:.25px}.small{height:24px;padding:4px 8px;border-radius:7px;font-style:normal;font-weight:700;font-size:12px;line-height:16px;letter-spacing:.7px;color:#181f33}.medium{height:32px;padding:6px 12px;border-radius:16px;font-style:normal;font-weight:400;font-size:14px;line-height:20px;letter-spacing:.2px;color:#181f33}.small-m{height:20px;padding:4px 8px;border-radius:10px;font-style:normal;font-weight:400;font-size:11px;line-height:12px;letter-spacing:.1px;color:#181f33}.medium-m{height:24px;padding:4px 12px;border-radius:12px;font-style:normal;font-weight:400;font-size:12px;line-height:16px;letter-spacing:.25px;color:#181f33}\n"] }]
67
+ }], null, { cancel: [{
81
68
  type: Output
82
69
  }] }); })();
83
70
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChipComponent, { className: "ChipComponent" }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-chip.mjs","sources":["../../../projects/mis-components/chip/chip.component.html","../../../projects/mis-components/chip/chip.component.ts","../../../projects/mis-components/chip/chip.module.ts","../../../projects/mis-components/chip/mis-crystal-design-system-chip.ts"],"sourcesContent":["<div\n id=\"chip-container\"\n tabindex=\"0\"\n [ngClass]=\"{\n small: size === 'Small',\n medium: size === 'Medium',\n 'small-m': size === 'Small-M',\n 'medium-m': size === 'Medium-M'\n }\"\n>\n <img *ngIf=\"iconUrl && iconUrl.length > 0\" [src]=\"iconUrl\" alt=\"chip icon\" />\n <span tabindex=\"0\">{{ label }}</span>\n <div *ngIf=\"count != null || count != undefined\" id=\"count-container\">\n <div id=\"separator\"></div>\n <span id=\"count-text\">{{ count }}</span>\n </div>\n <span *ngIf=\"dismissible\" tabindex=\"0\" id=\"close-icon\" aria-label=\"remove chip\" (keyup.enter)=\"cancel.emit(value)\" (click)=\"cancel.emit(value)\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z\"\n fill=\"#181F33\"\n />\n </svg>\n </span>\n</div>\n","import { Component, Input, OnInit, Output, EventEmitter } from \"@angular/core\";\n\n@Component({\n selector: \"mis-chip\",\n templateUrl: \"chip.component.html\",\n styleUrls: [\"chip.component.scss\"]\n})\nexport class ChipComponent implements OnInit {\n @Input() label: string = \"\";\n @Input() value: any = \"\";\n @Input() size: \"Small\" | \"Medium\" | \"Small-M\" | \"Medium-M\" = \"Medium\";\n @Input() iconUrl: string | null = null;\n @Input() count: number | null | undefined = null;\n @Input() dismissible: boolean = false;\n\n @Output() cancel = new EventEmitter<any>();\n constructor() {}\n ngOnInit() {}\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ChipComponent } from \"./chip.component\";\n\n@NgModule({\n declarations: [ChipComponent],\n imports: [CommonModule],\n exports: [ChipComponent]\n})\nexport class ChipModule {\n static forRoot(): ModuleWithProviders<ChipModule> {\n return { ngModule: ChipModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAUE,EAA6E,CAAA,SAAA,CAAA,CAAA,EAAA,KAAA,EAAA,CAAA,CAAA,CAAA;;;IAAlC,EAAe,CAAA,UAAA,CAAA,KAAA,EAAA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CAAC;KAChD;2GAHU,UAAU,GAAA,CAAA,EAAA,CAAA,EAAA;mEAAV,UAAU,EAAA,CAAA,CAAA,EAAA;uEAHX,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAGX,UAAU,EAAA,CAAA;cALtB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;gBACR,YAAY,EAAE,CAAC,aAAa,CAAC;gBAC7B,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,CAAC,aAAa,CAAC;AACzB,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,UAAU,EAJN,EAAA,YAAA,EAAA,CAAA,aAAa,CAClB,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACPzB;;AAEG;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-chip.mjs","sources":["../../../projects/mis-components/chip/chip.component.html","../../../projects/mis-components/chip/chip.component.ts","../../../projects/mis-components/chip/chip.module.ts","../../../projects/mis-components/chip/mis-crystal-design-system-chip.ts"],"sourcesContent":["<div\n id=\"chip-container\"\n tabindex=\"0\"\n [ngClass]=\"{\n small: size() === 'Small',\n medium: size() === 'Medium',\n 'small-m': size() === 'Small-M',\n 'medium-m': size() === 'Medium-M'\n }\"\n>\n <img *ngIf=\"iconUrl() && iconUrl().length > 0\" [src]=\"iconUrl()\" alt=\"chip icon\" />\n <span tabindex=\"0\">{{ label() }}</span>\n <div *ngIf=\"count() != null || count() != undefined\" id=\"count-container\">\n <div id=\"separator\"></div>\n <span id=\"count-text\">{{ count() }}</span>\n </div>\n <span *ngIf=\"dismissible()\" tabindex=\"0\" id=\"close-icon\" aria-label=\"remove chip\" (keyup.enter)=\"cancel.emit(value())\" (click)=\"cancel.emit(value())\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.49931 4.25725C5.15643 3.91437 4.60052 3.91437 4.25765 4.25725C3.91477 4.60012 3.91477 5.15604 4.25765 5.49891L6.75868 7.99994L4.25827 10.5004C3.91539 10.8432 3.91539 11.3991 4.25827 11.742C4.60114 12.0849 5.15706 12.0849 5.49993 11.742L8.00034 9.24161L10.5007 11.742C10.8436 12.0849 11.3995 12.0849 11.7424 11.742C12.0853 11.3991 12.0853 10.8432 11.7424 10.5003L9.24201 7.99995L11.743 5.49893C12.0859 5.15606 12.0859 4.60014 11.743 4.25727C11.4001 3.91439 10.8442 3.91439 10.5014 4.25727L8.00034 6.75828L5.49931 4.25725Z\"\n fill=\"#181F33\"\n />\n </svg>\n </span>\n</div>\n","import { Component, Output, EventEmitter, ChangeDetectionStrategy, input } from \"@angular/core\";\n\n@Component({\n selector: \"mis-chip\",\n templateUrl: \"chip.component.html\",\n styleUrls: [\"chip.component.scss\"],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ChipComponent {\n label = input<string>(\"\");\n value = input<any>(\"\");\n size = input<\"Small\" | \"Medium\" | \"Small-M\" | \"Medium-M\">(\"Medium\");\n iconUrl = input<string | null>(null);\n count = input<number | null | undefined>(null);\n dismissible = input<boolean>(false);\n\n @Output() cancel = new EventEmitter<any>();\n}\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ChipComponent } from \"./chip.component\";\n\n@NgModule({\n declarations: [ChipComponent],\n imports: [CommonModule],\n exports: [ChipComponent]\n})\nexport class ChipModule {\n static forRoot(): ModuleWithProviders<ChipModule> {\n return { ngModule: ChipModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAUE,EAAmF,CAAA,SAAA,CAAA,CAAA,EAAA,KAAA,EAAA,CAAA,CAAA,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