@ng-atomic/common 18.2.1 → 18.5.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/common.module.d.ts +15 -0
- package/esm2022/common.module.mjs +34 -0
- package/esm2022/index.mjs +2 -2
- package/esm2022/interceptors/authorization/authorization.interceptor.mjs +2 -2
- package/esm2022/models/index.mjs +1 -1
- package/esm2022/pipes/data-accessor/data-accessor.pipe.mjs +7 -4
- package/esm2022/pipes/domain/domain.pipe.mjs +19 -1
- package/esm2022/pipes/smart-field/smart-field.pipe.mjs +2 -2
- package/esm2022/services/app/app.service.mjs +48 -2
- package/esm2022/services/fab/fab.service.mjs +11 -5
- package/esm2022/services/form/_index/index.service.mjs +2 -2
- package/esm2022/services/form/columns/columns.service.mjs +19 -10
- package/esm2022/services/form/json-schema/index.mjs +2 -0
- package/esm2022/services/form/json-schema/json-schema.mjs +51 -0
- package/esm2022/services/form/json-schema/json-schema.service.mjs +140 -0
- package/esm2022/services/form/json-schema/ng-atomic-common-services-form-json-schema.mjs +5 -0
- package/esm2022/services/initializer/initializer.service.mjs +2 -2
- package/esm2022/services/loading/loading.service.mjs +28 -31
- package/esm2022/services/root-property/root-property.service.mjs +3 -1
- package/esm2022/services/sheets/actions/actions.sheet.mjs +45 -0
- package/esm2022/services/sheets/actions/index.mjs +2 -0
- package/esm2022/services/sheets/actions/ng-atomic-common-services-sheets-actions.mjs +5 -0
- package/esm2022/services/sheets/index.mjs +3 -0
- package/esm2022/services/sheets/ng-atomic-common-services-sheets.mjs +5 -0
- package/esm2022/services/sheets/sheets.module.mjs +25 -0
- package/esm2022/services/sheets/sheets.service.mjs +22 -0
- package/esm2022/services/side-app/side-app.service.mjs +33 -3
- package/esm2022/services/ui/ui.helpers.mjs +47 -65
- package/esm2022/stores/entities/entity-store-adapter.mjs +4 -1
- package/esm2022/stores/entities/entity-store.mjs +13 -1
- package/esm2022/utils/inject/inject.mjs +61 -22
- package/fesm2022/ng-atomic-common-interceptors-authorization.mjs +1 -1
- package/fesm2022/ng-atomic-common-interceptors-authorization.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-data-accessor.mjs +7 -4
- package/fesm2022/ng-atomic-common-pipes-data-accessor.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-domain.mjs +18 -0
- package/fesm2022/ng-atomic-common-pipes-domain.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs +1 -1
- package/fesm2022/ng-atomic-common-pipes-smart-field.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-app.mjs +49 -3
- package/fesm2022/ng-atomic-common-services-app.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-fab.mjs +10 -4
- package/fesm2022/ng-atomic-common-services-fab.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-form-_index.mjs +1 -1
- package/fesm2022/ng-atomic-common-services-form-_index.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-form-columns.mjs +18 -9
- package/fesm2022/ng-atomic-common-services-form-columns.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-form-json-schema.mjs +194 -0
- package/fesm2022/ng-atomic-common-services-form-json-schema.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-initializer.mjs +1 -1
- package/fesm2022/ng-atomic-common-services-initializer.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-loading.mjs +26 -29
- package/fesm2022/ng-atomic-common-services-loading.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-root-property.mjs +2 -0
- package/fesm2022/ng-atomic-common-services-root-property.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-sheets-actions.mjs +52 -0
- package/fesm2022/ng-atomic-common-services-sheets-actions.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-sheets.mjs +50 -0
- package/fesm2022/ng-atomic-common-services-sheets.mjs.map +1 -0
- package/fesm2022/ng-atomic-common-services-side-app.mjs +33 -3
- package/fesm2022/ng-atomic-common-services-side-app.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-services-ui.mjs +46 -64
- package/fesm2022/ng-atomic-common-services-ui.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-stores-entities.mjs +15 -0
- package/fesm2022/ng-atomic-common-stores-entities.mjs.map +1 -1
- package/fesm2022/ng-atomic-common-utils.mjs +62 -23
- package/fesm2022/ng-atomic-common-utils.mjs.map +1 -1
- package/fesm2022/ng-atomic-common.mjs +76 -0
- package/fesm2022/ng-atomic-common.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/models/index.d.ts +1 -0
- package/package.json +20 -2
- package/pipes/data-accessor/data-accessor.pipe.d.ts +4 -3
- package/pipes/domain/domain.pipe.d.ts +2 -1
- package/pipes/smart-field/smart-field.pipe.d.ts +1 -1
- package/services/app/app.service.d.ts +12 -0
- package/services/fab/fab.service.d.ts +3 -3
- package/services/form/columns/columns.service.d.ts +8 -1
- package/services/form/json-schema/index.d.ts +1 -0
- package/services/form/json-schema/json-schema.d.ts +2 -0
- package/services/form/json-schema/json-schema.service.d.ts +54 -0
- package/services/loading/loading.service.d.ts +13 -12
- package/services/sheets/actions/actions.sheet.d.ts +9 -0
- package/services/sheets/actions/index.d.ts +1 -0
- package/services/sheets/index.d.ts +2 -0
- package/services/sheets/sheets.module.d.ts +11 -0
- package/services/sheets/sheets.service.d.ts +10 -0
- package/services/side-app/side-app.service.d.ts +12 -0
- package/services/ui/ui.helpers.d.ts +6 -5
- package/stores/entities/entity-store-adapter.d.ts +3 -6
- package/stores/entities/entity-store.d.ts +4 -0
- package/utils/inject/inject.d.ts +29 -7
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
5
|
+
import { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef } from '@angular/material/bottom-sheet';
|
|
6
|
+
import * as i2 from '@angular/material/list';
|
|
7
|
+
import { MatListModule } from '@angular/material/list';
|
|
8
|
+
import { NgAtomicComponent } from '@ng-atomic/core';
|
|
9
|
+
|
|
10
|
+
// import { IconAtom } from '@ng-atomic/components/atoms/icon';
|
|
11
|
+
class ActionsSheet extends NgAtomicComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.actions = inject(MAT_BOTTOM_SHEET_DATA);
|
|
15
|
+
this.sheetRef = inject((MatBottomSheetRef));
|
|
16
|
+
}
|
|
17
|
+
onItemClick(action) {
|
|
18
|
+
this.dispatch(action, 'root');
|
|
19
|
+
this.sheetRef.dismiss(action);
|
|
20
|
+
}
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: ActionsSheet, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.2", type: ActionsSheet, isStandalone: true, selector: "sheets-actions", usesInheritance: true, ngImport: i0, template: `
|
|
23
|
+
<mat-action-list>
|
|
24
|
+
<button mat-list-item *ngFor="let action of actions" (click)="onItemClick(action)">
|
|
25
|
+
<!-- <atoms-icon matListItemIcon [name]="action.icon" [color]="action.color"></atoms-icon> -->
|
|
26
|
+
<div matListItemTitle [style.color]="action.color">{{ action.name }}</div>
|
|
27
|
+
</button>
|
|
28
|
+
</mat-action-list>
|
|
29
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2.MatActionList, selector: "mat-action-list", exportAs: ["matActionList"] }, { kind: "component", type: i2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i2.MatListItemTitle, selector: "[matListItemTitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: ActionsSheet, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{ selector: 'sheets-actions', standalone: true, imports: [
|
|
34
|
+
CommonModule,
|
|
35
|
+
MatListModule,
|
|
36
|
+
// IconAtom,
|
|
37
|
+
], template: `
|
|
38
|
+
<mat-action-list>
|
|
39
|
+
<button mat-list-item *ngFor="let action of actions" (click)="onItemClick(action)">
|
|
40
|
+
<!-- <atoms-icon matListItemIcon [name]="action.icon" [color]="action.color"></atoms-icon> -->
|
|
41
|
+
<div matListItemTitle [style.color]="action.color">{{ action.name }}</div>
|
|
42
|
+
</button>
|
|
43
|
+
</mat-action-list>
|
|
44
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
45
|
+
}] });
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Generated bundle index. Do not edit.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
export { ActionsSheet };
|
|
52
|
+
//# sourceMappingURL=ng-atomic-common-services-sheets-actions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-services-sheets-actions.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/sheets/actions/actions.sheet.ts","../../../../../packages/@ng-atomic/common/src/lib/services/sheets/actions/ng-atomic-common-services-sheets-actions.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';\nimport { MatListModule } from '@angular/material/list';\nimport { Action, NgAtomicComponent } from '@ng-atomic/core';\n// import { IconAtom } from '@ng-atomic/components/atoms/icon';\n\n@Component({\n selector: 'sheets-actions',\n standalone: true,\n imports: [\n CommonModule,\n MatListModule,\n // IconAtom,\n ],\n template: `\n <mat-action-list>\n <button mat-list-item *ngFor=\"let action of actions\" (click)=\"onItemClick(action)\">\n <!-- <atoms-icon matListItemIcon [name]=\"action.icon\" [color]=\"action.color\"></atoms-icon> -->\n <div matListItemTitle [style.color]=\"action.color\">{{ action.name }}</div>\n </button>\n </mat-action-list>\n `,\n styleUrls: ['./actions.sheet.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionsSheet extends NgAtomicComponent {\n protected actions = inject<Action[]>(MAT_BOTTOM_SHEET_DATA);\n private sheetRef = inject(MatBottomSheetRef<ActionsSheet>);\n\n protected onItemClick(action: Action): void {\n this.dispatch(action, 'root');\n this.sheetRef.dismiss(action);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAKA;AAqBM,MAAO,YAAa,SAAQ,iBAAiB,CAAA;AAnBnD,IAAA,WAAA,GAAA;;AAoBY,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAW,qBAAqB,CAAC,CAAC;AACpD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAC,iBAA+B,EAAC,CAAC;AAM5D,KAAA;AAJW,IAAA,WAAW,CAAC,MAAc,EAAA;AAClC,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9B,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;KAC/B;8GAPU,YAAY,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,EAXb,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;GAOT,EAXC,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,2JACZ,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,wDAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAcJ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAnBxB,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;;qBAEd,EACS,QAAA,EAAA,CAAA;;;;;;;GAOT,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,CAAA;;;ACxBjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/bottom-sheet';
|
|
4
|
+
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
|
5
|
+
|
|
6
|
+
class SheetService {
|
|
7
|
+
constructor(bottomSheet) {
|
|
8
|
+
this.bottomSheet = bottomSheet;
|
|
9
|
+
}
|
|
10
|
+
async openActions(actions) {
|
|
11
|
+
return import('@ng-atomic/common/services/sheets/actions').then(({ ActionsSheet }) => {
|
|
12
|
+
return this.bottomSheet.open(ActionsSheet, { data: actions });
|
|
13
|
+
}).then((ref) => {
|
|
14
|
+
return ref.afterDismissed().toPromise();
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SheetService, deps: [{ token: i1.MatBottomSheet }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
18
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SheetService }); }
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SheetService, decorators: [{
|
|
21
|
+
type: Injectable
|
|
22
|
+
}], ctorParameters: () => [{ type: i1.MatBottomSheet }] });
|
|
23
|
+
|
|
24
|
+
class NgAtomicSheetsModule {
|
|
25
|
+
static forRoot() {
|
|
26
|
+
return {
|
|
27
|
+
ngModule: NgAtomicSheetsModule,
|
|
28
|
+
providers: [],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: NgAtomicSheetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
32
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.2", ngImport: i0, type: NgAtomicSheetsModule, imports: [MatBottomSheetModule] }); }
|
|
33
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: NgAtomicSheetsModule, providers: [SheetService], imports: [MatBottomSheetModule] }); }
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: NgAtomicSheetsModule, decorators: [{
|
|
36
|
+
type: NgModule,
|
|
37
|
+
args: [{
|
|
38
|
+
imports: [
|
|
39
|
+
MatBottomSheetModule
|
|
40
|
+
],
|
|
41
|
+
providers: [SheetService]
|
|
42
|
+
}]
|
|
43
|
+
}] });
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Generated bundle index. Do not edit.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
export { NgAtomicSheetsModule, SheetService };
|
|
50
|
+
//# sourceMappingURL=ng-atomic-common-services-sheets.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-services-sheets.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/sheets/sheets.service.ts","../../../../../packages/@ng-atomic/common/src/lib/services/sheets/sheets.module.ts","../../../../../packages/@ng-atomic/common/src/lib/services/sheets/ng-atomic-common-services-sheets.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { MatBottomSheet, MatBottomSheetRef } from '@angular/material/bottom-sheet';\nimport { Action } from '@ng-atomic/core';\n\n@Injectable()\nexport class SheetService {\n\n constructor(private bottomSheet: MatBottomSheet) { }\n\n async openActions(actions: Action[]): Promise<Action | null> {\n return import('@ng-atomic/common/services/sheets/actions').then(({ActionsSheet}) => {\n return this.bottomSheet.open(ActionsSheet, {data: actions});\n }).then((ref: MatBottomSheetRef) => {\n return ref.afterDismissed().toPromise();\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { MatBottomSheetModule } from '@angular/material/bottom-sheet';\nimport { SheetService } from \"./sheets.service\";\n\n@NgModule({\n imports: [\n MatBottomSheetModule\n ],\n providers: [SheetService]\n})\nexport class NgAtomicSheetsModule {\n static forRoot() {\n return {\n ngModule: NgAtomicSheetsModule,\n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IAAA,EAAA,oBAAoB,YAJ7B,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAIX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAFpB,SAAA,EAAA,CAAC,YAAY,CAAC,YAFvB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIX,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;oBACD,SAAS,EAAE,CAAC,YAAY,CAAC;AAC1B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal,
|
|
2
|
+
import { Injectable, signal, inject } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { merge } from 'lodash-es';
|
|
3
5
|
|
|
6
|
+
class SideAppRouter extends Router {
|
|
7
|
+
setSideApp(sideApp) {
|
|
8
|
+
this.sideApp = sideApp;
|
|
9
|
+
}
|
|
10
|
+
navigate(commands, extras) {
|
|
11
|
+
const _commands = extras?.relativeTo ? commands : ['', { outlets: { 'side': commands } }];
|
|
12
|
+
return super.navigate(_commands, merge({
|
|
13
|
+
replaceUrl: true,
|
|
14
|
+
// skipLocationChange: true,
|
|
15
|
+
}, extras)).then((res) => {
|
|
16
|
+
if (extras?.expanded === true) {
|
|
17
|
+
this.sideApp.expand();
|
|
18
|
+
}
|
|
19
|
+
else if (extras?.expanded === false) {
|
|
20
|
+
this.sideApp.collapse();
|
|
21
|
+
}
|
|
22
|
+
return res;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SideAppRouter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
26
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SideAppRouter, providedIn: 'root' }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: SideAppRouter, decorators: [{
|
|
29
|
+
type: Injectable,
|
|
30
|
+
args: [{ providedIn: 'root' }]
|
|
31
|
+
}] });
|
|
4
32
|
class SideAppService {
|
|
5
33
|
constructor() {
|
|
6
34
|
this.opened = signal(false);
|
|
35
|
+
this.router = inject(SideAppRouter);
|
|
36
|
+
this.router.setSideApp(this);
|
|
7
37
|
}
|
|
8
38
|
toggle() {
|
|
9
39
|
this.opened.set(!this.opened());
|
|
@@ -22,11 +52,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImpor
|
|
|
22
52
|
args: [{
|
|
23
53
|
providedIn: 'root'
|
|
24
54
|
}]
|
|
25
|
-
}] });
|
|
55
|
+
}], ctorParameters: () => [] });
|
|
26
56
|
|
|
27
57
|
/**
|
|
28
58
|
* Generated bundle index. Do not edit.
|
|
29
59
|
*/
|
|
30
60
|
|
|
31
|
-
export { SideAppService };
|
|
61
|
+
export { SideAppRouter, SideAppService };
|
|
32
62
|
//# sourceMappingURL=ng-atomic-common-services-side-app.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-atomic-common-services-side-app.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/side-app/side-app.service.ts","../../../../../packages/@ng-atomic/common/src/lib/services/side-app/ng-atomic-common-services-side-app.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SideAppService {\n readonly opened = signal(false);\n\n toggle() {\n this.opened.set(!this.opened());\n }\n\n collapse() {\n this.opened.set(false);\n }\n\n expand() {\n this.opened.set(true);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ng-atomic-common-services-side-app.mjs","sources":["../../../../../packages/@ng-atomic/common/src/lib/services/side-app/side-app.service.ts","../../../../../packages/@ng-atomic/common/src/lib/services/side-app/ng-atomic-common-services-side-app.ts"],"sourcesContent":["import { inject, Injectable, signal } from '@angular/core';\nimport { NavigationExtras, Router } from '@angular/router';\nimport { merge } from 'lodash-es';\n\n@Injectable({providedIn: 'root'})\nexport class SideAppRouter extends Router {\n protected sideApp: SideAppService;\n\n setSideApp(sideApp: SideAppService) {\n this.sideApp = sideApp;\n }\n\n navigate(commands: any[], extras?: NavigationExtras & {expanded?: boolean}): Promise<boolean> {\n const _commands = extras?.relativeTo ? commands : ['', {outlets: {'side': commands}}];\n return super.navigate(_commands, merge({\n replaceUrl: true,\n // skipLocationChange: true,\n }, extras)).then((res) => {\n if (extras?.expanded === true) {\n this.sideApp.expand();\n } else if (extras?.expanded === false) {\n this.sideApp.collapse();\n }\n return res;\n });\n }\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SideAppService {\n readonly opened = signal(false);\n readonly router = inject(SideAppRouter);\n\n constructor() {\n this.router.setSideApp(this);\n }\n\n toggle() {\n this.opened.set(!this.opened());\n }\n\n collapse() {\n this.opened.set(false);\n }\n\n expand() {\n this.opened.set(true);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKM,MAAO,aAAc,SAAQ,MAAM,CAAA;AAGvC,IAAA,UAAU,CAAC,OAAuB,EAAA;AAChC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAED,QAAQ,CAAC,QAAe,EAAE,MAAgD,EAAA;QACxE,MAAM,SAAS,GAAG,MAAM,EAAE,UAAU,GAAG,Q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QACJ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KACjC;IAED,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACxB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACvB;8GAlBU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, PLATFORM_ID, computed, Injectable, signal, effect, Injector, InjectionToken, isSignal, runInInjectionContext, ElementRef } from '@angular/core';
|
|
3
3
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { NavigationStart, Router, ActivatedRoute } from '@angular/router';
|
|
5
|
-
import { filter, map, startWith, shareReplay } from 'rxjs';
|
|
4
|
+
import { NavigationStart, Router, ActivatedRoute, PRIMARY_OUTLET } from '@angular/router';
|
|
5
|
+
import { filter, map, startWith, take, shareReplay } from 'rxjs';
|
|
6
6
|
import { isPlatformBrowser } from '@angular/common';
|
|
7
7
|
import { RouterService } from '@ng-atomic/common/services/router';
|
|
8
8
|
import { BreakpointService } from '@ng-atomic/common/services/breakpoint';
|
|
9
9
|
import { get, set } from 'lodash-es';
|
|
10
|
-
import { computedAsync } from 'ngxtension/computed-async';
|
|
11
10
|
import { NavigationHistoryService } from '@ng-atomic/common/services/navigation-history';
|
|
11
|
+
import { derivedAsync } from 'ngxtension/derived-async';
|
|
12
12
|
|
|
13
13
|
class UiService {
|
|
14
14
|
constructor() {
|
|
@@ -52,27 +52,33 @@ var NavActionId;
|
|
|
52
52
|
NavActionId["BACK"] = "[@ng-atomic/common/services/ui] BACK";
|
|
53
53
|
NavActionId["CLOSE"] = "[@ng-atomic/common/services/ui] CLOSE";
|
|
54
54
|
})(NavActionId || (NavActionId = {}));
|
|
55
|
-
|
|
55
|
+
// routeを遡る
|
|
56
|
+
function flattenRoutes(route) {
|
|
57
|
+
const routes = [];
|
|
58
|
+
let route_ = route;
|
|
59
|
+
while (route_) {
|
|
60
|
+
routes.push(route_);
|
|
61
|
+
if (!route_.parent)
|
|
62
|
+
break;
|
|
63
|
+
route_ = route_.parent;
|
|
64
|
+
}
|
|
65
|
+
return routes;
|
|
66
|
+
}
|
|
67
|
+
function injectIsRootPage$(outlet = PRIMARY_OUTLET) {
|
|
56
68
|
const router = inject(Router);
|
|
57
69
|
const route = inject(ActivatedRoute);
|
|
58
70
|
return router.events.pipe(startWith(null), map(() => {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (route_.component) {
|
|
66
|
-
components.push(route_.component);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return !!(components?.length === 1);
|
|
70
|
-
}), map((route) => !!route), shareReplay(1), takeUntilDestroyed());
|
|
71
|
+
const routes = flattenRoutes(route).reverse();
|
|
72
|
+
const outletComponentRoutes = routes
|
|
73
|
+
.slice(routes.findIndex(route => route.outlet === outlet))
|
|
74
|
+
.filter(route => route.snapshot.paramMap.get('skip') !== 'true' && !!route?.component);
|
|
75
|
+
return outletComponentRoutes.length <= 2;
|
|
76
|
+
}), take(1), shareReplay(1), takeUntilDestroyed());
|
|
71
77
|
}
|
|
72
|
-
function injectIsRootPage() {
|
|
73
|
-
const isRootPage$ = injectIsRootPage$();
|
|
78
|
+
function injectIsRootPage(outlet = PRIMARY_OUTLET) {
|
|
79
|
+
const isRootPage$ = injectIsRootPage$(outlet);
|
|
74
80
|
const injector = inject(Injector);
|
|
75
|
-
return
|
|
81
|
+
return derivedAsync(() => isRootPage$, { injector });
|
|
76
82
|
}
|
|
77
83
|
function injectNavStartActions(isRootPage = signal(false)) {
|
|
78
84
|
const context = injectUiContext();
|
|
@@ -117,44 +123,19 @@ function injectNavStartActions(isRootPage = signal(false)) {
|
|
|
117
123
|
}
|
|
118
124
|
});
|
|
119
125
|
}
|
|
126
|
+
function injectNavStartActionsV2() {
|
|
127
|
+
const isRootPage = injectIsRootPage();
|
|
128
|
+
return injectNavStartActions(isRootPage);
|
|
129
|
+
}
|
|
120
130
|
function injectSideAppNavStartActions(isRootPage = signal(false)) {
|
|
121
131
|
const context = injectUiContext();
|
|
122
|
-
const navigationHistory = inject(NavigationHistoryService);
|
|
123
|
-
let isInitial;
|
|
124
132
|
return computed(() => {
|
|
125
133
|
switch (context().breakpoint) {
|
|
126
|
-
case 'xLarge':
|
|
127
|
-
case 'large':
|
|
128
|
-
case 'medium':
|
|
129
|
-
case 'small': {
|
|
130
|
-
if (isRootPage()) {
|
|
131
|
-
return [];
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
if (isInitial ??= navigationHistory.isInitial()) {
|
|
135
|
-
return [{ id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' }];
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
case 'xSmall': {
|
|
143
|
-
if (isRootPage()) {
|
|
144
|
-
return [{ id: NavActionId.TOGGLE_SIDE_NAV, name: 'メニュー', icon: 'menu' }];
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
if (isInitial ??= navigationHistory.isInitial()) {
|
|
148
|
-
return [{ id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' }];
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
134
|
default: {
|
|
156
135
|
if (isRootPage())
|
|
157
|
-
return [
|
|
136
|
+
return [
|
|
137
|
+
{ id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' },
|
|
138
|
+
];
|
|
158
139
|
return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];
|
|
159
140
|
}
|
|
160
141
|
}
|
|
@@ -182,9 +163,9 @@ function setReducerPath(reducer, path) {
|
|
|
182
163
|
function getReducerPath(reducer) {
|
|
183
164
|
return reducer['path'];
|
|
184
165
|
}
|
|
185
|
-
function provideUiConfig(reducerFactory, path = [], name = 'name') {
|
|
166
|
+
function provideUiConfig(reducerFactory, path = [], name = 'name', token = UI_CONFIG_REDUCER) {
|
|
186
167
|
return {
|
|
187
|
-
provide:
|
|
168
|
+
provide: token,
|
|
188
169
|
useFactory: (injector) => {
|
|
189
170
|
function _reducerFactory(hostInjector) {
|
|
190
171
|
const reducer = reducerFactory(injector, hostInjector);
|
|
@@ -202,9 +183,9 @@ function provideUiConfig(reducerFactory, path = [], name = 'name') {
|
|
|
202
183
|
multi: true,
|
|
203
184
|
};
|
|
204
185
|
}
|
|
205
|
-
function injectRootConfig(paths = []) {
|
|
186
|
+
function injectRootConfig(paths = [], token = UI_CONFIG_REDUCER) {
|
|
206
187
|
const uiContext = injectUiContext();
|
|
207
|
-
const factories = injectReducerFactories(paths);
|
|
188
|
+
const factories = injectReducerFactories(paths, token);
|
|
208
189
|
const hostInjector = inject(Injector);
|
|
209
190
|
const reducers = factories.map(factory => {
|
|
210
191
|
return runInInjectionContext(hostInjector, () => factory(hostInjector));
|
|
@@ -220,27 +201,28 @@ function injectRootConfig(paths = []) {
|
|
|
220
201
|
return rootConfig;
|
|
221
202
|
}
|
|
222
203
|
// TODO(@nontangent): itemsなどの取得が全てのコンポーネントで行われるので計算を最適化する。
|
|
223
|
-
function injectUiConfig(paths = []) {
|
|
224
|
-
const rootConfig = injectRootConfig(paths);
|
|
204
|
+
function injectUiConfig(paths = [], token = UI_CONFIG_REDUCER) {
|
|
205
|
+
const rootConfig = injectRootConfig(paths, token);
|
|
225
206
|
return scoped(rootConfig, paths);
|
|
226
207
|
}
|
|
227
208
|
function makeConfig(defaultUseFactory, path) {
|
|
228
209
|
const factory = wrap(defaultUseFactory);
|
|
210
|
+
const token = new InjectionToken(`[${path.join('.')}] UI_CONFIG_REDUCER`);
|
|
229
211
|
return {
|
|
230
212
|
provide(useFactory, label = useFactory ? 'custom' : 'default') {
|
|
231
213
|
useFactory ??= factory;
|
|
232
|
-
return provideUiConfig(useFactory, path, `[${path.join('.')}] ${label}
|
|
214
|
+
return provideUiConfig(useFactory, path, `[${path.join('.')}] ${label}`, token);
|
|
233
215
|
},
|
|
234
216
|
inject() {
|
|
235
|
-
return injectUiConfig(path);
|
|
217
|
+
return injectUiConfig(path, token);
|
|
236
218
|
},
|
|
237
219
|
};
|
|
238
220
|
}
|
|
239
|
-
function injectReducers() {
|
|
240
|
-
return injectDeepMulti(
|
|
221
|
+
function injectReducers(token) {
|
|
222
|
+
return injectDeepMulti(token);
|
|
241
223
|
}
|
|
242
|
-
function injectReducerFactories(path = []) {
|
|
243
|
-
return injectReducers().filter(factory => {
|
|
224
|
+
function injectReducerFactories(path = [], token = UI_CONFIG_REDUCER) {
|
|
225
|
+
return injectReducers(token).filter(factory => {
|
|
244
226
|
return getReducerPath(factory).every((p, i) => path[i] === p);
|
|
245
227
|
});
|
|
246
228
|
}
|
|
@@ -280,5 +262,5 @@ function debugInjector(injector = inject(Injector)) {
|
|
|
280
262
|
* Generated bundle index. Do not edit.
|
|
281
263
|
*/
|
|
282
264
|
|
|
283
|
-
export { NavActionId, UI_CONFIG_REDUCER, UiService, call, debugInjector, injectBreakpoint, injectDeepMulti, injectIsMobile, injectIsRootPage, injectIsRootPage$, injectNavStartActions, injectRootConfig, injectSideAppNavStartActions, injectUiConfig, injectUiContext, makeConfig, provideUiConfig, scoped, wrap };
|
|
265
|
+
export { NavActionId, UI_CONFIG_REDUCER, UiService, call, debugInjector, injectBreakpoint, injectDeepMulti, injectIsMobile, injectIsRootPage, injectIsRootPage$, injectNavStartActions, injectNavStartActionsV2, injectRootConfig, injectSideAppNavStartActions, injectUiConfig, injectUiContext, makeConfig, provideUiConfig, scoped, wrap };
|
|
284
266
|
//# 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/ui.helpers.ts","../../../../../packages/@ng-atomic/common/src/lib/services/ui/ng-atomic-common-services-ui.ts"],"sourcesContent":["\nimport { Injectable, PLATFORM_ID, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationStart } from '@angular/router';\nimport { filter, map, startWith } from 'rxjs';\nimport { isPlatformBrowser } from '@angular/common';\nimport { RouterService } from '@ng-atomic/common/services/router';\nimport { Breakpoint, BreakpointService } from '@ng-atomic/common/services/breakpoint';\n\nexport interface UIContext {\n breakpoint: Breakpoint;\n paths: any[];\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}\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 CLOSE = '[@ng-atomic/common/services/ui] CLOSE',\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 let isInitial: boolean;\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 (isInitial ??= 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 injectSideAppNavStartActions(\n isRootPage: Signal<boolean> = signal<boolean>(false),\n): Signal<Action[]> {\n const context = injectUiContext();\n const navigationHistory = inject(NavigationHistoryService);\n let isInitial: boolean;\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 (isInitial ??= navigationHistory.isInitial()) {\n return [{ id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' }];\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 (isInitial ??= navigationHistory.isInitial()) {\n return [{ id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' }];\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}\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> \n = (injector: Injector, hostInjector: Injector) => (config: T, context: UIContext) => T;\n\nexport type DefaultReducerFactory<T extends object | string>\n = (injector: Injector, hostInjector: Injector) => (context: UIContext) => T;\n\nexport const wrap = <T extends object | string>(\n defaultReducerFactory: DefaultReducerFactory<T>,\n): ReducerFactory<T> => {\n return (injector: Injector, hostInjector: Injector) => {\n const reducer = defaultReducerFactory(injector, hostInjector);\n return (_: T, context: UIContext) => {\n return reducer(context);\n }\n };\n}\n\nexport function call<T>(signalOrValue: Signal<T> | T): T {\n return isSignal(signalOrValue) ? signalOrValue() : signalOrValue;\n}\n\nfunction setReducerPath(reducer: Function, path: string[]) {\n Object.defineProperty(reducer, 'path', { value: path, configurable: true });\n return reducer;\n}\n\nfunction getReducerPath(reducer: Function) {\n return reducer['path'];\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): T => {\n if (path.length === 0) return reducer(config, context);\n return set(config as object, path, reducer(get<any, any>(config, path), context)) as T;\n }\n }\n Object.defineProperty(_reducerFactory, 'name', { value: name, configurable: true });\n setReducerPath(_reducerFactory, path);\n return _reducerFactory;\n },\n deps: [Injector],\n multi: true,\n };\n}\n\nexport function injectRootConfig<T extends object>(paths: string[] = []): Signal<T> {\n const uiContext = injectUiContext();\n const factories = injectReducerFactories(paths);\n const hostInjector = inject(Injector);\n const reducers = factories.map(factory => {\n return runInInjectionContext(hostInjector, () => factory(hostInjector));\n });\n if (!reducers) return undefined;\n const rootConfig = computed(() => {\n const context = uiContext();\n return reducers.reduce((acc, reducer) => {\n return runInInjectionContext(hostInjector, () => reducer(acc, context));\n }, {} as T);\n });\n return rootConfig;\n}\n\n// TODO(@nontangent): itemsなどの取得が全てのコンポーネントで行われるので計算を最適化する。\nexport function injectUiConfig<T extends object>(paths: string[] = []): Signal<T> {\n const rootConfig = injectRootConfig<T>(paths);\n return scoped(rootConfig, paths as any);\n}\n\nexport function makeConfig<T extends object>(defaultUseFactory: DefaultReducerFactory<T>, path: string[]) {\n const factory = wrap(defaultUseFactory);\n return {\n provide(useFactory?: ReducerFactory<T>, label = useFactory ? 'custom' : 'default') {\n useFactory ??= factory;\n return provideUiConfig<T>(useFactory, path, `[${path.join('.')}] ${label}`);\n },\n inject() {\n return injectUiConfig<T>(path);\n },\n }\n}\n\nfunction injectReducers(): ((hostInjector: Injector) => UiConfigReducer<any>)[] {\n return injectDeepMulti<(hostInjector: Injector) => UiConfigReducer<any>>(UI_CONFIG_REDUCER);\n}\n\nfunction injectReducerFactories(path: string[] = []): ((hostInjector: Injector) => UiConfigReducer<any>)[] {\n return injectReducers().filter(factory => {\n return getReducerPath(factory).every((p, i) => path[i] === p);\n });\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":";;;;;;;;;;;;MAea,SAAS,CAAA;AADtB,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEjC,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CACvC,MAAM,CAAC,KAAK,IAAI,KAAK,YAAY,eAAe,CAAC,EACjD,GAAG,CAAC,CAAC,KAAsB,KAAK,KAAK,CAAC,GAAG,CAAC,EAC1C,SAAS,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,EAAE,CAAC,EAC/E,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EACrC,GAAG,CAAC,OAAO,I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AAA,EAAI,IAAI,CAAA,CAAA,CAAG,CAAC;AAC7B,QAAA,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AACjC,KAAC,CAAA;AAED,IAAA,MAAM,cAAc,GAAG,CAAC,QAAkB,KAAa;QACrD,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;AACjD,KAAC,CAAA;IAED,MAAM,UAAU,GAAG,CAAC,QAAa,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpF,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;AAC3B,QAAA,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAClC,QAAA,IAAI,QAAQ,KAAK,QAAQ,CAAC,IAAI;YAAE,MAAM;KACvC;AACL;;AC3RA;;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":["\nimport { Injectable, PLATFORM_ID, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NavigationStart } from '@angular/router';\nimport { filter, map, startWith } from 'rxjs';\nimport { isPlatformBrowser } from '@angular/common';\nimport { RouterService } from '@ng-atomic/common/services/router';\nimport { Breakpoint, BreakpointService } from '@ng-atomic/common/services/breakpoint';\n\nexport interface UIContext {\n breakpoint: Breakpoint;\n paths: any[];\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, NavigationEnd, PRIMARY_OUTLET, Router } from \"@angular/router\";\nimport { filter, map, shareReplay, startWith, take } from \"rxjs\";\nimport { takeUntilDestroyed, toSignal } from \"@angular/core/rxjs-interop\";\nimport { computedAsync } from \"ngxtension/computed-async\";\nimport { NavigationHistoryService } from \"@ng-atomic/common/services/navigation-history\";\nimport { derivedAsync } from \"ngxtension/derived-async\";\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}\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 CLOSE = '[@ng-atomic/common/services/ui] CLOSE',\n}\n\n// routeを遡る\nfunction flattenRoutes(route: ActivatedRoute): ActivatedRoute[] {\n const routes = [];\n let route_ = route; \n while(route_) {\n routes.push(route_);\n if (!route_.parent) break;\n route_ = route_.parent;\n }\n return routes;\n}\n\nexport function injectIsRootPage$(outlet = PRIMARY_OUTLET) {\n const router = inject(Router);\n const route = inject(ActivatedRoute);\n return router.events.pipe(\n startWith(null),\n map(() => {\n const routes = flattenRoutes(route).reverse();\n const outletComponentRoutes = routes\n .slice(routes.findIndex(route => route.outlet === outlet))\n .filter(route => route.snapshot.paramMap.get('skip') !== 'true' && !!route?.component);\n return outletComponentRoutes.length <= 2;\n }),\n take(1),\n shareReplay(1),\n takeUntilDestroyed(),\n );\n}\n\nexport function injectIsRootPage(outlet = PRIMARY_OUTLET) {\n const isRootPage$ = injectIsRootPage$(outlet);\n const injector = inject(Injector);\n return derivedAsync(() => 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 let isInitial: boolean;\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 (isInitial ??= 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 injectNavStartActionsV2() {\n const isRootPage = injectIsRootPage();\n return injectNavStartActions(isRootPage);\n}\n\nexport function injectSideAppNavStartActions(\n isRootPage: Signal<boolean> = signal<boolean>(false),\n): Signal<Action[]> {\n const context = injectUiContext();\n return computed(() => {\n switch(context().breakpoint) {\n default: {\n if (isRootPage()) return [\n { id: NavActionId.CLOSE, name: 'CLOSE', icon: 'close' },\n ];\n return [{ id: NavActionId.BACK, name: 'BACK', icon: 'arrow_back' }];\n }\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> \n = (injector: Injector, hostInjector: Injector) => (config: T, context: UIContext) => T;\n\nexport type DefaultReducerFactory<T extends object | string>\n = (injector: Injector, hostInjector: Injector) => (context: UIContext) => T;\n\nexport const wrap = <T extends object | string>(\n defaultReducerFactory: DefaultReducerFactory<T>,\n): ReducerFactory<T> => {\n return (injector: Injector, hostInjector: Injector) => {\n const reducer = defaultReducerFactory(injector, hostInjector);\n return (_: T, context: UIContext) => {\n return reducer(context);\n }\n };\n}\n\nexport function call<T>(signalOrValue: Signal<T> | T): T {\n return isSignal(signalOrValue) ? signalOrValue() : signalOrValue;\n}\n\nfunction setReducerPath(reducer: Function, path: string[]) {\n Object.defineProperty(reducer, 'path', { value: path, configurable: true });\n return reducer;\n}\n\nfunction getReducerPath(reducer: Function) {\n return reducer['path'];\n}\n\nexport function provideUiConfig<T extends object | string>(\n reducerFactory: ReducerFactory<T>,\n path: string[] = [],\n name = 'name',\n token = UI_CONFIG_REDUCER,\n): Provider {\n return {\n provide: token,\n useFactory: (injector: Injector) => {\n function _reducerFactory(hostInjector: Injector) {\n const reducer = reducerFactory(injector, hostInjector); \n return (config: T, context: any): T => {\n if (path.length === 0) return reducer(config, context);\n return set(config as object, path, reducer(get<any, any>(config, path), context)) as T;\n }\n }\n Object.defineProperty(_reducerFactory, 'name', { value: name, configurable: true });\n setReducerPath(_reducerFactory, path);\n return _reducerFactory;\n },\n deps: [Injector],\n multi: true,\n };\n}\n\nexport function injectRootConfig<T extends object>(\n paths: string[] = [],\n token = UI_CONFIG_REDUCER,\n): Signal<T> {\n const uiContext = injectUiContext();\n const factories = injectReducerFactories(paths, token);\n const hostInjector = inject(Injector);\n const reducers = factories.map(factory => {\n return runInInjectionContext(hostInjector, () => factory(hostInjector));\n });\n if (!reducers) return undefined;\n const rootConfig = computed(() => {\n const context = uiContext();\n return reducers.reduce((acc, reducer) => {\n return runInInjectionContext(hostInjector, () => reducer(acc, context));\n }, {} as T);\n });\n return rootConfig;\n}\n\n// TODO(@nontangent): itemsなどの取得が全てのコンポーネントで行われるので計算を最適化する。\nexport function injectUiConfig<T extends object>(\n paths: string[] = [],\n token: InjectionToken<UiConfigReducer<any>> = UI_CONFIG_REDUCER,\n): Signal<T> {\n const rootConfig = injectRootConfig<T>(paths, token);\n return scoped(rootConfig, paths as any);\n}\n\nexport function makeConfig<T extends object>(defaultUseFactory: DefaultReducerFactory<T>, path: string[]) {\n const factory = wrap(defaultUseFactory);\n const token = new InjectionToken<UiConfigReducer<T>>(`[${path.join('.')}] UI_CONFIG_REDUCER`);\n return {\n provide(useFactory?: ReducerFactory<T>, label = useFactory ? 'custom' : 'default') {\n useFactory ??= factory;\n return provideUiConfig<T>(useFactory, path, `[${path.join('.')}] ${label}`, token);\n },\n inject() {\n return injectUiConfig<T>(path, token);\n },\n }\n}\n\nfunction injectReducers(token): ((hostInjector: Injector) => UiConfigReducer<any>)[] {\n return injectDeepMulti<(hostInjector: Injector) => UiConfigReducer<any>>(token);\n}\n\nfunction injectReducerFactories(\n path: string[] = [],\n token = UI_CONFIG_REDUCER,\n): ((hostInjector: Injector) => UiConfigReducer<any>)[] {\n return injectReducers(token).filter(factory => {\n return getReducerPath(factory).every((p, i) => path[i] === p);\n });\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":";;;;;;;;;;;;MAea,SAAS,CAAA;AADtB,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEjC,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CACvC,MAAM,CAAC,KAAK,IAAI,KAAK,YAAY,eAAe,CAAC,EACjD,GAAG,CAAC,CAAC,KAAsB,KAAK,KAAK,CAAC,GAAG,CAAC,EAC1C,SAAS,CAAC,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,QAAA,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AACjC,KAAC,CAAA;AAED,IAAA,MAAM,cAAc,GAAG,CAAC,QAAkB,KAAa;QACrD,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;AACjD,KAAC,CAAA;IAED,MAAM,UAAU,GAAG,CAAC,QAAa,KAAK,CAAC,QAAQ,IAAI,EAAE,EAAE,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpF,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;AAC3B,QAAA,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAClC,QAAA,IAAI,QAAQ,KAAK,QAAQ,CAAC,IAAI;YAAE,MAAM;KACvC;AACL;;AC1RA;;AAEG;;;;"}
|
|
@@ -116,6 +116,9 @@ class EntityStoreAdapter {
|
|
|
116
116
|
delete(entity) {
|
|
117
117
|
throw new Error('not implemented');
|
|
118
118
|
}
|
|
119
|
+
save(entity) {
|
|
120
|
+
throw new Error('not implemented');
|
|
121
|
+
}
|
|
119
122
|
}
|
|
120
123
|
const ENTITY_STORE_ADAPTER = new InjectionToken('ENTITY_STORE_ADAPTER');
|
|
121
124
|
function provideEntityStoreAdapter(entity, adapterFactory) {
|
|
@@ -230,6 +233,18 @@ class EntityStore extends BaseEntityStore {
|
|
|
230
233
|
}
|
|
231
234
|
onSyncFailed() { }
|
|
232
235
|
onSyncSucceeded() { }
|
|
236
|
+
create(payload) {
|
|
237
|
+
return this.adapter.create(payload);
|
|
238
|
+
}
|
|
239
|
+
update(payload) {
|
|
240
|
+
return this.adapter.update(payload);
|
|
241
|
+
}
|
|
242
|
+
delete(payload) {
|
|
243
|
+
return this.adapter.delete(payload);
|
|
244
|
+
}
|
|
245
|
+
save(payload) {
|
|
246
|
+
return this.adapter.save(payload);
|
|
247
|
+
}
|
|
233
248
|
}
|
|
234
249
|
|
|
235
250
|
class EntityStoreService {
|