@anglr/select 15.0.0 → 16.0.0-beta.20260226142137
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 +153 -0
- package/es2022/extensions/src/extensions/getValue.js +16 -1
- package/es2022/extensions/src/extensions/getValue.js.map +1 -1
- package/es2022/extensions/src/extensions/onFocus.js +14 -1
- package/es2022/extensions/src/extensions/onFocus.js.map +1 -1
- package/es2022/extensions/src/extensions/patchOptions.js +15 -11
- package/es2022/extensions/src/extensions/patchOptions.js.map +1 -1
- package/es2022/extensions/src/extensions/reinitializeOptions.js +19 -14
- package/es2022/extensions/src/extensions/reinitializeOptions.js.map +1 -1
- package/es2022/extensions/src/extensions/setReadonly.js +21 -1
- package/es2022/extensions/src/extensions/setReadonly.js.map +1 -1
- package/es2022/extensions/src/extensions/setValue.js +17 -1
- package/es2022/extensions/src/extensions/setValue.js.map +1 -1
- package/es2022/extensions/src/extensions/valueChange.js +17 -1
- package/es2022/extensions/src/extensions/valueChange.js.map +1 -1
- package/es2022/extensions/src/index.js +1 -7
- package/es2022/extensions/src/index.js.map +1 -1
- package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.component.js +100 -72
- package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.component.js.map +1 -1
- package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.interface.js +26 -1
- package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.interface.js.map +1 -1
- package/es2022/material/src/components/basicDialogPopup/index.js +2 -1
- package/es2022/material/src/components/basicDialogPopup/index.js.map +1 -1
- package/es2022/material/src/components/basicDialogPopup/types.js +2 -1
- package/es2022/material/src/components/basicDialogPopup/types.js.map +1 -1
- package/es2022/material/src/directives/dialogPopup/dialogPopup.directive.js +73 -74
- package/es2022/material/src/directives/dialogPopup/dialogPopup.directive.js.map +1 -1
- package/es2022/material/src/index.js +1 -7
- package/es2022/material/src/index.js.map +1 -1
- package/es2022/material/src/modules/dialogPopup.module.js +33 -40
- package/es2022/material/src/modules/dialogPopup.module.js.map +1 -1
- package/es2022/material/src/modules/virtualEditPopup.module.js +27 -30
- package/es2022/material/src/modules/virtualEditPopup.module.js.map +1 -1
- package/es2022/material/src/plugins/popup/dialog/dialogPopup.component.js +172 -140
- package/es2022/material/src/plugins/popup/dialog/dialogPopup.component.js.map +1 -1
- package/es2022/material/src/plugins/popup/dialog/dialogPopup.interface.js +65 -1
- package/es2022/material/src/plugins/popup/dialog/dialogPopup.interface.js.map +1 -1
- package/es2022/material/src/plugins/popup/index.js +1 -2
- package/es2022/material/src/plugins/popup/index.js.map +1 -1
- package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +120 -88
- package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js.map +1 -1
- package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.js +20 -1
- package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.js.map +1 -1
- package/es2022/src/components/index.js +4 -0
- package/es2022/src/components/index.js.map +1 -0
- package/es2022/src/components/option/option.component.js +22 -19
- package/es2022/src/components/option/option.component.js.map +1 -1
- package/es2022/src/components/optionGroup/optgroup.component.js +29 -0
- package/es2022/src/components/optionGroup/optgroup.component.js.map +1 -0
- package/es2022/src/components/select/select.component.js +356 -450
- package/es2022/src/components/select/select.component.js.map +1 -1
- package/es2022/src/decorators/index.js +2 -0
- package/es2022/src/decorators/index.js.map +1 -0
- package/es2022/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.js +12 -0
- package/es2022/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.js.map +1 -0
- package/es2022/src/directives/index.js +5 -0
- package/es2022/src/directives/index.js.map +1 -0
- package/es2022/src/directives/normalStateTemplate/normalStateTemplate.directive.js +30 -0
- package/es2022/src/directives/normalStateTemplate/normalStateTemplate.directive.js.map +1 -0
- package/es2022/src/directives/optionTemplate/optionTemplate.directive.js +30 -0
- package/es2022/src/directives/optionTemplate/optionTemplate.directive.js.map +1 -0
- package/es2022/src/directives/selectAbsolute/selectAbsolute.directive.js +25 -0
- package/es2022/src/directives/selectAbsolute/selectAbsolute.directive.js.map +1 -0
- package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js +210 -0
- package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js.map +1 -0
- package/es2022/src/directives/selectEdit/selectEdit.directive.js +51 -0
- package/es2022/src/directives/selectEdit/selectEdit.directive.js.map +1 -0
- package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js +48 -0
- package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js.map +1 -0
- package/es2022/src/directives/withDirectAccess/withDirectAccess.directive.js +17 -0
- package/es2022/src/directives/withDirectAccess/withDirectAccess.directive.js.map +1 -0
- package/es2022/src/index.js +8 -41
- package/es2022/src/index.js.map +1 -1
- package/es2022/src/interfaces/index.js +20 -0
- package/es2022/src/interfaces/index.js.map +1 -0
- package/es2022/src/interfaces/initState/initState.interface.js +2 -0
- package/es2022/src/interfaces/initState/initState.interface.js.map +1 -0
- package/es2022/src/interfaces/normalStateContext/normalStateContext.interface.js +2 -0
- package/es2022/src/interfaces/normalStateContext/normalStateContext.interface.js.map +1 -0
- package/es2022/src/interfaces/optionsGatherer/optionsGatherer.interface.js +2 -0
- package/es2022/src/interfaces/optionsGatherer/optionsGatherer.interface.js.map +1 -0
- package/es2022/src/interfaces/pluginDescription/pluginDescription.interface.js +2 -0
- package/es2022/src/interfaces/pluginDescription/pluginDescription.interface.js.map +1 -0
- package/es2022/src/interfaces/pluginOptions/pluginOptions.interface.js +2 -0
- package/es2022/src/interfaces/pluginOptions/pluginOptions.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/index.js +10 -0
- package/es2022/src/interfaces/plugins/index.js.map +1 -0
- package/es2022/src/interfaces/plugins/interactions/interactions.interface.js +2 -0
- package/es2022/src/interfaces/plugins/interactions/interactions.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/liveSearch/liveSearch.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/normalState/normalState.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/optionsHandler/optionsHandler.interface.js +2 -0
- package/es2022/src/interfaces/plugins/optionsHandler/optionsHandler.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/popup/popup.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/positioner/positioner.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/readonlyState/readonlyState.interface.js.map +1 -0
- package/es2022/src/interfaces/plugins/valueHandler/valueHandler.interface.js.map +1 -0
- package/es2022/src/interfaces/popupContext/popupContext.interface.js +2 -0
- package/es2022/src/interfaces/popupContext/popupContext.interface.js.map +1 -0
- package/es2022/src/interfaces/selectApi/selectApi.interface.js +2 -0
- package/es2022/src/interfaces/selectApi/selectApi.interface.js.map +1 -0
- package/es2022/src/interfaces/selectBusOptions/selectBusOptions.interface.js +2 -0
- package/es2022/src/interfaces/selectBusOptions/selectBusOptions.interface.js.map +1 -0
- package/es2022/src/interfaces/selectCssClasses/selectCssClasses.interface.js +2 -0
- package/es2022/src/interfaces/selectCssClasses/selectCssClasses.interface.js.map +1 -0
- package/es2022/src/interfaces/selectEvent/selectEvent.interface.js +2 -0
- package/es2022/src/interfaces/selectEvent/selectEvent.interface.js.map +1 -0
- package/es2022/src/interfaces/selectEvents/selectEvents.interface.js +2 -0
- package/es2022/src/interfaces/selectEvents/selectEvents.interface.js.map +1 -0
- package/es2022/src/interfaces/selectOption/selectOption.interface.js +2 -0
- package/es2022/src/interfaces/selectOption/selectOption.interface.js.map +1 -0
- package/es2022/src/interfaces/selectOptionGroup/selectOptionGroup.interface.js +2 -0
- package/es2022/src/interfaces/selectOptionGroup/selectOptionGroup.interface.js.map +1 -0
- package/es2022/src/interfaces/selectOptions/selectOptions.interface.js +2 -0
- package/es2022/src/interfaces/selectOptions/selectOptions.interface.js.map +1 -0
- package/es2022/src/interfaces/selectPlugin/selectPlugin.interface.js +2 -0
- package/es2022/src/interfaces/selectPlugin/selectPlugin.interface.js.map +1 -0
- package/es2022/src/interfaces/selectPluginTypes/selectPluginTypes.interface.js +2 -0
- package/es2022/src/interfaces/selectPluginTypes/selectPluginTypes.interface.js.map +1 -0
- package/es2022/src/interfaces/templateGatherer/templateGatherer.interface.js.map +1 -0
- package/es2022/src/interfaces/visualPluginOptions/visualPluginOptions.interface.js +2 -0
- package/es2022/src/interfaces/visualPluginOptions/visualPluginOptions.interface.js.map +1 -0
- package/es2022/src/misc/classes/index.js +3 -0
- package/es2022/src/misc/classes/index.js.map +1 -0
- package/es2022/src/misc/{pluginBus/pluginBus.js → classes/selectBus/selectBus.js} +17 -8
- package/es2022/src/misc/classes/selectBus/selectBus.js.map +1 -0
- package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js +163 -0
- package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js.map +1 -0
- package/es2022/src/misc/enums.js +43 -0
- package/es2022/src/misc/enums.js.map +1 -0
- package/es2022/src/misc/extensions/getValue.js +16 -11
- package/es2022/src/misc/extensions/getValue.js.map +1 -1
- package/es2022/src/misc/extensions/index.js +6 -5
- package/es2022/src/misc/extensions/index.js.map +1 -1
- package/es2022/src/misc/extensions/onFocus.js +14 -9
- package/es2022/src/misc/extensions/onFocus.js.map +1 -1
- package/es2022/src/misc/extensions/setReadonly.js +22 -17
- package/es2022/src/misc/extensions/setReadonly.js.map +1 -1
- package/es2022/src/misc/extensions/setValue.js +17 -12
- package/es2022/src/misc/extensions/setValue.js.map +1 -1
- package/es2022/src/misc/extensions/valueChange.js +17 -11
- package/es2022/src/misc/extensions/valueChange.js.map +1 -1
- package/es2022/src/misc/ngSelectOptions.interface.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/codeOptionsGatherer.js +119 -82
- package/es2022/src/misc/optionsGatherer/codeOptionsGatherer.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.js +31 -1
- package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.js +178 -117
- package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/excludingOptionsGatherer.js +155 -109
- package/es2022/src/misc/optionsGatherer/excludingOptionsGatherer.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/optionsGatherer.interface.js +55 -1
- package/es2022/src/misc/optionsGatherer/optionsGatherer.interface.js.map +1 -1
- package/es2022/src/misc/optionsGatherer/types.js +4 -3
- package/es2022/src/misc/optionsGatherer/types.js.map +1 -1
- package/es2022/src/misc/providers.js +102 -0
- package/es2022/src/misc/providers.js.map +1 -0
- package/es2022/src/misc/tokens.js +78 -0
- package/es2022/src/misc/tokens.js.map +1 -0
- package/es2022/src/misc/types.js +1 -33
- package/es2022/src/misc/types.js.map +1 -1
- package/es2022/src/modules/index.js +2 -0
- package/es2022/src/modules/index.js.map +1 -0
- package/es2022/src/modules/ngSelect.module.js +31 -75
- package/es2022/src/modules/ngSelect.module.js.map +1 -1
- package/es2022/src/modules/ngSelectEdit.module.js +39 -50
- package/es2022/src/modules/ngSelectEdit.module.js.map +1 -1
- package/es2022/src/pipes/getPlugin/getPlugin.pipe.js +17 -0
- package/es2022/src/pipes/getPlugin/getPlugin.pipe.js.map +1 -0
- package/es2022/src/pipes/index.js +4 -0
- package/es2022/src/pipes/index.js.map +1 -0
- package/es2022/src/pipes/{ngSelectHasValue.pipe.js → selectHasValue/selectHasValue.pipe.js} +7 -7
- package/es2022/src/pipes/selectHasValue/selectHasValue.pipe.js.map +1 -0
- package/es2022/src/pipes/selectValue/selectValue.pipe.js +31 -0
- package/es2022/src/pipes/selectValue/selectValue.pipe.js.map +1 -0
- package/es2022/src/plugins/index.js +10 -0
- package/es2022/src/plugins/index.js.map +1 -0
- package/es2022/src/plugins/interactions/index.js +2 -0
- package/es2022/src/plugins/interactions/index.js.map +1 -0
- package/es2022/src/plugins/interactions/noInteractions/noInteractions.component.js +36 -0
- package/es2022/src/plugins/interactions/noInteractions/noInteractions.component.js.map +1 -0
- package/es2022/src/plugins/keyboardHandler/index.js +1 -3
- package/es2022/src/plugins/keyboardHandler/index.js.map +1 -1
- package/es2022/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.js +36 -0
- package/es2022/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.js.map +1 -0
- package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js +36 -0
- package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js.map +1 -0
- package/es2022/src/plugins/liveSearch/index.js +2 -4
- package/es2022/src/plugins/liveSearch/index.js.map +1 -1
- package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js +36 -0
- package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js.map +1 -0
- package/es2022/src/plugins/normalState/index.js +1 -3
- package/es2022/src/plugins/normalState/index.js.map +1 -1
- package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js +36 -0
- package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js.map +1 -0
- package/es2022/src/plugins/optionsHandler/index.js +2 -0
- package/es2022/src/plugins/optionsHandler/index.js.map +1 -0
- package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js +50 -0
- package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js.map +1 -0
- package/es2022/src/plugins/popup/index.js +1 -3
- package/es2022/src/plugins/popup/index.js.map +1 -1
- package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js +36 -0
- package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js.map +1 -0
- package/es2022/src/plugins/positioner/basicPositioner/basicPositioner.component.js +36 -0
- package/es2022/src/plugins/positioner/basicPositioner/basicPositioner.component.js.map +1 -0
- package/es2022/src/plugins/positioner/index.js +1 -3
- package/es2022/src/plugins/positioner/index.js.map +1 -1
- package/es2022/src/plugins/readonlyState/index.js +1 -1
- package/es2022/src/plugins/readonlyState/index.js.map +1 -1
- package/es2022/src/plugins/valueHandler/index.js +1 -4
- package/es2022/src/plugins/valueHandler/index.js.map +1 -1
- package/es2022/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.js +81 -0
- package/es2022/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.js.map +1 -0
- package/extensions/src/extensions/getValue.d.ts +0 -1
- package/extensions/src/extensions/getValue.d.ts.map +1 -1
- package/extensions/src/extensions/onFocus.d.ts +0 -1
- package/extensions/src/extensions/onFocus.d.ts.map +1 -1
- package/extensions/src/extensions/patchOptions.d.ts +0 -6
- package/extensions/src/extensions/patchOptions.d.ts.map +1 -1
- package/extensions/src/extensions/reinitializeOptions.d.ts +0 -6
- package/extensions/src/extensions/reinitializeOptions.d.ts.map +1 -1
- package/extensions/src/extensions/setReadonly.d.ts +0 -1
- package/extensions/src/extensions/setReadonly.d.ts.map +1 -1
- package/extensions/src/extensions/setValue.d.ts +0 -1
- package/extensions/src/extensions/setValue.d.ts.map +1 -1
- package/extensions/src/extensions/valueChange.d.ts +0 -1
- package/extensions/src/extensions/valueChange.d.ts.map +1 -1
- package/extensions/src/index.d.ts +1 -7
- package/extensions/src/index.d.ts.map +1 -1
- package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts +0 -46
- package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts.map +1 -1
- package/material/src/components/basicDialogPopup/basicDialogPopup.interface.d.ts +0 -23
- package/material/src/components/basicDialogPopup/basicDialogPopup.interface.d.ts.map +1 -1
- package/material/src/components/basicDialogPopup/index.d.ts +0 -1
- package/material/src/components/basicDialogPopup/index.d.ts.map +1 -1
- package/material/src/components/basicDialogPopup/types.d.ts +0 -1
- package/material/src/components/basicDialogPopup/types.d.ts.map +1 -1
- package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts +0 -26
- package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts.map +1 -1
- package/material/src/index.d.ts +1 -7
- package/material/src/index.d.ts.map +1 -1
- package/material/src/modules/dialogPopup.module.d.ts +0 -14
- package/material/src/modules/dialogPopup.module.d.ts.map +1 -1
- package/material/src/modules/virtualEditPopup.module.d.ts +0 -12
- package/material/src/modules/virtualEditPopup.module.d.ts.map +1 -1
- package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts +0 -82
- package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts.map +1 -1
- package/material/src/plugins/popup/dialog/dialogPopup.interface.d.ts +0 -59
- package/material/src/plugins/popup/dialog/dialogPopup.interface.d.ts.map +1 -1
- package/material/src/plugins/popup/index.d.ts +1 -2
- package/material/src/plugins/popup/index.d.ts.map +1 -1
- package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts +0 -29
- package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts.map +1 -1
- package/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.d.ts +0 -16
- package/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.d.ts.map +1 -1
- package/package.json +27 -19
- package/src/components/index.d.ts +4 -0
- package/src/components/index.d.ts.map +1 -0
- package/src/components/option/option.component.d.ts +15 -14
- package/src/components/option/option.component.d.ts.map +1 -1
- package/src/components/optionGroup/optgroup.component.d.ts +25 -0
- package/src/components/optionGroup/optgroup.component.d.ts.map +1 -0
- package/src/components/select/select.component.css +5 -0
- package/src/components/select/select.component.d.ts +94 -179
- package/src/components/select/select.component.d.ts.map +1 -1
- package/src/components/select/select.component.html +10 -16
- package/src/decorators/index.d.ts +2 -0
- package/src/{components/select → decorators}/index.d.ts.map +1 -1
- package/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.d.ts +5 -0
- package/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.d.ts.map +1 -0
- package/src/directives/index.d.ts +5 -0
- package/src/directives/index.d.ts.map +1 -0
- package/src/directives/normalStateTemplate/normalStateTemplate.directive.d.ts +19 -0
- package/src/directives/normalStateTemplate/normalStateTemplate.directive.d.ts.map +1 -0
- package/src/directives/optionTemplate/optionTemplate.directive.d.ts +19 -0
- package/src/directives/optionTemplate/optionTemplate.directive.d.ts.map +1 -0
- package/src/directives/selectAbsolute/selectAbsolute.directive.d.ts +12 -0
- package/src/directives/selectAbsolute/selectAbsolute.directive.d.ts.map +1 -0
- package/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.d.ts +1 -0
- package/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.d.ts.map +1 -0
- package/src/directives/selectEdit/selectEdit.directive.d.ts +1 -0
- package/src/directives/selectEdit/selectEdit.directive.d.ts.map +1 -0
- package/src/directives/selectPlaceholder/selectPlaceholder.directive.d.ts +1 -0
- package/src/directives/selectPlaceholder/selectPlaceholder.directive.d.ts.map +1 -0
- package/src/directives/withDirectAccess/withDirectAccess.directive.d.ts +9 -0
- package/src/directives/withDirectAccess/withDirectAccess.directive.d.ts.map +1 -0
- package/src/index.d.ts +8 -41
- package/src/index.d.ts.map +1 -1
- package/src/interfaces/index.d.ts +20 -0
- package/src/interfaces/index.d.ts.map +1 -0
- package/src/interfaces/initState/initState.interface.d.ts +10 -0
- package/src/interfaces/initState/initState.interface.d.ts.map +1 -0
- package/src/interfaces/normalStateContext/normalStateContext.interface.d.ts +11 -0
- package/src/interfaces/normalStateContext/normalStateContext.interface.d.ts.map +1 -0
- package/src/interfaces/optionsGatherer/optionsGatherer.interface.d.ts +12 -0
- package/src/interfaces/optionsGatherer/optionsGatherer.interface.d.ts.map +1 -0
- package/src/interfaces/pluginDescription/pluginDescription.interface.d.ts +21 -0
- package/src/interfaces/pluginDescription/pluginDescription.interface.d.ts.map +1 -0
- package/src/interfaces/pluginOptions/pluginOptions.interface.d.ts +6 -0
- package/src/interfaces/pluginOptions/pluginOptions.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/index.d.ts +10 -0
- package/src/interfaces/plugins/index.d.ts.map +1 -0
- package/src/interfaces/plugins/interactions/interactions.interface.d.ts +13 -0
- package/src/interfaces/plugins/interactions/interactions.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.d.ts +13 -0
- package/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/liveSearch/liveSearch.interface.d.ts +13 -0
- package/src/interfaces/plugins/liveSearch/liveSearch.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/normalState/normalState.interface.d.ts +31 -0
- package/src/interfaces/plugins/normalState/normalState.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/optionsHandler/optionsHandler.interface.d.ts +19 -0
- package/src/interfaces/plugins/optionsHandler/optionsHandler.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/popup/popup.interface.d.ts +13 -0
- package/src/interfaces/plugins/popup/popup.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/positioner/positioner.interface.d.ts +13 -0
- package/src/interfaces/plugins/positioner/positioner.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/readonlyState/readonlyState.interface.d.ts +12 -0
- package/src/interfaces/plugins/readonlyState/readonlyState.interface.d.ts.map +1 -0
- package/src/interfaces/plugins/valueHandler/valueHandler.interface.d.ts +23 -0
- package/src/interfaces/plugins/valueHandler/valueHandler.interface.d.ts.map +1 -0
- package/src/interfaces/popupContext/popupContext.interface.d.ts +16 -0
- package/src/interfaces/popupContext/popupContext.interface.d.ts.map +1 -0
- package/src/interfaces/selectApi/selectApi.interface.d.ts +50 -0
- package/src/interfaces/selectApi/selectApi.interface.d.ts.map +1 -0
- package/src/interfaces/selectBusOptions/selectBusOptions.interface.d.ts +29 -0
- package/src/interfaces/selectBusOptions/selectBusOptions.interface.d.ts.map +1 -0
- package/src/interfaces/selectCssClasses/selectCssClasses.interface.d.ts +6 -0
- package/src/interfaces/selectCssClasses/selectCssClasses.interface.d.ts.map +1 -0
- package/src/interfaces/selectEvent/selectEvent.interface.d.ts +20 -0
- package/src/interfaces/selectEvent/selectEvent.interface.d.ts.map +1 -0
- package/src/interfaces/selectEvents/selectEvents.interface.d.ts +37 -0
- package/src/interfaces/selectEvents/selectEvents.interface.d.ts.map +1 -0
- package/src/interfaces/selectOption/selectOption.interface.d.ts +33 -0
- package/src/interfaces/selectOption/selectOption.interface.d.ts.map +1 -0
- package/src/interfaces/selectOptionGroup/selectOptionGroup.interface.d.ts +21 -0
- package/src/interfaces/selectOptionGroup/selectOptionGroup.interface.d.ts.map +1 -0
- package/src/interfaces/selectOptions/selectOptions.interface.d.ts +27 -0
- package/src/interfaces/selectOptions/selectOptions.interface.d.ts.map +1 -0
- package/src/interfaces/selectPlugin/selectPlugin.interface.d.ts +33 -0
- package/src/interfaces/selectPlugin/selectPlugin.interface.d.ts.map +1 -0
- package/src/interfaces/selectPluginTypes/selectPluginTypes.interface.d.ts +44 -0
- package/src/interfaces/selectPluginTypes/selectPluginTypes.interface.d.ts.map +1 -0
- package/src/interfaces/templateGatherer/templateGatherer.interface.d.ts +17 -0
- package/src/interfaces/templateGatherer/templateGatherer.interface.d.ts.map +1 -0
- package/src/interfaces/visualPluginOptions/visualPluginOptions.interface.d.ts +11 -0
- package/src/interfaces/visualPluginOptions/visualPluginOptions.interface.d.ts.map +1 -0
- package/src/misc/classes/index.d.ts +3 -0
- package/src/misc/classes/index.d.ts.map +1 -0
- package/src/misc/classes/selectBus/selectBus.d.ts +54 -0
- package/src/misc/classes/selectBus/selectBus.d.ts.map +1 -0
- package/src/misc/classes/selectPluginInstances/selectPluginInstances.d.ts +90 -0
- package/src/misc/classes/selectPluginInstances/selectPluginInstances.d.ts.map +1 -0
- package/src/misc/enums.d.ts +42 -0
- package/src/misc/enums.d.ts.map +1 -0
- package/src/misc/extensions/getValue.d.ts +0 -6
- package/src/misc/extensions/getValue.d.ts.map +1 -1
- package/src/misc/extensions/index.d.ts +0 -5
- package/src/misc/extensions/index.d.ts.map +1 -1
- package/src/misc/extensions/onFocus.d.ts +0 -7
- package/src/misc/extensions/onFocus.d.ts.map +1 -1
- package/src/misc/extensions/setReadonly.d.ts +0 -7
- package/src/misc/extensions/setReadonly.d.ts.map +1 -1
- package/src/misc/extensions/setValue.d.ts +0 -7
- package/src/misc/extensions/setValue.d.ts.map +1 -1
- package/src/misc/extensions/valueChange.d.ts +0 -7
- package/src/misc/extensions/valueChange.d.ts.map +1 -1
- package/src/misc/ngSelectOptions.interface.d.ts +0 -71
- package/src/misc/ngSelectOptions.interface.d.ts.map +1 -1
- package/src/misc/optionsGatherer/codeOptionsGatherer.d.ts +0 -69
- package/src/misc/optionsGatherer/codeOptionsGatherer.d.ts.map +1 -1
- package/src/misc/optionsGatherer/dynamicOptionsGatherer.d.ts +0 -85
- package/src/misc/optionsGatherer/dynamicOptionsGatherer.d.ts.map +1 -1
- package/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.d.ts +0 -28
- package/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.d.ts.map +1 -1
- package/src/misc/optionsGatherer/excludingOptionsGatherer.d.ts +0 -72
- package/src/misc/optionsGatherer/excludingOptionsGatherer.d.ts.map +1 -1
- package/src/misc/optionsGatherer/optionsGatherer.interface.d.ts +0 -52
- package/src/misc/optionsGatherer/optionsGatherer.interface.d.ts.map +1 -1
- package/src/misc/optionsGatherer/types.d.ts +0 -3
- package/src/misc/optionsGatherer/types.d.ts.map +1 -1
- package/src/misc/providers.d.ts +54 -0
- package/src/misc/providers.d.ts.map +1 -0
- package/src/misc/tokens.d.ts +81 -0
- package/src/misc/tokens.d.ts.map +1 -0
- package/src/misc/types.d.ts +11 -31
- package/src/misc/types.d.ts.map +1 -1
- package/src/modules/index.d.ts +2 -0
- package/src/modules/index.d.ts.map +1 -0
- package/src/modules/ngSelect.module.d.ts +7 -20
- package/src/modules/ngSelect.module.d.ts.map +1 -1
- package/src/modules/ngSelectEdit.module.d.ts +0 -16
- package/src/modules/ngSelectEdit.module.d.ts.map +1 -1
- package/src/pipes/getPlugin/getPlugin.pipe.d.ts +25 -0
- package/src/pipes/getPlugin/getPlugin.pipe.d.ts.map +1 -0
- package/src/pipes/index.d.ts +4 -0
- package/src/pipes/index.d.ts.map +1 -0
- package/src/pipes/selectHasValue/selectHasValue.pipe.d.ts +16 -0
- package/src/pipes/selectHasValue/selectHasValue.pipe.d.ts.map +1 -0
- package/src/pipes/selectValue/selectValue.pipe.d.ts +19 -0
- package/src/pipes/selectValue/selectValue.pipe.d.ts.map +1 -0
- package/src/plugins/index.d.ts +9 -0
- package/src/plugins/index.d.ts.map +1 -0
- package/src/plugins/interactions/index.d.ts +2 -0
- package/src/plugins/interactions/index.d.ts.map +1 -0
- package/src/plugins/interactions/noInteractions/noInteractions.component.d.ts +28 -0
- package/src/plugins/interactions/noInteractions/noInteractions.component.d.ts.map +1 -0
- package/src/plugins/keyboardHandler/index.d.ts +1 -3
- package/src/plugins/keyboardHandler/index.d.ts.map +1 -1
- package/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.d.ts +28 -0
- package/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.d.ts.map +1 -0
- package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts +28 -0
- package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts.map +1 -0
- package/src/plugins/liveSearch/index.d.ts +2 -4
- package/src/plugins/liveSearch/index.d.ts.map +1 -1
- package/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.d.ts +28 -0
- package/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.d.ts.map +1 -0
- package/src/plugins/normalState/index.d.ts +1 -3
- package/src/plugins/normalState/index.d.ts.map +1 -1
- package/src/plugins/normalState/simpleNormalState/simpleNormalState.component.d.ts +28 -0
- package/src/plugins/normalState/simpleNormalState/simpleNormalState.component.d.ts.map +1 -0
- package/src/plugins/optionsHandler/index.d.ts +2 -0
- package/src/plugins/optionsHandler/index.d.ts.map +1 -0
- package/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.d.ts +41 -0
- package/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.d.ts.map +1 -0
- package/src/plugins/popup/index.d.ts +1 -3
- package/src/plugins/popup/index.d.ts.map +1 -1
- package/src/plugins/popup/simplePopup/simplePopup.component.d.ts +28 -0
- package/src/plugins/popup/simplePopup/simplePopup.component.d.ts.map +1 -0
- package/src/plugins/positioner/basicPositioner/basicPositioner.component.d.ts +28 -0
- package/src/plugins/positioner/basicPositioner/basicPositioner.component.d.ts.map +1 -0
- package/src/plugins/positioner/index.d.ts +1 -3
- package/src/plugins/positioner/index.d.ts.map +1 -1
- package/src/plugins/readonlyState/index.d.ts +0 -1
- package/src/plugins/readonlyState/index.d.ts.map +1 -1
- package/src/plugins/valueHandler/index.d.ts +1 -4
- package/src/plugins/valueHandler/index.d.ts.map +1 -1
- package/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.d.ts +46 -0
- package/src/plugins/valueHandler/staticValueHandler/staticValueHandler.component.d.ts.map +1 -0
- package/styles/components/_grid.scss +9 -0
- package/styles/core/_functions.scss +10 -0
- package/styles/core/_misc.scss +146 -0
- package/styles/core/_mixins.scss +44 -0
- package/styles/core/_theme.scss +16 -0
- package/styles/index.scss +2 -0
- package/styles/themes/dark.scss +19 -0
- package/styles/themes/light.scss +19 -0
- package/version.bak +1 -1
- package/es2022/material/src/directives/types.js +0 -2
- package/es2022/material/src/directives/types.js.map +0 -1
- package/es2022/material/src/plugins/popup/components.js +0 -3
- package/es2022/material/src/plugins/popup/components.js.map +0 -1
- package/es2022/src/components/option/index.js +0 -3
- package/es2022/src/components/option/index.js.map +0 -1
- package/es2022/src/components/option/optgroup.component.js +0 -54
- package/es2022/src/components/option/optgroup.component.js.map +0 -1
- package/es2022/src/components/option/optgroup.interface.js +0 -2
- package/es2022/src/components/option/optgroup.interface.js.map +0 -1
- package/es2022/src/components/option/option.interface.js +0 -2
- package/es2022/src/components/option/option.interface.js.map +0 -1
- package/es2022/src/components/select/index.js +0 -2
- package/es2022/src/components/select/index.js.map +0 -1
- package/es2022/src/components/select/select.interface.js +0 -2
- package/es2022/src/components/select/select.interface.js.map +0 -1
- package/es2022/src/components/select/types.js +0 -6
- package/es2022/src/components/select/types.js.map +0 -1
- package/es2022/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +0 -25
- package/es2022/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js.map +0 -1
- package/es2022/src/directives/ngSelectEdit/ngSelectEdit.directive.js +0 -66
- package/es2022/src/directives/ngSelectEdit/ngSelectEdit.directive.js.map +0 -1
- package/es2022/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +0 -42
- package/es2022/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js.map +0 -1
- package/es2022/src/index.ssr.js +0 -10
- package/es2022/src/index.ssr.js.map +0 -1
- package/es2022/src/misc/index.js +0 -6
- package/es2022/src/misc/index.js.map +0 -1
- package/es2022/src/misc/ngSelectControlValueAccessor.directive.js +0 -162
- package/es2022/src/misc/ngSelectControlValueAccessor.directive.js.map +0 -1
- package/es2022/src/misc/plugin.interface.js +0 -2
- package/es2022/src/misc/plugin.interface.js.map +0 -1
- package/es2022/src/misc/pluginBus/pluginBus.interface.js +0 -2
- package/es2022/src/misc/pluginBus/pluginBus.interface.js.map +0 -1
- package/es2022/src/misc/pluginBus/pluginBus.js.map +0 -1
- package/es2022/src/misc/templateGatherer.interface.js.map +0 -1
- package/es2022/src/modules/ngSelectDynamic.module.js +0 -20
- package/es2022/src/modules/ngSelectDynamic.module.js.map +0 -1
- package/es2022/src/pipes/ngSelectHasValue.pipe.js.map +0 -1
- package/es2022/src/pipes/ngSelectValue.pipe.js +0 -31
- package/es2022/src/pipes/ngSelectValue.pipe.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +0 -146
- package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.js +0 -2
- package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/components.js +0 -3
- package/es2022/src/plugins/keyboardHandler/components.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +0 -197
- package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.js +0 -2
- package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/keyboardHandler.interface.js.map +0 -1
- package/es2022/src/plugins/keyboardHandler/types.js +0 -10
- package/es2022/src/plugins/keyboardHandler/types.js.map +0 -1
- package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.component.js +0 -164
- package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.component.js.map +0 -1
- package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.interface.js +0 -2
- package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.interface.js.map +0 -1
- package/es2022/src/plugins/liveSearch/components.js +0 -4
- package/es2022/src/plugins/liveSearch/components.js.map +0 -1
- package/es2022/src/plugins/liveSearch/edit/editLiveSearch.component.js +0 -313
- package/es2022/src/plugins/liveSearch/edit/editLiveSearch.component.js.map +0 -1
- package/es2022/src/plugins/liveSearch/edit/editLiveSearch.interface.js +0 -2
- package/es2022/src/plugins/liveSearch/edit/editLiveSearch.interface.js.map +0 -1
- package/es2022/src/plugins/liveSearch/liveSearch.interface.js.map +0 -1
- package/es2022/src/plugins/liveSearch/no/noLiveSearch.component.js +0 -65
- package/es2022/src/plugins/liveSearch/no/noLiveSearch.component.js.map +0 -1
- package/es2022/src/plugins/liveSearch/no/noLiveSearch.interface.js +0 -2
- package/es2022/src/plugins/liveSearch/no/noLiveSearch.interface.js.map +0 -1
- package/es2022/src/plugins/liveSearch/types.js +0 -10
- package/es2022/src/plugins/liveSearch/types.js.map +0 -1
- package/es2022/src/plugins/normalState/basic/basicNormalState.component.js +0 -58
- package/es2022/src/plugins/normalState/basic/basicNormalState.component.js.map +0 -1
- package/es2022/src/plugins/normalState/basic/basicNormalState.interface.js +0 -2
- package/es2022/src/plugins/normalState/basic/basicNormalState.interface.js.map +0 -1
- package/es2022/src/plugins/normalState/components.js +0 -4
- package/es2022/src/plugins/normalState/components.js.map +0 -1
- package/es2022/src/plugins/normalState/edit/editNormalState.component.js +0 -88
- package/es2022/src/plugins/normalState/edit/editNormalState.component.js.map +0 -1
- package/es2022/src/plugins/normalState/edit/editNormalState.interface.js +0 -2
- package/es2022/src/plugins/normalState/edit/editNormalState.interface.js.map +0 -1
- package/es2022/src/plugins/normalState/normalState.interface.js.map +0 -1
- package/es2022/src/plugins/normalState/normalStateAbstract.component.js +0 -89
- package/es2022/src/plugins/normalState/normalStateAbstract.component.js.map +0 -1
- package/es2022/src/plugins/normalState/types.js +0 -10
- package/es2022/src/plugins/normalState/types.js.map +0 -1
- package/es2022/src/plugins/popup/basic/basicPopup.component.js +0 -62
- package/es2022/src/plugins/popup/basic/basicPopup.component.js.map +0 -1
- package/es2022/src/plugins/popup/basic/basicPopup.interface.js +0 -2
- package/es2022/src/plugins/popup/basic/basicPopup.interface.js.map +0 -1
- package/es2022/src/plugins/popup/component.js +0 -4
- package/es2022/src/plugins/popup/component.js.map +0 -1
- package/es2022/src/plugins/popup/edit/editPopup.component.js +0 -85
- package/es2022/src/plugins/popup/edit/editPopup.component.js.map +0 -1
- package/es2022/src/plugins/popup/edit/editPopup.interface.js +0 -2
- package/es2022/src/plugins/popup/edit/editPopup.interface.js.map +0 -1
- package/es2022/src/plugins/popup/popup.interface.js.map +0 -1
- package/es2022/src/plugins/popup/popupAbstract.component.js +0 -200
- package/es2022/src/plugins/popup/popupAbstract.component.js.map +0 -1
- package/es2022/src/plugins/popup/types.js +0 -10
- package/es2022/src/plugins/popup/types.js.map +0 -1
- package/es2022/src/plugins/positioner/components.js +0 -3
- package/es2022/src/plugins/positioner/components.js.map +0 -1
- package/es2022/src/plugins/positioner/default/defaultPositioner.component.js +0 -160
- package/es2022/src/plugins/positioner/default/defaultPositioner.component.js.map +0 -1
- package/es2022/src/plugins/positioner/default/defaultPositioner.interface.js +0 -2
- package/es2022/src/plugins/positioner/default/defaultPositioner.interface.js.map +0 -1
- package/es2022/src/plugins/positioner/no/noPositioner.component.js +0 -78
- package/es2022/src/plugins/positioner/no/noPositioner.component.js.map +0 -1
- package/es2022/src/plugins/positioner/no/noPositioner.interface.js +0 -2
- package/es2022/src/plugins/positioner/no/noPositioner.interface.js.map +0 -1
- package/es2022/src/plugins/positioner/positioner.interface.js.map +0 -1
- package/es2022/src/plugins/positioner/types.js +0 -10
- package/es2022/src/plugins/positioner/types.js.map +0 -1
- package/es2022/src/plugins/readonlyState/readonlyState.interface.js.map +0 -1
- package/es2022/src/plugins/readonlyState/types.js +0 -10
- package/es2022/src/plugins/readonlyState/types.js.map +0 -1
- package/es2022/src/plugins/valueHandler/basic/basicValueHandler.component.js +0 -159
- package/es2022/src/plugins/valueHandler/basic/basicValueHandler.component.js.map +0 -1
- package/es2022/src/plugins/valueHandler/basic/basicValueHandler.interface.js +0 -2
- package/es2022/src/plugins/valueHandler/basic/basicValueHandler.interface.js.map +0 -1
- package/es2022/src/plugins/valueHandler/components.js +0 -3
- package/es2022/src/plugins/valueHandler/components.js.map +0 -1
- package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +0 -179
- package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js.map +0 -1
- package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.js +0 -2
- package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.js.map +0 -1
- package/es2022/src/plugins/valueHandler/types.js +0 -10
- package/es2022/src/plugins/valueHandler/types.js.map +0 -1
- package/es2022/src/plugins/valueHandler/valueHandler.interface.js.map +0 -1
- package/es2022/src/plugins/valueHandler/valueHandlerBase.js +0 -145
- package/es2022/src/plugins/valueHandler/valueHandlerBase.js.map +0 -1
- package/material/src/directives/types.d.ts +0 -2
- package/material/src/directives/types.d.ts.map +0 -1
- package/material/src/plugins/popup/components.d.ts +0 -3
- package/material/src/plugins/popup/components.d.ts.map +0 -1
- package/src/components/option/index.d.ts +0 -3
- package/src/components/option/index.d.ts.map +0 -1
- package/src/components/option/optgroup.component.d.ts +0 -37
- package/src/components/option/optgroup.component.d.ts.map +0 -1
- package/src/components/option/optgroup.interface.d.ts +0 -20
- package/src/components/option/optgroup.interface.d.ts.map +0 -1
- package/src/components/option/option.interface.d.ts +0 -31
- package/src/components/option/option.interface.d.ts.map +0 -1
- package/src/components/select/index.d.ts +0 -2
- package/src/components/select/select.interface.d.ts +0 -68
- package/src/components/select/select.interface.d.ts.map +0 -1
- package/src/components/select/types.d.ts +0 -7
- package/src/components/select/types.d.ts.map +0 -1
- package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts +0 -11
- package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts.map +0 -1
- package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts +0 -11
- package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts.map +0 -1
- package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts +0 -21
- package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts.map +0 -1
- package/src/index.ssr.d.ts +0 -1
- package/src/index.ssr.d.ts.map +0 -1
- package/src/misc/index.d.ts +0 -6
- package/src/misc/index.d.ts.map +0 -1
- package/src/misc/ngSelectControlValueAccessor.directive.d.ts +0 -63
- package/src/misc/ngSelectControlValueAccessor.directive.d.ts.map +0 -1
- package/src/misc/plugin.interface.d.ts +0 -108
- package/src/misc/plugin.interface.d.ts.map +0 -1
- package/src/misc/pluginBus/pluginBus.d.ts +0 -49
- package/src/misc/pluginBus/pluginBus.d.ts.map +0 -1
- package/src/misc/pluginBus/pluginBus.interface.d.ts +0 -36
- package/src/misc/pluginBus/pluginBus.interface.d.ts.map +0 -1
- package/src/misc/templateGatherer.interface.d.ts +0 -17
- package/src/misc/templateGatherer.interface.d.ts.map +0 -1
- package/src/modules/ngSelectDynamic.module.d.ts +0 -11
- package/src/modules/ngSelectDynamic.module.d.ts.map +0 -1
- package/src/pipes/ngSelectHasValue.pipe.d.ts +0 -16
- package/src/pipes/ngSelectHasValue.pipe.d.ts.map +0 -1
- package/src/pipes/ngSelectValue.pipe.d.ts +0 -19
- package/src/pipes/ngSelectValue.pipe.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts +0 -58
- package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.d.ts +0 -12
- package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/components.d.ts +0 -3
- package/src/plugins/keyboardHandler/components.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts +0 -68
- package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.d.ts +0 -12
- package/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/keyboardHandler.interface.d.ts +0 -12
- package/src/plugins/keyboardHandler/keyboardHandler.interface.d.ts.map +0 -1
- package/src/plugins/keyboardHandler/types.d.ts +0 -11
- package/src/plugins/keyboardHandler/types.d.ts.map +0 -1
- package/src/plugins/liveSearch/basic/basicLiveSearch.component.css +0 -11
- package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts +0 -98
- package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts.map +0 -1
- package/src/plugins/liveSearch/basic/basicLiveSearch.component.html +0 -5
- package/src/plugins/liveSearch/basic/basicLiveSearch.interface.d.ts +0 -29
- package/src/plugins/liveSearch/basic/basicLiveSearch.interface.d.ts.map +0 -1
- package/src/plugins/liveSearch/components.d.ts +0 -4
- package/src/plugins/liveSearch/components.d.ts.map +0 -1
- package/src/plugins/liveSearch/edit/editLiveSearch.component.css +0 -13
- package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts +0 -141
- package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts.map +0 -1
- package/src/plugins/liveSearch/edit/editLiveSearch.component.html +0 -13
- package/src/plugins/liveSearch/edit/editLiveSearch.interface.d.ts +0 -37
- package/src/plugins/liveSearch/edit/editLiveSearch.interface.d.ts.map +0 -1
- package/src/plugins/liveSearch/liveSearch.interface.d.ts +0 -38
- package/src/plugins/liveSearch/liveSearch.interface.d.ts.map +0 -1
- package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts +0 -54
- package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts.map +0 -1
- package/src/plugins/liveSearch/no/noLiveSearch.interface.d.ts +0 -12
- package/src/plugins/liveSearch/no/noLiveSearch.interface.d.ts.map +0 -1
- package/src/plugins/liveSearch/types.d.ts +0 -11
- package/src/plugins/liveSearch/types.d.ts.map +0 -1
- package/src/plugins/normalState/basic/basicNormalState.component.css +0 -38
- package/src/plugins/normalState/basic/basicNormalState.component.d.ts +0 -17
- package/src/plugins/normalState/basic/basicNormalState.component.d.ts.map +0 -1
- package/src/plugins/normalState/basic/basicNormalState.component.html +0 -6
- package/src/plugins/normalState/basic/basicNormalState.interface.d.ts +0 -29
- package/src/plugins/normalState/basic/basicNormalState.interface.d.ts.map +0 -1
- package/src/plugins/normalState/components.d.ts +0 -4
- package/src/plugins/normalState/components.d.ts.map +0 -1
- package/src/plugins/normalState/edit/editNormalState.component.css +0 -77
- package/src/plugins/normalState/edit/editNormalState.component.d.ts +0 -26
- package/src/plugins/normalState/edit/editNormalState.component.d.ts.map +0 -1
- package/src/plugins/normalState/edit/editNormalState.component.html +0 -19
- package/src/plugins/normalState/edit/editNormalState.interface.d.ts +0 -53
- package/src/plugins/normalState/edit/editNormalState.interface.d.ts.map +0 -1
- package/src/plugins/normalState/normalState.interface.d.ts +0 -49
- package/src/plugins/normalState/normalState.interface.d.ts.map +0 -1
- package/src/plugins/normalState/normalStateAbstract.component.d.ts +0 -65
- package/src/plugins/normalState/normalStateAbstract.component.d.ts.map +0 -1
- package/src/plugins/normalState/types.d.ts +0 -11
- package/src/plugins/normalState/types.d.ts.map +0 -1
- package/src/plugins/popup/basic/basicPopup.component.css +0 -61
- package/src/plugins/popup/basic/basicPopup.component.d.ts +0 -17
- package/src/plugins/popup/basic/basicPopup.component.d.ts.map +0 -1
- package/src/plugins/popup/basic/basicPopup.component.html +0 -21
- package/src/plugins/popup/basic/basicPopup.interface.d.ts +0 -33
- package/src/plugins/popup/basic/basicPopup.interface.d.ts.map +0 -1
- package/src/plugins/popup/component.d.ts +0 -4
- package/src/plugins/popup/component.d.ts.map +0 -1
- package/src/plugins/popup/edit/editPopup.component.css +0 -61
- package/src/plugins/popup/edit/editPopup.component.d.ts +0 -32
- package/src/plugins/popup/edit/editPopup.component.d.ts.map +0 -1
- package/src/plugins/popup/edit/editPopup.component.html +0 -19
- package/src/plugins/popup/edit/editPopup.interface.d.ts +0 -33
- package/src/plugins/popup/edit/editPopup.interface.d.ts.map +0 -1
- package/src/plugins/popup/popup.interface.d.ts +0 -52
- package/src/plugins/popup/popup.interface.d.ts.map +0 -1
- package/src/plugins/popup/popupAbstract.component.d.ts +0 -130
- package/src/plugins/popup/popupAbstract.component.d.ts.map +0 -1
- package/src/plugins/popup/types.d.ts +0 -11
- package/src/plugins/popup/types.d.ts.map +0 -1
- package/src/plugins/positioner/components.d.ts +0 -3
- package/src/plugins/positioner/components.d.ts.map +0 -1
- package/src/plugins/positioner/default/defaultPositioner.component.d.ts +0 -89
- package/src/plugins/positioner/default/defaultPositioner.component.d.ts.map +0 -1
- package/src/plugins/positioner/default/defaultPositioner.interface.d.ts +0 -12
- package/src/plugins/positioner/default/defaultPositioner.interface.d.ts.map +0 -1
- package/src/plugins/positioner/no/noPositioner.component.d.ts +0 -50
- package/src/plugins/positioner/no/noPositioner.component.d.ts.map +0 -1
- package/src/plugins/positioner/no/noPositioner.interface.d.ts +0 -12
- package/src/plugins/positioner/no/noPositioner.interface.d.ts.map +0 -1
- package/src/plugins/positioner/positioner.interface.d.ts +0 -22
- package/src/plugins/positioner/positioner.interface.d.ts.map +0 -1
- package/src/plugins/positioner/types.d.ts +0 -11
- package/src/plugins/positioner/types.d.ts.map +0 -1
- package/src/plugins/readonlyState/readonlyState.interface.d.ts +0 -12
- package/src/plugins/readonlyState/readonlyState.interface.d.ts.map +0 -1
- package/src/plugins/readonlyState/types.d.ts +0 -11
- package/src/plugins/readonlyState/types.d.ts.map +0 -1
- package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts +0 -51
- package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts.map +0 -1
- package/src/plugins/valueHandler/basic/basicValueHandler.interface.d.ts +0 -12
- package/src/plugins/valueHandler/basic/basicValueHandler.interface.d.ts.map +0 -1
- package/src/plugins/valueHandler/components.d.ts +0 -3
- package/src/plugins/valueHandler/components.d.ts.map +0 -1
- package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts +0 -52
- package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts.map +0 -1
- package/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.d.ts +0 -21
- package/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.d.ts.map +0 -1
- package/src/plugins/valueHandler/types.d.ts +0 -11
- package/src/plugins/valueHandler/types.d.ts.map +0 -1
- package/src/plugins/valueHandler/valueHandler.interface.d.ts +0 -31
- package/src/plugins/valueHandler/valueHandler.interface.d.ts.map +0 -1
- package/src/plugins/valueHandler/valueHandlerBase.d.ts +0 -115
- package/src/plugins/valueHandler/valueHandlerBase.d.ts.map +0 -1
- /package/es2022/src/{plugins → interfaces/plugins}/keyboardHandler/keyboardHandler.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/liveSearch/liveSearch.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/normalState/normalState.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/popup/popup.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/positioner/positioner.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/readonlyState/readonlyState.interface.js +0 -0
- /package/es2022/src/{plugins → interfaces/plugins}/valueHandler/valueHandler.interface.js +0 -0
- /package/es2022/src/{misc → interfaces/templateGatherer}/templateGatherer.interface.js +0 -0
|
@@ -1,426 +1,347 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { BasicPopupComponent } from '../../plugins/popup/component';
|
|
13
|
-
import { POSITIONER } from '../../plugins/positioner/types';
|
|
14
|
-
import { DefaultPositionerComponent } from '../../plugins/positioner/components';
|
|
15
|
-
import { READONLY_STATE } from '../../plugins/readonlyState/types';
|
|
16
|
-
import { VALUE_HANDLER } from '../../plugins/valueHandler/types';
|
|
17
|
-
import { BasicValueHandlerComponent } from '../../plugins/valueHandler/components';
|
|
18
|
-
import { LIVE_SEARCH } from '../../plugins/liveSearch/types';
|
|
19
|
-
import { NoLiveSearchComponent } from '../../plugins/liveSearch/components';
|
|
20
|
-
import { OptionComponent } from '../option/option.component';
|
|
21
|
-
import { OptGroupComponent } from '../option/optgroup.component';
|
|
22
|
-
import { PluginBus } from '../../misc/pluginBus/pluginBus';
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, viewChild, ViewContainerRef, signal, Inject, Optional, resolveForwardRef, effect, forwardRef, Attribute, ElementRef, computed, input, booleanAttribute, DOCUMENT, TemplateRef, contentChild, contentChildren, untracked } from '@angular/core';
|
|
3
|
+
import { getHostElement } from '@anglr/common';
|
|
4
|
+
import { isPresent, renderToBody } from '@jscrpt/common';
|
|
5
|
+
import { deepCopyWithArrayOverride } from '@jscrpt/common/lodash';
|
|
6
|
+
import { 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';
|
|
7
|
+
import { SelectPluginType } from '../../misc/enums';
|
|
8
|
+
import { SelectBus, SelectPluginInstances } from '../../misc/classes';
|
|
9
|
+
import { BasicPositionerComponent, StaticValueHandler, NoInteractionsComponent, NoLiveSearchComponent, NoOptionsHandler, SimpleKeyboardHandlerComponent, SimpleNormalStateComponent, SimplePopupComponent } from '../../plugins';
|
|
10
|
+
import { CopyOptionsAsSignal } from '../../decorators';
|
|
11
|
+
import { NormalStateTemplate, OptionTemplate } from '../../directives';
|
|
23
12
|
import * as i0 from "@angular/core";
|
|
24
|
-
import * as i1 from "../../misc/
|
|
25
|
-
|
|
26
|
-
import * as i3 from "@anglr/common";
|
|
27
|
-
//TODO - dynamic change of absolute popup
|
|
28
|
-
//TODO - dynamic change of options gatherer destroy called properly ?
|
|
13
|
+
import * as i1 from "../../misc/classes";
|
|
14
|
+
//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
|
|
29
15
|
/**
|
|
30
|
-
* Default '
|
|
31
|
-
* @internal
|
|
16
|
+
* Default 'SelectOptions'
|
|
32
17
|
*/
|
|
33
18
|
const defaultOptions = {
|
|
34
|
-
autoInitialize: true,
|
|
35
19
|
absolute: false,
|
|
36
|
-
forceValueCheckOnInit: false,
|
|
37
20
|
multiple: false,
|
|
38
21
|
readonly: false,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
normalizer: value =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
22
|
+
containerElement: null,
|
|
23
|
+
valueExtractor: (option) => option.value,
|
|
24
|
+
// valueComparer: (source, target) =>
|
|
25
|
+
// {
|
|
26
|
+
// return source === target;
|
|
27
|
+
// },
|
|
28
|
+
// liveSearchFilter: (query: string, normalizer: NormalizeFunc = value => value) =>
|
|
29
|
+
// {
|
|
30
|
+
// return itm => normalizer(itm.text).indexOf(normalizer(query)) >= 0;
|
|
31
|
+
// },
|
|
32
|
+
// normalizer: value =>
|
|
33
|
+
// {
|
|
34
|
+
// if(isString(value))
|
|
35
|
+
// {
|
|
36
|
+
// return value.toLowerCase();
|
|
37
|
+
// }
|
|
38
|
+
// return value;
|
|
39
|
+
// },
|
|
51
40
|
cssClasses: {},
|
|
52
41
|
plugins: {
|
|
53
|
-
|
|
54
|
-
type: forwardRef(() =>
|
|
42
|
+
interactions: {
|
|
43
|
+
type: forwardRef(() => NoInteractionsComponent),
|
|
44
|
+
},
|
|
45
|
+
keyboardHandler: {
|
|
46
|
+
type: forwardRef(() => SimpleKeyboardHandlerComponent),
|
|
55
47
|
},
|
|
56
48
|
liveSearch: {
|
|
57
|
-
type: forwardRef(() => NoLiveSearchComponent)
|
|
49
|
+
type: forwardRef(() => NoLiveSearchComponent),
|
|
50
|
+
},
|
|
51
|
+
normalState: {
|
|
52
|
+
type: forwardRef(() => SimpleNormalStateComponent),
|
|
53
|
+
},
|
|
54
|
+
optionsHandler: {
|
|
55
|
+
type: forwardRef(() => NoOptionsHandler),
|
|
58
56
|
},
|
|
59
57
|
popup: {
|
|
60
|
-
type: forwardRef(() =>
|
|
58
|
+
type: forwardRef(() => SimplePopupComponent),
|
|
61
59
|
},
|
|
62
60
|
positioner: {
|
|
63
|
-
type: forwardRef(() =>
|
|
64
|
-
},
|
|
65
|
-
keyboardHandler: {
|
|
66
|
-
type: forwardRef(() => BasicKeyboardHandlerComponent)
|
|
61
|
+
type: forwardRef(() => BasicPositionerComponent),
|
|
67
62
|
},
|
|
68
63
|
readonlyState: {
|
|
69
|
-
type: forwardRef(() =>
|
|
64
|
+
type: forwardRef(() => SimpleNormalStateComponent),
|
|
70
65
|
},
|
|
71
66
|
valueHandler: {
|
|
72
|
-
type: forwardRef(() =>
|
|
73
|
-
}
|
|
74
|
-
}
|
|
67
|
+
type: forwardRef(() => StaticValueHandler),
|
|
68
|
+
},
|
|
69
|
+
},
|
|
75
70
|
};
|
|
76
71
|
/**
|
|
77
|
-
* Component that represents
|
|
72
|
+
* Component that represents Select itself, allows selection of value from options
|
|
78
73
|
*/
|
|
79
|
-
export class
|
|
80
|
-
//######################### public properties -
|
|
81
|
-
/**
|
|
82
|
-
* Gets or sets NgSelect options
|
|
83
|
-
*/
|
|
84
|
-
get selectOptions() {
|
|
85
|
-
return this._selectOptions;
|
|
86
|
-
}
|
|
87
|
-
set selectOptions(options) {
|
|
88
|
-
this._selectOptions = extend(true, this._selectOptions, options);
|
|
89
|
-
this._pluginBus.selectOptions = this._selectOptions;
|
|
90
|
-
}
|
|
91
|
-
//######################### public properties - implementation of NgSelect #########################
|
|
74
|
+
export class Select {
|
|
75
|
+
//######################### public properties - implementation of SelectApi #########################
|
|
92
76
|
/**
|
|
93
|
-
*
|
|
77
|
+
* @inheritdoc
|
|
94
78
|
*/
|
|
95
79
|
get initialized() {
|
|
96
|
-
return this.
|
|
97
|
-
}
|
|
98
|
-
//######################### public properties - implementation of OptionsGatherer #########################
|
|
99
|
-
/**
|
|
100
|
-
* Array of provided options for select
|
|
101
|
-
*/
|
|
102
|
-
get options() {
|
|
103
|
-
return this.optionsChildren.toArray();
|
|
80
|
+
return this.initializedSignal.asReadonly();
|
|
104
81
|
}
|
|
105
82
|
/**
|
|
106
|
-
*
|
|
83
|
+
* @inheritdoc
|
|
107
84
|
*/
|
|
108
|
-
get
|
|
109
|
-
return this.
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Array of visible, displayed options for select
|
|
113
|
-
*/
|
|
114
|
-
get availableOptions() {
|
|
115
|
-
return this._availableOptions;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Occurs when array of visible, displayed options has changed
|
|
119
|
-
*/
|
|
120
|
-
get availableOptionsChange() {
|
|
121
|
-
return this._availableOptionsChange;
|
|
85
|
+
get events() {
|
|
86
|
+
return this.bus;
|
|
122
87
|
}
|
|
123
88
|
//######################### constructors #########################
|
|
124
|
-
constructor(
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
this.
|
|
131
|
-
|
|
89
|
+
constructor(pluginInstances, bus, element, document, multiple, normalStateType, keyboardHandlerType, popupType, positionerType, readonlyStateType, valueHandlerType, liveSearchType, interactionsType, optionsHandlerType, options) {
|
|
90
|
+
this.pluginInstances = pluginInstances;
|
|
91
|
+
this.bus = bus;
|
|
92
|
+
/**
|
|
93
|
+
* Object storing current used plugin type
|
|
94
|
+
*/
|
|
95
|
+
this.pluginTypes = {
|
|
96
|
+
Interactions: null,
|
|
97
|
+
KeyboardHandler: null,
|
|
98
|
+
LiveSearch: null,
|
|
99
|
+
NormalState: null,
|
|
100
|
+
OptionsHandler: null,
|
|
101
|
+
Popup: null,
|
|
102
|
+
Positioner: null,
|
|
103
|
+
ReadonlyState: null,
|
|
104
|
+
ValueHandler: null,
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Signal that holds init state of live search plugin
|
|
108
|
+
*/
|
|
109
|
+
this.liveSearchInit = signal(false, ...(ngDevMode ? [{ debugName: "liveSearchInit" }] : []));
|
|
110
|
+
/**
|
|
111
|
+
* Signal that holds init state of interactions plugin
|
|
112
|
+
*/
|
|
113
|
+
this.interactionsInit = signal(false, ...(ngDevMode ? [{ debugName: "interactionsInit" }] : []));
|
|
132
114
|
/**
|
|
133
|
-
*
|
|
115
|
+
* Signal that holds init state of options handler plugin
|
|
134
116
|
*/
|
|
135
|
-
this.
|
|
117
|
+
this.optionsHandlerInit = signal(false, ...(ngDevMode ? [{ debugName: "optionsHandlerInit" }] : []));
|
|
136
118
|
/**
|
|
137
|
-
*
|
|
119
|
+
* Signal that holds init state of positioner plugin
|
|
138
120
|
*/
|
|
139
|
-
this.
|
|
121
|
+
this.positionerInit = signal(false, ...(ngDevMode ? [{ debugName: "positionerInit" }] : []));
|
|
140
122
|
/**
|
|
141
|
-
*
|
|
123
|
+
* Signal that holds init state of keyboard plugin
|
|
142
124
|
*/
|
|
143
|
-
this.
|
|
125
|
+
this.keyboardInit = signal(false, ...(ngDevMode ? [{ debugName: "keyboardInit" }] : []));
|
|
144
126
|
/**
|
|
145
|
-
*
|
|
127
|
+
* Signal that holds init state of value handler plugin
|
|
146
128
|
*/
|
|
147
|
-
this.
|
|
129
|
+
this.valueHandlerInit = signal(false, ...(ngDevMode ? [{ debugName: "valueHandlerInit" }] : []));
|
|
148
130
|
/**
|
|
149
|
-
*
|
|
131
|
+
* Signal that holds init state of readonly state plugin
|
|
150
132
|
*/
|
|
151
|
-
this.
|
|
152
|
-
|
|
153
|
-
|
|
133
|
+
this.readonlyStateInit = signal(false, ...(ngDevMode ? [{ debugName: "readonlyStateInit" }] : []));
|
|
134
|
+
/**
|
|
135
|
+
* Signal that holds init state of normal state plugin
|
|
136
|
+
*/
|
|
137
|
+
this.normalStateInit = signal(false, ...(ngDevMode ? [{ debugName: "normalStateInit" }] : []));
|
|
138
|
+
/**
|
|
139
|
+
* Signal that holds init state of popup plugin
|
|
140
|
+
*/
|
|
141
|
+
this.popupInit = signal(false, ...(ngDevMode ? [{ debugName: "popupInit" }] : []));
|
|
142
|
+
/**
|
|
143
|
+
* Initialization state of all plugin init options
|
|
144
|
+
*/
|
|
145
|
+
this.optionsInit = computed(() => ({ initialized: this.normalStateInit() &&
|
|
146
|
+
this.keyboardInit() &&
|
|
147
|
+
this.popupInit() &&
|
|
148
|
+
this.positionerInit() &&
|
|
149
|
+
this.readonlyStateInit() &&
|
|
150
|
+
this.valueHandlerInit() &&
|
|
151
|
+
this.liveSearchInit() &&
|
|
152
|
+
this.interactionsInit() &&
|
|
153
|
+
this.optionsHandlerInit() }), ...(ngDevMode ? [{ debugName: "optionsInit" }] : []));
|
|
154
|
+
/**
|
|
155
|
+
* Information whether is select initialized or not, changes when Select is initialized or reinitialized, if value is false Select was not initialized yet
|
|
156
|
+
*/
|
|
157
|
+
this.initializedSignal = signal(false, ...(ngDevMode ? [{ debugName: "initializedSignal" }] : []));
|
|
158
|
+
//######################### protected properties - children #########################
|
|
159
|
+
/**
|
|
160
|
+
* Container used for rendering live search plugin
|
|
161
|
+
*/
|
|
162
|
+
this.liveSearchContainer = viewChild.required('liveSearch', { read: ViewContainerRef });
|
|
163
|
+
/**
|
|
164
|
+
* Container used for rendering interactions plugin
|
|
165
|
+
*/
|
|
166
|
+
this.interactionsContainer = viewChild.required('interactions', { read: ViewContainerRef });
|
|
167
|
+
/**
|
|
168
|
+
* Container used for rendering options handler plugin
|
|
169
|
+
*/
|
|
170
|
+
this.optionsHandlerContainer = viewChild.required('optionsHandler', { read: ViewContainerRef });
|
|
171
|
+
/**
|
|
172
|
+
* Container used for rendering positioner plugin
|
|
173
|
+
*/
|
|
174
|
+
this.positionerContainer = viewChild.required('positioner', { read: ViewContainerRef });
|
|
175
|
+
/**
|
|
176
|
+
* Container used for rendering keyboard handler plugin
|
|
177
|
+
*/
|
|
178
|
+
this.keyboardHandlerContainer = viewChild.required('keyboardHandler', { read: ViewContainerRef });
|
|
179
|
+
/**
|
|
180
|
+
* Container used for rendering value handler plugin
|
|
181
|
+
*/
|
|
182
|
+
this.valueHandlerContainer = viewChild.required('valueHandler', { read: ViewContainerRef });
|
|
183
|
+
/**
|
|
184
|
+
* Container used for rendering readonly state plugin
|
|
185
|
+
*/
|
|
186
|
+
this.readonlyStateContainer = viewChild.required('readonlyState', { read: ViewContainerRef });
|
|
187
|
+
/**
|
|
188
|
+
* Container used for rendering normal state plugin
|
|
189
|
+
*/
|
|
190
|
+
this.normalStateContainer = viewChild.required('normalState', { read: ViewContainerRef });
|
|
191
|
+
/**
|
|
192
|
+
* Container used for rendering popup plugin
|
|
193
|
+
*/
|
|
194
|
+
this.popupContainer = viewChild.required('popup', { read: ViewContainerRef });
|
|
195
|
+
/**
|
|
196
|
+
* Indication whether should be Select disabled or not
|
|
197
|
+
*/
|
|
198
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
199
|
+
/**
|
|
200
|
+
* Indication whether should be Select readonly or not
|
|
201
|
+
*/
|
|
202
|
+
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
203
|
+
//######################### public properties - implementation of TemplateGatherer #########################
|
|
204
|
+
/**
|
|
205
|
+
* @inheritdoc
|
|
206
|
+
*/
|
|
207
|
+
this.normalStateTemplate = contentChild(NormalStateTemplate, { ...(ngDevMode ? { debugName: "normalStateTemplate" } : {}), read: TemplateRef });
|
|
208
|
+
/**
|
|
209
|
+
* @inheritdoc
|
|
210
|
+
*/
|
|
211
|
+
this.optionTemplate = contentChild(OptionTemplate, { ...(ngDevMode ? { debugName: "optionTemplate" } : {}), read: TemplateRef });
|
|
212
|
+
//######################### public properties - implementation of OptionsGatherer #########################
|
|
213
|
+
/**
|
|
214
|
+
* Array of all available options for select
|
|
215
|
+
*/
|
|
216
|
+
this.availableOptions = contentChildren(Option, ...(ngDevMode ? [{ debugName: "availableOptions" }] : []));
|
|
217
|
+
//is present (value is not important)
|
|
154
218
|
const multipleDefault = isPresent(multiple);
|
|
155
|
-
const opts =
|
|
156
|
-
|
|
157
|
-
opts.plugins = {};
|
|
158
|
-
}
|
|
219
|
+
const opts = deepCopyWithArrayOverride({}, options);
|
|
220
|
+
opts.plugins ??= {};
|
|
159
221
|
if (keyboardHandlerType) {
|
|
160
|
-
|
|
161
|
-
opts.plugins.keyboardHandler = {};
|
|
162
|
-
}
|
|
222
|
+
opts.plugins.keyboardHandler ??= {};
|
|
163
223
|
opts.plugins.keyboardHandler.type = keyboardHandlerType;
|
|
164
224
|
}
|
|
165
225
|
if (normalStateType) {
|
|
166
|
-
|
|
167
|
-
opts.plugins.normalState = {};
|
|
168
|
-
}
|
|
226
|
+
opts.plugins.normalState ??= {};
|
|
169
227
|
opts.plugins.normalState.type = normalStateType;
|
|
170
228
|
}
|
|
171
229
|
if (popupType) {
|
|
172
|
-
|
|
173
|
-
opts.plugins.popup = {};
|
|
174
|
-
}
|
|
230
|
+
opts.plugins.popup ??= {};
|
|
175
231
|
opts.plugins.popup.type = popupType;
|
|
176
232
|
}
|
|
177
233
|
if (positionerType) {
|
|
178
|
-
|
|
179
|
-
opts.plugins.positioner = {};
|
|
180
|
-
}
|
|
234
|
+
opts.plugins.positioner ??= {};
|
|
181
235
|
opts.plugins.positioner.type = positionerType;
|
|
182
236
|
}
|
|
183
237
|
if (readonlyStateType) {
|
|
184
|
-
|
|
185
|
-
opts.plugins.readonlyState = {};
|
|
186
|
-
}
|
|
238
|
+
opts.plugins.readonlyState ??= {};
|
|
187
239
|
opts.plugins.readonlyState.type = readonlyStateType;
|
|
188
240
|
}
|
|
189
241
|
if (valueHandlerType) {
|
|
190
|
-
|
|
191
|
-
opts.plugins.valueHandler = {};
|
|
192
|
-
}
|
|
242
|
+
opts.plugins.valueHandler ??= {};
|
|
193
243
|
opts.plugins.valueHandler.type = valueHandlerType;
|
|
194
244
|
}
|
|
195
245
|
if (liveSearchType) {
|
|
196
|
-
|
|
197
|
-
opts.plugins.liveSearch = {};
|
|
198
|
-
}
|
|
246
|
+
opts.plugins.liveSearch ??= {};
|
|
199
247
|
opts.plugins.liveSearch.type = liveSearchType;
|
|
200
248
|
}
|
|
201
|
-
|
|
249
|
+
if (interactionsType) {
|
|
250
|
+
opts.plugins.interactions ??= {};
|
|
251
|
+
opts.plugins.interactions.type = interactionsType;
|
|
252
|
+
}
|
|
253
|
+
if (optionsHandlerType) {
|
|
254
|
+
opts.plugins.optionsHandler ??= {};
|
|
255
|
+
opts.plugins.optionsHandler.type = optionsHandlerType;
|
|
256
|
+
}
|
|
257
|
+
this.selectOptions = deepCopyWithArrayOverride({
|
|
202
258
|
optionsGatherer: this,
|
|
203
259
|
templateGatherer: this,
|
|
204
260
|
}, defaultOptions, {
|
|
205
|
-
|
|
206
|
-
multiple: multipleDefault
|
|
261
|
+
multiple: multipleDefault,
|
|
207
262
|
}, opts);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
263
|
+
bus.selectElement.set(element);
|
|
264
|
+
bus.selectOptions = computed(() => this.selectOptions, ...(ngDevMode ? [{ debugName: "selectOptions" }] : []));
|
|
265
|
+
//dynamic update of readonly state in options
|
|
266
|
+
effect(() => {
|
|
267
|
+
this.selectOptions =
|
|
268
|
+
{
|
|
269
|
+
readonly: this.readonly() || this.disabled(),
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
//create and initialize options for static plugins
|
|
273
|
+
effect(async () => {
|
|
274
|
+
const selectOptions = this.selectOptions;
|
|
275
|
+
const liveSearchContainer = this.liveSearchContainer();
|
|
276
|
+
const interactionsContainer = this.interactionsContainer();
|
|
277
|
+
const optionsHandlerContainer = this.optionsHandlerContainer();
|
|
278
|
+
const positionerContainer = this.positionerContainer();
|
|
279
|
+
const keyboardHandlerContainer = this.keyboardHandlerContainer();
|
|
280
|
+
const valueHandlerContainer = this.valueHandlerContainer();
|
|
281
|
+
await this.createPlugin(selectOptions.plugins?.liveSearch, SelectPluginType.LiveSearch, liveSearchContainer, this.liveSearchInit);
|
|
282
|
+
await this.createPlugin(selectOptions.plugins?.interactions, SelectPluginType.Interactions, interactionsContainer, this.interactionsInit);
|
|
283
|
+
await this.createPlugin(selectOptions.plugins?.optionsHandler, SelectPluginType.OptionsHandler, optionsHandlerContainer, this.optionsHandlerInit);
|
|
284
|
+
await this.createPlugin(selectOptions.plugins?.positioner, SelectPluginType.Positioner, positionerContainer, this.positionerInit);
|
|
285
|
+
await this.createPlugin(selectOptions.plugins?.keyboardHandler, SelectPluginType.KeyboardHandler, keyboardHandlerContainer, this.keyboardInit);
|
|
286
|
+
await this.createPlugin(selectOptions.plugins?.valueHandler, SelectPluginType.ValueHandler, valueHandlerContainer, this.valueHandlerInit);
|
|
287
|
+
});
|
|
288
|
+
//create and initialize options for state plugins (normal and readonly)
|
|
289
|
+
effect(() => {
|
|
290
|
+
const readonlyStateContainer = this.readonlyStateContainer();
|
|
291
|
+
const normalStateContainer = this.normalStateContainer();
|
|
292
|
+
const selectOptions = this.selectOptions;
|
|
293
|
+
if (selectOptions.readonly) {
|
|
294
|
+
this.destroyPlugin(SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);
|
|
295
|
+
this.normalStateInit.set(true);
|
|
296
|
+
this.createPlugin(this.selectOptions.plugins?.readonlyState, SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
this.destroyPlugin(SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);
|
|
300
|
+
this.readonlyStateInit.set(true);
|
|
301
|
+
this.createPlugin(this.selectOptions.plugins?.normalState, SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);
|
|
222
302
|
}
|
|
223
|
-
};
|
|
224
|
-
if (nameof('disabled') in changes && isBoolean(this.disabled)) {
|
|
225
|
-
updateReadonly(this.disabled, changes[nameof('disabled')].firstChange);
|
|
226
|
-
}
|
|
227
|
-
if (nameof('readonly') in changes && isBoolean(this.readonly)) {
|
|
228
|
-
updateReadonly(this.readonly, changes[nameof('readonly')].firstChange);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
//######################### public methods - implementation of OnInit #########################
|
|
232
|
-
/**
|
|
233
|
-
* Initialize component
|
|
234
|
-
*/
|
|
235
|
-
ngOnInit() {
|
|
236
|
-
this.initOptions();
|
|
237
|
-
}
|
|
238
|
-
//######################### public methods - implementation of AfterViewInit #########################
|
|
239
|
-
/**
|
|
240
|
-
* Called when view was initialized
|
|
241
|
-
*/
|
|
242
|
-
ngAfterViewInit() {
|
|
243
|
-
this._availableOptions = this.options;
|
|
244
|
-
this.optionsChildren.changes.subscribe(() => {
|
|
245
|
-
this._availableOptions = this.options;
|
|
246
|
-
this._optionsChange.emit();
|
|
247
|
-
this._availableOptionsChange.emit();
|
|
248
303
|
});
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
this._searchValueChangeSubscription = null;
|
|
260
|
-
this.selectOptions.optionsGatherer?.destroyGatherer();
|
|
261
|
-
this._destroyAbsolutePopup();
|
|
262
|
-
}
|
|
263
|
-
//######################### public methods - implementation of OptionsGatherer #########################
|
|
264
|
-
/**
|
|
265
|
-
* Initialize gatherer during initialization phase
|
|
266
|
-
*/
|
|
267
|
-
initializeGatherer() {
|
|
268
|
-
const liveSearch = this._pluginInstances[LIVE_SEARCH];
|
|
269
|
-
if (this._liveSearch && this._liveSearch != liveSearch) {
|
|
270
|
-
this._searchValueChangeSubscription.unsubscribe();
|
|
271
|
-
this._searchValueChangeSubscription = null;
|
|
272
|
-
this._liveSearch = null;
|
|
273
|
-
}
|
|
274
|
-
if (!this._liveSearch) {
|
|
275
|
-
this._liveSearch = liveSearch;
|
|
276
|
-
this._searchValueChangeSubscription = this._liveSearch.searchValueChange.subscribe(() => {
|
|
277
|
-
if (!this._liveSearch.searchValue) {
|
|
278
|
-
this._availableOptions = this.options;
|
|
279
|
-
this._availableOptionsChange.emit();
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
this._availableOptions = this.options.filter(this.selectOptions.liveSearchFilter(this._liveSearch.searchValue, this.selectOptions.normalizer));
|
|
283
|
-
this._availableOptionsChange.emit();
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Called when gatherer needs to be destroyed
|
|
289
|
-
*/
|
|
290
|
-
destroyGatherer() {
|
|
291
|
-
}
|
|
292
|
-
//######################### public methods - template bindings #########################
|
|
293
|
-
/**
|
|
294
|
-
* Sets normal state component
|
|
295
|
-
* @param normalState - Created normal state that is rendered
|
|
296
|
-
* @internal
|
|
297
|
-
*/
|
|
298
|
-
setNormalStateComponent(normalState) {
|
|
299
|
-
this._registerNewPlugin(normalState, NORMAL_STATE, 'normalState');
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Sets keyboard handler component
|
|
303
|
-
* @param keyboardHandler - Created keyboard handler that is rendered
|
|
304
|
-
* @internal
|
|
305
|
-
*/
|
|
306
|
-
setKeyboardHandlerComponent(keyboardHandler) {
|
|
307
|
-
this._registerNewPlugin(keyboardHandler, KEYBOARD_HANDLER, 'keyboardHandler');
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Sets popup component
|
|
311
|
-
* @param popup - Created popup that is rendered
|
|
312
|
-
* @internal
|
|
313
|
-
*/
|
|
314
|
-
setPopupComponent(popup) {
|
|
315
|
-
this._registerNewPlugin(popup, POPUP, 'popup');
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Sets positioner component
|
|
319
|
-
* @param positioner - Created positioner that is rendered
|
|
320
|
-
* @internal
|
|
321
|
-
*/
|
|
322
|
-
setPositionerComponent(positioner) {
|
|
323
|
-
this._registerNewPlugin(positioner, POSITIONER, 'positioner');
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Sets readonly state component
|
|
327
|
-
* @param readonlyState - Created readonly state that is rendered
|
|
328
|
-
* @internal
|
|
329
|
-
*/
|
|
330
|
-
setReadonlyStateComponent(readonlyState) {
|
|
331
|
-
this._registerNewPlugin(readonlyState, READONLY_STATE, 'readonlyState');
|
|
332
|
-
this._pluginInstances[NORMAL_STATE] = this._pluginInstances[READONLY_STATE];
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Sets value handler component
|
|
336
|
-
* @param valueHandler - Created value handler that is rendered
|
|
337
|
-
* @internal
|
|
338
|
-
*/
|
|
339
|
-
setValueHandlerComponent(valueHandler) {
|
|
340
|
-
this._registerNewPlugin(valueHandler, VALUE_HANDLER, 'valueHandler');
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Sets live search component
|
|
344
|
-
* @param liveSearch - Created live search that is rendered
|
|
345
|
-
* @internal
|
|
346
|
-
*/
|
|
347
|
-
setLiveSearchComponent(liveSearch) {
|
|
348
|
-
this._registerNewPlugin(liveSearch, LIVE_SEARCH, 'liveSearch');
|
|
349
|
-
}
|
|
350
|
-
//######################### public methods #########################
|
|
351
|
-
/**
|
|
352
|
-
* Initialize component, automatically called once if not blocked by options
|
|
353
|
-
*/
|
|
354
|
-
initialize() {
|
|
355
|
-
const liveSearchPlugin = this._pluginInstances[LIVE_SEARCH];
|
|
356
|
-
this.liveSearchElement = [[liveSearchPlugin.liveSearchElement]];
|
|
357
|
-
if (this.selectOptions.absolute) {
|
|
358
|
-
this._appendPopupToBody(this._selectOptions.plugins.popup.type);
|
|
359
|
-
}
|
|
360
|
-
this._changeDetector.detectChanges();
|
|
361
|
-
this.selectOptions.optionsGatherer.initializeGatherer();
|
|
362
|
-
this._pluginInstances[LIVE_SEARCH].initialize();
|
|
363
|
-
this._pluginInstances[KEYBOARD_HANDLER].initialize();
|
|
364
|
-
this._pluginInstances[VALUE_HANDLER].initialize();
|
|
365
|
-
this._pluginInstances[NORMAL_STATE]?.initialize();
|
|
366
|
-
this._pluginInstances[READONLY_STATE]?.initialize();
|
|
367
|
-
this._pluginInstances[POPUP].initialize();
|
|
368
|
-
this._pluginInstances[POSITIONER].initialize();
|
|
369
|
-
this.isInitialized = true;
|
|
370
|
-
this._initializedSubject.next(true);
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Initialize options, automaticaly called during init phase, but can be used to reinitialize NgSelectOptions
|
|
374
|
-
*/
|
|
375
|
-
initOptions() {
|
|
376
|
-
this.selectOptions.optionsGatherer.ngSelectPlugins = this._pluginInstances;
|
|
377
|
-
this.selectOptions.optionsGatherer.pluginBus = this._pluginBus;
|
|
378
|
-
this.selectOptions.optionsGatherer.select = this;
|
|
379
|
-
const initOptionsPlugin = (pluginKey, pluginName) => {
|
|
380
|
-
if (this._selectOptions.plugins[pluginName]) {
|
|
381
|
-
this._selectOptions.plugins[pluginName].type = resolveForwardRef(this._selectOptions.plugins[pluginName].type);
|
|
382
|
-
if (this._pluginInstances[pluginKey]) {
|
|
383
|
-
if (this._selectOptions.plugins && this._selectOptions.plugins[pluginName] && this._selectOptions.plugins[pluginName].options) {
|
|
384
|
-
this._pluginInstances[pluginKey].options = this._selectOptions.plugins[pluginName].options;
|
|
385
|
-
}
|
|
386
|
-
this._pluginInstances[pluginKey].initOptions();
|
|
304
|
+
//create and initialize options for popup plugin, allows absolute positioning
|
|
305
|
+
effect(() => {
|
|
306
|
+
const selectOptions = this.selectOptions;
|
|
307
|
+
const popupContainer = this.popupContainer();
|
|
308
|
+
this.destroyPlugin(SelectPluginType.Popup, popupContainer, this.popupInit);
|
|
309
|
+
this.createPlugin(this.selectOptions.plugins?.popup, SelectPluginType.Popup, this.popupContainer(), this.popupInit);
|
|
310
|
+
if (selectOptions.absolute && this.popupComponentRef) {
|
|
311
|
+
const element = getHostElement(this.popupComponentRef);
|
|
312
|
+
if (!element) {
|
|
313
|
+
throw new Error('Could not get element of popup component');
|
|
387
314
|
}
|
|
315
|
+
renderToBody(document, element, selectOptions.containerElement);
|
|
388
316
|
}
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
* Gets instance of plugin by its id
|
|
408
|
-
* @param pluginId - Id of plugin, use constants
|
|
409
|
-
*/
|
|
410
|
-
getPlugin(pluginId) {
|
|
411
|
-
return this._pluginInstances[pluginId];
|
|
317
|
+
});
|
|
318
|
+
//initialize plugins when all options are initialized
|
|
319
|
+
effect(() => {
|
|
320
|
+
if (this.optionsInit().initialized) {
|
|
321
|
+
untracked(() => {
|
|
322
|
+
this.pluginInstances.OptionsHandler.initialize();
|
|
323
|
+
this.pluginInstances.LiveSearch.initialize();
|
|
324
|
+
this.pluginInstances.KeyboardHandler.initialize();
|
|
325
|
+
this.pluginInstances.ValueHandler.initialize();
|
|
326
|
+
this.pluginInstances.normalState()?.initialize();
|
|
327
|
+
this.pluginInstances.readonlyState()?.initialize();
|
|
328
|
+
this.pluginInstances.Popup.initialize();
|
|
329
|
+
this.pluginInstances.Positioner.initialize();
|
|
330
|
+
this.pluginInstances.Interactions.initialize();
|
|
331
|
+
});
|
|
332
|
+
this.initializedSignal.set(true);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
412
335
|
}
|
|
336
|
+
//######################### public methods #########################
|
|
413
337
|
/**
|
|
414
|
-
*
|
|
415
|
-
* @param eventName - Name of event that should be listened to
|
|
416
|
-
* @param handler - Function used for handling event
|
|
338
|
+
* @inheritdoc
|
|
417
339
|
*/
|
|
418
|
-
|
|
419
|
-
return this.
|
|
340
|
+
getPlugin(pluginType) {
|
|
341
|
+
return this.pluginInstances[pluginType];
|
|
420
342
|
}
|
|
421
343
|
/**
|
|
422
|
-
*
|
|
423
|
-
* @param actions - Array of actions that are executed over NgSelect
|
|
344
|
+
* @inheritdoc
|
|
424
345
|
*/
|
|
425
346
|
execute(...actions) {
|
|
426
347
|
if (!actions) {
|
|
@@ -429,109 +350,104 @@ export class NgSelectComponent {
|
|
|
429
350
|
actions.forEach(action => action(this));
|
|
430
351
|
}
|
|
431
352
|
/**
|
|
432
|
-
*
|
|
433
|
-
* @param func - Function that is executed and its result is returned
|
|
353
|
+
* @inheritdoc
|
|
434
354
|
*/
|
|
435
355
|
executeAndReturn(func) {
|
|
436
356
|
if (!func) {
|
|
437
|
-
|
|
357
|
+
throw new Error('Function is required');
|
|
438
358
|
}
|
|
439
359
|
return func(this);
|
|
440
360
|
}
|
|
441
|
-
//######################### protected methods #########################
|
|
361
|
+
// //######################### protected methods #########################
|
|
442
362
|
/**
|
|
443
|
-
*
|
|
444
|
-
* @param
|
|
363
|
+
* Creates plugin
|
|
364
|
+
* @param pluginDescription - Information about plugin that should be created
|
|
365
|
+
* @param pluginType - Key of plugin used for pluginInstances
|
|
366
|
+
* @param pluginViewContainer - Container where should be plugin created
|
|
367
|
+
* @param initOptions - Signal that hold information about init options state for this plugin
|
|
445
368
|
*/
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
369
|
+
async createPlugin(pluginDescription, pluginType, pluginViewContainer, initOptions) {
|
|
370
|
+
if (!pluginDescription?.type) {
|
|
371
|
+
this.destroyPlugin(pluginType, pluginViewContainer, initOptions);
|
|
449
372
|
return;
|
|
450
373
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
374
|
+
const type = resolveForwardRef(pluginDescription.type);
|
|
375
|
+
let newInstance = false;
|
|
376
|
+
//new type provided
|
|
377
|
+
if (type != this.pluginTypes[pluginType]) {
|
|
378
|
+
initOptions.set(false);
|
|
379
|
+
this.pluginTypes[pluginType] = type;
|
|
380
|
+
pluginViewContainer.clear();
|
|
381
|
+
const component = pluginViewContainer.createComponent(type);
|
|
382
|
+
component.changeDetectorRef.detectChanges();
|
|
383
|
+
this.pluginInstances[pluginType] = component.instance;
|
|
384
|
+
newInstance = true;
|
|
385
|
+
if (pluginType == SelectPluginType.Popup) {
|
|
386
|
+
this.popupComponentRef = component;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
//only call when new instance of plugin was created
|
|
390
|
+
if (newInstance) {
|
|
391
|
+
pluginDescription.instanceCallback?.(this.pluginInstances[pluginType]);
|
|
392
|
+
}
|
|
393
|
+
//options are available, set them
|
|
394
|
+
if (pluginDescription.options) {
|
|
395
|
+
initOptions.set(false);
|
|
396
|
+
this.pluginInstances[pluginType].options = pluginDescription.options;
|
|
455
397
|
}
|
|
456
|
-
this.
|
|
457
|
-
this._absolutePopupElement = this.liveSearchElement[0][0];
|
|
458
|
-
// 1. Create a component reference from the component
|
|
459
|
-
this._absolutePopup = this._componentFactoryResolver
|
|
460
|
-
.resolveComponentFactory(component)
|
|
461
|
-
.create(this._injector, this.liveSearchElement);
|
|
462
|
-
// 2. Attach component to the appRef so that it's inside the ng component tree
|
|
463
|
-
this._appRef.attachView(this._absolutePopup.hostView);
|
|
464
|
-
// 3. Get DOM element from component
|
|
465
|
-
const domElem = this._absolutePopup.hostView
|
|
466
|
-
.rootNodes[0];
|
|
467
|
-
// 4. Append DOM element to the body
|
|
468
|
-
renderToBody(document, domElem, this._selectOptions.containerElement);
|
|
469
|
-
this.setPopupComponent(this._absolutePopup.instance);
|
|
398
|
+
await this.initOption(pluginType, initOptions);
|
|
470
399
|
}
|
|
471
400
|
/**
|
|
472
|
-
*
|
|
401
|
+
* Init options for single plugin
|
|
402
|
+
* @param pluginType - Type of plugin to be initialized
|
|
403
|
+
* @param initOptions - Init options signal for this plugin
|
|
473
404
|
*/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
this._absolutePopup.destroy();
|
|
478
|
-
this._absolutePopup = null;
|
|
479
|
-
this._absolutePopupType = null;
|
|
480
|
-
this._absolutePopupElement = null;
|
|
481
|
-
}
|
|
405
|
+
async initOption(pluginType, initOptions) {
|
|
406
|
+
await this.pluginInstances[pluginType].initOptions();
|
|
407
|
+
initOptions.set(true);
|
|
482
408
|
}
|
|
483
409
|
/**
|
|
484
|
-
*
|
|
485
|
-
* @param
|
|
486
|
-
* @param
|
|
487
|
-
* @param
|
|
410
|
+
* Destroys plugin
|
|
411
|
+
* @param pluginType - Plugin type to be destroyed
|
|
412
|
+
* @param plugiViewContainer - Container which will be emptied
|
|
413
|
+
* @param initOptions - Signal that hold information about init options state for this plugin
|
|
488
414
|
*/
|
|
489
|
-
|
|
490
|
-
if (
|
|
491
|
-
this.
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
this._pluginInstances[pluginKey] = plugin;
|
|
495
|
-
if (this._selectOptions.plugins && this._selectOptions.plugins[pluginName] && this._selectOptions.plugins[pluginName].options) {
|
|
496
|
-
plugin.options = this._selectOptions.plugins[pluginName].options;
|
|
497
|
-
}
|
|
498
|
-
plugin.initOptions();
|
|
499
|
-
if (this._selectOptions.plugins && this._selectOptions.plugins[pluginName] && this._selectOptions.plugins[pluginName].instanceCallback) {
|
|
500
|
-
this._selectOptions.plugins[pluginName].instanceCallback(plugin);
|
|
415
|
+
destroyPlugin(pluginType, pluginViewContainer, initOptions) {
|
|
416
|
+
if (pluginType == SelectPluginType.Popup) {
|
|
417
|
+
this.popupComponentRef = null;
|
|
501
418
|
}
|
|
419
|
+
pluginViewContainer.clear();
|
|
420
|
+
initOptions.set(false);
|
|
421
|
+
this.pluginTypes[pluginType] = null;
|
|
502
422
|
}
|
|
503
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
504
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: Select, deps: [{ token: i1.SelectPluginInstances }, { token: i1.SelectBus }, { 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 }); }
|
|
424
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.5", type: Select, isStandalone: true, selector: "ng-select", inputs: { selectOptions: { classPropertyName: "selectOptions", 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 } }, providers: [
|
|
505
425
|
{
|
|
506
|
-
provide:
|
|
507
|
-
useFactory: () =>
|
|
426
|
+
provide: SelectPluginInstances,
|
|
427
|
+
useFactory: () => new SelectPluginInstances(),
|
|
508
428
|
},
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
useClass: PluginBus
|
|
512
|
-
}
|
|
513
|
-
], queries: [{ propertyName: "normalStateTemplate", first: true, predicate: ["normalStateTemplate"], descendants: true }, { propertyName: "optionTemplate", first: true, predicate: ["optionTemplate"], descendants: true }, { propertyName: "optionsChildren", predicate: OptionComponent }, { propertyName: "optGroupsChildren", predicate: OptGroupComponent }], usesOnChanges: true, ngImport: i0, template: "<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.liveSearch?.type\" (ngComponentOutletExCreated)=\"setLiveSearchComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.positioner?.type\" (ngComponentOutletExCreated)=\"setPositionerComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.keyboardHandler?.type\" (ngComponentOutletExCreated)=\"setKeyboardHandlerComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.valueHandler?.type\" (ngComponentOutletExCreated)=\"setValueHandlerComponent($event)\"></ng-template>\r\n\r\n<div>\r\n <ng-template [ngIf]=\"!selectOptions?.readonly\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.normalState?.type\" (ngComponentOutletExCreated)=\"setNormalStateComponent($event)\" [ngComponentOutletExContent]=\"liveSearchElement\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"selectOptions?.readonly\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.readonlyState?.type\" (ngComponentOutletExCreated)=\"setReadonlyStateComponent($event)\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"!selectOptions?.absolute\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.popup?.type\" (ngComponentOutletExCreated)=\"setPopupComponent($event)\" [ngComponentOutletExContent]=\"liveSearchElement\"></ng-template>\r\n </ng-template>\r\n</div>", styles: [":host\n {\n display: block;\n position: relative;\n }"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgComponentOutletEx, selector: "[ngComponentOutletEx]", inputs: ["ngComponentOutletEx", "ngComponentOutletExInjector", "ngComponentOutletExContent"], outputs: ["ngComponentOutletExCreated"], exportAs: ["ngComponentOutletEx"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
429
|
+
SelectBus,
|
|
430
|
+
], queries: [{ propertyName: "normalStateTemplate", first: true, predicate: NormalStateTemplate, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: OptionTemplate, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "availableOptions", predicate: Option, isSignal: true }], viewQueries: [{ propertyName: "liveSearchContainer", first: true, predicate: ["liveSearch"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "interactionsContainer", first: true, predicate: ["interactions"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "optionsHandlerContainer", first: true, predicate: ["optionsHandler"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "positionerContainer", first: true, predicate: ["positioner"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "keyboardHandlerContainer", first: true, predicate: ["keyboardHandler"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "valueHandlerContainer", first: true, predicate: ["valueHandler"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "readonlyStateContainer", first: true, predicate: ["readonlyState"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "normalStateContainer", first: true, predicate: ["normalState"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "popupContainer", first: true, predicate: ["popup"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<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>\r\n <ng-container #readonlyState />\r\n <ng-container #normalState />\r\n <ng-container #popup />\r\n</div>\r\n", styles: [":host\n{\n display: block;\n position: relative;\n}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
514
431
|
}
|
|
515
|
-
|
|
432
|
+
__decorate([
|
|
433
|
+
CopyOptionsAsSignal(),
|
|
434
|
+
__metadata("design:type", Object)
|
|
435
|
+
], Select.prototype, "selectOptions", void 0);
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: Select, decorators: [{
|
|
516
437
|
type: Component,
|
|
517
|
-
args: [{ selector: 'ng-select',
|
|
438
|
+
args: [{ selector: 'ng-select', providers: [
|
|
518
439
|
{
|
|
519
|
-
provide:
|
|
520
|
-
useFactory: () =>
|
|
440
|
+
provide: SelectPluginInstances,
|
|
441
|
+
useFactory: () => new SelectPluginInstances(),
|
|
521
442
|
},
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
526
|
-
], template: "<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.liveSearch?.type\" (ngComponentOutletExCreated)=\"setLiveSearchComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.positioner?.type\" (ngComponentOutletExCreated)=\"setPositionerComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.keyboardHandler?.type\" (ngComponentOutletExCreated)=\"setKeyboardHandlerComponent($event)\"></ng-template>\r\n<ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.valueHandler?.type\" (ngComponentOutletExCreated)=\"setValueHandlerComponent($event)\"></ng-template>\r\n\r\n<div>\r\n <ng-template [ngIf]=\"!selectOptions?.readonly\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.normalState?.type\" (ngComponentOutletExCreated)=\"setNormalStateComponent($event)\" [ngComponentOutletExContent]=\"liveSearchElement\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"selectOptions?.readonly\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.readonlyState?.type\" (ngComponentOutletExCreated)=\"setReadonlyStateComponent($event)\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template [ngIf]=\"!selectOptions?.absolute\">\r\n <ng-template [ngComponentOutletEx]=\"selectOptions?.plugins?.popup?.type\" (ngComponentOutletExCreated)=\"setPopupComponent($event)\" [ngComponentOutletExContent]=\"liveSearchElement\"></ng-template>\r\n </ng-template>\r\n</div>", styles: [":host\n {\n display: block;\n position: relative;\n }"] }]
|
|
527
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.PluginBus }, { type: undefined, decorators: [{
|
|
443
|
+
SelectBus,
|
|
444
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<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>\r\n <ng-container #readonlyState />\r\n <ng-container #normalState />\r\n <ng-container #popup />\r\n</div>\r\n", styles: [":host\n{\n display: block;\n position: relative;\n}\n"] }]
|
|
445
|
+
}], ctorParameters: () => [{ type: i1.SelectPluginInstances }, { type: i1.SelectBus }, { type: i0.ElementRef }, { type: HTMLDocument, decorators: [{
|
|
528
446
|
type: Inject,
|
|
529
|
-
args: [
|
|
447
|
+
args: [DOCUMENT]
|
|
530
448
|
}] }, { type: undefined, decorators: [{
|
|
531
|
-
type:
|
|
532
|
-
args: [
|
|
533
|
-
}, {
|
|
534
|
-
type: Optional
|
|
449
|
+
type: Attribute,
|
|
450
|
+
args: ['multiple']
|
|
535
451
|
}] }, { type: i0.Type, decorators: [{
|
|
536
452
|
type: Inject,
|
|
537
453
|
args: [NORMAL_STATE_TYPE]
|
|
@@ -567,32 +483,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
567
483
|
args: [LIVE_SEARCH_TYPE]
|
|
568
484
|
}, {
|
|
569
485
|
type: Optional
|
|
486
|
+
}] }, { type: i0.Type, decorators: [{
|
|
487
|
+
type: Inject,
|
|
488
|
+
args: [INTERACTIONS_TYPE]
|
|
489
|
+
}, {
|
|
490
|
+
type: Optional
|
|
491
|
+
}] }, { type: i0.Type, decorators: [{
|
|
492
|
+
type: Inject,
|
|
493
|
+
args: [OPTIONS_HANDLER_TYPE]
|
|
494
|
+
}, {
|
|
495
|
+
type: Optional
|
|
570
496
|
}] }, { type: undefined, decorators: [{
|
|
571
|
-
type:
|
|
572
|
-
args: [
|
|
573
|
-
}
|
|
574
|
-
type:
|
|
575
|
-
|
|
576
|
-
}] }, { type: undefined, decorators: [{
|
|
577
|
-
type: Attribute,
|
|
578
|
-
args: ['multiple']
|
|
579
|
-
}] }], propDecorators: { selectOptions: [{
|
|
580
|
-
type: Input
|
|
581
|
-
}], disabled: [{
|
|
582
|
-
type: Input
|
|
583
|
-
}], readonly: [{
|
|
497
|
+
type: Inject,
|
|
498
|
+
args: [SELECT_OPTIONS]
|
|
499
|
+
}, {
|
|
500
|
+
type: Optional
|
|
501
|
+
}] }], propDecorators: { liveSearchContainer: [{ type: i0.ViewChild, args: ['liveSearch', { ...{ read: ViewContainerRef }, isSignal: true }] }], interactionsContainer: [{ type: i0.ViewChild, args: ['interactions', { ...{ read: ViewContainerRef }, isSignal: true }] }], optionsHandlerContainer: [{ type: i0.ViewChild, args: ['optionsHandler', { ...{ read: ViewContainerRef }, isSignal: true }] }], positionerContainer: [{ type: i0.ViewChild, args: ['positioner', { ...{ read: ViewContainerRef }, isSignal: true }] }], keyboardHandlerContainer: [{ type: i0.ViewChild, args: ['keyboardHandler', { ...{ read: ViewContainerRef }, isSignal: true }] }], valueHandlerContainer: [{ type: i0.ViewChild, args: ['valueHandler', { ...{ read: ViewContainerRef }, isSignal: true }] }], readonlyStateContainer: [{ type: i0.ViewChild, args: ['readonlyState', { ...{ read: ViewContainerRef }, isSignal: true }] }], normalStateContainer: [{ type: i0.ViewChild, args: ['normalState', { ...{ read: ViewContainerRef }, isSignal: true }] }], popupContainer: [{ type: i0.ViewChild, args: ['popup', { ...{ read: ViewContainerRef }, isSignal: true }] }], selectOptions: [{
|
|
584
502
|
type: Input
|
|
585
|
-
}], normalStateTemplate: [{
|
|
586
|
-
type: ContentChild,
|
|
587
|
-
args: ['normalStateTemplate']
|
|
588
|
-
}], optionTemplate: [{
|
|
589
|
-
type: ContentChild,
|
|
590
|
-
args: ['optionTemplate']
|
|
591
|
-
}], optionsChildren: [{
|
|
592
|
-
type: ContentChildren,
|
|
593
|
-
args: [OptionComponent]
|
|
594
|
-
}], optGroupsChildren: [{
|
|
595
|
-
type: ContentChildren,
|
|
596
|
-
args: [OptGroupComponent]
|
|
597
|
-
}] } });
|
|
503
|
+
}], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], normalStateTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NormalStateTemplate), { ...{ read: TemplateRef }, isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => OptionTemplate), { ...{ read: TemplateRef }, isSignal: true }] }], availableOptions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Option), { isSignal: true }] }] } });
|
|
598
504
|
//# sourceMappingURL=select.component.js.map
|