@anglr/select 16.1.0 → 17.0.0-beta.20260702112309
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 +37 -0
- package/es2022/src/components/option/option.component.js +13 -8
- package/es2022/src/components/option/option.component.js.map +1 -1
- package/es2022/src/components/optionGroup/optgroup.component.js +6 -5
- package/es2022/src/components/optionGroup/optgroup.component.js.map +1 -1
- package/es2022/src/components/select/select.component.js +33 -21
- package/es2022/src/components/select/select.component.js.map +1 -1
- package/es2022/src/directives/highlightInstance/highlightInstance.directive.js +80 -0
- package/es2022/src/directives/highlightInstance/highlightInstance.directive.js.map +1 -0
- package/es2022/src/directives/highlightSearch/highlightSearch.directive.js +114 -0
- package/es2022/src/directives/highlightSearch/highlightSearch.directive.js.map +1 -0
- package/es2022/src/directives/highlightText/highlightText.directive.js +63 -0
- package/es2022/src/directives/highlightText/highlightText.directive.js.map +1 -0
- package/es2022/src/directives/index.js +3 -0
- package/es2022/src/directives/index.js.map +1 -1
- package/es2022/src/directives/normalStateTagTemplate/normalStateTagTemplate.directive.js +3 -3
- package/es2022/src/directives/normalStateTemplate/normalStateTemplate.directive.js +3 -3
- package/es2022/src/directives/optionGroupTemplate/optionGroupTemplate.directive.js +3 -3
- package/es2022/src/directives/optionTemplate/optionTemplate.directive.js +3 -3
- package/es2022/src/directives/selectAbsolute/selectAbsolute.directive.js +3 -3
- package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js +7 -5
- package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js.map +1 -1
- package/es2022/src/directives/selectEdit/selectEdit.directive.js +3 -3
- package/es2022/src/directives/selectFormControl/selectFormControl.directive.js +11 -7
- package/es2022/src/directives/selectFormControl/selectFormControl.directive.js.map +1 -1
- package/es2022/src/directives/selectMultipleKeepPopup/selectMultipleKeepPopup.directive.js +3 -3
- package/es2022/src/directives/selectNoCarret/selectNoCarret.directive.js +3 -3
- package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js +5 -4
- package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js.map +1 -1
- package/es2022/src/directives/withDirectAccess/withDirectAccess.directive.js +5 -4
- package/es2022/src/directives/withDirectAccess/withDirectAccess.directive.js.map +1 -1
- package/es2022/src/interfaces/plugins/popup/popup.interface.js.map +1 -1
- package/es2022/src/misc/classes/codeOptionsGatherer/codeOptionsGatherer.interface.js +6 -3
- package/es2022/src/misc/classes/codeOptionsGatherer/codeOptionsGatherer.interface.js.map +1 -1
- package/es2022/src/misc/classes/selectBus/selectBus.js +11 -7
- package/es2022/src/misc/classes/selectBus/selectBus.js.map +1 -1
- package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js +18 -9
- package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js.map +1 -1
- package/es2022/src/modules/select.module.js +4 -4
- package/es2022/src/pipes/addNewOption/addNewOption.pipe.js +3 -3
- package/es2022/src/pipes/displayOptionValue/displayOptionValue.pipe.js +7 -5
- package/es2022/src/pipes/displayOptionValue/displayOptionValue.pipe.js.map +1 -1
- package/es2022/src/pipes/displayValue/displayValue.pipe.js +9 -6
- package/es2022/src/pipes/displayValue/displayValue.pipe.js.map +1 -1
- package/es2022/src/pipes/getPlugin/getPlugin.pipe.js +3 -3
- package/es2022/src/pipes/groupedListOptions/groupedListOptions.pipe.js +3 -3
- package/es2022/src/pipes/hasValue/hasValue.pipe.js +3 -3
- package/es2022/src/pipes/optionCssClasses/optionCssClasses.pipe.js +3 -3
- package/es2022/src/plugins/interactions/simpleInteractions/simpleInteractions.component.js +3 -3
- package/es2022/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.js +3 -3
- package/es2022/src/plugins/liveSearch/editLiveSearch/editLiveSearch.component.js +13 -8
- package/es2022/src/plugins/liveSearch/editLiveSearch/editLiveSearch.component.js.map +1 -1
- package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js +7 -5
- package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js.map +1 -1
- package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js +7 -5
- package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js.map +1 -1
- package/es2022/src/plugins/normalState/editNormalState/editNormalState.component.js +9 -6
- package/es2022/src/plugins/normalState/editNormalState/editNormalState.component.js.map +1 -1
- package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js +5 -4
- package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js.map +1 -1
- package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js +7 -5
- package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js.map +1 -1
- package/es2022/src/plugins/optionsHandler/optionsHandlerBase.js +9 -6
- package/es2022/src/plugins/optionsHandler/optionsHandlerBase.js.map +1 -1
- package/es2022/src/plugins/optionsHandler/simpleOptionsHandler/simpleOptionsHandler.component.js +7 -5
- package/es2022/src/plugins/optionsHandler/simpleOptionsHandler/simpleOptionsHandler.component.js.map +1 -1
- package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js +11 -5
- package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js.map +1 -1
- package/es2022/src/plugins/positioner/commonPositioner/commonPositioner.component.js +3 -3
- package/es2022/src/plugins/positioner/noPositioner/noPositioner.component.js +3 -3
- package/es2022/src/plugins/positioner/popoverPositioner/popoverPositioner.component.js +3 -3
- package/es2022/src/plugins/valueHandler/dynamicValueHandler/dynamicValueHandler.component.js +13 -8
- package/es2022/src/plugins/valueHandler/dynamicValueHandler/dynamicValueHandler.component.js.map +1 -1
- package/es2022/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.js +7 -5
- package/es2022/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.js.map +1 -1
- package/package.json +19 -27
- package/src/directives/highlightInstance/highlightInstance.directive.d.ts +42 -0
- package/src/directives/highlightInstance/highlightInstance.directive.d.ts.map +1 -0
- package/src/directives/highlightSearch/highlightSearch.directive.d.ts +50 -0
- package/src/directives/highlightSearch/highlightSearch.directive.d.ts.map +1 -0
- package/src/directives/highlightText/highlightText.directive.d.ts +28 -0
- package/src/directives/highlightText/highlightText.directive.d.ts.map +1 -0
- package/src/directives/index.d.ts +3 -0
- package/src/directives/index.d.ts.map +1 -1
- package/src/interfaces/plugins/popup/popup.interface.d.ts +4 -0
- package/src/interfaces/plugins/popup/popup.interface.d.ts.map +1 -1
- package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts +1 -1
- package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts.map +1 -1
- package/src/plugins/popup/simplePopup/simplePopup.component.d.ts +2 -1
- package/src/plugins/popup/simplePopup/simplePopup.component.d.ts.map +1 -1
- package/src/plugins/popup/simplePopup/simplePopup.component.html +2 -2
- package/styles/components/_popup.scss +6 -0
- package/styles/core/_defaultTheme.scss +5 -0
- package/version.bak +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Version 17.0.0 (2026-07-02)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- new `HighlightInstance` directive, that manages highlighting for popup
|
|
8
|
+
- **implements**
|
|
9
|
+
- `OnDestroy`
|
|
10
|
+
- **properties**
|
|
11
|
+
- `searchQuery` signal that represents current search query
|
|
12
|
+
- `enabled` indication whether highlighting is enabled or not
|
|
13
|
+
- **methods**
|
|
14
|
+
- `registerHighlightRanges` registers ranges for highlighting
|
|
15
|
+
- `unregisterHighlightRanges` unregisters ranges from highlighting
|
|
16
|
+
- new `HighlightSearch` directive, that handles highlighting of search text, attached directly to option where highlighting should occur.
|
|
17
|
+
- **implements**
|
|
18
|
+
- `OnDestroy`
|
|
19
|
+
- **properties**
|
|
20
|
+
- `injector` instance of injector used for obtaining dependencies in templates
|
|
21
|
+
- **methods**
|
|
22
|
+
- `addNodes` adds nodes to the list of text nodes that are currently active on this element
|
|
23
|
+
- `removeNodes` removes nodes from the list of text nodes that are currently active on this element
|
|
24
|
+
- new `HighlightText` directive, that marks element that contains text that should be highlighted
|
|
25
|
+
- **implements**
|
|
26
|
+
- `OnDestroy`
|
|
27
|
+
- updated `PopupOptions` interface
|
|
28
|
+
- **new properties**
|
|
29
|
+
- `searchHighlighting` indication whether is highlighting enabled for popup, if set to true, then popup will search query
|
|
30
|
+
- updated `SimplePopup` plugin component
|
|
31
|
+
- is now using `HighlightInstance` and `HighlightSearch` for highlighting search
|
|
32
|
+
- updated styles for popup search highlighting, two new css variables `--select-popup-option-searchHighlight-textDecoration`, `--select-popup-option-searchHighlight-textShadow`
|
|
33
|
+
|
|
34
|
+
### BREAKING CHANGES
|
|
35
|
+
|
|
36
|
+
- minimal supported version of `Node` is `22` (recommended version is `26`)
|
|
37
|
+
- minimal supported version of `@angular` is `22.0.4`
|
|
38
|
+
- minimal supported version of `rxjs` is `7.8.2`
|
|
39
|
+
|
|
3
40
|
## Version 16.1.0 (2026-07-01)
|
|
4
41
|
|
|
5
42
|
### Features
|
|
@@ -14,29 +14,34 @@ export class Option {
|
|
|
14
14
|
/**
|
|
15
15
|
* @inheritdoc
|
|
16
16
|
*/
|
|
17
|
-
this.active = signal(false,
|
|
17
|
+
this.active = signal(false, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
18
19
|
/**
|
|
19
20
|
* @inheritdoc
|
|
20
21
|
*/
|
|
21
|
-
this.selected = signal(false,
|
|
22
|
+
this.selected = signal(false, /* @ts-ignore */
|
|
23
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
22
24
|
//######################### public properties - implementation of SelectOption #########################
|
|
23
25
|
/**
|
|
24
26
|
* @inheritdoc
|
|
25
27
|
*/
|
|
26
|
-
this.value = input(
|
|
28
|
+
this.value = input(/* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
27
30
|
/**
|
|
28
31
|
* @inheritdoc
|
|
29
32
|
*/
|
|
30
|
-
this.text = input('',
|
|
33
|
+
this.text = input('', /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
31
35
|
/**
|
|
32
36
|
* @inheritdoc
|
|
33
37
|
*/
|
|
34
|
-
this.group = signal(inject(OptionGroup, { optional: true }),
|
|
38
|
+
this.group = signal(inject(OptionGroup, { optional: true }), /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []));
|
|
35
40
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: Option, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: Option, isStandalone: true, selector: "ng-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38
43
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: Option, decorators: [{
|
|
40
45
|
type: Component,
|
|
41
46
|
args: [{
|
|
42
47
|
selector: 'ng-option',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.component.js","sourceRoot":"","sources":["../../../../src/components/option/option.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAkB,MAAM,EAAe,KAAK,EAAU,MAAM,EAAC,MAAM,eAAe,CAAC;AAG7H,OAAO,EAAC,WAAW,EAAC,MAAM,mCAAmC,CAAC;;AAE9D;;GAEG;AAOH,MAAM,OAAO,MAAM;IANnB;QAQI,6GAA6G;QAE7G;;WAEG;QACI,UAAK,GAAW,CAAC,CAAC;QAEzB;;WAEG;QACI,WAAM,GAA4B,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"option.component.js","sourceRoot":"","sources":["../../../../src/components/option/option.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAkB,MAAM,EAAe,KAAK,EAAU,MAAM,EAAC,MAAM,eAAe,CAAC;AAG7H,OAAO,EAAC,WAAW,EAAC,MAAM,mCAAmC,CAAC;;AAE9D;;GAEG;AAOH,MAAM,OAAO,MAAM;IANnB;QAQI,6GAA6G;QAE7G;;WAEG;QACI,UAAK,GAAW,CAAC,CAAC;QAEzB;;WAEG;QACI,WAAM,GAA4B,MAAM,CAAC,KAAK;mFAAC,CAAC;QAEvD;;WAEG;QACI,aAAQ,GAA4B,MAAM,CAAC,KAAK;qFAAC,CAAC;QAEzD,wGAAwG;QAExG;;WAEG;QACI,UAAK,GAAuC,KAAK;6FAAE,CAAC;QAE3D;;WAEG;QACI,SAAI,GAAwB,KAAK,CAAC,EAAE;iFAAC,CAAC;QAE7C;;WAEG;QACI,UAAK,GAA6C,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;kFAAC,CAAC;KAC1G;8GAnCY,MAAM;kGAAN,MAAM,8TAHL,EAAE;;2FAGH,MAAM;kBANlB,SAAS;mBACV;oBACI,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD","sourcesContent":["import {Component, ChangeDetectionStrategy, WritableSignal, signal, InputSignal, input, Signal, inject} from '@angular/core';\n\nimport {SelectOptionGroup, SelectOptionState} from '../../interfaces';\nimport {OptionGroup} from '../optionGroup/optgroup.component';\n\n/**\n * Component used for options in select component\n */\n@Component(\n{\n selector: 'ng-option',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Option<TValue = unknown> implements SelectOptionState<TValue>\n{\n //######################### public properties - implementation of SelectOptionState #########################\n\n /**\n * @inheritdoc\n */\n public index: number = 0;\n\n /**\n * @inheritdoc\n */\n public active: WritableSignal<boolean> = signal(false);\n\n /**\n * @inheritdoc\n */\n public selected: WritableSignal<boolean> = signal(false);\n\n //######################### public properties - implementation of SelectOption #########################\n\n /**\n * @inheritdoc\n */\n public value: InputSignal<TValue|undefined|null> = input();\n\n /**\n * @inheritdoc\n */\n public text: InputSignal<string> = input('');\n\n /**\n * @inheritdoc\n */\n public group: Signal<SelectOptionGroup|undefined|null> = signal(inject(OptionGroup, {optional: true}));\n}\n"]}
|
|
@@ -15,7 +15,7 @@ export class OptionGroup {
|
|
|
15
15
|
/**
|
|
16
16
|
* @inheritdoc
|
|
17
17
|
*/
|
|
18
|
-
this.template = contentChild(OptionGroupTemplate, { ...(ngDevMode ? { debugName: "template" } : {}), read: TemplateRef });
|
|
18
|
+
this.template = contentChild(OptionGroupTemplate, { ...(ngDevMode ? { debugName: "template" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
19
19
|
/**
|
|
20
20
|
* @inheritdoc
|
|
21
21
|
*/
|
|
@@ -23,12 +23,13 @@ export class OptionGroup {
|
|
|
23
23
|
/**
|
|
24
24
|
* @inheritdoc
|
|
25
25
|
*/
|
|
26
|
-
this.text = input.required(
|
|
26
|
+
this.text = input.required(/* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
27
28
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: OptionGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.4", type: OptionGroup, isStandalone: true, selector: "ng-option-group", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, queries: [{ propertyName: "template", first: true, predicate: OptionGroupTemplate, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
30
31
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: OptionGroup, decorators: [{
|
|
32
33
|
type: Component,
|
|
33
34
|
args: [{
|
|
34
35
|
selector: 'ng-option-group',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optgroup.component.js","sourceRoot":"","sources":["../../../../src/components/optionGroup/optgroup.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAe,WAAW,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AACxH,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;AAErD;;GAEG;AAOH,MAAM,OAAO,WAAW;IANxB;QAQI,6GAA6G;QAE7G;;WAEG;QACI,UAAK,GAAW,CAAC,CAAC;QAEzB;;WAEG;QACI,aAAQ,GAA4D,YAAY,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"optgroup.component.js","sourceRoot":"","sources":["../../../../src/components/optionGroup/optgroup.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAe,WAAW,EAAE,YAAY,EAAS,MAAM,eAAe,CAAC;AACxH,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAG1C,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;AAErD;;GAEG;AAOH,MAAM,OAAO,WAAW;IANxB;QAQI,6GAA6G;QAE7G;;WAEG;QACI,UAAK,GAAW,CAAC,CAAC;QAEzB;;WAEG;QACI,aAAQ,GAA4D,YAAY,CAAC,mBAAmB,gFAAG,IAAI,EAAE,WAAW,GAAE,CAAC;QAElI;;WAEG;QACa,OAAE,GAAW,UAAU,CAAC,EAAE,CAAC,CAAC;QAE5C;;WAEG;QACI,SAAI,GAAwB,KAAK,CAAC,QAAQ;iFAAE,CAAC;KACvD;8GAvBY,WAAW;kGAAX,WAAW,iPAYoE,mBAAmB,2BAAS,WAAW,6CAfrH,EAAE;;2FAGH,WAAW;kBANvB,SAAS;mBACV;oBACI,QAAQ,EAAE,iBAAiB;oBAC3B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD;6FAa2F,mBAAmB,QAAE,EAAC,IAAI,EAAE,WAAW,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, input, InputSignal, TemplateRef, contentChild, Signal} from '@angular/core';\nimport {generateId} from '@jscrpt/common';\n\nimport {SelectOptionGroup} from '../../interfaces';\nimport {OptionGroupTemplate} from '../../directives';\n\n/**\n * Component used for option group in select component\n */\n@Component(\n{\n selector: 'ng-option-group',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class OptionGroup implements SelectOptionGroup\n{\n //######################### public properties - implementation of SelectOptionGroup #########################\n\n /**\n * @inheritdoc\n */\n public index: number = 0;\n\n /**\n * @inheritdoc\n */\n public template: Signal<TemplateRef<{$implicit: string}>|undefined|null> = contentChild(OptionGroupTemplate, {read: TemplateRef});\n\n /**\n * @inheritdoc\n */\n public readonly id: string = generateId(10);\n\n /**\n * @inheritdoc\n */\n public text: InputSignal<string> = input.required();\n}\n"]}
|
|
@@ -113,39 +113,48 @@ export class Select {
|
|
|
113
113
|
/**
|
|
114
114
|
* Signal that holds init state of live search plugin
|
|
115
115
|
*/
|
|
116
|
-
this.liveSearchInit = signal(false,
|
|
116
|
+
this.liveSearchInit = signal(false, /* @ts-ignore */
|
|
117
|
+
...(ngDevMode ? [{ debugName: "liveSearchInit" }] : /* istanbul ignore next */ []));
|
|
117
118
|
/**
|
|
118
119
|
* Signal that holds init state of interactions plugin
|
|
119
120
|
*/
|
|
120
|
-
this.interactionsInit = signal(false,
|
|
121
|
+
this.interactionsInit = signal(false, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "interactionsInit" }] : /* istanbul ignore next */ []));
|
|
121
123
|
/**
|
|
122
124
|
* Signal that holds init state of options handler plugin
|
|
123
125
|
*/
|
|
124
|
-
this.optionsHandlerInit = signal(false,
|
|
126
|
+
this.optionsHandlerInit = signal(false, /* @ts-ignore */
|
|
127
|
+
...(ngDevMode ? [{ debugName: "optionsHandlerInit" }] : /* istanbul ignore next */ []));
|
|
125
128
|
/**
|
|
126
129
|
* Signal that holds init state of positioner plugin
|
|
127
130
|
*/
|
|
128
|
-
this.positionerInit = signal(false,
|
|
131
|
+
this.positionerInit = signal(false, /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "positionerInit" }] : /* istanbul ignore next */ []));
|
|
129
133
|
/**
|
|
130
134
|
* Signal that holds init state of keyboard plugin
|
|
131
135
|
*/
|
|
132
|
-
this.keyboardInit = signal(false,
|
|
136
|
+
this.keyboardInit = signal(false, /* @ts-ignore */
|
|
137
|
+
...(ngDevMode ? [{ debugName: "keyboardInit" }] : /* istanbul ignore next */ []));
|
|
133
138
|
/**
|
|
134
139
|
* Signal that holds init state of value handler plugin
|
|
135
140
|
*/
|
|
136
|
-
this.valueHandlerInit = signal(false,
|
|
141
|
+
this.valueHandlerInit = signal(false, /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "valueHandlerInit" }] : /* istanbul ignore next */ []));
|
|
137
143
|
/**
|
|
138
144
|
* Signal that holds init state of readonly state plugin
|
|
139
145
|
*/
|
|
140
|
-
this.readonlyStateInit = signal(false,
|
|
146
|
+
this.readonlyStateInit = signal(false, /* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [{ debugName: "readonlyStateInit" }] : /* istanbul ignore next */ []));
|
|
141
148
|
/**
|
|
142
149
|
* Signal that holds init state of normal state plugin
|
|
143
150
|
*/
|
|
144
|
-
this.normalStateInit = signal(false,
|
|
151
|
+
this.normalStateInit = signal(false, /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "normalStateInit" }] : /* istanbul ignore next */ []));
|
|
145
153
|
/**
|
|
146
154
|
* Signal that holds init state of popup plugin
|
|
147
155
|
*/
|
|
148
|
-
this.popupInit = signal(false,
|
|
156
|
+
this.popupInit = signal(false, /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "popupInit" }] : /* istanbul ignore next */ []));
|
|
149
158
|
/**
|
|
150
159
|
* Initialization state of all plugin init options
|
|
151
160
|
*/
|
|
@@ -157,11 +166,13 @@ export class Select {
|
|
|
157
166
|
this.valueHandlerInit() &&
|
|
158
167
|
this.liveSearchInit() &&
|
|
159
168
|
this.interactionsInit() &&
|
|
160
|
-
this.optionsHandlerInit() }),
|
|
169
|
+
this.optionsHandlerInit() }), /* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [{ debugName: "optionsInit" }] : /* istanbul ignore next */ []));
|
|
161
171
|
/**
|
|
162
172
|
* Information whether is select initialized or not, changes when Select is initialized or reinitialized, if value is false Select was not initialized yet
|
|
163
173
|
*/
|
|
164
|
-
this.initializedSignal = signal(false,
|
|
174
|
+
this.initializedSignal = signal(false, /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "initializedSignal" }] : /* istanbul ignore next */ []));
|
|
165
176
|
//######################### protected properties - children #########################
|
|
166
177
|
/**
|
|
167
178
|
* Container used for rendering live search plugin
|
|
@@ -202,29 +213,29 @@ export class Select {
|
|
|
202
213
|
/**
|
|
203
214
|
* Indication whether should be Select disabled or not
|
|
204
215
|
*/
|
|
205
|
-
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
216
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
206
217
|
/**
|
|
207
218
|
* Indication whether should be Select readonly or not
|
|
208
219
|
*/
|
|
209
|
-
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
220
|
+
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
210
221
|
//######################### public properties - implementation of TemplateGatherer #########################
|
|
211
222
|
/**
|
|
212
223
|
* @inheritdoc
|
|
213
224
|
*/
|
|
214
|
-
this.normalStateTemplate = contentChild(NormalStateTemplate, { ...(ngDevMode ? { debugName: "normalStateTemplate" } : {}), read: TemplateRef });
|
|
225
|
+
this.normalStateTemplate = contentChild(NormalStateTemplate, { ...(ngDevMode ? { debugName: "normalStateTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
215
226
|
/**
|
|
216
227
|
* @inheritdoc
|
|
217
228
|
*/
|
|
218
|
-
this.optionTemplate = contentChild(OptionTemplate, { ...(ngDevMode ? { debugName: "optionTemplate" } : {}), read: TemplateRef });
|
|
229
|
+
this.optionTemplate = contentChild(OptionTemplate, { ...(ngDevMode ? { debugName: "optionTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
219
230
|
/**
|
|
220
231
|
* @inheritdoc
|
|
221
232
|
*/
|
|
222
|
-
this.normalStateTagTemplate = contentChild(NormalStateTagTemplate, { ...(ngDevMode ? { debugName: "normalStateTagTemplate" } : {}), read: TemplateRef });
|
|
233
|
+
this.normalStateTagTemplate = contentChild(NormalStateTagTemplate, { ...(ngDevMode ? { debugName: "normalStateTagTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
223
234
|
//######################### public properties - implementation of OptionsGatherer #########################
|
|
224
235
|
/**
|
|
225
236
|
* Array of all available options for select
|
|
226
237
|
*/
|
|
227
|
-
this.availableOptions = contentChildren(Option, { ...(ngDevMode ? { debugName: "availableOptions" } : {}), descendants: true });
|
|
238
|
+
this.availableOptions = contentChildren(Option, { ...(ngDevMode ? { debugName: "availableOptions" } : /* istanbul ignore next */ {}), descendants: true });
|
|
228
239
|
//is present (value is not important)
|
|
229
240
|
const multipleDefault = isPresent(multiple);
|
|
230
241
|
const opts = deepCopyWithArrayOverride({}, options);
|
|
@@ -273,7 +284,8 @@ export class Select {
|
|
|
273
284
|
}, opts);
|
|
274
285
|
this.logger.verbose('Select: ctor options initialized {{@(4)options}}', { options: this.selectOptions });
|
|
275
286
|
bus.selectElement = signal(element).asReadonly();
|
|
276
|
-
bus.selectOptions = computed(() => this.selectOptions,
|
|
287
|
+
bus.selectOptions = computed(() => this.selectOptions, /* @ts-ignore */
|
|
288
|
+
...(ngDevMode ? [{ debugName: "selectOptions" }] : /* istanbul ignore next */ []));
|
|
277
289
|
//dynamic update of readonly state in options
|
|
278
290
|
effect(() => {
|
|
279
291
|
const readonly = this.readonly() || this.disabled();
|
|
@@ -410,8 +422,8 @@ export class Select {
|
|
|
410
422
|
initOptions.set(false);
|
|
411
423
|
this.pluginTypes[pluginType] = null;
|
|
412
424
|
}
|
|
413
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
414
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: Select, deps: [{ token: i1.SelectPluginInstances }, { token: i1.SelectBus }, { token: LOGGER }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: 'multiple', attribute: true }, { token: NORMAL_STATE_TYPE, optional: true }, { token: KEYBOARD_HANDLER_TYPE, optional: true }, { token: POPUP_TYPE, optional: true }, { token: POSITIONER_TYPE, optional: true }, { token: READONLY_STATE_TYPE, optional: true }, { token: VALUE_HANDLER_TYPE, optional: true }, { token: LIVE_SEARCH_TYPE, optional: true }, { token: INTERACTIONS_TYPE, optional: true }, { token: OPTIONS_HANDLER_TYPE, optional: true }, { token: SELECT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.4", type: Select, isStandalone: true, selector: "ng-select", inputs: { selectOptionsInput: { classPropertyName: "selectOptionsInput", publicName: "selectOptions", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "selectOptions.cssClasses.selectElement" } }, providers: [
|
|
415
427
|
{
|
|
416
428
|
provide: SelectPluginInstances,
|
|
417
429
|
useFactory: () => new SelectPluginInstances(),
|
|
@@ -423,7 +435,7 @@ __decorate([
|
|
|
423
435
|
CopyOptionsAsSignal(),
|
|
424
436
|
__metadata("design:type", Object)
|
|
425
437
|
], Select.prototype, "selectOptions", void 0);
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: Select, decorators: [{
|
|
427
439
|
type: Component,
|
|
428
440
|
args: [{ selector: 'ng-select', host: {
|
|
429
441
|
'[class]': 'selectOptions.cssClasses.selectElement',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component.js","sourceRoot":"","sources":["../../../../src/components/select/select.component.ts","../../../../src/components/select/select.component.html"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAA0B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAQ,iBAAiB,EAAmB,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAA0C,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAC7W,OAAO,EAAC,cAAc,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAoB,YAAY,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAC,yBAAyB,EAAC,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC5N,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAClL,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAC,sBAAsB,EAAE,mBAAmB,EAAE,cA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, WritableSignal, signal, Inject, Optional, Type, resolveForwardRef, FactoryProvider, effect, forwardRef, Attribute, ElementRef, computed, input, booleanAttribute, InputSignalWithTransform, ComponentRef, DOCUMENT, TemplateRef, contentChild, contentChildren} from '@angular/core';\nimport {getHostElement, LOGGER, Logger} from '@anglr/common';\nimport {isPresent, RecursivePartial, renderToBody, normalizeAccent} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {InitState, Interactions, InteractionsOptions, KeyboardHandler, KeyboardHandlerOptions, LiveSearch, LiveSearchOptions, NormalState, NormalStateContext, NormalStateOptions, NormalStateTagContext, OptionsGatherer, OptionsHandler, OptionsHandlerOptions, PluginDescription, Popup, PopupContext, PopupOptions, Positioner, PositionerOptions, ReadonlyState, ReadonlyStateOptions, SelectApi, SelectCssClasses, SelectEvents, SelectOption, SelectOptions, SelectOptionState, SelectPlugin, TemplateGatherer, ValueHandler, ValueHandlerOptions} from '../../interfaces';\nimport {INTERACTIONS_TYPE, KEYBOARD_HANDLER_TYPE, LIVE_SEARCH_TYPE, NORMAL_STATE_TYPE, OPTIONS_HANDLER_TYPE, POPUP_TYPE, POSITIONER_TYPE, READONLY_STATE_TYPE, SELECT_OPTIONS, VALUE_HANDLER_TYPE} from '../../misc/tokens';\nimport {SelectPluginType} from '../../misc/enums';\nimport {SelectBus, SelectPluginInstances} from '../../misc/classes';\nimport {CommonPositioner, StaticValueHandler, SimpleInteractions, SimpleOptionsHandler, SimpleKeyboardHandler, SimpleNormalState, SimplePopup, NoLiveSearch} from '../../plugins';\nimport {CopyOptionsAsSignal} from '../../decorators';\nimport {SelectAction, SelectFunction} from '../../misc/types';\nimport {NormalStateTagTemplate, NormalStateTemplate, OptionTemplate} from '../../directives';\nimport {Option} from '../option/option.component';\n\n//TODO: optimize options change detection, currently it is based on reference change, but it could be optimized by checking only changed properties, or by using signals for options properties\n\n/**\n * Default 'SelectOptions'\n */\nconst defaultOptions: Omit<SelectOptions, 'optionsGatherer'|'templateGatherer'> =\n{\n absolute: false,\n multiple: false,\n readonly: false,\n containerElement: 'div.select-component',\n placeholder: 'please select value',\n closeOnSelect: true,\n displaySelectedValue: option => option.text(),\n displayOptionValue: null,\n valueExtractor: (option: SelectOption) => option.value(),\n valueComparer: (source, target) => source === target,\n textExtractor: (option: SelectOption) => option.text(),\n normalize: <TText extends string|undefined|null>(value: TText) => isPresent(value) ? normalizeAccent(value) as TText : value,\n textCompare: (source: string, target: string) => !!source.match(new RegExp(target, 'i')),\n cssClasses:\n {\n visualContainer: 'visual-container',\n selectElement: 'select-component',\n },\n plugins:\n {\n interactions: <PluginDescription<Interactions, InteractionsOptions>>\n {\n type: forwardRef(() => SimpleInteractions),\n },\n keyboardHandler: <PluginDescription<KeyboardHandler, KeyboardHandlerOptions>>\n {\n type: forwardRef(() => SimpleKeyboardHandler),\n },\n liveSearch: <PluginDescription<LiveSearch, LiveSearchOptions>>\n {\n type: forwardRef(() => NoLiveSearch),\n },\n normalState: <PluginDescription<NormalState, NormalStateOptions>>\n {\n type: forwardRef(() => SimpleNormalState),\n },\n optionsHandler: <PluginDescription<OptionsHandler, OptionsHandlerOptions>>\n {\n type: forwardRef(() => SimpleOptionsHandler),\n },\n popup: <PluginDescription<Popup, PopupOptions>>\n {\n type: forwardRef(() => SimplePopup),\n },\n positioner: <PluginDescription<Positioner, PositionerOptions>>\n {\n type: forwardRef(() => CommonPositioner),\n },\n readonlyState: <PluginDescription<ReadonlyState, ReadonlyStateOptions>>\n {\n type: forwardRef(() => SimpleNormalState),\n },\n valueHandler: <PluginDescription<ValueHandler, ValueHandlerOptions>>\n {\n type: forwardRef(() => StaticValueHandler),\n },\n },\n};\n\n/**\n * Component that represents Select itself, allows selection of value from options\n */\n@Component(\n{\n selector: 'ng-select',\n templateUrl: 'select.component.html',\n styleUrl: 'select.component.css',\n host:\n {\n '[class]': 'selectOptions.cssClasses.selectElement',\n },\n providers:\n [\n <FactoryProvider>\n {\n provide: SelectPluginInstances,\n useFactory: () => new SelectPluginInstances(),\n },\n SelectBus,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select<TValue = unknown, TPublicValue = TValue> implements SelectApi<TValue, TPublicValue, SelectCssClasses>, OptionsGatherer<TValue>, TemplateGatherer<TValue, TPublicValue>\n{\n //######################### protected fields #########################\n\n /**\n * Instance of popup component used for positioning over page body when absolute option is true\n */\n protected popupComponentRef: ComponentRef<Popup<TValue, TPublicValue>>|undefined|null;\n\n /**\n * Object storing current used plugin type\n */\n protected pluginTypes: Record<SelectPluginType, Type<SelectPlugin<unknown, TValue, TPublicValue>>|undefined|null> =\n {\n Interactions: null,\n KeyboardHandler: null,\n LiveSearch: null,\n NormalState: null,\n OptionsHandler: null,\n Popup: null,\n Positioner: null,\n ReadonlyState: null,\n ValueHandler: null,\n };\n\n /**\n * Signal that holds init state of live search plugin\n */\n protected liveSearchInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of interactions plugin\n */\n protected interactionsInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of options handler plugin\n */\n protected optionsHandlerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of positioner plugin\n */\n protected positionerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of keyboard plugin\n */\n protected keyboardInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of value handler plugin\n */\n protected valueHandlerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of readonly state plugin\n */\n protected readonlyStateInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of normal state plugin\n */\n protected normalStateInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of popup plugin\n */\n protected popupInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Initialization state of all plugin init options\n */\n protected optionsInit: Signal<InitState> = computed(() => ({initialized: this.normalStateInit() &&\n this.keyboardInit() &&\n this.popupInit() &&\n this.positionerInit() &&\n this.readonlyStateInit() &&\n this.valueHandlerInit() &&\n this.liveSearchInit() &&\n this.interactionsInit() &&\n this.optionsHandlerInit()}));\n\n /**\n * Information whether is select initialized or not, changes when Select is initialized or reinitialized, if value is false Select was not initialized yet\n */\n protected initializedSignal: WritableSignal<boolean> = signal(false);\n\n //######################### protected properties - children #########################\n\n /**\n * Container used for rendering live search plugin\n */\n protected liveSearchContainer: Signal<ViewContainerRef> = viewChild.required('liveSearch', {read: ViewContainerRef});\n\n /**\n * Container used for rendering interactions plugin\n */\n protected interactionsContainer: Signal<ViewContainerRef> = viewChild.required('interactions', {read: ViewContainerRef});\n\n /**\n * Container used for rendering options handler plugin\n */\n protected optionsHandlerContainer: Signal<ViewContainerRef> = viewChild.required('optionsHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering positioner plugin\n */\n protected positionerContainer: Signal<ViewContainerRef> = viewChild.required('positioner', {read: ViewContainerRef});\n\n /**\n * Container used for rendering keyboard handler plugin\n */\n protected keyboardHandlerContainer: Signal<ViewContainerRef> = viewChild.required('keyboardHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering value handler plugin\n */\n protected valueHandlerContainer: Signal<ViewContainerRef> = viewChild.required('valueHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering readonly state plugin\n */\n protected readonlyStateContainer: Signal<ViewContainerRef> = viewChild.required('readonlyState', {read: ViewContainerRef});\n\n /**\n * Container used for rendering normal state plugin\n */\n protected normalStateContainer: Signal<ViewContainerRef> = viewChild.required('normalState', {read: ViewContainerRef});\n\n /**\n * Container used for rendering popup plugin\n */\n protected popupContainer: Signal<ViewContainerRef> = viewChild.required('popup', {read: ViewContainerRef});\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public selectOptions: SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets Select options\n */\n @Input({alias: 'selectOptions'})\n public get selectOptionsInput(): SelectOptions<TValue, TPublicValue, SelectCssClasses>\n {\n return this.selectOptions;\n }\n public set selectOptionsInput(value: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>)\n {\n this.selectOptions = value as SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n }\n\n /**\n * Indication whether should be Select disabled or not\n */\n public disabled: InputSignalWithTransform<boolean, string|boolean> = input<boolean, boolean|string>(false, {transform: booleanAttribute});\n\n /**\n * Indication whether should be Select readonly or not\n */\n public readonly: InputSignalWithTransform<boolean, string|boolean> = input<boolean, boolean|string>(false, {transform: booleanAttribute});\n\n //######################### public properties - implementation of SelectApi #########################\n\n /**\n * @inheritdoc\n */\n public get initialized(): Signal<boolean>\n {\n return this.initializedSignal.asReadonly();\n }\n\n /**\n * @inheritdoc\n */\n public get events(): SelectEvents\n {\n return this.bus;\n }\n\n //######################### public properties - implementation of TemplateGatherer #########################\n\n /**\n * @inheritdoc\n */\n public readonly normalStateTemplate: Signal<TemplateRef<NormalStateContext<TValue, TPublicValue>>|undefined|null> = contentChild(NormalStateTemplate, {read: TemplateRef});\n\n /**\n * @inheritdoc\n */\n public readonly optionTemplate: Signal<TemplateRef<PopupContext<TValue, TPublicValue>>|undefined|null> = contentChild(OptionTemplate, {read: TemplateRef});\n\n /**\n * @inheritdoc\n */\n public readonly normalStateTagTemplate: Signal<TemplateRef<NormalStateTagContext<TValue, TPublicValue>>|undefined|null> = contentChild(NormalStateTagTemplate, {read: TemplateRef});\n\n //######################### public properties - implementation of OptionsGatherer #########################\n\n /**\n * Array of all available options for select\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null> = contentChildren<SelectOptionState<TValue>>(Option, {descendants: true});\n\n //######################### constructors #########################\n constructor(protected pluginInstances: SelectPluginInstances<TValue, TPublicValue>,\n protected bus: SelectBus<TValue, TPublicValue>,\n @Inject(LOGGER) protected logger: Logger,\n element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) document: HTMLDocument,\n @Attribute('multiple') multiple?: string|null,\n @Inject(NORMAL_STATE_TYPE) @Optional() normalStateType?: Type<NormalState<TValue, TPublicValue>>|null,\n @Inject(KEYBOARD_HANDLER_TYPE) @Optional() keyboardHandlerType?: Type<KeyboardHandler<TValue, TPublicValue>>|null,\n @Inject(POPUP_TYPE) @Optional() popupType?: Type<Popup<TValue, TPublicValue>>|null,\n @Inject(POSITIONER_TYPE) @Optional() positionerType?: Type<Positioner<TValue, TPublicValue>>|null,\n @Inject(READONLY_STATE_TYPE) @Optional() readonlyStateType?: Type<ReadonlyState<TValue, TPublicValue>>|null,\n @Inject(VALUE_HANDLER_TYPE) @Optional() valueHandlerType?: Type<ValueHandler<TValue, TPublicValue>>|null,\n @Inject(LIVE_SEARCH_TYPE) @Optional() liveSearchType?: Type<LiveSearch<TValue, TPublicValue>>|null,\n @Inject(INTERACTIONS_TYPE) @Optional() interactionsType?: Type<Interactions<TValue, TPublicValue>>|null,\n @Inject(OPTIONS_HANDLER_TYPE) @Optional() optionsHandlerType?: Type<OptionsHandler<TValue, TPublicValue>>|null,\n @Inject(SELECT_OPTIONS) @Optional() options?: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>|null,)\n {\n //is present (value is not important)\n const multipleDefault = isPresent(multiple);\n const opts: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>> = deepCopyWithArrayOverride({}, options);\n\n opts.plugins ??= {};\n\n if(keyboardHandlerType)\n {\n opts.plugins.keyboardHandler ??= {};\n opts.plugins.keyboardHandler.type = keyboardHandlerType;\n }\n\n if(normalStateType)\n {\n opts.plugins.normalState ??= {};\n opts.plugins.normalState.type = normalStateType;\n }\n\n if(popupType)\n {\n opts.plugins.popup ??= {};\n opts.plugins.popup.type = popupType;\n }\n\n if(positionerType)\n {\n opts.plugins.positioner ??= {};\n opts.plugins.positioner.type = positionerType;\n }\n\n if(readonlyStateType)\n {\n opts.plugins.readonlyState ??= {};\n opts.plugins.readonlyState.type = readonlyStateType;\n }\n\n if(valueHandlerType)\n {\n opts.plugins.valueHandler ??= {};\n opts.plugins.valueHandler.type = valueHandlerType;\n }\n\n if(liveSearchType)\n {\n opts.plugins.liveSearch ??= {};\n opts.plugins.liveSearch.type = liveSearchType;\n }\n\n if(interactionsType)\n {\n opts.plugins.interactions ??= {};\n opts.plugins.interactions.type = interactionsType;\n }\n\n if(optionsHandlerType)\n {\n opts.plugins.optionsHandler ??= {};\n opts.plugins.optionsHandler.type = optionsHandlerType;\n }\n\n this.selectOptions = deepCopyWithArrayOverride(\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n optionsGatherer: this,\n templateGatherer: this,\n },\n defaultOptions as SelectOptions<TValue, TPublicValue, SelectCssClasses>,\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n multiple: multipleDefault,\n },\n opts);\n\n this.logger.verbose('Select: ctor options initialized {{@(4)options}}', {options: this.selectOptions});\n\n bus.selectElement = signal(element).asReadonly();\n bus.selectOptions = computed(() => this.selectOptions);\n\n //dynamic update of readonly state in options\n effect(() =>\n {\n const readonly = this.readonly() || this.disabled();\n\n this.selectOptions =\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n readonly: readonly,\n } as SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n\n this.logger.verbose('Select: readonly updated {{readonly}}', {readonly});\n });\n\n //create and initialize options for static plugins\n effect(async () =>\n {\n const selectOptions = this.selectOptions;\n const liveSearchContainer = this.liveSearchContainer();\n const interactionsContainer = this.interactionsContainer();\n const optionsHandlerContainer = this.optionsHandlerContainer();\n const positionerContainer = this.positionerContainer();\n const keyboardHandlerContainer = this.keyboardHandlerContainer();\n const valueHandlerContainer = this.valueHandlerContainer();\n\n await this.createPlugin(selectOptions.plugins?.liveSearch, SelectPluginType.LiveSearch, liveSearchContainer, this.liveSearchInit);\n await this.createPlugin(selectOptions.plugins?.interactions, SelectPluginType.Interactions, interactionsContainer, this.interactionsInit);\n await this.createPlugin(selectOptions.plugins?.optionsHandler, SelectPluginType.OptionsHandler, optionsHandlerContainer, this.optionsHandlerInit);\n await this.createPlugin(selectOptions.plugins?.positioner, SelectPluginType.Positioner, positionerContainer, this.positionerInit);\n await this.createPlugin(selectOptions.plugins?.keyboardHandler, SelectPluginType.KeyboardHandler, keyboardHandlerContainer, this.keyboardInit);\n await this.createPlugin(selectOptions.plugins?.valueHandler, SelectPluginType.ValueHandler, valueHandlerContainer, this.valueHandlerInit);\n });\n\n //create and initialize options for state plugins (normal and readonly)\n effect(() =>\n {\n const readonlyStateContainer = this.readonlyStateContainer();\n const normalStateContainer = this.normalStateContainer();\n const selectOptions = this.selectOptions;\n\n if(selectOptions.readonly)\n {\n this.destroyPlugin(SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);\n this.normalStateInit.set(true);\n this.createPlugin(this.selectOptions.plugins?.readonlyState, SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);\n }\n else\n {\n this.destroyPlugin(SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);\n this.readonlyStateInit.set(true);\n this.createPlugin(this.selectOptions.plugins?.normalState, SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);\n }\n });\n\n //create and initialize options for popup plugin, allows absolute positioning\n effect(() =>\n {\n const selectOptions = this.selectOptions;\n const popupContainer = this.popupContainer();\n\n this.destroyPlugin(SelectPluginType.Popup, popupContainer, this.popupInit);\n this.createPlugin(this.selectOptions.plugins?.popup, SelectPluginType.Popup, this.popupContainer(), this.popupInit);\n\n if(selectOptions.absolute && this.popupComponentRef)\n {\n const element = getHostElement(this.popupComponentRef);\n\n if(!element)\n {\n throw new Error('Could not get element of popup component');\n }\n\n renderToBody(document, element, selectOptions.containerElement);\n }\n });\n\n //initialize plugins when all options are initialized\n effect(() =>\n {\n this.initializedSignal.set(false);\n\n if(this.optionsInit().initialized)\n {\n this.initializedSignal.set(true);\n }\n });\n }\n\n //######################### public methods #########################\n\n /**\n * @inheritdoc\n */\n public getPlugin(pluginType: SelectPluginType.Interactions): Interactions<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.KeyboardHandler): KeyboardHandler<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.LiveSearch): LiveSearch<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.NormalState): NormalState<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.OptionsHandler): OptionsHandler<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.Popup): Popup<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.Positioner): Positioner<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.ReadonlyState): ReadonlyState<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.ValueHandler): ValueHandler<TValue, TPublicValue>;\n public getPlugin<PluginInstance extends SelectPlugin<unknown, TValue, TPublicValue>>(pluginType: SelectPluginType): PluginInstance\n {\n return this.pluginInstances[pluginType] as PluginInstance;\n }\n\n /**\n * @inheritdoc\n */\n public execute(...actions: SelectAction<TValue, TPublicValue, SelectCssClasses>[])\n {\n if(!actions)\n {\n return;\n }\n\n actions.forEach(action => action(this));\n }\n\n /**\n * @inheritdoc\n */\n public executeAndReturn<TResult>(func: SelectFunction<TResult, TValue, TPublicValue, SelectCssClasses>): TResult\n {\n if(!func)\n {\n throw new Error('Function is required');\n }\n\n return func(this);\n }\n\n // //######################### protected methods #########################\n\n /**\n * Creates plugin\n * @param pluginDescription - Information about plugin that should be created\n * @param pluginType - Key of plugin used for pluginInstances\n * @param pluginViewContainer - Container where should be plugin created\n * @param initOptions - Signal that hold information about init options state for this plugin\n */\n protected async createPlugin<TPlugin extends SelectPlugin<unknown, TValue, TPublicValue>>(pluginDescription: PluginDescription<TPlugin>|undefined|null,\n pluginType: SelectPluginType,\n pluginViewContainer: ViewContainerRef,\n initOptions: WritableSignal<boolean>,): Promise<void>\n {\n this.logger.verbose('Select: creating plugin \"{{type}}\", with type \"{{typ}}\"', {type: pluginType, typ: pluginDescription?.type});\n\n if(!pluginDescription?.type)\n {\n this.destroyPlugin(pluginType, pluginViewContainer, initOptions);\n\n return;\n }\n\n const type = resolveForwardRef(pluginDescription.type);\n\n //new type provided\n if(type != this.pluginTypes[pluginType])\n {\n this.logger.verbose('Select: creating plugin instance for \"{{type}}\"', {type: pluginType});\n\n initOptions.set(false);\n this.pluginTypes[pluginType] = type;\n pluginViewContainer.clear();\n\n const component = pluginViewContainer.createComponent(type);\n component.changeDetectorRef.detectChanges();\n this.pluginInstances[pluginType] = component.instance;\n\n if(pluginType == SelectPluginType.Popup)\n {\n this.popupComponentRef = component as ComponentRef<Popup>;\n }\n }\n\n //options are available, set them\n if(pluginDescription.options)\n {\n this.logger.verbose('Select: setting options for \"{{type}}\" plugin, options: {{@(4)options}}', {type: pluginType, options: pluginDescription.options});\n\n initOptions.set(false);\n this.pluginInstances[pluginType].options = pluginDescription.options;\n }\n\n this.logger.verbose('Select: options initialized for \"{{type}}\" plugin', {type: pluginType});\n initOptions.set(true);\n }\n\n /**\n * Destroys plugin\n * @param pluginType - Plugin type to be destroyed\n * @param plugiViewContainer - Container which will be emptied\n * @param initOptions - Signal that hold information about init options state for this plugin\n */\n protected destroyPlugin(pluginType: SelectPluginType,\n pluginViewContainer: ViewContainerRef,\n initOptions: WritableSignal<boolean>,): void\n {\n if(pluginType == SelectPluginType.Popup)\n {\n this.popupComponentRef = null;\n }\n\n this.logger.verbose('Select: destroying plugin \"{{type}}\"', {type: pluginType});\n\n pluginViewContainer.clear();\n initOptions.set(false);\n this.pluginTypes[pluginType] = null;\n }\n}\n","<ng-container #liveSearch />\r\n<ng-container #interactions />\r\n<ng-container #optionsHandler />\r\n<ng-container #positioner />\r\n<ng-container #keyboardHandler />\r\n<ng-container #valueHandler />\r\n\r\n<div [class]=\"selectOptions.cssClasses.visualContainer\">\r\n <ng-container #readonlyState />\r\n <ng-container #normalState />\r\n <ng-container #popup />\r\n</div>\r\n"]}
|
|
1
|
+
{"version":3,"file":"select.component.js","sourceRoot":"","sources":["../../../../src/components/select/select.component.ts","../../../../src/components/select/select.component.html"],"names":[],"mappings":";AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAA0B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAQ,iBAAiB,EAAmB,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAA0C,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAC7W,OAAO,EAAC,cAAc,EAAE,MAAM,EAAS,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAoB,YAAY,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAC,yBAAyB,EAAC,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAC,iBAAiB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC5N,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAClL,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAC,sBAAsB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;;;AAElD,+LAA+L;AAE/L;;GAE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,QAAQ;;0BAC5B,MAAM;2BAAC,eAAe;;0BAAG,QAAQ;;0BACjC,MAAM;2BAAC,mBAAmB;;0BAAG,QAAQ;;0BACrC,MAAM;2BAAC,kBAAkB;;0BAAG,QAAQ;;0BACpC,MAAM;2BAAC,gBAAgB;;0BAAG,QAAQ;;0BAClC,MAAM;2BAAC,iBAAiB;;0BAAG,QAAQ;;0BACnC,MAAM;2BAAC,oBAAoB;;0BAAG,QAAQ;;0BACtC,MAAM;2BAAC,cAAc;;0BAAG,QAAQ;4FArIgC,YAAY,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,6EAKpC,cAAc,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,+EAKtC,gBAAgB,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,2EAK9C,YAAY,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,gFAKjC,iBAAiB,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,6EAK9C,cAAc,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,8EAKvC,eAAe,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,4EAK3C,aAAa,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC,sEAK7C,OAAO,OAAE,EAAC,IAAI,EAAE,gBAAgB,EAAC;sBAexG,KAAK;uBAAC,EAAC,KAAK,EAAE,eAAe,EAAC;0RA2CkG,mBAAmB,QAAE,EAAC,IAAI,EAAE,WAAW,EAAC,6FAKnD,cAAc,QAAE,EAAC,IAAI,EAAE,WAAW,EAAC,qGAKlB,sBAAsB,QAAE,EAAC,IAAI,EAAE,WAAW,EAAC,kGAOvC,MAAM,QAAE,EAAC,WAAW,EAAE,IAAI,EAAC","sourcesContent":["import {Component, ChangeDetectionStrategy, Input, viewChild, ViewContainerRef, Signal, WritableSignal, signal, Inject, Optional, Type, resolveForwardRef, FactoryProvider, effect, forwardRef, Attribute, ElementRef, computed, input, booleanAttribute, InputSignalWithTransform, ComponentRef, DOCUMENT, TemplateRef, contentChild, contentChildren} from '@angular/core';\nimport {getHostElement, LOGGER, Logger} from '@anglr/common';\nimport {isPresent, RecursivePartial, renderToBody, normalizeAccent} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {InitState, Interactions, InteractionsOptions, KeyboardHandler, KeyboardHandlerOptions, LiveSearch, LiveSearchOptions, NormalState, NormalStateContext, NormalStateOptions, NormalStateTagContext, OptionsGatherer, OptionsHandler, OptionsHandlerOptions, PluginDescription, Popup, PopupContext, PopupOptions, Positioner, PositionerOptions, ReadonlyState, ReadonlyStateOptions, SelectApi, SelectCssClasses, SelectEvents, SelectOption, SelectOptions, SelectOptionState, SelectPlugin, TemplateGatherer, ValueHandler, ValueHandlerOptions} from '../../interfaces';\nimport {INTERACTIONS_TYPE, KEYBOARD_HANDLER_TYPE, LIVE_SEARCH_TYPE, NORMAL_STATE_TYPE, OPTIONS_HANDLER_TYPE, POPUP_TYPE, POSITIONER_TYPE, READONLY_STATE_TYPE, SELECT_OPTIONS, VALUE_HANDLER_TYPE} from '../../misc/tokens';\nimport {SelectPluginType} from '../../misc/enums';\nimport {SelectBus, SelectPluginInstances} from '../../misc/classes';\nimport {CommonPositioner, StaticValueHandler, SimpleInteractions, SimpleOptionsHandler, SimpleKeyboardHandler, SimpleNormalState, SimplePopup, NoLiveSearch} from '../../plugins';\nimport {CopyOptionsAsSignal} from '../../decorators';\nimport {SelectAction, SelectFunction} from '../../misc/types';\nimport {NormalStateTagTemplate, NormalStateTemplate, OptionTemplate} from '../../directives';\nimport {Option} from '../option/option.component';\n\n//TODO: optimize options change detection, currently it is based on reference change, but it could be optimized by checking only changed properties, or by using signals for options properties\n\n/**\n * Default 'SelectOptions'\n */\nconst defaultOptions: Omit<SelectOptions, 'optionsGatherer'|'templateGatherer'> =\n{\n absolute: false,\n multiple: false,\n readonly: false,\n containerElement: 'div.select-component',\n placeholder: 'please select value',\n closeOnSelect: true,\n displaySelectedValue: option => option.text(),\n displayOptionValue: null,\n valueExtractor: (option: SelectOption) => option.value(),\n valueComparer: (source, target) => source === target,\n textExtractor: (option: SelectOption) => option.text(),\n normalize: <TText extends string|undefined|null>(value: TText) => isPresent(value) ? normalizeAccent(value) as TText : value,\n textCompare: (source: string, target: string) => !!source.match(new RegExp(target, 'i')),\n cssClasses:\n {\n visualContainer: 'visual-container',\n selectElement: 'select-component',\n },\n plugins:\n {\n interactions: <PluginDescription<Interactions, InteractionsOptions>>\n {\n type: forwardRef(() => SimpleInteractions),\n },\n keyboardHandler: <PluginDescription<KeyboardHandler, KeyboardHandlerOptions>>\n {\n type: forwardRef(() => SimpleKeyboardHandler),\n },\n liveSearch: <PluginDescription<LiveSearch, LiveSearchOptions>>\n {\n type: forwardRef(() => NoLiveSearch),\n },\n normalState: <PluginDescription<NormalState, NormalStateOptions>>\n {\n type: forwardRef(() => SimpleNormalState),\n },\n optionsHandler: <PluginDescription<OptionsHandler, OptionsHandlerOptions>>\n {\n type: forwardRef(() => SimpleOptionsHandler),\n },\n popup: <PluginDescription<Popup, PopupOptions>>\n {\n type: forwardRef(() => SimplePopup),\n },\n positioner: <PluginDescription<Positioner, PositionerOptions>>\n {\n type: forwardRef(() => CommonPositioner),\n },\n readonlyState: <PluginDescription<ReadonlyState, ReadonlyStateOptions>>\n {\n type: forwardRef(() => SimpleNormalState),\n },\n valueHandler: <PluginDescription<ValueHandler, ValueHandlerOptions>>\n {\n type: forwardRef(() => StaticValueHandler),\n },\n },\n};\n\n/**\n * Component that represents Select itself, allows selection of value from options\n */\n@Component(\n{\n selector: 'ng-select',\n templateUrl: 'select.component.html',\n styleUrl: 'select.component.css',\n host:\n {\n '[class]': 'selectOptions.cssClasses.selectElement',\n },\n providers:\n [\n <FactoryProvider>\n {\n provide: SelectPluginInstances,\n useFactory: () => new SelectPluginInstances(),\n },\n SelectBus,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Select<TValue = unknown, TPublicValue = TValue> implements SelectApi<TValue, TPublicValue, SelectCssClasses>, OptionsGatherer<TValue>, TemplateGatherer<TValue, TPublicValue>\n{\n //######################### protected fields #########################\n\n /**\n * Instance of popup component used for positioning over page body when absolute option is true\n */\n protected popupComponentRef: ComponentRef<Popup<TValue, TPublicValue>>|undefined|null;\n\n /**\n * Object storing current used plugin type\n */\n protected pluginTypes: Record<SelectPluginType, Type<SelectPlugin<unknown, TValue, TPublicValue>>|undefined|null> =\n {\n Interactions: null,\n KeyboardHandler: null,\n LiveSearch: null,\n NormalState: null,\n OptionsHandler: null,\n Popup: null,\n Positioner: null,\n ReadonlyState: null,\n ValueHandler: null,\n };\n\n /**\n * Signal that holds init state of live search plugin\n */\n protected liveSearchInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of interactions plugin\n */\n protected interactionsInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of options handler plugin\n */\n protected optionsHandlerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of positioner plugin\n */\n protected positionerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of keyboard plugin\n */\n protected keyboardInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of value handler plugin\n */\n protected valueHandlerInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of readonly state plugin\n */\n protected readonlyStateInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of normal state plugin\n */\n protected normalStateInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Signal that holds init state of popup plugin\n */\n protected popupInit: WritableSignal<boolean> = signal(false);\n\n /**\n * Initialization state of all plugin init options\n */\n protected optionsInit: Signal<InitState> = computed(() => ({initialized: this.normalStateInit() &&\n this.keyboardInit() &&\n this.popupInit() &&\n this.positionerInit() &&\n this.readonlyStateInit() &&\n this.valueHandlerInit() &&\n this.liveSearchInit() &&\n this.interactionsInit() &&\n this.optionsHandlerInit()}));\n\n /**\n * Information whether is select initialized or not, changes when Select is initialized or reinitialized, if value is false Select was not initialized yet\n */\n protected initializedSignal: WritableSignal<boolean> = signal(false);\n\n //######################### protected properties - children #########################\n\n /**\n * Container used for rendering live search plugin\n */\n protected liveSearchContainer: Signal<ViewContainerRef> = viewChild.required('liveSearch', {read: ViewContainerRef});\n\n /**\n * Container used for rendering interactions plugin\n */\n protected interactionsContainer: Signal<ViewContainerRef> = viewChild.required('interactions', {read: ViewContainerRef});\n\n /**\n * Container used for rendering options handler plugin\n */\n protected optionsHandlerContainer: Signal<ViewContainerRef> = viewChild.required('optionsHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering positioner plugin\n */\n protected positionerContainer: Signal<ViewContainerRef> = viewChild.required('positioner', {read: ViewContainerRef});\n\n /**\n * Container used for rendering keyboard handler plugin\n */\n protected keyboardHandlerContainer: Signal<ViewContainerRef> = viewChild.required('keyboardHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering value handler plugin\n */\n protected valueHandlerContainer: Signal<ViewContainerRef> = viewChild.required('valueHandler', {read: ViewContainerRef});\n\n /**\n * Container used for rendering readonly state plugin\n */\n protected readonlyStateContainer: Signal<ViewContainerRef> = viewChild.required('readonlyState', {read: ViewContainerRef});\n\n /**\n * Container used for rendering normal state plugin\n */\n protected normalStateContainer: Signal<ViewContainerRef> = viewChild.required('normalState', {read: ViewContainerRef});\n\n /**\n * Container used for rendering popup plugin\n */\n protected popupContainer: Signal<ViewContainerRef> = viewChild.required('popup', {read: ViewContainerRef});\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public selectOptions: SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets Select options\n */\n @Input({alias: 'selectOptions'})\n public get selectOptionsInput(): SelectOptions<TValue, TPublicValue, SelectCssClasses>\n {\n return this.selectOptions;\n }\n public set selectOptionsInput(value: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>)\n {\n this.selectOptions = value as SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n }\n\n /**\n * Indication whether should be Select disabled or not\n */\n public disabled: InputSignalWithTransform<boolean, string|boolean> = input<boolean, boolean|string>(false, {transform: booleanAttribute});\n\n /**\n * Indication whether should be Select readonly or not\n */\n public readonly: InputSignalWithTransform<boolean, string|boolean> = input<boolean, boolean|string>(false, {transform: booleanAttribute});\n\n //######################### public properties - implementation of SelectApi #########################\n\n /**\n * @inheritdoc\n */\n public get initialized(): Signal<boolean>\n {\n return this.initializedSignal.asReadonly();\n }\n\n /**\n * @inheritdoc\n */\n public get events(): SelectEvents\n {\n return this.bus;\n }\n\n //######################### public properties - implementation of TemplateGatherer #########################\n\n /**\n * @inheritdoc\n */\n public readonly normalStateTemplate: Signal<TemplateRef<NormalStateContext<TValue, TPublicValue>>|undefined|null> = contentChild(NormalStateTemplate, {read: TemplateRef});\n\n /**\n * @inheritdoc\n */\n public readonly optionTemplate: Signal<TemplateRef<PopupContext<TValue, TPublicValue>>|undefined|null> = contentChild(OptionTemplate, {read: TemplateRef});\n\n /**\n * @inheritdoc\n */\n public readonly normalStateTagTemplate: Signal<TemplateRef<NormalStateTagContext<TValue, TPublicValue>>|undefined|null> = contentChild(NormalStateTagTemplate, {read: TemplateRef});\n\n //######################### public properties - implementation of OptionsGatherer #########################\n\n /**\n * Array of all available options for select\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null> = contentChildren<SelectOptionState<TValue>>(Option, {descendants: true});\n\n //######################### constructors #########################\n constructor(protected pluginInstances: SelectPluginInstances<TValue, TPublicValue>,\n protected bus: SelectBus<TValue, TPublicValue>,\n @Inject(LOGGER) protected logger: Logger,\n element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) document: HTMLDocument,\n @Attribute('multiple') multiple?: string|null,\n @Inject(NORMAL_STATE_TYPE) @Optional() normalStateType?: Type<NormalState<TValue, TPublicValue>>|null,\n @Inject(KEYBOARD_HANDLER_TYPE) @Optional() keyboardHandlerType?: Type<KeyboardHandler<TValue, TPublicValue>>|null,\n @Inject(POPUP_TYPE) @Optional() popupType?: Type<Popup<TValue, TPublicValue>>|null,\n @Inject(POSITIONER_TYPE) @Optional() positionerType?: Type<Positioner<TValue, TPublicValue>>|null,\n @Inject(READONLY_STATE_TYPE) @Optional() readonlyStateType?: Type<ReadonlyState<TValue, TPublicValue>>|null,\n @Inject(VALUE_HANDLER_TYPE) @Optional() valueHandlerType?: Type<ValueHandler<TValue, TPublicValue>>|null,\n @Inject(LIVE_SEARCH_TYPE) @Optional() liveSearchType?: Type<LiveSearch<TValue, TPublicValue>>|null,\n @Inject(INTERACTIONS_TYPE) @Optional() interactionsType?: Type<Interactions<TValue, TPublicValue>>|null,\n @Inject(OPTIONS_HANDLER_TYPE) @Optional() optionsHandlerType?: Type<OptionsHandler<TValue, TPublicValue>>|null,\n @Inject(SELECT_OPTIONS) @Optional() options?: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>|null,)\n {\n //is present (value is not important)\n const multipleDefault = isPresent(multiple);\n const opts: RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>> = deepCopyWithArrayOverride({}, options);\n\n opts.plugins ??= {};\n\n if(keyboardHandlerType)\n {\n opts.plugins.keyboardHandler ??= {};\n opts.plugins.keyboardHandler.type = keyboardHandlerType;\n }\n\n if(normalStateType)\n {\n opts.plugins.normalState ??= {};\n opts.plugins.normalState.type = normalStateType;\n }\n\n if(popupType)\n {\n opts.plugins.popup ??= {};\n opts.plugins.popup.type = popupType;\n }\n\n if(positionerType)\n {\n opts.plugins.positioner ??= {};\n opts.plugins.positioner.type = positionerType;\n }\n\n if(readonlyStateType)\n {\n opts.plugins.readonlyState ??= {};\n opts.plugins.readonlyState.type = readonlyStateType;\n }\n\n if(valueHandlerType)\n {\n opts.plugins.valueHandler ??= {};\n opts.plugins.valueHandler.type = valueHandlerType;\n }\n\n if(liveSearchType)\n {\n opts.plugins.liveSearch ??= {};\n opts.plugins.liveSearch.type = liveSearchType;\n }\n\n if(interactionsType)\n {\n opts.plugins.interactions ??= {};\n opts.plugins.interactions.type = interactionsType;\n }\n\n if(optionsHandlerType)\n {\n opts.plugins.optionsHandler ??= {};\n opts.plugins.optionsHandler.type = optionsHandlerType;\n }\n\n this.selectOptions = deepCopyWithArrayOverride(\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n optionsGatherer: this,\n templateGatherer: this,\n },\n defaultOptions as SelectOptions<TValue, TPublicValue, SelectCssClasses>,\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n multiple: multipleDefault,\n },\n opts);\n\n this.logger.verbose('Select: ctor options initialized {{@(4)options}}', {options: this.selectOptions});\n\n bus.selectElement = signal(element).asReadonly();\n bus.selectOptions = computed(() => this.selectOptions);\n\n //dynamic update of readonly state in options\n effect(() =>\n {\n const readonly = this.readonly() || this.disabled();\n\n this.selectOptions =\n <RecursivePartial<SelectOptions<TValue, TPublicValue, SelectCssClasses>>>\n {\n readonly: readonly,\n } as SelectOptions<TValue, TPublicValue, SelectCssClasses>;\n\n this.logger.verbose('Select: readonly updated {{readonly}}', {readonly});\n });\n\n //create and initialize options for static plugins\n effect(async () =>\n {\n const selectOptions = this.selectOptions;\n const liveSearchContainer = this.liveSearchContainer();\n const interactionsContainer = this.interactionsContainer();\n const optionsHandlerContainer = this.optionsHandlerContainer();\n const positionerContainer = this.positionerContainer();\n const keyboardHandlerContainer = this.keyboardHandlerContainer();\n const valueHandlerContainer = this.valueHandlerContainer();\n\n await this.createPlugin(selectOptions.plugins?.liveSearch, SelectPluginType.LiveSearch, liveSearchContainer, this.liveSearchInit);\n await this.createPlugin(selectOptions.plugins?.interactions, SelectPluginType.Interactions, interactionsContainer, this.interactionsInit);\n await this.createPlugin(selectOptions.plugins?.optionsHandler, SelectPluginType.OptionsHandler, optionsHandlerContainer, this.optionsHandlerInit);\n await this.createPlugin(selectOptions.plugins?.positioner, SelectPluginType.Positioner, positionerContainer, this.positionerInit);\n await this.createPlugin(selectOptions.plugins?.keyboardHandler, SelectPluginType.KeyboardHandler, keyboardHandlerContainer, this.keyboardInit);\n await this.createPlugin(selectOptions.plugins?.valueHandler, SelectPluginType.ValueHandler, valueHandlerContainer, this.valueHandlerInit);\n });\n\n //create and initialize options for state plugins (normal and readonly)\n effect(() =>\n {\n const readonlyStateContainer = this.readonlyStateContainer();\n const normalStateContainer = this.normalStateContainer();\n const selectOptions = this.selectOptions;\n\n if(selectOptions.readonly)\n {\n this.destroyPlugin(SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);\n this.normalStateInit.set(true);\n this.createPlugin(this.selectOptions.plugins?.readonlyState, SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);\n }\n else\n {\n this.destroyPlugin(SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);\n this.readonlyStateInit.set(true);\n this.createPlugin(this.selectOptions.plugins?.normalState, SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);\n }\n });\n\n //create and initialize options for popup plugin, allows absolute positioning\n effect(() =>\n {\n const selectOptions = this.selectOptions;\n const popupContainer = this.popupContainer();\n\n this.destroyPlugin(SelectPluginType.Popup, popupContainer, this.popupInit);\n this.createPlugin(this.selectOptions.plugins?.popup, SelectPluginType.Popup, this.popupContainer(), this.popupInit);\n\n if(selectOptions.absolute && this.popupComponentRef)\n {\n const element = getHostElement(this.popupComponentRef);\n\n if(!element)\n {\n throw new Error('Could not get element of popup component');\n }\n\n renderToBody(document, element, selectOptions.containerElement);\n }\n });\n\n //initialize plugins when all options are initialized\n effect(() =>\n {\n this.initializedSignal.set(false);\n\n if(this.optionsInit().initialized)\n {\n this.initializedSignal.set(true);\n }\n });\n }\n\n //######################### public methods #########################\n\n /**\n * @inheritdoc\n */\n public getPlugin(pluginType: SelectPluginType.Interactions): Interactions<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.KeyboardHandler): KeyboardHandler<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.LiveSearch): LiveSearch<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.NormalState): NormalState<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.OptionsHandler): OptionsHandler<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.Popup): Popup<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.Positioner): Positioner<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.ReadonlyState): ReadonlyState<TValue, TPublicValue>;\n public getPlugin(pluginType: SelectPluginType.ValueHandler): ValueHandler<TValue, TPublicValue>;\n public getPlugin<PluginInstance extends SelectPlugin<unknown, TValue, TPublicValue>>(pluginType: SelectPluginType): PluginInstance\n {\n return this.pluginInstances[pluginType] as PluginInstance;\n }\n\n /**\n * @inheritdoc\n */\n public execute(...actions: SelectAction<TValue, TPublicValue, SelectCssClasses>[])\n {\n if(!actions)\n {\n return;\n }\n\n actions.forEach(action => action(this));\n }\n\n /**\n * @inheritdoc\n */\n public executeAndReturn<TResult>(func: SelectFunction<TResult, TValue, TPublicValue, SelectCssClasses>): TResult\n {\n if(!func)\n {\n throw new Error('Function is required');\n }\n\n return func(this);\n }\n\n // //######################### protected methods #########################\n\n /**\n * Creates plugin\n * @param pluginDescription - Information about plugin that should be created\n * @param pluginType - Key of plugin used for pluginInstances\n * @param pluginViewContainer - Container where should be plugin created\n * @param initOptions - Signal that hold information about init options state for this plugin\n */\n protected async createPlugin<TPlugin extends SelectPlugin<unknown, TValue, TPublicValue>>(pluginDescription: PluginDescription<TPlugin>|undefined|null,\n pluginType: SelectPluginType,\n pluginViewContainer: ViewContainerRef,\n initOptions: WritableSignal<boolean>,): Promise<void>\n {\n this.logger.verbose('Select: creating plugin \"{{type}}\", with type \"{{typ}}\"', {type: pluginType, typ: pluginDescription?.type});\n\n if(!pluginDescription?.type)\n {\n this.destroyPlugin(pluginType, pluginViewContainer, initOptions);\n\n return;\n }\n\n const type = resolveForwardRef(pluginDescription.type);\n\n //new type provided\n if(type != this.pluginTypes[pluginType])\n {\n this.logger.verbose('Select: creating plugin instance for \"{{type}}\"', {type: pluginType});\n\n initOptions.set(false);\n this.pluginTypes[pluginType] = type;\n pluginViewContainer.clear();\n\n const component = pluginViewContainer.createComponent(type);\n component.changeDetectorRef.detectChanges();\n this.pluginInstances[pluginType] = component.instance;\n\n if(pluginType == SelectPluginType.Popup)\n {\n this.popupComponentRef = component as ComponentRef<Popup<TValue, TPublicValue>>;\n }\n }\n\n //options are available, set them\n if(pluginDescription.options)\n {\n this.logger.verbose('Select: setting options for \"{{type}}\" plugin, options: {{@(4)options}}', {type: pluginType, options: pluginDescription.options});\n\n initOptions.set(false);\n this.pluginInstances[pluginType].options = pluginDescription.options;\n }\n\n this.logger.verbose('Select: options initialized for \"{{type}}\" plugin', {type: pluginType});\n initOptions.set(true);\n }\n\n /**\n * Destroys plugin\n * @param pluginType - Plugin type to be destroyed\n * @param plugiViewContainer - Container which will be emptied\n * @param initOptions - Signal that hold information about init options state for this plugin\n */\n protected destroyPlugin(pluginType: SelectPluginType,\n pluginViewContainer: ViewContainerRef,\n initOptions: WritableSignal<boolean>,): void\n {\n if(pluginType == SelectPluginType.Popup)\n {\n this.popupComponentRef = null;\n }\n\n this.logger.verbose('Select: destroying plugin \"{{type}}\"', {type: pluginType});\n\n pluginViewContainer.clear();\n initOptions.set(false);\n this.pluginTypes[pluginType] = null;\n }\n}\n","<ng-container #liveSearch />\r\n<ng-container #interactions />\r\n<ng-container #optionsHandler />\r\n<ng-container #positioner />\r\n<ng-container #keyboardHandler />\r\n<ng-container #valueHandler />\r\n\r\n<div [class]=\"selectOptions.cssClasses.visualContainer\">\r\n <ng-container #readonlyState />\r\n <ng-container #normalState />\r\n <ng-container #popup />\r\n</div>\r\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { computed, Directive, inject } from '@angular/core';
|
|
2
|
+
import { Select } from '../../components';
|
|
3
|
+
import { SelectPluginType } from '../../misc/enums';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Directive that manages highlighting for popup
|
|
7
|
+
*/
|
|
8
|
+
export class HighlightInstance {
|
|
9
|
+
//######################### constructor #########################
|
|
10
|
+
constructor() {
|
|
11
|
+
//######################### protected fields #########################
|
|
12
|
+
/**
|
|
13
|
+
* Instance of select component
|
|
14
|
+
*/
|
|
15
|
+
this.select = inject(Select);
|
|
16
|
+
/**
|
|
17
|
+
* Shared instance of highlight
|
|
18
|
+
*/
|
|
19
|
+
this.highlight = new Highlight();
|
|
20
|
+
//######################### public properties #########################
|
|
21
|
+
/**
|
|
22
|
+
* Signal that represents current search query
|
|
23
|
+
*/
|
|
24
|
+
this.searchQuery = computed(() => {
|
|
25
|
+
if (!this.select.initialized()) {
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
const liveSearch = this.select.getPlugin(SelectPluginType.LiveSearch);
|
|
29
|
+
return liveSearch.search();
|
|
30
|
+
}, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "searchQuery" }] : /* istanbul ignore next */ []));
|
|
32
|
+
/**
|
|
33
|
+
* Indication whether highlighting is enabled or not
|
|
34
|
+
*/
|
|
35
|
+
this.enabled = computed(() => {
|
|
36
|
+
if (!CSS.highlights || !this.select.initialized()) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const popup = this.select.getPlugin(SelectPluginType.Popup);
|
|
40
|
+
return popup.options.searchHighlighting;
|
|
41
|
+
}, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
|
|
43
|
+
CSS.highlights.set('search-query', this.highlight);
|
|
44
|
+
}
|
|
45
|
+
//######################### public methods - implementation of OnDestroy #########################
|
|
46
|
+
/**
|
|
47
|
+
* @inheritdoc
|
|
48
|
+
*/
|
|
49
|
+
ngOnDestroy() {
|
|
50
|
+
CSS.highlights.delete('search-query');
|
|
51
|
+
}
|
|
52
|
+
//######################### public methods #########################
|
|
53
|
+
/**
|
|
54
|
+
* Registers ranges for highlighting
|
|
55
|
+
* @param ranges - Ranges to be registered for highlighting
|
|
56
|
+
*/
|
|
57
|
+
registerHighlightRanges(ranges) {
|
|
58
|
+
for (const range of ranges) {
|
|
59
|
+
this.highlight.add(range);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Unregisters ranges from highlighting
|
|
64
|
+
* @param ranges - Ranges to be unregistered from highlighting
|
|
65
|
+
*/
|
|
66
|
+
unregisterHighlightRanges(ranges) {
|
|
67
|
+
for (const range of ranges) {
|
|
68
|
+
this.highlight.delete(range);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: HighlightInstance, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
72
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.4", type: HighlightInstance, isStandalone: true, selector: "[highlightInstance]", ngImport: i0 }); }
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: HighlightInstance, decorators: [{
|
|
75
|
+
type: Directive,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: '[highlightInstance]',
|
|
78
|
+
}]
|
|
79
|
+
}], ctorParameters: () => [] });
|
|
80
|
+
//# sourceMappingURL=highlightInstance.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlightInstance.directive.js","sourceRoot":"","sources":["../../../../src/directives/highlightInstance/highlightInstance.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAoB,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAC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K,IAAI,MAAM,EACzB,CAAC;YACG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,yBAAyB,CAAC,MAAe;QAE5C,KAAI,MAAM,KAAK,IAAI,MAAM,EACzB,CAAC;YACG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACL,CAAC;8GAtFQ,iBAAiB;kGAAjB,iBAAiB;;2FAAjB,iBAAiB;kBAJ7B,SAAS;mBACV;oBACI,QAAQ,EAAE,qBAAqB;iBAClC","sourcesContent":["import {computed, Directive, inject, OnDestroy, Signal} from '@angular/core';\n\nimport {Select} from '../../components';\nimport {SelectPluginType} from '../../misc/enums';\n\n/**\n * Directive that manages highlighting for popup\n */\n@Directive(\n{\n selector: '[highlightInstance]',\n})\nexport class HighlightInstance<TValue = unknown, TPublicValue = TValue> implements OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of select component\n */\n protected select: Select<TValue, TPublicValue> = inject(Select);\n\n /**\n * Shared instance of highlight\n */\n protected highlight: Highlight = new Highlight();\n\n //######################### public properties #########################\n\n /**\n * Signal that represents current search query\n */\n public searchQuery: Signal<string> = computed(() =>\n {\n if(!this.select.initialized())\n {\n return '';\n }\n\n const liveSearch = this.select.getPlugin(SelectPluginType.LiveSearch);\n\n return liveSearch.search();\n });\n\n /**\n * Indication whether highlighting is enabled or not\n */\n public enabled: Signal<boolean> = computed(() =>\n {\n if(!CSS.highlights ||!this.select.initialized())\n {\n return false;\n }\n\n const popup = this.select.getPlugin(SelectPluginType.Popup);\n\n return popup.options.searchHighlighting;\n });\n\n //######################### constructor #########################\n constructor()\n {\n CSS.highlights.set('search-query', this.highlight);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * @inheritdoc\n */\n public ngOnDestroy(): void\n {\n CSS.highlights.delete('search-query');\n }\n\n //######################### public methods #########################\n\n /**\n * Registers ranges for highlighting\n * @param ranges - Ranges to be registered for highlighting\n */\n public registerHighlightRanges(ranges: Range[]): void\n {\n for(const range of ranges)\n {\n this.highlight.add(range);\n }\n }\n\n /**\n * Unregisters ranges from highlighting\n * @param ranges - Ranges to be unregistered from highlighting\n */\n public unregisterHighlightRanges(ranges: Range[]): void\n {\n for(const range of ranges)\n {\n this.highlight.delete(range);\n }\n }\n}\n"]}
|