@anglr/select 11.0.2 → 12.0.0-beta.20230109082659

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 (219) hide show
  1. package/changelog.md +43 -0
  2. package/elements/src/components/ngSelectElements.component.d.ts +1 -1
  3. package/es2015/elements/src/components/ngSelectElements.component.js +7 -13
  4. package/es2015/elements/src/components/ngSelectElements.component.js.map +1 -1
  5. package/es2015/elements/src/modules/ngSelectElements.module.js +7 -9
  6. package/es2015/elements/src/modules/ngSelectElements.module.js.map +1 -1
  7. package/es2015/material/src/components/basicDialogPopup/basicDialogPopup.component.js +3 -3
  8. package/es2015/material/src/directives/dialogPopup/dialogPopup.directive.js +3 -3
  9. package/es2015/material/src/modules/dialogPopup.module.js +5 -7
  10. package/es2015/material/src/modules/dialogPopup.module.js.map +1 -1
  11. package/es2015/material/src/modules/virtualEditPopup.module.js +5 -7
  12. package/es2015/material/src/modules/virtualEditPopup.module.js.map +1 -1
  13. package/es2015/material/src/plugins/popup/dialog/dialogPopup.component.js +3 -3
  14. package/es2015/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +5 -5
  15. package/es2015/src/components/option/optgroup.component.js +3 -3
  16. package/es2015/src/components/option/option.component.js +3 -3
  17. package/es2015/src/components/select/select.component.js +9 -15
  18. package/es2015/src/components/select/select.component.js.map +1 -1
  19. package/es2015/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +3 -3
  20. package/es2015/src/directives/ngSelectEdit/ngSelectEdit.directive.js +3 -3
  21. package/es2015/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +3 -3
  22. package/es2015/src/misc/ngSelectControlValueAccessor.directive.js +3 -3
  23. package/es2015/src/misc/pluginBus/pluginBus.js +3 -3
  24. package/es2015/src/modules/ngSelect.module.js +8 -10
  25. package/es2015/src/modules/ngSelect.module.js.map +1 -1
  26. package/es2015/src/modules/ngSelectDynamic.module.js +4 -4
  27. package/es2015/src/modules/ngSelectEdit.module.js +5 -7
  28. package/es2015/src/modules/ngSelectEdit.module.js.map +1 -1
  29. package/es2015/src/pipes/ngSelectHasValue.pipe.js +3 -3
  30. package/es2015/src/pipes/ngSelectValue.pipe.js +3 -3
  31. package/es2015/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +3 -3
  32. package/es2015/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +3 -3
  33. package/es2015/src/plugins/liveSearch/basic/basicLiveSearch.component.js +3 -3
  34. package/es2015/src/plugins/liveSearch/edit/editLiveSearch.component.js +3 -3
  35. package/es2015/src/plugins/liveSearch/no/noLiveSearch.component.js +3 -3
  36. package/es2015/src/plugins/liveSearch/no/noLiveSearch.component.js.map +1 -1
  37. package/es2015/src/plugins/normalState/basic/basicNormalState.component.js +3 -3
  38. package/es2015/src/plugins/normalState/edit/editNormalState.component.js +3 -3
  39. package/es2015/src/plugins/normalState/normalStateAbstract.component.js +3 -3
  40. package/es2015/src/plugins/popup/basic/basicPopup.component.js +3 -3
  41. package/es2015/src/plugins/popup/basic/basicPopup.component.js.map +1 -1
  42. package/es2015/src/plugins/popup/edit/editPopup.component.js +3 -3
  43. package/es2015/src/plugins/popup/edit/editPopup.component.js.map +1 -1
  44. package/es2015/src/plugins/popup/popupAbstract.component.js +3 -3
  45. package/es2015/src/plugins/popup/popupAbstract.component.js.map +1 -1
  46. package/es2015/src/plugins/positioner/components.js +1 -1
  47. package/es2015/src/plugins/positioner/components.js.map +1 -1
  48. package/es2015/src/plugins/positioner/default/defaultPositioner.component.js +175 -0
  49. package/es2015/src/plugins/positioner/default/defaultPositioner.component.js.map +1 -0
  50. package/es2015/src/plugins/positioner/default/defaultPositioner.interface.js +2 -0
  51. package/es2015/src/plugins/positioner/default/defaultPositioner.interface.js.map +1 -0
  52. package/es2015/src/plugins/positioner/index.js +1 -1
  53. package/es2015/src/plugins/positioner/index.js.map +1 -1
  54. package/es2015/src/plugins/positioner/no/noPositioner.component.js +12 -7
  55. package/es2015/src/plugins/positioner/no/noPositioner.component.js.map +1 -1
  56. package/es2015/src/plugins/positioner/positioner.interface.js.map +1 -1
  57. package/es2015/src/plugins/positioner/types.js +0 -1
  58. package/es2015/src/plugins/positioner/types.js.map +1 -1
  59. package/es2015/src/plugins/valueHandler/basic/basicValueHandler.component.js +3 -3
  60. package/es2015/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +3 -3
  61. package/es2015/src/plugins/valueHandler/valueHandlerBase.js +3 -3
  62. package/es2020/elements/src/components/ngSelectElements.component.js +7 -13
  63. package/es2020/elements/src/components/ngSelectElements.component.js.map +1 -1
  64. package/es2020/elements/src/modules/ngSelectElements.module.js +7 -9
  65. package/es2020/elements/src/modules/ngSelectElements.module.js.map +1 -1
  66. package/es2020/material/src/components/basicDialogPopup/basicDialogPopup.component.js +3 -3
  67. package/es2020/material/src/directives/dialogPopup/dialogPopup.directive.js +3 -3
  68. package/es2020/material/src/modules/dialogPopup.module.js +5 -7
  69. package/es2020/material/src/modules/dialogPopup.module.js.map +1 -1
  70. package/es2020/material/src/modules/virtualEditPopup.module.js +5 -7
  71. package/es2020/material/src/modules/virtualEditPopup.module.js.map +1 -1
  72. package/es2020/material/src/plugins/popup/dialog/dialogPopup.component.js +3 -3
  73. package/es2020/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +5 -5
  74. package/es2020/src/components/option/optgroup.component.js +3 -3
  75. package/es2020/src/components/option/option.component.js +3 -3
  76. package/es2020/src/components/select/select.component.js +9 -15
  77. package/es2020/src/components/select/select.component.js.map +1 -1
  78. package/es2020/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +3 -3
  79. package/es2020/src/directives/ngSelectEdit/ngSelectEdit.directive.js +3 -3
  80. package/es2020/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +3 -3
  81. package/es2020/src/misc/ngSelectControlValueAccessor.directive.js +3 -3
  82. package/es2020/src/misc/pluginBus/pluginBus.js +3 -3
  83. package/es2020/src/modules/ngSelect.module.js +8 -10
  84. package/es2020/src/modules/ngSelect.module.js.map +1 -1
  85. package/es2020/src/modules/ngSelectDynamic.module.js +4 -4
  86. package/es2020/src/modules/ngSelectEdit.module.js +5 -7
  87. package/es2020/src/modules/ngSelectEdit.module.js.map +1 -1
  88. package/es2020/src/pipes/ngSelectHasValue.pipe.js +3 -3
  89. package/es2020/src/pipes/ngSelectValue.pipe.js +3 -3
  90. package/es2020/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +3 -3
  91. package/es2020/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +3 -3
  92. package/es2020/src/plugins/liveSearch/basic/basicLiveSearch.component.js +3 -3
  93. package/es2020/src/plugins/liveSearch/edit/editLiveSearch.component.js +3 -3
  94. package/es2020/src/plugins/liveSearch/no/noLiveSearch.component.js +3 -3
  95. package/es2020/src/plugins/liveSearch/no/noLiveSearch.component.js.map +1 -1
  96. package/es2020/src/plugins/normalState/basic/basicNormalState.component.js +3 -3
  97. package/es2020/src/plugins/normalState/edit/editNormalState.component.js +3 -3
  98. package/es2020/src/plugins/normalState/normalStateAbstract.component.js +3 -3
  99. package/es2020/src/plugins/popup/basic/basicPopup.component.js +3 -3
  100. package/es2020/src/plugins/popup/basic/basicPopup.component.js.map +1 -1
  101. package/es2020/src/plugins/popup/edit/editPopup.component.js +3 -3
  102. package/es2020/src/plugins/popup/edit/editPopup.component.js.map +1 -1
  103. package/es2020/src/plugins/popup/popupAbstract.component.js +3 -3
  104. package/es2020/src/plugins/popup/popupAbstract.component.js.map +1 -1
  105. package/es2020/src/plugins/positioner/components.js +1 -1
  106. package/es2020/src/plugins/positioner/components.js.map +1 -1
  107. package/es2020/src/plugins/positioner/default/defaultPositioner.component.js +172 -0
  108. package/es2020/src/plugins/positioner/default/defaultPositioner.component.js.map +1 -0
  109. package/es2020/src/plugins/positioner/default/defaultPositioner.interface.js +2 -0
  110. package/es2020/src/plugins/positioner/default/defaultPositioner.interface.js.map +1 -0
  111. package/es2020/src/plugins/positioner/index.js +1 -1
  112. package/es2020/src/plugins/positioner/index.js.map +1 -1
  113. package/es2020/src/plugins/positioner/no/noPositioner.component.js +12 -7
  114. package/es2020/src/plugins/positioner/no/noPositioner.component.js.map +1 -1
  115. package/es2020/src/plugins/positioner/positioner.interface.js.map +1 -1
  116. package/es2020/src/plugins/positioner/types.js +0 -1
  117. package/es2020/src/plugins/positioner/types.js.map +1 -1
  118. package/es2020/src/plugins/valueHandler/basic/basicValueHandler.component.js +3 -3
  119. package/es2020/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +3 -3
  120. package/es2020/src/plugins/valueHandler/valueHandlerBase.js +3 -3
  121. package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts +1 -1
  122. package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts +1 -1
  123. package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts +1 -1
  124. package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts +1 -1
  125. package/package.json +37 -52
  126. package/src/components/option/optgroup.component.d.ts +1 -1
  127. package/src/components/option/option.component.d.ts +1 -1
  128. package/src/components/select/select.component.d.ts +1 -1
  129. package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts +1 -1
  130. package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts +1 -1
  131. package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts +1 -1
  132. package/src/misc/ngSelectControlValueAccessor.directive.d.ts +1 -1
  133. package/src/modules/ngSelect.module.d.ts +2 -2
  134. package/src/pipes/ngSelectHasValue.pipe.d.ts +1 -1
  135. package/src/pipes/ngSelectValue.pipe.d.ts +1 -1
  136. package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts +1 -1
  137. package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts +1 -1
  138. package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts +1 -1
  139. package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts +1 -1
  140. package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts +1 -1
  141. package/src/plugins/normalState/basic/basicNormalState.component.d.ts +1 -1
  142. package/src/plugins/normalState/edit/editNormalState.component.d.ts +1 -1
  143. package/src/plugins/normalState/normalStateAbstract.component.d.ts +1 -1
  144. package/src/plugins/popup/basic/basicPopup.component.d.ts +1 -1
  145. package/src/plugins/popup/edit/editPopup.component.d.ts +1 -1
  146. package/src/plugins/popup/popupAbstract.component.d.ts +1 -1
  147. package/src/plugins/positioner/components.d.ts +1 -1
  148. package/src/plugins/positioner/components.d.ts.map +1 -1
  149. package/src/plugins/positioner/default/defaultPositioner.component.d.ts +94 -0
  150. package/src/plugins/positioner/default/defaultPositioner.component.d.ts.map +1 -0
  151. package/src/plugins/positioner/default/defaultPositioner.interface.d.ts +12 -0
  152. package/src/plugins/positioner/default/defaultPositioner.interface.d.ts.map +1 -0
  153. package/src/plugins/positioner/index.d.ts +1 -1
  154. package/src/plugins/positioner/index.d.ts.map +1 -1
  155. package/src/plugins/positioner/no/noPositioner.component.d.ts +11 -3
  156. package/src/plugins/positioner/no/noPositioner.component.d.ts.map +1 -1
  157. package/src/plugins/positioner/positioner.interface.d.ts +8 -7
  158. package/src/plugins/positioner/positioner.interface.d.ts.map +1 -1
  159. package/src/plugins/positioner/types.d.ts +0 -1
  160. package/src/plugins/positioner/types.d.ts.map +1 -1
  161. package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts +1 -1
  162. package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts +1 -1
  163. package/src/plugins/valueHandler/valueHandlerBase.d.ts +1 -1
  164. package/version.bak +1 -1
  165. package/es2015/popperJs/src/index.js +0 -4
  166. package/es2015/popperJs/src/index.js.map +0 -1
  167. package/es2015/popperJs/src/modules/popperjsPositioner.module.js +0 -23
  168. package/es2015/popperJs/src/modules/popperjsPositioner.module.js.map +0 -1
  169. package/es2015/popperJs/src/plugins/positioner/components.js +0 -2
  170. package/es2015/popperJs/src/plugins/positioner/components.js.map +0 -1
  171. package/es2015/popperJs/src/plugins/positioner/index.js +0 -2
  172. package/es2015/popperJs/src/plugins/positioner/index.js.map +0 -1
  173. package/es2015/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js +0 -151
  174. package/es2015/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js.map +0 -1
  175. package/es2015/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js +0 -2
  176. package/es2015/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js.map +0 -1
  177. package/es2015/src/plugins/positioner/basic/basicPositioner.component.js +0 -193
  178. package/es2015/src/plugins/positioner/basic/basicPositioner.component.js.map +0 -1
  179. package/es2015/src/plugins/positioner/basic/basicPositioner.interface.js +0 -2
  180. package/es2015/src/plugins/positioner/basic/basicPositioner.interface.js.map +0 -1
  181. package/es2015/src/plugins/positioner/basic/types.js +0 -36
  182. package/es2015/src/plugins/positioner/basic/types.js.map +0 -1
  183. package/es2020/popperJs/src/index.js +0 -4
  184. package/es2020/popperJs/src/index.js.map +0 -1
  185. package/es2020/popperJs/src/modules/popperjsPositioner.module.js +0 -23
  186. package/es2020/popperJs/src/modules/popperjsPositioner.module.js.map +0 -1
  187. package/es2020/popperJs/src/plugins/positioner/components.js +0 -2
  188. package/es2020/popperJs/src/plugins/positioner/components.js.map +0 -1
  189. package/es2020/popperJs/src/plugins/positioner/index.js +0 -2
  190. package/es2020/popperJs/src/plugins/positioner/index.js.map +0 -1
  191. package/es2020/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js +0 -148
  192. package/es2020/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js.map +0 -1
  193. package/es2020/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js +0 -2
  194. package/es2020/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js.map +0 -1
  195. package/es2020/src/plugins/positioner/basic/basicPositioner.component.js +0 -190
  196. package/es2020/src/plugins/positioner/basic/basicPositioner.component.js.map +0 -1
  197. package/es2020/src/plugins/positioner/basic/basicPositioner.interface.js +0 -2
  198. package/es2020/src/plugins/positioner/basic/basicPositioner.interface.js.map +0 -1
  199. package/es2020/src/plugins/positioner/basic/types.js +0 -36
  200. package/es2020/src/plugins/positioner/basic/types.js.map +0 -1
  201. package/popperJs/package.json +0 -9
  202. package/popperJs/src/index.d.ts +0 -4
  203. package/popperJs/src/index.d.ts.map +0 -1
  204. package/popperJs/src/modules/popperjsPositioner.module.d.ts +0 -11
  205. package/popperJs/src/modules/popperjsPositioner.module.d.ts.map +0 -1
  206. package/popperJs/src/plugins/positioner/components.d.ts +0 -2
  207. package/popperJs/src/plugins/positioner/components.d.ts.map +0 -1
  208. package/popperJs/src/plugins/positioner/index.d.ts +0 -2
  209. package/popperJs/src/plugins/positioner/index.d.ts.map +0 -1
  210. package/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.d.ts +0 -78
  211. package/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.d.ts.map +0 -1
  212. package/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.d.ts +0 -12
  213. package/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.d.ts.map +0 -1
  214. package/src/plugins/positioner/basic/basicPositioner.component.d.ts +0 -90
  215. package/src/plugins/positioner/basic/basicPositioner.component.d.ts.map +0 -1
  216. package/src/plugins/positioner/basic/basicPositioner.interface.d.ts +0 -29
  217. package/src/plugins/positioner/basic/basicPositioner.interface.d.ts.map +0 -1
  218. package/src/plugins/positioner/basic/types.d.ts +0 -22
  219. package/src/plugins/positioner/basic/types.d.ts.map +0 -1
