@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
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './common.module';
|
package/models/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-atomic/common",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^18.0.0",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@angular/material": "^18.0.0",
|
|
12
12
|
"@angular/router": "^18.0.0",
|
|
13
13
|
"@ngrx/component-store": "^18.0.0",
|
|
14
|
-
"@nx-ddd/core": "18.
|
|
14
|
+
"@nx-ddd/core": "18.5.0",
|
|
15
15
|
"dayjs": "1.11.12",
|
|
16
16
|
"flat": "^6.0.0",
|
|
17
17
|
"lodash-es": "^4.17.15",
|
|
@@ -304,6 +304,12 @@
|
|
|
304
304
|
"esm": "./esm2022/services/secret/ng-atomic-common-services-secret.mjs",
|
|
305
305
|
"default": "./fesm2022/ng-atomic-common-services-secret.mjs"
|
|
306
306
|
},
|
|
307
|
+
"./services/sheets": {
|
|
308
|
+
"types": "./services/sheets/index.d.ts",
|
|
309
|
+
"esm2022": "./esm2022/services/sheets/ng-atomic-common-services-sheets.mjs",
|
|
310
|
+
"esm": "./esm2022/services/sheets/ng-atomic-common-services-sheets.mjs",
|
|
311
|
+
"default": "./fesm2022/ng-atomic-common-services-sheets.mjs"
|
|
312
|
+
},
|
|
307
313
|
"./services/side-app": {
|
|
308
314
|
"types": "./services/side-app/index.d.ts",
|
|
309
315
|
"esm2022": "./esm2022/services/side-app/ng-atomic-common-services-side-app.mjs",
|
|
@@ -376,6 +382,12 @@
|
|
|
376
382
|
"esm": "./esm2022/services/form/columns/ng-atomic-common-services-form-columns.mjs",
|
|
377
383
|
"default": "./fesm2022/ng-atomic-common-services-form-columns.mjs"
|
|
378
384
|
},
|
|
385
|
+
"./services/form/json-schema": {
|
|
386
|
+
"types": "./services/form/json-schema/index.d.ts",
|
|
387
|
+
"esm2022": "./esm2022/services/form/json-schema/ng-atomic-common-services-form-json-schema.mjs",
|
|
388
|
+
"esm": "./esm2022/services/form/json-schema/ng-atomic-common-services-form-json-schema.mjs",
|
|
389
|
+
"default": "./fesm2022/ng-atomic-common-services-form-json-schema.mjs"
|
|
390
|
+
},
|
|
379
391
|
"./services/form/pagination": {
|
|
380
392
|
"types": "./services/form/pagination/index.d.ts",
|
|
381
393
|
"esm2022": "./esm2022/services/form/pagination/ng-atomic-common-services-form-pagination.mjs",
|
|
@@ -387,6 +399,12 @@
|
|
|
387
399
|
"esm2022": "./esm2022/services/form/sort/ng-atomic-common-services-form-sort.mjs",
|
|
388
400
|
"esm": "./esm2022/services/form/sort/ng-atomic-common-services-form-sort.mjs",
|
|
389
401
|
"default": "./fesm2022/ng-atomic-common-services-form-sort.mjs"
|
|
402
|
+
},
|
|
403
|
+
"./services/sheets/actions": {
|
|
404
|
+
"types": "./services/sheets/actions/index.d.ts",
|
|
405
|
+
"esm2022": "./esm2022/services/sheets/actions/ng-atomic-common-services-sheets-actions.mjs",
|
|
406
|
+
"esm": "./esm2022/services/sheets/actions/ng-atomic-common-services-sheets-actions.mjs",
|
|
407
|
+
"default": "./fesm2022/ng-atomic-common-services-sheets-actions.mjs"
|
|
390
408
|
}
|
|
391
409
|
},
|
|
392
410
|
"sideEffects": false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken, PipeTransform } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export type DataAccessor<T> = (obj: T, key: string) =>
|
|
3
|
+
export type DataAccessor<T> = (obj: T, key: string, index?: number) => any;
|
|
4
4
|
export declare const DATA_ACCESSOR: InjectionToken<DataAccessor<any>>;
|
|
5
5
|
export declare const defaultDataAccessor: DataAccessor<any>;
|
|
6
6
|
export declare function provideDataAccessor<T>(useFactory?: () => DataAccessor<T>): {
|
|
@@ -8,9 +8,10 @@ export declare function provideDataAccessor<T>(useFactory?: () => DataAccessor<T
|
|
|
8
8
|
useFactory: () => DataAccessor<T>;
|
|
9
9
|
};
|
|
10
10
|
export declare function injectDataAccessor<T>(): DataAccessor<T>;
|
|
11
|
+
export declare function injectParentDataAccessor<T>(): DataAccessor<T>;
|
|
11
12
|
export declare class DataAccessorPipe<T> implements PipeTransform {
|
|
12
|
-
protected dataAccessor: DataAccessor<
|
|
13
|
-
transform(data: T, key: string):
|
|
13
|
+
protected dataAccessor: DataAccessor<unknown>;
|
|
14
|
+
transform(data: T, key: string, index?: number): any;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataAccessorPipe<any>, never>;
|
|
15
16
|
static ɵpipe: i0.ɵɵPipeDeclaration<DataAccessorPipe<any>, "dataAccessor", true>;
|
|
16
17
|
}
|
|
@@ -11,7 +11,8 @@ export declare const DOMAIN_PROPS: InjectionToken<Signal<string[]>>;
|
|
|
11
11
|
export declare const DOMAIN_MODEL_NAME: InjectionToken<Signal<string>>;
|
|
12
12
|
export declare class DomainPipe implements PipeTransform {
|
|
13
13
|
protected map: DomainLangMap;
|
|
14
|
-
|
|
14
|
+
protected regexResolvers: (((key: string) => string) | (() => any))[];
|
|
15
|
+
transform(input: string, map?: DomainLangMap): any;
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DomainPipe, never>;
|
|
16
17
|
static ɵpipe: i0.ɵɵPipeDeclaration<DomainPipe, "domain", true>;
|
|
17
18
|
}
|
|
@@ -80,7 +80,7 @@ export interface FormFieldMap {
|
|
|
80
80
|
}
|
|
81
81
|
/** @deprecated */
|
|
82
82
|
export declare const FORM_FIELD_MAP: InjectionToken<FormFieldMap>;
|
|
83
|
-
/** @deprecated */
|
|
83
|
+
/** @deprecated use fieldMap input*/
|
|
84
84
|
export declare function provideFormFieldMap(useFactory: () => FormFieldMap): {
|
|
85
85
|
provide: InjectionToken<FormFieldMap>;
|
|
86
86
|
useFactory: () => FormFieldMap;
|
|
@@ -6,10 +6,21 @@ import { FabService } from '@ng-atomic/common/services/fab';
|
|
|
6
6
|
import { SnackBarService } from '@ng-atomic/common/services/snack-bar';
|
|
7
7
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
8
8
|
import { MatDialog } from '@angular/material/dialog';
|
|
9
|
+
import { SheetService } from '@ng-atomic/common/services/sheets';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class HistoryInjectorService {
|
|
12
|
+
private router;
|
|
13
|
+
private isInitialNavigation;
|
|
14
|
+
constructor(router: Router);
|
|
15
|
+
private injectParentRoutes;
|
|
16
|
+
private getFilteredSegments;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HistoryInjectorService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HistoryInjectorService>;
|
|
19
|
+
}
|
|
10
20
|
export declare class AppService {
|
|
11
21
|
readonly dialog: MatDialog;
|
|
12
22
|
readonly loading: LoadingService;
|
|
23
|
+
readonly sheet: SheetService;
|
|
13
24
|
readonly sideApp: SideAppService;
|
|
14
25
|
readonly sideNavMode: SideNavModeService;
|
|
15
26
|
readonly sideNav: SideNavModeService;
|
|
@@ -17,6 +28,7 @@ export declare class AppService {
|
|
|
17
28
|
readonly fab: FabService;
|
|
18
29
|
readonly snackBar: SnackBarService;
|
|
19
30
|
readonly clipboard: Clipboard;
|
|
31
|
+
readonly navigationInterceptor: HistoryInjectorService;
|
|
20
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppService, never>;
|
|
21
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppService>;
|
|
22
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
1
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
2
|
-
import { Action } from '@ng-atomic/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FabService {
|
|
@@ -7,8 +7,8 @@ export declare class FabService {
|
|
|
7
7
|
protected readonly router: Router;
|
|
8
8
|
protected readonly route: ActivatedRoute;
|
|
9
9
|
readonly route$: Observable<ActivatedRoute>;
|
|
10
|
-
readonly
|
|
11
|
-
readonly actions:
|
|
10
|
+
readonly data: Signal<import("@angular/router").Data>;
|
|
11
|
+
readonly actions: Signal<any>;
|
|
12
12
|
private findLastChild;
|
|
13
13
|
show(): void;
|
|
14
14
|
hide(): void;
|
|
@@ -7,22 +7,26 @@ export type ActionsColumnForm = FormGroup<{
|
|
|
7
7
|
visible: FormControl<boolean>;
|
|
8
8
|
width: FormControl<number>;
|
|
9
9
|
actions: FormControl<any>;
|
|
10
|
+
sticky: FormControl<boolean>;
|
|
10
11
|
}>;
|
|
11
12
|
export type CheckboxColumnForm = FormGroup<{
|
|
12
13
|
type: FormControl<'checkbox'>;
|
|
13
14
|
visible: FormControl<boolean>;
|
|
14
15
|
width: FormControl<number>;
|
|
16
|
+
sticky: FormControl<boolean>;
|
|
15
17
|
}>;
|
|
16
18
|
export type TextColumnForm = FormGroup<{
|
|
17
19
|
type: FormControl<'text'>;
|
|
18
20
|
visible: FormControl<boolean>;
|
|
19
21
|
width: FormControl<number>;
|
|
22
|
+
sticky: FormControl<boolean>;
|
|
20
23
|
}>;
|
|
21
24
|
export type TreeColumnForm = FormGroup<{
|
|
22
25
|
type: FormControl<'tree'>;
|
|
23
26
|
headerText: FormControl<string>;
|
|
24
27
|
visible: FormControl<boolean>;
|
|
25
28
|
width: FormControl<number>;
|
|
29
|
+
sticky: FormControl<boolean>;
|
|
26
30
|
}>;
|
|
27
31
|
export type ColumnsForm = FormArray<FormRecord<ActionsColumnForm | CheckboxColumnForm | TextColumnForm | TreeColumnForm>>;
|
|
28
32
|
export interface ColumnsFormValue {
|
|
@@ -45,7 +49,10 @@ export declare function injectColumnsForm(): FormGroup<{
|
|
|
45
49
|
ids: FormControl<string[]>;
|
|
46
50
|
map: FormGroup<{}>;
|
|
47
51
|
}>;
|
|
48
|
-
export declare function buildColumns(columns: (string | Actions)[]
|
|
52
|
+
export declare function buildColumns(columns: (string | Actions)[], { stickyStart, stickyEnd, }?: {
|
|
53
|
+
stickyStart?: number;
|
|
54
|
+
stickyEnd?: number;
|
|
55
|
+
}): {
|
|
49
56
|
ids: string[];
|
|
50
57
|
map: {
|
|
51
58
|
[key: string]: Column;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './json-schema.service';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FormBuilder, FormGroup, NonNullableFormBuilder } from "@angular/forms";
|
|
2
|
+
import { JsonSchema } from "json-schema-library";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare function buildFormGroupByJsonSchema(schema: JsonSchema, { fb, value, }?: {
|
|
5
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
6
|
+
value?: object;
|
|
7
|
+
}): FormGroup;
|
|
8
|
+
export declare function buildFormArrayByJsonSchema(schema: JsonSchema, { fb, value, }?: {
|
|
9
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
10
|
+
value?: any[];
|
|
11
|
+
}): any;
|
|
12
|
+
export declare function buildFormByJsonSchemaProperty(property: JsonSchema, { fb, value, validators, }?: {
|
|
13
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
14
|
+
value?: object | object[];
|
|
15
|
+
validators?: any[];
|
|
16
|
+
}): any;
|
|
17
|
+
export declare function buildFormFieldMapByJsonSchema(schema: JsonSchema, options?: {
|
|
18
|
+
merge?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
}): any;
|
|
22
|
+
export declare function buildFormByJsonSchema(schema: JsonSchema, { fb, value, fieldMap, }?: {
|
|
23
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
24
|
+
value?: object;
|
|
25
|
+
fieldMap?: object;
|
|
26
|
+
}): any;
|
|
27
|
+
export declare function buildFormGroup(klass: new () => any, { fb, value, }: {
|
|
28
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
29
|
+
value?: object;
|
|
30
|
+
}): FormGroup;
|
|
31
|
+
export declare function buildFormFieldMap(klass: new () => any, options: {
|
|
32
|
+
merge?: {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
}): any;
|
|
36
|
+
export declare function buildForm(klass: new () => any, { fb, value, fieldMap, }?: {
|
|
37
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
38
|
+
value?: object;
|
|
39
|
+
fieldMap?: object;
|
|
40
|
+
}): any;
|
|
41
|
+
export declare class JsonSchemaFormService {
|
|
42
|
+
private fb;
|
|
43
|
+
build(schema: JsonSchema, { fb, value, }?: {
|
|
44
|
+
fb?: FormBuilder | NonNullableFormBuilder;
|
|
45
|
+
value?: object;
|
|
46
|
+
}): FormGroup;
|
|
47
|
+
buildFieldMap(schema: JsonSchema, options?: {
|
|
48
|
+
merge?: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
}): any;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
|
|
53
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaFormService>;
|
|
54
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
1
2
|
import { ObservableInput, ObservedValueOf, OperatorFunction } from 'rxjs';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
type LoadingMap = Record<string, Record<string, boolean>>;
|
|
3
5
|
export declare class LoadingService {
|
|
4
|
-
|
|
5
|
-
readonly loadingMap$: import("rxjs").Observable<
|
|
6
|
-
readonly
|
|
6
|
+
readonly loadingMap: import("@angular/core").WritableSignal<LoadingMap>;
|
|
7
|
+
readonly loadingMap$: import("rxjs").Observable<LoadingMap>;
|
|
8
|
+
readonly isLoading: Signal<boolean>;
|
|
7
9
|
readonly isLoading$: import("rxjs").Observable<boolean>;
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
await<T = any>(callback: (...args: any[]) => Promise<T>): Promise<T | void>;
|
|
16
|
-
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
|
|
10
|
+
readonly isProgress: (domain?: string) => boolean;
|
|
11
|
+
constructor();
|
|
12
|
+
getIsLoading(domain?: string): Signal<boolean>;
|
|
13
|
+
start(key?: string, domain?: string): string;
|
|
14
|
+
end(key: string, domain?: string): void;
|
|
15
|
+
await<T = any>(callback: (...args: any[]) => Promise<T | void> | (T | void), domain?: string, key?: string): Promise<T | void>;
|
|
16
|
+
switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, domain?: string, key?: string): OperatorFunction<T, ObservedValueOf<O>>;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>;
|
|
18
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>;
|
|
19
19
|
}
|
|
@@ -27,3 +27,4 @@ export declare function provideNoopLoadingService(): {
|
|
|
27
27
|
useClass: typeof NoopLoadingService;
|
|
28
28
|
};
|
|
29
29
|
export declare function randomStr(n?: number): string;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action, NgAtomicComponent } from '@ng-atomic/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ActionsSheet extends NgAtomicComponent {
|
|
4
|
+
protected actions: Action<any>[];
|
|
5
|
+
private sheetRef;
|
|
6
|
+
protected onItemClick(action: Action): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsSheet, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionsSheet, "sheets-actions", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './actions.sheet';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/material/bottom-sheet";
|
|
3
|
+
export declare class NgAtomicSheetsModule {
|
|
4
|
+
static forRoot(): {
|
|
5
|
+
ngModule: typeof NgAtomicSheetsModule;
|
|
6
|
+
providers: any[];
|
|
7
|
+
};
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgAtomicSheetsModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgAtomicSheetsModule, never, [typeof i1.MatBottomSheetModule], never>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgAtomicSheetsModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
|
2
|
+
import { Action } from '@ng-atomic/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SheetService {
|
|
5
|
+
private bottomSheet;
|
|
6
|
+
constructor(bottomSheet: MatBottomSheet);
|
|
7
|
+
openActions(actions: Action[]): Promise<Action | null>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SheetService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SheetService>;
|
|
10
|
+
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
import { NavigationExtras, Router } from '@angular/router';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SideAppRouter extends Router {
|
|
4
|
+
protected sideApp: SideAppService;
|
|
5
|
+
setSideApp(sideApp: SideAppService): void;
|
|
6
|
+
navigate(commands: any[], extras?: NavigationExtras & {
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
}): Promise<boolean>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SideAppRouter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SideAppRouter>;
|
|
11
|
+
}
|
|
2
12
|
export declare class SideAppService {
|
|
3
13
|
readonly opened: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
readonly router: SideAppRouter;
|
|
15
|
+
constructor();
|
|
4
16
|
toggle(): void;
|
|
5
17
|
collapse(): void;
|
|
6
18
|
expand(): void;
|
|
@@ -9,9 +9,10 @@ export declare enum NavActionId {
|
|
|
9
9
|
BACK = "[@ng-atomic/common/services/ui] BACK",
|
|
10
10
|
CLOSE = "[@ng-atomic/common/services/ui] CLOSE"
|
|
11
11
|
}
|
|
12
|
-
export declare function injectIsRootPage$(): import("rxjs").Observable<boolean>;
|
|
13
|
-
export declare function injectIsRootPage(): Signal<boolean>;
|
|
12
|
+
export declare function injectIsRootPage$(outlet?: string): import("rxjs").Observable<boolean>;
|
|
13
|
+
export declare function injectIsRootPage(outlet?: string): Signal<boolean>;
|
|
14
14
|
export declare function injectNavStartActions(isRootPage?: Signal<boolean>): Signal<Action[]>;
|
|
15
|
+
export declare function injectNavStartActionsV2(): Signal<Action<any>[]>;
|
|
15
16
|
export declare function injectSideAppNavStartActions(isRootPage?: Signal<boolean>): Signal<Action[]>;
|
|
16
17
|
export declare function injectUiContext(): Signal<UIContext>;
|
|
17
18
|
export type UiConfigReducer<T extends object | string, C extends UIContext = any> = (config: T, context: C) => T;
|
|
@@ -20,9 +21,9 @@ export type ReducerFactory<T extends object | string> = (injector: Injector, hos
|
|
|
20
21
|
export type DefaultReducerFactory<T extends object | string> = (injector: Injector, hostInjector: Injector) => (context: UIContext) => T;
|
|
21
22
|
export declare const wrap: <T extends object | string>(defaultReducerFactory: DefaultReducerFactory<T>) => ReducerFactory<T>;
|
|
22
23
|
export declare function call<T>(signalOrValue: Signal<T> | T): T;
|
|
23
|
-
export declare function provideUiConfig<T extends object | string>(reducerFactory: ReducerFactory<T>, path?: string[], name?: string): Provider;
|
|
24
|
-
export declare function injectRootConfig<T extends object>(paths?: string[]): Signal<T>;
|
|
25
|
-
export declare function injectUiConfig<T extends object>(paths?: string[]): Signal<T>;
|
|
24
|
+
export declare function provideUiConfig<T extends object | string>(reducerFactory: ReducerFactory<T>, path?: string[], name?: string, token?: InjectionToken<UiConfigReducer<any, any>>): Provider;
|
|
25
|
+
export declare function injectRootConfig<T extends object>(paths?: string[], token?: InjectionToken<UiConfigReducer<any, any>>): Signal<T>;
|
|
26
|
+
export declare function injectUiConfig<T extends object>(paths?: string[], token?: InjectionToken<UiConfigReducer<any>>): Signal<T>;
|
|
26
27
|
export declare function makeConfig<T extends object>(defaultUseFactory: DefaultReducerFactory<T>, path: string[]): {
|
|
27
28
|
provide(useFactory?: ReducerFactory<T>, label?: string): Provider;
|
|
28
29
|
inject(): Signal<T>;
|
|
@@ -5,12 +5,9 @@ import { Entity } from './task-composer';
|
|
|
5
5
|
export declare class EntityStoreAdapter<E extends Entity> {
|
|
6
6
|
list?(): Observable<E[]>;
|
|
7
7
|
create?(entity: E): Promise<E>;
|
|
8
|
-
update?(entity: Partial<E> &
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
delete?(entity: Partial<E> & {
|
|
12
|
-
id: string;
|
|
13
|
-
}): Promise<void>;
|
|
8
|
+
update?(entity: Partial<E> & Pick<E, 'id'>): Promise<void>;
|
|
9
|
+
delete?(entity: Pick<E, 'id'>): Promise<void>;
|
|
10
|
+
save?(entity: E): Promise<E>;
|
|
14
11
|
}
|
|
15
12
|
export declare const ENTITY_STORE_ADAPTER: InjectionToken<{
|
|
16
13
|
entity: Type<Entity>;
|
|
@@ -64,4 +64,8 @@ export declare class EntityStore<E extends Entity> extends BaseEntityStore<E> {
|
|
|
64
64
|
protected runComposedTasks(tasks: Task<E>[]): Promise<void>;
|
|
65
65
|
protected onSyncFailed(): void;
|
|
66
66
|
protected onSyncSucceeded(): void;
|
|
67
|
+
create(payload: E): Promise<E>;
|
|
68
|
+
update(payload: Pick<E, 'id'> & Partial<E>): Promise<void>;
|
|
69
|
+
delete(payload: Pick<E, 'id'>): Promise<void>;
|
|
70
|
+
save(payload: E): Promise<E>;
|
|
67
71
|
}
|
package/utils/inject/inject.d.ts
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
import { Injector, Signal } from "@angular/core";
|
|
2
|
-
import { ActivatedRoute, ParamMap } from "@angular/router";
|
|
2
|
+
import { ActivatedRoute, ParamMap, Params } from "@angular/router";
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
import { Type } from "@nx-ddd/common/domain/models";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare function injectRouterParam$(key: string): Observable<string>;
|
|
7
7
|
/** @deprecated */
|
|
8
8
|
export declare function injectRouterParam(key: string): Signal<string>;
|
|
9
|
-
export declare function injectRouteParam$(key: string): Observable<string>;
|
|
10
9
|
export declare function injectRouteQueryParam$<T extends string = string>(key: string): Observable<T>;
|
|
11
10
|
export declare function injectRouteQueryParam(key: string): Signal<string>;
|
|
12
|
-
export declare function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare function
|
|
11
|
+
export declare function injectRouteParams$({ merge, route, }?: {
|
|
12
|
+
merge?: boolean;
|
|
13
|
+
route?: ActivatedRoute;
|
|
14
|
+
}): Observable<Params>;
|
|
15
|
+
export declare function injectUnflattenRouteParams$({ merge, route, }?: {
|
|
16
|
+
merge?: boolean;
|
|
17
|
+
route?: ActivatedRoute;
|
|
18
|
+
}): Observable<any>;
|
|
19
|
+
export declare function injectUnflattenRouteParam$<T = any>(key: string): Observable<T>;
|
|
20
|
+
export declare function injectUnflattenRouteParam<T = any>(key: string): Signal<T>;
|
|
21
|
+
export declare function injectUnflattenRouteParams({ merge, }?: {
|
|
22
|
+
merge?: boolean;
|
|
23
|
+
}): Signal<any>;
|
|
24
|
+
export declare function injectRouteParamMap$({ merge, }?: {
|
|
25
|
+
merge?: boolean;
|
|
26
|
+
}): Observable<ParamMap>;
|
|
27
|
+
export declare function injectRouteParamMap({ merge, }?: {
|
|
28
|
+
merge?: boolean;
|
|
29
|
+
}): Signal<ParamMap>;
|
|
30
|
+
export declare function injectRouteParams({ merge, }?: {
|
|
31
|
+
merge?: boolean;
|
|
32
|
+
}): Signal<Record<string, string>>;
|
|
17
33
|
export declare function injectRouteNavigated$(): Observable<ActivatedRoute>;
|
|
18
34
|
export declare function injectRouteNavigated(): Signal<ActivatedRoute>;
|
|
19
35
|
export declare function injectPrimaryPaths$(): Observable<any[]>;
|
|
@@ -52,3 +68,9 @@ export declare class ResolverManager {
|
|
|
52
68
|
}
|
|
53
69
|
export declare function injectResolver$<T>(ResolverType: new (params: Record<string, any>) => Resolver<T>, params: Record<string, Observable<any>>): Observable<Resolver<T>>;
|
|
54
70
|
export declare function getResolver<T>(ResolverType: new (params: Record<string, any>) => Resolver<T>, params: Record<string, any>): Resolver<T>;
|
|
71
|
+
export declare function injectRouteParam$(key: string, { merge, }?: {
|
|
72
|
+
merge?: boolean;
|
|
73
|
+
}): Observable<string>;
|
|
74
|
+
export declare function injectRouteParam(key: string, injector?: Injector): Signal<string>;
|
|
75
|
+
export declare function injectRouteSkip$(): Observable<boolean>;
|
|
76
|
+
export declare function injectRouteSkip(): Signal<boolean>;
|