@anglr/select 15.0.0 → 16.0.0-beta.20260225131351

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.
Files changed (737) hide show
  1. package/changelog.md +130 -0
  2. package/es2022/extensions/src/extensions/getValue.js +16 -1
  3. package/es2022/extensions/src/extensions/getValue.js.map +1 -1
  4. package/es2022/extensions/src/extensions/onFocus.js +14 -1
  5. package/es2022/extensions/src/extensions/onFocus.js.map +1 -1
  6. package/es2022/extensions/src/extensions/patchOptions.js +15 -11
  7. package/es2022/extensions/src/extensions/patchOptions.js.map +1 -1
  8. package/es2022/extensions/src/extensions/reinitializeOptions.js +19 -14
  9. package/es2022/extensions/src/extensions/reinitializeOptions.js.map +1 -1
  10. package/es2022/extensions/src/extensions/setReadonly.js +21 -1
  11. package/es2022/extensions/src/extensions/setReadonly.js.map +1 -1
  12. package/es2022/extensions/src/extensions/setValue.js +17 -1
  13. package/es2022/extensions/src/extensions/setValue.js.map +1 -1
  14. package/es2022/extensions/src/extensions/valueChange.js +17 -1
  15. package/es2022/extensions/src/extensions/valueChange.js.map +1 -1
  16. package/es2022/extensions/src/index.js +1 -7
  17. package/es2022/extensions/src/index.js.map +1 -1
  18. package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.component.js +100 -72
  19. package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.component.js.map +1 -1
  20. package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.interface.js +26 -1
  21. package/es2022/material/src/components/basicDialogPopup/basicDialogPopup.interface.js.map +1 -1
  22. package/es2022/material/src/components/basicDialogPopup/index.js +2 -1
  23. package/es2022/material/src/components/basicDialogPopup/index.js.map +1 -1
  24. package/es2022/material/src/components/basicDialogPopup/types.js +2 -1
  25. package/es2022/material/src/components/basicDialogPopup/types.js.map +1 -1
  26. package/es2022/material/src/directives/dialogPopup/dialogPopup.directive.js +73 -74
  27. package/es2022/material/src/directives/dialogPopup/dialogPopup.directive.js.map +1 -1
  28. package/es2022/material/src/index.js +1 -7
  29. package/es2022/material/src/index.js.map +1 -1
  30. package/es2022/material/src/modules/dialogPopup.module.js +33 -40
  31. package/es2022/material/src/modules/dialogPopup.module.js.map +1 -1
  32. package/es2022/material/src/modules/virtualEditPopup.module.js +27 -30
  33. package/es2022/material/src/modules/virtualEditPopup.module.js.map +1 -1
  34. package/es2022/material/src/plugins/popup/dialog/dialogPopup.component.js +172 -140
  35. package/es2022/material/src/plugins/popup/dialog/dialogPopup.component.js.map +1 -1
  36. package/es2022/material/src/plugins/popup/dialog/dialogPopup.interface.js +65 -1
  37. package/es2022/material/src/plugins/popup/dialog/dialogPopup.interface.js.map +1 -1
  38. package/es2022/material/src/plugins/popup/index.js +1 -2
  39. package/es2022/material/src/plugins/popup/index.js.map +1 -1
  40. package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +120 -88
  41. package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js.map +1 -1
  42. package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.js +20 -1
  43. package/es2022/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.js.map +1 -1
  44. package/es2022/src/components/index.js +4 -0
  45. package/es2022/src/components/index.js.map +1 -0
  46. package/es2022/src/components/option/option.component.js +22 -19
  47. package/es2022/src/components/option/option.component.js.map +1 -1
  48. package/es2022/src/components/optionGroup/optgroup.component.js +29 -0
  49. package/es2022/src/components/optionGroup/optgroup.component.js.map +1 -0
  50. package/es2022/src/components/select/select.component.js +355 -450
  51. package/es2022/src/components/select/select.component.js.map +1 -1
  52. package/es2022/src/decorators/index.js +2 -0
  53. package/es2022/src/decorators/index.js.map +1 -0
  54. package/es2022/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.js +12 -0
  55. package/es2022/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.js.map +1 -0
  56. package/es2022/src/directives/index.js +4 -0
  57. package/es2022/src/directives/index.js.map +1 -0
  58. package/es2022/src/directives/normalStateTemplate/normalStateTemplate.directive.js +30 -0
  59. package/es2022/src/directives/normalStateTemplate/normalStateTemplate.directive.js.map +1 -0
  60. package/es2022/src/directives/optionTemplate/optionTemplate.directive.js +30 -0
  61. package/es2022/src/directives/optionTemplate/optionTemplate.directive.js.map +1 -0
  62. package/es2022/src/directives/selectAbsolute/selectAbsolute.directive.js +25 -0
  63. package/es2022/src/directives/selectAbsolute/selectAbsolute.directive.js.map +1 -0
  64. package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js +210 -0
  65. package/es2022/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.js.map +1 -0
  66. package/es2022/src/directives/selectEdit/selectEdit.directive.js +51 -0
  67. package/es2022/src/directives/selectEdit/selectEdit.directive.js.map +1 -0
  68. package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js +48 -0
  69. package/es2022/src/directives/selectPlaceholder/selectPlaceholder.directive.js.map +1 -0
  70. package/es2022/src/index.js +8 -41
  71. package/es2022/src/index.js.map +1 -1
  72. package/es2022/src/interfaces/index.js +20 -0
  73. package/es2022/src/interfaces/index.js.map +1 -0
  74. package/es2022/src/interfaces/initState/initState.interface.js +2 -0
  75. package/es2022/src/interfaces/initState/initState.interface.js.map +1 -0
  76. package/es2022/src/interfaces/normalStateContext/normalStateContext.interface.js +2 -0
  77. package/es2022/src/interfaces/normalStateContext/normalStateContext.interface.js.map +1 -0
  78. package/es2022/src/interfaces/optionsGatherer/optionsGatherer.interface.js +2 -0
  79. package/es2022/src/interfaces/optionsGatherer/optionsGatherer.interface.js.map +1 -0
  80. package/es2022/src/interfaces/pluginDescription/pluginDescription.interface.js +2 -0
  81. package/es2022/src/interfaces/pluginDescription/pluginDescription.interface.js.map +1 -0
  82. package/es2022/src/interfaces/pluginOptions/pluginOptions.interface.js +2 -0
  83. package/es2022/src/interfaces/pluginOptions/pluginOptions.interface.js.map +1 -0
  84. package/es2022/src/interfaces/plugins/index.js +10 -0
  85. package/es2022/src/interfaces/plugins/index.js.map +1 -0
  86. package/es2022/src/interfaces/plugins/interactions/interactions.interface.js +2 -0
  87. package/es2022/src/interfaces/plugins/interactions/interactions.interface.js.map +1 -0
  88. package/es2022/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.js.map +1 -0
  89. package/es2022/src/interfaces/plugins/liveSearch/liveSearch.interface.js.map +1 -0
  90. package/es2022/src/interfaces/plugins/normalState/normalState.interface.js.map +1 -0
  91. package/es2022/src/interfaces/plugins/optionsHandler/optionsHandler.interface.js +2 -0
  92. package/es2022/src/interfaces/plugins/optionsHandler/optionsHandler.interface.js.map +1 -0
  93. package/es2022/src/interfaces/plugins/popup/popup.interface.js.map +1 -0
  94. package/es2022/src/interfaces/plugins/positioner/positioner.interface.js.map +1 -0
  95. package/es2022/src/interfaces/plugins/readonlyState/readonlyState.interface.js.map +1 -0
  96. package/es2022/src/interfaces/plugins/valueHandler/valueHandler.interface.js.map +1 -0
  97. package/es2022/src/interfaces/popupContext/popupContext.interface.js +2 -0
  98. package/es2022/src/interfaces/popupContext/popupContext.interface.js.map +1 -0
  99. package/es2022/src/interfaces/selectApi/selectApi.interface.js +2 -0
  100. package/es2022/src/interfaces/selectApi/selectApi.interface.js.map +1 -0
  101. package/es2022/src/interfaces/selectBusOptions/selectBusOptions.interface.js +2 -0
  102. package/es2022/src/interfaces/selectBusOptions/selectBusOptions.interface.js.map +1 -0
  103. package/es2022/src/interfaces/selectCssClasses/selectCssClasses.interface.js +2 -0
  104. package/es2022/src/interfaces/selectCssClasses/selectCssClasses.interface.js.map +1 -0
  105. package/es2022/src/interfaces/selectEvent/selectEvent.interface.js +2 -0
  106. package/es2022/src/interfaces/selectEvent/selectEvent.interface.js.map +1 -0
  107. package/es2022/src/interfaces/selectEvents/selectEvents.interface.js +2 -0
  108. package/es2022/src/interfaces/selectEvents/selectEvents.interface.js.map +1 -0
  109. package/es2022/src/interfaces/selectOption/selectOption.interface.js +2 -0
  110. package/es2022/src/interfaces/selectOption/selectOption.interface.js.map +1 -0
  111. package/es2022/src/interfaces/selectOptionGroup/selectOptionGroup.interface.js +2 -0
  112. package/es2022/src/interfaces/selectOptionGroup/selectOptionGroup.interface.js.map +1 -0
  113. package/es2022/src/interfaces/selectOptions/selectOptions.interface.js +2 -0
  114. package/es2022/src/interfaces/selectOptions/selectOptions.interface.js.map +1 -0
  115. package/es2022/src/interfaces/selectPlugin/selectPlugin.interface.js +2 -0
  116. package/es2022/src/interfaces/selectPlugin/selectPlugin.interface.js.map +1 -0
  117. package/es2022/src/interfaces/selectPluginTypes/selectPluginTypes.interface.js +2 -0
  118. package/es2022/src/interfaces/selectPluginTypes/selectPluginTypes.interface.js.map +1 -0
  119. package/es2022/src/interfaces/templateGatherer/templateGatherer.interface.js.map +1 -0
  120. package/es2022/src/interfaces/visualPluginOptions/visualPluginOptions.interface.js +2 -0
  121. package/es2022/src/interfaces/visualPluginOptions/visualPluginOptions.interface.js.map +1 -0
  122. package/es2022/src/misc/classes/index.js +3 -0
  123. package/es2022/src/misc/classes/index.js.map +1 -0
  124. package/es2022/src/misc/{pluginBus/pluginBus.js → classes/selectBus/selectBus.js} +13 -8
  125. package/es2022/src/misc/classes/selectBus/selectBus.js.map +1 -0
  126. package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js +163 -0
  127. package/es2022/src/misc/classes/selectPluginInstances/selectPluginInstances.js.map +1 -0
  128. package/es2022/src/misc/enums.js +43 -0
  129. package/es2022/src/misc/enums.js.map +1 -0
  130. package/es2022/src/misc/extensions/getValue.js +16 -11
  131. package/es2022/src/misc/extensions/getValue.js.map +1 -1
  132. package/es2022/src/misc/extensions/index.js +6 -5
  133. package/es2022/src/misc/extensions/index.js.map +1 -1
  134. package/es2022/src/misc/extensions/onFocus.js +14 -9
  135. package/es2022/src/misc/extensions/onFocus.js.map +1 -1
  136. package/es2022/src/misc/extensions/setReadonly.js +22 -17
  137. package/es2022/src/misc/extensions/setReadonly.js.map +1 -1
  138. package/es2022/src/misc/extensions/setValue.js +17 -12
  139. package/es2022/src/misc/extensions/setValue.js.map +1 -1
  140. package/es2022/src/misc/extensions/valueChange.js +17 -11
  141. package/es2022/src/misc/extensions/valueChange.js.map +1 -1
  142. package/es2022/src/misc/ngSelectOptions.interface.js.map +1 -1
  143. package/es2022/src/misc/optionsGatherer/codeOptionsGatherer.js +119 -82
  144. package/es2022/src/misc/optionsGatherer/codeOptionsGatherer.js.map +1 -1
  145. package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.js +31 -1
  146. package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.js.map +1 -1
  147. package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.js +178 -117
  148. package/es2022/src/misc/optionsGatherer/dynamicOptionsGatherer.js.map +1 -1
  149. package/es2022/src/misc/optionsGatherer/excludingOptionsGatherer.js +155 -109
  150. package/es2022/src/misc/optionsGatherer/excludingOptionsGatherer.js.map +1 -1
  151. package/es2022/src/misc/optionsGatherer/optionsGatherer.interface.js +55 -1
  152. package/es2022/src/misc/optionsGatherer/optionsGatherer.interface.js.map +1 -1
  153. package/es2022/src/misc/optionsGatherer/types.js +4 -3
  154. package/es2022/src/misc/optionsGatherer/types.js.map +1 -1
  155. package/es2022/src/misc/providers.js +102 -0
  156. package/es2022/src/misc/providers.js.map +1 -0
  157. package/es2022/src/misc/tokens.js +42 -0
  158. package/es2022/src/misc/tokens.js.map +1 -0
  159. package/es2022/src/misc/types.js +1 -33
  160. package/es2022/src/misc/types.js.map +1 -1
  161. package/es2022/src/modules/index.js +2 -0
  162. package/es2022/src/modules/index.js.map +1 -0
  163. package/es2022/src/modules/ngSelect.module.js +31 -75
  164. package/es2022/src/modules/ngSelect.module.js.map +1 -1
  165. package/es2022/src/modules/ngSelectEdit.module.js +39 -50
  166. package/es2022/src/modules/ngSelectEdit.module.js.map +1 -1
  167. package/es2022/src/pipes/getPlugin/getPlugin.pipe.js +17 -0
  168. package/es2022/src/pipes/getPlugin/getPlugin.pipe.js.map +1 -0
  169. package/es2022/src/pipes/index.js +4 -0
  170. package/es2022/src/pipes/index.js.map +1 -0
  171. package/es2022/src/pipes/{ngSelectHasValue.pipe.js → selectHasValue/selectHasValue.pipe.js} +7 -7
  172. package/es2022/src/pipes/selectHasValue/selectHasValue.pipe.js.map +1 -0
  173. package/es2022/src/pipes/selectValue/selectValue.pipe.js +31 -0
  174. package/es2022/src/pipes/selectValue/selectValue.pipe.js.map +1 -0
  175. package/es2022/src/plugins/index.js +10 -0
  176. package/es2022/src/plugins/index.js.map +1 -0
  177. package/es2022/src/plugins/interactions/index.js +2 -0
  178. package/es2022/src/plugins/interactions/index.js.map +1 -0
  179. package/es2022/src/plugins/interactions/noInteractions/noInteractions.component.js +41 -0
  180. package/es2022/src/plugins/interactions/noInteractions/noInteractions.component.js.map +1 -0
  181. package/es2022/src/plugins/keyboardHandler/index.js +1 -3
  182. package/es2022/src/plugins/keyboardHandler/index.js.map +1 -1
  183. package/es2022/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.js +41 -0
  184. package/es2022/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.js.map +1 -0
  185. package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js +41 -0
  186. package/es2022/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.js.map +1 -0
  187. package/es2022/src/plugins/liveSearch/index.js +2 -4
  188. package/es2022/src/plugins/liveSearch/index.js.map +1 -1
  189. package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js +41 -0
  190. package/es2022/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.js.map +1 -0
  191. package/es2022/src/plugins/normalState/index.js +1 -3
  192. package/es2022/src/plugins/normalState/index.js.map +1 -1
  193. package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js +41 -0
  194. package/es2022/src/plugins/normalState/simpleNormalState/simpleNormalState.component.js.map +1 -0
  195. package/es2022/src/plugins/optionsHandler/index.js +2 -0
  196. package/es2022/src/plugins/optionsHandler/index.js.map +1 -0
  197. package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js +41 -0
  198. package/es2022/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.js.map +1 -0
  199. package/es2022/src/plugins/popup/index.js +1 -3
  200. package/es2022/src/plugins/popup/index.js.map +1 -1
  201. package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js +41 -0
  202. package/es2022/src/plugins/popup/simplePopup/simplePopup.component.js.map +1 -0
  203. package/es2022/src/plugins/positioner/basicPositioner/basicPositioner.component.js +41 -0
  204. package/es2022/src/plugins/positioner/basicPositioner/basicPositioner.component.js.map +1 -0
  205. package/es2022/src/plugins/positioner/index.js +1 -3
  206. package/es2022/src/plugins/positioner/index.js.map +1 -1
  207. package/es2022/src/plugins/readonlyState/index.js +1 -1
  208. package/es2022/src/plugins/readonlyState/index.js.map +1 -1
  209. package/es2022/src/plugins/valueHandler/basicValueHandler/basicValueHandler.component.js +41 -0
  210. package/es2022/src/plugins/valueHandler/basicValueHandler/basicValueHandler.component.js.map +1 -0
  211. package/es2022/src/plugins/valueHandler/index.js +1 -4
  212. package/es2022/src/plugins/valueHandler/index.js.map +1 -1
  213. package/extensions/src/extensions/getValue.d.ts +0 -1
  214. package/extensions/src/extensions/getValue.d.ts.map +1 -1
  215. package/extensions/src/extensions/onFocus.d.ts +0 -1
  216. package/extensions/src/extensions/onFocus.d.ts.map +1 -1
  217. package/extensions/src/extensions/patchOptions.d.ts +0 -6
  218. package/extensions/src/extensions/patchOptions.d.ts.map +1 -1
  219. package/extensions/src/extensions/reinitializeOptions.d.ts +0 -6
  220. package/extensions/src/extensions/reinitializeOptions.d.ts.map +1 -1
  221. package/extensions/src/extensions/setReadonly.d.ts +0 -1
  222. package/extensions/src/extensions/setReadonly.d.ts.map +1 -1
  223. package/extensions/src/extensions/setValue.d.ts +0 -1
  224. package/extensions/src/extensions/setValue.d.ts.map +1 -1
  225. package/extensions/src/extensions/valueChange.d.ts +0 -1
  226. package/extensions/src/extensions/valueChange.d.ts.map +1 -1
  227. package/extensions/src/index.d.ts +1 -7
  228. package/extensions/src/index.d.ts.map +1 -1
  229. package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts +0 -46
  230. package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts.map +1 -1
  231. package/material/src/components/basicDialogPopup/basicDialogPopup.interface.d.ts +0 -23
  232. package/material/src/components/basicDialogPopup/basicDialogPopup.interface.d.ts.map +1 -1
  233. package/material/src/components/basicDialogPopup/index.d.ts +0 -1
  234. package/material/src/components/basicDialogPopup/index.d.ts.map +1 -1
  235. package/material/src/components/basicDialogPopup/types.d.ts +0 -1
  236. package/material/src/components/basicDialogPopup/types.d.ts.map +1 -1
  237. package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts +0 -26
  238. package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts.map +1 -1
  239. package/material/src/index.d.ts +1 -7
  240. package/material/src/index.d.ts.map +1 -1
  241. package/material/src/modules/dialogPopup.module.d.ts +0 -14
  242. package/material/src/modules/dialogPopup.module.d.ts.map +1 -1
  243. package/material/src/modules/virtualEditPopup.module.d.ts +0 -12
  244. package/material/src/modules/virtualEditPopup.module.d.ts.map +1 -1
  245. package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts +0 -82
  246. package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts.map +1 -1
  247. package/material/src/plugins/popup/dialog/dialogPopup.interface.d.ts +0 -59
  248. package/material/src/plugins/popup/dialog/dialogPopup.interface.d.ts.map +1 -1
  249. package/material/src/plugins/popup/index.d.ts +1 -2
  250. package/material/src/plugins/popup/index.d.ts.map +1 -1
  251. package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts +0 -29
  252. package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts.map +1 -1
  253. package/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.d.ts +0 -16
  254. package/material/src/plugins/popup/virtualEdit/virtualEditPopup.interface.d.ts.map +1 -1
  255. package/package.json +25 -19
  256. package/src/components/index.d.ts +4 -0
  257. package/src/components/index.d.ts.map +1 -0
  258. package/src/components/option/option.component.d.ts +15 -14
  259. package/src/components/option/option.component.d.ts.map +1 -1
  260. package/src/components/optionGroup/optgroup.component.d.ts +25 -0
  261. package/src/components/optionGroup/optgroup.component.d.ts.map +1 -0
  262. package/src/components/select/select.component.css +5 -0
  263. package/src/components/select/select.component.d.ts +94 -179
  264. package/src/components/select/select.component.d.ts.map +1 -1
  265. package/src/components/select/select.component.html +10 -16
  266. package/src/decorators/index.d.ts +2 -0
  267. package/src/{components/select → decorators}/index.d.ts.map +1 -1
  268. package/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.d.ts +5 -0
  269. package/src/decorators/mergeOptionsAsSignal/mergeOptionsAsSignal.decorator.d.ts.map +1 -0
  270. package/src/directives/index.d.ts +4 -0
  271. package/src/directives/index.d.ts.map +1 -0
  272. package/src/directives/normalStateTemplate/normalStateTemplate.directive.d.ts +19 -0
  273. package/src/directives/normalStateTemplate/normalStateTemplate.directive.d.ts.map +1 -0
  274. package/src/directives/optionTemplate/optionTemplate.directive.d.ts +19 -0
  275. package/src/directives/optionTemplate/optionTemplate.directive.d.ts.map +1 -0
  276. package/src/directives/selectAbsolute/selectAbsolute.directive.d.ts +12 -0
  277. package/src/directives/selectAbsolute/selectAbsolute.directive.d.ts.map +1 -0
  278. package/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.d.ts +1 -0
  279. package/src/directives/selectControlValueAccessor/selectControlValueAccessor.directive.d.ts.map +1 -0
  280. package/src/directives/selectEdit/selectEdit.directive.d.ts +1 -0
  281. package/src/directives/selectEdit/selectEdit.directive.d.ts.map +1 -0
  282. package/src/directives/selectPlaceholder/selectPlaceholder.directive.d.ts +1 -0
  283. package/src/directives/selectPlaceholder/selectPlaceholder.directive.d.ts.map +1 -0
  284. package/src/index.d.ts +8 -41
  285. package/src/index.d.ts.map +1 -1
  286. package/src/interfaces/index.d.ts +20 -0
  287. package/src/interfaces/index.d.ts.map +1 -0
  288. package/src/interfaces/initState/initState.interface.d.ts +10 -0
  289. package/src/interfaces/initState/initState.interface.d.ts.map +1 -0
  290. package/src/interfaces/normalStateContext/normalStateContext.interface.d.ts +11 -0
  291. package/src/interfaces/normalStateContext/normalStateContext.interface.d.ts.map +1 -0
  292. package/src/interfaces/optionsGatherer/optionsGatherer.interface.d.ts +12 -0
  293. package/src/interfaces/optionsGatherer/optionsGatherer.interface.d.ts.map +1 -0
  294. package/src/interfaces/pluginDescription/pluginDescription.interface.d.ts +21 -0
  295. package/src/interfaces/pluginDescription/pluginDescription.interface.d.ts.map +1 -0
  296. package/src/interfaces/pluginOptions/pluginOptions.interface.d.ts +6 -0
  297. package/src/interfaces/pluginOptions/pluginOptions.interface.d.ts.map +1 -0
  298. package/src/interfaces/plugins/index.d.ts +10 -0
  299. package/src/interfaces/plugins/index.d.ts.map +1 -0
  300. package/src/interfaces/plugins/interactions/interactions.interface.d.ts +13 -0
  301. package/src/interfaces/plugins/interactions/interactions.interface.d.ts.map +1 -0
  302. package/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.d.ts +13 -0
  303. package/src/interfaces/plugins/keyboardHandler/keyboardHandler.interface.d.ts.map +1 -0
  304. package/src/interfaces/plugins/liveSearch/liveSearch.interface.d.ts +13 -0
  305. package/src/interfaces/plugins/liveSearch/liveSearch.interface.d.ts.map +1 -0
  306. package/src/interfaces/plugins/normalState/normalState.interface.d.ts +31 -0
  307. package/src/interfaces/plugins/normalState/normalState.interface.d.ts.map +1 -0
  308. package/src/interfaces/plugins/optionsHandler/optionsHandler.interface.d.ts +13 -0
  309. package/src/interfaces/plugins/optionsHandler/optionsHandler.interface.d.ts.map +1 -0
  310. package/src/interfaces/plugins/popup/popup.interface.d.ts +13 -0
  311. package/src/interfaces/plugins/popup/popup.interface.d.ts.map +1 -0
  312. package/src/interfaces/plugins/positioner/positioner.interface.d.ts +13 -0
  313. package/src/interfaces/plugins/positioner/positioner.interface.d.ts.map +1 -0
  314. package/src/interfaces/plugins/readonlyState/readonlyState.interface.d.ts +12 -0
  315. package/src/interfaces/plugins/readonlyState/readonlyState.interface.d.ts.map +1 -0
  316. package/src/interfaces/plugins/valueHandler/valueHandler.interface.d.ts +13 -0
  317. package/src/interfaces/plugins/valueHandler/valueHandler.interface.d.ts.map +1 -0
  318. package/src/interfaces/popupContext/popupContext.interface.d.ts +16 -0
  319. package/src/interfaces/popupContext/popupContext.interface.d.ts.map +1 -0
  320. package/src/interfaces/selectApi/selectApi.interface.d.ts +50 -0
  321. package/src/interfaces/selectApi/selectApi.interface.d.ts.map +1 -0
  322. package/src/interfaces/selectBusOptions/selectBusOptions.interface.d.ts +24 -0
  323. package/src/interfaces/selectBusOptions/selectBusOptions.interface.d.ts.map +1 -0
  324. package/src/interfaces/selectCssClasses/selectCssClasses.interface.d.ts +6 -0
  325. package/src/interfaces/selectCssClasses/selectCssClasses.interface.d.ts.map +1 -0
  326. package/src/interfaces/selectEvent/selectEvent.interface.d.ts +20 -0
  327. package/src/interfaces/selectEvent/selectEvent.interface.d.ts.map +1 -0
  328. package/src/interfaces/selectEvents/selectEvents.interface.d.ts +37 -0
  329. package/src/interfaces/selectEvents/selectEvents.interface.d.ts.map +1 -0
  330. package/src/interfaces/selectOption/selectOption.interface.d.ts +33 -0
  331. package/src/interfaces/selectOption/selectOption.interface.d.ts.map +1 -0
  332. package/src/interfaces/selectOptionGroup/selectOptionGroup.interface.d.ts +21 -0
  333. package/src/interfaces/selectOptionGroup/selectOptionGroup.interface.d.ts.map +1 -0
  334. package/src/interfaces/selectOptions/selectOptions.interface.d.ts +27 -0
  335. package/src/interfaces/selectOptions/selectOptions.interface.d.ts.map +1 -0
  336. package/src/interfaces/selectPlugin/selectPlugin.interface.d.ts +33 -0
  337. package/src/interfaces/selectPlugin/selectPlugin.interface.d.ts.map +1 -0
  338. package/src/interfaces/selectPluginTypes/selectPluginTypes.interface.d.ts +44 -0
  339. package/src/interfaces/selectPluginTypes/selectPluginTypes.interface.d.ts.map +1 -0
  340. package/src/interfaces/templateGatherer/templateGatherer.interface.d.ts +17 -0
  341. package/src/interfaces/templateGatherer/templateGatherer.interface.d.ts.map +1 -0
  342. package/src/interfaces/visualPluginOptions/visualPluginOptions.interface.d.ts +11 -0
  343. package/src/interfaces/visualPluginOptions/visualPluginOptions.interface.d.ts.map +1 -0
  344. package/src/misc/classes/index.d.ts +3 -0
  345. package/src/misc/classes/index.d.ts.map +1 -0
  346. package/src/misc/classes/selectBus/selectBus.d.ts +50 -0
  347. package/src/misc/classes/selectBus/selectBus.d.ts.map +1 -0
  348. package/src/misc/classes/selectPluginInstances/selectPluginInstances.d.ts +90 -0
  349. package/src/misc/classes/selectPluginInstances/selectPluginInstances.d.ts.map +1 -0
  350. package/src/misc/enums.d.ts +42 -0
  351. package/src/misc/enums.d.ts.map +1 -0
  352. package/src/misc/extensions/getValue.d.ts +0 -6
  353. package/src/misc/extensions/getValue.d.ts.map +1 -1
  354. package/src/misc/extensions/index.d.ts +0 -5
  355. package/src/misc/extensions/index.d.ts.map +1 -1
  356. package/src/misc/extensions/onFocus.d.ts +0 -7
  357. package/src/misc/extensions/onFocus.d.ts.map +1 -1
  358. package/src/misc/extensions/setReadonly.d.ts +0 -7
  359. package/src/misc/extensions/setReadonly.d.ts.map +1 -1
  360. package/src/misc/extensions/setValue.d.ts +0 -7
  361. package/src/misc/extensions/setValue.d.ts.map +1 -1
  362. package/src/misc/extensions/valueChange.d.ts +0 -7
  363. package/src/misc/extensions/valueChange.d.ts.map +1 -1
  364. package/src/misc/ngSelectOptions.interface.d.ts +0 -71
  365. package/src/misc/ngSelectOptions.interface.d.ts.map +1 -1
  366. package/src/misc/optionsGatherer/codeOptionsGatherer.d.ts +0 -69
  367. package/src/misc/optionsGatherer/codeOptionsGatherer.d.ts.map +1 -1
  368. package/src/misc/optionsGatherer/dynamicOptionsGatherer.d.ts +0 -85
  369. package/src/misc/optionsGatherer/dynamicOptionsGatherer.d.ts.map +1 -1
  370. package/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.d.ts +0 -28
  371. package/src/misc/optionsGatherer/dynamicOptionsGatherer.interface.d.ts.map +1 -1
  372. package/src/misc/optionsGatherer/excludingOptionsGatherer.d.ts +0 -72
  373. package/src/misc/optionsGatherer/excludingOptionsGatherer.d.ts.map +1 -1
  374. package/src/misc/optionsGatherer/optionsGatherer.interface.d.ts +0 -52
  375. package/src/misc/optionsGatherer/optionsGatherer.interface.d.ts.map +1 -1
  376. package/src/misc/optionsGatherer/types.d.ts +0 -3
  377. package/src/misc/optionsGatherer/types.d.ts.map +1 -1
  378. package/src/misc/providers.d.ts +54 -0
  379. package/src/misc/providers.d.ts.map +1 -0
  380. package/src/misc/tokens.d.ts +45 -0
  381. package/src/misc/tokens.d.ts.map +1 -0
  382. package/src/misc/types.d.ts +7 -35
  383. package/src/misc/types.d.ts.map +1 -1
  384. package/src/modules/index.d.ts +2 -0
  385. package/src/modules/index.d.ts.map +1 -0
  386. package/src/modules/ngSelect.module.d.ts +7 -20
  387. package/src/modules/ngSelect.module.d.ts.map +1 -1
  388. package/src/modules/ngSelectEdit.module.d.ts +0 -16
  389. package/src/modules/ngSelectEdit.module.d.ts.map +1 -1
  390. package/src/pipes/getPlugin/getPlugin.pipe.d.ts +25 -0
  391. package/src/pipes/getPlugin/getPlugin.pipe.d.ts.map +1 -0
  392. package/src/pipes/index.d.ts +4 -0
  393. package/src/pipes/index.d.ts.map +1 -0
  394. package/src/pipes/selectHasValue/selectHasValue.pipe.d.ts +16 -0
  395. package/src/pipes/selectHasValue/selectHasValue.pipe.d.ts.map +1 -0
  396. package/src/pipes/selectValue/selectValue.pipe.d.ts +19 -0
  397. package/src/pipes/selectValue/selectValue.pipe.d.ts.map +1 -0
  398. package/src/plugins/index.d.ts +9 -0
  399. package/src/plugins/index.d.ts.map +1 -0
  400. package/src/plugins/interactions/index.d.ts +2 -0
  401. package/src/plugins/interactions/index.d.ts.map +1 -0
  402. package/src/plugins/interactions/noInteractions/noInteractions.component.d.ts +32 -0
  403. package/src/plugins/interactions/noInteractions/noInteractions.component.d.ts.map +1 -0
  404. package/src/plugins/keyboardHandler/index.d.ts +1 -3
  405. package/src/plugins/keyboardHandler/index.d.ts.map +1 -1
  406. package/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.d.ts +32 -0
  407. package/src/plugins/keyboardHandler/simpleKeyboardHandler/simpleKeyboardHandler.component.d.ts.map +1 -0
  408. package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts +32 -0
  409. package/src/plugins/liveSearch/filterLiveSearch/filterLiveSearch.component.d.ts.map +1 -0
  410. package/src/plugins/liveSearch/index.d.ts +2 -4
  411. package/src/plugins/liveSearch/index.d.ts.map +1 -1
  412. package/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.d.ts +32 -0
  413. package/src/plugins/liveSearch/noLiveSearch/noLiveSearch.component.d.ts.map +1 -0
  414. package/src/plugins/normalState/index.d.ts +1 -3
  415. package/src/plugins/normalState/index.d.ts.map +1 -1
  416. package/src/plugins/normalState/simpleNormalState/simpleNormalState.component.d.ts +32 -0
  417. package/src/plugins/normalState/simpleNormalState/simpleNormalState.component.d.ts.map +1 -0
  418. package/src/plugins/optionsHandler/index.d.ts +2 -0
  419. package/src/plugins/optionsHandler/index.d.ts.map +1 -0
  420. package/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.d.ts +32 -0
  421. package/src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.d.ts.map +1 -0
  422. package/src/plugins/popup/index.d.ts +1 -3
  423. package/src/plugins/popup/index.d.ts.map +1 -1
  424. package/src/plugins/popup/simplePopup/simplePopup.component.d.ts +32 -0
  425. package/src/plugins/popup/simplePopup/simplePopup.component.d.ts.map +1 -0
  426. package/src/plugins/positioner/basicPositioner/basicPositioner.component.d.ts +32 -0
  427. package/src/plugins/positioner/basicPositioner/basicPositioner.component.d.ts.map +1 -0
  428. package/src/plugins/positioner/index.d.ts +1 -3
  429. package/src/plugins/positioner/index.d.ts.map +1 -1
  430. package/src/plugins/readonlyState/index.d.ts +0 -1
  431. package/src/plugins/readonlyState/index.d.ts.map +1 -1
  432. package/src/plugins/valueHandler/basicValueHandler/basicValueHandler.component.d.ts +32 -0
  433. package/src/plugins/valueHandler/basicValueHandler/basicValueHandler.component.d.ts.map +1 -0
  434. package/src/plugins/valueHandler/index.d.ts +1 -4
  435. package/src/plugins/valueHandler/index.d.ts.map +1 -1
  436. package/styles/components/_grid.scss +9 -0
  437. package/styles/core/_functions.scss +10 -0
  438. package/styles/core/_misc.scss +146 -0
  439. package/styles/core/_mixins.scss +44 -0
  440. package/styles/core/_theme.scss +16 -0
  441. package/styles/index.scss +2 -0
  442. package/styles/themes/dark.scss +19 -0
  443. package/styles/themes/light.scss +19 -0
  444. package/version.bak +1 -1
  445. package/es2022/material/src/directives/types.js +0 -2
  446. package/es2022/material/src/directives/types.js.map +0 -1
  447. package/es2022/material/src/plugins/popup/components.js +0 -3
  448. package/es2022/material/src/plugins/popup/components.js.map +0 -1
  449. package/es2022/src/components/option/index.js +0 -3
  450. package/es2022/src/components/option/index.js.map +0 -1
  451. package/es2022/src/components/option/optgroup.component.js +0 -54
  452. package/es2022/src/components/option/optgroup.component.js.map +0 -1
  453. package/es2022/src/components/option/optgroup.interface.js +0 -2
  454. package/es2022/src/components/option/optgroup.interface.js.map +0 -1
  455. package/es2022/src/components/option/option.interface.js +0 -2
  456. package/es2022/src/components/option/option.interface.js.map +0 -1
  457. package/es2022/src/components/select/index.js +0 -2
  458. package/es2022/src/components/select/index.js.map +0 -1
  459. package/es2022/src/components/select/select.interface.js +0 -2
  460. package/es2022/src/components/select/select.interface.js.map +0 -1
  461. package/es2022/src/components/select/types.js +0 -6
  462. package/es2022/src/components/select/types.js.map +0 -1
  463. package/es2022/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +0 -25
  464. package/es2022/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js.map +0 -1
  465. package/es2022/src/directives/ngSelectEdit/ngSelectEdit.directive.js +0 -66
  466. package/es2022/src/directives/ngSelectEdit/ngSelectEdit.directive.js.map +0 -1
  467. package/es2022/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +0 -42
  468. package/es2022/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js.map +0 -1
  469. package/es2022/src/index.ssr.js +0 -10
  470. package/es2022/src/index.ssr.js.map +0 -1
  471. package/es2022/src/misc/index.js +0 -6
  472. package/es2022/src/misc/index.js.map +0 -1
  473. package/es2022/src/misc/ngSelectControlValueAccessor.directive.js +0 -162
  474. package/es2022/src/misc/ngSelectControlValueAccessor.directive.js.map +0 -1
  475. package/es2022/src/misc/plugin.interface.js +0 -2
  476. package/es2022/src/misc/plugin.interface.js.map +0 -1
  477. package/es2022/src/misc/pluginBus/pluginBus.interface.js +0 -2
  478. package/es2022/src/misc/pluginBus/pluginBus.interface.js.map +0 -1
  479. package/es2022/src/misc/pluginBus/pluginBus.js.map +0 -1
  480. package/es2022/src/misc/templateGatherer.interface.js.map +0 -1
  481. package/es2022/src/modules/ngSelectDynamic.module.js +0 -20
  482. package/es2022/src/modules/ngSelectDynamic.module.js.map +0 -1
  483. package/es2022/src/pipes/ngSelectHasValue.pipe.js.map +0 -1
  484. package/es2022/src/pipes/ngSelectValue.pipe.js +0 -31
  485. package/es2022/src/pipes/ngSelectValue.pipe.js.map +0 -1
  486. package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +0 -146
  487. package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js.map +0 -1
  488. package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.js +0 -2
  489. package/es2022/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.js.map +0 -1
  490. package/es2022/src/plugins/keyboardHandler/components.js +0 -3
  491. package/es2022/src/plugins/keyboardHandler/components.js.map +0 -1
  492. package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +0 -197
  493. package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js.map +0 -1
  494. package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.js +0 -2
  495. package/es2022/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.js.map +0 -1
  496. package/es2022/src/plugins/keyboardHandler/keyboardHandler.interface.js.map +0 -1
  497. package/es2022/src/plugins/keyboardHandler/types.js +0 -10
  498. package/es2022/src/plugins/keyboardHandler/types.js.map +0 -1
  499. package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.component.js +0 -164
  500. package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.component.js.map +0 -1
  501. package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.interface.js +0 -2
  502. package/es2022/src/plugins/liveSearch/basic/basicLiveSearch.interface.js.map +0 -1
  503. package/es2022/src/plugins/liveSearch/components.js +0 -4
  504. package/es2022/src/plugins/liveSearch/components.js.map +0 -1
  505. package/es2022/src/plugins/liveSearch/edit/editLiveSearch.component.js +0 -313
  506. package/es2022/src/plugins/liveSearch/edit/editLiveSearch.component.js.map +0 -1
  507. package/es2022/src/plugins/liveSearch/edit/editLiveSearch.interface.js +0 -2
  508. package/es2022/src/plugins/liveSearch/edit/editLiveSearch.interface.js.map +0 -1
  509. package/es2022/src/plugins/liveSearch/liveSearch.interface.js.map +0 -1
  510. package/es2022/src/plugins/liveSearch/no/noLiveSearch.component.js +0 -65
  511. package/es2022/src/plugins/liveSearch/no/noLiveSearch.component.js.map +0 -1
  512. package/es2022/src/plugins/liveSearch/no/noLiveSearch.interface.js +0 -2
  513. package/es2022/src/plugins/liveSearch/no/noLiveSearch.interface.js.map +0 -1
  514. package/es2022/src/plugins/liveSearch/types.js +0 -10
  515. package/es2022/src/plugins/liveSearch/types.js.map +0 -1
  516. package/es2022/src/plugins/normalState/basic/basicNormalState.component.js +0 -58
  517. package/es2022/src/plugins/normalState/basic/basicNormalState.component.js.map +0 -1
  518. package/es2022/src/plugins/normalState/basic/basicNormalState.interface.js +0 -2
  519. package/es2022/src/plugins/normalState/basic/basicNormalState.interface.js.map +0 -1
  520. package/es2022/src/plugins/normalState/components.js +0 -4
  521. package/es2022/src/plugins/normalState/components.js.map +0 -1
  522. package/es2022/src/plugins/normalState/edit/editNormalState.component.js +0 -88
  523. package/es2022/src/plugins/normalState/edit/editNormalState.component.js.map +0 -1
  524. package/es2022/src/plugins/normalState/edit/editNormalState.interface.js +0 -2
  525. package/es2022/src/plugins/normalState/edit/editNormalState.interface.js.map +0 -1
  526. package/es2022/src/plugins/normalState/normalState.interface.js.map +0 -1
  527. package/es2022/src/plugins/normalState/normalStateAbstract.component.js +0 -89
  528. package/es2022/src/plugins/normalState/normalStateAbstract.component.js.map +0 -1
  529. package/es2022/src/plugins/normalState/types.js +0 -10
  530. package/es2022/src/plugins/normalState/types.js.map +0 -1
  531. package/es2022/src/plugins/popup/basic/basicPopup.component.js +0 -62
  532. package/es2022/src/plugins/popup/basic/basicPopup.component.js.map +0 -1
  533. package/es2022/src/plugins/popup/basic/basicPopup.interface.js +0 -2
  534. package/es2022/src/plugins/popup/basic/basicPopup.interface.js.map +0 -1
  535. package/es2022/src/plugins/popup/component.js +0 -4
  536. package/es2022/src/plugins/popup/component.js.map +0 -1
  537. package/es2022/src/plugins/popup/edit/editPopup.component.js +0 -85
  538. package/es2022/src/plugins/popup/edit/editPopup.component.js.map +0 -1
  539. package/es2022/src/plugins/popup/edit/editPopup.interface.js +0 -2
  540. package/es2022/src/plugins/popup/edit/editPopup.interface.js.map +0 -1
  541. package/es2022/src/plugins/popup/popup.interface.js.map +0 -1
  542. package/es2022/src/plugins/popup/popupAbstract.component.js +0 -200
  543. package/es2022/src/plugins/popup/popupAbstract.component.js.map +0 -1
  544. package/es2022/src/plugins/popup/types.js +0 -10
  545. package/es2022/src/plugins/popup/types.js.map +0 -1
  546. package/es2022/src/plugins/positioner/components.js +0 -3
  547. package/es2022/src/plugins/positioner/components.js.map +0 -1
  548. package/es2022/src/plugins/positioner/default/defaultPositioner.component.js +0 -160
  549. package/es2022/src/plugins/positioner/default/defaultPositioner.component.js.map +0 -1
  550. package/es2022/src/plugins/positioner/default/defaultPositioner.interface.js +0 -2
  551. package/es2022/src/plugins/positioner/default/defaultPositioner.interface.js.map +0 -1
  552. package/es2022/src/plugins/positioner/no/noPositioner.component.js +0 -78
  553. package/es2022/src/plugins/positioner/no/noPositioner.component.js.map +0 -1
  554. package/es2022/src/plugins/positioner/no/noPositioner.interface.js +0 -2
  555. package/es2022/src/plugins/positioner/no/noPositioner.interface.js.map +0 -1
  556. package/es2022/src/plugins/positioner/positioner.interface.js.map +0 -1
  557. package/es2022/src/plugins/positioner/types.js +0 -10
  558. package/es2022/src/plugins/positioner/types.js.map +0 -1
  559. package/es2022/src/plugins/readonlyState/readonlyState.interface.js.map +0 -1
  560. package/es2022/src/plugins/readonlyState/types.js +0 -10
  561. package/es2022/src/plugins/readonlyState/types.js.map +0 -1
  562. package/es2022/src/plugins/valueHandler/basic/basicValueHandler.component.js +0 -159
  563. package/es2022/src/plugins/valueHandler/basic/basicValueHandler.component.js.map +0 -1
  564. package/es2022/src/plugins/valueHandler/basic/basicValueHandler.interface.js +0 -2
  565. package/es2022/src/plugins/valueHandler/basic/basicValueHandler.interface.js.map +0 -1
  566. package/es2022/src/plugins/valueHandler/components.js +0 -3
  567. package/es2022/src/plugins/valueHandler/components.js.map +0 -1
  568. package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +0 -179
  569. package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js.map +0 -1
  570. package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.js +0 -2
  571. package/es2022/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.js.map +0 -1
  572. package/es2022/src/plugins/valueHandler/types.js +0 -10
  573. package/es2022/src/plugins/valueHandler/types.js.map +0 -1
  574. package/es2022/src/plugins/valueHandler/valueHandler.interface.js.map +0 -1
  575. package/es2022/src/plugins/valueHandler/valueHandlerBase.js +0 -145
  576. package/es2022/src/plugins/valueHandler/valueHandlerBase.js.map +0 -1
  577. package/material/src/directives/types.d.ts +0 -2
  578. package/material/src/directives/types.d.ts.map +0 -1
  579. package/material/src/plugins/popup/components.d.ts +0 -3
  580. package/material/src/plugins/popup/components.d.ts.map +0 -1
  581. package/src/components/option/index.d.ts +0 -3
  582. package/src/components/option/index.d.ts.map +0 -1
  583. package/src/components/option/optgroup.component.d.ts +0 -37
  584. package/src/components/option/optgroup.component.d.ts.map +0 -1
  585. package/src/components/option/optgroup.interface.d.ts +0 -20
  586. package/src/components/option/optgroup.interface.d.ts.map +0 -1
  587. package/src/components/option/option.interface.d.ts +0 -31
  588. package/src/components/option/option.interface.d.ts.map +0 -1
  589. package/src/components/select/index.d.ts +0 -2
  590. package/src/components/select/select.interface.d.ts +0 -68
  591. package/src/components/select/select.interface.d.ts.map +0 -1
  592. package/src/components/select/types.d.ts +0 -7
  593. package/src/components/select/types.d.ts.map +0 -1
  594. package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts +0 -11
  595. package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts.map +0 -1
  596. package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts +0 -11
  597. package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts.map +0 -1
  598. package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts +0 -21
  599. package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts.map +0 -1
  600. package/src/index.ssr.d.ts +0 -1
  601. package/src/index.ssr.d.ts.map +0 -1
  602. package/src/misc/index.d.ts +0 -6
  603. package/src/misc/index.d.ts.map +0 -1
  604. package/src/misc/ngSelectControlValueAccessor.directive.d.ts +0 -63
  605. package/src/misc/ngSelectControlValueAccessor.directive.d.ts.map +0 -1
  606. package/src/misc/plugin.interface.d.ts +0 -108
  607. package/src/misc/plugin.interface.d.ts.map +0 -1
  608. package/src/misc/pluginBus/pluginBus.d.ts +0 -49
  609. package/src/misc/pluginBus/pluginBus.d.ts.map +0 -1
  610. package/src/misc/pluginBus/pluginBus.interface.d.ts +0 -36
  611. package/src/misc/pluginBus/pluginBus.interface.d.ts.map +0 -1
  612. package/src/misc/templateGatherer.interface.d.ts +0 -17
  613. package/src/misc/templateGatherer.interface.d.ts.map +0 -1
  614. package/src/modules/ngSelectDynamic.module.d.ts +0 -11
  615. package/src/modules/ngSelectDynamic.module.d.ts.map +0 -1
  616. package/src/pipes/ngSelectHasValue.pipe.d.ts +0 -16
  617. package/src/pipes/ngSelectHasValue.pipe.d.ts.map +0 -1
  618. package/src/pipes/ngSelectValue.pipe.d.ts +0 -19
  619. package/src/pipes/ngSelectValue.pipe.d.ts.map +0 -1
  620. package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts +0 -58
  621. package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts.map +0 -1
  622. package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.d.ts +0 -12
  623. package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.interface.d.ts.map +0 -1
  624. package/src/plugins/keyboardHandler/components.d.ts +0 -3
  625. package/src/plugins/keyboardHandler/components.d.ts.map +0 -1
  626. package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts +0 -68
  627. package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts.map +0 -1
  628. package/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.d.ts +0 -12
  629. package/src/plugins/keyboardHandler/edit/editKeyboardHandler.interface.d.ts.map +0 -1
  630. package/src/plugins/keyboardHandler/keyboardHandler.interface.d.ts +0 -12
  631. package/src/plugins/keyboardHandler/keyboardHandler.interface.d.ts.map +0 -1
  632. package/src/plugins/keyboardHandler/types.d.ts +0 -11
  633. package/src/plugins/keyboardHandler/types.d.ts.map +0 -1
  634. package/src/plugins/liveSearch/basic/basicLiveSearch.component.css +0 -11
  635. package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts +0 -98
  636. package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts.map +0 -1
  637. package/src/plugins/liveSearch/basic/basicLiveSearch.component.html +0 -5
  638. package/src/plugins/liveSearch/basic/basicLiveSearch.interface.d.ts +0 -29
  639. package/src/plugins/liveSearch/basic/basicLiveSearch.interface.d.ts.map +0 -1
  640. package/src/plugins/liveSearch/components.d.ts +0 -4
  641. package/src/plugins/liveSearch/components.d.ts.map +0 -1
  642. package/src/plugins/liveSearch/edit/editLiveSearch.component.css +0 -13
  643. package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts +0 -141
  644. package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts.map +0 -1
  645. package/src/plugins/liveSearch/edit/editLiveSearch.component.html +0 -13
  646. package/src/plugins/liveSearch/edit/editLiveSearch.interface.d.ts +0 -37
  647. package/src/plugins/liveSearch/edit/editLiveSearch.interface.d.ts.map +0 -1
  648. package/src/plugins/liveSearch/liveSearch.interface.d.ts +0 -38
  649. package/src/plugins/liveSearch/liveSearch.interface.d.ts.map +0 -1
  650. package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts +0 -54
  651. package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts.map +0 -1
  652. package/src/plugins/liveSearch/no/noLiveSearch.interface.d.ts +0 -12
  653. package/src/plugins/liveSearch/no/noLiveSearch.interface.d.ts.map +0 -1
  654. package/src/plugins/liveSearch/types.d.ts +0 -11
  655. package/src/plugins/liveSearch/types.d.ts.map +0 -1
  656. package/src/plugins/normalState/basic/basicNormalState.component.css +0 -38
  657. package/src/plugins/normalState/basic/basicNormalState.component.d.ts +0 -17
  658. package/src/plugins/normalState/basic/basicNormalState.component.d.ts.map +0 -1
  659. package/src/plugins/normalState/basic/basicNormalState.component.html +0 -6
  660. package/src/plugins/normalState/basic/basicNormalState.interface.d.ts +0 -29
  661. package/src/plugins/normalState/basic/basicNormalState.interface.d.ts.map +0 -1
  662. package/src/plugins/normalState/components.d.ts +0 -4
  663. package/src/plugins/normalState/components.d.ts.map +0 -1
  664. package/src/plugins/normalState/edit/editNormalState.component.css +0 -77
  665. package/src/plugins/normalState/edit/editNormalState.component.d.ts +0 -26
  666. package/src/plugins/normalState/edit/editNormalState.component.d.ts.map +0 -1
  667. package/src/plugins/normalState/edit/editNormalState.component.html +0 -19
  668. package/src/plugins/normalState/edit/editNormalState.interface.d.ts +0 -53
  669. package/src/plugins/normalState/edit/editNormalState.interface.d.ts.map +0 -1
  670. package/src/plugins/normalState/normalState.interface.d.ts +0 -49
  671. package/src/plugins/normalState/normalState.interface.d.ts.map +0 -1
  672. package/src/plugins/normalState/normalStateAbstract.component.d.ts +0 -65
  673. package/src/plugins/normalState/normalStateAbstract.component.d.ts.map +0 -1
  674. package/src/plugins/normalState/types.d.ts +0 -11
  675. package/src/plugins/normalState/types.d.ts.map +0 -1
  676. package/src/plugins/popup/basic/basicPopup.component.css +0 -61
  677. package/src/plugins/popup/basic/basicPopup.component.d.ts +0 -17
  678. package/src/plugins/popup/basic/basicPopup.component.d.ts.map +0 -1
  679. package/src/plugins/popup/basic/basicPopup.component.html +0 -21
  680. package/src/plugins/popup/basic/basicPopup.interface.d.ts +0 -33
  681. package/src/plugins/popup/basic/basicPopup.interface.d.ts.map +0 -1
  682. package/src/plugins/popup/component.d.ts +0 -4
  683. package/src/plugins/popup/component.d.ts.map +0 -1
  684. package/src/plugins/popup/edit/editPopup.component.css +0 -61
  685. package/src/plugins/popup/edit/editPopup.component.d.ts +0 -32
  686. package/src/plugins/popup/edit/editPopup.component.d.ts.map +0 -1
  687. package/src/plugins/popup/edit/editPopup.component.html +0 -19
  688. package/src/plugins/popup/edit/editPopup.interface.d.ts +0 -33
  689. package/src/plugins/popup/edit/editPopup.interface.d.ts.map +0 -1
  690. package/src/plugins/popup/popup.interface.d.ts +0 -52
  691. package/src/plugins/popup/popup.interface.d.ts.map +0 -1
  692. package/src/plugins/popup/popupAbstract.component.d.ts +0 -130
  693. package/src/plugins/popup/popupAbstract.component.d.ts.map +0 -1
  694. package/src/plugins/popup/types.d.ts +0 -11
  695. package/src/plugins/popup/types.d.ts.map +0 -1
  696. package/src/plugins/positioner/components.d.ts +0 -3
  697. package/src/plugins/positioner/components.d.ts.map +0 -1
  698. package/src/plugins/positioner/default/defaultPositioner.component.d.ts +0 -89
  699. package/src/plugins/positioner/default/defaultPositioner.component.d.ts.map +0 -1
  700. package/src/plugins/positioner/default/defaultPositioner.interface.d.ts +0 -12
  701. package/src/plugins/positioner/default/defaultPositioner.interface.d.ts.map +0 -1
  702. package/src/plugins/positioner/no/noPositioner.component.d.ts +0 -50
  703. package/src/plugins/positioner/no/noPositioner.component.d.ts.map +0 -1
  704. package/src/plugins/positioner/no/noPositioner.interface.d.ts +0 -12
  705. package/src/plugins/positioner/no/noPositioner.interface.d.ts.map +0 -1
  706. package/src/plugins/positioner/positioner.interface.d.ts +0 -22
  707. package/src/plugins/positioner/positioner.interface.d.ts.map +0 -1
  708. package/src/plugins/positioner/types.d.ts +0 -11
  709. package/src/plugins/positioner/types.d.ts.map +0 -1
  710. package/src/plugins/readonlyState/readonlyState.interface.d.ts +0 -12
  711. package/src/plugins/readonlyState/readonlyState.interface.d.ts.map +0 -1
  712. package/src/plugins/readonlyState/types.d.ts +0 -11
  713. package/src/plugins/readonlyState/types.d.ts.map +0 -1
  714. package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts +0 -51
  715. package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts.map +0 -1
  716. package/src/plugins/valueHandler/basic/basicValueHandler.interface.d.ts +0 -12
  717. package/src/plugins/valueHandler/basic/basicValueHandler.interface.d.ts.map +0 -1
  718. package/src/plugins/valueHandler/components.d.ts +0 -3
  719. package/src/plugins/valueHandler/components.d.ts.map +0 -1
  720. package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts +0 -52
  721. package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts.map +0 -1
  722. package/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.d.ts +0 -21
  723. package/src/plugins/valueHandler/dynamic/dynamicValueHandler.interface.d.ts.map +0 -1
  724. package/src/plugins/valueHandler/types.d.ts +0 -11
  725. package/src/plugins/valueHandler/types.d.ts.map +0 -1
  726. package/src/plugins/valueHandler/valueHandler.interface.d.ts +0 -31
  727. package/src/plugins/valueHandler/valueHandler.interface.d.ts.map +0 -1
  728. package/src/plugins/valueHandler/valueHandlerBase.d.ts +0 -115
  729. package/src/plugins/valueHandler/valueHandlerBase.d.ts.map +0 -1
  730. /package/es2022/src/{plugins → interfaces/plugins}/keyboardHandler/keyboardHandler.interface.js +0 -0
  731. /package/es2022/src/{plugins → interfaces/plugins}/liveSearch/liveSearch.interface.js +0 -0
  732. /package/es2022/src/{plugins → interfaces/plugins}/normalState/normalState.interface.js +0 -0
  733. /package/es2022/src/{plugins → interfaces/plugins}/popup/popup.interface.js +0 -0
  734. /package/es2022/src/{plugins → interfaces/plugins}/positioner/positioner.interface.js +0 -0
  735. /package/es2022/src/{plugins → interfaces/plugins}/readonlyState/readonlyState.interface.js +0 -0
  736. /package/es2022/src/{plugins → interfaces/plugins}/valueHandler/valueHandler.interface.js +0 -0
  737. /package/es2022/src/{misc → interfaces/templateGatherer}/templateGatherer.interface.js +0 -0
