@kms-ngx-ui/presentational 0.0.23 → 13.0.0
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/README.md +28 -28
- package/{esm2015/kms-ngx-ui-presentational.js → esm2020/kms-ngx-ui-presentational.mjs} +4 -4
- package/{esm2015/lib/directives/directives.module.js → esm2020/lib/directives/directives.module.mjs} +40 -40
- package/{esm2015/lib/directives/mousewheel.directive.js → esm2020/lib/directives/mousewheel.directive.mjs} +56 -56
- package/{esm2015/lib/directives/sum-of-height.directive.js → esm2020/lib/directives/sum-of-height.directive.mjs} +74 -74
- package/{esm2015/lib/directives/swipe.directive.js → esm2020/lib/directives/swipe.directive.mjs} +183 -183
- package/esm2020/lib/directives/swipe.model.mjs +5 -0
- package/{esm2015/lib/directives/tooltip.directive.js → esm2020/lib/directives/tooltip.directive.mjs} +144 -144
- package/{esm2015/lib/kms-ngx-ui-presentational.component.js → esm2020/lib/kms-ngx-ui-presentational.component.mjs} +26 -26
- package/{esm2015/lib/kms-ngx-ui-presentational.module.js → esm2020/lib/kms-ngx-ui-presentational.module.mjs} +217 -217
- package/{esm2015/lib/kms-ngx-ui-presentational.service.js → esm2020/lib/kms-ngx-ui-presentational.service.mjs} +14 -14
- package/esm2020/lib/models/address.model.mjs +6 -0
- package/{esm2015/lib/models/iconSize.enum.js → esm2020/lib/models/iconSize.enum.mjs} +17 -17
- package/{esm2015/lib/models/image-snippet.model.js → esm2020/lib/models/image-snippet.model.mjs} +18 -18
- package/{esm2015/lib/models/index.js → esm2020/lib/models/index.mjs} +5 -5
- package/{esm2015/lib/models/is-value.function.js → esm2020/lib/models/is-value.function.mjs} +17 -17
- package/{esm2015/lib/models/salutation.enum.js → esm2020/lib/models/salutation.enum.mjs} +8 -8
- package/{esm2015/lib/models/types/attached-file-dto.model.js → esm2020/lib/models/types/attached-file-dto.model.mjs} +6 -6
- package/{esm2015/lib/models/types/nullable.type.js → esm2020/lib/models/types/nullable.type.mjs} +5 -5
- package/{esm2015/lib/parent-components/actions.component.js → esm2020/lib/parent-components/actions.component.mjs} +56 -56
- package/{esm2015/lib/parent-components/form-control.component.js → esm2020/lib/parent-components/form-control.component.mjs} +75 -75
- package/{esm2015/lib/parent-components/form.component.js → esm2020/lib/parent-components/form.component.mjs} +78 -78
- package/{esm2015/lib/pipes/custom-pipes.module.js → esm2020/lib/pipes/custom-pipes.module.mjs} +71 -71
- package/{esm2015/lib/pipes/decode-uri.pipe.js → esm2020/lib/pipes/decode-uri.pipe.mjs} +19 -19
- package/{esm2015/lib/pipes/encode-uri.pipe.js → esm2020/lib/pipes/encode-uri.pipe.mjs} +19 -19
- package/{esm2015/lib/pipes/integer-currency.pipe.js → esm2020/lib/pipes/integer-currency.pipe.mjs} +27 -27
- package/{esm2015/lib/pipes/safe-html.pipe.js → esm2020/lib/pipes/safe-html.pipe.mjs} +23 -23
- package/{esm2015/lib/pipes/safe-resource-url.pipe.js → esm2020/lib/pipes/safe-resource-url.pipe.mjs} +23 -23
- package/{esm2015/lib/pipes/safe-style.pipe.js → esm2020/lib/pipes/safe-style.pipe.mjs} +23 -23
- package/{esm2015/lib/pipes/safe-url.pipe.js → esm2020/lib/pipes/safe-url.pipe.mjs} +23 -23
- package/{esm2015/lib/pipes/to-number.pipe.js → esm2020/lib/pipes/to-number.pipe.mjs} +23 -23
- package/{esm2015/lib/pipes/trim.pipe.js → esm2020/lib/pipes/trim.pipe.mjs} +20 -20
- package/{esm2015/lib/pipes/typeof.pipe.js → esm2020/lib/pipes/typeof.pipe.mjs} +16 -16
- package/{esm2015/lib/services/viewport.service.js → esm2020/lib/services/viewport.service.mjs} +216 -216
- package/esm2020/lib/ui/back-to-top/back-to-top.component.mjs +49 -0
- package/{esm2015/lib/ui/button-with-confirm-dialog/button-response-types.enum.js → esm2020/lib/ui/button-with-confirm-dialog/button-response-types.enum.mjs} +6 -6
- package/esm2020/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.mjs +58 -0
- package/{esm2015/lib/ui/button-with-confirm-dialog/dialog-data.model.js → esm2020/lib/ui/button-with-confirm-dialog/dialog-data.model.mjs} +2 -2
- package/esm2020/lib/ui/checkbox/checkbox.component.mjs +71 -0
- package/esm2020/lib/ui/color-input/color-input.component.mjs +76 -0
- package/esm2020/lib/ui/dropdown-from-data/dropdown-from-data.component.mjs +165 -0
- package/esm2020/lib/ui/enum-radiogroup/enum-radiogroup.component.mjs +53 -0
- package/esm2020/lib/ui/file-input/file-input.component.mjs +232 -0
- package/esm2020/lib/ui/flyout/flyout.component.mjs +119 -0
- package/esm2020/lib/ui/generic-dialog/generic-dialog.component.mjs +54 -0
- package/esm2020/lib/ui/icon/icon.component.mjs +48 -0
- package/{esm2015/lib/ui/icon/iconSize.enum.js → esm2020/lib/ui/icon/iconSize.enum.mjs} +17 -17
- package/esm2020/lib/ui/image-slider/image-slider.component.mjs +189 -0
- package/esm2020/lib/ui/kms-accordion-item/kms-accordion-item.component.mjs +40 -0
- package/esm2020/lib/ui/loader/loader.component.mjs +21 -0
- package/esm2020/lib/ui/map/map.component.mjs +116 -0
- package/esm2020/lib/ui/radiobutton/radiobutton.component.mjs +73 -0
- package/esm2020/lib/ui/salutation-dropdown/salutation-dropdown.component.mjs +55 -0
- package/esm2020/lib/ui/salutation-radiogroup/salutation-radiogroup.component.mjs +49 -0
- package/esm2020/lib/ui/time-input/time-input.component.mjs +83 -0
- package/esm2020/lib/ui/tooltip/tooltip.component.mjs +16 -0
- package/esm2020/lib/ui/tooltip-icon/tooltip-icon.component.mjs +35 -0
- package/esm2020/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.mjs +82 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +49 -49
- package/fesm2015/kms-ngx-ui-presentational.mjs +3019 -0
- package/fesm2015/kms-ngx-ui-presentational.mjs.map +1 -0
- package/{fesm2015/kms-ngx-ui-presentational.js → fesm2020/kms-ngx-ui-presentational.mjs} +2869 -2958
- package/fesm2020/kms-ngx-ui-presentational.mjs.map +1 -0
- package/kms-ngx-ui-presentational.d.ts +5 -5
- package/lib/directives/directives.module.d.ts +11 -11
- package/lib/directives/mousewheel.directive.d.ts +15 -15
- package/lib/directives/sum-of-height.directive.d.ts +31 -31
- package/lib/directives/swipe.directive.d.ts +45 -45
- package/lib/directives/swipe.model.d.ts +49 -49
- package/lib/directives/tooltip.directive.d.ts +29 -29
- package/lib/kms-ngx-ui-presentational.component.d.ts +8 -8
- package/lib/kms-ngx-ui-presentational.module.d.ts +47 -47
- package/lib/kms-ngx-ui-presentational.service.d.ts +6 -6
- package/lib/models/address.model.d.ts +14 -14
- package/lib/models/iconSize.enum.d.ts +15 -15
- package/lib/models/image-snippet.model.d.ts +15 -15
- package/lib/models/index.d.ts +4 -4
- package/lib/models/is-value.function.d.ts +9 -9
- package/lib/models/salutation.enum.d.ts +5 -5
- package/lib/models/types/attached-file-dto.model.d.ts +11 -11
- package/lib/models/types/nullable.type.d.ts +4 -4
- package/lib/parent-components/actions.component.d.ts +31 -31
- package/lib/parent-components/form-control.component.d.ts +27 -27
- package/lib/parent-components/form.component.d.ts +34 -34
- package/lib/pipes/custom-pipes.module.d.ts +17 -17
- package/lib/pipes/decode-uri.pipe.d.ts +10 -10
- package/lib/pipes/encode-uri.pipe.d.ts +10 -10
- package/lib/pipes/integer-currency.pipe.d.ts +13 -13
- package/lib/pipes/safe-html.pipe.d.ts +13 -13
- package/lib/pipes/safe-resource-url.pipe.d.ts +13 -13
- package/lib/pipes/safe-style.pipe.d.ts +13 -13
- package/lib/pipes/safe-url.pipe.d.ts +13 -13
- package/lib/pipes/to-number.pipe.d.ts +10 -10
- package/lib/pipes/trim.pipe.d.ts +10 -10
- package/lib/pipes/typeof.pipe.d.ts +7 -7
- package/lib/services/viewport.service.d.ts +74 -74
- package/lib/ui/back-to-top/back-to-top.component.d.ts +10 -10
- package/lib/ui/button-with-confirm-dialog/button-response-types.enum.d.ts +4 -4
- package/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.d.ts +19 -19
- package/lib/ui/button-with-confirm-dialog/dialog-data.model.d.ts +9 -9
- package/lib/ui/checkbox/checkbox.component.d.ts +31 -31
- package/lib/ui/color-input/color-input.component.d.ts +19 -19
- package/lib/ui/dropdown-from-data/dropdown-from-data.component.d.ts +55 -55
- package/lib/ui/enum-radiogroup/enum-radiogroup.component.d.ts +17 -17
- package/lib/ui/file-input/file-input.component.d.ts +89 -89
- package/lib/ui/flyout/flyout.component.d.ts +32 -32
- package/lib/ui/generic-dialog/generic-dialog.component.d.ts +26 -26
- package/lib/ui/icon/icon.component.d.ts +42 -42
- package/lib/ui/icon/iconSize.enum.d.ts +15 -15
- package/lib/ui/image-slider/image-slider.component.d.ts +62 -62
- package/lib/ui/kms-accordion-item/kms-accordion-item.component.d.ts +22 -22
- package/lib/ui/loader/loader.component.d.ts +9 -9
- package/lib/ui/map/map.component.d.ts +69 -69
- package/lib/ui/radiobutton/radiobutton.component.d.ts +26 -26
- package/lib/ui/salutation-dropdown/salutation-dropdown.component.d.ts +17 -17
- package/lib/ui/salutation-radiogroup/salutation-radiogroup.component.d.ts +15 -15
- package/lib/ui/time-input/time-input.component.d.ts +22 -22
- package/lib/ui/tooltip/tooltip.component.d.ts +6 -6
- package/lib/ui/tooltip-icon/tooltip-icon.component.d.ts +13 -13
- package/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.d.ts +27 -27
- package/package.json +25 -12
- package/public-api.d.ts +45 -45
- package/src/lib/ui/back-to-top/back-to-top.component.scss +46 -46
- package/src/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.scss +2 -2
- package/src/lib/ui/checkbox/checkbox.component.scss +48 -48
- package/src/lib/ui/color-input/color-input.component.scss +38 -38
- package/src/lib/ui/file-input/file-input.component.scss +2 -2
- package/src/lib/ui/flyout/flyout.component.scss +34 -34
- package/src/lib/ui/generic-dialog/generic-dialog.component.scss +59 -59
- package/src/lib/ui/icon/icon.component.scss +148 -148
- package/src/lib/ui/image-slider/image-slider.component.scss +219 -219
- package/src/lib/ui/kms-accordion-item/kms-accordion-item.component.scss +95 -95
- package/src/lib/ui/radiobutton/radiobutton.component.scss +31 -31
- package/src/lib/ui/time-input/time-input.component.scss +10 -10
- package/src/lib/ui/tooltip/tooltip.component.scss +26 -26
- package/src/lib/ui/tooltip-icon/tooltip-icon.component.scss +2 -2
- package/src/styles/mixins.scss +8 -8
- package/src/styles/styles.scss +30 -30
- package/bundles/kms-ngx-ui-presentational.umd.js +0 -3628
- package/bundles/kms-ngx-ui-presentational.umd.js.map +0 -1
- package/esm2015/lib/directives/swipe.model.js +0 -5
- package/esm2015/lib/models/address.model.js +0 -6
- package/esm2015/lib/ui/back-to-top/back-to-top.component.js +0 -52
- package/esm2015/lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component.js +0 -62
- package/esm2015/lib/ui/checkbox/checkbox.component.js +0 -76
- package/esm2015/lib/ui/color-input/color-input.component.js +0 -81
- package/esm2015/lib/ui/dropdown-from-data/dropdown-from-data.component.js +0 -169
- package/esm2015/lib/ui/enum-radiogroup/enum-radiogroup.component.js +0 -57
- package/esm2015/lib/ui/file-input/file-input.component.js +0 -237
- package/esm2015/lib/ui/flyout/flyout.component.js +0 -124
- package/esm2015/lib/ui/generic-dialog/generic-dialog.component.js +0 -58
- package/esm2015/lib/ui/icon/icon.component.js +0 -52
- package/esm2015/lib/ui/image-slider/image-slider.component.js +0 -193
- package/esm2015/lib/ui/kms-accordion-item/kms-accordion-item.component.js +0 -44
- package/esm2015/lib/ui/loader/loader.component.js +0 -25
- package/esm2015/lib/ui/map/map.component.js +0 -120
- package/esm2015/lib/ui/radiobutton/radiobutton.component.js +0 -78
- package/esm2015/lib/ui/salutation-dropdown/salutation-dropdown.component.js +0 -59
- package/esm2015/lib/ui/salutation-radiogroup/salutation-radiogroup.component.js +0 -53
- package/esm2015/lib/ui/time-input/time-input.component.js +0 -88
- package/esm2015/lib/ui/tooltip/tooltip.component.js +0 -20
- package/esm2015/lib/ui/tooltip-icon/tooltip-icon.component.js +0 -39
- package/esm2015/lib/ui/yes-no-radiogroup/yes-no-radiogroup.component.js +0 -86
- package/fesm2015/kms-ngx-ui-presentational.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# KmsUiPresentational
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project kms-ngx-ui-presentational` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project kms-ngx-ui-presentational`.
|
|
8
|
-
> Note: Don't forget to add `--project kms-ngx-ui-presentational` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build kms-ngx-ui-presentational` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build kms-ngx-ui-presentational`, go to the dist folder `cd dist/kms-ngx-ui-presentational` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test kms-ngx-ui-presentational` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Running Storybook
|
|
23
|
-
|
|
24
|
-
Run `npm run storybook` to start Storybook.
|
|
25
|
-
|
|
26
|
-
## Further help
|
|
27
|
-
|
|
28
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# KmsUiPresentational
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project kms-ngx-ui-presentational` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project kms-ngx-ui-presentational`.
|
|
8
|
+
> Note: Don't forget to add `--project kms-ngx-ui-presentational` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build kms-ngx-ui-presentational` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build kms-ngx-ui-presentational`, go to the dist folder `cd dist/kms-ngx-ui-presentational` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test kms-ngx-ui-presentational` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Running Storybook
|
|
23
|
+
|
|
24
|
+
Run `npm run storybook` to start Storybook.
|
|
25
|
+
|
|
26
|
+
## Further help
|
|
27
|
+
|
|
28
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia21zLW5neC11aS1wcmVzZW50YXRpb25hbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
package/{esm2015/lib/directives/directives.module.js → esm2020/lib/directives/directives.module.mjs}
RENAMED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright KMS GmbH
|
|
3
|
-
*/
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { MouseWheelDirective } from './mousewheel.directive';
|
|
7
|
-
import { GetMaxHeightDirective } from './sum-of-height.directive';
|
|
8
|
-
import { SwipeDirective } from './swipe.directive';
|
|
9
|
-
import { TooltipDirective } from './tooltip.directive';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
export class DirectivesModule {
|
|
12
|
-
}
|
|
13
|
-
DirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
DirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
15
|
-
MouseWheelDirective,
|
|
16
|
-
GetMaxHeightDirective,
|
|
17
|
-
TooltipDirective], imports: [CommonModule], exports: [SwipeDirective,
|
|
18
|
-
MouseWheelDirective,
|
|
19
|
-
GetMaxHeightDirective,
|
|
20
|
-
TooltipDirective] });
|
|
21
|
-
DirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
-
type: NgModule,
|
|
24
|
-
args: [{
|
|
25
|
-
declarations: [
|
|
26
|
-
SwipeDirective,
|
|
27
|
-
MouseWheelDirective,
|
|
28
|
-
GetMaxHeightDirective,
|
|
29
|
-
TooltipDirective,
|
|
30
|
-
],
|
|
31
|
-
imports: [CommonModule],
|
|
32
|
-
exports: [
|
|
33
|
-
SwipeDirective,
|
|
34
|
-
MouseWheelDirective,
|
|
35
|
-
GetMaxHeightDirective,
|
|
36
|
-
TooltipDirective,
|
|
37
|
-
],
|
|
38
|
-
}]
|
|
39
|
-
}] });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/**
|
|
2
|
+
* @copyright KMS GmbH
|
|
3
|
+
*/
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { NgModule } from '@angular/core';
|
|
6
|
+
import { MouseWheelDirective } from './mousewheel.directive';
|
|
7
|
+
import { GetMaxHeightDirective } from './sum-of-height.directive';
|
|
8
|
+
import { SwipeDirective } from './swipe.directive';
|
|
9
|
+
import { TooltipDirective } from './tooltip.directive';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export class DirectivesModule {
|
|
12
|
+
}
|
|
13
|
+
DirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14
|
+
DirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DirectivesModule, declarations: [SwipeDirective,
|
|
15
|
+
MouseWheelDirective,
|
|
16
|
+
GetMaxHeightDirective,
|
|
17
|
+
TooltipDirective], imports: [CommonModule], exports: [SwipeDirective,
|
|
18
|
+
MouseWheelDirective,
|
|
19
|
+
GetMaxHeightDirective,
|
|
20
|
+
TooltipDirective] });
|
|
21
|
+
DirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DirectivesModule, imports: [[CommonModule]] });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DirectivesModule, decorators: [{
|
|
23
|
+
type: NgModule,
|
|
24
|
+
args: [{
|
|
25
|
+
declarations: [
|
|
26
|
+
SwipeDirective,
|
|
27
|
+
MouseWheelDirective,
|
|
28
|
+
GetMaxHeightDirective,
|
|
29
|
+
TooltipDirective,
|
|
30
|
+
],
|
|
31
|
+
imports: [CommonModule],
|
|
32
|
+
exports: [
|
|
33
|
+
SwipeDirective,
|
|
34
|
+
MouseWheelDirective,
|
|
35
|
+
GetMaxHeightDirective,
|
|
36
|
+
TooltipDirective,
|
|
37
|
+
],
|
|
38
|
+
}]
|
|
39
|
+
}] });
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlyZWN0aXZlcy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbXMtbmd4LXVpLXByZXNlbnRhdGlvbmFsL3NyYy9saWIvZGlyZWN0aXZlcy9kaXJlY3RpdmVzLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpDLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzdELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ2xFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQzs7QUFpQnZELE1BQU0sT0FBTyxnQkFBZ0I7OzZHQUFoQixnQkFBZ0I7OEdBQWhCLGdCQUFnQixpQkFiekIsY0FBYztRQUNkLG1CQUFtQjtRQUNuQixxQkFBcUI7UUFDck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RpdmUsXG4gICAgR2V0TWF4SGVpZ2h0RGlyZWN0aXZlLFxuICAgIFRvb2x0aXBEaXJlY3RpdmUsXG4gIF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICBleHBvcnRzOiBbXG4gICAgU3dpcGVEaXJlY3RpdmUsXG4gICAgTW91c2VXaGVlbERpcmVjdGl2ZSxcbiAgICBHZXRNYXhIZWlnaHREaXJlY3RpdmUsXG4gICAgVG9vbHRpcERpcmVjdGl2ZSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgRGlyZWN0aXZlc01vZHVsZSB7fVxuIl19
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @copyright FLYACTS GmbH 2019
|
|
3
|
-
*/
|
|
4
|
-
import { Directive, EventEmitter, HostListener, Output } from '@angular/core';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class MouseWheelDirective {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.mouseWheelUp = new EventEmitter();
|
|
9
|
-
this.mouseWheelDown = new EventEmitter();
|
|
10
|
-
}
|
|
11
|
-
onMouseWheelChrome(event) {
|
|
12
|
-
this.mouseWheelFunc(event);
|
|
13
|
-
}
|
|
14
|
-
onMouseWheelFirefox(event) {
|
|
15
|
-
this.mouseWheelFunc(event);
|
|
16
|
-
}
|
|
17
|
-
onMouseWheelIE(event) {
|
|
18
|
-
this.mouseWheelFunc(event);
|
|
19
|
-
}
|
|
20
|
-
mouseWheelFunc(event) {
|
|
21
|
-
event = window.event || event; // old IE support
|
|
22
|
-
const delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
|
|
23
|
-
if (delta > 0) {
|
|
24
|
-
this.mouseWheelUp.emit(event);
|
|
25
|
-
}
|
|
26
|
-
else if (delta < 0) {
|
|
27
|
-
this.mouseWheelDown.emit(event);
|
|
28
|
-
}
|
|
29
|
-
// for IE
|
|
30
|
-
event.returnValue = false;
|
|
31
|
-
// for Chrome and Firefox
|
|
32
|
-
if (event.preventDefault) {
|
|
33
|
-
event.preventDefault();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
MouseWheelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
MouseWheelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
-
type: Directive,
|
|
41
|
-
args: [{ selector: '[mouseWheel]' }]
|
|
42
|
-
}], propDecorators: { mouseWheelUp: [{
|
|
43
|
-
type: Output
|
|
44
|
-
}], mouseWheelDown: [{
|
|
45
|
-
type: Output
|
|
46
|
-
}], onMouseWheelChrome: [{
|
|
47
|
-
type: HostListener,
|
|
48
|
-
args: ['mousewheel', ['$event']]
|
|
49
|
-
}], onMouseWheelFirefox: [{
|
|
50
|
-
type: HostListener,
|
|
51
|
-
args: ['DOMMouseScroll', ['$event']]
|
|
52
|
-
}], onMouseWheelIE: [{
|
|
53
|
-
type: HostListener,
|
|
54
|
-
args: ['onmousewheel', ['$event']]
|
|
55
|
-
}] } });
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/*!
|
|
2
|
+
* @copyright FLYACTS GmbH 2019
|
|
3
|
+
*/
|
|
4
|
+
import { Directive, EventEmitter, HostListener, Output } from '@angular/core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class MouseWheelDirective {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.mouseWheelUp = new EventEmitter();
|
|
9
|
+
this.mouseWheelDown = new EventEmitter();
|
|
10
|
+
}
|
|
11
|
+
onMouseWheelChrome(event) {
|
|
12
|
+
this.mouseWheelFunc(event);
|
|
13
|
+
}
|
|
14
|
+
onMouseWheelFirefox(event) {
|
|
15
|
+
this.mouseWheelFunc(event);
|
|
16
|
+
}
|
|
17
|
+
onMouseWheelIE(event) {
|
|
18
|
+
this.mouseWheelFunc(event);
|
|
19
|
+
}
|
|
20
|
+
mouseWheelFunc(event) {
|
|
21
|
+
event = window.event || event; // old IE support
|
|
22
|
+
const delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
|
|
23
|
+
if (delta > 0) {
|
|
24
|
+
this.mouseWheelUp.emit(event);
|
|
25
|
+
}
|
|
26
|
+
else if (delta < 0) {
|
|
27
|
+
this.mouseWheelDown.emit(event);
|
|
28
|
+
}
|
|
29
|
+
// for IE
|
|
30
|
+
event.returnValue = false;
|
|
31
|
+
// for Chrome and Firefox
|
|
32
|
+
if (event.preventDefault) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
MouseWheelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: MouseWheelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
38
|
+
MouseWheelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: MouseWheelDirective, selector: "[mouseWheel]", outputs: { mouseWheelUp: "mouseWheelUp", mouseWheelDown: "mouseWheelDown" }, host: { listeners: { "mousewheel": "onMouseWheelChrome($event)", "DOMMouseScroll": "onMouseWheelFirefox($event)", "onmousewheel": "onMouseWheelIE($event)" } }, ngImport: i0 });
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: MouseWheelDirective, decorators: [{
|
|
40
|
+
type: Directive,
|
|
41
|
+
args: [{ selector: '[mouseWheel]' }]
|
|
42
|
+
}], propDecorators: { mouseWheelUp: [{
|
|
43
|
+
type: Output
|
|
44
|
+
}], mouseWheelDown: [{
|
|
45
|
+
type: Output
|
|
46
|
+
}], onMouseWheelChrome: [{
|
|
47
|
+
type: HostListener,
|
|
48
|
+
args: ['mousewheel', ['$event']]
|
|
49
|
+
}], onMouseWheelFirefox: [{
|
|
50
|
+
type: HostListener,
|
|
51
|
+
args: ['DOMMouseScroll', ['$event']]
|
|
52
|
+
}], onMouseWheelIE: [{
|
|
53
|
+
type: HostListener,
|
|
54
|
+
args: ['onmousewheel', ['$event']]
|
|
55
|
+
}] } });
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW91c2V3aGVlbC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbXMtbmd4LXVpLXByZXNlbnRhdGlvbmFsL3NyYy9saWIvZGlyZWN0aXZlcy9tb3VzZXdoZWVsLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRzlFLE1BQU0sT0FBTyxtQkFBbUI7SUFEaEM7UUFFYyxpQkFBWSxHQUFHLElBQUksWUFBWSxFQUFFLENBQUM7UUFDbEMsbUJBQWMsR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO0tBaUNqRDtJQTlCMkMsa0JBQWtCLENBQUMsS0FBVTtRQUNqRSxJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQy9CLENBQUM7SUFHMkMsbUJBQW1CLENBQUMsS0FBVTtRQUN0RSxJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQy9CLENBQUM7SUFFNkMsY0FBYyxDQUFDLEtBQVU7UUFDbkUsSUFBSSxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUMvQixDQUFDO0lBR0QsY0FBYyxDQUFDLEtBQVU7UUFDckIsS0FBSyxHQUFHLE1BQU0s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IElFIHN1cHBvcnRcbiAgICAgICAgXG4gICAgICAgIGNvbnN0IGRlbHRhID0gTWF0aC5tYXgoLTEsIE1hdGgubWluKDEsIChldmVudC53aGVlbERlbHRhIHx8IC1ldmVudC5kZXRhaWwpKSk7XG4gICAgICAgIGlmIChkZWx0YSA+IDApIHtcbiAgICAgICAgICAgIHRoaXMubW91c2VXaGVlbFVwLmVtaXQoZXZlbnQpO1xuICAgICAgICB9IGVsc2UgaWYgKGRlbHRhIDwgMCkge1xuICAgICAgICAgICAgdGhpcy5tb3VzZVdoZWVsRG93bi5lbWl0KGV2ZW50KTtcbiAgICAgICAgfVxuICAgICAgICAvLyBmb3IgSUVcbiAgICAgICAgZXZlbnQucmV0dXJuVmFsdWUgPSBmYWxzZTtcbiAgICAgICAgLy8gZm9yIENocm9tZSBhbmQgRmlyZWZveFxuICAgICAgICBpZiAoZXZlbnQucHJldmVudERlZmF1bHQpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @copyright FLYACTS GmbH 2019
|
|
3
|
-
*/
|
|
4
|
-
// ng
|
|
5
|
-
import { Directive, EventEmitter, Input, Output } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Directive to calc the height of all inner elements
|
|
9
|
-
*/
|
|
10
|
-
export class GetMaxHeightDirective {
|
|
11
|
-
constructor(el) {
|
|
12
|
-
this.el = el;
|
|
13
|
-
/**
|
|
14
|
-
* CSS class name of the child items (markup elements) that should be checked for their height.
|
|
15
|
-
* This is mandatory.
|
|
16
|
-
*/
|
|
17
|
-
this.cssClassName = '';
|
|
18
|
-
/**
|
|
19
|
-
* Event that will pass the height of the tallest child inside the container.
|
|
20
|
-
* Useful to calculate the target height of containers with different content (like accordion) for animations.
|
|
21
|
-
*/
|
|
22
|
-
this.maxHeightChanged = new EventEmitter();
|
|
23
|
-
/**
|
|
24
|
-
* Event that will pass the complete sum of all height values from each child.
|
|
25
|
-
* Useful to calculate the full target height of a container (like dropdown) for animations.
|
|
26
|
-
*/
|
|
27
|
-
this.sumOfHeight = new EventEmitter();
|
|
28
|
-
}
|
|
29
|
-
ngAfterContentChecked() {
|
|
30
|
-
this.checkHeightOfChildren(this.el.nativeElement, this.cssClassName);
|
|
31
|
-
}
|
|
32
|
-
checkHeightOfChildren(parent, cssClassName) {
|
|
33
|
-
if (!parent) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
// find all the child elements with the selected class name
|
|
37
|
-
const children = parent.getElementsByClassName(cssClassName);
|
|
38
|
-
// failsafe
|
|
39
|
-
if (!children) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
// get all the child elements heights
|
|
43
|
-
const itemHeights = Array.from(children).map((x) => x.getBoundingClientRect().height);
|
|
44
|
-
// failsafe
|
|
45
|
-
if (itemHeights.length === 0) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
// find out the tallest element
|
|
49
|
-
const maxHeight = itemHeights.reduce((prev, curr) => {
|
|
50
|
-
return curr > prev ? curr : prev;
|
|
51
|
-
}, 0);
|
|
52
|
-
// get sum of heights
|
|
53
|
-
const sumOfHeight = itemHeights.reduce((pv, cv) => pv + cv, 0);
|
|
54
|
-
// inform
|
|
55
|
-
this.maxHeightChanged.emit(maxHeight);
|
|
56
|
-
this.sumOfHeight.emit(sumOfHeight);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
GetMaxHeightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
60
|
-
GetMaxHeightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
62
|
-
type: Directive,
|
|
63
|
-
args: [{
|
|
64
|
-
selector: '[getMaxHeight]',
|
|
65
|
-
}]
|
|
66
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cssClassName: [{
|
|
67
|
-
type: Input,
|
|
68
|
-
args: ['getMaxHeight']
|
|
69
|
-
}], maxHeightChanged: [{
|
|
70
|
-
type: Output
|
|
71
|
-
}], sumOfHeight: [{
|
|
72
|
-
type: Output
|
|
73
|
-
}] } });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/*!
|
|
2
|
+
* @copyright FLYACTS GmbH 2019
|
|
3
|
+
*/
|
|
4
|
+
// ng
|
|
5
|
+
import { Directive, EventEmitter, Input, Output } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Directive to calc the height of all inner elements
|
|
9
|
+
*/
|
|
10
|
+
export class GetMaxHeightDirective {
|
|
11
|
+
constructor(el) {
|
|
12
|
+
this.el = el;
|
|
13
|
+
/**
|
|
14
|
+
* CSS class name of the child items (markup elements) that should be checked for their height.
|
|
15
|
+
* This is mandatory.
|
|
16
|
+
*/
|
|
17
|
+
this.cssClassName = '';
|
|
18
|
+
/**
|
|
19
|
+
* Event that will pass the height of the tallest child inside the container.
|
|
20
|
+
* Useful to calculate the target height of containers with different content (like accordion) for animations.
|
|
21
|
+
*/
|
|
22
|
+
this.maxHeightChanged = new EventEmitter();
|
|
23
|
+
/**
|
|
24
|
+
* Event that will pass the complete sum of all height values from each child.
|
|
25
|
+
* Useful to calculate the full target height of a container (like dropdown) for animations.
|
|
26
|
+
*/
|
|
27
|
+
this.sumOfHeight = new EventEmitter();
|
|
28
|
+
}
|
|
29
|
+
ngAfterContentChecked() {
|
|
30
|
+
this.checkHeightOfChildren(this.el.nativeElement, this.cssClassName);
|
|
31
|
+
}
|
|
32
|
+
checkHeightOfChildren(parent, cssClassName) {
|
|
33
|
+
if (!parent) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
// find all the child elements with the selected class name
|
|
37
|
+
const children = parent.getElementsByClassName(cssClassName);
|
|
38
|
+
// failsafe
|
|
39
|
+
if (!children) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// get all the child elements heights
|
|
43
|
+
const itemHeights = Array.from(children).map((x) => x.getBoundingClientRect().height);
|
|
44
|
+
// failsafe
|
|
45
|
+
if (itemHeights.length === 0) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// find out the tallest element
|
|
49
|
+
const maxHeight = itemHeights.reduce((prev, curr) => {
|
|
50
|
+
return curr > prev ? curr : prev;
|
|
51
|
+
}, 0);
|
|
52
|
+
// get sum of heights
|
|
53
|
+
const sumOfHeight = itemHeights.reduce((pv, cv) => pv + cv, 0);
|
|
54
|
+
// inform
|
|
55
|
+
this.maxHeightChanged.emit(maxHeight);
|
|
56
|
+
this.sumOfHeight.emit(sumOfHeight);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
GetMaxHeightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: GetMaxHeightDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
+
GetMaxHeightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: GetMaxHeightDirective, selector: "[getMaxHeight]", inputs: { cssClassName: ["getMaxHeight", "cssClassName"] }, outputs: { maxHeightChanged: "maxHeightChanged", sumOfHeight: "sumOfHeight" }, ngImport: i0 });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: GetMaxHeightDirective, decorators: [{
|
|
62
|
+
type: Directive,
|
|
63
|
+
args: [{
|
|
64
|
+
selector: '[getMaxHeight]',
|
|
65
|
+
}]
|
|
66
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { cssClassName: [{
|
|
67
|
+
type: Input,
|
|
68
|
+
args: ['getMaxHeight']
|
|
69
|
+
}], maxHeightChanged: [{
|
|
70
|
+
type: Output
|
|
71
|
+
}], sumOfHeight: [{
|
|
72
|
+
type: Output
|
|
73
|
+
}] } });
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VtLW9mLWhlaWdodC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rbXMtbmd4LXVpLXByZXNlbnRhdGlvbmFsL3NyYy9saWIvZGlyZWN0aXZlcy9zdW0tb2YtaGVpZ2h0LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILEtBQUs7QUFDTCxPQUFPLEVBQXVCLFNBQVMsRUFBYyxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFeEc7O0dBRUc7QUFLSCxNQUFNLE9BQU8scUJBQXFCO0lBbUI5QixZQUFvQixFQUFjO1FBQWQsT0FBRSxHQUFGLEVBQUUsQ0FBWTtRQWxCbEM7OztXQUdHO1FBQ29CLGlCQUFZLEdBQUcsRUFBRSxDQUFDO1FBRXpDOzs7V0FHRztRQUNjLHFCQUFnQixHQUF5QixJQUFJLFlBQVksRUFBRSxDQUFDO1FBRTdFOzs7V0FHRztRQUNjLGdCQUFXLEdBQXlCLElBQUksWUFBWSxFQUFFLENBQUM7SUFFbkMsQ0FBQztJQUV0QyxxQkFBcUI7UUFDakIsSUFBSSxDQUFDLHFCQUFxQixDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsYUFBYSxFQUFFLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQztJQUN6RSxDQUFDO0lBRU8scUJBQXFCLENBQUMsTUFBbUIsRUFBRSxZQUFvQjtRQUNuRSxJQUFJLENBQUMsTU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