mis-crystal-design-system 18.0.16 → 18.0.17-test-2

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.
@@ -1,126 +1,47 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, forwardRef, Component, Input, Output, NgModule } from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
- import { AbstractControl, UntypedFormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
4
+ import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
5
5
  import { CommonModule } from '@angular/common';
6
6
 
7
7
  class RadioButtonComponent {
8
- set disabled(value) {
9
- if (this._disabled !== value) {
10
- this._disabled = value;
11
- if (this._formControl && this._formControl.disabled !== value) {
12
- if (value) {
13
- this._formControl.disable({ emitEvent: false });
14
- }
15
- else {
16
- this._formControl.enable({ emitEvent: false });
17
- }
18
- }
19
- }
20
- }
21
- get disabled() {
22
- return this._formControl ? this._formControl.disabled : this._disabled;
23
- }
24
- set formControl(control) {
25
- if (control instanceof AbstractControl) {
26
- this._formControl = control;
27
- if (control.value !== null && control.value !== undefined) {
28
- this._value = control.value;
29
- }
30
- if (this._disabled !== undefined && this._disabled !== control.disabled) {
31
- if (this._disabled) {
32
- control.disable({ emitEvent: false });
33
- }
34
- else {
35
- control.enable({ emitEvent: false });
36
- }
37
- }
38
- }
39
- else {
40
- this._formControl = new UntypedFormControl(control);
41
- }
42
- }
43
- get formControl() {
44
- return this._formControl;
45
- }
46
8
  constructor() {
9
+ /** When multiple radio input fields are used
10
+ * an "id" can be given to keep track of them */
47
11
  this.id = "";
12
+ /** Name of the attribute for which the radio
13
+ * selection is provided */
48
14
  this.name = "";
15
+ /** Value of the attribute which is to be emitted
16
+ * when selected */
49
17
  this.value = "";
50
- this._formControl = new UntypedFormControl(null);
18
+ /** Controls the state of the radio button */
19
+ this.disabled = false;
20
+ /** Can be used to attach the radio input field
21
+ * to a reactive form by passing in a
22
+ * “FormControl“ Object. It can also be
23
+ * used to set the default attribute value */
24
+ this.formControl = new UntypedFormControl(null);
25
+ /** Emits "value" of the radio button on selection */
51
26
  this.valueChange = new EventEmitter();
52
- // ControlValueAccessor properties
53
- this._value = null;
54
- this._disabled = false;
55
- this.onChange = (value) => { };
56
- this.onTouched = () => { };
57
27
  }
58
28
  ngOnInit() { }
59
- // ControlValueAccessor implementation
60
- writeValue(value) {
61
- if (this._value !== value) {
62
- this._value = value;
63
- }
64
- }
65
- registerOnChange(fn) {
66
- this.onChange = fn;
67
- }
68
- registerOnTouched(fn) {
69
- this.onTouched = fn;
70
- }
71
- setDisabledState(isDisabled) {
72
- if (this._disabled !== isDisabled) {
73
- this._disabled = isDisabled;
74
- }
75
- }
76
- // Legacy onChange method - maintains backward compatibility
77
- onInputChange(event) {
78
- const newValue = event.target.checked ? this.value : this._value;
79
- if (this._value !== newValue) {
80
- this._value = newValue;
81
- this.onChange(newValue);
82
- this.onTouched();
83
- if (this._formControl && this._formControl.value !== newValue) {
84
- this._formControl.setValue(newValue, { emitEvent: false });
85
- }
86
- this.valueChange.emit(newValue);
87
- }
88
- }
89
- get currentValue() {
90
- return this._formControl ? this._formControl.value : this._value;
91
- }
92
- markAsTouched() {
93
- this.onTouched();
94
- if (this._formControl) {
95
- this._formControl.markAsTouched();
96
- this._formControl.updateValueAndValidity();
97
- }
29
+ onChange(event) {
30
+ this.valueChange.emit(this.formControl.value);
98
31
  }
99
32
  static { this.ɵfac = function RadioButtonComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RadioButtonComponent)(); }; }
100
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioButtonComponent, selectors: [["mis-radio"]], inputs: { id: "id", name: "name", value: "value", disabled: "disabled", formControl: "formControl" }, outputs: { valueChange: "valueChange" }, features: [i0.ɵɵProvidersFeature([
101
- {
102
- provide: NG_VALUE_ACCESSOR,
103
- useExisting: forwardRef(() => RadioButtonComponent),
104
- multi: true
105
- }
106
- ])], decls: 1, vars: 5, consts: [["tabindex", "-1", "type", "radio", 3, "change", "keyup.enter", "blur", "id", "name", "value", "formControl", "checked"]], template: function RadioButtonComponent_Template(rf, ctx) { if (rf & 1) {
33
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioButtonComponent, selectors: [["mis-radio"]], inputs: { id: "id", name: "name", value: "value", disabled: "disabled", formControl: "formControl" }, outputs: { valueChange: "valueChange" }, decls: 1, vars: 5, consts: [["tabindex", "-1", "type", "radio", 3, "change", "keup.enter", "id", "name", "disabled", "value", "formControl"]], template: function RadioButtonComponent_Template(rf, ctx) { if (rf & 1) {
107
34
  i0.ɵɵelementStart(0, "input", 0);
108
- i0.ɵɵlistener("change", function RadioButtonComponent_Template_input_change_0_listener($event) { return ctx.onInputChange($event); })("keyup.enter", function RadioButtonComponent_Template_input_keyup_enter_0_listener($event) { return ctx.onInputChange($event); })("blur", function RadioButtonComponent_Template_input_blur_0_listener() { return ctx.markAsTouched(); });
35
+ i0.ɵɵlistener("change", function RadioButtonComponent_Template_input_change_0_listener($event) { return ctx.onChange($event); })("keup.enter", function RadioButtonComponent_Template_input_keup_enter_0_listener($event) { return ctx.onChange($event); });
109
36
  i0.ɵɵelementEnd();
110
37
  } if (rf & 2) {
111
38
  i0.ɵɵpropertyInterpolate("id", ctx.id);
112
- i0.ɵɵproperty("name", ctx.name)("value", ctx.value)("formControl", ctx.formControl)("checked", ctx.currentValue === ctx.value);
39
+ i0.ɵɵproperty("name", ctx.name)("disabled", ctx.disabled)("value", ctx.value)("formControl", ctx.formControl);
113
40
  } }, dependencies: [i1.DefaultValueAccessor, i1.RadioControlValueAccessor, i1.NgControlStatus, i1.FormControlDirective], styles: ["input[type=radio][_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:20px;height:20px;margin:0;padding:3px;background-clip:content-box;border:2px solid #6a737d;background-color:#fff;border-radius:50%;cursor:pointer}input[type=radio][_ngcontent-%COMP%]:checked{background-color:#0937b2;border:2px solid #0937b2}input[type=radio][_ngcontent-%COMP%]:hover{border:2px solid #929dab}input[type=radio][_ngcontent-%COMP%]:checked:hover{border:2px solid #0937b2}input[type=radio][_ngcontent-%COMP%]:disabled{border:2px solid #c8cdd3}input[type=radio][_ngcontent-%COMP%]:checked:disabled{border:2px solid #c8cdd3;background-color:#c8cdd3}"] }); }