@@ -1,426 +1,346 @@
1
- import { Component, ChangeDetectionStrategy, Input, Inject, ChangeDetectorRef, Optional, Type, ContentChildren, QueryList, EventEmitter, forwardRef, resolveForwardRef, ElementRef, Attribute, TemplateRef, ContentChild, ComponentFactoryResolver, ApplicationRef, Injector } from '@angular/core';
2
- import { nameof, isBoolean, isPresent, isString, renderToBody } from '@jscrpt/common';
3
- import { extend } from '@jscrpt/common/extend';
4
- import { BehaviorSubject } from 'rxjs';
5
- import { NG_SELECT_OPTIONS, KEYBOARD_HANDLER_TYPE, NORMAL_STATE_TYPE, POPUP_TYPE, POSITIONER_TYPE, READONLY_STATE_TYPE, VALUE_HANDLER_TYPE, LIVE_SEARCH_TYPE } from '../../misc/types';
6
- import { NG_SELECT_PLUGIN_INSTANCES } from './types';
7
- import { BasicKeyboardHandlerComponent } from '../../plugins/keyboardHandler/components';
8
- import { KEYBOARD_HANDLER } from '../../plugins/keyboardHandler/types';
9
- import { NORMAL_STATE } from '../../plugins/normalState/types';
10
- import { BasicNormalStateComponent } from '../../plugins/normalState/components';
11
- import { POPUP } from '../../plugins/popup/types';
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, BasicValueHandlerComponent, NoInteractionsComponent, NoLiveSearchComponent, NoOptionsHandlerComponent, 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/pluginBus/pluginBus";
25
- import * as i2 from "@angular/common";
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 'NgSelectOptions'
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
- valueComparer: (source, target) => {
40
- return source === target;
41
- },
42
- liveSearchFilter: (query, normalizer = value => value) => {
43
- return itm => normalizer(itm.text).indexOf(normalizer(query)) >= 0;
44
- },
45
- normalizer: value => {
46
- if (isString(value)) {
47
- return value.toLowerCase();
48
- }
49
- return value;
50
- },
22
+ containerElement: null,
23
+ // valueComparer: (source, target) =>
24
+ // {
25
+ // return source === target;
26
+ // },
27
+ // liveSearchFilter: (query: string, normalizer: NormalizeFunc = value => value) =>
28
+ // {
29
+ // return itm => normalizer(itm.text).indexOf(normalizer(query)) >= 0;
30
+ // },
31
+ // normalizer: value =>
32
+ // {
33
+ // if(isString(value))
34
+ // {
35
+ // return value.toLowerCase();
36
+ // }
37
+ // return value;
38
+ // },
51
39
  cssClasses: {},
