@smilodon/core 1.1.2 → 1.1.5
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 +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +10 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/components/angular-enhanced-select.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -2508,6 +2508,7 @@
|
|
|
2508
2508
|
this._hasError = false;
|
|
2509
2509
|
this._errorMessage = '';
|
|
2510
2510
|
this._boundArrowClick = null;
|
|
2511
|
+
this._isReady = false;
|
|
2511
2512
|
// Unique class prefix to avoid conflicts
|
|
2512
2513
|
this.PREFIX = 'smilodon-ang-';
|
|
2513
2514
|
this._uniqueId = `angular-select-${Math.random().toString(36).substr(2, 9)}`;
|
|
@@ -2557,6 +2558,8 @@
|
|
|
2557
2558
|
if (this._config.serverSide.enabled && this._config.serverSide.initialSelectedValues) {
|
|
2558
2559
|
this._loadInitialSelectedItems();
|
|
2559
2560
|
}
|
|
2561
|
+
// Mark element as ready
|
|
2562
|
+
this._isReady = true;
|
|
2560
2563
|
}
|
|
2561
2564
|
disconnectedCallback() {
|
|
2562
2565
|
// Cleanup observers
|
|
@@ -2581,7 +2584,8 @@
|
|
|
2581
2584
|
// Check if styles already exist for this component type
|
|
2582
2585
|
const existingStyle = document.head.querySelector('style[data-component="angular-enhanced-select-shared"]');
|
|
2583
2586
|
if (existingStyle) {
|
|
2584
|
-
// Styles already injected,
|
|
2587
|
+
// Styles already injected, reuse the existing one
|
|
2588
|
+
this._styleElement = existingStyle;
|
|
2585
2589
|
return;
|
|
2586
2590
|
}
|
|
2587
2591
|
// Create scoped styles for this component type (shared across all instances)
|
|
@@ -2902,8 +2906,8 @@
|
|
|
2902
2906
|
min-height: 44px;
|
|
2903
2907
|
}
|
|
2904
2908
|
`;
|
|
2905
|
-
// Safely append to document head (check if document is ready)
|
|
2906
|
-
if (document.head) {
|
|
2909
|
+
// Safely append to document head (check if document is ready and not already appended)
|
|
2910
|
+
if (document.head && !this._styleElement.parentNode) {
|
|
2907
2911
|
try {
|
|
2908
2912
|
document.head.appendChild(this._styleElement);
|
|
2909
2913
|
}
|
|
@@ -3326,6 +3330,9 @@
|
|
|
3326
3330
|
}
|
|
3327
3331
|
}
|
|
3328
3332
|
// Public API methods
|
|
3333
|
+
isReady() {
|
|
3334
|
+
return this._isReady;
|
|
3335
|
+
}
|
|
3329
3336
|
setItems(items) {
|
|
3330
3337
|
this._state.loadedItems = items;
|
|
3331
3338
|
this._renderOptions();
|