@anglr/common 17.0.0-beta.20230814105451 → 17.0.0-beta.20230815112307

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/changelog.md +54 -2
  2. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +15 -2
  3. package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
  4. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +1 -1
  5. package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
  6. package/es2022/src/{modules/clickOutside/directives → directives}/clickOutside/clickOutside.directive.js +29 -22
  7. package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -0
  8. package/es2022/src/{modules/goBack/directives → directives}/goBack/goBack.directive.js +7 -6
  9. package/es2022/src/directives/goBack/goBack.directive.js.map +1 -0
  10. package/es2022/src/{modules/position/directives → directives}/positionTo/positionTo.directive.js +9 -8
  11. package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -0
  12. package/es2022/src/index.js +3 -4
  13. package/es2022/src/index.js.map +1 -1
  14. package/es2022/src/modules/commonUtils.module.js +21 -21
  15. package/es2022/src/modules/commonUtils.module.js.map +1 -1
  16. package/es2022/src/pipes/isNaN/isNaN.pipe.js +7 -6
  17. package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
  18. package/es2022/src/pipes/isPresent/isPresent.pipe.js +7 -6
  19. package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
  20. package/es2022/src/pipes/keys/keys.pipe.js +6 -6
  21. package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
  22. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +6 -6
  23. package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
  24. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +6 -6
  25. package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
  26. package/es2022/src/services/notifications/defaultNotifications.service.js +12 -12
  27. package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
  28. package/es2022/src/services/notifications/notifications.interface.js +10 -1
  29. package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
  30. package/es2022/src/services/stringLocalization/noStringLocalization.service.js +2 -4
  31. package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
  32. package/es2022/structured-log/src/components/console/console.component.js +2 -2
  33. package/es2022/structured-log/src/components/console/console.component.js.map +1 -1
  34. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +3 -4
  35. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
  36. package/package.json +3 -3
  37. package/src/directives/clickOutside/clickOutside.directive.d.ts +48 -0
  38. package/src/directives/clickOutside/clickOutside.directive.d.ts.map +1 -0
  39. package/src/{modules/goBack/directives → directives}/goBack/goBack.directive.d.ts +3 -3
  40. package/src/directives/goBack/goBack.directive.d.ts.map +1 -0
  41. package/src/{modules/position/directives → directives}/positionTo/positionTo.directive.d.ts +4 -4
  42. package/src/{modules/position/directives → directives}/positionTo/positionTo.directive.d.ts.map +1 -1
  43. package/src/index.d.ts +3 -4
  44. package/src/index.d.ts.map +1 -1
  45. package/src/modules/commonUtils.module.d.ts +1 -1
  46. package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
  47. package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
  48. package/src/pipes/isPresent/isPresent.pipe.d.ts +4 -4
  49. package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
  50. package/src/pipes/keys/keys.pipe.d.ts +3 -3
  51. package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
  52. package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +3 -3
  53. package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
  54. package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
  55. package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
  56. package/src/services/notifications/defaultNotifications.service.d.ts +6 -6
  57. package/src/services/notifications/defaultNotifications.service.d.ts.map +1 -1
  58. package/src/services/notifications/notifications.interface.d.ts +19 -7
  59. package/src/services/notifications/notifications.interface.d.ts.map +1 -1
  60. package/src/services/stringLocalization/noStringLocalization.service.d.ts +1 -2
  61. package/src/services/stringLocalization/noStringLocalization.service.d.ts.map +1 -1
  62. package/structured-log/src/components/console/console.component.d.ts.map +1 -1
  63. package/structured-log/src/components/console/console.component.html +1 -1
  64. package/version.bak +1 -1
  65. package/es2022/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +0 -1
  66. package/es2022/src/modules/clickOutside/modules/clickOutside.module.js +0 -25
  67. package/es2022/src/modules/clickOutside/modules/clickOutside.module.js.map +0 -1
  68. package/es2022/src/modules/goBack/directives/goBack/goBack.directive.js.map +0 -1
  69. package/es2022/src/modules/goBack/directives/index.js +0 -2
  70. package/es2022/src/modules/goBack/directives/index.js.map +0 -1
  71. package/es2022/src/modules/goBack/index.js +0 -3
  72. package/es2022/src/modules/goBack/index.js.map +0 -1
  73. package/es2022/src/modules/goBack/modules/goBack.module.js +0 -24
  74. package/es2022/src/modules/goBack/modules/goBack.module.js.map +0 -1
  75. package/es2022/src/modules/goBack/modules/index.js +0 -2
  76. package/es2022/src/modules/goBack/modules/index.js.map +0 -1
  77. package/es2022/src/modules/position/directives/index.js +0 -2
  78. package/es2022/src/modules/position/directives/index.js.map +0 -1
  79. package/es2022/src/modules/position/directives/positionTo/positionTo.directive.js.map +0 -1
  80. package/es2022/src/modules/position/index.js +0 -3
  81. package/es2022/src/modules/position/index.js.map +0 -1
  82. package/es2022/src/modules/position/modules/index.js +0 -2
  83. package/es2022/src/modules/position/modules/index.js.map +0 -1
  84. package/es2022/src/modules/position/modules/position.module.js +0 -25
  85. package/es2022/src/modules/position/modules/position.module.js.map +0 -1
  86. package/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.d.ts +0 -47
  87. package/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.d.ts.map +0 -1
  88. package/src/modules/clickOutside/modules/clickOutside.module.d.ts +0 -11
  89. package/src/modules/clickOutside/modules/clickOutside.module.d.ts.map +0 -1
  90. package/src/modules/goBack/directives/goBack/goBack.directive.d.ts.map +0 -1
  91. package/src/modules/goBack/directives/index.d.ts +0 -2
  92. package/src/modules/goBack/directives/index.d.ts.map +0 -1
  93. package/src/modules/goBack/index.d.ts +0 -3
  94. package/src/modules/goBack/index.d.ts.map +0 -1
  95. package/src/modules/goBack/modules/goBack.module.d.ts +0 -11
  96. package/src/modules/goBack/modules/goBack.module.d.ts.map +0 -1
  97. package/src/modules/goBack/modules/index.d.ts +0 -2
  98. package/src/modules/goBack/modules/index.d.ts.map +0 -1
  99. package/src/modules/position/directives/index.d.ts +0 -2
  100. package/src/modules/position/directives/index.d.ts.map +0 -1
  101. package/src/modules/position/index.d.ts +0 -3
  102. package/src/modules/position/index.d.ts.map +0 -1
  103. package/src/modules/position/modules/index.d.ts +0 -2
  104. package/src/modules/position/modules/index.d.ts.map +0 -1
  105. package/src/modules/position/modules/position.module.d.ts +0 -11
  106. package/src/modules/position/modules/position.module.d.ts.map +0 -1
package/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 17.0.0 (2023-08-14)
3
+ ## Version 17.0.0 (2023-08-15)
4
4
 
5
5
  ### Features
6
6
 
@@ -31,8 +31,37 @@
31
31
  - new `provideStringLocalization` function that provides string localization service type
32
32
  - new `provideTemporaryStorage` function that provides temporary storage service type
33
33
  - new `CookiePermanentStorage` type, that sets permanent storage to use cookie permanent storage when used with `providePermanentStorage`
34
+ - updated `ClickOutsideSADirective` directive
35
+ - now it is `standalone`
36
+ - updated `GoBackSADirective` directive
37
+ - now it is `standalone`
34
38
  - updated `LocalizeSAPipe`
