@lenne.tech/ng-base 12.1.0 → 13.2.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/base-components/base-components.module.d.ts +12 -0
- package/base-components/components/checkbox/checkbox.component.d.ts +11 -0
- package/base-components/components/input/input.component.d.ts +14 -0
- package/base-components/components/select/select.component.d.ts +19 -0
- package/base-components/components/textarea/textarea.component.d.ts +13 -0
- package/base-components/lenne.tech-ng-base-base-components.d.ts +5 -0
- package/base-components/package.json +10 -0
- package/base-components/public-api.d.ts +8 -0
- package/base-prototype/base-prototype.module.d.ts +12 -0
- package/{src/lib/base/lenne.tech-ng-base-src-lib-base.d.ts → base-prototype/lenne.tech-ng-base-base-prototype.d.ts} +1 -0
- package/base-prototype/package.json +10 -0
- package/base-prototype/pages/login/login.component.d.ts +20 -0
- package/base-prototype/pages/register/register.component.d.ts +20 -0
- package/base-prototype/public-api.d.ts +6 -0
- package/esm2020/base-components/base-components.module.mjs +42 -0
- package/esm2020/base-components/components/checkbox/checkbox.component.mjs +28 -0
- package/esm2020/base-components/components/input/input.component.mjs +36 -0
- package/esm2020/base-components/components/select/select.component.mjs +37 -0
- package/esm2020/base-components/components/textarea/textarea.component.mjs +35 -0
- package/esm2020/base-components/lenne.tech-ng-base-base-components.mjs +5 -0
- package/esm2020/base-components/public-api.mjs +11 -0
- package/esm2020/base-prototype/base-prototype.module.mjs +36 -0
- package/esm2020/base-prototype/lenne.tech-ng-base-base-prototype.mjs +5 -0
- package/esm2020/base-prototype/pages/login/login.component.mjs +39 -0
- package/esm2020/base-prototype/pages/register/register.component.mjs +45 -0
- package/esm2020/base-prototype/public-api.mjs +9 -0
- package/esm2020/lenne.tech-ng-base.mjs +5 -0
- package/esm2020/public-api.mjs +66 -0
- package/esm2020/src/base.module.mjs +101 -0
- package/esm2020/src/classes/basic-user.class.mjs +51 -0
- package/esm2020/src/classes/graphql-enum.class.mjs +9 -0
- package/esm2020/src/classes/graphql-meta.class.mjs +171 -0
- package/esm2020/src/classes/graphql-type.class.mjs +13 -0
- package/esm2020/src/classes/helper.class.mjs +304 -0
- package/esm2020/src/classes/standard.class.mjs +40 -0
- package/esm2020/src/directives/context-menu.directive.mjs +109 -0
- package/esm2020/src/directives/lazy-load.directive.mjs +45 -0
- package/esm2020/src/directives/match-height.directive.mjs +79 -0
- package/esm2020/src/directives/resizable.directive.mjs +90 -0
- package/esm2020/src/enums/comparison-operator.enum.mjs +16 -0
- package/esm2020/src/enums/graphql-request-type.enum.mjs +10 -0
- package/esm2020/src/enums/logical-operator.enum.mjs +10 -0
- package/esm2020/src/enums/sort-order.enum.mjs +6 -0
- package/esm2020/src/factories/apollo-options.factory.mjs +61 -0
- package/esm2020/src/guards/auth.guard.mjs +61 -0
- package/esm2020/src/guards/can-deactivate.guard.mjs +16 -0
- package/esm2020/src/guards/logout.guard.mjs +32 -0
- package/esm2020/src/interfaces/base-module-config.interface.mjs +3 -0
- package/esm2020/src/interfaces/can-component-deactivate.interface.mjs +2 -0
- package/esm2020/src/interfaces/combined-filter-input.interface.mjs +2 -0
- package/esm2020/src/interfaces/field-object.interface.mjs +2 -0
- package/esm2020/src/interfaces/field.interface.mjs +2 -0
- package/esm2020/src/interfaces/filter-input.interface.mjs +2 -0
- package/esm2020/src/interfaces/find-args.interface.mjs +2 -0
- package/esm2020/src/interfaces/graphql-fields-object.interface.mjs +2 -0
- package/esm2020/src/interfaces/graphql-options.interface.mjs +2 -0
- package/esm2020/src/interfaces/graphql-plus-options.interfacen.mjs +2 -0
- package/esm2020/src/interfaces/graphql-type-collection.interface.mjs +2 -0
- package/esm2020/src/interfaces/single-filter-input.interface.mjs +2 -0
- package/esm2020/src/interfaces/sort-input.interface.mjs +2 -0
- package/esm2020/src/pipes/date-ago.pipe.mjs +65 -0
- package/esm2020/src/pipes/ellipses.pipe.mjs +22 -0
- package/esm2020/src/pipes/safe-html.pipe.mjs +21 -0
- package/esm2020/src/services/auth.service.mjs +71 -0
- package/esm2020/src/services/forms.service.mjs +26 -0
- package/esm2020/src/services/fullscreen.service.mjs +51 -0
- package/esm2020/src/services/graphql-meta.service.mjs +123 -0
- package/esm2020/src/services/graphql-plus.service.mjs +84 -0
- package/esm2020/src/services/graphql.service.mjs +441 -0
- package/esm2020/src/services/image.service.mjs +102 -0
- package/esm2020/src/services/loader.service.mjs +29 -0
- package/esm2020/src/services/scroll.service.mjs +179 -0
- package/esm2020/src/services/seo.service.mjs +97 -0
- package/esm2020/src/services/storage.service.mjs +132 -0
- package/esm2020/src/services/theme.service.mjs +43 -0
- package/esm2020/src/services/ws.service.mjs +17 -0
- package/esm2020/src/types/graphql-fields.type.mjs +2 -0
- package/esm2020/src/types/storage.type.mjs +2 -0
- package/esm2020/src/validators/must-match.validator.mjs +22 -0
- package/fesm2015/lenne.tech-ng-base-base-components.mjs +173 -0
- package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -0
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs +122 -0
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs.map +1 -0
- package/fesm2015/{lenne.tech-ng-base.js → lenne.tech-ng-base.mjs} +385 -206
- package/fesm2015/lenne.tech-ng-base.mjs.map +1 -0
- package/fesm2020/lenne.tech-ng-base-base-components.mjs +171 -0
- package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -0
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs +120 -0
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs.map +1 -0
- package/{fesm2015/lenne.tech-ng-base-src-lib-base.js → fesm2020/lenne.tech-ng-base.mjs} +585 -350
- package/fesm2020/lenne.tech-ng-base.mjs.map +1 -0
- package/lenne.tech-ng-base.d.ts +1 -0
- package/package.json +48 -19
- package/public-api.d.ts +54 -1
- package/src/base.module.d.ts +22 -0
- package/src/{lib/base/classes → classes}/basic-user.class.d.ts +0 -0
- package/src/{lib/base/classes → classes}/graphql-enum.class.d.ts +0 -0
- package/{lib/base → src}/classes/graphql-meta.class.d.ts +2 -4
- package/src/{lib/base/classes → classes}/graphql-type.class.d.ts +0 -0
- package/{lib/base → src}/classes/helper.class.d.ts +1 -0
- package/src/{lib/base/classes → classes}/standard.class.d.ts +0 -0
- package/src/{lib/base/directives → directives}/context-menu.directive.d.ts +3 -0
- package/{lib/base → src}/directives/lazy-load.directive.d.ts +3 -0
- package/src/{lib/base/directives → directives}/match-height.directive.d.ts +3 -0
- package/{lib/base → src}/directives/resizable.directive.d.ts +3 -0
- package/src/{lib/base/enums → enums}/comparison-operator.enum.d.ts +0 -0
- package/src/{lib/base/enums → enums}/graphql-request-type.enum.d.ts +0 -0
- package/src/{lib/base/enums → enums}/logical-operator.enum.d.ts +0 -0
- package/src/{lib/base/enums → enums}/sort-order.enum.d.ts +0 -0
- package/src/{lib/base/factories → factories}/apollo-options.factory.d.ts +0 -0
- package/src/{lib/base/guards → guards}/auth.guard.d.ts +3 -0
- package/src/{lib/base/guards → guards}/can-deactivate.guard.d.ts +3 -0
- package/{lib/base → src}/guards/logout.guard.d.ts +3 -0
- package/src/{lib/base/interfaces → interfaces}/base-module-config.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/can-component-deactivate.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/combined-filter-input.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/field-object.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/field.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/filter-input.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/find-args.interface.d.ts +0 -0
- package/src/interfaces/graphql-fields-object.interface.d.ts +6 -0
- package/src/{lib/base/interfaces → interfaces}/graphql-options.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/graphql-plus-options.interfacen.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/graphql-type-collection.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/single-filter-input.interface.d.ts +0 -0
- package/src/{lib/base/interfaces → interfaces}/sort-input.interface.d.ts +0 -0
- package/src/pipes/date-ago.pipe.d.ts +34 -0
- package/{lib/base → src}/pipes/ellipses.pipe.d.ts +3 -0
- package/{lib/base → src}/pipes/safe-html.pipe.d.ts +3 -0
- package/{lib/base → src}/services/auth.service.d.ts +3 -0
- package/src/services/forms.service.d.ts +8 -0
- package/src/{lib/base/services → services}/fullscreen.service.d.ts +3 -0
- package/src/{lib/base/services → services}/graphql-meta.service.d.ts +3 -0
- package/src/{lib/base/services → services}/graphql-plus.service.d.ts +3 -0
- package/src/{lib/base/services → services}/graphql.service.d.ts +3 -0
- package/src/{lib/base/services → services}/image.service.d.ts +3 -0
- package/{lib/base → src}/services/loader.service.d.ts +3 -0
- package/src/{lib/base/services → services}/scroll.service.d.ts +3 -0
- package/src/{lib/base/services → services}/seo.service.d.ts +3 -0
- package/{lib/base → src}/services/storage.service.d.ts +3 -0
- package/src/services/theme.service.d.ts +17 -0
- package/src/services/ws.service.d.ts +8 -0
- package/src/types/graphql-fields.type.d.ts +5 -0
- package/src/{lib/base/types → types}/storage.type.d.ts +0 -0
- package/{lib/base → src}/validators/must-match.validator.d.ts +2 -2
- package/bundles/lenne.tech-ng-base-src-lib-base.umd.js +0 -3152
- package/bundles/lenne.tech-ng-base-src-lib-base.umd.js.map +0 -1
- package/bundles/lenne.tech-ng-base.umd.js +0 -3154
- package/bundles/lenne.tech-ng-base.umd.js.map +0 -1
- package/esm2015/lenne.tech-ng-base.js +0 -5
- package/esm2015/lib/base/base.module.js +0 -66
- package/esm2015/lib/base/classes/basic-user.class.js +0 -51
- package/esm2015/lib/base/classes/graphql-enum.class.js +0 -9
- package/esm2015/lib/base/classes/graphql-meta.class.js +0 -156
- package/esm2015/lib/base/classes/graphql-type.class.js +0 -13
- package/esm2015/lib/base/classes/helper.class.js +0 -290
- package/esm2015/lib/base/classes/standard.class.js +0 -40
- package/esm2015/lib/base/directives/context-menu.directive.js +0 -104
- package/esm2015/lib/base/directives/lazy-load.directive.js +0 -43
- package/esm2015/lib/base/directives/match-height.directive.js +0 -78
- package/esm2015/lib/base/directives/resizable.directive.js +0 -89
- package/esm2015/lib/base/enums/comparison-operator.enum.js +0 -16
- package/esm2015/lib/base/enums/graphql-request-type.enum.js +0 -10
- package/esm2015/lib/base/enums/logical-operator.enum.js +0 -10
- package/esm2015/lib/base/enums/sort-order.enum.js +0 -6
- package/esm2015/lib/base/factories/apollo-options.factory.js +0 -61
- package/esm2015/lib/base/guards/auth.guard.js +0 -61
- package/esm2015/lib/base/guards/can-deactivate.guard.js +0 -13
- package/esm2015/lib/base/guards/logout.guard.js +0 -33
- package/esm2015/lib/base/index.js +0 -2
- package/esm2015/lib/base/interfaces/base-module-config.interface.js +0 -3
- package/esm2015/lib/base/interfaces/can-component-deactivate.interface.js +0 -2
- package/esm2015/lib/base/interfaces/combined-filter-input.interface.js +0 -2
- package/esm2015/lib/base/interfaces/field-object.interface.js +0 -2
- package/esm2015/lib/base/interfaces/field.interface.js +0 -2
- package/esm2015/lib/base/interfaces/filter-input.interface.js +0 -2
- package/esm2015/lib/base/interfaces/find-args.interface.js +0 -2
- package/esm2015/lib/base/interfaces/graphql-options.interface.js +0 -2
- package/esm2015/lib/base/interfaces/graphql-plus-options.interfacen.js +0 -2
- package/esm2015/lib/base/interfaces/graphql-type-collection.interface.js +0 -2
- package/esm2015/lib/base/interfaces/single-filter-input.interface.js +0 -2
- package/esm2015/lib/base/interfaces/sort-input.interface.js +0 -2
- package/esm2015/lib/base/pipes/ellipses.pipe.js +0 -18
- package/esm2015/lib/base/pipes/safe-html.pipe.js +0 -20
- package/esm2015/lib/base/public-api.js +0 -61
- package/esm2015/lib/base/services/auth.service.js +0 -74
- package/esm2015/lib/base/services/fullscreen.service.js +0 -50
- package/esm2015/lib/base/services/graphql-meta.service.js +0 -116
- package/esm2015/lib/base/services/graphql-plus.service.js +0 -90
- package/esm2015/lib/base/services/graphql.service.js +0 -423
- package/esm2015/lib/base/services/image.service.js +0 -99
- package/esm2015/lib/base/services/loader.service.js +0 -27
- package/esm2015/lib/base/services/scroll.service.js +0 -172
- package/esm2015/lib/base/services/seo.service.js +0 -100
- package/esm2015/lib/base/services/storage.service.js +0 -131
- package/esm2015/lib/base/services/ws.service.js +0 -16
- package/esm2015/lib/base/types/storage.type.js +0 -2
- package/esm2015/lib/base/validators/must-match.validator.js +0 -22
- package/esm2015/public-api.js +0 -3
- package/esm2015/src/lib/base/base.module.js +0 -66
- package/esm2015/src/lib/base/classes/basic-user.class.js +0 -51
- package/esm2015/src/lib/base/classes/graphql-enum.class.js +0 -9
- package/esm2015/src/lib/base/classes/graphql-meta.class.js +0 -156
- package/esm2015/src/lib/base/classes/graphql-type.class.js +0 -13
- package/esm2015/src/lib/base/classes/helper.class.js +0 -290
- package/esm2015/src/lib/base/classes/standard.class.js +0 -40
- package/esm2015/src/lib/base/directives/context-menu.directive.js +0 -104
- package/esm2015/src/lib/base/directives/lazy-load.directive.js +0 -43
- package/esm2015/src/lib/base/directives/match-height.directive.js +0 -78
- package/esm2015/src/lib/base/directives/resizable.directive.js +0 -89
- package/esm2015/src/lib/base/enums/comparison-operator.enum.js +0 -16
- package/esm2015/src/lib/base/enums/graphql-request-type.enum.js +0 -10
- package/esm2015/src/lib/base/enums/logical-operator.enum.js +0 -10
- package/esm2015/src/lib/base/enums/sort-order.enum.js +0 -6
- package/esm2015/src/lib/base/factories/apollo-options.factory.js +0 -61
- package/esm2015/src/lib/base/guards/auth.guard.js +0 -61
- package/esm2015/src/lib/base/guards/can-deactivate.guard.js +0 -13
- package/esm2015/src/lib/base/guards/logout.guard.js +0 -33
- package/esm2015/src/lib/base/interfaces/base-module-config.interface.js +0 -3
- package/esm2015/src/lib/base/interfaces/can-component-deactivate.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/combined-filter-input.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/field-object.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/field.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/filter-input.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/find-args.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/graphql-options.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/graphql-plus-options.interfacen.js +0 -2
- package/esm2015/src/lib/base/interfaces/graphql-type-collection.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/single-filter-input.interface.js +0 -2
- package/esm2015/src/lib/base/interfaces/sort-input.interface.js +0 -2
- package/esm2015/src/lib/base/lenne.tech-ng-base-src-lib-base.js +0 -5
- package/esm2015/src/lib/base/pipes/ellipses.pipe.js +0 -18
- package/esm2015/src/lib/base/pipes/safe-html.pipe.js +0 -20
- package/esm2015/src/lib/base/public-api.js +0 -61
- package/esm2015/src/lib/base/services/auth.service.js +0 -74
- package/esm2015/src/lib/base/services/fullscreen.service.js +0 -50
- package/esm2015/src/lib/base/services/graphql-meta.service.js +0 -116
- package/esm2015/src/lib/base/services/graphql-plus.service.js +0 -90
- package/esm2015/src/lib/base/services/graphql.service.js +0 -423
- package/esm2015/src/lib/base/services/image.service.js +0 -99
- package/esm2015/src/lib/base/services/loader.service.js +0 -27
- package/esm2015/src/lib/base/services/scroll.service.js +0 -172
- package/esm2015/src/lib/base/services/seo.service.js +0 -100
- package/esm2015/src/lib/base/services/storage.service.js +0 -131
- package/esm2015/src/lib/base/services/ws.service.js +0 -16
- package/esm2015/src/lib/base/types/storage.type.js +0 -2
- package/esm2015/src/lib/base/validators/must-match.validator.js +0 -22
- package/fesm2015/lenne.tech-ng-base-src-lib-base.js.map +0 -1
- package/fesm2015/lenne.tech-ng-base.js.map +0 -1
- package/lenne.tech-ng-base.metadata.json +0 -1
- package/lib/base/base.module.d.ts +0 -11
- package/lib/base/classes/basic-user.class.d.ts +0 -26
- package/lib/base/classes/graphql-enum.class.d.ts +0 -7
- package/lib/base/classes/graphql-type.class.d.ts +0 -9
- package/lib/base/classes/standard.class.d.ts +0 -32
- package/lib/base/directives/context-menu.directive.d.ts +0 -19
- package/lib/base/directives/match-height.directive.d.ts +0 -16
- package/lib/base/enums/comparison-operator.enum.d.ts +0 -14
- package/lib/base/enums/graphql-request-type.enum.d.ts +0 -8
- package/lib/base/enums/logical-operator.enum.d.ts +0 -8
- package/lib/base/enums/sort-order.enum.d.ts +0 -4
- package/lib/base/factories/apollo-options.factory.d.ts +0 -18
- package/lib/base/guards/auth.guard.d.ts +0 -24
- package/lib/base/guards/can-deactivate.guard.d.ts +0 -8
- package/lib/base/index.d.ts +0 -1
- package/lib/base/interfaces/base-module-config.interface.d.ts +0 -57
- package/lib/base/interfaces/can-component-deactivate.interface.d.ts +0 -7
- package/lib/base/interfaces/combined-filter-input.interface.d.ts +0 -9
- package/lib/base/interfaces/field-object.interface.d.ts +0 -6
- package/lib/base/interfaces/field.interface.d.ts +0 -5
- package/lib/base/interfaces/filter-input.interface.d.ts +0 -9
- package/lib/base/interfaces/find-args.interface.d.ts +0 -10
- package/lib/base/interfaces/graphql-options.interface.d.ts +0 -11
- package/lib/base/interfaces/graphql-plus-options.interfacen.d.ts +0 -9
- package/lib/base/interfaces/graphql-type-collection.interface.d.ts +0 -7
- package/lib/base/interfaces/single-filter-input.interface.d.ts +0 -11
- package/lib/base/interfaces/sort-input.interface.d.ts +0 -5
- package/lib/base/public-api.d.ts +0 -49
- package/lib/base/services/fullscreen.service.d.ts +0 -15
- package/lib/base/services/graphql-meta.service.d.ts +0 -42
- package/lib/base/services/graphql-plus.service.d.ts +0 -22
- package/lib/base/services/graphql.service.d.ts +0 -53
- package/lib/base/services/image.service.d.ts +0 -24
- package/lib/base/services/scroll.service.d.ts +0 -82
- package/lib/base/services/seo.service.d.ts +0 -46
- package/lib/base/services/ws.service.d.ts +0 -5
- package/lib/base/types/storage.type.d.ts +0 -4
- package/src/lib/base/base.module.d.ts +0 -11
- package/src/lib/base/classes/graphql-meta.class.d.ts +0 -48
- package/src/lib/base/classes/helper.class.d.ts +0 -98
- package/src/lib/base/directives/lazy-load.directive.d.ts +0 -14
- package/src/lib/base/directives/resizable.directive.d.ts +0 -23
- package/src/lib/base/guards/logout.guard.d.ts +0 -13
- package/src/lib/base/lenne.tech-ng-base-src-lib-base.metadata.json +0 -1
- package/src/lib/base/package.json +0 -11
- package/src/lib/base/pipes/ellipses.pipe.d.ts +0 -7
- package/src/lib/base/pipes/safe-html.pipe.d.ts +0 -10
- package/src/lib/base/public-api.d.ts +0 -49
- package/src/lib/base/services/auth.service.d.ts +0 -29
- package/src/lib/base/services/loader.service.d.ts +0 -10
- package/src/lib/base/services/storage.service.d.ts +0 -45
- package/src/lib/base/services/ws.service.d.ts +0 -5
- package/src/lib/base/validators/must-match.validator.d.ts +0 -6
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import * as i1 from 'apollo-angular';
|
|
2
|
-
import { APOLLO_OPTIONS, gql
|
|
1
|
+
import * as i1$2 from 'apollo-angular';
|
|
2
|
+
import { APOLLO_OPTIONS, gql } from 'apollo-angular';
|
|
3
3
|
import { HttpLink } from 'apollo-angular/http';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, Injectable, Inject, Directive,
|
|
5
|
+
import { InjectionToken, Injectable, Inject, Directive, Input, Output, HostBinding, PLATFORM_ID, HostListener, Pipe, NgModule } from '@angular/core';
|
|
6
6
|
import { BehaviorSubject, Observable, of, throwError } from 'rxjs';
|
|
7
7
|
import { ApolloLink, split, concat } from '@apollo/client/core';
|
|
8
8
|
import { InMemoryCache } from '@apollo/client/cache';
|
|
9
9
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
10
10
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
11
|
-
import { __awaiter } from 'tslib';
|
|
12
11
|
import { isPlatformBrowser } from '@angular/common';
|
|
13
|
-
import * as i1
|
|
14
|
-
import { DomSanitizer, Title, Meta } from '@angular/platform-browser';
|
|
12
|
+
import * as i1 from '@angular/platform-browser';
|
|
15
13
|
import * as i1$1 from '@angular/router';
|
|
16
|
-
import {
|
|
14
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
17
15
|
import { buildClientSchema, getIntrospectionQuery } from 'graphql';
|
|
18
16
|
import { map } from 'rxjs/operators';
|
|
19
17
|
|
|
@@ -136,29 +134,32 @@ class StorageService {
|
|
|
136
134
|
this.storage.clear();
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
|
-
StorageService.ɵ
|
|
140
|
-
StorageService
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
StorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: StorageService, deps: [{ token: BASE_MODULE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
138
|
+
StorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: StorageService, decorators: [{
|
|
140
|
+
type: Injectable,
|
|
141
|
+
args: [{
|
|
142
|
+
providedIn: 'root',
|
|
143
|
+
}]
|
|
144
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
145
|
+
type: Inject,
|
|
146
|
+
args: [BASE_MODULE_CONFIG]
|
|
147
|
+
}] }]; } });
|
|
148
148
|
|
|
149
149
|
class WsService {
|
|
150
150
|
reconnect() {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
(_b = this.client) === null || _b === void 0 ? void 0 : _b.connect();
|
|
151
|
+
this.client?.close();
|
|
152
|
+
this.client?.connect();
|
|
154
153
|
}
|
|
155
154
|
}
|
|
156
|
-
WsService.ɵ
|
|
157
|
-
WsService
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
WsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: WsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
156
|
+
WsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: WsService, providedIn: 'root' });
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: WsService, decorators: [{
|
|
158
|
+
type: Injectable,
|
|
159
|
+
args: [{
|
|
160
|
+
providedIn: 'root',
|
|
161
|
+
}]
|
|
162
|
+
}] });
|
|
162
163
|
|
|
163
164
|
/**
|
|
164
165
|
* Authentication service
|
|
@@ -213,17 +214,17 @@ class AuthService {
|
|
|
213
214
|
return this._token.asObservable();
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
AuthService.ɵ
|
|
217
|
-
AuthService
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
];
|
|
217
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthService, deps: [{ token: BASE_MODULE_CONFIG }, { token: StorageService }, { token: WsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
218
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthService, decorators: [{
|
|
220
|
+
type: Injectable,
|
|
221
|
+
args: [{
|
|
222
|
+
providedIn: 'root',
|
|
223
|
+
}]
|
|
224
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
225
|
+
type: Inject,
|
|
226
|
+
args: [BASE_MODULE_CONFIG]
|
|
227
|
+
}] }, { type: StorageService }, { type: WsService }]; } });
|
|
227
228
|
|
|
228
229
|
/**
|
|
229
230
|
* Factory for apollo-angular options
|
|
@@ -323,13 +324,12 @@ class ContextMenuDirective {
|
|
|
323
324
|
}
|
|
324
325
|
// Shows or hides our custom context menu, which is specified as a input
|
|
325
326
|
showContextMenu(event, show) {
|
|
326
|
-
var _a;
|
|
327
327
|
const cm = this.ltContextMenu;
|
|
328
328
|
if (cm) {
|
|
329
329
|
// Try to open context menu
|
|
330
330
|
if (show && event && event instanceof MouseEvent) {
|
|
331
331
|
// Get valid clicked structureElement
|
|
332
|
-
const clickedElement =
|
|
332
|
+
const clickedElement = event?.target?.closest(this.selectors);
|
|
333
333
|
if (clickedElement) {
|
|
334
334
|
// Set clicked structureElement
|
|
335
335
|
this.clickedElement = clickedElement;
|
|
@@ -366,24 +366,29 @@ class ContextMenuDirective {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
ContextMenuDirective
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
]
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
];
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
369
|
+
ContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ContextMenuDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
370
|
+
ContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: { contextMenuData: "contextMenuData", ltContextMenu: "ltContextMenu", xGap: "xGap", yGap: "yGap", overflowSpace: "overflowSpace", selectors: "selectors" }, outputs: { clickedElement: "clickedElement" }, exportAs: ["contextMenuData"], ngImport: i0 });
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
372
|
+
type: Directive,
|
|
373
|
+
args: [{
|
|
374
|
+
selector: '[ltContextMenu]',
|
|
375
|
+
exportAs: 'contextMenuData',
|
|
376
|
+
}]
|
|
377
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { contextMenuData: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}], ltContextMenu: [{
|
|
380
|
+
type: Input
|
|
381
|
+
}], xGap: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], yGap: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], overflowSpace: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}], selectors: [{
|
|
388
|
+
type: Input
|
|
389
|
+
}], clickedElement: [{
|
|
390
|
+
type: Output
|
|
391
|
+
}] } });
|
|
387
392
|
|
|
388
393
|
/**
|
|
389
394
|
* Directive for lazy loading images
|
|
@@ -414,18 +419,19 @@ class LazyLoadDirective {
|
|
|
414
419
|
this.srcAttr = this.src;
|
|
415
420
|
}
|
|
416
421
|
}
|
|
417
|
-
LazyLoadDirective
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
];
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
422
|
+
LazyLoadDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LazyLoadDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
423
|
+
LazyLoadDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: LazyLoadDirective, selector: "img[ltLazyLoad]", inputs: { src: "src" }, host: { properties: { "attr.src": "this.srcAttr" } }, ngImport: i0 });
|
|
424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LazyLoadDirective, decorators: [{
|
|
425
|
+
type: Directive,
|
|
426
|
+
args: [{
|
|
427
|
+
selector: 'img[ltLazyLoad]',
|
|
428
|
+
}]
|
|
429
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { srcAttr: [{
|
|
430
|
+
type: HostBinding,
|
|
431
|
+
args: ['attr.src']
|
|
432
|
+
}], src: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}] } });
|
|
429
435
|
|
|
430
436
|
/**
|
|
431
437
|
* Helper class
|
|
@@ -435,7 +441,7 @@ class Helper {
|
|
|
435
441
|
* Simple filter function for plain objects
|
|
436
442
|
*/
|
|
437
443
|
static filter(objects, filter) {
|
|
438
|
-
return (
|
|
444
|
+
return (objects?.filter((element) => {
|
|
439
445
|
for (const [key, value] of Object.entries(filter)) {
|
|
440
446
|
if (Array.isArray(element[key])) {
|
|
441
447
|
for (const item of element[key]) {
|
|
@@ -449,7 +455,7 @@ class Helper {
|
|
|
449
455
|
}
|
|
450
456
|
}
|
|
451
457
|
return true;
|
|
452
|
-
})
|
|
458
|
+
}) || []);
|
|
453
459
|
}
|
|
454
460
|
/**
|
|
455
461
|
* Convert to a url/uri conform string
|
|
@@ -459,7 +465,10 @@ class Helper {
|
|
|
459
465
|
*/
|
|
460
466
|
static urlString(str, options = {}) {
|
|
461
467
|
// Config
|
|
462
|
-
const config =
|
|
468
|
+
const config = {
|
|
469
|
+
allowAll: false,
|
|
470
|
+
...options,
|
|
471
|
+
};
|
|
463
472
|
// To string
|
|
464
473
|
str = str + '';
|
|
465
474
|
// Trim
|
|
@@ -485,7 +494,11 @@ class Helper {
|
|
|
485
494
|
*/
|
|
486
495
|
static map(source, target, options = {}) {
|
|
487
496
|
// Set config
|
|
488
|
-
const config =
|
|
497
|
+
const config = {
|
|
498
|
+
funcAllowed: false,
|
|
499
|
+
dateStringToDate: true,
|
|
500
|
+
...options,
|
|
501
|
+
};
|
|
489
502
|
// Check source
|
|
490
503
|
if (!source || typeof source !== 'object' || Array.isArray(source)) {
|
|
491
504
|
return target;
|
|
@@ -532,21 +545,19 @@ class Helper {
|
|
|
532
545
|
* Get plain parameter
|
|
533
546
|
*/
|
|
534
547
|
static getPlainParameter(parameter) {
|
|
535
|
-
var _a, _b, _c;
|
|
536
548
|
if (!parameter) {
|
|
537
549
|
return parameter;
|
|
538
550
|
}
|
|
539
|
-
return
|
|
551
|
+
return parameter?.split('?')?.shift()?.split('#')?.shift();
|
|
540
552
|
}
|
|
541
553
|
/**
|
|
542
554
|
* Get ID of an url parameter
|
|
543
555
|
*/
|
|
544
556
|
static getParameterId(parameter) {
|
|
545
|
-
var _a;
|
|
546
557
|
if (!parameter) {
|
|
547
558
|
return parameter;
|
|
548
559
|
}
|
|
549
|
-
return
|
|
560
|
+
return Helper.getPlainParameter(parameter)?.split('-').pop();
|
|
550
561
|
}
|
|
551
562
|
/**
|
|
552
563
|
* Delay
|
|
@@ -715,6 +726,15 @@ class Helper {
|
|
|
715
726
|
return false;
|
|
716
727
|
}
|
|
717
728
|
}
|
|
729
|
+
static arrayBufferToBase64(buffer) {
|
|
730
|
+
let binary = '';
|
|
731
|
+
const bytes = new Uint8Array(buffer);
|
|
732
|
+
const len = bytes.byteLength;
|
|
733
|
+
for (let i = 0; i < len; i++) {
|
|
734
|
+
binary += String.fromCharCode(bytes[i]);
|
|
735
|
+
}
|
|
736
|
+
return `data:image/*;base64, ${window.btoa(binary)}`;
|
|
737
|
+
}
|
|
718
738
|
}
|
|
719
739
|
|
|
720
740
|
/**
|
|
@@ -729,9 +749,13 @@ class ImageService {
|
|
|
729
749
|
*/
|
|
730
750
|
preLoadImages(options) {
|
|
731
751
|
// Init configuration
|
|
732
|
-
const config =
|
|
752
|
+
const config = {
|
|
753
|
+
doneFunnction: undefined,
|
|
754
|
+
elements: document,
|
|
755
|
+
regExp: undefined,
|
|
756
|
+
...options,
|
|
757
|
+
};
|
|
733
758
|
return new Promise((resolve) => {
|
|
734
|
-
var _a;
|
|
735
759
|
// Convert element(s) into array
|
|
736
760
|
if (!Array.isArray(config.elements)) {
|
|
737
761
|
// NodeList or HTMLCollection
|
|
@@ -756,7 +780,7 @@ class ImageService {
|
|
|
756
780
|
// Check if changes are necessary and possible
|
|
757
781
|
if ((image.complete && image.naturalHeight !== 0) || // already laoded
|
|
758
782
|
!src || // Image has no src
|
|
759
|
-
|
|
783
|
+
config.regExp?.test(src) // Test if src matches regular expression
|
|
760
784
|
) {
|
|
761
785
|
continue;
|
|
762
786
|
}
|
|
@@ -777,14 +801,14 @@ class ImageService {
|
|
|
777
801
|
// Wait until all images loaded
|
|
778
802
|
Promise.all(promises)
|
|
779
803
|
.catch((e) => console.error('Error during image loading', e))
|
|
780
|
-
.finally(() =>
|
|
804
|
+
.finally(async () => {
|
|
781
805
|
// Return result
|
|
782
806
|
let result;
|
|
783
807
|
if (config.doneFunnction) {
|
|
784
|
-
result =
|
|
808
|
+
result = await config.doneFunction();
|
|
785
809
|
}
|
|
786
810
|
resolve(result);
|
|
787
|
-
})
|
|
811
|
+
});
|
|
788
812
|
});
|
|
789
813
|
}
|
|
790
814
|
/**
|
|
@@ -794,23 +818,23 @@ class ImageService {
|
|
|
794
818
|
* @param src
|
|
795
819
|
* @protected
|
|
796
820
|
*/
|
|
797
|
-
loadImage(imageElement, src) {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
imageElement.src = src;
|
|
804
|
-
});
|
|
821
|
+
async loadImage(imageElement, src) {
|
|
822
|
+
src = src || imageElement.src;
|
|
823
|
+
return new Promise((resolve, reject) => {
|
|
824
|
+
imageElement.onload = () => resolve(imageElement);
|
|
825
|
+
imageElement.onerror = reject;
|
|
826
|
+
imageElement.src = src;
|
|
805
827
|
});
|
|
806
828
|
}
|
|
807
829
|
}
|
|
808
|
-
ImageService.ɵ
|
|
809
|
-
ImageService
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
830
|
+
ImageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
831
|
+
ImageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ImageService, providedIn: 'root' });
|
|
832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ImageService, decorators: [{
|
|
833
|
+
type: Injectable,
|
|
834
|
+
args: [{
|
|
835
|
+
providedIn: 'root',
|
|
836
|
+
}]
|
|
837
|
+
}] });
|
|
814
838
|
|
|
815
839
|
/**
|
|
816
840
|
* Set same height (maximum) to different elements
|
|
@@ -829,62 +853,63 @@ class MatchHeightDirective {
|
|
|
829
853
|
ngOnInit() {
|
|
830
854
|
this.matchHeight(this.el.nativeElement, this.ltMatchHeight);
|
|
831
855
|
}
|
|
832
|
-
matchHeight(parent, target) {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
856
|
+
async matchHeight(parent, target) {
|
|
857
|
+
if (!parent) {
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
let classNames;
|
|
861
|
+
if (!Array.isArray(target)) {
|
|
862
|
+
classNames = [target];
|
|
863
|
+
}
|
|
864
|
+
else {
|
|
865
|
+
classNames = target;
|
|
866
|
+
}
|
|
867
|
+
for (const className of classNames) {
|
|
868
|
+
// find all child structureElements with the selected class name
|
|
869
|
+
const children = parent.getElementsByClassName(className);
|
|
870
|
+
if (!children || children.length < 2) {
|
|
871
|
+
continue;
|
|
840
872
|
}
|
|
841
|
-
|
|
842
|
-
|
|
873
|
+
// Load images of children
|
|
874
|
+
if (this.loadImages) {
|
|
875
|
+
await this.imageService.preLoadImages({ elements: children });
|
|
843
876
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
yield this.imageService.preLoadImages({ elements: children });
|
|
877
|
+
// reset all children height
|
|
878
|
+
Array.from(children).forEach((element) => {
|
|
879
|
+
element.style.height = 'initial';
|
|
880
|
+
});
|
|
881
|
+
// get all the child structureElements heights
|
|
882
|
+
const itemHeights = Array.from(children).map((element) => {
|
|
883
|
+
if (element.getBoundingClientRect) {
|
|
884
|
+
return element.getBoundingClientRect().height;
|
|
853
885
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
return element.getBoundingClientRect().height;
|
|
862
|
-
}
|
|
863
|
-
return 0;
|
|
864
|
-
});
|
|
865
|
-
// find out the tallest one
|
|
866
|
-
const maxHeight = itemHeights.reduce((prev, curr) => (curr > prev ? curr : prev), 0);
|
|
867
|
-
// update the child structureElements height to the tallest one
|
|
868
|
-
Array.from(children).forEach((element) => (element.style.height = `${maxHeight}px`));
|
|
869
|
-
}
|
|
870
|
-
});
|
|
886
|
+
return 0;
|
|
887
|
+
});
|
|
888
|
+
// find out the tallest one
|
|
889
|
+
const maxHeight = itemHeights.reduce((prev, curr) => (curr > prev ? curr : prev), 0);
|
|
890
|
+
// update the child structureElements height to the tallest one
|
|
891
|
+
Array.from(children).forEach((element) => (element.style.height = `${maxHeight}px`));
|
|
892
|
+
}
|
|
871
893
|
}
|
|
872
894
|
}
|
|
873
|
-
MatchHeightDirective
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
]
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}
|
|
895
|
+
MatchHeightDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: MatchHeightDirective, deps: [{ token: i0.ElementRef }, { token: ImageService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
|
|
896
|
+
MatchHeightDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: MatchHeightDirective, selector: "[ltMatchHeight]", inputs: { ltMatchHeight: "ltMatchHeight", loadImages: "loadImages" }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0 });
|
|
897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: MatchHeightDirective, decorators: [{
|
|
898
|
+
type: Directive,
|
|
899
|
+
args: [{
|
|
900
|
+
selector: '[ltMatchHeight]',
|
|
901
|
+
}]
|
|
902
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ImageService }, { type: undefined, decorators: [{
|
|
903
|
+
type: Inject,
|
|
904
|
+
args: [PLATFORM_ID]
|
|
905
|
+
}] }]; }, propDecorators: { ltMatchHeight: [{
|
|
906
|
+
type: Input
|
|
907
|
+
}], loadImages: [{
|
|
908
|
+
type: Input
|
|
909
|
+
}], onResize: [{
|
|
910
|
+
type: HostListener,
|
|
911
|
+
args: ['window:resize']
|
|
912
|
+
}] } });
|
|
888
913
|
|
|
889
914
|
/**
|
|
890
915
|
* Reszise detection
|
|
@@ -961,18 +986,18 @@ class ResizableDirective {
|
|
|
961
986
|
}, true);
|
|
962
987
|
}
|
|
963
988
|
}
|
|
964
|
-
ResizableDirective
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
];
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
};
|
|
989
|
+
ResizableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ResizableDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
990
|
+
ResizableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.3", type: ResizableDirective, selector: "[ltResizable]", inputs: { resizableGrabWidth: "resizableGrabWidth", resizableMinWidth: "resizableMinWidth" }, ngImport: i0 });
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ResizableDirective, decorators: [{
|
|
992
|
+
type: Directive,
|
|
993
|
+
args: [{
|
|
994
|
+
selector: '[ltResizable]',
|
|
995
|
+
}]
|
|
996
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { resizableGrabWidth: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], resizableMinWidth: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}] } });
|
|
976
1001
|
|
|
977
1002
|
/**
|
|
978
1003
|
* Truncate string with ellipses
|
|
@@ -985,11 +1010,14 @@ class EllipsesPipe {
|
|
|
985
1010
|
return value.length > limit ? value.substring(0, limit) + '...' : value;
|
|
986
1011
|
}
|
|
987
1012
|
}
|
|
988
|
-
EllipsesPipe
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1013
|
+
EllipsesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: EllipsesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1014
|
+
EllipsesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: EllipsesPipe, name: "ltEllipses" });
|
|
1015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: EllipsesPipe, decorators: [{
|
|
1016
|
+
type: Pipe,
|
|
1017
|
+
args: [{
|
|
1018
|
+
name: 'ltEllipses',
|
|
1019
|
+
}]
|
|
1020
|
+
}] });
|
|
993
1021
|
|
|
994
1022
|
/**
|
|
995
1023
|
* Declarate html as safe
|
|
@@ -1002,12 +1030,75 @@ class SafeHtmlPipe {
|
|
|
1002
1030
|
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
1003
1031
|
}
|
|
1004
1032
|
}
|
|
1005
|
-
SafeHtmlPipe
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
];
|
|
1033
|
+
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1034
|
+
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SafeHtmlPipe, name: "ltSafeHtml" });
|
|
1035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
1036
|
+
type: Pipe,
|
|
1037
|
+
args: [{ name: 'ltSafeHtml' }]
|
|
1038
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
1039
|
+
|
|
1040
|
+
class DateAgoPipe {
|
|
1041
|
+
constructor() {
|
|
1042
|
+
this.intervals = {
|
|
1043
|
+
year: 31536000,
|
|
1044
|
+
month: 2592000,
|
|
1045
|
+
week: 604800,
|
|
1046
|
+
day: 86400,
|
|
1047
|
+
hour: 3600,
|
|
1048
|
+
minute: 60,
|
|
1049
|
+
second: 1,
|
|
1050
|
+
};
|
|
1051
|
+
this.singular = {
|
|
1052
|
+
year: 'Jahr',
|
|
1053
|
+
month: 'Monat',
|
|
1054
|
+
week: 'Woche',
|
|
1055
|
+
day: 'Tag',
|
|
1056
|
+
hour: 'Stunde',
|
|
1057
|
+
minute: 'Minute',
|
|
1058
|
+
second: 'Sekunde',
|
|
1059
|
+
};
|
|
1060
|
+
this.plural = {
|
|
1061
|
+
year: 'Jahren',
|
|
1062
|
+
month: 'Monaten',
|
|
1063
|
+
week: 'Wochen',
|
|
1064
|
+
day: 'Tagen',
|
|
1065
|
+
hour: 'Stunden',
|
|
1066
|
+
minute: 'Minuten',
|
|
1067
|
+
second: 'Sekunden',
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
transform(value, currentDate) {
|
|
1071
|
+
const now = currentDate ?? new Date();
|
|
1072
|
+
if (value) {
|
|
1073
|
+
const seconds = Math.floor((+now - +new Date(value)) / 1000);
|
|
1074
|
+
if (seconds < 29) {
|
|
1075
|
+
return 'gerade eben'; // less than 30 seconds ago will show as 'Just now'
|
|
1076
|
+
}
|
|
1077
|
+
let counter;
|
|
1078
|
+
for (const i of Object.keys(this.intervals)) {
|
|
1079
|
+
counter = Math.floor(seconds / this.intervals[i]);
|
|
1080
|
+
if (counter > 0) {
|
|
1081
|
+
if (counter === 1) {
|
|
1082
|
+
return 'vor ' + counter + ' ' + this.singular[i]; // singular (1 day ago)
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
return 'vor ' + counter + ' ' + this.plural[i]; // plural (2 days ago)
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
return value;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
DateAgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: DateAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1094
|
+
DateAgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: DateAgoPipe, name: "dateAgo" });
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: DateAgoPipe, decorators: [{
|
|
1096
|
+
type: Pipe,
|
|
1097
|
+
args: [{
|
|
1098
|
+
name: 'dateAgo',
|
|
1099
|
+
pure: true,
|
|
1100
|
+
}]
|
|
1101
|
+
}] });
|
|
1011
1102
|
|
|
1012
1103
|
// Imported and exported elements
|
|
1013
1104
|
const elements = [
|
|
@@ -1019,6 +1110,7 @@ const elements = [
|
|
|
1019
1110
|
// Pipes
|
|
1020
1111
|
EllipsesPipe,
|
|
1021
1112
|
SafeHtmlPipe,
|
|
1113
|
+
DateAgoPipe,
|
|
1022
1114
|
];
|
|
1023
1115
|
/**
|
|
1024
1116
|
* Base module
|
|
@@ -1029,7 +1121,17 @@ class BaseModule {
|
|
|
1029
1121
|
*/
|
|
1030
1122
|
static forRoot(baseModuleConfig = {}, AppAuthService) {
|
|
1031
1123
|
// Default config
|
|
1032
|
-
const config =
|
|
1124
|
+
const config = {
|
|
1125
|
+
apiUrl: 'localhost:3000',
|
|
1126
|
+
authGuardRedirectUrl: '/auth',
|
|
1127
|
+
logging: false,
|
|
1128
|
+
version: null,
|
|
1129
|
+
prefix: null,
|
|
1130
|
+
scrollDetectionOffset: 200,
|
|
1131
|
+
scrollOffset: 100,
|
|
1132
|
+
storageType: 'local',
|
|
1133
|
+
...baseModuleConfig,
|
|
1134
|
+
};
|
|
1033
1135
|
// Prepare providers
|
|
1034
1136
|
const providers = [
|
|
1035
1137
|
{
|
|
@@ -1055,12 +1157,34 @@ class BaseModule {
|
|
|
1055
1157
|
};
|
|
1056
1158
|
}
|
|
1057
1159
|
}
|
|
1058
|
-
BaseModule
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1160
|
+
BaseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1161
|
+
BaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseModule, declarations: [
|
|
1162
|
+
// Directives
|
|
1163
|
+
ContextMenuDirective,
|
|
1164
|
+
LazyLoadDirective,
|
|
1165
|
+
MatchHeightDirective,
|
|
1166
|
+
ResizableDirective,
|
|
1167
|
+
// Pipes
|
|
1168
|
+
EllipsesPipe,
|
|
1169
|
+
SafeHtmlPipe,
|
|
1170
|
+
DateAgoPipe], exports: [
|
|
1171
|
+
// Directives
|
|
1172
|
+
ContextMenuDirective,
|
|
1173
|
+
LazyLoadDirective,
|
|
1174
|
+
MatchHeightDirective,
|
|
1175
|
+
ResizableDirective,
|
|
1176
|
+
// Pipes
|
|
1177
|
+
EllipsesPipe,
|
|
1178
|
+
SafeHtmlPipe,
|
|
1179
|
+
DateAgoPipe] });
|
|
1180
|
+
BaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseModule });
|
|
1181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseModule, decorators: [{
|
|
1182
|
+
type: NgModule,
|
|
1183
|
+
args: [{
|
|
1184
|
+
declarations: elements,
|
|
1185
|
+
exports: elements,
|
|
1186
|
+
}]
|
|
1187
|
+
}] });
|
|
1064
1188
|
|
|
1065
1189
|
/**
|
|
1066
1190
|
* Standard class
|
|
@@ -1191,7 +1315,12 @@ class GraphQLMeta {
|
|
|
1191
1315
|
* Get arguments of GraphQL function
|
|
1192
1316
|
*/
|
|
1193
1317
|
getArgs(functionName, options = {}) {
|
|
1194
|
-
const { cache, freeze, type } =
|
|
1318
|
+
const { cache, freeze, type } = {
|
|
1319
|
+
cache: true,
|
|
1320
|
+
freeze: true,
|
|
1321
|
+
type: undefined,
|
|
1322
|
+
...options,
|
|
1323
|
+
};
|
|
1195
1324
|
// Get cache
|
|
1196
1325
|
if (cache && freeze) {
|
|
1197
1326
|
const args = this.args[functionName + type];
|
|
@@ -1201,7 +1330,7 @@ class GraphQLMeta {
|
|
|
1201
1330
|
}
|
|
1202
1331
|
const func = this.getFunction(functionName, { type });
|
|
1203
1332
|
const result = {};
|
|
1204
|
-
if (func
|
|
1333
|
+
if (func?.args) {
|
|
1205
1334
|
func.args.forEach((item) => {
|
|
1206
1335
|
result[item.name] = this.getDeepType(item.type);
|
|
1207
1336
|
});
|
|
@@ -1216,7 +1345,12 @@ class GraphQLMeta {
|
|
|
1216
1345
|
* Get fields of GraphQL function
|
|
1217
1346
|
*/
|
|
1218
1347
|
getFields(functionName, options = {}) {
|
|
1219
|
-
const { cache, freeze, type } =
|
|
1348
|
+
const { cache, freeze, type } = {
|
|
1349
|
+
cache: true,
|
|
1350
|
+
freeze: true,
|
|
1351
|
+
type: undefined,
|
|
1352
|
+
...options,
|
|
1353
|
+
};
|
|
1220
1354
|
// Get cache
|
|
1221
1355
|
if (cache && freeze) {
|
|
1222
1356
|
const args = this.fields[functionName + type];
|
|
@@ -1237,7 +1371,9 @@ class GraphQLMeta {
|
|
|
1237
1371
|
*/
|
|
1238
1372
|
getFunction(name, options = {}) {
|
|
1239
1373
|
// Set config
|
|
1240
|
-
const config =
|
|
1374
|
+
const config = {
|
|
1375
|
+
...options,
|
|
1376
|
+
};
|
|
1241
1377
|
// Init possible functions
|
|
1242
1378
|
let functions = {};
|
|
1243
1379
|
// If function type is set
|
|
@@ -1253,7 +1389,10 @@ class GraphQLMeta {
|
|
|
1253
1389
|
['Subscription', 'Mutation', 'Query'].forEach((item) => {
|
|
1254
1390
|
const type = this.schema.getType(item);
|
|
1255
1391
|
if (type) {
|
|
1256
|
-
functions =
|
|
1392
|
+
functions = {
|
|
1393
|
+
...functions,
|
|
1394
|
+
...(type.getFields() || {}),
|
|
1395
|
+
};
|
|
1257
1396
|
}
|
|
1258
1397
|
});
|
|
1259
1398
|
}
|
|
@@ -1342,14 +1481,13 @@ class AuthGuard {
|
|
|
1342
1481
|
*/
|
|
1343
1482
|
canActivate(route, state) {
|
|
1344
1483
|
return new Observable((subscriber) => {
|
|
1345
|
-
var _a, _b, _c, _d;
|
|
1346
1484
|
let allowed = false;
|
|
1347
|
-
const opposite =
|
|
1348
|
-
const redirectUrl =
|
|
1485
|
+
const opposite = route?.data?.opposite ? route?.data?.opposite : false;
|
|
1486
|
+
const redirectUrl = route?.data?.redirectUrl ? route.data.redirectUrl : this.moduleConfig.authGuardRedirectUrl;
|
|
1349
1487
|
if (this.authService.token && !opposite) {
|
|
1350
1488
|
if (route.data.allowedRole) {
|
|
1351
1489
|
const user = this.authService.currentUser;
|
|
1352
|
-
allowed =
|
|
1490
|
+
allowed = user?.roles?.includes(route.data.allowedRole);
|
|
1353
1491
|
}
|
|
1354
1492
|
else {
|
|
1355
1493
|
allowed = true;
|
|
@@ -1372,14 +1510,14 @@ class AuthGuard {
|
|
|
1372
1510
|
return this.canActivate(route, state);
|
|
1373
1511
|
}
|
|
1374
1512
|
}
|
|
1375
|
-
AuthGuard
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
];
|
|
1513
|
+
AuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthGuard, deps: [{ token: i1$1.Router }, { token: AuthService }, { token: BASE_MODULE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1514
|
+
AuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthGuard });
|
|
1515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: AuthGuard, decorators: [{
|
|
1516
|
+
type: Injectable
|
|
1517
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: AuthService }, { type: undefined, decorators: [{
|
|
1518
|
+
type: Inject,
|
|
1519
|
+
args: [BASE_MODULE_CONFIG]
|
|
1520
|
+
}] }]; } });
|
|
1383
1521
|
|
|
1384
1522
|
/**
|
|
1385
1523
|
* Guard to check if a component can be deactivated
|
|
@@ -1389,9 +1527,11 @@ class CanDeactivateGuard {
|
|
|
1389
1527
|
return component.canDeactivate ? component.canDeactivate() : true;
|
|
1390
1528
|
}
|
|
1391
1529
|
}
|
|
1392
|
-
CanDeactivateGuard
|
|
1393
|
-
|
|
1394
|
-
|
|
1530
|
+
CanDeactivateGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CanDeactivateGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1531
|
+
CanDeactivateGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CanDeactivateGuard });
|
|
1532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: CanDeactivateGuard, decorators: [{
|
|
1533
|
+
type: Injectable
|
|
1534
|
+
}] });
|
|
1395
1535
|
|
|
1396
1536
|
/**
|
|
1397
1537
|
* Logout guard
|
|
@@ -1414,13 +1554,11 @@ class LogoutGuard {
|
|
|
1414
1554
|
return this.canActivate(route, state);
|
|
1415
1555
|
}
|
|
1416
1556
|
}
|
|
1417
|
-
LogoutGuard
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
{ type: AuthService }
|
|
1423
|
-
];
|
|
1557
|
+
LogoutGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LogoutGuard, deps: [{ token: i1$1.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1558
|
+
LogoutGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LogoutGuard });
|
|
1559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LogoutGuard, decorators: [{
|
|
1560
|
+
type: Injectable
|
|
1561
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: AuthService }]; } });
|
|
1424
1562
|
|
|
1425
1563
|
/**
|
|
1426
1564
|
* Comparison operator enum
|
|
@@ -1464,6 +1602,29 @@ var SortOrderEnum;
|
|
|
1464
1602
|
SortOrderEnum["DESC"] = "DESC";
|
|
1465
1603
|
})(SortOrderEnum || (SortOrderEnum = {}));
|
|
1466
1604
|
|
|
1605
|
+
class FormsService {
|
|
1606
|
+
constructor() { }
|
|
1607
|
+
validateAllFormFields(formGroup) {
|
|
1608
|
+
Object.keys(formGroup.controls).forEach((field) => {
|
|
1609
|
+
const control = formGroup.get(field);
|
|
1610
|
+
if (control instanceof FormControl) {
|
|
1611
|
+
control.markAsTouched({ onlySelf: true });
|
|
1612
|
+
}
|
|
1613
|
+
else if (control instanceof FormGroup) {
|
|
1614
|
+
this.validateAllFormFields(control);
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
FormsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1620
|
+
FormsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormsService, providedIn: 'root' });
|
|
1621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FormsService, decorators: [{
|
|
1622
|
+
type: Injectable,
|
|
1623
|
+
args: [{
|
|
1624
|
+
providedIn: 'root',
|
|
1625
|
+
}]
|
|
1626
|
+
}], ctorParameters: function () { return []; } });
|
|
1627
|
+
|
|
1467
1628
|
/**
|
|
1468
1629
|
* Fullscreen service
|
|
1469
1630
|
*/
|
|
@@ -1503,13 +1664,14 @@ class FullscreenService {
|
|
|
1503
1664
|
});
|
|
1504
1665
|
}
|
|
1505
1666
|
}
|
|
1506
|
-
FullscreenService.ɵ
|
|
1507
|
-
FullscreenService
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1667
|
+
FullscreenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FullscreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1668
|
+
FullscreenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FullscreenService, providedIn: 'root' });
|
|
1669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: FullscreenService, decorators: [{
|
|
1670
|
+
type: Injectable,
|
|
1671
|
+
args: [{
|
|
1672
|
+
providedIn: 'root',
|
|
1673
|
+
}]
|
|
1674
|
+
}], ctorParameters: function () { return []; } });
|
|
1513
1675
|
|
|
1514
1676
|
/**
|
|
1515
1677
|
* GraphQL meta service
|
|
@@ -1535,7 +1697,11 @@ class GraphQLMetaService {
|
|
|
1535
1697
|
*/
|
|
1536
1698
|
getSchema(options = {}) {
|
|
1537
1699
|
// Get configurations
|
|
1538
|
-
const config =
|
|
1700
|
+
const config = {
|
|
1701
|
+
cache: true,
|
|
1702
|
+
freeze: true,
|
|
1703
|
+
...options,
|
|
1704
|
+
};
|
|
1539
1705
|
// Use caching
|
|
1540
1706
|
if (config.cache) {
|
|
1541
1707
|
if (config.freeze && this._frozenSchema) {
|
|
@@ -1583,7 +1749,11 @@ class GraphQLMetaService {
|
|
|
1583
1749
|
*/
|
|
1584
1750
|
getMeta(options = {}) {
|
|
1585
1751
|
// Get configurations
|
|
1586
|
-
const config =
|
|
1752
|
+
const config = {
|
|
1753
|
+
cache: true,
|
|
1754
|
+
log: false,
|
|
1755
|
+
...options,
|
|
1756
|
+
};
|
|
1587
1757
|
// Use caching
|
|
1588
1758
|
if (config.cache) {
|
|
1589
1759
|
if (this._meta) {
|
|
@@ -1608,15 +1778,14 @@ class GraphQLMetaService {
|
|
|
1608
1778
|
return observable;
|
|
1609
1779
|
}
|
|
1610
1780
|
}
|
|
1611
|
-
GraphQLMetaService.ɵ
|
|
1612
|
-
GraphQLMetaService
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
];
|
|
1781
|
+
GraphQLMetaService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLMetaService, deps: [{ token: i1$2.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1782
|
+
GraphQLMetaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLMetaService, providedIn: 'root' });
|
|
1783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLMetaService, decorators: [{
|
|
1784
|
+
type: Injectable,
|
|
1785
|
+
args: [{
|
|
1786
|
+
providedIn: 'root',
|
|
1787
|
+
}]
|
|
1788
|
+
}], ctorParameters: function () { return [{ type: i1$2.Apollo }]; } });
|
|
1620
1789
|
|
|
1621
1790
|
/**
|
|
1622
1791
|
* GraphQL service
|
|
@@ -1638,7 +1807,14 @@ class GraphQLService {
|
|
|
1638
1807
|
throwError('Missing graphql argument');
|
|
1639
1808
|
}
|
|
1640
1809
|
// Get config
|
|
1641
|
-
const config =
|
|
1810
|
+
const config = {
|
|
1811
|
+
arguments: null,
|
|
1812
|
+
fields: null,
|
|
1813
|
+
log: false,
|
|
1814
|
+
model: null,
|
|
1815
|
+
type: GraphQLRequestType.QUERY,
|
|
1816
|
+
...options,
|
|
1817
|
+
};
|
|
1642
1818
|
// Convert class to Object for arguments
|
|
1643
1819
|
if (typeof config.arguments === 'function') {
|
|
1644
1820
|
config.arguments = new config.arguments();
|
|
@@ -1707,7 +1883,7 @@ class GraphQLService {
|
|
|
1707
1883
|
.filter((field) => !argsData.usedArgs.includes(field));
|
|
1708
1884
|
console.log({ argsData, filtered, unused });
|
|
1709
1885
|
}
|
|
1710
|
-
const args =
|
|
1886
|
+
const args = argsData?.argsString || '';
|
|
1711
1887
|
// Log
|
|
1712
1888
|
if (config.log) {
|
|
1713
1889
|
console.log({ graphQL: graphql, args, fields, type: config.type });
|
|
@@ -1740,8 +1916,7 @@ class GraphQLService {
|
|
|
1740
1916
|
request[config.type] = documentNode;
|
|
1741
1917
|
}
|
|
1742
1918
|
this.apollo[func](request).subscribe((result) => {
|
|
1743
|
-
|
|
1744
|
-
const data = ((_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a[graphql]) !== undefined ? result.data[graphql] : result;
|
|
1919
|
+
const data = result?.data?.[graphql] !== undefined ? result.data[graphql] : result;
|
|
1745
1920
|
// Direct data
|
|
1746
1921
|
if (!config.model) {
|
|
1747
1922
|
subscriber.next(data);
|
|
@@ -1776,7 +1951,7 @@ class GraphQLService {
|
|
|
1776
1951
|
result.push(current);
|
|
1777
1952
|
}
|
|
1778
1953
|
else {
|
|
1779
|
-
if (current
|
|
1954
|
+
if (current?.includes('.')) {
|
|
1780
1955
|
cacheNode.push(current.split('.')[1]);
|
|
1781
1956
|
}
|
|
1782
1957
|
else if (current) {
|
|
@@ -1797,7 +1972,14 @@ class GraphQLService {
|
|
|
1797
1972
|
*/
|
|
1798
1973
|
prepareArguments(args, options = {}) {
|
|
1799
1974
|
// Init config variables
|
|
1800
|
-
const { allowed, level, parent, schemaArgs, usedArgs } =
|
|
1975
|
+
const { allowed, level, parent, schemaArgs, usedArgs } = {
|
|
1976
|
+
allowed: null,
|
|
1977
|
+
level: 1,
|
|
1978
|
+
parent: '',
|
|
1979
|
+
schemaArgs: [],
|
|
1980
|
+
usedArgs: [],
|
|
1981
|
+
...options,
|
|
1982
|
+
};
|
|
1801
1983
|
// Check args
|
|
1802
1984
|
if (args === undefined || args === null) {
|
|
1803
1985
|
return { argsString: '', schemaArgs, usedArgs };
|
|
@@ -1813,7 +1995,7 @@ class GraphQLService {
|
|
|
1813
1995
|
if (allowed.length < 1) {
|
|
1814
1996
|
break;
|
|
1815
1997
|
}
|
|
1816
|
-
key = allowedKeys
|
|
1998
|
+
key = allowedKeys?.shift();
|
|
1817
1999
|
}
|
|
1818
2000
|
// Process value
|
|
1819
2001
|
result.push(this.prepareArguments(item, {
|
|
@@ -1933,7 +2115,15 @@ class GraphQLService {
|
|
|
1933
2115
|
*/
|
|
1934
2116
|
prepareFields(fields, options = {}) {
|
|
1935
2117
|
// Config
|
|
1936
|
-
const { allowed, parent, schemaFields, spaces, tab, usedFields } =
|
|
2118
|
+
const { allowed, parent, schemaFields, spaces, tab, usedFields } = {
|
|
2119
|
+
allowed: null,
|
|
2120
|
+
parent: '',
|
|
2121
|
+
schemaFields: [],
|
|
2122
|
+
spaces: 2,
|
|
2123
|
+
tab: 1,
|
|
2124
|
+
usedFields: [],
|
|
2125
|
+
...options,
|
|
2126
|
+
};
|
|
1937
2127
|
// Init fields string
|
|
1938
2128
|
let fieldsString = '';
|
|
1939
2129
|
// Check fields
|
|
@@ -1966,14 +2156,14 @@ class GraphQLService {
|
|
|
1966
2156
|
}
|
|
1967
2157
|
const currentPath = parent + item;
|
|
1968
2158
|
schemaFields.push(currentPath);
|
|
1969
|
-
if (allowed && !
|
|
2159
|
+
if (allowed && !allowed?.[item]) {
|
|
1970
2160
|
continue;
|
|
1971
2161
|
}
|
|
1972
2162
|
usedFields.push(currentPath);
|
|
1973
2163
|
fieldsString =
|
|
1974
2164
|
fieldsString +
|
|
1975
2165
|
this.prepareFields(item, {
|
|
1976
|
-
allowed: typeof
|
|
2166
|
+
allowed: typeof allowed?.[item] === 'object' && !(allowed?.[item] instanceof GraphQLType) ? allowed?.[item] : item,
|
|
1977
2167
|
parent: currentPath + '.',
|
|
1978
2168
|
spaces,
|
|
1979
2169
|
schemaFields,
|
|
@@ -2003,7 +2193,7 @@ class GraphQLService {
|
|
|
2003
2193
|
' ' +
|
|
2004
2194
|
'{' +
|
|
2005
2195
|
this.prepareFields(val, {
|
|
2006
|
-
allowed: typeof
|
|
2196
|
+
allowed: typeof allowed?.[key] === 'object' && !(allowed?.[key] instanceof GraphQLType) ? allowed?.[key] : key,
|
|
2007
2197
|
parent: currentPath + '.',
|
|
2008
2198
|
spaces,
|
|
2009
2199
|
schemaFields,
|
|
@@ -2020,16 +2210,14 @@ class GraphQLService {
|
|
|
2020
2210
|
return { fieldsString, schemaFields, usedFields };
|
|
2021
2211
|
}
|
|
2022
2212
|
}
|
|
2023
|
-
GraphQLService.ɵ
|
|
2024
|
-
GraphQLService
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
{ type: GraphQLMetaService }
|
|
2032
|
-
];
|
|
2213
|
+
GraphQLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLService, deps: [{ token: i1$2.Apollo }, { token: GraphQLMetaService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2214
|
+
GraphQLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLService, providedIn: 'root' });
|
|
2215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLService, decorators: [{
|
|
2216
|
+
type: Injectable,
|
|
2217
|
+
args: [{
|
|
2218
|
+
providedIn: 'root',
|
|
2219
|
+
}]
|
|
2220
|
+
}], ctorParameters: function () { return [{ type: i1$2.Apollo }, { type: GraphQLMetaService }]; } });
|
|
2033
2221
|
|
|
2034
2222
|
/**
|
|
2035
2223
|
* Loader service for loading indication
|
|
@@ -2048,12 +2236,14 @@ class LoaderService {
|
|
|
2048
2236
|
return this.isLoading.asObservable();
|
|
2049
2237
|
}
|
|
2050
2238
|
}
|
|
2051
|
-
LoaderService.ɵ
|
|
2052
|
-
LoaderService
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2239
|
+
LoaderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2240
|
+
LoaderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LoaderService, providedIn: 'root' });
|
|
2241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: LoaderService, decorators: [{
|
|
2242
|
+
type: Injectable,
|
|
2243
|
+
args: [{
|
|
2244
|
+
providedIn: 'root',
|
|
2245
|
+
}]
|
|
2246
|
+
}] });
|
|
2057
2247
|
|
|
2058
2248
|
/**
|
|
2059
2249
|
* GraphQL plus service, for extra error handling and loading indication
|
|
@@ -2112,7 +2302,7 @@ class GraphQLPlusService extends GraphQLService {
|
|
|
2112
2302
|
}
|
|
2113
2303
|
});
|
|
2114
2304
|
}
|
|
2115
|
-
else if (error.message.toLowerCase().includes(excludedErrors
|
|
2305
|
+
else if (error.message.toLowerCase().includes(excludedErrors?.toLowerCase())) {
|
|
2116
2306
|
return;
|
|
2117
2307
|
}
|
|
2118
2308
|
}
|
|
@@ -2122,17 +2312,14 @@ class GraphQLPlusService extends GraphQLService {
|
|
|
2122
2312
|
console.error(error);
|
|
2123
2313
|
}
|
|
2124
2314
|
}
|
|
2125
|
-
GraphQLPlusService.ɵ
|
|
2126
|
-
GraphQLPlusService
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
{ type: GraphQLMetaService },
|
|
2134
|
-
{ type: LoaderService }
|
|
2135
|
-
];
|
|
2315
|
+
GraphQLPlusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLPlusService, deps: [{ token: i1$2.Apollo }, { token: GraphQLMetaService }, { token: LoaderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2316
|
+
GraphQLPlusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLPlusService, providedIn: 'root' });
|
|
2317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: GraphQLPlusService, decorators: [{
|
|
2318
|
+
type: Injectable,
|
|
2319
|
+
args: [{
|
|
2320
|
+
providedIn: 'root',
|
|
2321
|
+
}]
|
|
2322
|
+
}], ctorParameters: function () { return [{ type: i1$2.Apollo }, { type: GraphQLMetaService }, { type: LoaderService }]; } });
|
|
2136
2323
|
|
|
2137
2324
|
/**
|
|
2138
2325
|
* Scroll service for autoscroll to specific fragments
|
|
@@ -2157,7 +2344,12 @@ class ScrollService {
|
|
|
2157
2344
|
* @protected
|
|
2158
2345
|
*/
|
|
2159
2346
|
this.scrollTimer = -1;
|
|
2160
|
-
const config =
|
|
2347
|
+
const config = {
|
|
2348
|
+
scrollDetectionOffset: 200,
|
|
2349
|
+
scrollOffset: 100,
|
|
2350
|
+
scrollSamplingRate: 100,
|
|
2351
|
+
...moduleConfig,
|
|
2352
|
+
};
|
|
2161
2353
|
this.detectionOffset = config.scrollDetectionOffset;
|
|
2162
2354
|
this.scrollOffset = config.scrollOffset;
|
|
2163
2355
|
this.scrollSamplingRate = config.scrollSamplingRate;
|
|
@@ -2165,54 +2357,59 @@ class ScrollService {
|
|
|
2165
2357
|
/**
|
|
2166
2358
|
* Scroll to structureElement with specific ID
|
|
2167
2359
|
*/
|
|
2168
|
-
scrollTo(id, options = {}) {
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
const scrollBodyStyles = JSON.parse(JSON.stringify(window.getComputedStyle(body)));
|
|
2188
|
-
if (config.setOverflow && (scrollBodyStyles.overflowX !== 'visible' || scrollBodyStyles.overflowY !== 'visible')) {
|
|
2189
|
-
// Set body overflow to visible
|
|
2190
|
-
console.warn('Style of body element for overflowX and overflowY will be set to "visible" for scrolling!');
|
|
2191
|
-
body.style.overflowX = 'visible';
|
|
2192
|
-
body.style.overflowY = 'visible';
|
|
2193
|
-
undoOverflowChanges = true;
|
|
2194
|
-
}
|
|
2195
|
-
// Load images before scrolling (once)
|
|
2196
|
-
if (config.loadImagesBefore) {
|
|
2197
|
-
yield this.imageService.preLoadImages();
|
|
2198
|
-
}
|
|
2199
|
-
// Get get bounding rect of target element
|
|
2200
|
-
const cords = el.getBoundingClientRect();
|
|
2201
|
-
// Scroll to element
|
|
2202
|
-
window.scrollBy({ top: cords.top - this.scrollOffset, behavior: 'smooth' });
|
|
2203
|
-
yield this.scrollDone({
|
|
2204
|
-
doneFunction: () => {
|
|
2205
|
-
// Undo changes
|
|
2206
|
-
if (undoOverflowChanges && config.resetStyles) {
|
|
2207
|
-
body.style.overflowX = scrollBodyStyles.overflowX;
|
|
2208
|
-
body.style.overflowY = scrollBodyStyles.overflowY;
|
|
2209
|
-
console.warn('Original style of body element for overflowX and overflowY is set.');
|
|
2210
|
-
}
|
|
2211
|
-
},
|
|
2212
|
-
});
|
|
2213
|
-
// Return stop propagation configuration
|
|
2360
|
+
async scrollTo(id, options = {}) {
|
|
2361
|
+
// Prepare config
|
|
2362
|
+
const config = {
|
|
2363
|
+
checkUrl: false,
|
|
2364
|
+
loadImagesBefore: true,
|
|
2365
|
+
resetStyles: false,
|
|
2366
|
+
setOverflow: true,
|
|
2367
|
+
stopPropagation: true,
|
|
2368
|
+
...options,
|
|
2369
|
+
};
|
|
2370
|
+
// Check current URL
|
|
2371
|
+
if (config.checkUrl && this.router.url !== '/' && !this.router.url.startsWith('/#')) {
|
|
2372
|
+
await this.router.navigate(['/'], { fragment: id });
|
|
2373
|
+
return !config.stopPropagation;
|
|
2374
|
+
}
|
|
2375
|
+
// Check if target element exits
|
|
2376
|
+
const el = document.getElementById(id);
|
|
2377
|
+
if (!el) {
|
|
2378
|
+
console.error('Missing scroll element with ID:', id);
|
|
2214
2379
|
return !config.stopPropagation;
|
|
2380
|
+
}
|
|
2381
|
+
// Check if body overflow is visible
|
|
2382
|
+
// This is necessary for scroll handling
|
|
2383
|
+
const body = document.querySelector('body');
|
|
2384
|
+
let undoOverflowChanges = false;
|
|
2385
|
+
const scrollBodyStyles = JSON.parse(JSON.stringify(window.getComputedStyle(body)));
|
|
2386
|
+
if (config.setOverflow && (scrollBodyStyles.overflowX !== 'visible' || scrollBodyStyles.overflowY !== 'visible')) {
|
|
2387
|
+
// Set body overflow to visible
|
|
2388
|
+
console.warn('Style of body element for overflowX and overflowY will be set to "visible" for scrolling!');
|
|
2389
|
+
body.style.overflowX = 'visible';
|
|
2390
|
+
body.style.overflowY = 'visible';
|
|
2391
|
+
undoOverflowChanges = true;
|
|
2392
|
+
}
|
|
2393
|
+
// Load images before scrolling (once)
|
|
2394
|
+
if (config.loadImagesBefore) {
|
|
2395
|
+
await this.imageService.preLoadImages();
|
|
2396
|
+
}
|
|
2397
|
+
// Get get bounding rect of target element
|
|
2398
|
+
const cords = el.getBoundingClientRect();
|
|
2399
|
+
// Scroll to element
|
|
2400
|
+
window.scrollBy({ top: cords.top - this.scrollOffset, behavior: 'smooth' });
|
|
2401
|
+
await this.scrollDone({
|
|
2402
|
+
doneFunction: () => {
|
|
2403
|
+
// Undo changes
|
|
2404
|
+
if (undoOverflowChanges && config.resetStyles) {
|
|
2405
|
+
body.style.overflowX = scrollBodyStyles.overflowX;
|
|
2406
|
+
body.style.overflowY = scrollBodyStyles.overflowY;
|
|
2407
|
+
console.warn('Original style of body element for overflowX and overflowY is set.');
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2215
2410
|
});
|
|
2411
|
+
// Return stop propagation configuration
|
|
2412
|
+
return !config.stopPropagation;
|
|
2216
2413
|
}
|
|
2217
2414
|
/**
|
|
2218
2415
|
* Get last active structureElement
|
|
@@ -2245,17 +2442,18 @@ class ScrollService {
|
|
|
2245
2442
|
/**
|
|
2246
2443
|
* Scroll done promise
|
|
2247
2444
|
*/
|
|
2248
|
-
scrollDone(options = {}) {
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2445
|
+
async scrollDone(options = {}) {
|
|
2446
|
+
// Init configuration
|
|
2447
|
+
const config = {
|
|
2448
|
+
doneFunction: undefined,
|
|
2449
|
+
...options,
|
|
2450
|
+
};
|
|
2451
|
+
// Wait for scroll done
|
|
2452
|
+
await this.scrollDoneDetection();
|
|
2453
|
+
// Get result
|
|
2454
|
+
if (config.doneFunction) {
|
|
2455
|
+
return config.doneFunction();
|
|
2456
|
+
}
|
|
2259
2457
|
}
|
|
2260
2458
|
/**
|
|
2261
2459
|
* Scroll done detecton
|
|
@@ -2285,17 +2483,17 @@ class ScrollService {
|
|
|
2285
2483
|
return this.scrollPromise;
|
|
2286
2484
|
}
|
|
2287
2485
|
}
|
|
2288
|
-
ScrollService.ɵ
|
|
2289
|
-
ScrollService
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
];
|
|
2486
|
+
ScrollService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ScrollService, deps: [{ token: i1$1.Router }, { token: BASE_MODULE_CONFIG }, { token: ImageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2487
|
+
ScrollService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ScrollService, providedIn: 'root' });
|
|
2488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ScrollService, decorators: [{
|
|
2489
|
+
type: Injectable,
|
|
2490
|
+
args: [{
|
|
2491
|
+
providedIn: 'root',
|
|
2492
|
+
}]
|
|
2493
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: undefined, decorators: [{
|
|
2494
|
+
type: Inject,
|
|
2495
|
+
args: [BASE_MODULE_CONFIG]
|
|
2496
|
+
}] }, { type: ImageService }]; } });
|
|
2299
2497
|
|
|
2300
2498
|
/**
|
|
2301
2499
|
* SEO service for setting HTML meta data
|
|
@@ -2382,38 +2580,75 @@ class SEOService {
|
|
|
2382
2580
|
this.metaTagService.updateTag({ name: 'keywords', content: keywords });
|
|
2383
2581
|
}
|
|
2384
2582
|
}
|
|
2385
|
-
SEOService.ɵ
|
|
2386
|
-
SEOService
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2583
|
+
SEOService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SEOService, deps: [{ token: i1.Title }, { token: i1.Meta }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2584
|
+
SEOService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SEOService, providedIn: 'root' });
|
|
2585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: SEOService, decorators: [{
|
|
2586
|
+
type: Injectable,
|
|
2587
|
+
args: [{
|
|
2588
|
+
providedIn: 'root',
|
|
2589
|
+
}]
|
|
2590
|
+
}], ctorParameters: function () { return [{ type: i1.Title }, { type: i1.Meta }]; } });
|
|
2591
|
+
|
|
2592
|
+
class ThemeService {
|
|
2593
|
+
constructor(storageService) {
|
|
2594
|
+
this.storageService = storageService;
|
|
2595
|
+
this._theme = new BehaviorSubject('light');
|
|
2596
|
+
// Load from storage
|
|
2597
|
+
this.theme = this.storageService.load('theme');
|
|
2598
|
+
// Use system theme if no theme is set
|
|
2599
|
+
if (!this.theme) {
|
|
2600
|
+
this.checkSystemTheme();
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
get theme() {
|
|
2604
|
+
return this._theme.value;
|
|
2605
|
+
}
|
|
2606
|
+
set theme(theme) {
|
|
2607
|
+
this._theme.next(theme);
|
|
2608
|
+
this.storageService.save('theme', theme);
|
|
2609
|
+
}
|
|
2610
|
+
get themeObservable() {
|
|
2611
|
+
return this._theme.asObservable();
|
|
2612
|
+
}
|
|
2613
|
+
/**
|
|
2614
|
+
* Check theme from system
|
|
2615
|
+
*/
|
|
2616
|
+
checkSystemTheme() {
|
|
2617
|
+
if (window.matchMedia) {
|
|
2618
|
+
this.theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
ThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ThemeService, deps: [{ token: StorageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2623
|
+
ThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ThemeService, providedIn: 'root' });
|
|
2624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ThemeService, decorators: [{
|
|
2625
|
+
type: Injectable,
|
|
2626
|
+
args: [{
|
|
2627
|
+
providedIn: 'root',
|
|
2628
|
+
}]
|
|
2629
|
+
}], ctorParameters: function () { return [{ type: StorageService }]; } });
|
|
2395
2630
|
|
|
2396
2631
|
/**
|
|
2397
2632
|
* Custom validator to check that two fields match
|
|
2398
2633
|
* (inspirated by https://jasonwatmore.com/post/2018/11/07/angular-7-reactive-forms-validation-example)
|
|
2399
2634
|
*/
|
|
2400
|
-
|
|
2635
|
+
const MustMatch = (control) => {
|
|
2401
2636
|
return (formGroup) => {
|
|
2402
|
-
const
|
|
2403
|
-
const matchingControl =
|
|
2637
|
+
const baseControl = control.get('password');
|
|
2638
|
+
const matchingControl = control.get('passwordConfirm');
|
|
2404
2639
|
if (matchingControl.errors && !matchingControl.errors.mustMatch) {
|
|
2405
2640
|
// return if another validator has already found an error on the matchingControl
|
|
2406
|
-
return;
|
|
2641
|
+
return null;
|
|
2407
2642
|
}
|
|
2408
2643
|
// set error on matchingControl if validation fails
|
|
2409
|
-
if (
|
|
2410
|
-
|
|
2644
|
+
if (baseControl.value !== matchingControl.value) {
|
|
2645
|
+
return { mustMatch: true };
|
|
2411
2646
|
}
|
|
2412
2647
|
else {
|
|
2413
|
-
|
|
2648
|
+
return null;
|
|
2414
2649
|
}
|
|
2415
2650
|
};
|
|
2416
|
-
}
|
|
2651
|
+
};
|
|
2417
2652
|
|
|
2418
2653
|
/**
|
|
2419
2654
|
* Exports for public API
|
|
@@ -2423,5 +2658,5 @@ function MustMatch(controlName, matchingControlName) {
|
|
|
2423
2658
|
* Generated bundle index. Do not edit.
|
|
2424
2659
|
*/
|
|
2425
2660
|
|
|
2426
|
-
export { AuthGuard, AuthService, BASE_MODULE_CONFIG, BaseModule, BasicUser, CanDeactivateGuard, ComparisonOperatorEnum, ContextMenuDirective, EllipsesPipe, FullscreenService, GraphQLEnum, GraphQLMeta, GraphQLMetaService, GraphQLPlusService, GraphQLRequestType, GraphQLService, GraphQLType, Helper, ImageService, LazyLoadDirective, LoaderService, LogicalOperatorEnum, LogoutGuard, MatchHeightDirective, MustMatch, ResizableDirective, SEOService, SafeHtmlPipe, ScrollService, SortOrderEnum, Standard, StorageService, WsService, apolloOptionsFactory };
|
|
2427
|
-
//# sourceMappingURL=lenne.tech-ng-base
|
|
2661
|
+
export { AuthGuard, AuthService, BASE_MODULE_CONFIG, BaseModule, BasicUser, CanDeactivateGuard, ComparisonOperatorEnum, ContextMenuDirective, DateAgoPipe, EllipsesPipe, FormsService, FullscreenService, GraphQLEnum, GraphQLMeta, GraphQLMetaService, GraphQLPlusService, GraphQLRequestType, GraphQLService, GraphQLType, Helper, ImageService, LazyLoadDirective, LoaderService, LogicalOperatorEnum, LogoutGuard, MatchHeightDirective, MustMatch, ResizableDirective, SEOService, SafeHtmlPipe, ScrollService, SortOrderEnum, Standard, StorageService, ThemeService, WsService, apolloOptionsFactory };
|
|
2662
|
+
//# sourceMappingURL=lenne.tech-ng-base.mjs.map
|