114
41
  }
115
42
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadioButtonComponent, [{
116
43
  type: Component,
117
- args: [{ selector: "mis-radio", providers: [
118
- {
119
- provide: NG_VALUE_ACCESSOR,
120
- useExisting: forwardRef(() => RadioButtonComponent),
121
- multi: true
122
- }
123
- ], template: "<input \n (change)=\"onInputChange($event)\" \n (keyup.enter)=\"onInputChange($event)\"\n (blur)=\"markAsTouched()\"\n tabindex=\"-1\"\n id=\"{{ id }}\" type=\"radio\" \n [name]=\"name\"\n [value]=\"value\"\n [formControl]=\"formControl\" \n [checked]=\"currentValue === value\"\n/>", styles: ["input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:20px;height:20px;margin:0;padding:3px;background-clip:content-box;border:2px solid #6a737d;background-color:#fff;border-radius:50%;cursor:pointer}input[type=radio]:checked{background-color:#0937b2;border:2px solid #0937b2}input[type=radio]:hover{border:2px solid #929dab}input[type=radio]:checked:hover{border:2px solid #0937b2}input[type=radio]:disabled{border:2px solid #c8cdd3}input[type=radio]:checked:disabled{border:2px solid #c8cdd3;background-color:#c8cdd3}\n"] }]
44
+ args: [{ selector: "mis-radio", template: "<input \n (change)=\"onChange($event)\" \n (keup.enter)=\"onChange($event)\"\n tabindex=\"-1\"\n id=\"{{ id }}\" type=\"radio\" \n [name]=\"name\" [disabled]=\"disabled\" \n [value]=\"value\"\n [formControl]=\"formControl\" \n/>\n", styles: ["input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:20px;height:20px;margin:0;padding:3px;background-clip:content-box;border:2px solid #6a737d;background-color:#fff;border-radius:50%;cursor:pointer}input[type=radio]:checked{background-color:#0937b2;border:2px solid #0937b2}input[type=radio]:hover{border:2px solid #929dab}input[type=radio]:checked:hover{border:2px solid #0937b2}input[type=radio]:disabled{border:2px solid #c8cdd3}input[type=radio]:checked:disabled{border:2px solid #c8cdd3;background-color:#c8cdd3}\n"] }]
124
45
  }], () => [], { id: [{
125
46
  type: Input
126
47
  }], name: [{
@@ -1 +1 @@
1
- {"version":3,"file":"mis-crystal-design-system-radio-button.mjs","sources":["../../../projects/mis-components/radio-button/radio-button.component.ts","../../../projects/mis-components/radio-button/radio-button.component.html","../../../projects/mis-components/radio-button/radio-button.module.ts","../../../projects/mis-components/radio-button/mis-crystal-design-system-radio-button.ts"],"sourcesContent":["import { Component, Input, OnInit, Output, EventEmitter, forwardRef } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl, ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n@Component({\n selector: \"mis-radio\",\n templateUrl: \"./radio-button.component.html\",\n styleUrls: [\"./radio-button.component.scss\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioButtonComponent),\n multi: true\n }\n ]\n})\nexport class RadioButtonComponent implements OnInit, ControlValueAccessor {\n @Input() id: string | number = \"\";\n @Input() name: string | number = \"\";\n @Input() value: string | number = \"\";\n \n @Input() set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this._formControl && this._formControl.disabled !== value) {\n if (value) {\n this._formControl.disable({ emitEvent: false });\n } else {\n this._formControl.enable({ emitEvent: false });\n }\n }\n }\n }\n get disabled(): boolean {\n return this._formControl ? this._formControl.disabled : this._disabled;\n }\n\n @Input() set formControl(control: AbstractControl | null) {\n if (control instanceof AbstractControl) {\n this._formControl = control;\n if (control.value !== null && control.value !== undefined) {\n this._value = control.value;\n }\n if (this._disabled !== undefined && this._disabled !== control.disabled) {\n if (this._disabled) {\n control.disable({ emitEvent: false });\n } else {\n control.enable({ emitEvent: false });\n }\n }\n } else {\n this._formControl = new UntypedFormControl(control);\n }\n }\n get formControl(): AbstractControl {\n return this._formControl;\n }\n private _formControl: AbstractControl = new UntypedFormControl(null);\n\n @Output() valueChange = new EventEmitter<any>();\n\n // ControlValueAccessor properties\n private _value: any = null;\n private _disabled: boolean = false;\n private onChange = (value: any) => {};\n public onTouched = () => {};\n\n constructor() {}\n \n ngOnInit() {}\n\n // ControlValueAccessor implementation\n writeValue(value: any): void {\n if (this._value !== value) {\n this._value = value;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (this._disabled !== isDisabled) {\n this._disabled = isDisabled;\n }\n }\n\n // Legacy onChange method - maintains backward compatibility\n onInputChange(event: any) {\n const newValue = event.target.checked ? this.value : this._value;\n \n if (this._value !== newValue) {\n this._value = newValue;\n \n this.onChange(newValue);\n this.onTouched();\n \n if (this._formControl && this._formControl.value !== newValue) {\n this._formControl.setValue(newValue, { emitEvent: false });\n }\n \n this.valueChange.emit(newValue);\n }\n }\n\n get currentValue(): any {\n return this._formControl ? this._formControl.value : this._value;\n }\n\n public markAsTouched(): void {\n this.onTouched();\n if (this._formControl) {\n this._formControl.markAsTouched();\n this._formControl.updateValueAndValidity();\n }\n }\n}","<input \n (change)=\"onInputChange($event)\" \n (keyup.enter)=\"onInputChange($event)\"\n (blur)=\"markAsTouched()\"\n tabindex=\"-1\"\n id=\"{{ id }}\" type=\"radio\" \n [name]=\"name\"\n [value]=\"value\"\n [formControl]=\"formControl\" \n [checked]=\"currentValue === value\"\n/>","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { RadioButtonComponent } from \"./radio-button.component\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [RadioButtonComponent]\n})\nexport class RadioButtonModule {\n static forRoot(): ModuleWithProviders<RadioButtonModule> {\n return { ngModule: RadioButtonModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAea,oBAAoB,CAAA;IAK/B,IAAa,QAAQ,CAAC,KAAc,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;AAC5B,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;AACvB,YAAA,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,KAAK,KAAK,EAAE;gBAC7D,IAAI,KAAK,EAAE;oBACT,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;iBACjD;qBAAM;oBACL,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;iBAChD;aACF;SACF;KACF;AACD,IAAA,IAAI,QAAQ,GAAA;AACV,QAAA,OAAO,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;KACxE;IAED,IAAa,WAAW,CAAC,OAA+B,EAAA;AACtD,QAAA,IAAI,OAAO,YAAY,eAAe,EAAE;AACtC,YAAA,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;AAC5B,YAAA,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE;AACzD,gBAAA,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;aAC7B;AACD,YAAA,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,QAAQ,EAAE;AACvE,gB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EAAA,CAAA,CAAA,EAAA;;iFAGhC,iBAAiB,EAAA,CAAA;cAL7B,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;gBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,gBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;gBAC5C,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,iBAAiB,mBAJb,oBAAoB,CAAA,EAAA,OAAA,EAAA,CACzB,YAAY,EAAE,mBAAmB,aACjC,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACThC;;AAEG;;;;"}
1
+ {"version":3,"file":"mis-crystal-design-system-radio-button.mjs","sources":["../../../projects/mis-components/radio-button/radio-button.component.ts","../../../projects/mis-components/radio-button/radio-button.component.html","../../../projects/mis-components/radio-button/radio-button.module.ts","../../../projects/mis-components/radio-button/mis-crystal-design-system-radio-button.ts"],"sourcesContent":["import { Component, Input, OnInit, Output, EventEmitter } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl } from \"@angular/forms\";\n\n@Component({\n selector: \"mis-radio\",\n templateUrl: \"./radio-button.component.html\",\n styleUrls: [\"./radio-button.component.scss\"]\n})\nexport class RadioButtonComponent implements OnInit {\n /** When multiple radio input fields are used\n * an \"id\" can be given to keep track of them */\n @Input() id: string | number = \"\";\n /** Name of the attribute for which the radio\n * selection is provided */\n @Input() name: string | number = \"\";\n /** Value of the attribute which is to be emitted\n * when selected */\n @Input() value: string | number = \"\";\n /** Controls the state of the radio button */\n @Input() disabled: boolean = false;\n\n /** Can be used to attach the radio input field\n * to a reactive form by passing in a\n * “FormControl“ Object. It can also be\n * used to set the default attribute value */\n @Input() formControl: AbstractControl = new UntypedFormControl(null);\n\n /** Emits \"value\" of the radio button on selection */\n @Output() valueChange = new EventEmitter<any>();\n\n constructor() {}\n ngOnInit() {}\n onChange(event) {\n this.valueChange.emit(this.formControl.value);\n }\n}\n","<input \n (change)=\"onChange($event)\" \n (keup.enter)=\"onChange($event)\"\n tabindex=\"-1\"\n id=\"{{ id }}\" type=\"radio\" \n [name]=\"name\" [disabled]=\"disabled\" \n [value]=\"value\"\n [formControl]=\"formControl\" \n/>\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { RadioButtonComponent } from \"./radio-button.component\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [CommonModule, ReactiveFormsModule],\n exports: [RadioButtonComponent]\n})\nexport class RadioButtonModule {\n static forRoot(): ModuleWithProviders<RadioButtonModule> {\n return { ngModule: RadioButtonModule, providers: [] };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,oBAAoB,CAAA;AAsB/B,IAAA,WAAA,GAAA;AArBA;AACgD;QACvC,IAAE,CAAA,EAAA,GAAoB,EAAE,CAAC;AAClC;AAC2B;QAClB,IAAI,CAAA,IAAA,GAAoB,EAAE,CAAC;AACpC;AACmB;QACV,IAAK,CAAA,KAAA,GAAoB,EAAE,CAAC;;QAE5B,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAEnC;;;AAG6C;AACpC,QAAA,IAAA,CAAA,WAAW,GAAoB,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;;AAG3D,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAO,CAAC;KAEhC;AAChB,IAAA,QAAQ,MAAK;AACb,IAAA,QAAQ,CAAC,KAAK,EAAA;QACZ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KAC/C;qHA1BU,oBAAoB,GAAA,CAAA,EAAA,CAAA,EAAA;oEAApB,oBAAoB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ActionsCellComponent {
1360
1360
  this.containerStyle = {};
1361
1361
  }
1362
1362
  set rowData(value) {
1363
- this.data = value?.rowData ?? {};
1364
- this.isChecked = value?.isChecked ?? false;
1363
+ if (this.actionType === 'checkbox') {
1364
+ // For checkbox, keep the rowData structure
1365
+ this.data = value?.rowData ?? {};
1366
+ this.isChecked = value?.isChecked ?? false;
1367
+ }
1368
+ else {
1369
+ // For other actions (dropdown, inline), use the value directly
1370
+ this.data = value;
1371
+ this.isChecked = false;
1372
+ }
1365
1373
  }
1366
1374
  set config(config) {
1367
1375
  this.actionItems = config?.actionItems,