35
- - now its `standalone`
39
+ - now it is `standalone`
40
+ - updated `IsNaNSAPipe`
41
+ - now it is `standalone`
42
+ - updated `IsPresentSAPipe`
43
+ - now it is `standalone`
44
+ - updated `KeysSAPipe`
45
+ - now it is `standalone`
46
+ - updated `MergeCssClassesSAPipe`
47
+ - now it is `standalone`
48
+ - updated `UrlEncodeSAPipe`
49
+ - now it is `standalone`
50
+ - updated `NoStringLocalizationService` service
51
+ - now using `formatString` for interpolation from `@jscrpt/common`
52
+ - updated `Notification` class
53
+ - new **properties**
54
+ - `parameter` gets object that is used for formatting notification message
55
+ - new constructor parameter that sets object that is used for formatting notification message
56
+ - updated `DefaultNotificationsService`
57
+ - now corresponds with `Notifications` interface
58
+ - updated `Notifications` interface
59
+ - `message` method has new optional parameter `parameter` that represents object that is used for formatting notification message
60
+ - `default` method has new optional parameter `parameter` that represents object that is used for formatting notification message
61
+ - `success` method has new optional parameter `parameter` that represents object that is used for formatting notification message
62
+ - `error` method has new optional parameter `parameter` that represents object that is used for formatting notification message
63
+ - `info` method has new optional parameter `parameter` that represents object that is used for formatting notification message
64
+ - `warning` method has new optional parameter `parameter` that represents object that is used for formatting notification message
36
65
  - *subpackage* `@anglr/common/numeral`
37
66
  - updated `NumeralSAPipe` pipe is now standalone
38
67
  - *subpackage* `@anglr/common/store`
@@ -41,10 +70,13 @@
41
70
  - *subpackage* `@anglr/common/structured-log`
42
71
  - new `provideConsoleComponentSink` function, that provides console component as sink for logger
43
72
  - new `StructuredLogLogger` type, that sets logger to use structured log logger when used with `provideLogger`
73
+ - *subpackage* `@anglr/common/floating-ui`
74
+ - new `FloatingUiPosition` type, that sets position to use floating ui position when used with `providePosition`
44
75
 
45
76
  ### BREAKING CHANGES
46
77
 
47
78
  - minimal supported version of `@angular` is `16.0.3`
79
+ - minimal supported version of `@jscrpt/common` is `4.0.0`
48
80
  - minimal supported version of `@rxjs` is `7.5.7`
49
81
  - minimal supported version of `angular2-hotkeys` is `15.0.0`
50
82
  - minimal supported version of `moment` is `2.29.4`
@@ -53,6 +85,11 @@
53
85
  - minimal supported version of `tslib` is `2.6.0`
54
86
  - dropped support of `NodeJs` lower than `16.14`
55
87
  - pipe `LocalizePipe` renamed to `LocalizeSAPipe`
88
+ - pipe `IsNaNPipe` renamed to `IsNaNSAPipe`
89
+ - pipe `IsPresentPipe` renamed to `IsPresentSAPipe`
90
+ - pipe `KeysPipe` renamed to `KeysSAPipe`
91
+ - pipe `MergeCssClassesPipe` renamed to `MergeCssClassesSAPipe`
92
+ - pipe `UrlEncodePipe` renamed to `UrlEncodeSAPipe`
56
93
  - `RestSinkConfigService` renamed to `RestSinkOptions`
57
94
  - updated `RestSinkService` constructor parameters order
58
95
  - updated `DebugDataComponent` component
@@ -70,12 +107,27 @@
70
107
  - renamed `_element` to `element`
71
108
  - `mouseEnter` is now `protected`
72
109
  - `mouseLeave` is now `protected`
110
+ - directive `ClickOutsideDirective` renamed to `ClickOutsideSADirective`
111
+ - updated `ClickOutsideSADirective` directive
112
+ - new constructor parameter `ngZone`
113
+ - property `clickOutsideElement` is now nullable
114
+ - renamed `_clickOutsideCondition` to `ɵclickOutsideCondition`
115
+ - renamed `_element` to `element`
116
+ - renamed `_document` to `document`
117
+ - renamed `_handleClickOutside` to `handleClickOutside`
118
+ - removed `ClickOutsideModule` module, use `ClickOutsideSADirective` directly
119
+ - directive `GoBackDirective` renamed to `GoBackSADirective`
120
+ - removed `GoBackModule` module, use `GoBackSADirective` directly
121
+ - directive `PositionToDirective` renamed to `PositionToSADirective`
122
+ - removed `PositionModule` module, use `PositionToSADirective` directly
73
123
  - *subpackage* `@anglr/common/numeral`
74
124
  - pipe `NumeralPipe` renamed to `NumeralSAPipe`
75
125
  - *subpackage* `@anglr/common/structured-log`
76
126
  - updated `ConsoleLogModule` module
77
127
  - removed `forRoot` method, instead use new `provideConsoleComponentSink` function
78
128
  - removed `STRUCTURED_LOG_LOGGER` from public API, instead use new `provideLogger` with `StructuredLogLogger` type
129
+ - *subpackage* `@anglr/common/floating-ui`
130
+ - removed `FLOATING_UI_POSITION` from public API, instead use new `providePosition` with `FloatingUiPosition` type
79
131
 
80
132
  ## Version 16.0.0 (2023-02-08)
81
133
 
@@ -1,5 +1,6 @@
1
+ import { __decorate } from "tslib";
1
2
  import { Injectable } from '@angular/core';
2
- import { PositionOffset, PositionPlacement, POSITION } from '@anglr/common';
3
+ import { PositionOffset, PositionPlacement, POSITION, TypeProvider } from '@anglr/common';
3
4
  import { extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof } from '@jscrpt/common';
4
5
  import { computePosition, autoUpdate, offset, flip } from '@floating-ui/dom';
5
6
  import { Observable } from 'rxjs';
@@ -238,8 +239,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
238
239
  /**
239
240
  * Provider for floating ui position implementation
240
241
  */
