@smilodon/core 1.0.13 → 1.0.15

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/dist/index.cjs CHANGED
@@ -962,11 +962,6 @@ class EnhancedSelect extends HTMLElement {
962
962
  this._errorMessage = '';
963
963
  this._boundArrowClick = null;
964
964
  console.log('[EnhancedSelect] Constructor called');
965
- // WORKAROUND: Force display style on host element for Angular compatibility
966
- // Angular's rendering seems to not apply :host styles correctly in some cases
967
- this.style.display = 'block';
968
- this.style.width = '100%';
969
- console.log('[EnhancedSelect] Forced host display styles');
970
965
  this._shadow = this.attachShadow({ mode: 'open' });
971
966
  console.log('[EnhancedSelect] Shadow root attached:', this._shadow);
972
967
  this._uniqueId = `enhanced-select-${Math.random().toString(36).substr(2, 9)}`;
@@ -1008,10 +1003,11 @@ class EnhancedSelect extends HTMLElement {
1008
1003
  console.log('[EnhancedSelect] Options container created');
1009
1004
  this._liveRegion = this._createLiveRegion();
1010
1005
  console.log('[EnhancedSelect] Live region created');
1011
- this._assembleDOM();
1012
- console.log('[EnhancedSelect] DOM assembled');
1006
+ // Initialize styles BEFORE assembling DOM (order matters in shadow DOM)
1013
1007
  this._initializeStyles();
1014
1008
  console.log('[EnhancedSelect] Styles initialized');
1009
+ this._assembleDOM();
1010
+ console.log('[EnhancedSelect] DOM assembled');
1015
1011
  this._attachEventListeners();
1016
1012
  console.log('[EnhancedSelect] Event listeners attached');
1017
1013
  this._initializeObservers();
@@ -1020,6 +1016,12 @@ class EnhancedSelect extends HTMLElement {
1020
1016
  }
1021
1017
  connectedCallback() {
1022
1018
  console.log('[EnhancedSelect] connectedCallback called');
1019
+ // WORKAROUND: Force display style on host element for Angular compatibility
1020
+ // Angular's rendering seems to not apply :host styles correctly in some cases
1021
+ // Must be done in connectedCallback when element is attached to DOM
1022
+ this.style.display = 'block';
1023
+ this.style.width = '100%';
1024
+ console.log('[EnhancedSelect] Forced host display styles');
1023
1025
  // Load initial data if server-side is enabled
1024
1026
  if (this._config.serverSide.enabled && this._config.serverSide.initialSelectedValues) {
1025
1027
  this._loadInitialSelectedItems();