@@ -129,6 +129,6 @@ export declare class PopupAbstractComponent<TCssClasses = any, TOptions extends
129
129
  */
130
130
  protected _handleVisibilityChange: (visible: boolean) => void;
131
131
  static ɵfac: i0.ɵɵFactoryDeclaration<PopupAbstractComponent<any, any>, never>;
132
- static ɵdir: i0.ɵɵDirectiveDeclaration<PopupAbstractComponent<any, any>, never, never, {}, {}, never>;
132
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PopupAbstractComponent<any, any>, never, never, {}, {}, never, never, false, never>;
133
133
  }
134
134
  //# sourceMappingURL=popupAbstract.component.d.ts.map
@@ -1,3 +1,3 @@
1
- export * from './basic/basicPositioner.component';
1
+ export * from './default/defaultPositioner.component';
2
2
  export * from './no/noPositioner.component';
3
3
  //# sourceMappingURL=components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { ElementRef, OnDestroy, ChangeDetectorRef, EventEmitter } from '@angular/core';
2
+ import { Position } from '@anglr/common';
3
+ import { NoopAction } from '@jscrpt/common';
4
+ import { Subscription } from 'rxjs';
5
+ import { DefaultPositionerOptions, DefaultPositioner } from './defaultPositioner.interface';
6
+ import { NgSelectPlugin, OptionsGatherer } from '../../../misc';
7
+ import { NgSelectPluginInstances } from '../../../components/select';
8
+ import { Popup } from '../../popup';
9
+ import { PluginBus } from '../../../misc/pluginBus/pluginBus';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * Component used for positioning popup element, handles resize, scroll and collision using `Position`
13
+ */
14
+ export declare class DefaultPositionerComponent implements DefaultPositioner, NgSelectPlugin<DefaultPositionerOptions>, OnDestroy {
15
+ ngSelectPlugins: NgSelectPluginInstances;
16
+ pluginBus: PluginBus;
17
+ pluginElement: ElementRef;
18
+ protected position: Position;
19
+ protected changeDetector: ChangeDetectorRef;
20
+ protected platformId?: Object;
21
+ /**
22
+ * Instance of previous options gatherer, that is used for obtaining available options
23
+ */
24
+ protected optionsGatherer: OptionsGatherer;
25
+ /**
26
+ * Occurs when flip occured during positining of popup
27
+ */
28
+ protected ɵflip: EventEmitter<void>;
29
+ /**
30
+ * Options for NgSelect plugin
31
+ */
32
+ protected ɵoptions: DefaultPositionerOptions;
33
+ /**
34
+ * Subscription for visibility change of popup
35
+ */
36
+ protected visibilitySubscription: Subscription | undefined | null;
37
+ /**
38
+ * Subscription for changes of options in options gatherer
39
+ */
40
+ protected optionsChangeSubscription: Subscription | undefined | null;
41
+ /**
42
+ * Subscription for positioning event that occured
43
+ */
44
+ protected positioningSubscription: Subscription | undefined | null;
45
+ /**
46
+ * Function used for disposing of positining watch
47
+ */
48
+ protected positioningDispose: NoopAction;
49
+ /**
50
+ * Popup that is displayed
51
+ */
52
+ protected popup: Popup;
53
+ /**
54
+ * Html element of popup plugin
55
+ */
56
+ protected popupElement: HTMLElement;
57
+ /**
58
+ * Indication whether is code running in browser
59
+ */
60
+ protected isBrowser: boolean;
61
+ /**
62
+ * Options for NgSelect plugin
63
+ */
64
+ get options(): DefaultPositionerOptions;
65
+ set options(options: DefaultPositionerOptions);
66
+ /**
67
+ * @inheritdoc
68
+ */
69
+ get flip(): EventEmitter<void>;
70
+ constructor(ngSelectPlugins: NgSelectPluginInstances, pluginBus: PluginBus, pluginElement: ElementRef, position: Position, changeDetector: ChangeDetectorRef, options?: DefaultPositionerOptions, platformId?: Object);
71
+ /**
72
+ * Called when component is destroyed
73
+ */
74
+ ngOnDestroy(): void;
75
+ /**
76
+ * Initialize plugin, to be ready to use, initialize communication with other plugins
77
+ */
78
+ initialize(): void;
79
+ /**
80
+ * @inheritdoc
81
+ */
82
+ initOptions(): void;
83
+ /**
84
+ * @inheritdoc
85
+ */
86
+ invalidateVisuals(): void;
87
+ /**
88
+ * Initialize positioning of popup
89
+ */
90
+ protected initPosition(): void;
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultPositionerComponent, [{ optional: true; }, { optional: true; }, null, null, null, { optional: true; }, null]>;
92
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefaultPositionerComponent, "ng-default-positioner", never, {}, {}, never, never, false, never>;
93
+ }
94
+ //# sourceMappingURL=defaultPositioner.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPositioner.component.d.ts","sourceRoot":"","sources":["defaultPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,UAAU,EAAE,SAAS,EAAe,iBAAiB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAExJ,OAAO,EAAC,QAAQ,EAA8C,MAAM,eAAe,CAAC;AACpF,OAAO,EAAS,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,wBAAwB,EAAE,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAElC,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;;AAc5D;;GAEG;AACH,qBAMa,0BAA2B,YAAW,iBAAiB,EAAE,cAAc,CAAC,wBAAwB,CAAC,EAAE,SAAS;IA6ElD,eAAe,EAAE,uBAAuB;IAC5E,SAAS,EAAE,SAAS;IAChC,aAAa,EAAE,UAAU;IACd,SAAS,CAAC,QAAQ,EAAE,QAAQ;IAC9C,SAAS,CAAC,cAAc,EAAE,iBAAiB;IAEtB,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM;IA/E9D;;OAEG;IACH,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAE3C;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAEpC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAE7C;;OAEG;IACH,SAAS,CAAC,sBAAsB,EAAE,YAAY,GAAC,SAAS,GAAC,IAAI,CAAC;IAE9D;;OAEG;IACH,SAAS,CAAC,yBAAyB,EAAE,YAAY,GAAC,SAAS,GAAC,IAAI,CAAC;IAEjE;;OAEG;IACH,SAAS,CAAC,uBAAuB,EAAE,YAAY,GAAC,SAAS,GAAC,IAAI,CAAC;IAE/D;;OAEG;IACH,SAAS,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAEzC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,WAAW,CAAC;IAEpC;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,CAAsC;IAIlE;;OAEG;IACH,IAAW,OAAO,IAAI,wBAAwB,CAG7C;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,wBAAwB,EAGnD;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAGpC;gBAGkE,eAAe,EAAE,uBAAuB,EAC5E,SAAS,EAAE,SAAS,EAChC,aAAa,EAAE,UAAU,EACJ,QAAQ,EAAE,QAAQ,EACpC,cAAc,EAAE,iBAAiB,EACH,OAAO,CAAC,EAAE,wBAAwB,EAC3C,UAAU,CAAC,EAAE,MAAM;IAO9D;;OAEG;IACI,WAAW;IAgBlB;;OAEG;IACI,UAAU;IA2CjB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAMhC;;OAEG;IACH,SAAS,CAAC,YAAY;yCA9Kb,0BAA0B;2CAA1B,0BAA0B;CAwNtC"}
@@ -0,0 +1,12 @@
1
+ import { Positioner, PositionerOptions } from '../positioner.interface';
2
+ /**
3
+ * Default positioner options
4
+ */
5
+ export interface DefaultPositionerOptions extends PositionerOptions {
6
+ }
7
+ /**
8
+ * Public API for 'DefaultPositionerComponent'
9
+ */
10
+ export interface DefaultPositioner extends Positioner {
11
+ }
12
+ //# sourceMappingURL=defaultPositioner.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPositioner.interface.d.ts","sourceRoot":"","sources":["defaultPositioner.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;CAElE;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU;CAEpD"}
@@ -1,4 +1,4 @@
1
1
  export * from './positioner.interface';