52
40
  plugins: {
53
- normalState: {
54
- type: forwardRef(() => BasicNormalStateComponent)
41
+ interactions: {
42
+ type: forwardRef(() => NoInteractionsComponent),
43
+ },
44
+ keyboardHandler: {
45
+ type: forwardRef(() => SimpleKeyboardHandlerComponent),
55
46
  },
56
47
  liveSearch: {
57
- type: forwardRef(() => NoLiveSearchComponent)
48
+ type: forwardRef(() => NoLiveSearchComponent),
49
+ },
50
+ normalState: {
51
+ type: forwardRef(() => SimpleNormalStateComponent),
52
+ },
53
+ optionsHandler: {
54
+ type: forwardRef(() => NoOptionsHandlerComponent),
58
55
  },
59
56
  popup: {
60
- type: forwardRef(() => BasicPopupComponent)
57
+ type: forwardRef(() => SimplePopupComponent),
61
58
  },
62
59
  positioner: {
63
- type: forwardRef(() => DefaultPositionerComponent)
64
- },
65
- keyboardHandler: {
66
- type: forwardRef(() => BasicKeyboardHandlerComponent)
60
+ type: forwardRef(() => BasicPositionerComponent),
67
61
  },
68
62
  readonlyState: {
69
- type: forwardRef(() => BasicNormalStateComponent)
63
+ type: forwardRef(() => SimpleNormalStateComponent),
70
64
  },
71
65
  valueHandler: {
72
- type: forwardRef(() => BasicValueHandlerComponent)
73
- }
74
- }
66
+ type: forwardRef(() => BasicValueHandlerComponent),
67
+ },
68
+ },
75
69
  };
