@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.
- package/changelog.md +43 -0
- package/elements/src/components/ngSelectElements.component.d.ts +1 -1
- package/es2015/elements/src/components/ngSelectElements.component.js +7 -13
- package/es2015/elements/src/components/ngSelectElements.component.js.map +1 -1
- package/es2015/elements/src/modules/ngSelectElements.module.js +7 -9
- package/es2015/elements/src/modules/ngSelectElements.module.js.map +1 -1
- package/es2015/material/src/components/basicDialogPopup/basicDialogPopup.component.js +3 -3
- package/es2015/material/src/directives/dialogPopup/dialogPopup.directive.js +3 -3
- package/es2015/material/src/modules/dialogPopup.module.js +5 -7
- package/es2015/material/src/modules/dialogPopup.module.js.map +1 -1
- package/es2015/material/src/modules/virtualEditPopup.module.js +5 -7
- package/es2015/material/src/modules/virtualEditPopup.module.js.map +1 -1
- package/es2015/material/src/plugins/popup/dialog/dialogPopup.component.js +3 -3
- package/es2015/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +5 -5
- package/es2015/src/components/option/optgroup.component.js +3 -3
- package/es2015/src/components/option/option.component.js +3 -3
- package/es2015/src/components/select/select.component.js +9 -15
- package/es2015/src/components/select/select.component.js.map +1 -1
- package/es2015/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +3 -3
- package/es2015/src/directives/ngSelectEdit/ngSelectEdit.directive.js +3 -3
- package/es2015/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +3 -3
- package/es2015/src/misc/ngSelectControlValueAccessor.directive.js +3 -3
- package/es2015/src/misc/pluginBus/pluginBus.js +3 -3
- package/es2015/src/modules/ngSelect.module.js +8 -10
- package/es2015/src/modules/ngSelect.module.js.map +1 -1
- package/es2015/src/modules/ngSelectDynamic.module.js +4 -4
- package/es2015/src/modules/ngSelectEdit.module.js +5 -7
- package/es2015/src/modules/ngSelectEdit.module.js.map +1 -1
- package/es2015/src/pipes/ngSelectHasValue.pipe.js +3 -3
- package/es2015/src/pipes/ngSelectValue.pipe.js +3 -3
- package/es2015/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +3 -3
- package/es2015/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +3 -3
- package/es2015/src/plugins/liveSearch/basic/basicLiveSearch.component.js +3 -3
- package/es2015/src/plugins/liveSearch/edit/editLiveSearch.component.js +3 -3
- package/es2015/src/plugins/liveSearch/no/noLiveSearch.component.js +3 -3
- package/es2015/src/plugins/liveSearch/no/noLiveSearch.component.js.map +1 -1
- package/es2015/src/plugins/normalState/basic/basicNormalState.component.js +3 -3
- package/es2015/src/plugins/normalState/edit/editNormalState.component.js +3 -3
- package/es2015/src/plugins/normalState/normalStateAbstract.component.js +3 -3
- package/es2015/src/plugins/popup/basic/basicPopup.component.js +3 -3
- package/es2015/src/plugins/popup/basic/basicPopup.component.js.map +1 -1
- package/es2015/src/plugins/popup/edit/editPopup.component.js +3 -3
- package/es2015/src/plugins/popup/edit/editPopup.component.js.map +1 -1
- package/es2015/src/plugins/popup/popupAbstract.component.js +3 -3
- package/es2015/src/plugins/popup/popupAbstract.component.js.map +1 -1
- package/es2015/src/plugins/positioner/components.js +1 -1
- package/es2015/src/plugins/positioner/components.js.map +1 -1
- package/es2015/src/plugins/positioner/default/defaultPositioner.component.js +175 -0
- package/es2015/src/plugins/positioner/default/defaultPositioner.component.js.map +1 -0
- package/es2015/src/plugins/positioner/default/defaultPositioner.interface.js +2 -0
- package/es2015/src/plugins/positioner/default/defaultPositioner.interface.js.map +1 -0
- package/es2015/src/plugins/positioner/index.js +1 -1
- package/es2015/src/plugins/positioner/index.js.map +1 -1
- package/es2015/src/plugins/positioner/no/noPositioner.component.js +12 -7
- package/es2015/src/plugins/positioner/no/noPositioner.component.js.map +1 -1
- package/es2015/src/plugins/positioner/positioner.interface.js.map +1 -1
- package/es2015/src/plugins/positioner/types.js +0 -1
- package/es2015/src/plugins/positioner/types.js.map +1 -1
- package/es2015/src/plugins/valueHandler/basic/basicValueHandler.component.js +3 -3
- package/es2015/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +3 -3
- package/es2015/src/plugins/valueHandler/valueHandlerBase.js +3 -3
- package/es2020/elements/src/components/ngSelectElements.component.js +7 -13
- package/es2020/elements/src/components/ngSelectElements.component.js.map +1 -1
- package/es2020/elements/src/modules/ngSelectElements.module.js +7 -9
- package/es2020/elements/src/modules/ngSelectElements.module.js.map +1 -1
- package/es2020/material/src/components/basicDialogPopup/basicDialogPopup.component.js +3 -3
- package/es2020/material/src/directives/dialogPopup/dialogPopup.directive.js +3 -3
- package/es2020/material/src/modules/dialogPopup.module.js +5 -7
- package/es2020/material/src/modules/dialogPopup.module.js.map +1 -1
- package/es2020/material/src/modules/virtualEditPopup.module.js +5 -7
- package/es2020/material/src/modules/virtualEditPopup.module.js.map +1 -1
- package/es2020/material/src/plugins/popup/dialog/dialogPopup.component.js +3 -3
- package/es2020/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.js +5 -5
- package/es2020/src/components/option/optgroup.component.js +3 -3
- package/es2020/src/components/option/option.component.js +3 -3
- package/es2020/src/components/select/select.component.js +9 -15
- package/es2020/src/components/select/select.component.js.map +1 -1
- package/es2020/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.js +3 -3
- package/es2020/src/directives/ngSelectEdit/ngSelectEdit.directive.js +3 -3
- package/es2020/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.js +3 -3
- package/es2020/src/misc/ngSelectControlValueAccessor.directive.js +3 -3
- package/es2020/src/misc/pluginBus/pluginBus.js +3 -3
- package/es2020/src/modules/ngSelect.module.js +8 -10
- package/es2020/src/modules/ngSelect.module.js.map +1 -1
- package/es2020/src/modules/ngSelectDynamic.module.js +4 -4
- package/es2020/src/modules/ngSelectEdit.module.js +5 -7
- package/es2020/src/modules/ngSelectEdit.module.js.map +1 -1
- package/es2020/src/pipes/ngSelectHasValue.pipe.js +3 -3
- package/es2020/src/pipes/ngSelectValue.pipe.js +3 -3
- package/es2020/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.js +3 -3
- package/es2020/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.js +3 -3
- package/es2020/src/plugins/liveSearch/basic/basicLiveSearch.component.js +3 -3
- package/es2020/src/plugins/liveSearch/edit/editLiveSearch.component.js +3 -3
- package/es2020/src/plugins/liveSearch/no/noLiveSearch.component.js +3 -3
- package/es2020/src/plugins/liveSearch/no/noLiveSearch.component.js.map +1 -1
- package/es2020/src/plugins/normalState/basic/basicNormalState.component.js +3 -3
- package/es2020/src/plugins/normalState/edit/editNormalState.component.js +3 -3
- package/es2020/src/plugins/normalState/normalStateAbstract.component.js +3 -3
- package/es2020/src/plugins/popup/basic/basicPopup.component.js +3 -3
- package/es2020/src/plugins/popup/basic/basicPopup.component.js.map +1 -1
- package/es2020/src/plugins/popup/edit/editPopup.component.js +3 -3
- package/es2020/src/plugins/popup/edit/editPopup.component.js.map +1 -1
- package/es2020/src/plugins/popup/popupAbstract.component.js +3 -3
- package/es2020/src/plugins/popup/popupAbstract.component.js.map +1 -1
- package/es2020/src/plugins/positioner/components.js +1 -1
- package/es2020/src/plugins/positioner/components.js.map +1 -1
- package/es2020/src/plugins/positioner/default/defaultPositioner.component.js +172 -0
- package/es2020/src/plugins/positioner/default/defaultPositioner.component.js.map +1 -0
- package/es2020/src/plugins/positioner/default/defaultPositioner.interface.js +2 -0
- package/es2020/src/plugins/positioner/default/defaultPositioner.interface.js.map +1 -0
- package/es2020/src/plugins/positioner/index.js +1 -1
- package/es2020/src/plugins/positioner/index.js.map +1 -1
- package/es2020/src/plugins/positioner/no/noPositioner.component.js +12 -7
- package/es2020/src/plugins/positioner/no/noPositioner.component.js.map +1 -1
- package/es2020/src/plugins/positioner/positioner.interface.js.map +1 -1
- package/es2020/src/plugins/positioner/types.js +0 -1
- package/es2020/src/plugins/positioner/types.js.map +1 -1
- package/es2020/src/plugins/valueHandler/basic/basicValueHandler.component.js +3 -3
- package/es2020/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.js +3 -3
- package/es2020/src/plugins/valueHandler/valueHandlerBase.js +3 -3
- package/material/src/components/basicDialogPopup/basicDialogPopup.component.d.ts +1 -1
- package/material/src/directives/dialogPopup/dialogPopup.directive.d.ts +1 -1
- package/material/src/plugins/popup/dialog/dialogPopup.component.d.ts +1 -1
- package/material/src/plugins/popup/virtualEdit/virtualEditPopup.component.d.ts +1 -1
- package/package.json +37 -52
- package/src/components/option/optgroup.component.d.ts +1 -1
- package/src/components/option/option.component.d.ts +1 -1
- package/src/components/select/select.component.d.ts +1 -1
- package/src/directives/ngSelectAbsolute/ngSelectAbsolute.directive.d.ts +1 -1
- package/src/directives/ngSelectEdit/ngSelectEdit.directive.d.ts +1 -1
- package/src/directives/ngSelectPlaceholder/ngSelectPlaceholder.directive.d.ts +1 -1
- package/src/misc/ngSelectControlValueAccessor.directive.d.ts +1 -1
- package/src/modules/ngSelect.module.d.ts +2 -2
- package/src/pipes/ngSelectHasValue.pipe.d.ts +1 -1
- package/src/pipes/ngSelectValue.pipe.d.ts +1 -1
- package/src/plugins/keyboardHandler/basic/basicKeyboardHandler.component.d.ts +1 -1
- package/src/plugins/keyboardHandler/edit/editKeyboardHandler.component.d.ts +1 -1
- package/src/plugins/liveSearch/basic/basicLiveSearch.component.d.ts +1 -1
- package/src/plugins/liveSearch/edit/editLiveSearch.component.d.ts +1 -1
- package/src/plugins/liveSearch/no/noLiveSearch.component.d.ts +1 -1
- package/src/plugins/normalState/basic/basicNormalState.component.d.ts +1 -1
- package/src/plugins/normalState/edit/editNormalState.component.d.ts +1 -1
- package/src/plugins/normalState/normalStateAbstract.component.d.ts +1 -1
- package/src/plugins/popup/basic/basicPopup.component.d.ts +1 -1
- package/src/plugins/popup/edit/editPopup.component.d.ts +1 -1
- package/src/plugins/popup/popupAbstract.component.d.ts +1 -1
- package/src/plugins/positioner/components.d.ts +1 -1
- package/src/plugins/positioner/components.d.ts.map +1 -1
- package/src/plugins/positioner/default/defaultPositioner.component.d.ts +94 -0
- package/src/plugins/positioner/default/defaultPositioner.component.d.ts.map +1 -0
- package/src/plugins/positioner/default/defaultPositioner.interface.d.ts +12 -0
- package/src/plugins/positioner/default/defaultPositioner.interface.d.ts.map +1 -0
- package/src/plugins/positioner/index.d.ts +1 -1
- package/src/plugins/positioner/index.d.ts.map +1 -1
- package/src/plugins/positioner/no/noPositioner.component.d.ts +11 -3
- package/src/plugins/positioner/no/noPositioner.component.d.ts.map +1 -1
- package/src/plugins/positioner/positioner.interface.d.ts +8 -7
- package/src/plugins/positioner/positioner.interface.d.ts.map +1 -1
- package/src/plugins/positioner/types.d.ts +0 -1
- package/src/plugins/positioner/types.d.ts.map +1 -1
- package/src/plugins/valueHandler/basic/basicValueHandler.component.d.ts +1 -1
- package/src/plugins/valueHandler/dynamic/dynamicValueHandler.component.d.ts +1 -1
- package/src/plugins/valueHandler/valueHandlerBase.d.ts +1 -1
- package/version.bak +1 -1
- package/es2015/popperJs/src/index.js +0 -4
- package/es2015/popperJs/src/index.js.map +0 -1
- package/es2015/popperJs/src/modules/popperjsPositioner.module.js +0 -23
- package/es2015/popperJs/src/modules/popperjsPositioner.module.js.map +0 -1
- package/es2015/popperJs/src/plugins/positioner/components.js +0 -2
- package/es2015/popperJs/src/plugins/positioner/components.js.map +0 -1
- package/es2015/popperJs/src/plugins/positioner/index.js +0 -2
- package/es2015/popperJs/src/plugins/positioner/index.js.map +0 -1
- package/es2015/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js +0 -151
- package/es2015/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js.map +0 -1
- package/es2015/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js +0 -2
- package/es2015/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js.map +0 -1
- package/es2015/src/plugins/positioner/basic/basicPositioner.component.js +0 -193
- package/es2015/src/plugins/positioner/basic/basicPositioner.component.js.map +0 -1
- package/es2015/src/plugins/positioner/basic/basicPositioner.interface.js +0 -2
- package/es2015/src/plugins/positioner/basic/basicPositioner.interface.js.map +0 -1
- package/es2015/src/plugins/positioner/basic/types.js +0 -36
- package/es2015/src/plugins/positioner/basic/types.js.map +0 -1
- package/es2020/popperJs/src/index.js +0 -4
- package/es2020/popperJs/src/index.js.map +0 -1
- package/es2020/popperJs/src/modules/popperjsPositioner.module.js +0 -23
- package/es2020/popperJs/src/modules/popperjsPositioner.module.js.map +0 -1
- package/es2020/popperJs/src/plugins/positioner/components.js +0 -2
- package/es2020/popperJs/src/plugins/positioner/components.js.map +0 -1
- package/es2020/popperJs/src/plugins/positioner/index.js +0 -2
- package/es2020/popperJs/src/plugins/positioner/index.js.map +0 -1
- package/es2020/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js +0 -148
- package/es2020/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.js.map +0 -1
- package/es2020/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js +0 -2
- package/es2020/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.js.map +0 -1
- package/es2020/src/plugins/positioner/basic/basicPositioner.component.js +0 -190
- package/es2020/src/plugins/positioner/basic/basicPositioner.component.js.map +0 -1
- package/es2020/src/plugins/positioner/basic/basicPositioner.interface.js +0 -2
- package/es2020/src/plugins/positioner/basic/basicPositioner.interface.js.map +0 -1
- package/es2020/src/plugins/positioner/basic/types.js +0 -36
- package/es2020/src/plugins/positioner/basic/types.js.map +0 -1
- package/popperJs/package.json +0 -9
- package/popperJs/src/index.d.ts +0 -4
- package/popperJs/src/index.d.ts.map +0 -1
- package/popperJs/src/modules/popperjsPositioner.module.d.ts +0 -11
- package/popperJs/src/modules/popperjsPositioner.module.d.ts.map +0 -1
- package/popperJs/src/plugins/positioner/components.d.ts +0 -2
- package/popperJs/src/plugins/positioner/components.d.ts.map +0 -1
- package/popperJs/src/plugins/positioner/index.d.ts +0 -2
- package/popperJs/src/plugins/positioner/index.d.ts.map +0 -1
- package/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.d.ts +0 -78
- package/popperJs/src/plugins/positioner/popperJs/popperJsPositioner.component.d.ts.map +0 -1
- package/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.d.ts +0 -12
- package/popperJs/src/plugins/positioner/popperJs/popperjsPositioner.interface.d.ts.map +0 -1
- package/src/plugins/positioner/basic/basicPositioner.component.d.ts +0 -90
- package/src/plugins/positioner/basic/basicPositioner.component.d.ts.map +0 -1
- package/src/plugins/positioner/basic/basicPositioner.interface.d.ts +0 -29
- package/src/plugins/positioner/basic/basicPositioner.interface.d.ts.map +0 -1
- package/src/plugins/positioner/basic/types.d.ts +0 -22
- package/src/plugins/positioner/basic/types.d.ts.map +0 -1
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Inject, Optional, ElementRef, PLATFORM_ID, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
3
|
-
import { positionsWithFlip } from '@anglr/common/positions';
|
|
4
|
-
import { extend, isNumber } from '@jscrpt/common';
|
|
5
|
-
import { NG_SELECT_PLUGIN_INSTANCES } from '../../../components/select/types';
|
|
6
|
-
import { POSITIONER_OPTIONS } from '../types';
|
|
7
|
-
import { POPUP } from '../../popup/types';
|
|
8
|
-
import { PluginBus } from '../../../misc/pluginBus/pluginBus';
|
|
9
|
-
import { ScrollTargetSelector } from './types';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "../../../misc/pluginBus/pluginBus";
|
|
12
|
-
import * as i2 from "./types";
|
|
13
|
-
/**
|
|
14
|
-
* Default options for positioner
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
const defaultOptions = {
|
|
18
|
-
optionsCoordinates: 'top left',
|
|
19
|
-
selectCoordinates: 'bottom left',
|
|
20
|
-
flipCallback: () => { },
|
|
21
|
-
scrollTarget: null,
|
|
22
|
-
activateOnResize: true,
|
|
23
|
-
activateOnScroll: true
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Component used for positioning popup element, handles resize, scroll and collision with viewport
|
|
27
|
-
*/
|
|
28
|
-
export class BasicPositionerComponent {
|
|
29
|
-
//######################### constructor #########################
|
|
30
|
-
constructor(ngSelectPlugins, pluginBus, pluginElement, _changeDetector, options, _document, _platformId, _scrollTargetSelector) {
|
|
31
|
-
this.ngSelectPlugins = ngSelectPlugins;
|
|
32
|
-
this.pluginBus = pluginBus;
|
|
33
|
-
this.pluginElement = pluginElement;
|
|
34
|
-
this._changeDetector = _changeDetector;
|
|
35
|
-
this._document = _document;
|
|
36
|
-
this._platformId = _platformId;
|
|
37
|
-
this._scrollTargetSelector = _scrollTargetSelector;
|
|
38
|
-
/**
|
|
39
|
-
* Indication whether is code running in browser
|
|
40
|
-
*/
|
|
41
|
-
this._isBrowser = isPlatformBrowser(this._platformId);
|
|
42
|
-
//######################### protected methods #########################
|
|
43
|
-
/**
|
|
44
|
-
* Handles resize and scroll event
|
|
45
|
-
*/
|
|
46
|
-
this._handleResizeAndScroll = () => {
|
|
47
|
-
this._updateMinWidth();
|
|
48
|
-
positionsWithFlip(this._popupElement, this.options.optionsCoordinates, this.pluginBus.selectElement.nativeElement, this.options.selectCoordinates, this._document, this.options.flipCallback);
|
|
49
|
-
};
|
|
50
|
-
this._options = extend(true, {}, defaultOptions, options);
|
|
51
|
-
}
|
|
52
|
-
//######################### public properties - implementation of BasicPositioner #########################
|
|
53
|
-
/**
|
|
54
|
-
* Options for NgSelect plugin
|
|
55
|
-
*/
|
|
56
|
-
get options() {
|
|
57
|
-
return this._options;
|
|
58
|
-
}
|
|
59
|
-
set options(options) {
|
|
60
|
-
this._options = extend(true, this._options, options);
|
|
61
|
-
}
|
|
62
|
-
//######################### protected properties #########################
|
|
63
|
-
/**
|
|
64
|
-
* Gets scroll target
|
|
65
|
-
*/
|
|
66
|
-
get scrollTarget() {
|
|
67
|
-
return this._options.scrollTarget || this._scrollTargetSelector.scrollTarget;
|
|
68
|
-
}
|
|
69
|
-
//######################### public methods - implementation of OnDestroy #########################
|
|
70
|
-
/**
|
|
71
|
-
* Called when component is destroyed
|
|
72
|
-
*/
|
|
73
|
-
ngOnDestroy() {
|
|
74
|
-
this._visibilitySubscription?.unsubscribe();
|
|
75
|
-
this._visibilitySubscription = null;
|
|
76
|
-
this._optionsChangeSubscription?.unsubscribe();
|
|
77
|
-
this._optionsChangeSubscription = null;
|
|
78
|
-
if (this._isBrowser) {
|
|
79
|
-
window.removeEventListener('resize', this._handleResizeAndScroll);
|
|
80
|
-
this.scrollTarget?.removeEventListener('scroll', this._handleResizeAndScroll);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//######################### public methods - implementation of BasicPositioner #########################
|
|
84
|
-
/**
|
|
85
|
-
* Initialize plugin, to be ready to use, initialize communication with other plugins
|
|
86
|
-
*/
|
|
87
|
-
initialize() {
|
|
88
|
-
if (this._optionsGatherer && this._optionsGatherer != this.pluginBus?.selectOptions.optionsGatherer) {
|
|
89
|
-
this._optionsChangeSubscription.unsubscribe();
|
|
90
|
-
this._optionsChangeSubscription = null;
|
|
91
|
-
this._optionsGatherer = null;
|
|
92
|
-
}
|
|
93
|
-
if (!this._optionsGatherer) {
|
|
94
|
-
this._optionsGatherer = this.pluginBus?.selectOptions.optionsGatherer;
|
|
95
|
-
this._optionsChangeSubscription = this._optionsGatherer.availableOptionsChange.subscribe(() => {
|
|
96
|
-
if (this._popup.popupElement && this._optionsGatherer.availableOptions) {
|
|
97
|
-
this._handlePosition();
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
const popup = this.ngSelectPlugins[POPUP];
|
|
102
|
-
if (this._popup && this._popup != popup) {
|
|
103
|
-
this._visibilitySubscription.unsubscribe();
|
|
104
|
-
this._visibilitySubscription = null;
|
|
105
|
-
this._popup = null;
|
|
106
|
-
}
|
|
107
|
-
if (!this._popup) {
|
|
108
|
-
this._popup = popup;
|
|
109
|
-
this._visibilitySubscription = this._popup.visibilityChange.subscribe(() => this._handlePosition());
|
|
110
|
-
}
|
|
111
|
-
this._handlePosition();
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Initialize plugin options, all operations required to be done with plugin options are handled here
|
|
115
|
-
*/
|
|
116
|
-
initOptions() {
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Explicitly runs invalidation of content (change detection)
|
|
120
|
-
*/
|
|
121
|
-
invalidateVisuals() {
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Handles position of popup
|
|
125
|
-
*/
|
|
126
|
-
_handlePosition() {
|
|
127
|
-
this._popupElement = this._popup.popupElement;
|
|
128
|
-
//this has meaning only when popup is outside of ng-element
|
|
129
|
-
this._changeDetector.markForCheck();
|
|
130
|
-
if (this._isBrowser) {
|
|
131
|
-
//register events and handle position of opened popup
|
|
132
|
-
if (this._popupElement) {
|
|
133
|
-
if (this._options.activateOnResize) {
|
|
134
|
-
window.addEventListener('resize', this._handleResizeAndScroll);
|
|
135
|
-
}
|
|
136
|
-
if (this._options.activateOnScroll) {
|
|
137
|
-
this.scrollTarget?.addEventListener('scroll', this._handleResizeAndScroll);
|
|
138
|
-
}
|
|
139
|
-
this._handleResizeAndScroll();
|
|
140
|
-
}
|
|
141
|
-
//unregister events
|
|
142
|
-
else {
|
|
143
|
-
window.removeEventListener('resize', this._handleResizeAndScroll);
|
|
144
|
-
this.scrollTarget?.removeEventListener('scroll', this._handleResizeAndScroll);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Updates min width of popup
|
|
150
|
-
*/
|
|
151
|
-
_updateMinWidth() {
|
|
152
|
-
if (!this._popupElement) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const minWidth = this.pluginBus.selectElement.nativeElement.clientWidth;
|
|
156
|
-
if (isNaN(minWidth) || !isNumber(minWidth)) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
this._popupElement.style.minWidth = `${minWidth}px`;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
BasicPositionerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BasicPositionerComponent, 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 }, { token: i2.ScrollTargetSelector }], target: i0.ɵɵFactoryTarget.Component });
|
|
163
|
-
BasicPositionerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: BasicPositionerComponent, selector: "ng-basic-positioner", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: BasicPositionerComponent, decorators: [{
|
|
165
|
-
type: Component,
|
|
166
|
-
args: [{
|
|
167
|
-
selector: 'ng-basic-positioner',
|
|
168
|
-
template: '',
|
|
169
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
170
|
-
}]
|
|
171
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
172
|
-
type: Inject,
|
|
173
|
-
args: [NG_SELECT_PLUGIN_INSTANCES]
|
|
174
|
-
}, {
|
|
175
|
-
type: Optional
|
|
176
|
-
}] }, { type: i1.PluginBus, decorators: [{
|
|
177
|
-
type: Optional
|
|
178
|
-
}] }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
179
|
-
type: Inject,
|
|
180
|
-
args: [POSITIONER_OPTIONS]
|
|
181
|
-
}, {
|
|
182
|
-
type: Optional
|
|
183
|
-
}] }, { type: Document, decorators: [{
|
|
184
|
-
type: Inject,
|
|
185
|
-
args: [DOCUMENT]
|
|
186
|
-
}] }, { type: Object, decorators: [{
|
|
187
|
-
type: Inject,
|
|
188
|
-
args: [PLATFORM_ID]
|
|
189
|
-
}] }, { type: i2.ScrollTargetSelector }]; } });
|
|
190
|
-
//# sourceMappingURL=basicPositioner.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicPositioner.component.js","sourceRoot":"","sources":["../../../../../src/plugins/positioner/basic/basicPositioner.component.ts"],"names":[],"mappings":"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","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, Optional, ElementRef, OnDestroy, PLATFORM_ID, ChangeDetectorRef} from '@angular/core';\nimport {DOCUMENT, isPlatformBrowser} from '@angular/common';\nimport {positionsWithFlip} from '@anglr/common/positions';\nimport {extend, isNumber} from '@jscrpt/common';\nimport {Subscription} from 'rxjs';\n\nimport {BasicPositionerOptions, BasicPositioner} from './basicPositioner.interface';\nimport {NgSelectPlugin, OptionsGatherer} from '../../../misc';\nimport {NgSelectPluginInstances} from '../../../components/select';\nimport {NG_SELECT_PLUGIN_INSTANCES} from '../../../components/select/types';\nimport {POSITIONER_OPTIONS} from '../types';\nimport {Popup} from '../../popup';\nimport {POPUP} from '../../popup/types';\nimport {PluginBus} from '../../../misc/pluginBus/pluginBus';\nimport {ScrollTargetSelector} from './types';\n\n/**\n * Default options for positioner\n * @internal\n */\nconst defaultOptions: BasicPositionerOptions =\n{\n optionsCoordinates: 'top left',\n selectCoordinates: 'bottom left',\n flipCallback: () => {},\n scrollTarget: null,\n activateOnResize: true,\n activateOnScroll: true\n};\n\n/**\n * Component used for positioning popup element, handles resize, scroll and collision with viewport\n */\n@Component(\n{\n selector: 'ng-basic-positioner',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class BasicPositionerComponent implements BasicPositioner, NgSelectPlugin<BasicPositionerOptions>, 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: BasicPositionerOptions;\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 * 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(): BasicPositionerOptions\n {\n return this._options;\n }\n public set options(options: BasicPositionerOptions)\n {\n this._options = extend(true, this._options, options);\n }\n\n //######################### protected properties #########################\n\n /**\n * Gets scroll target\n */\n public get scrollTarget(): EventTarget\n {\n return this._options.scrollTarget || this._scrollTargetSelector.scrollTarget;\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?: BasicPositionerOptions,\n @Inject(DOCUMENT) protected _document?: Document,\n @Inject(PLATFORM_ID) protected _platformId?: Object,\n protected _scrollTargetSelector?: ScrollTargetSelector)\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 if(this._isBrowser)\n {\n window.removeEventListener('resize', this._handleResizeAndScroll);\n this.scrollTarget?.removeEventListener('scroll', this._handleResizeAndScroll);\n }\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 resize and scroll event\n */\n protected _handleResizeAndScroll = () =>\n {\n this._updateMinWidth();\n positionsWithFlip(this._popupElement, this.options.optionsCoordinates, this.pluginBus.selectElement.nativeElement, this.options.selectCoordinates, this._document, this.options.flipCallback);\n };\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._options.activateOnResize)\n {\n window.addEventListener('resize', this._handleResizeAndScroll);\n }\n\n if(this._options.activateOnScroll)\n {\n this.scrollTarget?.addEventListener('scroll', this._handleResizeAndScroll);\n }\n \n this._handleResizeAndScroll();\n }\n //unregister events\n else\n {\n window.removeEventListener('resize', this._handleResizeAndScroll);\n this.scrollTarget?.removeEventListener('scroll', this._handleResizeAndScroll);\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 const 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicPositioner.interface.js","sourceRoot":"","sources":["../../../../../src/plugins/positioner/basic/basicPositioner.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {FlipCallback} from '@anglr/common/positions';\n\nimport {Positioner, PositionerOptions} from '../positioner.interface';\n\n/**\n * Basic positioner options\n */\nexport interface BasicPositionerOptions extends PositionerOptions\n{\n /**\n * Callback that is called when flip occurs during positioning\n */\n flipCallback?: FlipCallback;\n\n /**\n * Target element that is used for handling scroll event\n */\n scrollTarget?: EventTarget;\n\n /**\n * Indication whether positioner should be sensitive/activated also to scroll of scrollTarget\n */\n activateOnScroll?: boolean;\n\n /**\n * Indication whether positioner should be sensitive/activated also on resize of window\n */\n activateOnResize?: boolean;\n}\n\n/**\n * Public API for 'BasicPositionerComponent'\n */\nexport interface BasicPositioner extends Positioner\n{\n}"]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Scroll target selector that is used for obtaining scroll target
|
|
5
|
-
*/
|
|
6
|
-
export class ScrollTargetSelector {
|
|
7
|
-
constructor() {
|
|
8
|
-
//######################### private fields #########################
|
|
9
|
-
/**
|
|
10
|
-
* Callback used for getting scroll target for scrolling
|
|
11
|
-
*/
|
|
12
|
-
this._scrollTargetCallback = () => window;
|
|
13
|
-
}
|
|
14
|
-
//######################### public properties #########################
|
|
15
|
-
/**
|
|
16
|
-
* Gets scroll target that is used for scrolling
|
|
17
|
-
*/
|
|
18
|
-
get scrollTarget() {
|
|
19
|
-
return this._scrollTargetCallback();
|
|
20
|
-
}
|
|
21
|
-
//######################### public methods #########################
|
|
22
|
-
/**
|
|
23
|
-
* Sets callback used for obtaining scroll target
|
|
24
|
-
* @param callback - Callback that is used for obtaining scroll target element
|
|
25
|
-
*/
|
|
26
|
-
setScrollTarget(callback) {
|
|
27
|
-
this._scrollTargetCallback = callback;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
ScrollTargetSelector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ScrollTargetSelector, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
-
ScrollTargetSelector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ScrollTargetSelector, providedIn: 'root' });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ScrollTargetSelector, decorators: [{
|
|
33
|
-
type: Injectable,
|
|
34
|
-
args: [{ providedIn: 'root' }]
|
|
35
|
-
}] });
|
|
36
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/plugins/positioner/basic/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;;AAEzC;;GAEG;AAEH,MAAM,OAAO,oBAAoB;IADjC;QAGI,oEAAoE;QAEpE;;WAEG;QACK,0BAAqB,GAAsB,GAAG,EAAE,CAAC,MAAM,CAAC;KAsBnE;IApBG,uEAAuE;IAEvE;;OAEG;IACH,IAAW,YAAY;QAEnB,OAAO,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACxC,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACI,eAAe,CAAC,QAA2B;QAE9C,IAAI,CAAC,qBAAqB,GAAG,QAAQ,CAAC;IAC1C,CAAC;;iHA5BQ,oBAAoB;qHAApB,oBAAoB,cADR,MAAM;2FAClB,oBAAoB;kBADhC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\n\n/**\n * Scroll target selector that is used for obtaining scroll target\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollTargetSelector\n{\n //######################### private fields #########################\n\n /**\n * Callback used for getting scroll target for scrolling\n */\n private _scrollTargetCallback: () => EventTarget = () => window;\n\n //######################### public properties #########################\n\n /**\n * Gets scroll target that is used for scrolling\n */\n public get scrollTarget(): EventTarget\n {\n return this._scrollTargetCallback();\n }\n\n //######################### public methods #########################\n\n /**\n * Sets callback used for obtaining scroll target\n * @param callback - Callback that is used for obtaining scroll target element\n */\n public setScrollTarget(callback: () => EventTarget)\n {\n this._scrollTargetCallback = callback;\n }\n}"]}
|
package/popperJs/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@anglr/select-popperJs",
|
|
3
|
-
"sideEffects": false,
|
|
4
|
-
"module": "../es2015/popperJs/src/index.js",
|
|
5
|
-
"es2015": "../es2015/popperJs/src/index.js",
|
|
6
|
-
"es2020": "../es2020/popperJs/src/index.js",
|
|
7
|
-
"esm2020": "../es2020/popperJs/src/index.js",
|
|
8
|
-
"typings": "./src/index.d.ts"
|
|
9
|
-
}
|
package/popperJs/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "../plugins/positioner/popperJs/popperJsPositioner.component";
|
|
3
|
-
/**
|
|
4
|
-
* Module for popperjs positioner plugin
|
|
5
|
-
*/
|
|
6
|
-
export declare class PopperJsPositionerModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PopperJsPositionerModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PopperJsPositionerModule, [typeof i1.PopperJsPositionerComponent], never, [typeof i1.PopperJsPositionerComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<PopperJsPositionerModule>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=popperjsPositioner.module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popperjsPositioner.module.d.ts","sourceRoot":"","sources":["popperjsPositioner.module.ts"],"names":[],"mappings":";;AAIA;;GAEG;AACH,qBAWa,wBAAwB;yCAAxB,wBAAwB;0CAAxB,wBAAwB;0CAAxB,wBAAwB;CAEpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { NgSelectPlugin, NgSelectPluginInstances, OptionsGatherer, PluginBus, Popup } from '@anglr/select';
|
|
3
|
-
import type { Instance } from '@popperjs/core';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
5
|
-
import { PopperJsPositioner, PopperJsPositionerOptions } from './popperjsPositioner.interface';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Component used for positioning popup element, using popper js
|
|
9
|
-
*/
|
|
10
|
-
export declare class PopperJsPositionerComponent implements PopperJsPositioner, NgSelectPlugin<PopperJsPositionerOptions>, OnDestroy {
|
|
11
|
-
ngSelectPlugins: NgSelectPluginInstances;
|
|
12
|
-
pluginBus: PluginBus;
|
|
13
|
-
pluginElement: ElementRef;
|
|
14
|
-
protected _changeDetector: ChangeDetectorRef;
|
|
15
|
-
protected _document?: Document;
|
|
16
|
-
protected _platformId?: Object;
|
|
17
|
-
/**
|
|
18
|
-
* Instance of previous options gatherer, that is used for obtaining available options
|
|
19
|
-
*/
|
|
20
|
-
protected _optionsGatherer: OptionsGatherer;
|
|
21
|
-
/**
|
|
22
|
-
* Options for NgSelect plugin
|
|
23
|
-
*/
|
|
24
|
-
protected _options: PopperJsPositionerOptions;
|
|
25
|
-
/**
|
|
26
|
-
* Subscription for visibility change of popup
|
|
27
|
-
*/
|
|
28
|
-
protected _visibilitySubscription: Subscription;
|
|
29
|
-
/**
|
|
30
|
-
* Subscription for changes of options in options gatherer
|
|
31
|
-
*/
|
|
32
|
-
protected _optionsChangeSubscription: Subscription;
|
|
33
|
-
/**
|
|
34
|
-
* Popup that is displayed
|
|
35
|
-
*/
|
|
36
|
-
protected _popup: Popup;
|
|
37
|
-
/**
|
|
38
|
-
* Instance of popper js
|
|
39
|
-
*/
|
|
40
|
-
protected _popperJsInstance: Instance;
|
|
41
|
-
/**
|
|
42
|
-
* Html element of popup plugin
|
|
43
|
-
*/
|
|
44
|
-
protected _popupElement: HTMLElement;
|
|
45
|
-
/**
|
|
46
|
-
* Indication whether is code running in browser
|
|
47
|
-
*/
|
|
48
|
-
protected _isBrowser: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Options for NgSelect plugin
|
|
51
|
-
*/
|
|
52
|
-
get options(): PopperJsPositionerOptions;
|
|
53
|
-
set options(options: PopperJsPositionerOptions);
|
|
54
|
-
constructor(ngSelectPlugins: NgSelectPluginInstances, pluginBus: PluginBus, pluginElement: ElementRef, _changeDetector: ChangeDetectorRef, options?: PopperJsPositionerOptions, _document?: Document, _platformId?: Object);
|
|
55
|
-
/**
|
|
56
|
-
* Called when component is destroyed
|
|
57
|
-
*/
|
|
58
|
-
ngOnDestroy(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Initialize plugin, to be ready to use, initialize communication with other plugins
|
|
61
|
-
*/
|
|
62
|
-
initialize(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Initialize plugin options, all operations required to be done with plugin options are handled here
|
|
65
|
-
*/
|
|
66
|
-
initOptions(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Explicitly runs invalidation of content (change detection)
|
|
69
|
-
*/
|
|
70
|
-
invalidateVisuals(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Handles position of popup
|
|
73
|
-
*/
|
|
74
|
-
protected _handlePosition(): void;
|
|
75
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PopperJsPositionerComponent, [{ optional: true; }, { optional: true; }, null, null, { optional: true; }, null, null]>;
|
|
76
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PopperJsPositionerComponent, "ng-popperjs-positioner", never, {}, {}, never, never>;
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=popperJsPositioner.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popperJsPositioner.component.d.ts","sourceRoot":"","sources":["popperJsPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,UAAU,EAAE,SAAS,EAAe,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAE1I,OAAO,EAAC,cAAc,EAAE,uBAAuB,EAA8B,eAAe,EAAE,SAAS,EAAS,KAAK,EAAqB,MAAM,eAAe,CAAC;AAGhK,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;;AAU7F;;GAEG;AACH,qBAMa,2BAA4B,YAAW,kBAAkB,EAAE,cAAc,CAAC,yBAAyB,CAAC,EAAE,SAAS;IA2DrD,eAAe,EAAE,uBAAuB;IAC5E,SAAS,EAAE,SAAS;IAChC,aAAa,EAAE,UAAU;IAChC,SAAS,CAAC,eAAe,EAAE,iBAAiB;IAE1B,SAAS,CAAC,SAAS,CAAC,EAAE,QAAQ;IAC3B,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM;IA7D/D;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,eAAe,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,uBAAuB,EAAE,YAAY,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,0BAA0B,EAAE,YAAY,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,WAAW,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,OAAO,CAAuC;IAIpE;;OAEG;IACH,IAAW,OAAO,IAAI,yBAAyB,CAG9C;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,yBAAyB,EAGpD;gBAGkE,eAAe,EAAE,uBAAuB,EAC5E,SAAS,EAAE,SAAS,EAChC,aAAa,EAAE,UAAU,EACtB,eAAe,EAAE,iBAAiB,EACJ,OAAO,CAAC,EAAE,yBAAyB,EAC/C,SAAS,CAAC,EAAE,QAAQ,EACjB,WAAW,CAAC,EAAE,MAAM;IAO/D;;OAEG;IACI,WAAW;IAclB;;OAEG;IACI,UAAU;IA2CjB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAMhC;;OAEG;IACH,SAAS,CAAC,eAAe;yCA1JhB,2BAA2B;2CAA3B,2BAA2B;CA+MvC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Positioner } from '@anglr/select';
|
|
2
|
-
/**
|
|
3
|
-
* Popper js positioner options
|
|
4
|
-
*/
|
|
5
|
-
export interface PopperJsPositionerOptions {
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Public API for 'PopperJsPositionerComponent'
|
|
9
|
-
*/
|
|
10
|
-
export interface PopperJsPositioner extends Positioner {
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=popperjsPositioner.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popperjsPositioner.interface.d.ts","sourceRoot":"","sources":["popperjsPositioner.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,yBAAyB;CAEzC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;CAErD"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { BasicPositionerOptions, BasicPositioner } from './basicPositioner.interface';
|
|
4
|
-
import { NgSelectPlugin, OptionsGatherer } from '../../../misc';
|
|
5
|
-
import { NgSelectPluginInstances } from '../../../components/select';
|
|
6
|
-
import { Popup } from '../../popup';
|
|
7
|
-
import { PluginBus } from '../../../misc/pluginBus/pluginBus';
|
|
8
|
-
import { ScrollTargetSelector } from './types';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* Component used for positioning popup element, handles resize, scroll and collision with viewport
|
|
12
|
-
*/
|
|
13
|
-
export declare class BasicPositionerComponent implements BasicPositioner, NgSelectPlugin<BasicPositionerOptions>, OnDestroy {
|
|
14
|
-
ngSelectPlugins: NgSelectPluginInstances;
|
|
15
|
-
pluginBus: PluginBus;
|
|
16
|
-
pluginElement: ElementRef;
|
|
17
|
-
protected _changeDetector: ChangeDetectorRef;
|
|
18
|
-
protected _document?: Document;
|
|
19
|
-
protected _platformId?: Object;
|
|
20
|
-
protected _scrollTargetSelector?: ScrollTargetSelector;
|
|
21
|
-
/**
|
|
22
|
-
* Instance of previous options gatherer, that is used for obtaining available options
|
|
23
|
-
*/
|
|
24
|
-
protected _optionsGatherer: OptionsGatherer;
|
|
25
|
-
/**
|
|
26
|
-
* Options for NgSelect plugin
|
|
27
|
-
*/
|
|
28
|
-
protected _options: BasicPositionerOptions;
|
|
29
|
-
/**
|
|
30
|
-
* Subscription for visibility change of popup
|
|
31
|
-
*/
|
|
32
|
-
protected _visibilitySubscription: Subscription;
|
|
33
|
-
/**
|
|
34
|
-
* Subscription for changes of options in options gatherer
|
|
35
|
-
*/
|
|
36
|
-
protected _optionsChangeSubscription: Subscription;
|
|
37
|
-
/**
|
|
38
|
-
* Popup that is displayed
|
|
39
|
-
*/
|
|
40
|
-
protected _popup: Popup;
|
|
41
|
-
/**
|
|
42
|
-
* Html element of popup plugin
|
|
43
|
-
*/
|
|
44
|
-
protected _popupElement: HTMLElement;
|
|
45
|
-
/**
|
|
46
|
-
* Indication whether is code running in browser
|
|
47
|
-
*/
|
|
48
|
-
protected _isBrowser: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Options for NgSelect plugin
|
|
51
|
-
*/
|
|
52
|
-
get options(): BasicPositionerOptions;
|
|
53
|
-
set options(options: BasicPositionerOptions);
|
|
54
|
-
/**
|
|
55
|
-
* Gets scroll target
|
|
56
|
-
*/
|
|
57
|
-
get scrollTarget(): EventTarget;
|
|
58
|
-
constructor(ngSelectPlugins: NgSelectPluginInstances, pluginBus: PluginBus, pluginElement: ElementRef, _changeDetector: ChangeDetectorRef, options?: BasicPositionerOptions, _document?: Document, _platformId?: Object, _scrollTargetSelector?: ScrollTargetSelector);
|
|
59
|
-
/**
|
|
60
|
-
* Called when component is destroyed
|
|
61
|
-
*/
|
|
62
|
-
ngOnDestroy(): void;
|
|
63
|
-
/**
|
|
64
|
-
* Initialize plugin, to be ready to use, initialize communication with other plugins
|
|
65
|
-
*/
|
|
66
|
-
initialize(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Initialize plugin options, all operations required to be done with plugin options are handled here
|
|
69
|
-
*/
|
|
70
|
-
initOptions(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Explicitly runs invalidation of content (change detection)
|
|
73
|
-
*/
|
|
74
|
-
invalidateVisuals(): void;
|
|
75
|
-
/**
|
|
76
|
-
* Handles resize and scroll event
|
|
77
|
-
*/
|
|
78
|
-
protected _handleResizeAndScroll: () => void;
|
|
79
|
-
/**
|
|
80
|
-
* Handles position of popup
|
|
81
|
-
*/
|
|
82
|
-
protected _handlePosition(): void;
|
|
83
|
-
/**
|
|
84
|
-
* Updates min width of popup
|
|
85
|
-
*/
|
|
86
|
-
protected _updateMinWidth(): void;
|
|
87
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BasicPositionerComponent, [{ optional: true; }, { optional: true; }, null, null, { optional: true; }, null, null, null]>;
|
|
88
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BasicPositionerComponent, "ng-basic-positioner", never, {}, {}, never, never>;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=basicPositioner.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicPositioner.component.d.ts","sourceRoot":"","sources":["basicPositioner.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuD,UAAU,EAAE,SAAS,EAAe,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAI1I,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,sBAAsB,EAAE,eAAe,EAAC,MAAM,6BAA6B,CAAC;AACpF,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,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;;AAgB7C;;GAEG;AACH,qBAMa,wBAAyB,YAAW,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAAC,EAAE,SAAS;IAgE5C,eAAe,EAAE,uBAAuB;IAC5E,SAAS,EAAE,SAAS;IAChC,aAAa,EAAE,UAAU;IAChC,SAAS,CAAC,eAAe,EAAE,iBAAiB;IAE1B,SAAS,CAAC,SAAS,CAAC,EAAE,QAAQ;IAC3B,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM;IACnD,SAAS,CAAC,qBAAqB,CAAC,EAAE,oBAAoB;IAnElE;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,eAAe,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAE3C;;OAEG;IACH,SAAS,CAAC,uBAAuB,EAAE,YAAY,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,0BAA0B,EAAE,YAAY,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,WAAW,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,OAAO,CAAuC;IAIpE;;OAEG;IACH,IAAW,OAAO,IAAI,sBAAsB,CAG3C;IACD,IAAW,OAAO,CAAC,OAAO,EAAE,sBAAsB,EAGjD;IAID;;OAEG;IACH,IAAW,YAAY,IAAI,WAAW,CAGrC;gBAGkE,eAAe,EAAE,uBAAuB,EAC5E,SAAS,EAAE,SAAS,EAChC,aAAa,EAAE,UAAU,EACtB,eAAe,EAAE,iBAAiB,EACJ,OAAO,CAAC,EAAE,sBAAsB,EAC5C,SAAS,CAAC,EAAE,QAAQ,EACjB,WAAW,CAAC,EAAE,MAAM,EACzC,qBAAqB,CAAC,EAAE,oBAAoB;IAOlE;;OAEG;IACI,WAAW;IAiBlB;;OAEG;IACI,UAAU;IA2CjB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAMhC;;OAEG;IACH,SAAS,CAAC,sBAAsB,aAI9B;IAEF;;OAEG;IACH,SAAS,CAAC,eAAe;IAiCzB;;OAEG;IACH,SAAS,CAAC,eAAe;yCAhNhB,wBAAwB;2CAAxB,wBAAwB;CAgOpC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { FlipCallback } from '@anglr/common/positions';
|
|
2
|
-
import { Positioner, PositionerOptions } from '../positioner.interface';
|
|
3
|
-
/**
|
|
4
|
-
* Basic positioner options
|
|
5
|
-
*/
|
|
6
|
-
export interface BasicPositionerOptions extends PositionerOptions {
|
|
7
|
-
/**
|
|
8
|
-
* Callback that is called when flip occurs during positioning
|
|
9
|
-
*/
|
|
10
|
-
flipCallback?: FlipCallback;
|
|
11
|
-
/**
|
|
12
|
-
* Target element that is used for handling scroll event
|
|
13
|
-
*/
|
|
14
|
-
scrollTarget?: EventTarget;
|
|
15
|
-
/**
|
|
16
|
-
* Indication whether positioner should be sensitive/activated also to scroll of scrollTarget
|
|
17
|
-
*/
|
|
18
|
-
activateOnScroll?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Indication whether positioner should be sensitive/activated also on resize of window
|
|
21
|
-
*/
|
|
22
|
-
activateOnResize?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Public API for 'BasicPositionerComponent'
|
|
26
|
-
*/
|
|
27
|
-
export interface BasicPositioner extends Positioner {
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=basicPositioner.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicPositioner.interface.d.ts","sourceRoot":"","sources":["basicPositioner.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAC,UAAU,EAAE,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAE7D;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;IAE3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;CAElD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Scroll target selector that is used for obtaining scroll target
|
|
4
|
-
*/
|
|
5
|
-
export declare class ScrollTargetSelector {
|
|
6
|
-
/**
|
|
7
|
-
* Callback used for getting scroll target for scrolling
|
|
8
|
-
*/
|
|
9
|
-
private _scrollTargetCallback;
|
|
10
|
-
/**
|
|
11
|
-
* Gets scroll target that is used for scrolling
|
|
12
|
-
*/
|
|
13
|
-
get scrollTarget(): EventTarget;
|
|
14
|
-
/**
|
|
15
|
-
* Sets callback used for obtaining scroll target
|
|
16
|
-
* @param callback - Callback that is used for obtaining scroll target element
|
|
17
|
-
*/
|
|
18
|
-
setScrollTarget(callback: () => EventTarget): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollTargetSelector, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollTargetSelector>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,qBACa,oBAAoB;IAI7B;;OAEG;IACH,OAAO,CAAC,qBAAqB,CAAmC;IAIhE;;OAEG;IACH,IAAW,YAAY,IAAI,WAAW,CAGrC;IAID;;;OAGG;IACI,eAAe,CAAC,QAAQ,EAAE,MAAM,WAAW;yCAzBzC,oBAAoB;6CAApB,oBAAoB;CA6BhC"}
|