241
- export const FLOATING_UI_POSITION = {
242
+ const FLOATING_UI_POSITION = {
242
243
  provide: POSITION,
243
244
  useClass: FloatingUiDomPosition
244
245
  };
246
+ /**
247
+ * Type that contains provider for floating ui position when used with `providePosition`
248
+ */
249
+ let FloatingUiPositionType = class FloatingUiPositionType {
250
+ };
251
+ FloatingUiPositionType = __decorate([
252
+ TypeProvider(FLOATING_UI_POSITION)
253
+ ], FloatingUiPositionType);
254
+ /**
255
+ * Sets position to use floating ui position when used with `providePosition`
256
+ */
257
+ export const FloatingUiPosition = FloatingUiPositionType;
245
258
  //# sourceMappingURL=floatingUiDomPosition.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAqB,QAAQ,EAAwC,MAAM,eAAe,CAAC;AAC/K,OAAO,EAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,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AC,CAAC,CAAC;IACR,CAAC;IAED;;;OAGG;IACO,aAAa,CAAC,OAAwB;QAE5C,QAAO,OAAO,CAAC,SAAS,EACxB;YACI;gBACA,8BAA8B;gBAC9B;oBACI,OAAO,KAAK,CAAC;iBAChB;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;uGAnRQ,qBAAqB;2GAArB,qBAAqB;;SAArB,qBAAqB;2FAArB,qBAAqB;kBADjC,UAAU;;AAuRX;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GACjC;IACI,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,qBAAqB;CAClC,CAAC","sourcesContent":["import {ClassProvider, Injectable} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION, PositionOffsetString, PositionOffsets} from '@anglr/common';\nimport {extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\n{\n autoUpdate: false,\n flip: false,\n offset: nameof<typeof PositionOffset>('None') as PositionOffsetString,\n placement: PositionPlacement.TopStart,\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\n@Injectable()\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Observable<PositionResult>\n {\n return new Observable(subscriber =>\n {\n (async () =>\n {\n const computedOptions = extend({}, defaultOptions, options);\n const middlewares: Middleware[] = [];\n\n this._setOffset(middlewares, computedOptions);\n this._setFlip(middlewares, computedOptions);\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions),\n middleware: middlewares,\n });\n\n if(computedOptions.autoUpdate)\n {\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n \n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n let options: AutoUpdateOptions;\n\n if(computedOptions.autoUpdate === true)\n {\n options =\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true\n };\n }\n else\n {\n options = computedOptions.autoUpdate;\n }\n\n dispose = autoUpdate(source,\n target as HTMLElement,\n runComputation,\n options);\n }\n\n const result = await runComputation();\n\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n\n if(!computedOptions.autoUpdate)\n {\n subscriber.complete();\n }\n })();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets flip middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of flip\n */\n protected _setFlip(middlewares: Middleware[], options: PositionOptions): void\n {\n if(options.flip)\n {\n middlewares.push(flip());\n }\n }\n\n /**\n * Sets offset middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of offset\n */\n protected _setOffset(middlewares: Middleware[], options: PositionOptions): void\n {\n //no offset\n if(options.offset === PositionOffset[PositionOffset.None])\n {\n return;\n }\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter])\n {\n //fallback if not supported placement used\n if(options.placement == PositionPlacement.Left ||\n options.placement == PositionPlacement.LeftStart ||\n options.placement == PositionPlacement.LeftEnd ||\n options.placement == PositionPlacement.Right ||\n options.placement == PositionPlacement.RightStart ||\n options.placement == PositionPlacement.RightEnd ||\n options.placement == PositionPlacement.Bottom ||\n options.placement == PositionPlacement.BottomEnd ||\n options.placement == PositionPlacement.Top ||\n options.placement == PositionPlacement.TopEnd)\n {\n options.placement = PositionPlacement.TopStart;\n }\n }\n\n middlewares.push(offset(({elements, placement, x, y}) =>\n {\n //offset is function\n if(isFunction(options.offset))\n {\n return options.offset({elements, x, y});\n }\n\n const floating = elements.floating as Element;\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent)\n {\n return {\n crossAxis: options.mouseEvent.x - (options.mouseEvent.target as HTMLElement).getBoundingClientRect().x\n };\n }\n\n const stringOffset = options.offset as PositionOffsetString|number;\n\n //offset is object\n if(isJsObject(options.offset))\n {\n return options.offset as PositionOffsets;\n }\n\n //offset is skidding number\n if(isNumber(stringOffset))\n {\n return {\n crossAxis: stringOffset,\n };\n }\n\n let dimension: number;\n\n if(placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||\n placement == 'top' || placement == 'top-start' || placement == 'top-end')\n {\n dimension = floating.clientWidth;\n }\n else\n {\n dimension = floating.clientHeight;\n }\n\n switch(stringOffset)\n {\n default:\n {\n dimension = 0;\n\n break;\n }\n case PositionOffset[PositionOffset.Full]:\n {\n break;\n }\n case PositionOffset[PositionOffset.Half]:\n {\n dimension /= 2;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeFull]:\n {\n dimension *= -1;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeHalf]:\n {\n dimension *= -.5;\n\n break;\n }\n }\n\n return {\n crossAxis: dimension\n };\n }));\n }\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 'top';\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}\n\n/**\n * Provider for floating ui position implementation\n */\nexport const FLOATING_UI_POSITION: ClassProvider =\n{\n provide: POSITION,\n useClass: FloatingUiDomPosition\n};"]}
1
+ {"version":3,"file":"floatingUiDomPosition.service.js","sourceRoot":"","sources":["../../../../floating-ui/src/services/floatingUiDomPosition.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAA4C,cAAc,EAAE,iBAAiB,EAAqB,QAAQ,EAAyC,YAAY,EAAe,MAAM,eAAe,CAAC;AAC3M,OAAO,EAAC,MAAM,EA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;CAClC,CAAC;AAGF;;GAEG;AAEH,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAE3B,CAAA;AAFK,sBAAsB;IAD3B,YAAY,CAAC,oBAAoB,CAAC;GAC7B,sBAAsB,CAE3B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAiB,sBAAsB,CAAC","sourcesContent":["import {ClassProvider, Injectable} from '@angular/core';\nimport {Position, PositionResult, PositionOptions, PositionOffset, PositionPlacement, AutoUpdateOptions, POSITION, PositionOffsetString, PositionOffsets, TypeProvider, PositionType} from '@anglr/common';\nimport {extend, isEmptyObject, isFunction, isJsObject, isNumber, nameof} from '@jscrpt/common';\nimport {computePosition, Placement, autoUpdate, Middleware, offset, flip} from '@floating-ui/dom';\nimport {Observable} from 'rxjs';\n\n/**\n * Default options for `FloatingUiDomPosition` implementation\n */\nconst defaultOptions: PositionOptions =\n{\n autoUpdate: false,\n flip: false,\n offset: nameof<typeof PositionOffset>('None') as PositionOffsetString,\n placement: PositionPlacement.TopStart,\n};\n\n/**\n * Service that is used for positioning two elements against each other, using floating-ui dom implementation\n */\n@Injectable()\nexport class FloatingUiDomPosition implements Position\n{\n //######################### public methods - implementation of Position #########################\n\n /**\n * @inheritdoc\n */\n public placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Observable<PositionResult>\n {\n return new Observable(subscriber =>\n {\n (async () =>\n {\n const computedOptions = extend({}, defaultOptions, options);\n const middlewares: Middleware[] = [];\n\n this._setOffset(middlewares, computedOptions);\n this._setFlip(middlewares, computedOptions);\n\n const runComputation = async () =>\n {\n const result = await computePosition(source,\n target as HTMLElement,\n {\n placement: this._getPlacement(computedOptions),\n middleware: middlewares,\n });\n\n if(computedOptions.autoUpdate)\n {\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n }\n\n return result;\n };\n \n let dispose = () => {};\n\n if(computedOptions.autoUpdate)\n {\n let options: AutoUpdateOptions;\n\n if(computedOptions.autoUpdate === true)\n {\n options =\n {\n ancestorResize: true,\n ancestorScroll: true,\n elementResize: true\n };\n }\n else\n {\n options = computedOptions.autoUpdate;\n }\n\n dispose = autoUpdate(source,\n target as HTMLElement,\n runComputation,\n options);\n }\n\n const result = await runComputation();\n\n subscriber.next(\n {\n target,\n dispose,\n flip: !!result.middlewareData.flip && !isEmptyObject(result.middlewareData.flip),\n x: result.x,\n y: result.y\n });\n\n if(!computedOptions.autoUpdate)\n {\n subscriber.complete();\n }\n })();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets flip middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of flip\n */\n protected _setFlip(middlewares: Middleware[], options: PositionOptions): void\n {\n if(options.flip)\n {\n middlewares.push(flip());\n }\n }\n\n /**\n * Sets offset middleware\n * @param middlewares - Array of middlewares that will set\n * @param options - Options that contains definition of offset\n */\n protected _setOffset(middlewares: Middleware[], options: PositionOptions): void\n {\n //no offset\n if(options.offset === PositionOffset[PositionOffset.None])\n {\n return;\n }\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter])\n {\n //fallback if not supported placement used\n if(options.placement == PositionPlacement.Left ||\n options.placement == PositionPlacement.LeftStart ||\n options.placement == PositionPlacement.LeftEnd ||\n options.placement == PositionPlacement.Right ||\n options.placement == PositionPlacement.RightStart ||\n options.placement == PositionPlacement.RightEnd ||\n options.placement == PositionPlacement.Bottom ||\n options.placement == PositionPlacement.BottomEnd ||\n options.placement == PositionPlacement.Top ||\n options.placement == PositionPlacement.TopEnd)\n {\n options.placement = PositionPlacement.TopStart;\n }\n }\n\n middlewares.push(offset(({elements, placement, x, y}) =>\n {\n //offset is function\n if(isFunction(options.offset))\n {\n return options.offset({elements, x, y});\n }\n\n const floating = elements.floating as Element;\n\n if(options.offset === PositionOffset[PositionOffset.MouseEnter] && options.mouseEvent)\n {\n return {\n crossAxis: options.mouseEvent.x - (options.mouseEvent.target as HTMLElement).getBoundingClientRect().x\n };\n }\n\n const stringOffset = options.offset as PositionOffsetString|number;\n\n //offset is object\n if(isJsObject(options.offset))\n {\n return options.offset as PositionOffsets;\n }\n\n //offset is skidding number\n if(isNumber(stringOffset))\n {\n return {\n crossAxis: stringOffset,\n };\n }\n\n let dimension: number;\n\n if(placement == 'bottom' || placement == 'bottom-start' || placement == 'bottom-end' ||\n placement == 'top' || placement == 'top-start' || placement == 'top-end')\n {\n dimension = floating.clientWidth;\n }\n else\n {\n dimension = floating.clientHeight;\n }\n\n switch(stringOffset)\n {\n default:\n {\n dimension = 0;\n\n break;\n }\n case PositionOffset[PositionOffset.Full]:\n {\n break;\n }\n case PositionOffset[PositionOffset.Half]:\n {\n dimension /= 2;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeFull]:\n {\n dimension *= -1;\n\n break;\n }\n case PositionOffset[PositionOffset.NegativeHalf]:\n {\n dimension *= -.5;\n\n break;\n }\n }\n\n return {\n crossAxis: dimension\n };\n }));\n }\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 'top';\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}\n\n/**\n * Provider for floating ui position implementation\n */\nconst FLOATING_UI_POSITION: ClassProvider =\n{\n provide: POSITION,\n useClass: FloatingUiDomPosition\n};\n\n\n/**\n * Type that contains provider for floating ui position when used with `providePosition`\n */\n@TypeProvider(FLOATING_UI_POSITION)\nclass FloatingUiPositionType\n{\n}\n\n/**\n * Sets position to use floating ui position when used with `providePosition`\n */\nexport const FloatingUiPosition: PositionType = FloatingUiPositionType;"]}
@@ -77,7 +77,7 @@ class GroupErrorsComponent {
77
77
  this._initSubscriptions = null;
78
78
  }
79
79
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GroupErrorsComponent, deps: [{ token: i1.FormGroupDirective, optional: true }, { token: i1.FormGroupName, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
80
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: GroupErrorsComponent, selector: "form-group-errors", inputs: { cssClass: "cssClass" }, queries: [{ propertyName: "template", first: true, predicate: GroupErrorsTemplateDirective, descendants: true }], ngImport: i0, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage", "errors"], exportAs: ["errorMessage"] }, { kind: "pipe", type: i4.KeysPipe, name: "keys" }, { kind: "pipe", type: i5.WithErrorMessagePipe, name: "withErrorMessage" }], animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
80
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: GroupErrorsComponent, selector: "form-group-errors", inputs: { cssClass: "cssClass" }, queries: [{ propertyName: "template", first: true, predicate: GroupErrorsTemplateDirective, descendants: true }], ngImport: i0, template: "<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage", "errors"], exportAs: ["errorMessage"] }, { kind: "pipe", type: i4.KeysSAPipe, name: "keys" }, { kind: "pipe", type: i5.WithErrorMessagePipe, name: "withErrorMessage" }], animations: [slideInOutTrigger], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
81
  }