76
70
  /**
77
- * Component that represents NgSelect itself, allows selection of value from options
71
+ * Component that represents Select itself, allows selection of value from options
78
72
  */
79
- export class NgSelectComponent {
80
- //######################### public properties - inputs #########################
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 #########################
73
+ export class Select {
74
+ //######################### public properties - implementation of SelectApi #########################
92
75
  /**
93
- * Occurs every time when NgSelect is initialized or reinitialized, if value is false NgSelect was not initialized yet
76
+ * @inheritdoc
94
77
  */
95
78
  get initialized() {
96
- return this._initializedSubject.asObservable();
97
- }
98
- //######################### public properties - implementation of OptionsGatherer #########################
99
- /**
100
- * Array of provided options for select
101
- */
102
- get options() {
103
- return this.optionsChildren.toArray();
79
+ return this.initializedSignal.asReadonly();
104
80
  }
105
81
  /**
106
- * Occurs when array of provided options has changed
82
+ * @inheritdoc
107
83
  */
108
- get optionsChange() {
109
- return this._optionsChange;
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;
84
+ get events() {
85
+ return this.bus;
122
86
  }
123
87
  //######################### constructors #########################
124
- constructor(_changeDetector, _element, _componentFactoryResolver, _appRef, _injector, _pluginBus, _pluginInstances, options, normalStateType, keyboardHandlerType, popupType, positionerType, readonlyStateType, valueHandlerType, liveSearchType, readonly, disabled, multiple) {
125
- this._changeDetector = _changeDetector;
126
- this._element = _element;
127
- this._componentFactoryResolver = _componentFactoryResolver;
128
- this._appRef = _appRef;
129
- this._injector = _injector;
130
- this._pluginBus = _pluginBus;
131
- this._pluginInstances = _pluginInstances;
88
+ constructor(pluginInstances, bus, element, document, multiple, normalStateType, keyboardHandlerType, popupType, positionerType, readonlyStateType, valueHandlerType, liveSearchType, interactionsType, optionsHandlerType, options) {
89
+ this.pluginInstances = pluginInstances;
90
+ this.bus = bus;
91
+ /**
92
+ * Object storing current used plugin type
93
+ */
94
+ this.pluginTypes = {
95
+ Interactions: null,
96
+ KeyboardHandler: null,
97
+ LiveSearch: null,
98
+ NormalState: null,
99
+ OptionsHandler: null,
100
+ Popup: null,
101
+ Positioner: null,
102
+ ReadonlyState: null,
103
+ ValueHandler: null,
104
+ };
105
+ /**
106
+ * Signal that holds init state of live search plugin
107
+ */
108
+ this.liveSearchInit = signal(false, ...(ngDevMode ? [{ debugName: "liveSearchInit" }] : []));
109
+ /**
110
+ * Signal that holds init state of interactions plugin
111
+ */
112
+ this.interactionsInit = signal(false, ...(ngDevMode ? [{ debugName: "interactionsInit" }] : []));
132
113
  /**
133
- * Subject used for indication that NgSelect was initialized
114
+ * Signal that holds init state of options handler plugin
134
115
  */
135
- this._initializedSubject = new BehaviorSubject(false);
116
+ this.optionsHandlerInit = signal(false, ...(ngDevMode ? [{ debugName: "optionsHandlerInit" }] : []));
136
117
  /**
137
- * Occurs when array of provided options has changed
118
+ * Signal that holds init state of positioner plugin
138
119
  */
139
- this._optionsChange = new EventEmitter();
120
+ this.positionerInit = signal(false, ...(ngDevMode ? [{ debugName: "positionerInit" }] : []));
140
121
  /**
141
- * Occurs when array of visible, displayed options has changed
122
+ * Signal that holds init state of keyboard plugin
142
123
  */
143
- this._availableOptionsChange = new EventEmitter();
124
+ this.keyboardInit = signal(false, ...(ngDevMode ? [{ debugName: "keyboardInit" }] : []));
144
125
  /**
145
- * Array of available options to be displayed
126
+ * Signal that holds init state of value handler plugin
146
127
  */
147
- this._availableOptions = [];
128
+ this.valueHandlerInit = signal(false, ...(ngDevMode ? [{ debugName: "valueHandlerInit" }] : []));
148
129
  /**
149
- * Gets current state of initialization
130
+ * Signal that holds init state of readonly state plugin
150
131
  */
151
- this.isInitialized = false;
152
- //at least on of following is present (value is not important)
153
- const readonlyDefault = isPresent(readonly) || isPresent(disabled);
132
+ this.readonlyStateInit = signal(false, ...(ngDevMode ? [{ debugName: "readonlyStateInit" }] : []));
133
+ /**
134
+ * Signal that holds init state of normal state plugin
135
+ */
136
+ this.normalStateInit = signal(false, ...(ngDevMode ? [{ debugName: "normalStateInit" }] : []));
137
+ /**
138
+ * Signal that holds init state of popup plugin
139
+ */
140
+ this.popupInit = signal(false, ...(ngDevMode ? [{ debugName: "popupInit" }] : []));
141
+ /**
142
+ * Initialization state of all plugin init options
143
+ */
144
+ this.optionsInit = computed(() => ({ initialized: this.normalStateInit() &&
145
+ this.keyboardInit() &&
146
+ this.popupInit() &&
147
+ this.positionerInit() &&
148
+ this.readonlyStateInit() &&
149
+ this.valueHandlerInit() &&
150
+ this.liveSearchInit() &&
151
+ this.interactionsInit() &&
152
+ this.optionsHandlerInit() }), ...(ngDevMode ? [{ debugName: "optionsInit" }] : []));
153
+ /**
154
+ * Information whether is select initialized or not, changes when Select is initialized or reinitialized, if value is false Select was not initialized yet
155
+ */
156
+ this.initializedSignal = signal(false, ...(ngDevMode ? [{ debugName: "initializedSignal" }] : []));
157
+ //######################### protected properties - children #########################
158
+ /**
159
+ * Container used for rendering live search plugin
160
+ */
161
+ this.liveSearchContainer = viewChild.required('liveSearch', { read: ViewContainerRef });
162
+ /**
163
+ * Container used for rendering interactions plugin
164
+ */
165
+ this.interactionsContainer = viewChild.required('interactions', { read: ViewContainerRef });
166
+ /**
167
+ * Container used for rendering options handler plugin
168
+ */
169
+ this.optionsHandlerContainer = viewChild.required('optionsHandler', { read: ViewContainerRef });
170
+ /**
171
+ * Container used for rendering positioner plugin
172
+ */
173
+ this.positionerContainer = viewChild.required('positioner', { read: ViewContainerRef });
174
+ /**
175
+ * Container used for rendering keyboard handler plugin
176
+ */
177
+ this.keyboardHandlerContainer = viewChild.required('keyboardHandler', { read: ViewContainerRef });
178
+ /**
179
+ * Container used for rendering value handler plugin
180
+ */
181
+ this.valueHandlerContainer = viewChild.required('valueHandler', { read: ViewContainerRef });
182
+ /**
183
+ * Container used for rendering readonly state plugin
184
+ */
185
+ this.readonlyStateContainer = viewChild.required('readonlyState', { read: ViewContainerRef });
186
+ /**
187
+ * Container used for rendering normal state plugin
188
+ */
189
+ this.normalStateContainer = viewChild.required('normalState', { read: ViewContainerRef });
190
+ /**
191
+ * Container used for rendering popup plugin
192
+ */
193
+ this.popupContainer = viewChild.required('popup', { read: ViewContainerRef });
194
+ /**
195
+ * Indication whether should be Select disabled or not
196
+ */
197
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
198
+ /**
199
+ * Indication whether should be Select readonly or not
200
+ */
201
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
202
+ //######################### public properties - implementation of TemplateGatherer #########################
203
+ /**
204
+ * @inheritdoc
205
+ */
206
+ this.normalStateTemplate = contentChild(NormalStateTemplate, { ...(ngDevMode ? { debugName: "normalStateTemplate" } : {}), read: TemplateRef });
207
+ /**
208
+ * @inheritdoc
209
+ */
210
+ this.optionTemplate = contentChild(OptionTemplate, { ...(ngDevMode ? { debugName: "optionTemplate" } : {}), read: TemplateRef });
211
+ //######################### public properties - implementation of OptionsGatherer #########################
212
+ /**
213
+ * Array of all available options for select
214
+ */
215
+ this.availableOptions = contentChildren(Option, ...(ngDevMode ? [{ debugName: "availableOptions" }] : []));
216
+ //is present (value is not important)
154
217
  const multipleDefault = isPresent(multiple);
155
- const opts = extend(true, {}, options);
156
- if (!opts.plugins) {
157
- opts.plugins = {};
158
- }
218
+ const opts = deepCopyWithArrayOverride({}, options);
219
+ opts.plugins ??= {};
159
220
  if (keyboardHandlerType) {
160
- if (!opts.plugins.keyboardHandler) {
161
- opts.plugins.keyboardHandler = {};
162
- }
221
+ opts.plugins.keyboardHandler ??= {};
163
222
  opts.plugins.keyboardHandler.type = keyboardHandlerType;
164
223
  }
165
224
  if (normalStateType) {
166
- if (!opts.plugins.normalState) {
167
- opts.plugins.normalState = {};
168
- }
225
+ opts.plugins.normalState ??= {};
169
226
  opts.plugins.normalState.type = normalStateType;
170
227
  }
171
228
  if (popupType) {
172
- if (!opts.plugins.popup) {
173
- opts.plugins.popup = {};
174
- }
229
+ opts.plugins.popup ??= {};
175
230
  opts.plugins.popup.type = popupType;
176
231
  }
177
232
  if (positionerType) {
178
- if (!opts.plugins.positioner) {
179
- opts.plugins.positioner = {};
180
- }
233
+ opts.plugins.positioner ??= {};
181
234
  opts.plugins.positioner.type = positionerType;
182
235
  }
183
236
  if (readonlyStateType) {
184
- if (!opts.plugins.readonlyState) {
185
- opts.plugins.readonlyState = {};
186
- }
237
+ opts.plugins.readonlyState ??= {};
187
238
  opts.plugins.readonlyState.type = readonlyStateType;
188
239
  }
189
240
  if (valueHandlerType) {
190
- if (!opts.plugins.valueHandler) {
191
- opts.plugins.valueHandler = {};
192
- }
241
+ opts.plugins.valueHandler ??= {};
193
242
  opts.plugins.valueHandler.type = valueHandlerType;
194
243
  }
195
244
  if (liveSearchType) {
196
- if (!opts.plugins.liveSearch) {
197
- opts.plugins.liveSearch = {};
198
- }
245
+ opts.plugins.liveSearch ??= {};
199
246
  opts.plugins.liveSearch.type = liveSearchType;
200
247
  }
201
- this._selectOptions = extend(true, {
248
+ if (interactionsType) {
249
+ opts.plugins.interactions ??= {};
250
+ opts.plugins.interactions.type = interactionsType;
251
+ }
252
+ if (optionsHandlerType) {
253
+ opts.plugins.optionsHandler ??= {};
254
+ opts.plugins.optionsHandler.type = optionsHandlerType;
255
+ }
256
+ this.selectOptions = deepCopyWithArrayOverride({
202
257
  optionsGatherer: this,
203
258
  templateGatherer: this,
204
259
  }, defaultOptions, {
205
- readonly: readonlyDefault,
206
- multiple: multipleDefault
260
+ multiple: multipleDefault,
207
261
  }, opts);
208
- this._pluginBus.selectElement = this._element;
209
- this._pluginBus.selectOptions = this._selectOptions;
210
- }
211
- //######################### public methods - implementation of OnChanges #########################
212
- /**
213
- * Called when input value changes
214
- */
215
- ngOnChanges(changes) {
216
- const updateReadonly = (state, firstChange) => {
217
- //update options
218
- this.selectOptions.readonly = state;
219
- if (!firstChange) {
220
- this.initOptions();
221
- this.initialize();
262
+ bus.selectElement.set(element);
263
+ bus.selectOptions = computed(() => this.selectOptions, ...(ngDevMode ? [{ debugName: "selectOptions" }] : []));
264
+ //dynamic update of readonly state in options
265
+ effect(() => {
266
+ this.selectOptions =
267
+ {
268
+ readonly: this.readonly() || this.disabled(),
269
+ };
270
+ });
271
+ //create and initialize options for static plugins
272
+ effect(async () => {
273
+ const selectOptions = this.selectOptions;
274
+ const liveSearchContainer = this.liveSearchContainer();
275
+ const interactionsContainer = this.interactionsContainer();
276
+ const optionsHandlerContainer = this.optionsHandlerContainer();
277
+ const positionerContainer = this.positionerContainer();
278
+ const keyboardHandlerContainer = this.keyboardHandlerContainer();
279
+ const valueHandlerContainer = this.valueHandlerContainer();
280
+ await this.createPlugin(selectOptions.plugins?.liveSearch, SelectPluginType.LiveSearch, liveSearchContainer, this.liveSearchInit);
281
+ await this.createPlugin(selectOptions.plugins?.interactions, SelectPluginType.Interactions, interactionsContainer, this.interactionsInit);
282
+ await this.createPlugin(selectOptions.plugins?.optionsHandler, SelectPluginType.OptionsHandler, optionsHandlerContainer, this.optionsHandlerInit);
283
+ await this.createPlugin(selectOptions.plugins?.positioner, SelectPluginType.Positioner, positionerContainer, this.positionerInit);
284
+ await this.createPlugin(selectOptions.plugins?.keyboardHandler, SelectPluginType.KeyboardHandler, keyboardHandlerContainer, this.keyboardInit);
285
+ await this.createPlugin(selectOptions.plugins?.valueHandler, SelectPluginType.ValueHandler, valueHandlerContainer, this.valueHandlerInit);
286
+ });
287
+ //create and initialize options for state plugins (normal and readonly)
288
+ effect(() => {
289
+ const readonlyStateContainer = this.readonlyStateContainer();
290
+ const normalStateContainer = this.normalStateContainer();
291
+ const selectOptions = this.selectOptions;
292
+ if (selectOptions.readonly) {
293
+ this.destroyPlugin(SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);
294
+ this.normalStateInit.set(true);
295
+ this.createPlugin(this.selectOptions.plugins?.readonlyState, SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);
296
+ }
297
+ else {
298
+ this.destroyPlugin(SelectPluginType.ReadonlyState, readonlyStateContainer, this.readonlyStateInit);
299
+ this.readonlyStateInit.set(true);
300
+ this.createPlugin(this.selectOptions.plugins?.normalState, SelectPluginType.NormalState, normalStateContainer, this.normalStateInit);
222
301
  }
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
302
  });
249
- if (this._selectOptions.autoInitialize) {
250
- this.initialize();
251
- }
252
- }
253
- //######################### public methods - implementation of OnDestroy #########################
254
- /**
255
- * Called when component is destroyed
256
- */
257
- ngOnDestroy() {
258
- this._searchValueChangeSubscription?.unsubscribe();
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();
303
+ //create and initialize options for popup plugin, allows absolute positioning
304
+ effect(() => {
305
+ const selectOptions = this.selectOptions;
306
+ const popupContainer = this.popupContainer();
307
+ this.destroyPlugin(SelectPluginType.Popup, popupContainer, this.popupInit);
308
+ this.createPlugin(this.selectOptions.plugins?.popup, SelectPluginType.Popup, this.popupContainer(), this.popupInit);
309
+ if (selectOptions.absolute && this.popupComponentRef) {
310
+ const element = getHostElement(this.popupComponentRef);
311
+ if (!element) {
312
+ throw new Error('Could not get element of popup component');
387
313
  }
314
+ renderToBody(document, element, selectOptions.containerElement);
388
315
  }
389
- };
390
- if (this._selectOptions.plugins) {
391
- initOptionsPlugin(NORMAL_STATE, 'normalState');
392
- initOptionsPlugin(KEYBOARD_HANDLER, 'keyboardHandler');
393
- initOptionsPlugin(POPUP, 'popup');
394
- initOptionsPlugin(POSITIONER, 'positioner');
395
- initOptionsPlugin(READONLY_STATE, 'readonlyState');
396
- initOptionsPlugin(VALUE_HANDLER, 'valueHandler');
397
- initOptionsPlugin(LIVE_SEARCH, 'liveSearch');
398
- }
399
- }
400
- /**
401
- * Explicitly runs invalidation of content (change detection)
402
- */
403
- invalidateVisuals() {
404
- this._changeDetector.detectChanges();
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];
316
+ });
317
+ //initialize plugins when all options are initialized
318
+ effect(() => {
319
+ if (this.optionsInit()) {
320
+ untracked(() => {
321
+ this.pluginInstances.OptionsHandler.initialize();
322
+ this.pluginInstances.LiveSearch.initialize();
323
+ this.pluginInstances.KeyboardHandler.initialize();
324
+ this.pluginInstances.ValueHandler.initialize();
325
+ this.pluginInstances.normalState()?.initialize();
326
+ this.pluginInstances.readonlyState()?.initialize();
327
+ this.pluginInstances.Popup.initialize();
328
+ this.pluginInstances.Positioner.initialize();
329
+ this.pluginInstances.Interactions.initialize();
330
+ });
331
+ this.initializedSignal.set(true);
332
+ }
333
+ });
412
334
  }
335
+ //######################### public methods #########################
413
336
  /**
414
- * Subscribes for event
415
- * @param eventName - Name of event that should be listened to
416
- * @param handler - Function used for handling event
337
+ * @inheritdoc
417
338
  */
418
- listenTo(eventName, handler) {
419
- return this._pluginBus[eventName].subscribe(handler);
339
+ getPlugin(pluginType) {
340
+ return this.pluginInstances[pluginType];
420
341
  }
421
342
  /**
422
- * Executes actions on NgSelect
423
- * @param actions - Array of actions that are executed over NgSelect
343
+ * @inheritdoc
424
344
  */
425
345
  execute(...actions) {
426
346
  if (!actions) {
@@ -429,109 +349,104 @@ export class NgSelectComponent {
429
349
  actions.forEach(action => action(this));
430
350
  }
431
351
  /**
432
- * Executes function on NgSelect and returns result
433
- * @param func - Function that is executed and its result is returned
352
+ * @inheritdoc
434
353
  */
435
354
  executeAndReturn(func) {
436
355
  if (!func) {
437
- return null;
356
+ throw new Error('Function is required');
438
357
  }
439
358
  return func(this);
440
359
  }
441
- //######################### protected methods #########################
360
+ // //######################### protected methods #########################
442
361
  /**
443
- * Appends popup component directly to body, allows absolute positioning over page body
444
- * @param component - Popup component type to be appended
362
+ * Creates plugin
363
+ * @param pluginDescription - Information about plugin that should be created
364
+ * @param pluginType - Key of plugin used for pluginInstances
365
+ * @param pluginViewContainer - Container where should be plugin created
366
+ * @param initOptions - Signal that hold information about init options state for this plugin
445
367
  */
446
- _appendPopupToBody(component) {
447
- //do not reinitialize if already exists and nothing has changed
448
- if (this._absolutePopupType == component && this.liveSearchElement[0][0] == this._absolutePopupElement) {
368
+ async createPlugin(pluginDescription, pluginType, pluginViewContainer, initOptions) {
369
+ if (!pluginDescription?.type) {
370
+ this.destroyPlugin(pluginType, pluginViewContainer, initOptions);
449
371
  return;
450
372
  }
451
- // 0. Destroyes absolute popup if it exists
452
- this._destroyAbsolutePopup();
453
- if (!component) {
454
- return;
373
+ const type = resolveForwardRef(pluginDescription.type);
374
+ let newInstance = false;
375
+ //new type provided
376
+ if (type != this.pluginTypes[pluginType]) {
377
+ initOptions.set(false);
378
+ this.pluginTypes[pluginType] = type;
379
+ pluginViewContainer.clear();
380
+ const component = pluginViewContainer.createComponent(type);
381
+ component.changeDetectorRef.detectChanges();
382
+ this.pluginInstances[pluginType] = component.instance;
383
+ newInstance = true;
384
+ if (pluginType == SelectPluginType.Popup) {
385
+ this.popupComponentRef = component;
386
+ }
387
+ }
388
+ //only call when new instance of plugin was created
389
+ if (newInstance) {
390
+ pluginDescription.instanceCallback?.(this.pluginInstances[pluginType]);
391
+ }
392
+ //options are available, set them
393
+ if (pluginDescription.options) {
394
+ initOptions.set(false);
395
+ this.pluginInstances[pluginType].options = pluginDescription.options;
455
396
  }
456
- this._absolutePopupType = component;
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);
397
+ await this.initOption(pluginType, initOptions);
470
398
  }
471
399
  /**
472
- * Destroyes absolute popup if it exists
400
+ * Init options for single plugin
401
+ * @param pluginType - Type of plugin to be initialized
402
+ * @param initOptions - Init options signal for this plugin
473
403
  */
474
- _destroyAbsolutePopup() {
475
- if (this._absolutePopup) {
476
- this._appRef.detachView(this._absolutePopup.hostView);
477
- this._absolutePopup.destroy();
478
- this._absolutePopup = null;
479
- this._absolutePopupType = null;
480
- this._absolutePopupElement = null;
481
- }
404
+ async initOption(pluginType, initOptions) {
405
+ await this.pluginInstances[pluginType].initOptions();
406
+ initOptions.set(true);
482
407
  }
483
408
  /**
484
- * Registers newly created plugin
485
- * @param plugin - Plugin to be registered
486
- * @param pluginKey - Key of plugin used for pluginInstances
487
- * @param pluginName - Name property for plugin from options
409
+ * Destroys plugin
410
+ * @param pluginType - Plugin type to be destroyed
411
+ * @param plugiViewContainer - Container which will be emptied
412
+ * @param initOptions - Signal that hold information about init options state for this plugin
488
413
  */
489
- _registerNewPlugin(plugin, pluginKey, pluginName) {
490
- if (!plugin) {
491
- this._pluginInstances[pluginKey] = null;
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);
414
+ destroyPlugin(pluginType, pluginViewContainer, initOptions) {
415
+ if (pluginType == SelectPluginType.Popup) {
416
+ this.popupComponentRef = null;
501
417
  }
418
+ pluginViewContainer.clear();
419
+ initOptions.set(false);
420
+ this.pluginTypes[pluginType] = null;
502
421
  }
503
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: NgSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.PluginBus }, { token: NG_SELECT_PLUGIN_INSTANCES }, { token: NG_SELECT_OPTIONS, optional: 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: 'readonly', attribute: true }, { token: 'disabled', attribute: true }, { token: 'multiple', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
504
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: NgSelectComponent, isStandalone: false, selector: "ng-select", inputs: { selectOptions: "selectOptions", disabled: "disabled", readonly: "readonly" }, providers: [
422
+ 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 }); }
423
+ 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
424
  {
506
- provide: NG_SELECT_PLUGIN_INSTANCES,
507
- useFactory: () => { return {}; }
425
+ provide: SelectPluginInstances,
426
+ useFactory: () => new SelectPluginInstances(),
508
427
  },
509
- {
510
- provide: PluginBus,
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 }); }
428
+ SelectBus,
429
+ ], 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
430
  }
515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: NgSelectComponent, decorators: [{
431
+ __decorate([
432
+ CopyOptionsAsSignal(),
433
+ __metadata("design:type", Object)
434
+ ], Select.prototype, "selectOptions", void 0);
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: Select, decorators: [{
516
436
  type: Component,
517
- args: [{ selector: 'ng-select', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
437
+ args: [{ selector: 'ng-select', providers: [
518
438
  {
519
- provide: NG_SELECT_PLUGIN_INSTANCES,
520
- useFactory: () => { return {}; }
439
+ provide: SelectPluginInstances,
440
+ useFactory: () => new SelectPluginInstances(),
521
441
  },
522
- {
523
- provide: PluginBus,
524
- useClass: PluginBus
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: [{
442
+ SelectBus,
443
+ ], 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"] }]
444
+ }], ctorParameters: () => [{ type: i1.SelectPluginInstances }, { type: i1.SelectBus }, { type: i0.ElementRef }, { type: HTMLDocument, decorators: [{
528
445
  type: Inject,
529
- args: [NG_SELECT_PLUGIN_INSTANCES]
446
+ args: [DOCUMENT]
530
447
  }] }, { type: undefined, decorators: [{
531
- type: Inject,
532
- args: [NG_SELECT_OPTIONS]
533
- }, {
534
- type: Optional
448
+ type: Attribute,
449
+ args: ['multiple']
535
450
  }] }, { type: i0.Type, decorators: [{
536
451
  type: Inject,
537
452
  args: [NORMAL_STATE_TYPE]
@@ -567,32 +482,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
567
482
  args: [LIVE_SEARCH_TYPE]
568
483
  }, {
569
484
  type: Optional
485
+ }] }, { type: i0.Type, decorators: [{
486
+ type: Inject,
487
+ args: [INTERACTIONS_TYPE]
488
+ }, {
489
+ type: Optional
490
+ }] }, { type: i0.Type, decorators: [{
491
+ type: Inject,
492
+ args: [OPTIONS_HANDLER_TYPE]
493
+ }, {
494
+ type: Optional
570
495
  }] }, { type: undefined, decorators: [{
571
- type: Attribute,
572
- args: ['readonly']
573
- }] }, { type: undefined, decorators: [{
574
- type: Attribute,
575
- args: ['disabled']
576
- }] }, { type: undefined, decorators: [{
577
- type: Attribute,
578
- args: ['multiple']
579
- }] }], propDecorators: { selectOptions: [{
580
- type: Input
581
- }], disabled: [{
582
- type: Input
583
- }], readonly: [{
496
+ type: Inject,
497
+ args: [SELECT_OPTIONS]
498
+ }, {
499
+ type: Optional
500
+ }] }], 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
501
  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
- }] } });
502
+ }], 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
503
  //# sourceMappingURL=select.component.js.map