@anglr/common 11.2.0-beta.20220228151413 → 11.2.0-beta.20220301064829
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 +31 -0
- package/es2015/floating-ui/src/index.js +2 -0
- package/es2015/floating-ui/src/index.js.map +1 -0
- package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +196 -0
- package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -0
- package/es2015/floating-ui/src/services/index.js +2 -0
- package/es2015/floating-ui/src/services/index.js.map +1 -0
- package/es2015/src/index.js +1 -1
- package/es2015/src/index.js.map +1 -1
- package/es2015/src/services/position/index.js +4 -0
- package/es2015/src/services/position/index.js.map +1 -0
- package/es2015/src/services/position/position.interface.js +2 -0
- package/es2015/src/services/position/position.interface.js.map +1 -0
- package/es2015/src/services/position/position.types.js +85 -0
- package/es2015/src/services/position/position.types.js.map +1 -0
- package/es2015/src/services/position/position.utils.js +12 -0
- package/es2015/src/services/position/position.utils.js.map +1 -0
- package/es2015/src/types/tokens.js +2 -2
- package/es2015/src/types/tokens.js.map +1 -1
- package/es2020/floating-ui/src/index.js +2 -0
- package/es2020/floating-ui/src/index.js.map +1 -0
- package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +193 -0
- package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -0
- package/es2020/floating-ui/src/services/index.js +2 -0
- package/es2020/floating-ui/src/services/index.js.map +1 -0
- package/es2020/src/index.js +1 -1
- package/es2020/src/index.js.map +1 -1
- package/es2020/src/services/position/index.js +4 -0
- package/es2020/src/services/position/index.js.map +1 -0
- package/es2020/src/services/position/position.interface.js +2 -0
- package/es2020/src/services/position/position.interface.js.map +1 -0
- package/es2020/src/services/position/position.types.js +85 -0
- package/es2020/src/services/position/position.types.js.map +1 -0
- package/es2020/src/services/position/position.utils.js +12 -0
- package/es2020/src/services/position/position.utils.js.map +1 -0
- package/es2020/src/types/tokens.js +2 -2
- package/es2020/src/types/tokens.js.map +1 -1
- package/floating-ui/package.json +9 -0
- package/floating-ui/src/index.d.ts +2 -0
- package/{src/services/alignment → floating-ui/src}/index.d.ts.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +37 -0
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -0
- package/floating-ui/src/services/index.d.ts +2 -0
- package/floating-ui/src/services/index.d.ts.map +1 -0
- package/package.json +17 -3
- package/src/index.d.ts +1 -1
- package/src/index.d.ts.map +1 -1
- package/src/services/position/index.d.ts +4 -0
- package/src/services/position/index.d.ts.map +1 -0
- package/src/services/position/position.interface.d.ts +81 -0
- package/src/services/position/position.interface.d.ts.map +1 -0
- package/src/services/position/position.types.d.ts +83 -0
- package/src/services/position/position.types.d.ts.map +1 -0
- package/src/services/position/position.utils.d.ts +7 -0
- package/src/services/position/position.utils.d.ts.map +1 -0
- package/src/types/tokens.d.ts +3 -3
- package/src/types/tokens.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2015/src/services/alignment/alignment.interface.js +0 -2
- package/es2015/src/services/alignment/alignment.interface.js.map +0 -1
- package/es2015/src/services/alignment/index.js +0 -2
- package/es2015/src/services/alignment/index.js.map +0 -1
- package/es2020/src/services/alignment/alignment.interface.js +0 -2
- package/es2020/src/services/alignment/alignment.interface.js.map +0 -1
- package/es2020/src/services/alignment/index.js +0 -2
- package/es2020/src/services/alignment/index.js.map +0 -1
- package/src/services/alignment/alignment.interface.d.ts +0 -6
- package/src/services/alignment/alignment.interface.d.ts.map +0 -1
- package/src/services/alignment/index.d.ts +0 -2
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PositionOffset, PositionPlacement } from './position.types';
|
|
2
|
+
/**
|
|
3
|
+
* Options for autoupdate specific functionality
|
|
4
|
+
*/
|
|
5
|
+
export interface AutoUpdateOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Indication whether update position when ancestor scroll changes
|
|
8
|
+
*/
|
|
9
|
+
ancestorScroll: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Indication whether update position when ancestor size changes
|
|
12
|
+
*/
|
|
13
|
+
ancestorResize: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Indication whether update position when target element changes size
|
|
16
|
+
*/
|
|
17
|
+
elementResize: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Options that are passed to position service
|
|
21
|
+
*/
|
|
22
|
+
export interface PositionOptions {
|
|
23
|
+
/**
|
|
24
|
+
* Placement of target element against source element
|
|
25
|
+
*/
|
|
26
|
+
placement: PositionPlacement;
|
|
27
|
+
/**
|
|
28
|
+
* Offset which allows moving target element along the cross axis of placement
|
|
29
|
+
*/
|
|
30
|
+
offset: PositionOffset;
|
|
31
|
+
/**
|
|
32
|
+
* Indication whether perform flip in case of collision (with view boundaries)
|
|
33
|
+
*/
|
|
34
|
+
flip: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Indication whether set up 'auto updating' of position
|
|
37
|
+
*/
|
|
38
|
+
autoUpdate: boolean | AutoUpdateOptions;
|
|
39
|
+
/**
|
|
40
|
+
* Function that is called when auto updated is called for processing result
|
|
41
|
+
*/
|
|
42
|
+
autoUpdateProcessor?: (result: PositionResult) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Mouse event that occured when positioning was called
|
|
45
|
+
*/
|
|
46
|
+
mouseEvent?: MouseEvent;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Result of positioning process, storing new coordinates
|
|
50
|
+
*/
|
|
51
|
+
export interface PositionResult<TElement extends Element = any> {
|
|
52
|
+
/**
|
|
53
|
+
* Target element to be positioned
|
|
54
|
+
*/
|
|
55
|
+
target: TElement;
|
|
56
|
+
/**
|
|
57
|
+
* X coordinate of position of target
|
|
58
|
+
*/
|
|
59
|
+
x: number;
|
|
60
|
+
/**
|
|
61
|
+
* Y coordinate of position of target
|
|
62
|
+
*/
|
|
63
|
+
y: number;
|
|
64
|
+
/**
|
|
65
|
+
* Disposes instance of engine used for positioning
|
|
66
|
+
*/
|
|
67
|
+
dispose(): void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Service that is used for positioning two elements against each other
|
|
71
|
+
*/
|
|
72
|
+
export interface Position {
|
|
73
|
+
/**
|
|
74
|
+
* Places target element relatively to source element according options and returns result storing information about new position
|
|
75
|
+
* @param target - Target element to be placed
|
|
76
|
+
* @param source - Source element to be placed against
|
|
77
|
+
* @param options - Optional options with informations about new position
|
|
78
|
+
*/
|
|
79
|
+
placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=position.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.interface.d.ts","sourceRoot":"","sources":["position.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAI5B;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,OAAO,GAAC,iBAAiB,CAAC;IAEtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAEvD;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,QAAQ,SAAS,OAAO,GAAG,GAAG;IAE1D;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IAIrB;;;;;OAKG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC/G"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available positions for placement of target element against its source
|
|
3
|
+
*/
|
|
4
|
+
export declare enum PositionPlacement {
|
|
5
|
+
/**
|
|
6
|
+
* Target is placed on the top (above) of source element in the middle of its width
|
|
7
|
+
*/
|
|
8
|
+
Top = 0,
|
|
9
|
+
/**
|
|
10
|
+
* Target is placed on the top (above) of source element at the start (left) of its width
|
|
11
|
+
*/
|
|
12
|
+
TopStart = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Target is placed on the top (above) of source element at the end (right) of its width
|
|
15
|
+
*/
|
|
16
|
+
TopEnd = 2,
|
|
17
|
+
/**
|
|
18
|
+
* Target is placed on the left (before) of source element in the middle of its height
|
|
19
|
+
*/
|
|
20
|
+
Left = 3,
|
|
21
|
+
/**
|
|
22
|
+
* Target is placed on the left (before) of source element at the start (top) of its height
|
|
23
|
+
*/
|
|
24
|
+
LeftStart = 4,
|
|
25
|
+
/**
|
|
26
|
+
* Target is placed on the left (before) of source element at the end (bottom) of its height
|
|
27
|
+
*/
|
|
28
|
+
LeftEnd = 5,
|
|
29
|
+
/**
|
|
30
|
+
* Target is placed on the right (after) of source element in the middle of its height
|
|
31
|
+
*/
|
|
32
|
+
Right = 6,
|
|
33
|
+
/**
|
|
34
|
+
* Target is placed on the right (after) of source element at the start (top) of its height
|
|
35
|
+
*/
|
|
36
|
+
RightStart = 7,
|
|
37
|
+
/**
|
|
38
|
+
* Target is placed on the right (after) of source element at the end (bottom) of its height
|
|
39
|
+
*/
|
|
40
|
+
RightEnd = 8,
|
|
41
|
+
/**
|
|
42
|
+
* Target is placed on the bottom (below) of source element in the middle of its width
|
|
43
|
+
*/
|
|
44
|
+
Bottom = 9,
|
|
45
|
+
/**
|
|
46
|
+
* Target is placed on the bottom (below) of source element at the start (left) of its width
|
|
47
|
+
*/
|
|
48
|
+
BottomStart = 10,
|
|
49
|
+
/**
|
|
50
|
+
* Target is placed on the bottom (below) of source element at the end (right) of its width
|
|
51
|
+
*/
|
|
52
|
+
BottomEnd = 11
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Applied offset to position of target in cross axis relative to placement
|
|
56
|
+
*/
|
|
57
|
+
export declare enum PositionOffset {
|
|
58
|
+
/**
|
|
59
|
+
* No offset applied
|
|
60
|
+
*/
|
|
61
|
+
None = 0,
|
|
62
|
+
/**
|
|
63
|
+
* Offset is calculated at the point where mouse enters source element
|
|
64
|
+
*/
|
|
65
|
+
MouseEnter = 1,
|
|
66
|
+
/**
|
|
67
|
+
* Positive offset equal to half of size of target
|
|
68
|
+
*/
|
|
69
|
+
Half = 2,
|
|
70
|
+
/**
|
|
71
|
+
* Negative offset equal to half of size of target
|
|
72
|
+
*/
|
|
73
|
+
NegativeHalf = 3,
|
|
74
|
+
/**
|
|
75
|
+
* Positive offset equal to full size of target
|
|
76
|
+
*/
|
|
77
|
+
Full = 4,
|
|
78
|
+
/**
|
|
79
|
+
* Negative offset equal to full size of target
|
|
80
|
+
*/
|
|
81
|
+
NegativeFull = 5
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=position.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.types.d.ts","sourceRoot":"","sources":["position.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,iBAAiB;IAEzB;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,KAAK,IAAA;IAEL;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,WAAW,KAAA;IAEX;;OAEG;IACH,SAAS,KAAA;CACZ;AAED;;GAEG;AACH,oBAAY,cAAc;IAEtB;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,YAAY,IAAA;IAEZ;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,YAAY,IAAA;CACf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PositionResult } from './position.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Applies `PositionResult` to target element
|
|
4
|
+
* @param result - Result of positioning process to be applied
|
|
5
|
+
*/
|
|
6
|
+
export declare function applyPositionResult(result: PositionResult<HTMLElement>): void;
|
|
7
|
+
//# sourceMappingURL=position.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.utils.d.ts","sourceRoot":"","sources":["position.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAQ7E"}
|
package/src/types/tokens.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { PermanentStorage } from '../services/permanentStorage';
|
|
|
5
5
|
import { Logger } from '../services/logger';
|
|
6
6
|
import { TemporaryStorage } from '../services/temporaryStorage';
|
|
7
7
|
import { Notifications } from '../services/notifications';
|
|
8
|
-
import {
|
|
8
|
+
import { Position } from '../services/position';
|
|
9
9
|
/**
|
|
10
10
|
* Base url when using HTTP (example: http://localhost:8888/)
|
|
11
11
|
*/
|
|
@@ -35,9 +35,9 @@ export declare const PERMANENT_STORAGE: InjectionToken<PermanentStorage>;
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const TEMPORARY_STORAGE: InjectionToken<TemporaryStorage>;
|
|
37
37
|
/**
|
|
38
|
-
* Token used for injecting service that is used for
|
|
38
|
+
* Token used for injecting service that is used for positioning of one element against another
|
|
39
39
|
*/
|
|
40
|
-
export declare const
|
|
40
|
+
export declare const POSITION: InjectionToken<Position>;
|
|
41
41
|
/**
|
|
42
42
|
* Token used for injecting notifications service implementation
|
|
43
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAC,kBAAkB,EAA8B,MAAM,gCAAgC,CAAC;AAC/F,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAgC,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAC,kBAAkB,EAA8B,MAAM,gCAAgC,CAAC;AAC/F,OAAO,EAAC,gBAAg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|
|
|
1
|
-
{"version":3,"file":"alignment.interface.js","sourceRoot":"","sources":["../../../../src/services/alignment/alignment.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Allows absolute alignment (AKA positioning) of one element to another\n */\nexport interface Alignment\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/alignment/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './alignment.interface';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.interface.js","sourceRoot":"","sources":["../../../../src/services/alignment/alignment.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Allows absolute alignment (AKA positioning) of one element to another\n */\nexport interface Alignment\n{\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/alignment/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './alignment.interface';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.interface.d.ts","sourceRoot":"","sources":["alignment.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;CAEzB"}
|