2
- export * from './basic/basicPositioner.interface';
2
+ export * from './default/defaultPositioner.interface';
3
3
  export * from './no/noPositioner.interface';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AAEvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AAEvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ElementRef } from '@angular/core';
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
2
  import { NoPositioner, NoPositionerOptions } from './noPositioner.interface';
3
3
  import { NgSelectPlugin } from '../../../misc';
4
4
  import { NgSelectPluginInstances } from '../../../components/select';
@@ -13,12 +13,20 @@ export declare class NoPositionerComponent implements NoPositioner, NgSelectPlug
13
13
  /**
14
14
  * Options for NgSelect plugin
15
15
  */
16
- protected _options: NoPositionerOptions;
16
+ protected ɵoptions: NoPositionerOptions;
17
+ /**
18
+ * Occurs when flip occured during positining of popup
19
+ */
20
+ protected ɵflip: EventEmitter<void>;
17
21
  /**
18
22
  * Options for NgSelect plugin
19
23
  */
20
24
  get options(): NoPositionerOptions;
21
25
  set options(options: NoPositionerOptions);
26
+ /**
27
+ * @inheritdoc
28
+ */
29
+ get flip(): EventEmitter<void>;
22
30
  /**
23
31
  * Plugin bus used for inter plugin shared events
24
32
  */
