@anglr/common 11.2.0-beta.20220228151413 → 11.2.0-beta.20220228163820
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 +27 -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 +111 -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 +108 -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 +17 -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 +9 -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
package/changelog.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Version 11.2.0 (2022-02-28)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- added new **Position**
|
|
8
|
+
- new `Position` interface, that represents service that is used for positioning two elements against each other
|
|
9
|
+
- new `PositionOptions` interface, that represents options that are passed to position service
|
|
10
|
+
- property `placement` placement of target element against source element
|
|
11
|
+
- property `offset` offset which allows moving target element along the cross axis of placement
|
|
12
|
+
- property `flip` indication whether perform flip in case of collision (with view boundaries)
|
|
13
|
+
- property `autoUpdate` indication whether set up 'auto updating' of position
|
|
14
|
+
- method `autoUpdateProcessor` function that is called when auto updated is called for processing result
|
|
15
|
+
- property `mouseEvent` mouse event that occured when positioning was called
|
|
16
|
+
- new `PositionResult` interface, that represents result of positioning process, storing new coordinates
|
|
17
|
+
- property `target` target element to be positioned
|
|
18
|
+
- property `x` X coordinate of position of target
|
|
19
|
+
- property `y` Y coordinate of position of target
|
|
20
|
+
- method `dispose` disposes instance of engine used for positioning
|
|
21
|
+
- new `AutoUpdateOptions` interface, that represents options for autoupdate specific functionality
|
|
22
|
+
- property `ancestorScroll` indication whether update position when ancestor scroll changes
|
|
23
|
+
- property `ancestorResize` indication whether update position when ancestor size changes
|
|
24
|
+
- property `elementResize` indication whether update position when target element changes size
|
|
25
|
+
- new `applyPositionResult` function, that applies `PositionResult` to target element
|
|
26
|
+
- new `PositionPlacement` enum with available positions for placement of target element against its source
|
|
27
|
+
- new `PositionOffset` enum with applied offset to position of target in cross axis relative to placement
|
|
28
|
+
- new `POSITION` *Injection Token* used for injecting service that is used for positioning of one element against another
|
|
29
|
+
|
|
3
30
|
## Version 11.1.0 (2022-02-22)
|
|
4
31
|
|
|
5
32
|
### Features
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../floating-ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC","sourcesContent":["export * from './services';\n"]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { PositionOffset, PositionPlacement } from '@anglr/common';
|
|
3
|
+
import { extend } from '@jscrpt/common';
|
|
4
|
+
import { computePosition, autoUpdate } from '@floating-ui/dom';
|
|
5
|
+
/**
|
|
6
|
+
* Default options for `FloatingUiDomPosition` implementation
|
|
7
|
+
*/
|
|
8
|
+
const defaultOptions = {
|
|
9
|
+
autoUpdate: false,
|
|
10
|
+
flip: false,
|
|
11
|
+
offset: PositionOffset.None,
|
|
12
|
+
placement: PositionPlacement.Top
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Service that is used for positioning two elements against each other, using floating-ui dom implementation
|
|
16
|
+
*/
|
|
17
|
+
export class FloatingUiDomPosition {
|
|
18
|
+
//######################### public methods - implementation of Position #########################
|
|
19
|
+
/**
|
|
20
|
+
* @inheritdoc
|
|
21
|
+
*/
|
|
22
|
+
placeElement(target, source, options) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const computedOptions = extend({}, defaultOptions, options);
|
|
25
|
+
const runComputation = () => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const result = yield computePosition(source, target, {
|
|
27
|
+
placement: this._getPlacement(computedOptions)
|
|
28
|
+
});
|
|
29
|
+
if (computedOptions.autoUpdate && computedOptions.autoUpdateProcessor) {
|
|
30
|
+
computedOptions.autoUpdateProcessor({
|
|
31
|
+
target,
|
|
32
|
+
dispose: () => { },
|
|
33
|
+
x: result.x,
|
|
34
|
+
y: result.y
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
});
|
|
39
|
+
const result = yield runComputation();
|
|
40
|
+
let dispose = () => { };
|
|
41
|
+
if (computedOptions.autoUpdate) {
|
|
42
|
+
dispose = autoUpdate(source, target, runComputation);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
target,
|
|
46
|
+
dispose,
|
|
47
|
+
x: result.x,
|
|
48
|
+
y: result.y
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//######################### protected methods #########################
|
|
53
|
+
/**
|
|
54
|
+
* Gets floating ui placement from position placement
|
|
55
|
+
* @param options - Options containing position placement
|
|
56
|
+
*/
|
|
57
|
+
_getPlacement(options) {
|
|
58
|
+
switch (options.placement) {
|
|
59
|
+
default:
|
|
60
|
+
// case PositionPlacement.Top:
|
|
61
|
+
{
|
|
62
|
+
return 'bottom';
|
|
63
|
+
}
|
|
64
|
+
case PositionPlacement.TopStart:
|
|
65
|
+
{
|
|
66
|
+
return 'top-start';
|
|
67
|
+
}
|
|
68
|
+
case PositionPlacement.TopEnd:
|
|
69
|
+
{
|
|
70
|
+
return 'top-end';
|
|
71
|
+
}
|
|
72
|
+
case PositionPlacement.Bottom:
|
|
73
|
+
{
|
|
74
|
+
return 'bottom';
|
|
75
|
+
}
|
|
76
|
+
case PositionPlacement.BottomStart:
|
|
77
|
+
{
|
|
78
|
+
return 'bottom-start';
|
|
79
|
+
}
|
|
80
|
+
case PositionPlacement.BottomEnd:
|
|
81
|
+
{
|
|
82
|
+
return 'bottom-end';
|
|
83
|
+
}
|
|
84
|
+
case PositionPlacement.Left:
|
|
85
|
+
{
|
|
86
|
+
return 'left';
|
|
87
|
+
}
|
|
88
|
+
case PositionPlacement.LeftStart:
|
|
89
|
+
{
|
|
90
|
+
return 'left-start';
|
|
91
|
+
}
|
|
92
|
+
case PositionPlacement.LeftEnd:
|
|
93
|
+
{
|
|
94
|
+
return 'left-end';
|
|
95
|
+
}
|
|
96
|
+
case PositionPlacement.Right:
|
|
97
|
+
{
|
|
98
|
+
return 'right';
|
|
99
|
+
}
|
|
100
|
+
case PositionPlacement.RightStart:
|
|
101
|
+
{
|
|
102
|
+
return 'right-start';
|
|
103
|
+
}
|
|
104
|
+
case PositionPlacement.RightEnd:
|
|
105
|
+
{
|
|
106
|
+
return 'right-end';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=floatingUiDomPosition.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service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AE,cAAc,CAAC,CAAC;aACvE;YAED,OAAO;gBACH,MAAM;gBACN,OAAO;gBACP,CAAC,EAAE,MAAM,CAAC,CAAC;gBACX,CAAC,EAAE,MAAM,CAAC,CAAC;aACd,CAAC;QACN,CAAC;KAAA;IAED,uEAAuE;IAEvE;;;OAGG;IACO,aAAa,CAAC,OAAwB;QAE5C,QAAO,OAAO,CAAC,SAAS,EACxB;YACI;gBACA,8BAA8B;gBAC9B;oBACI,OAAO,QAAQ,CAAC;iBACnB;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B;oBACI,OAAO,WAAW,CAAC;iBACtB;YACD,KAAK,iBAAiB,CAAC,MAAM;gBAC7B;oBACI,OAAO,SAAS,CAAC;iBACpB;YACD,KAAK,iBAAiB,CAAC,MAAM;gBAC7B;oBACI,OAAO,QAAQ,CAAC;iBACnB;YACD,KAAK,iBAAiB,CAAC,WAAW;gBAClC;oBACI,OAAO,cAAc,CAAC;iBACzB;YACD,KAAK,iBAAiB,CAAC,SAAS;gBAChC;oBACI,OAAO,YAAY,CAAC;iBACvB;YACD,KAAK,iBAAiB,CAAC,IAAI;gBAC3B;oBACI,OAAO,MAAM,CAAC;iBACjB;YACD,KAAK,iBAAiB,CAAC,SAAS;gBAChC;oBACI,OAAO,YAAY,CAAC;iBACvB;YACD,KAAK,iBAAiB,CAAC,OAAO;gBAC9B;oBACI,OAAO,UAAU,CAAC;iBACrB;YACD,KAAK,iBAAiB,CAAC,KAAK;gBAC5B;oBACI,OAAO,OAAO,CAAC;iBAClB;YACD,KAAK,iBAAiB,CAAC,UAAU;gBACjC;oBACI,OAAO,aAAa,CAAC;iBACxB;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B;oBACI,OAAO,WAAW,CAAC;iBACtB;SACJ;IACL,CAAC;CACJ","sourcesContent":["import {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement} from '@anglr/common';\nimport {extend} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate} from '@floating-ui/dom';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\n{\n autoUpdate: false,\n flip: false,\n offset: PositionOffset.None,\n placement: PositionPlacement.Top\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public async placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>\n {\n const computedOptions = extend({}, defaultOptions, options);\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions)\n });\n\n if(computedOptions.autoUpdate && computedOptions.autoUpdateProcessor)\n {\n computedOptions.autoUpdateProcessor(\n {\n target,\n dispose: () => {},\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n\n const result = await runComputation();\n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n dispose = autoUpdate(source, target as HTMLElement, runComputation);\n }\n\n return {\n target,\n dispose,\n x: result.x,\n y: result.y\n };\n }\n\n //######################### protected methods #########################\n\n /**\n * Gets floating ui placement from position placement\n * @param options - Options containing position placement\n */\n protected _getPlacement(options: PositionOptions): Placement\n {\n switch(options.placement)\n {\n default:\n // case PositionPlacement.Top:\n {\n return 'bottom';\n }\n case PositionPlacement.TopStart:\n {\n return 'top-start';\n }\n case PositionPlacement.TopEnd:\n {\n return 'top-end';\n }\n case PositionPlacement.Bottom:\n {\n return 'bottom';\n }\n case PositionPlacement.BottomStart:\n {\n return 'bottom-start';\n }\n case PositionPlacement.BottomEnd:\n {\n return 'bottom-end';\n }\n case PositionPlacement.Left:\n {\n return 'left';\n }\n case PositionPlacement.LeftStart:\n {\n return 'left-start';\n }\n case PositionPlacement.LeftEnd:\n {\n return 'left-end';\n }\n case PositionPlacement.Right:\n {\n return 'right';\n }\n case PositionPlacement.RightStart:\n {\n return 'right-start';\n }\n case PositionPlacement.RightEnd:\n {\n return 'right-end';\n }\n }\n }\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './floatingUiDomPosition.service';\n"]}
|
package/es2015/src/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { NgComponentOutletEx } from './directives/ngComponentOutletEx/ngComponen
|
|
|
30
30
|
export { APP_STABLE, extractAppStableResolve, runWhenModuleStable } from './utils';
|
|
31
31
|
export { PROGRESS_INTERCEPTOR_PROVIDER, ProgressInterceptor } from './modules/progressIndicator/interceptors/progressInterceptor';
|
|
32
32
|
export { DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, NotificationsOptions } from './services/notifications';
|
|
33
|
-
export * from './services/
|
|
33
|
+
export * from './services/position';
|
|
34
34
|
//TODO: any to unknown
|
|
35
35
|
//TODO: strict null checks
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
package/es2015/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAC,wBAAwB,EAAC,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAC,0BAA0B,EAAC,MAAM,sFAAsF,CAAC;AAChI,OAAO,EAAC,uBAAuB,EAAC,MAAM,8DAA8D,CAAC;AACrG,OAAO,EAAC,wBAAwB,EAAC,MAAM,gEAAgE,CAAC;AACxG,OAAO,EAAC,6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C;AAC5F,OAAO,EAAC,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAC,2BAA2B,EAAqB,MAAM,+BAA+B,CAAC;AAE9F,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACjF,OAAO,EAAC,6BAA6B,EAAE,mBAAmB,EAAC,MAAM,8DAA8D,CAAC;AAChI,OAAO,EAAC,qBAAqB,EAAE,2BAA2B,EAAE,YAAY,EAAE,oBAAoB,EAAiB,oBAAoB,EAAuF,MAAM,0BAA0B,CAAC;AAC3P,cAAc,qBAAqB,CAAC;AAEpC,sBAAsB;AACtB,0BAA0B","sourcesContent":["export {GlobalizationService} from './services/globalization/globalization.service';\nexport {CommonDynamicModule} from './modules/commonDynamic.module';\nexport {CommonLocalizeModule} from './modules/commonLocalize.module';\nexport {CommonUtilsModule} from './modules/commonUtils.module';\nexport * from './modules/goBack';\nexport {ProgressIndicatorOptions} from './modules/progressIndicator/services/progressIndicatorOptions';\nexport {ProgressIndicatorComponent} from './modules/progressIndicator/components/progressIndicator/progressIndicator.component';\nexport {ProgressIndicatorModule} from './modules/progressIndicator/modules/progressIndicator.module';\nexport {ProgressIndicatorService} from './modules/progressIndicator/services/progressIndicator.service';\nexport {PROGRESS_INDICATOR_GROUP_NAME} from './modules/progressIndicator/misc/tokens';\nexport {DebugDataModule} from './modules/debugData/modules/debugData.module';\nexport {DebugDataComponent} from './modules/debugData/components/debugData/debugData.component';\nexport {DebugDataEnabledService} from './modules/debugData/services/debugDataEnabled/debugDataEnabled.service';\nexport {ClickOutsideDirective} from './modules/clickOutside/directives/clickOutside/clickOutside.directive';\nexport {ClickOutsideModule} from './modules/clickOutside/modules/clickOutside.module';\nexport {MultiButtonComponent} from './modules/multiButton/components/multiButton/multiButton.component';\nexport {MultiButtonCssClasses} from './modules/multiButton/components/multiButton/multiButton.interface';\nexport {MULTI_BUTTON_CSS_CLASSES} from './modules/multiButton/misc/tokens';\nexport {MultiButtonModule} from './modules/multiButton/modules/multiButton.module';\nexport * from './modules/castPipes';\nexport * from './types/tokens';\nexport * from './utils';\nexport * from './pipes';\nexport * from './decorators';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization} from './services/stringLocalization';\nexport {Logger} from './services/logger';\nexport {NgComponentOutletEx} from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';\nexport {APP_STABLE, extractAppStableResolve, runWhenModuleStable} from './utils';\nexport {PROGRESS_INTERCEPTOR_PROVIDER, ProgressInterceptor} from './modules/progressIndicator/interceptors/progressInterceptor';\nexport {DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, Notifications, NotificationsOptions, NotificationsProvider, NotificationsScopeProvider, NotificationsScopeProviderFactory} from './services/notifications';\nexport * from './services/position';\n\n//TODO: any to unknown\n//TODO: strict null checks"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/position/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './position.interface';\nexport * from './position.types';\nexport * from './position.utils';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {PositionOffset, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Options that are passed to position service\n */\nexport interface PositionOptions\n{\n //######################### properties #########################\n\n /**\n * Placement of target element against source element\n */\n placement: PositionPlacement;\n\n /**\n * Offset which allows moving target element along the cross axis of placement\n */\n offset: PositionOffset;\n\n /**\n * Indication whether perform flip in case of collision (with view boundaries)\n */\n flip: boolean;\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n autoUpdate: boolean|AutoUpdateOptions;\n\n /**\n * Function that is called when auto updated is called for processing result\n */\n autoUpdateProcessor?: (result: PositionResult) => void;\n\n /**\n * Mouse event that occured when positioning was called\n */\n mouseEvent?: MouseEvent;\n}\n\n/**\n * Result of positioning process, storing new coordinates\n */\nexport interface PositionResult<TElement extends Element = any>\n{\n /**\n * Target element to be positioned\n */\n target: TElement;\n\n /**\n * X coordinate of position of target\n */\n x: number;\n\n /**\n * Y coordinate of position of target\n */\n y: number;\n\n /**\n * Disposes instance of engine used for positioning\n */\n dispose(): void;\n}\n\n/**\n * Service that is used for positioning two elements against each other\n */\nexport interface Position\n{\n //######################### methods #########################\n\n /**\n * Places target element relatively to source element according options and returns result storing information about new position\n * @param target - Target element to be placed\n * @param source - Source element to be placed against\n * @param options - Optional options with informations about new position\n */\n placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>;\n}\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available positions for placement of target element against its source
|
|
3
|
+
*/
|
|
4
|
+
export var PositionPlacement;
|
|
5
|
+
(function (PositionPlacement) {
|
|
6
|
+
/**
|
|
7
|
+
* Target is placed on the top (above) of source element in the middle of its width
|
|
8
|
+
*/
|
|
9
|
+
PositionPlacement[PositionPlacement["Top"] = 0] = "Top";
|
|
10
|
+
/**
|
|
11
|
+
* Target is placed on the top (above) of source element at the start (left) of its width
|
|
12
|
+
*/
|
|
13
|
+
PositionPlacement[PositionPlacement["TopStart"] = 1] = "TopStart";
|
|
14
|
+
/**
|
|
15
|
+
* Target is placed on the top (above) of source element at the end (right) of its width
|
|
16
|
+
*/
|
|
17
|
+
PositionPlacement[PositionPlacement["TopEnd"] = 2] = "TopEnd";
|
|
18
|
+
/**
|
|
19
|
+
* Target is placed on the left (before) of source element in the middle of its height
|
|
20
|
+
*/
|
|
21
|
+
PositionPlacement[PositionPlacement["Left"] = 3] = "Left";
|
|
22
|
+
/**
|
|
23
|
+
* Target is placed on the left (before) of source element at the start (top) of its height
|
|
24
|
+
*/
|
|
25
|
+
PositionPlacement[PositionPlacement["LeftStart"] = 4] = "LeftStart";
|
|
26
|
+
/**
|
|
27
|
+
* Target is placed on the left (before) of source element at the end (bottom) of its height
|
|
28
|
+
*/
|
|
29
|
+
PositionPlacement[PositionPlacement["LeftEnd"] = 5] = "LeftEnd";
|
|
30
|
+
/**
|
|
31
|
+
* Target is placed on the right (after) of source element in the middle of its height
|
|
32
|
+
*/
|
|
33
|
+
PositionPlacement[PositionPlacement["Right"] = 6] = "Right";
|
|
34
|
+
/**
|
|
35
|
+
* Target is placed on the right (after) of source element at the start (top) of its height
|
|
36
|
+
*/
|
|
37
|
+
PositionPlacement[PositionPlacement["RightStart"] = 7] = "RightStart";
|
|
38
|
+
/**
|
|
39
|
+
* Target is placed on the right (after) of source element at the end (bottom) of its height
|
|
40
|
+
*/
|
|
41
|
+
PositionPlacement[PositionPlacement["RightEnd"] = 8] = "RightEnd";
|
|
42
|
+
/**
|
|
43
|
+
* Target is placed on the bottom (below) of source element in the middle of its width
|
|
44
|
+
*/
|
|
45
|
+
PositionPlacement[PositionPlacement["Bottom"] = 9] = "Bottom";
|
|
46
|
+
/**
|
|
47
|
+
* Target is placed on the bottom (below) of source element at the start (left) of its width
|
|
48
|
+
*/
|
|
49
|
+
PositionPlacement[PositionPlacement["BottomStart"] = 10] = "BottomStart";
|
|
50
|
+
/**
|
|
51
|
+
* Target is placed on the bottom (below) of source element at the end (right) of its width
|
|
52
|
+
*/
|
|
53
|
+
PositionPlacement[PositionPlacement["BottomEnd"] = 11] = "BottomEnd";
|
|
54
|
+
})(PositionPlacement || (PositionPlacement = {}));
|
|
55
|
+
/**
|
|
56
|
+
* Applied offset to position of target in cross axis relative to placement
|
|
57
|
+
*/
|
|
58
|
+
export var PositionOffset;
|
|
59
|
+
(function (PositionOffset) {
|
|
60
|
+
/**
|
|
61
|
+
* No offset applied
|
|
62
|
+
*/
|
|
63
|
+
PositionOffset[PositionOffset["None"] = 0] = "None";
|
|
64
|
+
/**
|
|
65
|
+
* Offset is calculated at the point where mouse enters source element
|
|
66
|
+
*/
|
|
67
|
+
PositionOffset[PositionOffset["MouseEnter"] = 1] = "MouseEnter";
|
|
68
|
+
/**
|
|
69
|
+
* Positive offset equal to half of size of target
|
|
70
|
+
*/
|
|
71
|
+
PositionOffset[PositionOffset["Half"] = 2] = "Half";
|
|
72
|
+
/**
|
|
73
|
+
* Negative offset equal to half of size of target
|
|
74
|
+
*/
|
|
75
|
+
PositionOffset[PositionOffset["NegativeHalf"] = 3] = "NegativeHalf";
|
|
76
|
+
/**
|
|
77
|
+
* Positive offset equal to full size of target
|
|
78
|
+
*/
|
|
79
|
+
PositionOffset[PositionOffset["Full"] = 4] = "Full";
|
|
80
|
+
/**
|
|
81
|
+
* Negative offset equal to full size of target
|
|
82
|
+
*/
|
|
83
|
+
PositionOffset[PositionOffset["NegativeFull"] = 5] = "NegativeFull";
|
|
84
|
+
})(PositionOffset || (PositionOffset = {}));
|
|
85
|
+
//# sourceMappingURL=position.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.types.js","sourceRoot":"","sources":["../../../../src/services/position/position.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,iBA6DX;AA7DD,WAAY,iBAAiB;IAEzB;;OAEG;IACH,uDAAG,CAAA;IAEH;;OAEG;IACH,iEAAQ,CAAA;IAER;;OAEG;IACH,6DAAM,CAAA;IAEN;;OAEG;IACH,yDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAS,CAAA;IAET;;OAEG;IACH,+DAAO,CAAA;IAEP;;OAEG;IACH,2DAAK,CAAA;IAEL;;OAEG;IACH,qEAAU,CAAA;IAEV;;OAEG;IACH,iEAAQ,CAAA;IAER;;OAEG;IACH,6DAAM,CAAA;IAEN;;OAEG;IACH,wEAAW,CAAA;IAEX;;OAEG;IACH,oEAAS,CAAA;AACb,CAAC,EA7DW,iBAAiB,KAAjB,iBAAiB,QA6D5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cA+BX;AA/BD,WAAY,cAAc;IAEtB;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,+DAAU,CAAA;IAEV;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAY,CAAA;IAEZ;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAY,CAAA;AAChB,CAAC,EA/BW,cAAc,KAAd,cAAc,QA+BzB","sourcesContent":["/**\n * Available positions for placement of target element against its source\n */\nexport enum PositionPlacement\n{\n /**\n * Target is placed on the top (above) of source element in the middle of its width\n */\n Top,\n\n /**\n * Target is placed on the top (above) of source element at the start (left) of its width\n */\n TopStart,\n\n /**\n * Target is placed on the top (above) of source element at the end (right) of its width\n */\n TopEnd,\n\n /**\n * Target is placed on the left (before) of source element in the middle of its height\n */\n Left,\n\n /**\n * Target is placed on the left (before) of source element at the start (top) of its height\n */\n LeftStart,\n\n /**\n * Target is placed on the left (before) of source element at the end (bottom) of its height\n */\n LeftEnd,\n\n /**\n * Target is placed on the right (after) of source element in the middle of its height\n */\n Right,\n\n /**\n * Target is placed on the right (after) of source element at the start (top) of its height\n */\n RightStart,\n\n /**\n * Target is placed on the right (after) of source element at the end (bottom) of its height\n */\n RightEnd,\n\n /**\n * Target is placed on the bottom (below) of source element in the middle of its width\n */\n Bottom,\n\n /**\n * Target is placed on the bottom (below) of source element at the start (left) of its width\n */\n BottomStart,\n\n /**\n * Target is placed on the bottom (below) of source element at the end (right) of its width\n */\n BottomEnd\n}\n\n/**\n * Applied offset to position of target in cross axis relative to placement\n */\nexport enum PositionOffset\n{\n /**\n * No offset applied\n */\n None,\n\n /**\n * Offset is calculated at the point where mouse enters source element\n */\n MouseEnter,\n\n /**\n * Positive offset equal to half of size of target\n */\n Half,\n\n /**\n * Negative offset equal to half of size of target\n */\n NegativeHalf,\n\n /**\n * Positive offset equal to full size of target\n */\n Full,\n\n /**\n * Negative offset equal to full size of target\n */\n NegativeFull\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applies `PositionResult` to target element
|
|
3
|
+
* @param result - Result of positioning process to be applied
|
|
4
|
+
*/
|
|
5
|
+
export function applyPositionResult(result) {
|
|
6
|
+
Object.assign(result.target.style, {
|
|
7
|
+
top: '0',
|
|
8
|
+
left: '0',
|
|
9
|
+
transform: `translate(${result.x}px, ${result.y}px)`,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=position.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.utils.js","sourceRoot":"","sources":["../../../../src/services/position/position.utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAmC;IAEnE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EACnB;QACI,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,aAAa,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,KAAK;KACvD,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import {PositionResult} from './position.interface';\n\n/**\n * Applies `PositionResult` to target element\n * @param result - Result of positioning process to be applied\n */\nexport function applyPositionResult(result: PositionResult<HTMLElement>): void\n{\n Object.assign(result.target.style,\n {\n top: '0',\n left: '0',\n transform: `translate(${result.x}px, ${result.y}px)`,\n });\n}\n"]}
|
|
@@ -32,9 +32,9 @@ export const PERMANENT_STORAGE = new InjectionToken('PERMANENT_STORAGE');
|
|
|
32
32
|
*/
|
|
33
33
|
export const TEMPORARY_STORAGE = new InjectionToken('TEMPORARY_STORAGE', { providedIn: 'root', factory: () => new MemoryTemporaryStorageService() });
|
|
34
34
|
/**
|
|
35
|
-
* Token used for injecting service that is used for
|
|
35
|
+
* Token used for injecting service that is used for positioning of one element against another
|
|
36
36
|
*/
|
|
37
|
-
export const
|
|
37
|
+
export const POSITION = new InjectionToken('POSITION');
|
|
38
38
|
/**
|
|
39
39
|
* Token used for injecting notifications service implementation
|
|
40
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/types/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAO,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAqB,2BAA2B,EAAC,MAAM,gCAAgC,CAAC;AAE/F,OAAO,EAAS,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAmB,6BAA6B,EAAC,MAAM,8BAA8B,CAAC;AAI7F;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA2B,IAAI,cAAc,CAAS,uBAAuB,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA2B,IAAI,cAAc,CAAS,4BAA4B,CAAC,CAAC;AAE3H;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA2B,IAAI,cAAc,CAAS,0BAA0B,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAA2B,IAAI,cAAc,CAAS,QAAQ,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,kBA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AAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,kBAAkB,EAAE,EAAC,CAAC,CAAC;AAElJ;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAuC,IAAI,cAAc,CAAqB,qBAAqB,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,2BAA2B,EAAE,EAAC,CAAC,CAAC;AAE7M;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,IAAI,cAAc,CAAmB,mBAAmB,CAAC,CAAC;AAE7H;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,IAAI,cAAc,CAAmB,mBAAmB,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,6BAA6B,EAAE,EAAC,CAAC,CAAC;AAEvM;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA6B,IAAI,cAAc,CAAW,UAAU,CAAC,CAAC;AAE3F;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,IAAI,cAAc,CAAgB,eAAe,CAAC,CAAC;AAE/G;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA2B,IAAI,cAAc,CAAS,qBAAqB,CAAC,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC,IAAI,gBAAgB,CAAkB,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import {InjectionToken, Type} from '@angular/core';\nimport {HttpContextToken} from '@angular/common/http';\n\nimport {StringLocalization, NoStringLocalizationService} from '../services/stringLocalization';\nimport {PermanentStorage} from '../services/permanentStorage';\nimport {Logger, DummyLoggerService} from '../services/logger';\nimport {TemporaryStorage, MemoryTemporaryStorageService} from '../services/temporaryStorage';\nimport {Notifications} from '../services/notifications';\nimport {Position} from '../services/position';\n\n/**\n * Base url when using HTTP (example: http://localhost:8888/)\n */\nexport const HTTP_REQUEST_BASE_URL: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_BASE_URL');\n\n/**\n * Token is used to transfer http request cookie header\n */\nexport const HTTP_REQUEST_COOKIE_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_COOKIE_HEADER');\n\n/**\n * Token is used to transfer http request authentication header\n */\nexport const HTTP_REQUEST_AUTH_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_AUTH_HEADER');\n\n/**\n * Token used for injecting Logger implementation\n */\nexport const LOGGER: InjectionToken<Logger> = new InjectionToken<Logger>('LOGGER', {providedIn: 'root', factory: () => new DummyLoggerService()});\n\n/**\n * Token used for injecting StringLocalization service implementation\n */\nexport const STRING_LOCALIZATION: InjectionToken<StringLocalization> = new InjectionToken<StringLocalization>('STRING_LOCALIZATION', {providedIn: 'root', factory: () => new NoStringLocalizationService()});\n\n/**\n * Token used for injecting permanent storage\n */\nexport const PERMANENT_STORAGE: InjectionToken<PermanentStorage> = new InjectionToken<PermanentStorage>('PERMANENT_STORAGE');\n\n/**\n * Token used for injecting temporary storage\n */\nexport const TEMPORARY_STORAGE: InjectionToken<TemporaryStorage> = new InjectionToken<TemporaryStorage>('TEMPORARY_STORAGE', {providedIn: 'root', factory: () => new MemoryTemporaryStorageService()});\n\n/**\n * Token used for injecting service that is used for positioning of one element against another\n */\nexport const POSITION: InjectionToken<Position> = new InjectionToken<Position>('POSITION');\n\n/**\n * Token used for injecting notifications service implementation\n */\nexport const NOTIFICATIONS: InjectionToken<Notifications> = new InjectionToken<Notifications>('NOTIFICATIONS');\n\n/**\n * Token used for injecting notifications scope name\n */\nexport const NOTIFICATIONS_SCOPE: InjectionToken<string> = new InjectionToken<string>('NOTIFICATIONS_SCOPE');\n\n/**\n * Http context token storing array of ignored interceptors types\n */\nexport const IGNORED_INTERCEPTORS: HttpContextToken<Type<unknown>[]> = new HttpContextToken<Type<unknown>[]>(() => []);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../floating-ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC","sourcesContent":["export * from './services';\n"]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { PositionOffset, PositionPlacement } from '@anglr/common';
|
|
2
|
+
import { extend } from '@jscrpt/common';
|
|
3
|
+
import { computePosition, autoUpdate } from '@floating-ui/dom';
|
|
4
|
+
/**
|
|
5
|
+
* Default options for `FloatingUiDomPosition` implementation
|
|
6
|
+
*/
|
|
7
|
+
const defaultOptions = {
|
|
8
|
+
autoUpdate: false,
|
|
9
|
+
flip: false,
|
|
10
|
+
offset: PositionOffset.None,
|
|
11
|
+
placement: PositionPlacement.Top
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Service that is used for positioning two elements against each other, using floating-ui dom implementation
|
|
15
|
+
*/
|
|
16
|
+
export class FloatingUiDomPosition {
|
|
17
|
+
//######################### public methods - implementation of Position #########################
|
|
18
|
+
/**
|
|
19
|
+
* @inheritdoc
|
|
20
|
+
*/
|
|
21
|
+
async placeElement(target, source, options) {
|
|
22
|
+
const computedOptions = extend({}, defaultOptions, options);
|
|
23
|
+
const runComputation = async () => {
|
|
24
|
+
const result = await computePosition(source, target, {
|
|
25
|
+
placement: this._getPlacement(computedOptions)
|
|
26
|
+
});
|
|
27
|
+
if (computedOptions.autoUpdate && computedOptions.autoUpdateProcessor) {
|
|
28
|
+
computedOptions.autoUpdateProcessor({
|
|
29
|
+
target,
|
|
30
|
+
dispose: () => { },
|
|
31
|
+
x: result.x,
|
|
32
|
+
y: result.y
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
const result = await runComputation();
|
|
38
|
+
let dispose = () => { };
|
|
39
|
+
if (computedOptions.autoUpdate) {
|
|
40
|
+
dispose = autoUpdate(source, target, runComputation);
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
target,
|
|
44
|
+
dispose,
|
|
45
|
+
x: result.x,
|
|
46
|
+
y: result.y
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//######################### protected methods #########################
|
|
50
|
+
/**
|
|
51
|
+
* Gets floating ui placement from position placement
|
|
52
|
+
* @param options - Options containing position placement
|
|
53
|
+
*/
|
|
54
|
+
_getPlacement(options) {
|
|
55
|
+
switch (options.placement) {
|
|
56
|
+
default:
|
|
57
|
+
// case PositionPlacement.Top:
|
|
58
|
+
{
|
|
59
|
+
return 'bottom';
|
|
60
|
+
}
|
|
61
|
+
case PositionPlacement.TopStart:
|
|
62
|
+
{
|
|
63
|
+
return 'top-start';
|
|
64
|
+
}
|
|
65
|
+
case PositionPlacement.TopEnd:
|
|
66
|
+
{
|
|
67
|
+
return 'top-end';
|
|
68
|
+
}
|
|
69
|
+
case PositionPlacement.Bottom:
|
|
70
|
+
{
|
|
71
|
+
return 'bottom';
|
|
72
|
+
}
|
|
73
|
+
case PositionPlacement.BottomStart:
|
|
74
|
+
{
|
|
75
|
+
return 'bottom-start';
|
|
76
|
+
}
|
|
77
|
+
case PositionPlacement.BottomEnd:
|
|
78
|
+
{
|
|
79
|
+
return 'bottom-end';
|
|
80
|
+
}
|
|
81
|
+
case PositionPlacement.Left:
|
|
82
|
+
{
|
|
83
|
+
return 'left';
|
|
84
|
+
}
|
|
85
|
+
case PositionPlacement.LeftStart:
|
|
86
|
+
{
|
|
87
|
+
return 'left-start';
|
|
88
|
+
}
|
|
89
|
+
case PositionPlacement.LeftEnd:
|
|
90
|
+
{
|
|
91
|
+
return 'left-end';
|
|
92
|
+
}
|
|
93
|
+
case PositionPlacement.Right:
|
|
94
|
+
{
|
|
95
|
+
return 'right';
|
|
96
|
+
}
|
|
97
|
+
case PositionPlacement.RightStart:
|
|
98
|
+
{
|
|
99
|
+
return 'right-start';
|
|
100
|
+
}
|
|
101
|
+
case PositionPlacement.RightEnd:
|
|
102
|
+
{
|
|
103
|
+
return 'right-end';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=floatingUiDomPosition.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,eAAe,EAAa,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAExE;;GAEG;AACH,MAAM,cAAc,GACpB;IACI,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,cAAc,CAAC,IAAI;IAC3B,SAAS,EAAE,iBAAiB,CAAC,GAAG;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAE9B,iGAAiG;IAEjG;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,MAAe,EAAE,MAAe,EAAE,OAAkC;QAE1F,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QAE5D,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;YAE9B,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,MAAM,EACN,MAAqB,EACrB;gBACI,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC;aACjD,CAAC,CAAC;YAExC,IAAG,eAAe,CAAC,UAAU,IAAI,eAAe,CAAC,mBAAmB,EACpE;gBACI,eAAe,CAAC,mBAAmB,CACnC;oBACI,MAAM;oBACN,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;oBACjB,CAAC,EAAE,MAAM,CAAC,CAAC;oBACX,CAAC,EAAE,MAAM,CAAC,CAAC;iBACd,CAAC,CAAC;aACN;YAED,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ACxB;YACD,KAAK,iBAAiB,CAAC,QAAQ;gBAC/B;oBACI,OAAO,WAAW,CAAC;iBACtB;SACJ;IACL,CAAC;CACJ","sourcesContent":["import {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement} from '@anglr/common';\nimport {extend} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate} from '@floating-ui/dom';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\n{\n autoUpdate: false,\n flip: false,\n offset: PositionOffset.None,\n placement: PositionPlacement.Top\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public async placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>\n {\n const computedOptions = extend({}, defaultOptions, options);\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions)\n });\n\n if(computedOptions.autoUpdate && computedOptions.autoUpdateProcessor)\n {\n computedOptions.autoUpdateProcessor(\n {\n target,\n dispose: () => {},\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n\n const result = await runComputation();\n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n dispose = autoUpdate(source, target as HTMLElement, runComputation);\n }\n\n return {\n target,\n dispose,\n x: result.x,\n y: result.y\n };\n }\n\n //######################### protected methods #########################\n\n /**\n * Gets floating ui placement from position placement\n * @param options - Options containing position placement\n */\n protected _getPlacement(options: PositionOptions): Placement\n {\n switch(options.placement)\n {\n default:\n // case PositionPlacement.Top:\n {\n return 'bottom';\n }\n case PositionPlacement.TopStart:\n {\n return 'top-start';\n }\n case PositionPlacement.TopEnd:\n {\n return 'top-end';\n }\n case PositionPlacement.Bottom:\n {\n return 'bottom';\n }\n case PositionPlacement.BottomStart:\n {\n return 'bottom-start';\n }\n case PositionPlacement.BottomEnd:\n {\n return 'bottom-end';\n }\n case PositionPlacement.Left:\n {\n return 'left';\n }\n case PositionPlacement.LeftStart:\n {\n return 'left-start';\n }\n case PositionPlacement.LeftEnd:\n {\n return 'left-end';\n }\n case PositionPlacement.Right:\n {\n return 'right';\n }\n case PositionPlacement.RightStart:\n {\n return 'right-start';\n }\n case PositionPlacement.RightEnd:\n {\n return 'right-end';\n }\n }\n }\n}"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './floatingUiDomPosition.service';\n"]}
|
package/es2020/src/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { NgComponentOutletEx } from './directives/ngComponentOutletEx/ngComponen
|
|
|
30
30
|
export { APP_STABLE, extractAppStableResolve, runWhenModuleStable } from './utils';
|
|
31
31
|
export { PROGRESS_INTERCEPTOR_PROVIDER, ProgressInterceptor } from './modules/progressIndicator/interceptors/progressInterceptor';
|
|
32
32
|
export { DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, NotificationsOptions } from './services/notifications';
|
|
33
|
-
export * from './services/
|
|
33
|
+
export * from './services/position';
|
|
34
34
|
//TODO: any to unknown
|
|
35
35
|
//TODO: strict null checks
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
package/es2020/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,cAAc,kBAAkB,CAAC;AACjC,OAAO,EA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AAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAC,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAC,2BAA2B,EAAqB,MAAM,+BAA+B,CAAC;AAE9F,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACjF,OAAO,EAAC,6BAA6B,EAAE,mBAAmB,EAAC,MAAM,8DAA8D,CAAC;AAChI,OAAO,EAAC,qBAAqB,EAAE,2BAA2B,EAAE,YAAY,EAAE,oBAAoB,EAAiB,oBAAoB,EAAuF,MAAM,0BAA0B,CAAC;AAC3P,cAAc,qBAAqB,CAAC;AAEpC,sBAAsB;AACtB,0BAA0B","sourcesContent":["export {GlobalizationService} from './services/globalization/globalization.service';\nexport {CommonDynamicModule} from './modules/commonDynamic.module';\nexport {CommonLocalizeModule} from './modules/commonLocalize.module';\nexport {CommonUtilsModule} from './modules/commonUtils.module';\nexport * from './modules/goBack';\nexport {ProgressIndicatorOptions} from './modules/progressIndicator/services/progressIndicatorOptions';\nexport {ProgressIndicatorComponent} from './modules/progressIndicator/components/progressIndicator/progressIndicator.component';\nexport {ProgressIndicatorModule} from './modules/progressIndicator/modules/progressIndicator.module';\nexport {ProgressIndicatorService} from './modules/progressIndicator/services/progressIndicator.service';\nexport {PROGRESS_INDICATOR_GROUP_NAME} from './modules/progressIndicator/misc/tokens';\nexport {DebugDataModule} from './modules/debugData/modules/debugData.module';\nexport {DebugDataComponent} from './modules/debugData/components/debugData/debugData.component';\nexport {DebugDataEnabledService} from './modules/debugData/services/debugDataEnabled/debugDataEnabled.service';\nexport {ClickOutsideDirective} from './modules/clickOutside/directives/clickOutside/clickOutside.directive';\nexport {ClickOutsideModule} from './modules/clickOutside/modules/clickOutside.module';\nexport {MultiButtonComponent} from './modules/multiButton/components/multiButton/multiButton.component';\nexport {MultiButtonCssClasses} from './modules/multiButton/components/multiButton/multiButton.interface';\nexport {MULTI_BUTTON_CSS_CLASSES} from './modules/multiButton/misc/tokens';\nexport {MultiButtonModule} from './modules/multiButton/modules/multiButton.module';\nexport * from './modules/castPipes';\nexport * from './types/tokens';\nexport * from './utils';\nexport * from './pipes';\nexport * from './decorators';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization} from './services/stringLocalization';\nexport {Logger} from './services/logger';\nexport {NgComponentOutletEx} from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';\nexport {APP_STABLE, extractAppStableResolve, runWhenModuleStable} from './utils';\nexport {PROGRESS_INTERCEPTOR_PROVIDER, ProgressInterceptor} from './modules/progressIndicator/interceptors/progressInterceptor';\nexport {DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, Notifications, NotificationsOptions, NotificationsProvider, NotificationsScopeProvider, NotificationsScopeProviderFactory} from './services/notifications';\nexport * from './services/position';\n\n//TODO: any to unknown\n//TODO: strict null checks"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/position/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './position.interface';\nexport * from './position.types';\nexport * from './position.utils';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {PositionOffset, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Options that are passed to position service\n */\nexport interface PositionOptions\n{\n //######################### properties #########################\n\n /**\n * Placement of target element against source element\n */\n placement: PositionPlacement;\n\n /**\n * Offset which allows moving target element along the cross axis of placement\n */\n offset: PositionOffset;\n\n /**\n * Indication whether perform flip in case of collision (with view boundaries)\n */\n flip: boolean;\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n autoUpdate: boolean|AutoUpdateOptions;\n\n /**\n * Function that is called when auto updated is called for processing result\n */\n autoUpdateProcessor?: (result: PositionResult) => void;\n\n /**\n * Mouse event that occured when positioning was called\n */\n mouseEvent?: MouseEvent;\n}\n\n/**\n * Result of positioning process, storing new coordinates\n */\nexport interface PositionResult<TElement extends Element = any>\n{\n /**\n * Target element to be positioned\n */\n target: TElement;\n\n /**\n * X coordinate of position of target\n */\n x: number;\n\n /**\n * Y coordinate of position of target\n */\n y: number;\n\n /**\n * Disposes instance of engine used for positioning\n */\n dispose(): void;\n}\n\n/**\n * Service that is used for positioning two elements against each other\n */\nexport interface Position\n{\n //######################### methods #########################\n\n /**\n * Places target element relatively to source element according options and returns result storing information about new position\n * @param target - Target element to be placed\n * @param source - Source element to be placed against\n * @param options - Optional options with informations about new position\n */\n placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>;\n}\n"]}
|