@synergy-design-system/mcp 1.17.1 → 1.17.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@synergy-design-system/mcp-v1.17.2](https://github.com/synergy-design-system/synergy-design-system/compare/mcp/1.17.1...mcp/1.17.2) (2025-11-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 🐛 Async delimiter change for pre-selected value in syn-select not displayed ([#1061](https://github.com/synergy-design-system/synergy-design-system/issues/1061)) ([5f6d361](https://github.com/synergy-design-system/synergy-design-system/commit/5f6d36102b669cc34aa44cded47ef49559e74529))
7
+
1
8
  # [@synergy-design-system/mcp-v1.17.1](https://github.com/synergy-design-system/synergy-design-system/compare/mcp/1.17.0...mcp/1.17.1) (2025-11-03)
2
9
 
3
10
 
@@ -1 +1 @@
1
- 555eddeb31ec5af0c88a3022cec753e1
1
+ b6a28465b034f20e1e23da6403fb79e2
@@ -77,18 +77,7 @@ export default class SynOption extends SynergyElement {
77
77
  private handleDefaultSlotChange() {
78
78
  if (this.isInitialized) {
79
79
  // When the label changes, tell the controller to update
80
- customElements.whenDefined('syn-combobox').then(() => {
81
- const controller = this.closest('syn-combobox');
82
- if (controller) {
83
- controller.handleDefaultSlotChange();
84
- }
85
- });
86
- customElements.whenDefined('syn-select').then(() => {
87
- const controller = this.closest('syn-select');
88
- if (controller) {
89
- controller.handleDefaultSlotChange();
90
- }
91
- });
80
+ this.triggerParentDefaultSlotChange();
92
81
  } else {
93
82
  this.isInitialized = true;
94
83
  }
@@ -145,6 +134,8 @@ export default class SynOption extends SynergyElement {
145
134
  value = delimiterToWhiteSpace(value, this.delimiter);
146
135
  }
147
136
  this.value = value;
137
+ // #1056 We need to trigger the parent component's default slot change, so it can update its value selection
138
+ this.triggerParentDefaultSlotChange();
148
139
  }
149
140
 
150
141
  /** Returns a plain text label based on the option's content. */
@@ -167,6 +158,21 @@ export default class SynOption extends SynergyElement {
167
158
  return label.trim();
168
159
  }
169
160
 
161
+ private triggerParentDefaultSlotChange() {
162
+ customElements.whenDefined('syn-combobox').then(() => {
163
+ const controller = this.closest('syn-combobox');
164
+ if (controller) {
165
+ controller.handleDefaultSlotChange();
166
+ }
167
+ });
168
+ customElements.whenDefined('syn-select').then(() => {
169
+ const controller = this.closest('syn-select');
170
+ if (controller) {
171
+ controller.handleDefaultSlotChange();
172
+ }
173
+ });
174
+ }
175
+
170
176
  render() {
171
177
  return html`
172
178
  <div
@@ -96,11 +96,11 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
96
96
  });
97
97
  private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');
98
98
  private readonly localize = new LocalizeController(this);
99
- private isInitialized: boolean = false;
100
99
  private typeToSelectString = '';
101
100
  private typeToSelectTimeout: number;
102
101
  private closeWatcher: CloseWatcher | null;
103
102
  private resizeObserver: ResizeObserver;
103
+ private isUserInput: boolean = false;
104
104
 
105
105
  @query('.select') popup: SynPopup;
106
106
  @query('.select__combobox') combobox: HTMLSlotElement;
@@ -366,6 +366,7 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
366
366
  // If it is open, update the value based on the current selection and close it
367
367
  if (this.currentOption && !this.currentOption.disabled) {
368
368
  this.valueHasChanged = true;
369
+ this.isUserInput = true;
369
370
  if (this.multiple) {
370
371
  this.toggleOptionSelection(this.currentOption);
371
372
  } else {
@@ -529,6 +530,7 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
529
530
 
530
531
  if (option && !option.disabled) {
531
532
  this.valueHasChanged = true;
533
+ this.isUserInput = true;
532
534
  if (this.multiple) {
533
535
  this.toggleOptionSelection(option);
534
536
  } else {
@@ -681,6 +683,7 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
681
683
 
682
684
  // Update validity
683
685
  this.updateComplete.then(() => {
686
+ this.isUserInput = false;
684
687
  this.formControlController.updateValidity();
685
688
  });
686
689
  }
@@ -722,10 +725,6 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
722
725
  }
723
726
  }
724
727
 
725
- firstUpdated() {
726
- this.isInitialized = true;
727
- }
728
-
729
728
 
730
729
  protected updated(changedProperties: PropertyValues<this>) {
731
730
  super.updated(changedProperties);
@@ -742,9 +741,11 @@ export default class SynSelect extends SynergyElement implements SynergyFormCont
742
741
  protected override willUpdate(changedProperties: PropertyValues) {
743
742
  super.willUpdate(changedProperties);
744
743
 
745
- if(!this.isInitialized && !this.defaultValue && this.value) {
746
- // If the value was set initially via property binding instead of attribute, we need to set the defaultValue manually
747
- // to be able to reset forms and the dynamic loading of options are working correctly.
744
+ if(changedProperties.has('value') && !this.defaultValue && this.value && !this.isUserInput) {
745
+ // Values set by property binding (e.g. Angular, especially with async bindings such as Observables/BehaviorSubjects)
746
+ // have led to some malfunctions (e.g. form reset not working, dynamic reloading of options, etc.). To fix this,
747
+ // the defaultValue must be set via property binding. However, this must NOT happen during user input,
748
+ // as otherwise user interaction will lead to a new defaultValue.
748
749
  this.defaultValue = this.value
749
750
  this.valueHasChanged = false;
750
751
  }
@@ -1,3 +1,10 @@
1
+ # [@synergy-design-system/components-v2.56.2](https://github.com/synergy-design-system/synergy-design-system/compare/components/2.56.1...components/2.56.2) (2025-11-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 🐛 Async delimiter change for pre-selected value in syn-select not displayed ([#1061](https://github.com/synergy-design-system/synergy-design-system/issues/1061)) ([5f6d361](https://github.com/synergy-design-system/synergy-design-system/commit/5f6d36102b669cc34aa44cded47ef49559e74529))
7
+
1
8
  # [@synergy-design-system/components-v2.56.1](https://github.com/synergy-design-system/synergy-design-system/compare/components/2.56.0...components/2.56.1) (2025-11-03)
2
9
 
3
10
 
package/package.json CHANGED
@@ -33,11 +33,11 @@
33
33
  "serve-handler": "^6.1.6",
34
34
  "ts-jest": "^29.4.4",
35
35
  "typescript": "^5.9.3",
36
- "@synergy-design-system/components": "2.56.1",
36
+ "@synergy-design-system/components": "2.56.2",
37
37
  "@synergy-design-system/docs": "0.1.0",
38
+ "@synergy-design-system/eslint-config-syn": "^0.1.0",
38
39
  "@synergy-design-system/styles": "1.8.1",
39
- "@synergy-design-system/tokens": "^2.37.0",
40
- "@synergy-design-system/eslint-config-syn": "^0.1.0"
40
+ "@synergy-design-system/tokens": "^2.37.0"
41
41
  },
42
42
  "exports": {
43
43
  ".": {
@@ -122,7 +122,7 @@
122
122
  "directory": "packages/mcp"
123
123
  },
124
124
  "type": "module",
125
- "version": "1.17.1",
125
+ "version": "1.17.2",
126
126
  "scripts": {
127
127
  "build": "pnpm run build:ts && pnpm run build:metadata && pnpm build:hash",
128
128
  "build:all": "pnpm run build && pnpm run build:storybook",