@@ -37,6 +45,6 @@ export declare class NoPositionerComponent implements NoPositioner, NgSelectPlug
37
45
  */
38
46
  invalidateVisuals(): void;
39
47
  static ɵfac: i0.ɵɵFactoryDeclaration<NoPositionerComponent, [{ optional: true; }, null, { optional: true; }]>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<NoPositionerComponent, "ng-no-positioner", never, {}, {}, never, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<NoPositionerComponent, "ng-no-positioner", never, {}, {}, never, never, false, never>;
41
49
  }
42
50
  //# sourceMappingURL=noPositioner.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noPositioner.component.d.ts","sourceRoot":"","sources":["noPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAmB,MAAM,eAAe,CAAC;AAG/F,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;;AAU5D;;GAEG;AACH,qBAMa,qBAAsB,YAAW,YAAY,EAAE,cAAc,CAAC,mBAAmB,CAAC;IA8BxB,eAAe,EAAE,uBAAuB;IACxF,aAAa,EAAE,UAAU;IA3B5C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAIxC;;OAEG;IACH,IAAW,OAAO,IAAI,mBAAmB,CAGxC;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,mBAAmB,EAG9C;IAED;;OAEG;IACI,SAAS,EAAE,SAAS,CAAC;gBAIuC,eAAe,EAAE,uBAAuB,EACxF,aAAa,EAAE,UAAU,EACQ,OAAO,CAAC,EAAE,mBAAmB;IAOjF;;OAEG;IACI,UAAU;IAIjB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,iBAAiB,IAAI,IAAI;yCAxDvB,qBAAqB;2CAArB,qBAAqB;CA2DjC"}