82
82
  export { GroupErrorsComponent };
83
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GroupErrorsComponent, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;AACH,MAOa,oBAAoB;IA+CK;IACA;IACZ;IA/CtB,sEAAsE;IAEtE;;OAEG;IACO,UAAU,CAAa;IAEjC;;OAEG;IACO,kBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAEhE;;OAEG;IACO,UAAU,CAAqB;IAEzC,2FAA2F;IAE3F;;;OAGG;IACH,IAAW,SAAS;QAEhB,OAAO,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAChG,CAAC;IAED,gFAAgF;IAEhF;;OAEG;IAEI,QAAQ,CAAS;IAExB,kFAAkF;IAElF;;OAEG;IAEI,QAAQ,CAAgC;IAE/C,iEAAiE;IACjE,YAAkC,kBAAsC,EACtC,aAA4B,EACxC,eAAkC;QAFtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAEpD,IAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,aAAa,EAClD;YACI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;IACL,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAEvE,IAAG,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,SAAS,EACjD;gBACI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;aACxC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;uGAnFQ,oBAAoB;2FAApB,oBAAoB,iIA2Cf,4BAA4B,gDC5D9C,sfAMe,irBDQC,CAAC,iBAAiB,CAAC;;SAGtB,oBAAoB;2FAApB,oBAAoB;kBAPhC,SAAS;+BAEI,mBAAmB,cAEjB,CAAC,iBAAiB,CAAC,mBACd,uBAAuB,CAAC,MAAM;;0BAiDlC,QAAQ;;0BACR,QAAQ;4EAZd,QAAQ;sBADd,KAAK;gBASC,QAAQ;sBADd,YAAY;uBAAC,4BAA4B","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, OnInit, OnDestroy, ChangeDetectorRef, Input, ContentChild} from '@angular/core';\nimport {FormControlStatus, FormGroup, FormGroupDirective, FormGroupName} from '@angular/forms';\nimport {slideInOutTrigger} from '@anglr/animations';\nimport {Subscription} from 'rxjs';\n\nimport {GroupErrorsTemplateDirective} from '../../directives';\n\n/**\n * Component used for rendering from group errors\n */\n@Component(\n{\n selector: 'form-group-errors',\n templateUrl: 'groupErrors.component.html',\n animations: [slideInOutTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GroupErrorsComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of currently used form group\n */\n protected _formGroup?: FormGroup;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n /**\n * Last state of form control\n */\n protected _lastState?: FormControlStatus;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Gets instance of currently used form group\n * @internal\n */\n public get formGroup(): FormGroup\n {\n return (this._formGroup ??= (this.formGroupDirective?.form ?? this.formGroupName?.control));\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Css classes that are applied to default rendered divs\n */\n @Input()\n public cssClass: string;\n\n //######################### public properties - children #########################\n\n /**\n * Custom template for rendering form group error\n */\n @ContentChild(GroupErrorsTemplateDirective)\n public template?: GroupErrorsTemplateDirective;\n\n //######################### constructor #########################\n constructor(@Optional() protected formGroupDirective: FormGroupDirective,\n @Optional() protected formGroupName: FormGroupName,\n protected _changeDetector: ChangeDetectorRef,)\n {\n if(!this.formGroupDirective && !this.formGroupName)\n {\n throw new Error('There is no parent formGroup or formGroupName directive');\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._initSubscriptions.add(this.formGroup.statusChanges.subscribe(state =>\n {\n if(this._lastState != state || state == 'INVALID')\n {\n this._lastState = state;\n this._changeDetector.detectChanges();\n }\n }));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._initSubscriptions?.unsubscribe();\n this._initSubscriptions = null;\n }\n}","<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>"]}
1
+ {"version":3,"file":"groupErrors.component.js","sourceRoot":"","sources":["../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.ts","../../../../../../../forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtI,OAAO,EAA+B,kBAAkB,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,4BAA4B,EAAC,MAAM,kBAAkB,CAAC;;;;;;;AAE9D;;GAEG;AACH,MAOa,oBAAoB;IA+CK;IACA;IACZ;IA/CtB,sEAAsE;IAEtE;;OAEG;IACO,UAAU,CAAa;IAEjC;;OAEG;IACO,kBAAkB,GAAiB,IAAI,YAAY,EAAE,CAAC;IAEhE;;OAEG;IACO,UAAU,CAAqB;IAEzC,2FAA2F;IAE3F;;;OAGG;IACH,IAAW,SAAS;QAEhB,OAAO,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAChG,CAAC;IAED,gFAAgF;IAEhF;;OAEG;IAEI,QAAQ,CAAS;IAExB,kFAAkF;IAElF;;OAEG;IAEI,QAAQ,CAAgC;IAE/C,iEAAiE;IACjE,YAAkC,kBAAsC,EACtC,aAA4B,EACxC,eAAkC;QAFtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QACxC,oBAAe,GAAf,eAAe,CAAmB;QAEpD,IAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,IAAI,CAAC,aAAa,EAClD;YACI,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;IACL,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAEvE,IAAG,IAAI,CAAC,UAAU,IAAI,KAAK,IAAI,KAAK,IAAI,SAAS,EACjD;gBACI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;aACxC;QACL,CAAC,CAAC,CAAC,CAAC;IACR,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAI,CAAC,kBAAkB,EAAE,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IACnC,CAAC;uGAnFQ,oBAAoB;2FAApB,oBAAoB,iIA2Cf,4BAA4B,gDC5D9C,sfAMe,mrBDQC,CAAC,iBAAiB,CAAC;;SAGtB,oBAAoB;2FAApB,oBAAoB;kBAPhC,SAAS;+BAEI,mBAAmB,cAEjB,CAAC,iBAAiB,CAAC,mBACd,uBAAuB,CAAC,MAAM;;0BAiDlC,QAAQ;;0BACR,QAAQ;4EAZd,QAAQ;sBADd,KAAK;gBASC,QAAQ;sBADd,YAAY;uBAAC,4BAA4B","sourcesContent":["import {Component, ChangeDetectionStrategy, Optional, OnInit, OnDestroy, ChangeDetectorRef, Input, ContentChild} from '@angular/core';\nimport {FormControlStatus, FormGroup, FormGroupDirective, FormGroupName} from '@angular/forms';\nimport {slideInOutTrigger} from '@anglr/animations';\nimport {Subscription} from 'rxjs';\n\nimport {GroupErrorsTemplateDirective} from '../../directives';\n\n/**\n * Component used for rendering from group errors\n */\n@Component(\n{\n selector: 'form-group-errors',\n templateUrl: 'groupErrors.component.html',\n animations: [slideInOutTrigger],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class GroupErrorsComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Instance of currently used form group\n */\n protected _formGroup?: FormGroup;\n\n /**\n * Subscriptions created during initialization\n */\n protected _initSubscriptions: Subscription = new Subscription();\n\n /**\n * Last state of form control\n */\n protected _lastState?: FormControlStatus;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Gets instance of currently used form group\n * @internal\n */\n public get formGroup(): FormGroup\n {\n return (this._formGroup ??= (this.formGroupDirective?.form ?? this.formGroupName?.control));\n }\n\n //######################### public properties - inputs #########################\n\n /**\n * Css classes that are applied to default rendered divs\n */\n @Input()\n public cssClass: string;\n\n //######################### public properties - children #########################\n\n /**\n * Custom template for rendering form group error\n */\n @ContentChild(GroupErrorsTemplateDirective)\n public template?: GroupErrorsTemplateDirective;\n\n //######################### constructor #########################\n constructor(@Optional() protected formGroupDirective: FormGroupDirective,\n @Optional() protected formGroupName: FormGroupName,\n protected _changeDetector: ChangeDetectorRef,)\n {\n if(!this.formGroupDirective && !this.formGroupName)\n {\n throw new Error('There is no parent formGroup or formGroupName directive');\n }\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this._initSubscriptions.add(this.formGroup.statusChanges.subscribe(state =>\n {\n if(this._lastState != state || state == 'INVALID')\n {\n this._lastState = state;\n this._changeDetector.detectChanges();\n }\n }));\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this._initSubscriptions?.unsubscribe();\n this._initSubscriptions = null;\n }\n}","<ng-template #defaultTemplate let-errorName>\n <div [ngClass]=\"cssClass\" [errorMessage]=\"errorName\" [errors]=\"formGroup.errors\" @slideInOut></div>\n</ng-template>\n\n<ng-container *ngFor=\"let errorName of formGroup.errors | keys | withErrorMessage; let first=first; let last=last; let index=index\">\n <ng-container *ngTemplateOutlet=\"template?.template ?? defaultTemplate; context: {$implicit: errorName, first, last, index, errors: formGroup.errors}\"></ng-container>\n</ng-container>"]}
@@ -1,31 +1,32 @@
1
- import { Directive, Input, EventEmitter, Output, ElementRef, Inject } from '@angular/core';
1
+ import { Directive, Input, EventEmitter, Output, ElementRef, Inject, NgZone } from '@angular/core';
2
2
  import { DOCUMENT } from '@angular/common';
3
3
  import { isDescendant, isString } from '@jscrpt/common';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Directive that handles click outside of element
7
7
  */
8
- class ClickOutsideDirective {
9
- _element;
10
- _document;
8
+ class ClickOutsideSADirective {
9
+ element;
10
+ document;
11
+ ngZone;
11
12
  //######################### protected fields #########################
12
13
  /**
13
14
  * Variable that is used for displaying element that handles click outside
14
15
  */
15
- _clickOutsideCondition;
16
+ ɵclickOutsideCondition = false;
16
17
  //######################### public properties - inputs #########################
17
18
  /**
18
19
  * Variable that is used for displaying element that handles click outside
19
20
  */
20
21
  get clickOutsideCondition() {
21
- return this._clickOutsideCondition;
22
+ return this.ɵclickOutsideCondition;
22
23
  }
23
24
  set clickOutsideCondition(value) {
24
25
  if (isString(value) && value === '') {
25
- this._clickOutsideCondition = true;
26
+ this.ɵclickOutsideCondition = true;
26
27
  return;
27
28
  }
28
- this._clickOutsideCondition = value;
29
+ this.ɵclickOutsideCondition = value;
29
30
  }
30
31
  /**
31
32
  * Additional element that is checked for click
@@ -37,32 +38,37 @@ class ClickOutsideDirective {
37
38
  */
38
39
  clickOutsideConditionChange = new EventEmitter();
39
40
  //######################### constructor #########################
40
- constructor(_element, _document) {
41
- this._element = _element;
42
- this._document = _document;
41
+ constructor(element, document, ngZone) {
42
+ this.element = element;
43
+ this.document = document;
44
+ this.ngZone = ngZone;
43
45
  }
44
46
  //######################### public methods - implementation of OnInit #########################
45
47
  /**
46
48
  * Initialize component
47
49
  */
48
50
  ngOnInit() {
49
- this._document.addEventListener('mouseup', this._handleClickOutside);
51
+ this.ngZone.runOutsideAngular(() => {
52
+ this.document.addEventListener('mouseup', this.handleClickOutside);
53
+ });
50
54
  }
51
55
  //######################### public methods - implementation of OnDestroy #########################
52
56
  /**
53
57
  * Called when component is destroyed
54
58
  */
55
59
  ngOnDestroy() {
56
- this._document.removeEventListener('mouseup', this._handleClickOutside);
60
+ this.ngZone.runOutsideAngular(() => {
61
+ this.document.removeEventListener('mouseup', this.handleClickOutside);
62
+ });
57
63
  }
58
64
  //######################### protected methods #########################
59
65
  /**
60
66
  * Handles click outside of element
61
67
  * @param event - Mouse event object
62
68
  */
63
- _handleClickOutside = (event) => {
64
- if (this._element.nativeElement != event.target &&
65
- !isDescendant(this._element.nativeElement, event.target) &&
69
+ handleClickOutside = (event) => {
70
+ if (this.element.nativeElement != event.target &&
71
+ !isDescendant(this.element.nativeElement, event.target) &&
66
72
  (!this.clickOutsideElement || (this.clickOutsideElement != event.target &&
67
73
  !isDescendant(this.clickOutsideElement, event.target)))) {
68
74
  this.clickOutsideCondition = !this.clickOutsideCondition;
@@ -74,19 +80,20 @@ class ClickOutsideDirective {
74
80
  * Custom input type for `clickOutsideCondition` input
75
81
  */
76
82
  static ngAcceptInputType_clickOutsideCondition;
77
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
78
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: { clickOutsideCondition: ["clickOutside", "clickOutsideCondition"], clickOutsideElement: "clickOutsideElement" }, outputs: { clickOutsideConditionChange: "clickOutsideChange" }, ngImport: i0 });
83
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ClickOutsideSADirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
84
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: ClickOutsideSADirective, isStandalone: true, selector: "[clickOutside]", inputs: { clickOutsideCondition: ["clickOutside", "clickOutsideCondition"], clickOutsideElement: "clickOutsideElement" }, outputs: { clickOutsideConditionChange: "clickOutsideChange" }, ngImport: i0 });
79
85
  }
80
- export { ClickOutsideDirective };
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ClickOutsideDirective, decorators: [{
86
+ export { ClickOutsideSADirective };
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ClickOutsideSADirective, decorators: [{
82
88
  type: Directive,
83
89
  args: [{
84
- selector: '[clickOutside]'
90
+ selector: '[clickOutside]',
91
+ standalone: true,
85
92
  }]
86
93
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: Document, decorators: [{
87
94
  type: Inject,
88
95
  args: [DOCUMENT]
89
- }] }]; }, propDecorators: { clickOutsideCondition: [{
96
+ }] }, { type: i0.NgZone }]; }, propDecorators: { clickOutsideCondition: [{
90
97
  type: Input,
91
98
  args: ['clickOutside']
92
99
  }], clickOutsideElement: [{
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickOutside.directive.js","sourceRoot":"","sources":["../../../../src/directives/clickOutside/clickOutside.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAqB,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACpH,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAEtD;;GAEG;AACH,MAKa,uBAAuB;IA8CV;IACkB;IAClB;IA9CtB,sEAAsE;IAEtE;;OAEG;IACO,sBAAsB,GAAY,KAAK,CAAC;IAElD,gFAAgF;IAEhF;;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,CAAC;YACtE,CAAC,CAAC,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,IAAI,KAAK,CAAC,MAAM;gBACxC,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,MAAqB,CAAC,CAAC,CAAC,EACxG;YACI,IAAI,CAAC,qBAAqB,GAAG,CAAC,IAAI,CAAC,qBAAqB,CAAC;YACzD,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACrE;IACL,CAAC,CAAA;IAED,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,uCAAuC,CAAa;uGArGzD,uBAAuB,4CA+CZ,QAAQ;2FA/CnB,uBAAuB;;SAAvB,uBAAuB;2FAAvB,uBAAuB;kBALnC,SAAS;mBACV;oBACI,QAAQ,EAAE,gBAAgB;oBAC1B,UAAU,EAAE,IAAI;iBACnB;;0BAgDgB,MAAM;2BAAC,QAAQ;iEAhCjB,qBAAqB;sBAD/B,KAAK;uBAAC,cAAc;gBAqBd,mBAAmB;sBADzB,KAAK;gBASC,2BAA2B;sBADjC,MAAM;uBAAC,oBAAoB","sourcesContent":["import {Directive, OnInit, OnDestroy, Input, EventEmitter, Output, ElementRef, Inject, NgZone} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {isDescendant, isString} from '@jscrpt/common';\n\n/**\n * Directive that handles click outside of element\n */\n@Directive(\n{\n selector: '[clickOutside]',\n standalone: true,\n})\nexport class ClickOutsideSADirective implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Variable that is used for displaying element that handles click outside\n */\n protected ɵclickOutsideCondition: boolean = false;\n\n //######################### public properties - inputs #########################\n\n /**\n * Variable that is used for displaying element that handles click outside\n */\n @Input('clickOutside')\n public get clickOutsideCondition(): boolean\n {\n return this.ɵclickOutsideCondition;\n }\n public set clickOutsideCondition(value: boolean)\n {\n if(isString(value) && value === '')\n {\n this.ɵclickOutsideCondition = true;\n\n return;\n }\n\n this.ɵclickOutsideCondition = value;\n }\n\n /**\n * Additional element that is checked for click\n */\n @Input()\n public clickOutsideElement: HTMLElement|undefined|null;\n\n //######################### public properties - outputs #########################\n\n /**\n * Used for emitting event when click outside occurs\n */\n @Output('clickOutsideChange')\n public clickOutsideConditionChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n //######################### constructor #########################\n constructor(protected element: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) protected document: Document,\n protected ngZone: NgZone,)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.ngZone.runOutsideAngular(() =>\n {\n this.document.addEventListener('mouseup', this.handleClickOutside);\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.ngZone.runOutsideAngular(() =>\n {\n this.document.removeEventListener('mouseup', this.handleClickOutside);\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Handles click outside of element\n * @param event - Mouse event object\n */\n protected handleClickOutside = (event: MouseEvent) =>\n {\n if(this.element.nativeElement != event.target &&\n !isDescendant(this.element.nativeElement, event.target as HTMLElement) &&\n (!this.clickOutsideElement || (this.clickOutsideElement != event.target &&\n !isDescendant(this.clickOutsideElement, event.target as HTMLElement))))\n { \n this.clickOutsideCondition = !this.clickOutsideCondition;\n this.clickOutsideConditionChange.emit(this.clickOutsideCondition);\n }\n }\n\n //######################### ng language server #########################\n \n /**\n * Custom input type for `clickOutsideCondition` input\n */\n public static ngAcceptInputType_clickOutsideCondition: boolean|'';\n}"]}
@@ -5,7 +5,7 @@ import * as i1 from "@angular/common";
5
5
  /**
6
6
  * Directive that performs browser back button action on click
7
7
  */
8
- class GoBackDirective {
8
+ class GoBackSADirective {
9
9
  _location;
10
10
  //######################### constructor #########################
11
11
  constructor(_location) {
@@ -21,14 +21,15 @@ class GoBackDirective {
21
21
  event.stopPropagation();
22
22
  this._location.back();
23
23
  }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GoBackDirective, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: GoBackDirective, selector: "[goBack]", host: { listeners: { "click": "goBack($event)" } }, ngImport: i0 });
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GoBackSADirective, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: GoBackSADirective, isStandalone: true, selector: "[goBack]", host: { listeners: { "click": "goBack($event)" } }, ngImport: i0 });
26
26
  }
27
- export { GoBackDirective };
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GoBackDirective, decorators: [{
27
+ export { GoBackSADirective };
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GoBackSADirective, decorators: [{
29
29
  type: Directive,
30
30
  args: [{
31
- selector: '[goBack]'
31
+ selector: '[goBack]',
32
+ standalone: true,
32
33
  }]
33
34
  }], ctorParameters: function () { return [{ type: i1.Location }]; }, propDecorators: { goBack: [{
34
35
  type: HostListener,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"goBack.directive.js","sourceRoot":"","sources":["../../../../src/directives/goBack/goBack.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;;;AAEzC;;GAEG;AACH,MAKa,iBAAiB;IAGN;IADpB,iEAAiE;IACjE,YAAoB,SAAmB;QAAnB,cAAS,GAAT,SAAS,CAAU;IAEvC,CAAC;IAED,2EAA2E;IAE3E;;;OAGG;IAEI,MAAM,CAAC,KAAiB;QAE3B,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QAExB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC1B,CAAC;uGApBQ,iBAAiB;2FAAjB,iBAAiB;;SAAjB,iBAAiB;2FAAjB,iBAAiB;kBAL7B,SAAS;mBACV;oBACI,QAAQ,EAAE,UAAU;oBACpB,UAAU,EAAE,IAAI;iBACnB;+FAeU,MAAM;sBADZ,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import {Directive, HostListener} from '@angular/core';\nimport {Location} from '@angular/common';\n\n/**\n * Directive that performs browser back button action on click\n */\n@Directive(\n{\n selector: '[goBack]',\n standalone: true,\n})\nexport class GoBackSADirective\n{\n //######################### constructor #########################\n constructor(private _location: Location)\n {\n }\n\n //######################### public methods - host #########################\n\n /**\n * Navigates back in browser\n * @param event - Mouse event that occured\n */\n @HostListener('click', ['$event'])\n public goBack(event: MouseEvent): void\n {\n event.preventDefault();\n event.stopPropagation();\n\n this._location.back();\n }\n}"]}
@@ -1,12 +1,12 @@
1
1
  import { Directive, Input, ElementRef, Inject, Output, EventEmitter } from '@angular/core';
2
2
  import { nameof, isPresent, isString } from '@jscrpt/common';
3
- import { applyPositionResult, PositionPlacement } from '../../../../services/position';
4
- import { POSITION } from '../../../../types/tokens';
3
+ import { applyPositionResult, PositionPlacement } from '../../services/position';
4
+ import { POSITION } from '../../types/tokens';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
7
7
  * Sets position of attached element relative to provided element
8
8
  */
9
- class PositionToDirective {
9
+ class PositionToSADirective {
10
10
  target;
11
11
  position;
12
12
  //######################### protected fields #########################
@@ -126,14 +126,15 @@ class PositionToDirective {
126
126
  * Custom input type for `source` input
127
127
  */
128
128
  static ngAcceptInputType_source;
129
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PositionToDirective, deps: [{ token: i0.ElementRef }, { token: POSITION }], target: i0.ɵɵFactoryTarget.Directive });
130
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: PositionToDirective, selector: "[positionTo]", inputs: { source: ["positionTo", "source"], placement: "placement", offset: "offset", autoUpdate: "autoUpdate" }, outputs: { flip: "flip", done: "done" }, usesOnChanges: true, ngImport: i0 });
129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PositionToSADirective, deps: [{ token: i0.ElementRef }, { token: POSITION }], target: i0.ɵɵFactoryTarget.Directive });
130
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: PositionToSADirective, isStandalone: true, selector: "[positionTo]", inputs: { source: ["positionTo", "source"], placement: "placement", offset: "offset", autoUpdate: "autoUpdate" }, outputs: { flip: "flip", done: "done" }, usesOnChanges: true, ngImport: i0 });
131
131
  }
132
- export { PositionToDirective };
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PositionToDirective, decorators: [{
132
+ export { PositionToSADirective };
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PositionToSADirective, decorators: [{
134
134
  type: Directive,
135
135
  args: [{
136
- selector: '[positionTo]'
136
+ selector: '[positionTo]',
137
+ standalone: true,
137
138
  }]
138
139
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
139
140
  type: Inject,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionTo.directive.js","sourceRoot":"","sources":["../../../../src/directives/positionTo/positionTo.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAA4B,MAAM,EAAE,MAAM,EAAE,YAAY,EAAY,MAAM,eAAe,CAAC;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CAAkE;IAE3G,wEAAwE;IAExE;;OAEG;IACI,MAAM,CAAC,wBAAwB,CAAsC;uGA9KnE,qBAAqB,4CAyFV,QAAQ;2FAzFnB,qBAAqB;;SAArB,qBAAqB;2FAArB,qBAAqB;kBALjC,SAAS;mBACV;oBACI,QAAQ,EAAE,cAAc;oBACxB,UAAU,EAAE,IAAI;iBACnB;;0BA0FgB,MAAM;2BAAC,QAAQ;4CAhEjB,MAAM;sBADhB,KAAK;uBAAC,YAAY;gBAqBR,SAAS;sBADnB,KAAK;gBAqBC,MAAM;sBADZ,KAAK;gBAOC,UAAU;sBADhB,KAAK;gBASC,IAAI;sBADV,MAAM;gBAOA,IAAI;sBADV,MAAM","sourcesContent":["import {Directive, Input, ElementRef, OnChanges, SimpleChanges, Inject, Output, EventEmitter, OnDestroy} from '@angular/core';\nimport {nameof, isPresent, isString, Func1, NoopAction} from '@jscrpt/common';\n\nimport {applyPositionResult, Position, PositionPlacement, PositionOptions, PositionOffsetString, PositionOffsets, PositionArguments, AutoUpdateOptions} from '../../services/position';\nimport {POSITION} from '../../types/tokens';\n\n/**\n * Sets position of attached element relative to provided element\n */\n@Directive(\n{\n selector: '[positionTo]',\n standalone: true,\n})\nexport class PositionToSADirective implements OnChanges, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Position placement value\n */\n protected ɵPlacement: PositionPlacement|undefined|null;\n\n /**\n * Html element which is used as source for positioning\n */\n protected ɵSource: HTMLElement|undefined|null;\n\n /**\n * Method used for disposing auto positioning\n */\n protected dispose: NoopAction|undefined|null;\n\n //######################### public properties - inputs #########################\n\n /**\n * Gets or sets html element which is used as source for positioning\n */\n @Input('positionTo')\n public get source(): HTMLElement|undefined|null\n {\n return this.ɵSource;\n }\n public set source(value: HTMLElement|undefined|null)\n {\n if(value instanceof ElementRef)\n {\n this.ɵSource = (value as ElementRef).nativeElement;\n\n return;\n }\n\n this.ɵSource = value;\n }\n\n /**\n * Gets or sets position placement value\n */\n @Input()\n public get placement(): PositionPlacement|undefined|null\n {\n return this.ɵPlacement;\n }\n public set placement(value: PositionPlacement|undefined|null)\n {\n if(isString(value))\n {\n this.ɵPlacement = PositionPlacement[value as keyof typeof PositionPlacement];\n\n return;\n }\n\n this.ɵPlacement = value;\n }\n\n /**\n * Offset which allows moving target element along the cross axis of placement, or any chosed direction\n */\n @Input()\n public offset: PositionOffsetString|number|PositionOffsets|Func1<number|PositionOffsets, PositionArguments> = 'None';\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n @Input()\n public autoUpdate: boolean|AutoUpdateOptions = true;\n\n //######################### public properties - outputs #########################\n\n /**\n * Occurs when flip occurs during positioning\n */\n @Output()\n public flip: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Occurs when element was positioned\n */\n @Output()\n public done: EventEmitter<void> = new EventEmitter<void>();\n\n //######################### constructor #########################\n constructor(protected target: ElementRef<HTMLElement>,\n @Inject(POSITION) protected position: Position)\n {\n }\n\n //######################### public methods - implementation of OnChanges #########################\n\n /**\n * Called when input value changes\n */\n public ngOnChanges(changes: SimpleChanges): void\n {\n if((nameof<PositionToSADirective>('source') in changes ||\n nameof<PositionToSADirective>('placement') in changes) &&\n isPresent(this.source))\n {\n this._applyPosition();\n }\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.dispose?.();\n }\n\n //######################### protected methods #########################\n\n /**\n * Applies position according to specified parameters to specified elements\n */\n protected _applyPosition(): void\n {\n if(!this.ɵSource)\n {\n return;\n }\n\n const options: Partial<PositionOptions> =\n {\n flip: true,\n autoUpdate: this.autoUpdate,\n offset: this.offset,\n };\n\n if(this.ɵPlacement)\n {\n options.placement = this.ɵPlacement;\n }\n\n this.dispose?.();\n\n this.position.placeElement(this.target.nativeElement,\n this.ɵSource,\n options)\n .subscribe(result =>\n {\n this.dispose = result.dispose;\n\n applyPositionResult(result);\n\n if(result.flip)\n {\n this.flip.emit();\n }\n\n this.done.emit();\n });\n }\n\n //######################### ng language server #########################\n\n /**\n * Custom input type for `placement` input\n */\n public static ngAcceptInputType_placement: PositionPlacement|undefined|null|keyof typeof PositionPlacement;\n\n //######################### ng language server #########################\n\n /**\n * Custom input type for `source` input\n */\n public static ngAcceptInputType_source: HTMLElement|ElementRef<HTMLElement>;\n}\n"]}
@@ -5,15 +5,11 @@ export { CommonUtilsModule } from './modules/commonUtils.module';
5
5
  export { DebugDataModule } from './modules/debugData/modules/debugData.module';
6
6
  export { DebugDataComponent } from './modules/debugData/components/debugData/debugData.component';
7
7
  export { DebugDataEnabledService } from './modules/debugData/services/debugDataEnabled/debugDataEnabled.service';
8
- export { ClickOutsideDirective } from './modules/clickOutside/directives/clickOutside/clickOutside.directive';
9
- export { ClickOutsideModule } from './modules/clickOutside/modules/clickOutside.module';
10
8
  export { MultiButtonComponent } from './modules/multiButton/components/multiButton/multiButton.component';
11
9
  export { MULTI_BUTTON_CSS_CLASSES } from './modules/multiButton/misc/tokens';
12
10
  export { MultiButtonModule } from './modules/multiButton/modules/multiButton.module';
13
11
  export * from './decorators';
14
12
  export * from './modules/castPipes';
15
- export * from './modules/goBack';
16
- export * from './modules/position';
17
13
  export * from './modules/progressIndicator';
18
14
  export * from './modules/tooltip';
19
15
  export * from './pipes';
@@ -29,6 +25,9 @@ export { CookiePermanentStorageService, CookiePermanentStorage } from './service
29
25
  export { MemoryTemporaryStorageService } from './services/temporaryStorage';
30
26
  export { NoStringLocalizationService } from './services/stringLocalization';
31
27
  export * from './directives/bodyRender/bodyRender.directive';
28
+ export * from './directives/clickOutside/clickOutside.directive';
29
+ export * from './directives/goBack/goBack.directive';
30
+ export * from './directives/positionTo/positionTo.directive';
32
31
  export { NgComponentOutletEx } from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';
33
32
  export { APP_STABLE, extractAppStableResolve, runWhenModuleStable, runWhenAppStable } from './utils';
34
33
  export { DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, NotificationsOptions } from './services/notif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;AAC1I,OAAO,EAAC,6BAA6B,EAAyC,MAAM,6BAA6B,CAAC;AAClH,OAAO,EAAC,2BAA2B,EAA6C,MAAM,+BAA+B,CAAC;AAEtH,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,SAAS,CAAC;AACnG,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 {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 './decorators';\nexport * from './modules/castPipes';\nexport * from './modules/goBack';\nexport * from './modules/position';\nexport * from './modules/progressIndicator';\nexport * from './modules/tooltip';\nexport * from './pipes';\nexport * from './types/host';\nexport * from './types/styles';\nexport * from './types/tokens';\nexport * from './types/providers';\nexport * from './types/providerDecoratedType';\nexport * from './utils';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage, PermanentStorageType, CookiePermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage, TemporaryStorageType} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization, StringLocalizationType} from './services/stringLocalization';\nexport {Logger, LoggerType} from './services/logger';\nexport * from './directives/bodyRender/bodyRender.directive';\nexport {NgComponentOutletEx} from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';\nexport {APP_STABLE, extractAppStableResolve, runWhenModuleStable, runWhenAppStable} from './utils';\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"]}
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,OAAO,EAAC,eAAe,EAAC,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAC,kBAAkB,EAAC,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,oBAAoB,EAAC,MAAM,oEAAoE,CAAC;AAExG,OAAO,EAAC,wBAAwB,EAAC,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,kDAAkD,CAAC;AACnF,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAA0C,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAC1I,OAAO,EAAC,6BAA6B,EAAyC,MAAM,6BAA6B,CAAC;AAClH,OAAO,EAAC,2BAA2B,EAA6C,MAAM,+BAA+B,CAAC;AAEtH,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,SAAS,CAAC;AACnG,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 {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 {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 './decorators';\nexport * from './modules/castPipes';\nexport * from './modules/progressIndicator';\nexport * from './modules/tooltip';\nexport * from './pipes';\nexport * from './types/host';\nexport * from './types/styles';\nexport * from './types/tokens';\nexport * from './types/providers';\nexport * from './types/providerDecoratedType';\nexport * from './utils';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage, PermanentStorageType, CookiePermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage, TemporaryStorageType} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization, StringLocalizationType} from './services/stringLocalization';\nexport {Logger, LoggerType} from './services/logger';\nexport * from './directives/bodyRender/bodyRender.directive';\nexport * from './directives/clickOutside/clickOutside.directive';\nexport * from './directives/goBack/goBack.directive';\nexport * from './directives/positionTo/positionTo.directive';\nexport {NgComponentOutletEx} from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';\nexport {APP_STABLE, extractAppStableResolve, runWhenModuleStable, runWhenAppStable} from './utils';\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"]}
@@ -1,39 +1,39 @@
1
1
  import { NgModule } from '@angular/core';
2
- import { IsNaNPipe, IsPresentPipe, UrlEncodePipe, MergeCssClassesPipe, KeysPipe } from '../pipes';
2
+ import { IsNaNSAPipe, IsPresentSAPipe, UrlEncodeSAPipe, MergeCssClassesSAPipe, KeysSAPipe } from '../pipes';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Module for common utility stuff
6
6
  */
7
7
  class CommonUtilsModule {
8
8
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CommonUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: CommonUtilsModule, declarations: [IsNaNPipe,
10
- IsPresentPipe,
11
- UrlEncodePipe,
12
- MergeCssClassesPipe,
13
- KeysPipe], exports: [IsNaNPipe,
14
- IsPresentPipe,
15
- UrlEncodePipe,
16
- MergeCssClassesPipe,
17
- KeysPipe] });
9
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: CommonUtilsModule, imports: [IsNaNSAPipe,
10
+ IsPresentSAPipe,
11
+ UrlEncodeSAPipe,
12
+ MergeCssClassesSAPipe,
13
+ KeysSAPipe], exports: [IsNaNSAPipe,
14
+ IsPresentSAPipe,
15
+ UrlEncodeSAPipe,
16
+ MergeCssClassesSAPipe,
17
+ KeysSAPipe] });
18
18
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CommonUtilsModule });
19
19
  }
20
20
  export { CommonUtilsModule };
21
21
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CommonUtilsModule, decorators: [{
22
22
  type: NgModule,
23
23
  args: [{
24
- declarations: [
25
- IsNaNPipe,
26
- IsPresentPipe,
27
- UrlEncodePipe,
28
- MergeCssClassesPipe,
29
- KeysPipe,
24
+ imports: [
25
+ IsNaNSAPipe,
26
+ IsPresentSAPipe,
27
+ UrlEncodeSAPipe,
28
+ MergeCssClassesSAPipe,
29
+ KeysSAPipe,
30
30
  ],
31
31
  exports: [
32
- IsNaNPipe,
33
- IsPresentPipe,
34
- UrlEncodePipe,
35
- MergeCssClassesPipe,
36
- KeysPipe,
32
+ IsNaNSAPipe,
33
+ IsPresentSAPipe,
34
+ UrlEncodeSAPipe,
35
+ MergeCssClassesSAPipe,
36
+ KeysSAPipe,
37
37
  ]
38
38
  }]
39
39
  }] });