@smilodon/core 1.3.9 → 1.3.11
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/README.md +7 -0
- package/dist/index.cjs +1912 -1605
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1912 -1605
- 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 +1913 -1606
- 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/enhanced-select.d.ts +18 -2
- package/dist/types/src/components/select-option.d.ts +2 -0
- package/dist/types/tests/enhanced-option-renderer.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/components/angular-enhanced-select.d.ts +0 -90
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { GlobalSelectConfig } from '../config/global-config';
|
|
7
7
|
import type { GroupedItem } from '../types';
|
|
8
|
+
import type { OptionRenderer as OptionRendererFn } from '../renderers/contracts';
|
|
8
9
|
export declare class EnhancedSelect extends HTMLElement {
|
|
9
10
|
private _config;
|
|
10
11
|
private _shadow;
|
|
@@ -29,6 +30,11 @@ export declare class EnhancedSelect extends HTMLElement {
|
|
|
29
30
|
private _errorMessage;
|
|
30
31
|
private _boundArrowClick;
|
|
31
32
|
private _arrowContainer?;
|
|
33
|
+
private _pendingFirstRenderMark;
|
|
34
|
+
private _pendingSearchRenderMark;
|
|
35
|
+
private _rangeAnchorIndex;
|
|
36
|
+
private _optionRenderer?;
|
|
37
|
+
private _rendererHelpers;
|
|
32
38
|
constructor();
|
|
33
39
|
connectedCallback(): void;
|
|
34
40
|
disconnectedCallback(): void;
|
|
@@ -48,12 +54,21 @@ export declare class EnhancedSelect extends HTMLElement {
|
|
|
48
54
|
private _handleClose;
|
|
49
55
|
private _updateDropdownVisibility;
|
|
50
56
|
private _updateArrowRotation;
|
|
57
|
+
private _isPerfEnabled;
|
|
58
|
+
private _perfMark;
|
|
59
|
+
private _perfMeasure;
|
|
60
|
+
private _markOpenStart;
|
|
61
|
+
private _finalizePerfMarks;
|
|
51
62
|
private _handleSearch;
|
|
52
63
|
private _handleKeydown;
|
|
53
64
|
private _moveActive;
|
|
54
65
|
private _setActive;
|
|
66
|
+
private _getOptionElementByIndex;
|
|
67
|
+
private _buildRendererHelpers;
|
|
55
68
|
private _handleTypeAhead;
|
|
56
69
|
private _selectAll;
|
|
70
|
+
private _selectRange;
|
|
71
|
+
private _setInitialActiveOption;
|
|
57
72
|
private _announce;
|
|
58
73
|
private _selectOption;
|
|
59
74
|
private _handleOptionRemove;
|
|
@@ -62,11 +77,11 @@ export declare class EnhancedSelect extends HTMLElement {
|
|
|
62
77
|
private _scrollToSelected;
|
|
63
78
|
private _loadMoreItems;
|
|
64
79
|
private _setBusy;
|
|
65
|
-
private _showBusyBucket;
|
|
66
|
-
private _hideBusyBucket;
|
|
67
80
|
private _handleError;
|
|
68
81
|
private _emit;
|
|
69
82
|
private _emitChange;
|
|
83
|
+
get optionRenderer(): OptionRendererFn | undefined;
|
|
84
|
+
set optionRenderer(renderer: OptionRendererFn | undefined);
|
|
70
85
|
/**
|
|
71
86
|
* Set items to display in the select
|
|
72
87
|
*/
|
|
@@ -132,5 +147,6 @@ export declare class EnhancedSelect extends HTMLElement {
|
|
|
132
147
|
*/
|
|
133
148
|
private _renderOptions;
|
|
134
149
|
private _renderSingleOption;
|
|
150
|
+
private _normalizeCustomOptionElement;
|
|
135
151
|
private _addLoadMoreTrigger;
|
|
136
152
|
}
|
|
@@ -7,6 +7,8 @@ export interface OptionConfig {
|
|
|
7
7
|
item: unknown;
|
|
8
8
|
/** The index of this option */
|
|
9
9
|
index: number;
|
|
10
|
+
/** Optional custom id for aria-activedescendant */
|
|
11
|
+
id?: string;
|
|
10
12
|
/** Whether this option is selected */
|
|
11
13
|
selected: boolean;
|
|
12
14
|
/** Whether this option is disabled */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Angular-Optimized Enhanced Select Component
|
|
3
|
-
*
|
|
4
|
-
* This is a specialized variant that uses light DOM instead of shadow DOM
|
|
5
|
-
* to ensure perfect compatibility with Angular's rendering pipeline and
|
|
6
|
-
* view encapsulation system.
|
|
7
|
-
*
|
|
8
|
-
* Key differences from standard EnhancedSelect:
|
|
9
|
-
* - Uses light DOM with scoped CSS classes
|
|
10
|
-
* - Integrates seamlessly with Angular's change detection
|
|
11
|
-
* - Maintains all core features (virtualization, accessibility, performance)
|
|
12
|
-
* - Uses unique class prefixes to avoid style conflicts
|
|
13
|
-
*
|
|
14
|
-
* @performance Optimized for Angular's zone.js and rendering cycle
|
|
15
|
-
* @accessibility Full WCAG 2.1 AAA compliance maintained
|
|
16
|
-
*/
|
|
17
|
-
import { GlobalSelectConfig } from '../config/global-config';
|
|
18
|
-
export interface SelectItem {
|
|
19
|
-
value: string | number;
|
|
20
|
-
label: string;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
group?: string;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Angular-Enhanced Select Web Component
|
|
27
|
-
* Uses light DOM for Angular compatibility
|
|
28
|
-
*/
|
|
29
|
-
export declare class AngularEnhancedSelect extends HTMLElement {
|
|
30
|
-
private _config;
|
|
31
|
-
private _container;
|
|
32
|
-
private _inputContainer;
|
|
33
|
-
private _input;
|
|
34
|
-
private _dropdown;
|
|
35
|
-
private _optionsContainer;
|
|
36
|
-
private _loadMoreTrigger?;
|
|
37
|
-
private _busyBucket?;
|
|
38
|
-
private _liveRegion?;
|
|
39
|
-
private _state;
|
|
40
|
-
private _pageCache;
|
|
41
|
-
private _resizeObserver?;
|
|
42
|
-
private _intersectionObserver?;
|
|
43
|
-
private _busyTimeout?;
|
|
44
|
-
private _searchTimeout?;
|
|
45
|
-
private _typeBuffer;
|
|
46
|
-
private _typeTimeout?;
|
|
47
|
-
private _uniqueId;
|
|
48
|
-
private _hasError;
|
|
49
|
-
private _errorMessage;
|
|
50
|
-
private _boundArrowClick;
|
|
51
|
-
private _arrowContainer?;
|
|
52
|
-
private _styleElement?;
|
|
53
|
-
private _isReady;
|
|
54
|
-
private readonly PREFIX;
|
|
55
|
-
constructor();
|
|
56
|
-
connectedCallback(): void;
|
|
57
|
-
disconnectedCallback(): void;
|
|
58
|
-
private _initializeStyles;
|
|
59
|
-
private _createContainer;
|
|
60
|
-
private _createInputContainer;
|
|
61
|
-
private _createInput;
|
|
62
|
-
private _createArrowContainer;
|
|
63
|
-
private _createDropdown;
|
|
64
|
-
private _createOptionsContainer;
|
|
65
|
-
private _createLiveRegion;
|
|
66
|
-
private _assembleDOM;
|
|
67
|
-
private _attachEventListeners;
|
|
68
|
-
private _initializeObservers;
|
|
69
|
-
private _updateDropdownVisibility;
|
|
70
|
-
private _updateDropdownPosition;
|
|
71
|
-
private _updateArrowRotation;
|
|
72
|
-
private _handleKeydown;
|
|
73
|
-
private _moveActive;
|
|
74
|
-
private _selectByIndex;
|
|
75
|
-
private _updateInputDisplay;
|
|
76
|
-
private _renderOptions;
|
|
77
|
-
private _handleSearch;
|
|
78
|
-
private _emitChangeEvent;
|
|
79
|
-
private _scrollToSelected;
|
|
80
|
-
private _loadInitialSelectedItems;
|
|
81
|
-
private _announce;
|
|
82
|
-
isReady(): boolean;
|
|
83
|
-
setItems(items: SelectItem[]): void;
|
|
84
|
-
setGroupedItems(groups: any[]): void;
|
|
85
|
-
setSelectedValues(values: (string | number)[]): void;
|
|
86
|
-
getSelectedValues(): (string | number)[];
|
|
87
|
-
updateConfig(config: Partial<GlobalSelectConfig>): void;
|
|
88
|
-
setError(message: string): void;
|
|
89
|
-
clearError(): void;
|
|
90
|
-
}
|