1
+ {"version":3,"file":"noPositioner.component.d.ts","sourceRoot":"","sources":["noPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,UAAU,EAAE,YAAY,EAAmB,MAAM,eAAe,CAAC;AAG7G,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;;AAS5D;;GAEG;AACH,qBAMa,qBAAsB,YAAW,YAAY,EAAE,cAAc,CAAC,mBAAmB,CAAC;IA2CxB,eAAe,EAAE,uBAAuB;IACxF,aAAa,EAAE,UAAU;IAxC5C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAIpC;;OAEG;IACH,IAAW,OAAO,IAAI,mBAAmB,CAGxC;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,mBAAmB,EAG9C;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAGpC;IAED;;OAEG;IACI,SAAS,EAAE,SAAS,CAAC;gBAIuC,eAAe,EAAE,uBAAuB,EACxF,aAAa,EAAE,UAAU,EACQ,OAAO,CAAC,EAAE,mBAAmB;IAOjF;;OAEG;IACI,UAAU;IAIjB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,iBAAiB,IAAI,IAAI;yCArEvB,qBAAqB;2CAArB,qBAAqB;CAwEjC"}
@@ -1,21 +1,22 @@
1
- import type { PositionsCoordinates } from 'positions';
1
+ import { EventEmitter } from '@angular/core';
2
+ import { PositionOptions } from '@anglr/common';
2
3
  import { PluginOptions, NgSelectPlugin } from '../../misc';
3
4
  /**
4
5
  * Options for positioner plugin
5
6
  */
6
7
  export interface PositionerOptions extends PluginOptions {
7
8
  /**
8
- * Coordinates of options popup relative to select
9
+ * Options used for positioning
9
10
  */
10
- optionsCoordinates?: PositionsCoordinates;
11
- /**
12
- * Coordinates of select relative to options
13
- */
14
- selectCoordinates?: PositionsCoordinates;
11
+ positionOptions?: Partial<Omit<PositionOptions, 'mouseEvent' | 'autoUpdate' | 'flip'>>;
15
12
  }
16
13
  /**
17
14
  * Positioner plugin interface
18
15
  */
19
16
  export interface Positioner extends NgSelectPlugin {
17
+ /**
18
+ * Occurs when flip occured during positining of popup
19
+ */
20
+ readonly flip: EventEmitter<void>;
20
21
  }
21
22
  //# sourceMappingURL=positioner.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"positioner.interface.d.ts","sourceRoot":"","sources":["positioner.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IAEpD;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAE1C;;OAEG;IACH,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;CAEjD"}
1
+ {"version":3,"file":"positioner.interface.d.ts","sourceRoot":"","sources":["positioner.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IAEpD;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,GAAC,YAAY,GAAC,MAAM,CAAC,CAAC,CAAC;CACtF;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAE9C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CACrC"}
@@ -1,6 +1,5 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { PositionerOptions } from './positioner.interface';
3
- export { ScrollTargetSelector } from './basic/types';
4
3
  /**
5
4
  * Constant used for accessing positioner plugin in NgSelect
6
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,iBAAiB,CAA+D,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,iBAAiB,CAA+D,CAAC"}
@@ -46,6 +46,6 @@ export declare class BasicValueHandlerComponent<TValue = any> extends ValueHandl
46
46
  */
47
47
  protected _useOptionsAsValue(value: TValue | TValue[]): void;
48
48
  static ɵfac: i0.ɵɵFactoryDeclaration<BasicValueHandlerComponent<any>, [{ optional: true; }, { optional: true; }, null, { optional: true; }]>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<BasicValueHandlerComponent<any>, "ng-basic-value-handler", never, {}, {}, never, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<BasicValueHandlerComponent<any>, "ng-basic-value-handler", never, {}, {}, never, never, false, never>;
50
50
  }
51
51
  //# sourceMappingURL=basicValueHandler.component.d.ts.map
@@ -47,6 +47,6 @@ export declare class DynamicValueHandlerComponent<TValue = any> extends ValueHan
47
47
  */
48
48
  protected _loadText(value: TValue): Promise<ɵNgSelectOption<TValue>>;
49
49
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicValueHandlerComponent<any>, [{ optional: true; }, { optional: true; }, null, { optional: true; }]>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<DynamicValueHandlerComponent<any>, "ng-dynamic-value-handler", never, {}, {}, never, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicValueHandlerComponent<any>, "ng-dynamic-value-handler", never, {}, {}, never, never, false, never>;
51
51
  }
