@ng-atomic/common 16.2.0 → 17.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/directives/fallback-src/fallback-src.directive.d.ts +9 -0
- package/directives/fallback-src/index.d.ts +1 -0
- package/esm2022/directives/fallback-src/fallback-src.directive.mjs +25 -0
- package/esm2022/directives/fallback-src/index.mjs +2 -0
- package/esm2022/directives/fallback-src/ng-atomic-common-directives-fallback-src.mjs +5 -0
- package/esm2022/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.mjs +4 -4
- package/esm2022/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.mjs +5 -5
- package/esm2022/interceptors/authorization/authorization.interceptor.mjs +4 -4
- package/esm2022/interceptors/index.mjs +2 -0
- package/esm2022/interceptors/interceptors.module.mjs +54 -0
- package/esm2022/interceptors/ng-atomic-common-interceptors.mjs +5 -0
- package/esm2022/interceptors/throttle/throttle.interceptor.mjs +8 -8
- package/esm2022/interceptors/token/authorization.interceptor.mjs +4 -4
- package/esm2022/models/index.mjs +1 -1
- package/esm2022/pipes/actions/actions.pipe.mjs +4 -4
- package/esm2022/pipes/data-accessor/data-accessor.pipe.mjs +14 -14
- package/esm2022/pipes/domain/domain.pipe.mjs +50 -21
- package/esm2022/pipes/error/error.pipe.mjs +4 -4
- package/esm2022/pipes/grouped-by/grouped-by.pipe.mjs +6 -4
- package/esm2022/pipes/index/index.mjs +2 -0
- package/esm2022/pipes/index/index.pipe.mjs +29 -0
- package/esm2022/pipes/index/ng-atomic-common-pipes-index.mjs +5 -0
- package/esm2022/pipes/index-length/index-length.pipe.mjs +22 -0
- package/esm2022/pipes/index-length/index.mjs +2 -0
- package/esm2022/pipes/index-length/ng-atomic-common-pipes-index-length.mjs +5 -0
- package/esm2022/pipes/keys/keys.pipe.mjs +4 -4
- package/esm2022/pipes/page/index.mjs +2 -0
- package/esm2022/pipes/page/ng-atomic-common-pipes-page.mjs +5 -0
- package/esm2022/pipes/page/page.pipe.mjs +25 -0
- package/esm2022/pipes/pagination/pagination.pipe.mjs +9 -9
- package/esm2022/pipes/query/query.pipe.mjs +14 -7
- package/esm2022/pipes/secret/index.mjs +2 -0
- package/esm2022/pipes/secret/ng-atomic-common-pipes-secret.mjs +5 -0
- package/esm2022/pipes/secret/secret.pipe.mjs +21 -0
- package/esm2022/pipes/select-id/select-id.pipe.mjs +6 -6
- package/esm2022/pipes/signal/signal.pipe.mjs +8 -4
- package/esm2022/pipes/smart-exp/smart-exp.module.mjs +5 -5
- package/esm2022/pipes/smart-exp/smart-exp.pipe.mjs +6 -6
- package/esm2022/pipes/smart-field/smart-field.pipe.mjs +21 -21
- package/esm2022/pipes/sort-by/index.mjs +2 -0
- package/esm2022/pipes/sort-by/ng-atomic-common-pipes-sort-by.mjs +5 -0
- package/esm2022/pipes/sort-by/sort-by.pipe.mjs +32 -0
- package/esm2022/pipes/yen/yen.pipe.mjs +4 -4
- package/esm2022/services/auth/auth.service.mjs +35 -20
- package/esm2022/services/chips-manager/chips.manager.mjs +4 -4
- package/esm2022/services/csv/csv.service.mjs +4 -4
- package/esm2022/services/form/pagination/pagination.service.mjs +4 -4
- package/esm2022/services/form/sort/sort.service.mjs +5 -5
- package/esm2022/services/loading/loading.service.mjs +42 -21
- package/esm2022/services/navigation-history/index.mjs +2 -0
- package/esm2022/services/navigation-history/navigation-history.service.mjs +50 -0
- package/esm2022/services/navigation-history/ng-atomic-common-services-navigation-history.mjs +5 -0
- package/esm2022/services/query-resolver/query-resolver.service.mjs +87 -25
- package/esm2022/services/root-property/index.mjs +2 -0
- package/esm2022/services/root-property/ng-atomic-common-services-root-property.mjs +5 -0
- package/esm2022/services/root-property/root-property.service.mjs +122 -0
- package/esm2022/services/router/index.mjs +2 -0
- package/esm2022/services/router/ng-atomic-common-services-router.mjs +5 -0
- package/esm2022/services/router/router.service.mjs +25 -0
- package/esm2022/services/secret/index.mjs +2 -0
- package/esm2022/services/secret/ng-atomic-common-services-secret.mjs +5 -0
- package/esm2022/services/secret/secret.service.mjs +16 -0
- package/esm2022/services/side-app/index.mjs +2 -0
- package/esm2022/services/side-app/ng-atomic-common-services-side-app.mjs +5 -0
- package/esm2022/services/side-app/side-app.service.mjs +25 -0
- package/esm2022/services/side-nav-mode/index.mjs +2 -0
- package/esm2022/services/side-nav-mode/ng-atomic-common-services-side-nav-mode.mjs +5 -0
- package/esm2022/services/side-nav-mode/side-nav-mode.service.mjs +27 -0
- package/esm2022/services/snack-bar/snack-bar.module.mjs +5 -5
- package/esm2022/services/snack-bar/snack-bar.service.mjs +6 -6
- package/esm2022/services/ui/index.mjs +2 -1
- package/esm2022/services/ui/ui.helpers.mjs +186 -0
- package/esm2022/services/ui/ui.service.mjs +55 -173
- package/esm2022/stores/entities/di.mjs +56 -0
- package/esm2022/stores/entities/entity-store-manager.mjs +42 -0
- package/esm2022/stores/entities/entity-store.mjs +127 -0
- package/esm2022/stores/entities/index.mjs +6 -2
- package/esm2022/stores/entities/proxy-id.service.mjs +29 -0
- package/esm2022/stores/entities/task-composer.mjs +71 -0
- package/esm2022/stores/pagination/pagination.store.mjs +5 -5
- package/esm2022/stores/query/query.store.mjs +7 -7
- package/esm2022/stores/selection/selection.store.mjs +5 -5
- package/esm2022/stores/sort/sort.store.mjs +5 -5
- package/esm2022/utils/form/form.mjs +26 -0
- package/esm2022/utils/form/index.mjs +2 -0
- package/esm2022/utils/get/get.mjs +2 -1
- package/esm2022/utils/index.mjs +5 -2
- package/esm2022/utils/inject/index.mjs +2 -0
- package/esm2022/utils/inject/inject.mjs +120 -0
- package/esm2022/utils/mat-dayjs-date/dayjs-date.adapter.mjs +3 -2
- package/esm2022/utils/mat-dayjs-date/dayjs-date.module.mjs +22 -26
- package/esm2022/utils/page/page.mjs +1 -1
- package/esm2022/utils/router/index.mjs +2 -0
- package/esm2022/utils/router/router.mjs +54 -0
- package/esm2022/utils/time.mjs +8 -0
- package/fesm2022/ng-atomic-common-directives-fallback-src.mjs +32 -0
- package/fesm2022/ng-atomic-common-directives-fallback-src.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs +7 -7
- package/fesm2022/ng-atomic-common-directives-ios-safari-scroll-buggyfill.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-interceptors-authorization.mjs +3 -3
- package/fesm2022/ng-atomic-common-interceptors-authorization.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-interceptors-throttle.mjs +7 -7
- package/fesm2022/ng-atomic-common-interceptors-throttle.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-interceptors-token.mjs +3 -3
- package/fesm2022/ng-atomic-common-interceptors-token.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-interceptors.mjs +61 -0
- package/fesm2022/ng-atomic-common-interceptors.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-actions.mjs +3 -3
- package/fesm2022/ng-atomic-common-pipes-actions.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-data-accessor.mjs +14 -14
- package/fesm2022/ng-atomic-common-pipes-data-accessor.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-domain.mjs +50 -21
- package/fesm2022/ng-atomic-common-pipes-domain.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-error.mjs +3 -3
- package/fesm2022/ng-atomic-common-pipes-error.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-grouped-by.mjs +5 -3
- package/fesm2022/ng-atomic-common-pipes-grouped-by.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-index-length.mjs +29 -0
- package/fesm2022/ng-atomic-common-pipes-index-length.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-index.mjs +36 -0
- package/fesm2022/ng-atomic-common-pipes-index.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-keys.mjs +3 -3
- package/fesm2022/ng-atomic-common-pipes-keys.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-page.mjs +32 -0
- package/fesm2022/ng-atomic-common-pipes-page.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-pagination.mjs +8 -8
- package/fesm2022/ng-atomic-common-pipes-pagination.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-query.mjs +14 -7
- package/fesm2022/ng-atomic-common-pipes-query.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-secret.mjs +28 -0
- package/fesm2022/ng-atomic-common-pipes-secret.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-select-id.mjs +5 -5
- package/fesm2022/ng-atomic-common-pipes-select-id.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-signal.mjs +8 -4
- package/fesm2022/ng-atomic-common-pipes-signal.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-smart-exp.mjs +9 -9
- package/fesm2022/ng-atomic-common-pipes-smart-exp.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs +21 -21
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-sort-by.mjs +39 -0
- package/fesm2022/ng-atomic-common-pipes-sort-by.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-pipes-yen.mjs +3 -3
- package/fesm2022/ng-atomic-common-pipes-yen.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-auth.mjs +35 -20
- package/fesm2022/ng-atomic-common-services-auth.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-chips-manager.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-chips-manager.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-csv.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-csv.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-form-pagination.mjs +3 -3
- package/fesm2022/ng-atomic-common-services-form-pagination.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-form-sort.mjs +4 -4
- package/fesm2022/ng-atomic-common-services-form-sort.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-loading.mjs +42 -21
- package/fesm2022/ng-atomic-common-services-loading.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-navigation-history.mjs +57 -0
- package/fesm2022/ng-atomic-common-services-navigation-history.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-query-resolver.mjs +86 -25
- package/fesm2022/ng-atomic-common-services-query-resolver.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-root-property.mjs +129 -0
- package/fesm2022/ng-atomic-common-services-root-property.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-router.mjs +32 -0
- package/fesm2022/ng-atomic-common-services-router.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-secret.mjs +23 -0
- package/fesm2022/ng-atomic-common-services-secret.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-side-app.mjs +32 -0
- package/fesm2022/ng-atomic-common-services-side-app.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-side-nav-mode.mjs +34 -0
- package/fesm2022/ng-atomic-common-services-side-nav-mode.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-snack-bar.mjs +9 -9
- package/fesm2022/ng-atomic-common-services-snack-bar.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-ui.mjs +237 -174
- package/fesm2022/ng-atomic-common-services-ui.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-entities.mjs +297 -19
- package/fesm2022/ng-atomic-common-stores-entities.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-pagination.mjs +4 -4
- package/fesm2022/ng-atomic-common-stores-pagination.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-query.mjs +6 -6
- package/fesm2022/ng-atomic-common-stores-query.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-selection.mjs +4 -4
- package/fesm2022/ng-atomic-common-stores-selection.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-sort.mjs +4 -4
- package/fesm2022/ng-atomic-common-stores-sort.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-utils-page.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-utils.mjs +227 -124
- package/fesm2022/ng-atomic-common-utils.mjs.map +1 -1
- package/interceptors/index.d.ts +1 -0
- package/interceptors/interceptors.module.d.ts +7 -0
- package/models/index.d.ts +34 -0
- package/package.json +89 -19
- package/pipes/actions/actions.pipe.d.ts +2 -1
- package/pipes/data-accessor/data-accessor.pipe.d.ts +9 -5
- package/pipes/domain/domain.pipe.d.ts +52 -6
- package/pipes/error/error.pipe.d.ts +2 -2
- package/pipes/grouped-by/grouped-by.pipe.d.ts +3 -2
- package/pipes/index/index.d.ts +1 -0
- package/pipes/index/index.pipe.d.ts +11 -0
- package/pipes/index-length/index-length.pipe.d.ts +10 -0
- package/pipes/index-length/index.d.ts +1 -0
- package/pipes/keys/keys.pipe.d.ts +2 -1
- package/pipes/page/index.d.ts +1 -0
- package/pipes/page/page.pipe.d.ts +11 -0
- package/pipes/query/query.pipe.d.ts +5 -4
- package/pipes/secret/index.d.ts +1 -0
- package/pipes/secret/secret.pipe.d.ts +8 -0
- package/pipes/select-id/select-id.pipe.d.ts +2 -2
- package/pipes/signal/signal.pipe.d.ts +3 -2
- package/pipes/smart-exp/smart-exp.pipe.d.ts +2 -1
- package/pipes/smart-field/smart-field.pipe.d.ts +48 -15
- package/pipes/sort-by/index.d.ts +1 -0
- package/pipes/sort-by/sort-by.pipe.d.ts +17 -0
- package/services/auth/auth.service.d.ts +32 -25
- package/services/loading/loading.service.d.ts +20 -8
- package/services/navigation-history/index.d.ts +1 -0
- package/services/navigation-history/navigation-history.service.d.ts +14 -0
- package/services/query-resolver/query-resolver.service.d.ts +25 -8
- package/services/root-property/index.d.ts +1 -0
- package/services/root-property/root-property.service.d.ts +91 -0
- package/services/router/index.d.ts +1 -0
- package/services/router/router.service.d.ts +10 -0
- package/services/secret/index.d.ts +1 -0
- package/services/secret/secret.service.d.ts +6 -0
- package/services/side-app/index.d.ts +1 -0
- package/services/side-app/side-app.service.d.ts +9 -0
- package/services/side-nav-mode/index.d.ts +1 -0
- package/services/side-nav-mode/side-nav-mode.service.d.ts +11 -0
- package/services/snack-bar/snack-bar.service.d.ts +1 -1
- package/services/ui/index.d.ts +1 -0
- package/services/ui/ui.helpers.d.ts +28 -0
- package/services/ui/ui.service.d.ts +42 -47
- package/stores/entities/di.d.ts +15 -0
- package/stores/entities/entity-store-manager.d.ts +12 -0
- package/stores/entities/entity-store.d.ts +86 -0
- package/stores/entities/index.d.ts +5 -1
- package/stores/entities/proxy-id.service.d.ts +10 -0
- package/stores/entities/task-composer.d.ts +35 -0
- package/stores/query/query.store.d.ts +3 -3
- package/utils/form/form.d.ts +10 -0
- package/utils/form/index.d.ts +1 -0
- package/utils/get/get.d.ts +1 -0
- package/utils/index.d.ts +4 -1
- package/utils/inject/index.d.ts +1 -0
- package/utils/inject/inject.d.ts +50 -0
- package/utils/mat-dayjs-date/dayjs-date.module.d.ts +2 -5
- package/utils/page/page.d.ts +1 -1
- package/utils/router/index.d.ts +1 -0
- package/utils/router/router.d.ts +4 -0
- package/utils/time.d.ts +1 -0
- package/esm2022/pipes/smart-sort-by/index.mjs +0 -4
- package/esm2022/pipes/smart-sort-by/ng-atomic-common-pipes-smart-sort-by.mjs +0 -5
- package/esm2022/pipes/smart-sort-by/smart-sort-by.module.mjs +0 -24
- package/esm2022/pipes/smart-sort-by/smart-sort-by.pipe.mjs +0 -28
- package/esm2022/pipes/smart-sort-by/smart-sort-by.transformer.mjs +0 -5
- package/esm2022/stores/entities/entities.store.mjs +0 -32
- package/esm2022/utils/query/index.mjs +0 -2
- package/esm2022/utils/query/query.resolver.mjs +0 -100
- package/fesm2022/ng-atomic-common-pipes-smart-sort-by.mjs +0 -60
- package/fesm2022/ng-atomic-common-pipes-smart-sort-by.mjs.map +0 -1
- package/pipes/smart-sort-by/index.d.ts +0 -3
- package/pipes/smart-sort-by/smart-sort-by.module.d.ts +0 -8
- package/pipes/smart-sort-by/smart-sort-by.pipe.d.ts +0 -11
- package/pipes/smart-sort-by/smart-sort-by.transformer.d.ts +0 -2
- package/stores/entities/entities.store.d.ts +0 -19
- package/utils/query/index.d.ts +0 -1
- package/utils/query/query.resolver.d.ts +0 -2
|
@@ -1,135 +1,19 @@
|
|
|
1
|
-
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { inject, computed, Injectable, PLATFORM_ID, signal, effect, Injector, InjectionToken, isSignal, runInInjectionContext, ElementRef } from '@angular/core';
|
|
3
|
+
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
4
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { NavigationStart, Router, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { combineLatest, filter, map, startWith, shareReplay } from 'rxjs';
|
|
7
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
8
|
+
import { RouterService } from '@ng-atomic/common/services/router';
|
|
9
|
+
import { get, set } from 'lodash-es';
|
|
10
|
+
import { computedAsync } from 'ngxtension/computed-async';
|
|
11
|
+
import { NavigationHistoryService } from '@ng-atomic/common/services/navigation-history';
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
switch (breakpoint) {
|
|
10
|
-
case 'xSmall':
|
|
11
|
-
return {
|
|
12
|
-
root: {
|
|
13
|
-
properties: {
|
|
14
|
-
'--menu-width': '220px',
|
|
15
|
-
'--page-width-lv1': '100vw',
|
|
16
|
-
'--page-width-lv2': '100vw',
|
|
17
|
-
'--page-width-lv3': '100vw',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
frames: {
|
|
21
|
-
sideNav: {
|
|
22
|
-
frameType: 'drawer',
|
|
23
|
-
menuType: 'menu',
|
|
24
|
-
},
|
|
25
|
-
router: {
|
|
26
|
-
type: 'overlay',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
templates: {
|
|
30
|
-
index: {
|
|
31
|
-
type: 'list',
|
|
32
|
-
width: 'var(--page-width-lv1)',
|
|
33
|
-
},
|
|
34
|
-
crud: {
|
|
35
|
-
type: 'form',
|
|
36
|
-
width: 'var(--page-width-lv1)',
|
|
37
|
-
},
|
|
38
|
-
menu: {
|
|
39
|
-
type: 'list',
|
|
40
|
-
width: '220px',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
case 'small':
|
|
45
|
-
case 'medium':
|
|
46
|
-
return {
|
|
47
|
-
root: {
|
|
48
|
-
properties: {
|
|
49
|
-
'--menu-width': '64px',
|
|
50
|
-
'--page-width-lv1': '360px',
|
|
51
|
-
'--page-width-lv2': 'max(calc(min(100vw, 1440px) - 360px - 64px), 360px)',
|
|
52
|
-
'--page-width-lv3': 'max(calc(min(100vw, 1440px) - 64px), 360px)',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
frames: {
|
|
56
|
-
sideNav: {
|
|
57
|
-
frameType: 'lineup',
|
|
58
|
-
menuType: 'icon-button-menu',
|
|
59
|
-
},
|
|
60
|
-
router: {
|
|
61
|
-
type: 'lineup',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
templates: {
|
|
65
|
-
index: {
|
|
66
|
-
type: 'table',
|
|
67
|
-
width: 'var(--page-width-lv2)',
|
|
68
|
-
},
|
|
69
|
-
crud: {
|
|
70
|
-
type: 'form',
|
|
71
|
-
width: 'var(--page-width-lv1)',
|
|
72
|
-
},
|
|
73
|
-
menu: {
|
|
74
|
-
type: 'list',
|
|
75
|
-
width: '220px',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
case 'large':
|
|
80
|
-
case 'xLarge':
|
|
81
|
-
return {
|
|
82
|
-
root: {
|
|
83
|
-
properties: {
|
|
84
|
-
'--menu-width': '220px',
|
|
85
|
-
'--page-width-lv1': '360px',
|
|
86
|
-
'--page-width-lv2': 'max(calc(min(100vw, 1440px) - 360px - 220px), 360px)',
|
|
87
|
-
'--page-width-lv3': 'max(calc(min(100vw, 1440px) - 220px), 360px)',
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
frames: {
|
|
91
|
-
sideNav: {
|
|
92
|
-
frameType: 'lineup',
|
|
93
|
-
menuType: 'menu',
|
|
94
|
-
},
|
|
95
|
-
router: {
|
|
96
|
-
type: 'lineup',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
templates: {
|
|
100
|
-
index: {
|
|
101
|
-
type: 'table',
|
|
102
|
-
width: 'var(--page-width-lv2)',
|
|
103
|
-
},
|
|
104
|
-
crud: {
|
|
105
|
-
type: 'form',
|
|
106
|
-
width: 'var(--page-width-lv1)',
|
|
107
|
-
},
|
|
108
|
-
menu: {
|
|
109
|
-
type: 'list',
|
|
110
|
-
width: '220px',
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
class UiService {
|
|
117
|
-
mapTo(path) {
|
|
118
|
-
return this.ui$.pipe(map((ui) => get(ui, path)));
|
|
119
|
-
}
|
|
120
|
-
/**@deprecated */
|
|
121
|
-
getSignal(path) {
|
|
122
|
-
return computed(() => get(this.ui(), path));
|
|
123
|
-
}
|
|
124
|
-
get$(path) {
|
|
125
|
-
return this.ui$.pipe(map((ui) => get(ui, path)));
|
|
126
|
-
}
|
|
127
|
-
get(path) {
|
|
128
|
-
return computed(() => get(this.ui(), path));
|
|
129
|
-
}
|
|
13
|
+
class BreakPointService {
|
|
130
14
|
constructor() {
|
|
131
15
|
this.breakpointObserver = inject(BreakpointObserver);
|
|
132
|
-
this.
|
|
16
|
+
this.breakpointMap$ = combineLatest({
|
|
133
17
|
xSmall: this.breakpointObserver.observe(Breakpoints.XSmall),
|
|
134
18
|
small: this.breakpointObserver.observe(Breakpoints.Small),
|
|
135
19
|
medium: this.breakpointObserver.observe(Breakpoints.Medium),
|
|
@@ -138,69 +22,248 @@ class UiService {
|
|
|
138
22
|
handset: this.breakpointObserver.observe(Breakpoints.Handset),
|
|
139
23
|
tablet: this.breakpointObserver.observe(Breakpoints.Tablet),
|
|
140
24
|
web: this.breakpointObserver.observe(Breakpoints.Web),
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
handset: this.breakpointObserver.isMatched(Breakpoints.Handset),
|
|
157
|
-
tablet: this.breakpointObserver.isMatched(Breakpoints.Tablet),
|
|
158
|
-
web: this.breakpointObserver.isMatched(Breakpoints.Web),
|
|
159
|
-
}), map((results) => {
|
|
160
|
-
if (results.xSmall)
|
|
25
|
+
});
|
|
26
|
+
this.breakpointMap = toSignal(this.breakpointMap$);
|
|
27
|
+
this.breakpoint = computed(() => {
|
|
28
|
+
const map = this.breakpointMap();
|
|
29
|
+
const test = {
|
|
30
|
+
xSmall: map.xSmall.matches ?? this.breakpointObserver.isMatched(Breakpoints.XSmall),
|
|
31
|
+
small: map.small.matches ?? this.breakpointObserver.isMatched(Breakpoints.Small),
|
|
32
|
+
medium: map.medium.matches ?? this.breakpointObserver.isMatched(Breakpoints.Medium),
|
|
33
|
+
large: map.large.matches ?? this.breakpointObserver.isMatched(Breakpoints.Large),
|
|
34
|
+
xLarge: map.xLarge.matches ?? this.breakpointObserver.isMatched(Breakpoints.XLarge),
|
|
35
|
+
handset: map.handset.matches ?? this.breakpointObserver.isMatched(Breakpoints.Handset),
|
|
36
|
+
tablet: map.tablet.matches ?? this.breakpointObserver.isMatched(Breakpoints.Tablet),
|
|
37
|
+
web: map.web.matches ?? this.breakpointObserver.isMatched(Breakpoints.Web),
|
|
38
|
+
};
|
|
39
|
+
if (test.xSmall)
|
|
161
40
|
return 'xSmall';
|
|
162
|
-
if (
|
|
41
|
+
if (test.small)
|
|
163
42
|
return 'small';
|
|
164
|
-
if (
|
|
43
|
+
if (test.medium)
|
|
165
44
|
return 'medium';
|
|
166
|
-
if (
|
|
45
|
+
if (test.large)
|
|
167
46
|
return 'large';
|
|
168
|
-
if (
|
|
47
|
+
if (test.xLarge)
|
|
169
48
|
return 'xLarge';
|
|
170
|
-
if (
|
|
49
|
+
if (test.handset)
|
|
171
50
|
return 'handset';
|
|
172
|
-
if (
|
|
51
|
+
if (test.tablet)
|
|
173
52
|
return 'tablet';
|
|
174
|
-
if (
|
|
53
|
+
if (test.web)
|
|
175
54
|
return 'web';
|
|
176
|
-
}));
|
|
177
|
-
this.ui$ = this.breakpoint$.pipe(map((breakpoint) => resolveUiConfig(breakpoint)), filter((ui) => !!ui), distinctUntilChanged(), shareReplay(1));
|
|
178
|
-
this.ui = toSignal(this.ui$);
|
|
179
|
-
this.ui$.subscribe((ui) => {
|
|
180
|
-
for (const [key, value] of Object.entries(ui.root.properties)) {
|
|
181
|
-
document.documentElement.style.setProperty(key, value);
|
|
182
|
-
}
|
|
183
55
|
});
|
|
184
56
|
}
|
|
185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
186
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: BreakPointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
58
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: BreakPointService, providedIn: 'root' }); }
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: BreakPointService, decorators: [{
|
|
61
|
+
type: Injectable,
|
|
62
|
+
args: [{ providedIn: 'root' }]
|
|
63
|
+
}] });
|
|
64
|
+
class UiService {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.breakpoint = inject(BreakPointService);
|
|
67
|
+
this.router = inject(RouterService);
|
|
68
|
+
this.platformId = inject(PLATFORM_ID);
|
|
69
|
+
this.paths$ = this.router.events.pipe(filter(event => event instanceof NavigationStart), map((event) => event.url), startWith(isPlatformBrowser(this.platformId) ? window?.location?.pathname : ''), map(url => this.router.parseUrl(url)), map(urlTree => urlTree.root.children?.primary?.segments ?? []));
|
|
70
|
+
this.paths = toSignal(this.paths$);
|
|
71
|
+
this.snapshot$ = this.router.events.pipe(filter(event => event instanceof NavigationStart), map(() => this.router.routerState.snapshot.root));
|
|
72
|
+
this.snapshot = toSignal(this.snapshot$);
|
|
73
|
+
this.uiContext = computed(() => ({
|
|
74
|
+
breakpoint: this.breakpoint.breakpoint(),
|
|
75
|
+
paths: this.paths(),
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
79
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UiService, providedIn: 'root' }); }
|
|
187
80
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UiService, decorators: [{
|
|
189
82
|
type: Injectable,
|
|
190
|
-
args: [{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
83
|
+
args: [{ providedIn: 'root' }]
|
|
84
|
+
}] });
|
|
85
|
+
|
|
86
|
+
function scoped(source, path) {
|
|
87
|
+
const scopedSignal = signal(get(source(), path));
|
|
88
|
+
effect(() => {
|
|
89
|
+
scopedSignal.set(get(source(), path, source()));
|
|
90
|
+
}, { allowSignalWrites: true });
|
|
91
|
+
return computed(() => scopedSignal(), {
|
|
92
|
+
// equal: (a, b) => JSON.stringify(a) === JSON.stringify(b),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function injectBreakpoint() {
|
|
96
|
+
return inject(UiService).breakpoint.breakpoint;
|
|
97
|
+
}
|
|
98
|
+
function injectIsMobile() {
|
|
99
|
+
const breakpoint = injectBreakpoint();
|
|
100
|
+
return computed(() => ['xSmall', 'small'].includes(breakpoint()));
|
|
101
|
+
}
|
|
102
|
+
var NavActionId;
|
|
103
|
+
(function (NavActionId) {
|
|
104
|
+
NavActionId["TOGGLE_SIDE_NAV"] = "[@ng-atomic/common/services/ui] TOGGLE_SIDE_NAV";
|
|
105
|
+
NavActionId["BACK"] = "[@ng-atomic/common/services/ui] BACK";
|
|
106
|
+
})(NavActionId || (NavActionId = {}));
|
|
107
|
+
function injectIsRootPage$() {
|
|
108
|
+
const router = inject(Router);
|
|
109
|
+
const route = inject(ActivatedRoute);
|
|
110
|
+
return router.events.pipe(startWith(null), map(() => {
|
|
111
|
+
const components = [];
|
|
112
|
+
let route_ = route;
|
|
113
|
+
while (route_) {
|
|
114
|
+
if (!route_.parent)
|
|
115
|
+
break;
|
|
116
|
+
route_ = route_.parent;
|
|
117
|
+
if (route_.component) {
|
|
118
|
+
components.push(route_.component);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return !!(components?.length === 1);
|
|
122
|
+
}), map((route) => !!route), shareReplay(1), takeUntilDestroyed());
|
|
123
|
+
}
|
|
124
|
+
function injectIsRootPage() {
|
|
125
|
+
const isRootPage$ = injectIsRootPage$();
|
|
126
|
+
const injector = inject(Injector);
|
|
127
|
+
return computedAsync(() => isRootPage$, { injector });
|
|
128
|
+
}
|
|
129
|
+
function injectNavStartActions(isRootPage = signal(false)) {
|
|
130
|
+
const context = injectUiContext();
|
|
131
|
+
const navigationHistory = inject(NavigationHistoryService);
|
|
132
|
+
return computed(() => {
|
|
133
|
+
switch (context().breakpoint) {
|
|
134
|
+
case 'xLarge':
|
|
135
|
+
case 'large':
|
|
136
|
+
case 'medium':
|
|
137
|
+
case 'small': {
|
|
138
|
+
if (isRootPage()) {
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
if (navigationHistory.isInitial()) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
case 'xSmall': {
|
|
151
|
+
if (isRootPage()) {
|
|
152
|
+
return [{ id: NavActionId.TOGGLE_SIDE_NAV, name: 'メニュー', icon: 'menu' }];
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
if (navigationHistory.isInitial()) {
|
|
156
|
+
return [{ id: NavActionId.TOGGLE_SIDE_NAV, name: 'メニュー', icon: 'menu' }];
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
default: {
|
|
164
|
+
if (isRootPage())
|
|
165
|
+
return [];
|
|
166
|
+
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
196
170
|
}
|
|
197
|
-
function
|
|
198
|
-
return inject(UiService).
|
|
171
|
+
function injectUiContext() {
|
|
172
|
+
return inject(UiService).uiContext;
|
|
173
|
+
}
|
|
174
|
+
const UI_CONFIG_REDUCER = new InjectionToken('UI_CONFIG_REDUCER');
|
|
175
|
+
function call(signalOrValue) {
|
|
176
|
+
return isSignal(signalOrValue) ? signalOrValue() : signalOrValue;
|
|
177
|
+
}
|
|
178
|
+
function provideUiConfig(reducerFactory, path = [], name = 'name') {
|
|
179
|
+
return {
|
|
180
|
+
provide: UI_CONFIG_REDUCER,
|
|
181
|
+
useFactory: (injector) => {
|
|
182
|
+
function _reducerFactory(hostInjector) {
|
|
183
|
+
const reducer = reducerFactory(injector, hostInjector);
|
|
184
|
+
return (config, context) => {
|
|
185
|
+
if (path.length === 0)
|
|
186
|
+
return reducer(config, context);
|
|
187
|
+
return set(config, path, reducer(get(config, path), context));
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
;
|
|
191
|
+
Object.defineProperty(_reducerFactory, 'name', { value: name, configurable: true });
|
|
192
|
+
return _reducerFactory;
|
|
193
|
+
},
|
|
194
|
+
deps: [Injector],
|
|
195
|
+
multi: true,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function injectRootConfig() {
|
|
199
|
+
const uiContext = injectUiContext();
|
|
200
|
+
const reducerFactories = injectReducers();
|
|
201
|
+
const hostInjector = inject(Injector);
|
|
202
|
+
const reducers = reducerFactories.map(reducerFactory => {
|
|
203
|
+
return runInInjectionContext(hostInjector, () => reducerFactory(hostInjector));
|
|
204
|
+
});
|
|
205
|
+
if (!reducers)
|
|
206
|
+
return undefined;
|
|
207
|
+
return computed(() => {
|
|
208
|
+
const context = uiContext();
|
|
209
|
+
return reducers.reduce((acc, reducer) => {
|
|
210
|
+
return runInInjectionContext(hostInjector, () => reducer(acc, context));
|
|
211
|
+
}, {});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function injectUiConfig(paths = []) {
|
|
215
|
+
const rootConfig = injectRootConfig();
|
|
216
|
+
return scoped(rootConfig, paths);
|
|
217
|
+
}
|
|
218
|
+
function makeConfig(defaultUseFactory, path) {
|
|
219
|
+
return {
|
|
220
|
+
provide: function provideConfig(useFactory, label = useFactory ? 'custom' : 'default') {
|
|
221
|
+
useFactory ??= defaultUseFactory;
|
|
222
|
+
return provideUiConfig(useFactory, path, `[${path.join('.')}] ${label}`);
|
|
223
|
+
},
|
|
224
|
+
inject: function injectConfig() {
|
|
225
|
+
return injectUiConfig(path);
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function injectReducers() {
|
|
230
|
+
return injectDeepMulti(UI_CONFIG_REDUCER);
|
|
231
|
+
}
|
|
232
|
+
function injectDeepMulti(token, injector = inject(Injector)) {
|
|
233
|
+
const valueOrArray = injector.get(token, [], { optional: true });
|
|
234
|
+
const items = Array.isArray(valueOrArray) ? valueOrArray : [valueOrArray];
|
|
235
|
+
const parentInjector = injector.get(Injector, null, { skipSelf: true });
|
|
236
|
+
if (!parentInjector)
|
|
237
|
+
return items;
|
|
238
|
+
return [...new Set([...injectDeepMulti(token, parentInjector), ...items])];
|
|
239
|
+
}
|
|
240
|
+
function debugInjector(injector = inject(Injector)) {
|
|
241
|
+
const getParent = (injector, n = 0) => {
|
|
242
|
+
while (injector && n-- > 0) {
|
|
243
|
+
injector = injector.get(Injector, null, { skipSelf: true });
|
|
244
|
+
}
|
|
245
|
+
return injector;
|
|
246
|
+
};
|
|
247
|
+
const getInjectorName = (injector) => {
|
|
248
|
+
const name = injector.get(ElementRef, null)?.nativeElement?.tagName?.toLowerCase();
|
|
249
|
+
if (name)
|
|
250
|
+
return `<${name}>`;
|
|
251
|
+
return `${injector['source']}`;
|
|
252
|
+
};
|
|
253
|
+
const isNodeInjector = (injector) => {
|
|
254
|
+
return injector.get(ElementRef, null) !== null;
|
|
255
|
+
};
|
|
256
|
+
const mapToNames = (reducers) => (reducers ?? []).map(reducer => reducer.name);
|
|
257
|
+
for (let i = 0; i < 20; i++) {
|
|
258
|
+
injector = getParent(injector, i);
|
|
259
|
+
if (injector === Injector.NULL)
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
199
262
|
}
|
|
200
263
|
|
|
201
264
|
/**
|
|
202
265
|
* Generated bundle index. Do not edit.
|
|
203
266
|
*/
|
|
204
267
|
|
|
205
|
-
export { UiService,
|
|
268
|
+
export { BreakPointService, NavActionId, UI_CONFIG_REDUCER, UiService, call, debugInjector, injectBreakpoint, injectDeepMulti, injectIsMobile, injectIsRootPage, injectIsRootPage$, injectNavStartActions, injectReducers, injectRootConfig, injectUiConfig, injectUiContext, makeConfig, provideUiConfig, scoped };
|
|
206
269
|
//# sourceMappingURL=ng-atomic-common-services-ui.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-atomic-common-services-ui.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/ui/ui.service.ts","../../../../../packages/@ng-atomic/common/src/lib/services/ui/ng-atomic-common-services-ui.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Injectable, Signal, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NestedGetType, PathKeys, get } from '@ng-atomic/common/utils';\nimport { Observable, combineLatest, distinctUntilChanged, filter, map, shareReplay, startWith } from 'rxjs';\n\nexport interface UIConfig {\n root: {\n properties: {\n '--page-width-lv1': string,\n '--page-width-lv2': string,\n '--page-width-lv3': string,\n '--menu-width': string,\n },\n },\n frames: {\n sideNav: {\n frameType: 'lineup' | 'drawer',\n menuType: 'icon-button-menu' | 'menu',\n },\n router: {\n type: 'lineup' | 'overlay',\n },\n }\n templates: {\n index: {\n type: 'list' | 'table';\n width: string;\n };\n crud: {\n type: 'form' | 'table';\n width: string;\n };\n menu: {\n type: 'list' | 'table';\n width: string;\n };\n }\n}\ntype Breakpoint = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'handset' | 'tablet' | 'web';\n\nfunction resolveUiConfig(\n breakpoint: Breakpoint,\n): UIConfig {\n switch (breakpoint) {\n case 'xSmall':\n return {\n root: {\n properties: {\n '--menu-width': '220px', \n '--page-width-lv1': '100vw',\n '--page-width-lv2': '100vw',\n '--page-width-lv3': '100vw',\n },\n },\n frames: {\n sideNav: {\n frameType: 'drawer',\n menuType: 'menu',\n },\n router: {\n type: 'overlay',\n },\n },\n templates: {\n index: {\n type: 'list',\n width: 'var(--page-width-lv1)',\n },\n crud: {\n type: 'form',\n width: 'var(--page-width-lv1)',\n },\n menu: {\n type: 'list',\n width: '220px',\n },\n },\n };\n case 'small':\n case 'medium':\n return {\n root: {\n properties: {\n '--menu-width': '64px',\n '--page-width-lv1': '360px',\n '--page-width-lv2': 'max(calc(min(100vw, 1440px) - 360px - 64px), 360px)',\n '--page-width-lv3': 'max(calc(min(100vw, 1440px) - 64px), 360px)',\n },\n },\n frames: {\n sideNav: {\n frameType: 'lineup',\n menuType: 'icon-button-menu',\n },\n router: {\n type: 'lineup',\n },\n },\n templates: {\n index: {\n type: 'table',\n width: 'var(--page-width-lv2)',\n },\n crud: {\n type: 'form',\n width: 'var(--page-width-lv1)',\n },\n menu: {\n type: 'list',\n width: '220px',\n },\n },\n };\n case 'large': \n case 'xLarge':\n return {\n root: {\n properties: {\n '--menu-width': '220px',\n '--page-width-lv1': '360px',\n '--page-width-lv2': 'max(calc(min(100vw, 1440px) - 360px - 220px), 360px)',\n '--page-width-lv3': 'max(calc(min(100vw, 1440px) - 220px), 360px)',\n },\n },\n frames: {\n sideNav: {\n frameType: 'lineup',\n menuType: 'menu',\n },\n router: {\n type: 'lineup',\n },\n },\n templates: {\n index: {\n type: 'table',\n width: 'var(--page-width-lv2)',\n },\n crud: {\n type: 'form',\n width: 'var(--page-width-lv1)',\n },\n menu: {\n type: 'list',\n width: '220px',\n },\n },\n }\n }\n}\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UiService {\n\n protected readonly breakpointObserver = inject(BreakpointObserver);\n private readonly breakpoint$: Observable<Breakpoint> = combineLatest({\n xSmall: this.breakpointObserver.observe(Breakpoints.XSmall),\n small: this.breakpointObserver.observe(Breakpoints.Small),\n medium: this.breakpointObserver.observe(Breakpoints.Medium),\n large: this.breakpointObserver.observe(Breakpoints.Large),\n xLarge: this.breakpointObserver.observe(Breakpoints.XLarge),\n handset: this.breakpointObserver.observe(Breakpoints.Handset),\n tablet: this.breakpointObserver.observe(Breakpoints.Tablet),\n web: this.breakpointObserver.observe(Breakpoints.Web),\n }).pipe(\n map((results) => ({\n xSmall: results.xSmall.matches,\n small: results.small.matches,\n medium: results.medium.matches,\n large: results.large.matches,\n xLarge: results.xLarge.matches,\n handset: results.handset.matches,\n tablet: results.tablet.matches,\n web: results.web.matches,\n })),\n startWith({\n xSmall: this.breakpointObserver.isMatched(Breakpoints.XSmall),\n small: this.breakpointObserver.isMatched(Breakpoints.Small),\n medium: this.breakpointObserver.isMatched(Breakpoints.Medium),\n large: this.breakpointObserver.isMatched(Breakpoints.Large),\n xLarge: this.breakpointObserver.isMatched(Breakpoints.XLarge),\n handset: this.breakpointObserver.isMatched(Breakpoints.Handset),\n tablet: this.breakpointObserver.isMatched(Breakpoints.Tablet),\n web: this.breakpointObserver.isMatched(Breakpoints.Web),\n }),\n map((results) => {\n if (results.xSmall) return 'xSmall';\n if (results.small) return 'small';\n if (results.medium) return 'medium';\n if (results.large) return 'large';\n if (results.xLarge) return 'xLarge';\n if (results.handset) return 'handset';\n if (results.tablet) return 'tablet';\n if (results.web) return 'web';\n }),\n );\n\n readonly ui$: Observable<UIConfig> = this.breakpoint$.pipe(\n map((breakpoint) => resolveUiConfig(breakpoint)),\n filter((ui) => !!ui),\n distinctUntilChanged(),\n shareReplay(1),\n );\n readonly ui = toSignal(this.ui$);\n\n mapTo(path: string) {\n return this.ui$.pipe(map((ui) => get(ui, path as any)));\n }\n\n /**@deprecated */\n getSignal<P extends (keyof any)[], T = UIConfig>(path: [...P]): Signal<NestedGetType<T, P>> {\n return computed(() => get(this.ui(), path as any) as any);\n }\n\n get$<T, P extends PathKeys<T>>(path: P): Observable<NestedGetType<T, P>> {\n return this.ui$.pipe(map((ui) => get<T, P>(ui as T, path)));\n }\n\n get<T, P extends PathKeys<T>>(path: P): Signal<NestedGetType<T, P>> {\n return computed(() => get<T, P>(this.ui() as T, path));\n }\n \n constructor() {\n this.ui$.subscribe((ui) => {\n for (const [key, value] of Object.entries(ui.root.properties)) {\n document.documentElement.style.setProperty(key, value);\n }\n })\n }\n}\n\nexport function injectUiConfig$<T extends UIConfig, P extends PathKeys<T>>(path: P): Observable<NestedGetType<T, P>> {\n return inject(UiService).get$(path);\n}\n\nexport function injectUiConfig<T extends UIConfig, P extends PathKeys<T>>(path: P): Signal<NestedGetType<T, P>> {\n return inject(UiService).get(path);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAyCA,SAAS,eAAe,CACtB,UAAsB,EAAA;AAEtB,IAAA,QAAQ,UAAU;AAChB,QAAA,KAAK,QAAQ;YACX,OAAO;AACL,gBAAA,IAAI,EAAE;AACJ,oBAAA,UAAU,EAAE;AACV,wBAAA,cAAc,EAAE,OAAO;AACvB,wBAAA,kBAAkB,EAAE,OAAO;AAC3B,wBAAA,kBAAkB,EAAE,OAAO;AAC3B,wBAAA,kBAAkB,EAAE,OAAO;AAC5B,qBAAA;AACD,iBAAA;AACF,gBAAA,MAAM,EAAE;AACN,oBAAA,OAAO,EAAE;AACP,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,MAAM;AACjB,qBAAA;AACD,oBAAA,MAAM,EAAE;AACN,wBAAA,IAAI,EAAE,SAAS;AAChB,qBAAA;AACF,iBAAA;AACD,gBAAA,SAAS,EAAE;AACT,oBAAA,KAAK,EAAE;AACL,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,KAAK,EAAE,uBAAuB;AAC/B,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,KAAK,EAAE,uBAAuB;AAC/B,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,KAAK,EAAE,OAAO;AACf,qBAAA;AACF,iBAAA;aACF,CAAC;AACJ,QAAA,KAAK,OAAO,CAAC;AACb,QAAA,KAAK,QAAQ;YACX,OAA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C,CAAC;AACrC;;ACjPA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-services-ui.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/ui/ui.service.ts","../../../../../packages/@ng-atomic/common/src/lib/services/ui/ui.helpers.ts","../../../../../packages/@ng-atomic/common/src/lib/services/ui/ng-atomic-common-services-ui.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Injectable, PLATFORM_ID, computed, effect, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationStart } from '@angular/router';\nimport { combineLatest, filter, map, startWith, tap } from 'rxjs';\nimport { isPlatformBrowser } from '@angular/common';\nimport { RouterService } from '@ng-atomic/common/services/router';\n\nexport interface UIContext {\n breakpoint: Breakpoint;\n paths: any[];\n}\n\nexport type Breakpoint = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'handset' | 'tablet' | 'web';\n\n@Injectable({ providedIn: 'root' })\nexport class BreakPointService {\n protected readonly breakpointObserver = inject(BreakpointObserver);\n readonly breakpointMap$ = combineLatest({\n xSmall: this.breakpointObserver.observe(Breakpoints.XSmall),\n small: this.breakpointObserver.observe(Breakpoints.Small),\n medium: this.breakpointObserver.observe(Breakpoints.Medium),\n large: this.breakpointObserver.observe(Breakpoints.Large),\n xLarge: this.breakpointObserver.observe(Breakpoints.XLarge),\n handset: this.breakpointObserver.observe(Breakpoints.Handset),\n tablet: this.breakpointObserver.observe(Breakpoints.Tablet),\n web: this.breakpointObserver.observe(Breakpoints.Web),\n });\n readonly breakpointMap = toSignal(this.breakpointMap$);\n readonly breakpoint = computed<Breakpoint>(() => {\n const map = this.breakpointMap();\n const test = {\n xSmall: map.xSmall.matches ?? this.breakpointObserver.isMatched(Breakpoints.XSmall),\n small: map.small.matches ?? this.breakpointObserver.isMatched(Breakpoints.Small),\n medium: map.medium.matches ?? this.breakpointObserver.isMatched(Breakpoints.Medium),\n large: map.large.matches ?? this.breakpointObserver.isMatched(Breakpoints.Large),\n xLarge: map.xLarge.matches ?? this.breakpointObserver.isMatched(Breakpoints.XLarge),\n handset: map.handset.matches ?? this.breakpointObserver.isMatched(Breakpoints.Handset),\n tablet: map.tablet.matches ?? this.breakpointObserver.isMatched(Breakpoints.Tablet),\n web: map.web.matches ?? this.breakpointObserver.isMatched(Breakpoints.Web),\n };\n\n if (test.xSmall) return 'xSmall';\n if (test.small) return 'small';\n if (test.medium) return 'medium';\n if (test.large) return 'large';\n if (test.xLarge) return 'xLarge';\n if (test.handset) return 'handset';\n if (test.tablet) return 'tablet';\n if (test.web) return 'web';\n });\n}\n\n@Injectable({ providedIn: 'root' })\nexport class UiService {\n readonly breakpoint = inject(BreakPointService);\n readonly router = inject(RouterService);\n readonly platformId = inject(PLATFORM_ID);\n\n readonly paths$ = this.router.events.pipe(\n filter(event => event instanceof NavigationStart),\n map((event: NavigationStart) => event.url),\n startWith(isPlatformBrowser(this.platformId) ? window?.location?.pathname : ''),\n map(url => this.router.parseUrl(url)),\n map(urlTree => urlTree.root.children?.primary?.segments ?? []),\n );\n readonly paths = toSignal(this.paths$);\n\n readonly snapshot$ = this.router.events.pipe(\n filter(event => event instanceof NavigationStart),\n map(() => this.router.routerState.snapshot.root),\n );\n readonly snapshot = toSignal(this.snapshot$);\n\n readonly uiContext = computed(() => ({\n breakpoint: this.breakpoint.breakpoint(),\n paths: this.paths(),\n }));\n}\n","import { ElementRef, InjectionToken, Injector, Provider, ProviderToken, Signal, computed, effect, inject, isSignal, runInInjectionContext, signal } from \"@angular/core\";\nimport { UIContext, UiService } from \"./ui.service\";\nimport { get, set } from \"lodash-es\";\nimport { Action } from \"@ng-atomic/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { map, shareReplay, startWith } from \"rxjs\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { computedAsync } from \"ngxtension/computed-async\";\nimport { NavigationHistoryService } from \"@ng-atomic/common/services/navigation-history\";\n\nexport function scoped<T extends object, TKey extends keyof T>(source: Signal<T>, path: TKey | [TKey]): Signal<T[TKey]> {\n const scopedSignal = signal<T[TKey]>(get(source(), path));\n effect(() => {\n scopedSignal.set(get(source(), path, source()) as T[TKey]);\n }, {allowSignalWrites: true});\n return computed(() => scopedSignal(), {\n // equal: (a, b) => JSON.stringify(a) === JSON.stringify(b),\n });\n}\n\nexport function injectBreakpoint() {\n return inject(UiService).breakpoint.breakpoint;\n}\n\nexport function injectIsMobile() {\n const breakpoint = injectBreakpoint();\n return computed(() => ['xSmall', 'small'].includes(breakpoint()));\n}\n\nexport enum NavActionId {\n TOGGLE_SIDE_NAV = '[@ng-atomic/common/services/ui] TOGGLE_SIDE_NAV',\n BACK = '[@ng-atomic/common/services/ui] BACK',\n}\n\nexport function injectIsRootPage$() {\n const router = inject(Router);\n const route = inject(ActivatedRoute);\n return router.events.pipe(\n startWith(null),\n map(() => {\n const components = [];\n let route_ = route; \n while(route_) {\n if (!route_.parent) break;\n route_ = route_.parent;\n if (route_.component) {\n components.push(route_.component);\n }\n }\n return !!(components?.length === 1);\n }),\n map((route) => !!route),\n shareReplay(1),\n takeUntilDestroyed(),\n );\n}\n\nexport function injectIsRootPage() {\n const isRootPage$ = injectIsRootPage$();\n const injector = inject(Injector);\n return computedAsync(() => isRootPage$, {injector});\n}\n\nexport function injectNavStartActions(\n isRootPage: Signal<boolean> = signal<boolean>(false),\n): Signal<Action[]> {\n const context = injectUiContext();\n const navigationHistory = inject(NavigationHistoryService);\n return computed(() => {\n switch(context().breakpoint) {\n case 'xLarge':\n case 'large':\n case 'medium':\n case 'small': {\n if (isRootPage()) {\n return [];\n } else {\n if (navigationHistory.isInitial()) {\n return [];\n } else {\n return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];\n }\n }\n }\n case 'xSmall': {\n if (isRootPage()) {\n return [{ id: NavActionId.TOGGLE_SIDE_NAV, name: 'メニュー', icon: 'menu' }];\n } else {\n if (navigationHistory.isInitial()) {\n return [{ id: NavActionId.TOGGLE_SIDE_NAV, name: 'メニュー', icon: 'menu' }]\n } else {\n return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];\n }\n }\n }\n default: {\n if (isRootPage()) return [];\n return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];\n }\n }\n });\n}\n\nexport function injectUiContext(): Signal<UIContext> {\n return inject(UiService).uiContext;\n}\n\nexport type UiConfigReducer<T extends object | string, C extends UIContext = any> = (config: T, context: C) => T;\nexport const UI_CONFIG_REDUCER = new InjectionToken<UiConfigReducer<any>>('UI_CONFIG_REDUCER');\nexport type ReducerFactory<T extends object | string, K extends T = any> \n = (injector: Injector, hostInjector: Injector) => (config: K, context: UIContext) => T;\n\nexport function call<T>(signalOrValue: Signal<T> | T): T {\n return isSignal(signalOrValue) ? signalOrValue() : signalOrValue;\n}\n\nexport function provideUiConfig<T extends object | string>(\n reducerFactory: ReducerFactory<T>,\n path: string[] = [],\n name = 'name',\n): Provider {\n return {\n provide: UI_CONFIG_REDUCER,\n useFactory: (injector: Injector) => {\n function _reducerFactory(hostInjector: Injector) {\n const reducer = reducerFactory(injector, hostInjector); \n return (config: T, context: any) => {\n if (path.length === 0) return reducer(config, context);\n return set(config as object, path, reducer(get<any, any>(config, path), context));\n }\n };\n Object.defineProperty(_reducerFactory, 'name', { value: name, configurable: true });\n return _reducerFactory;\n },\n deps: [Injector],\n multi: true,\n };\n}\n\nexport function injectRootConfig<T extends object>(): Signal<T> {\n const uiContext = injectUiContext();\n const reducerFactories = injectReducers();\n const hostInjector = inject(Injector);\n const reducers = reducerFactories.map(reducerFactory => {\n return runInInjectionContext(hostInjector, () => reducerFactory(hostInjector));\n });\n if (!reducers) return undefined;\n return computed(() => {\n const context = uiContext();\n return reducers.reduce((acc, reducer) => {\n return runInInjectionContext(hostInjector, () => reducer(acc, context));\n }, {} as T);\n });\n}\n\nexport function injectUiConfig<T extends object>(paths: string[] = []): Signal<T> {\n const rootConfig = injectRootConfig();\n return scoped(rootConfig, paths as any);\n}\n\nexport function makeConfig<T extends object>(defaultUseFactory: ReducerFactory<T>, path: string[]) {\n return {\n provide: function provideConfig(useFactory?: ReducerFactory<T>, label = useFactory ? 'custom' : 'default') {\n useFactory ??= defaultUseFactory;\n return provideUiConfig<T>(useFactory, path, `[${path.join('.')}] ${label}`);\n },\n inject: function injectConfig() {\n return injectUiConfig<T>(path);\n },\n }\n}\n\nexport function injectReducers(): ((hostInjector: Injector) => UiConfigReducer<any>)[] {\n return injectDeepMulti<(hostInjector: Injector) => UiConfigReducer<any>>(UI_CONFIG_REDUCER);\n}\n\nexport function injectDeepMulti<T>(token: ProviderToken<T>, injector: Injector = inject(Injector)): T[] {\n const valueOrArray = injector.get(token as ProviderToken<T[]>, [], {optional: true});\n const items = Array.isArray(valueOrArray) ? valueOrArray : [valueOrArray];\n const parentInjector = injector.get(Injector, null, {skipSelf: true});\n if (!parentInjector) return items;\n return [...new Set([...injectDeepMulti(token, parentInjector), ...items])];\n}\n\nexport function debugInjector(injector: Injector | null = inject(Injector)) {\n const getParent = (injector: Injector, n = 0): Injector | null => {\n while (injector && n-- > 0) {\n injector = injector.get(Injector, null, { skipSelf: true });\n }\n return injector;\n }\n\n const getInjectorName = (injector: Injector): string => {\n const name = injector.get(ElementRef, null)?.nativeElement?.tagName?.toLowerCase();\n if (name) return `<${name}>`;\n return `${injector['source']}`;\n }\n\n const isNodeInjector = (injector: Injector): boolean => {\n return injector.get(ElementRef, null) !== null;\n }\n\n const mapToNames = (reducers: any) => (reducers ?? []).map(reducer => reducer.name);\n\n for (let i = 0; i < 20; i++) {\n injector = getParent(injector, i);\n if (injector === Injector.NULL) break;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAgBa,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAA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