52
52
  //# sourceMappingURL=dynamicValueHandler.component.d.ts.map
@@ -110,6 +110,6 @@ export declare abstract class ValueHandlerBase<TValue = any, TOptions extends Va
110
110
  */
111
111
  protected abstract _loadOptions(): void;
112
112
  static ɵfac: i0.ɵɵFactoryDeclaration<ValueHandlerBase<any, any>, never>;
113
- static ɵdir: i0.ɵɵDirectiveDeclaration<ValueHandlerBase<any, any>, never, never, {}, {}, never>;
113
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ValueHandlerBase<any, any>, never, never, {}, {}, never, never, false, never>;
114
114
  }
115
115
  //# sourceMappingURL=valueHandlerBase.d.ts.map
package/version.bak CHANGED
@@ -1 +1 @@
1
- 11.0.2
1
+ 12.0.0-beta.20230109082659
@@ -1,4 +0,0 @@
1
- export * from './modules/popperjsPositioner.module';
2
- export * from './plugins/positioner/components';
3
- export * from './plugins/positioner';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../popperJs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './modules/popperjsPositioner.module';\nexport * from './plugins/positioner/components';\nexport * from './plugins/positioner';"]}
@@ -1,23 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { PopperJsPositionerComponent } from '../plugins/positioner/popperJs/popperJsPositioner.component';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Module for popperjs positioner plugin
6
- */
7
- export class PopperJsPositionerModule {
8
- }
9
- PopperJsPositionerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
- PopperJsPositionerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerModule, declarations: [PopperJsPositionerComponent], exports: [PopperJsPositionerComponent] });
11
- PopperJsPositionerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerModule });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerModule, decorators: [{
13
- type: NgModule,
14
- args: [{
15
- declarations: [
16
- PopperJsPositionerComponent
17
- ],
18
- exports: [
19
- PopperJsPositionerComponent
20
- ]
21
- }]
22
- }] });
23
- //# sourceMappingURL=popperjsPositioner.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popperjsPositioner.module.js","sourceRoot":"","sources":["../../../../popperJs/src/modules/popperjsPositioner.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,2BAA2B,EAAC,MAAM,6DAA6D,CAAC;;AAExG;;GAEG;AAYH,MAAM,OAAO,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,iBAP7B,2BAA2B,aAI3B,2BAA2B;sHAGtB,wBAAwB;2FAAxB,wBAAwB;kBAXpC,QAAQ;mBACT;oBACI,YAAY,EACZ;wBACI,2BAA2B;qBAC9B;oBACD,OAAO,EACP;wBACI,2BAA2B;qBAC9B;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {PopperJsPositionerComponent} from '../plugins/positioner/popperJs/popperJsPositioner.component';\n\n/**\n * Module for popperjs positioner plugin\n */\n@NgModule(\n{\n declarations:\n [\n PopperJsPositionerComponent\n ],\n exports:\n [\n PopperJsPositionerComponent\n ]\n})\nexport class PopperJsPositionerModule\n{\n}\n"]}
@@ -1,2 +0,0 @@
1
- export * from './popperJs/popperJsPositioner.component';
2
- //# sourceMappingURL=components.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["../../../../../popperJs/src/plugins/positioner/components.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC","sourcesContent":["export * from './popperJs/popperJsPositioner.component';"]}
@@ -1,2 +0,0 @@
1
- export * from './popperJs/popperJsPositioner.interface';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../popperJs/src/plugins/positioner/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC","sourcesContent":["export * from './popperJs/popperJsPositioner.interface';"]}
@@ -1,151 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, Inject, Optional, ElementRef, PLATFORM_ID, ChangeDetectorRef } from '@angular/core';
2
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
3
- import { NG_SELECT_PLUGIN_INSTANCES, PluginBus, POPUP, POSITIONER_OPTIONS } from '@anglr/select';
4
- import { extend } from '@jscrpt/common';
5
- import { createPopper } from '@popperjs/core';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@anglr/select";
8
- /**
9
- * Default options for positioner
10
- * @internal
11
- */
12
- const defaultOptions = {};
13
- /**
14
- * Component used for positioning popup element, using popper js
15
- */
16
- export class PopperJsPositionerComponent {
17
- //######################### constructor #########################
18
- constructor(ngSelectPlugins, pluginBus, pluginElement, _changeDetector, options, _document, _platformId) {
19
- this.ngSelectPlugins = ngSelectPlugins;
20
- this.pluginBus = pluginBus;
21
- this.pluginElement = pluginElement;
22
- this._changeDetector = _changeDetector;
23
- this._document = _document;
24
- this._platformId = _platformId;
25
- /**
26
- * Indication whether is code running in browser
27
- */
28
- this._isBrowser = isPlatformBrowser(this._platformId);
29
- this._options = extend(true, {}, defaultOptions, options);
30
- }
31
- //######################### public properties - implementation of BasicPositioner #########################
32
- /**
33
- * Options for NgSelect plugin
34
- */
35
- get options() {
36
- return this._options;
37
- }
38
- set options(options) {
39
- this._options = extend(true, this._options, options);
40
- }
41
- //######################### public methods - implementation of OnDestroy #########################
42
- /**
43
- * Called when component is destroyed
44
- */
45
- ngOnDestroy() {
46
- var _a, _b, _c;
47
- (_a = this._visibilitySubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
48
- this._visibilitySubscription = null;
49
- (_b = this._optionsChangeSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
50
- this._optionsChangeSubscription = null;
51
- (_c = this._popperJsInstance) === null || _c === void 0 ? void 0 : _c.destroy();
52
- this._popperJsInstance = null;
53
- }
54
- //######################### public methods - implementation of BasicPositioner #########################
55
- /**
56
- * Initialize plugin, to be ready to use, initialize communication with other plugins
57
- */
58
- initialize() {
59
- var _a, _b;
60
- if (this._optionsGatherer && this._optionsGatherer != ((_a = this.pluginBus) === null || _a === void 0 ? void 0 : _a.selectOptions.optionsGatherer)) {
61
- this._optionsChangeSubscription.unsubscribe();
62
- this._optionsChangeSubscription = null;
63
- this._optionsGatherer = null;
64
- }
65
- if (!this._optionsGatherer) {
66
- this._optionsGatherer = (_b = this.pluginBus) === null || _b === void 0 ? void 0 : _b.selectOptions.optionsGatherer;
67
- this._optionsChangeSubscription = this._optionsGatherer.availableOptionsChange.subscribe(() => {
68
- if (this._popup.popupElement && this._optionsGatherer.availableOptions) {
69
- this._handlePosition();
70
- }
71
- });
72
- }
73
- const popup = this.ngSelectPlugins[POPUP];
74
- if (this._popup && this._popup != popup) {
75
- this._visibilitySubscription.unsubscribe();
76
- this._visibilitySubscription = null;
77
- this._popup = null;
78
- }
79
- if (!this._popup) {
80
- this._popup = popup;
81
- this._visibilitySubscription = this._popup.visibilityChange.subscribe(() => this._handlePosition());
82
- }
83
- this._handlePosition();
84
- }
85
- /**
86
- * Initialize plugin options, all operations required to be done with plugin options are handled here
87
- */
88
- initOptions() {
89
- }
90
- /**
91
- * Explicitly runs invalidation of content (change detection)
92
- */
93
- invalidateVisuals() {
94
- }
95
- //######################### protected methods #########################
96
- /**
97
- * Handles position of popup
98
- */
99
- _handlePosition() {
100
- var _a;
101
- this._popupElement = this._popup.popupElement;
102
- // //this has meaning only when popup is outside of ng-element
103
- // this._changeDetector.markForCheck();
104
- if (this._isBrowser) {
105
- //register events and handle position of opened popup
106
- if (this._popupElement) {
107
- if (this._popperJsInstance) {
108
- // this._popperJsInstance.update();
109
- return;
110
- }
111
- this._popperJsInstance = createPopper(this.pluginBus.selectElement.nativeElement, this._popupElement, {
112
- placement: 'bottom-start'
113
- });
114
- }
115
- //unregister events
116
- else {
117
- (_a = this._popperJsInstance) === null || _a === void 0 ? void 0 : _a.destroy();
118
- this._popperJsInstance = null;
119
- }
120
- }
121
- }
122
- }
123
- PopperJsPositionerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerComponent, deps: [{ token: NG_SELECT_PLUGIN_INSTANCES, optional: true }, { token: i1.PluginBus, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: POSITIONER_OPTIONS, optional: true }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
124
- PopperJsPositionerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: PopperJsPositionerComponent, selector: "ng-popperjs-positioner", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PopperJsPositionerComponent, decorators: [{
126
- type: Component,
127
- args: [{
128
- selector: 'ng-popperjs-positioner',
129
- template: '',
130
- changeDetection: ChangeDetectionStrategy.OnPush
131
- }]
132
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
133
- type: Inject,
134
- args: [NG_SELECT_PLUGIN_INSTANCES]
135
- }, {
136
- type: Optional
137
- }] }, { type: i1.PluginBus, decorators: [{
138
- type: Optional
139
- }] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
140
- type: Inject,
141
- args: [POSITIONER_OPTIONS]
142
- }, {
143
- type: Optional
144
- }] }, { type: Document, decorators: [{
145
- type: Inject,
146
- args: [DOCUMENT]
147
- }] }, { type: Object, decorators: [{
148
- type: Inject,
149
- args: [PLATFORM_ID]
150
- }] }]; } });
151
- //# sourceMappingURL=popperJsPositioner.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popperJsPositioner.component.js","sourceRoot":"","sources":["../../../../../../popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAa,WAAW,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC1I,OAAO,EAAC,QAAQ,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAA0C,0BAA0B,EAAmB,SAAS,EAAE,KAAK,EAA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,MAAM;2BAAC,WAAW","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, Optional, ElementRef, OnDestroy, PLATFORM_ID, ChangeDetectorRef} from '@angular/core';\nimport {DOCUMENT, isPlatformBrowser} from '@angular/common';\nimport {NgSelectPlugin, NgSelectPluginInstances, NG_SELECT_PLUGIN_INSTANCES, OptionsGatherer, PluginBus, POPUP, Popup, POSITIONER_OPTIONS} from '@anglr/select';\nimport {extend} from '@jscrpt/common';\nimport {createPopper} from '@popperjs/core';\nimport type {Instance} from '@popperjs/core';\nimport {Subscription} from 'rxjs';\n\nimport {PopperJsPositioner, PopperJsPositionerOptions} from './popperjsPositioner.interface';\n\n/**\n * Default options for positioner\n * @internal\n */\nconst defaultOptions: PopperJsPositionerOptions =\n{\n};\n\n/**\n * Component used for positioning popup element, using popper js\n */\n@Component(\n{\n selector: 'ng-popperjs-positioner',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PopperJsPositionerComponent implements PopperJsPositioner, NgSelectPlugin<PopperJsPositionerOptions>, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of previous options gatherer, that is used for obtaining available options\n */\n protected _optionsGatherer: OptionsGatherer;\n\n /**\n * Options for NgSelect plugin\n */\n protected _options: PopperJsPositionerOptions;\n\n /**\n * Subscription for visibility change of popup\n */\n protected _visibilitySubscription: Subscription;\n\n /**\n * Subscription for changes of options in options gatherer\n */\n protected _optionsChangeSubscription: Subscription;\n\n /**\n * Popup that is displayed\n */\n protected _popup: Popup;\n\n /**\n * Instance of popper js\n */\n protected _popperJsInstance: Instance;\n\n /**\n * Html element of popup plugin\n */\n protected _popupElement: HTMLElement;\n\n /**\n * Indication whether is code running in browser\n */\n protected _isBrowser: boolean = isPlatformBrowser(this._platformId);\n\n //######################### public properties - implementation of BasicPositioner #########################\n\n /**\n * Options for NgSelect plugin\n */\n public get options(): PopperJsPositionerOptions\n {\n return this._options;\n }\n public set options(options: PopperJsPositionerOptions)\n {\n this._options = extend(true, this._options, options);\n }\n\n //######################### constructor #########################\n constructor(@Inject(NG_SELECT_PLUGIN_INSTANCES) @Optional() public ngSelectPlugins: NgSelectPluginInstances,\n @Optional() public pluginBus: PluginBus,\n public pluginElement: ElementRef,\n protected _changeDetector: ChangeDetectorRef,\n @Inject(POSITIONER_OPTIONS) @Optional() options?: PopperJsPositionerOptions,\n @Inject(DOCUMENT) protected _document?: Document,\n @Inject(PLATFORM_ID) protected _platformId?: Object)\n {\n this._options = extend(true, {}, defaultOptions, options);\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy()\n {\n this._visibilitySubscription?.unsubscribe();\n this._visibilitySubscription = null;\n\n this._optionsChangeSubscription?.unsubscribe();\n this._optionsChangeSubscription = null;\n\n this._popperJsInstance?.destroy();\n this._popperJsInstance = null;\n }\n\n //######################### public methods - implementation of BasicPositioner #########################\n\n /**\n * Initialize plugin, to be ready to use, initialize communication with other plugins\n */\n public initialize()\n {\n if(this._optionsGatherer && this._optionsGatherer != this.pluginBus?.selectOptions.optionsGatherer)\n {\n this._optionsChangeSubscription.unsubscribe();\n this._optionsChangeSubscription = null;\n\n this._optionsGatherer = null;\n }\n\n if(!this._optionsGatherer)\n {\n this._optionsGatherer = this.pluginBus?.selectOptions.optionsGatherer;\n\n this._optionsChangeSubscription = this._optionsGatherer.availableOptionsChange.subscribe(() =>\n {\n if(this._popup.popupElement && this._optionsGatherer.availableOptions)\n {\n this._handlePosition();\n }\n });\n }\n\n const popup: Popup = this.ngSelectPlugins[POPUP] as Popup;\n\n if(this._popup && this._popup != popup)\n {\n this._visibilitySubscription.unsubscribe();\n this._visibilitySubscription = null;\n\n this._popup = null;\n }\n\n if(!this._popup)\n {\n this._popup = popup;\n\n this._visibilitySubscription = this._popup.visibilityChange.subscribe(() => this._handlePosition());\n }\n\n this._handlePosition();\n }\n\n /**\n * Initialize plugin options, all operations required to be done with plugin options are handled here\n */\n public initOptions()\n {\n }\n\n /**\n * Explicitly runs invalidation of content (change detection)\n */\n public invalidateVisuals(): void\n {\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles position of popup\n */\n protected _handlePosition()\n {\n this._popupElement = this._popup.popupElement;\n\n // //this has meaning only when popup is outside of ng-element\n // this._changeDetector.markForCheck();\n\n if(this._isBrowser)\n {\n //register events and handle position of opened popup\n if(this._popupElement)\n {\n if(this._popperJsInstance)\n {\n // this._popperJsInstance.update();\n\n return;\n }\n\n this._popperJsInstance = createPopper(this.pluginBus.selectElement.nativeElement,\n this._popupElement,\n {\n placement: 'bottom-start'\n });\n }\n //unregister events\n else\n {\n this._popperJsInstance?.destroy();\n this._popperJsInstance = null;\n }\n }\n }\n\n // /**\n // * Updates min width of popup\n // */\n // protected _updateMinWidth()\n // {\n // if(!this._popupElement)\n // {\n // return;\n // }\n\n // let minWidth = this.pluginBus.selectElement.nativeElement.clientWidth;\n\n // if(isNaN(minWidth) || !isNumber(minWidth))\n // {\n // return;\n // }\n\n // this._popupElement.style.minWidth = `${minWidth}px`;\n // }\n}"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=popperjsPositioner.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"popperjsPositioner.interface.js","sourceRoot":"","sources":["../../../../../../popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Positioner} from '@anglr/select';\n\n/**\n * Popper js positioner options\n */\nexport interface PopperJsPositionerOptions\n{\n}\n\n/**\n * Public API for 'PopperJsPositionerComponent'\n */\nexport interface PopperJsPositioner extends Positioner\n{\n}"]}