nuxeo-development-framework 4.0.3 → 4.0.5
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/bundles/nuxeo-development-framework.umd.js +2406 -1196
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/diagrams/utilities/export-graph.js +28 -0
- package/esm2015/lib/components/diagrams/utilities/index.js +2 -1
- package/esm2015/lib/core/core.module.js +33 -33
- package/esm2015/lib/shared/components/base/base-column.component.js +18 -0
- package/esm2015/lib/shared/components/base/base-dialog.component.js +25 -0
- package/esm2015/lib/shared/components/base/base-selector.component.js +96 -0
- package/esm2015/lib/shared/components/base/base.component.js +59 -0
- package/esm2015/lib/shared/components/base/destroy.subject.js +19 -0
- package/esm2015/lib/shared/components/base/index.js +6 -0
- package/esm2015/lib/shared/components/index.js +3 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.js +23 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/index.js +6 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/models/confirm-options.model.js +22 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/models/dialog-option.model.js +2 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo-dialog.module.js +39 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +84 -0
- package/esm2015/lib/shared/components/nuxeo-dialog/services/nuxeo-dialog.service.js +56 -0
- package/esm2015/lib/shared/models/index.js +4 -0
- package/esm2015/lib/shared/models/mapper/index.js +2 -0
- package/esm2015/lib/shared/models/mapper/nuxeo-mapper.js +32 -0
- package/esm2015/lib/shared/models/nuxeo-response.model.js +2 -0
- package/esm2015/lib/shared/models/task.model.js +2 -0
- package/esm2015/lib/shared/services/base/base.service.js +157 -0
- package/esm2015/lib/shared/services/base/cache-base.service.js +295 -0
- package/esm2015/lib/shared/services/base/config/default-ttl-config.js +9 -0
- package/esm2015/lib/shared/services/base/config/index.js +2 -0
- package/esm2015/lib/shared/services/base/constants/default-cache-options.js +28 -0
- package/esm2015/lib/shared/services/base/constants/index.js +2 -0
- package/esm2015/lib/shared/services/base/http-base.service.js +115 -0
- package/esm2015/lib/shared/services/base/index.js +3 -0
- package/esm2015/lib/shared/services/base/models/cache-info-model.js +12 -0
- package/esm2015/lib/shared/services/base/models/http-options.model.js +2 -0
- package/esm2015/lib/shared/services/base/models/index.js +6 -0
- package/esm2015/lib/shared/services/base/models/operation-options.model.js +2 -0
- package/esm2015/lib/shared/services/base/models/query-options.model.js +2 -0
- package/esm2015/lib/shared/services/base/models/request-options.model.js +2 -0
- package/esm2015/lib/shared/services/index.js +2 -0
- package/esm2015/public-api.js +4 -1
- package/fesm2015/nuxeo-development-framework.js +2087 -1061
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/diagrams/utilities/export-graph.d.ts +3 -0
- package/lib/components/diagrams/utilities/index.d.ts +1 -0
- package/lib/core/core.module.d.ts +2 -2
- package/lib/shared/components/base/base-column.component.d.ts +10 -0
- package/lib/shared/components/base/base-dialog.component.d.ts +12 -0
- package/lib/shared/components/base/base-selector.component.d.ts +43 -0
- package/lib/shared/components/base/base.component.d.ts +36 -0
- package/lib/shared/components/base/destroy.subject.d.ts +9 -0
- package/lib/shared/components/base/index.d.ts +5 -0
- package/lib/shared/components/index.d.ts +2 -0
- package/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.d.ts +9 -0
- package/lib/shared/components/nuxeo-dialog/index.d.ts +5 -0
- package/lib/shared/components/nuxeo-dialog/models/confirm-options.model.d.ts +22 -0
- package/lib/shared/components/nuxeo-dialog/models/dialog-option.model.d.ts +16 -0
- package/lib/shared/components/nuxeo-dialog/nuxeo-dialog.module.d.ts +13 -0
- package/lib/shared/components/nuxeo-dialog/nuxeo.dialog.d.ts +23 -0
- package/lib/shared/components/nuxeo-dialog/services/nuxeo-dialog.service.d.ts +13 -0
- package/lib/shared/models/index.d.ts +3 -0
- package/lib/shared/models/mapper/index.d.ts +1 -0
- package/lib/shared/models/mapper/nuxeo-mapper.d.ts +8 -0
- package/lib/shared/models/nuxeo-response.model.d.ts +61 -0
- package/lib/shared/models/task.model.d.ts +71 -0
- package/lib/shared/services/base/base.service.d.ts +29 -0
- package/lib/shared/services/base/cache-base.service.d.ts +17 -0
- package/lib/shared/services/base/config/default-ttl-config.d.ts +7 -0
- package/lib/shared/services/base/config/index.d.ts +1 -0
- package/lib/shared/services/base/constants/default-cache-options.d.ts +16 -0
- package/lib/shared/services/base/constants/index.d.ts +1 -0
- package/lib/shared/services/base/http-base.service.d.ts +15 -0
- package/lib/shared/services/base/index.d.ts +2 -0
- package/lib/shared/services/base/models/cache-info-model.d.ts +49 -0
- package/lib/shared/services/base/models/http-options.model.d.ts +7 -0
- package/lib/shared/services/base/models/index.d.ts +5 -0
- package/lib/shared/services/base/models/operation-options.model.d.ts +8 -0
- package/lib/shared/services/base/models/query-options.model.d.ts +5 -0
- package/lib/shared/services/base/models/request-options.model.d.ts +7 -0
- package/lib/shared/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleWithProviders } from
|
|
2
|
-
import { Environment } from
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { Environment } from './env';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "ngx-treeview";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { BaseComponent } from './base.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class BaseColumnComponent extends BaseComponent {
|
|
5
|
+
context: Record<string, any>;
|
|
6
|
+
column: Record<string, any>;
|
|
7
|
+
constructor(injector: Injector);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseColumnComponent, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseColumnComponent, never, never, { "context": "context"; "column": "column"; }, {}, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { BaseComponent } from './base.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare abstract class BaseDialogComponent<TComponent = unknown, TData = unknown, TResult = unknown> extends BaseComponent {
|
|
5
|
+
#private;
|
|
6
|
+
protected _injector: Injector;
|
|
7
|
+
dialogData: TData;
|
|
8
|
+
constructor(_injector: Injector);
|
|
9
|
+
close(result?: TResult): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseDialogComponent<any, any, any>, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseDialogComponent<any, any, any>, never, never, {}, {}, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { BaseComponent } from './base.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class BaseSelector<T = any> extends BaseComponent implements ControlValueAccessor, Validator {
|
|
7
|
+
#private;
|
|
8
|
+
static ngAcceptInputType_multiple: BooleanInput;
|
|
9
|
+
static ngAcceptInputType_required: BooleanInput;
|
|
10
|
+
static ngAcceptInputType_hideLabel: BooleanInput;
|
|
11
|
+
static ngAcceptInputType_selectAllOption: BooleanInput;
|
|
12
|
+
options$: Observable<T>;
|
|
13
|
+
onChange: any;
|
|
14
|
+
onTouch: any;
|
|
15
|
+
onValidationChange: any;
|
|
16
|
+
abstract writeValue(obj: T): void;
|
|
17
|
+
abstract validate(control: AbstractControl): ValidationErrors;
|
|
18
|
+
readonly: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
disableOptionFn: (option: any) => boolean;
|
|
21
|
+
styleClass: string;
|
|
22
|
+
valueType: 'object' | 'property';
|
|
23
|
+
bindValue: string;
|
|
24
|
+
bindLabel: string;
|
|
25
|
+
label: string;
|
|
26
|
+
selectedFields: string[];
|
|
27
|
+
emptyPlaceholder: string;
|
|
28
|
+
emptyMessage: string;
|
|
29
|
+
get multiple(): boolean;
|
|
30
|
+
set multiple(value: unknown);
|
|
31
|
+
get required(): boolean;
|
|
32
|
+
set required(value: unknown);
|
|
33
|
+
get hideLabel(): boolean;
|
|
34
|
+
set hideLabel(value: unknown);
|
|
35
|
+
get selectAllOption(): boolean;
|
|
36
|
+
set selectAllOption(value: unknown);
|
|
37
|
+
registerOnChange(fn: any): void;
|
|
38
|
+
registerOnTouched(fn: any): void;
|
|
39
|
+
registerOnValidatorChange?(fn: () => void): void;
|
|
40
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseSelector<any>, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSelector<any>, never, never, { "readonly": "readonly"; "disabled": "disabled"; "disableOptionFn": "disableOptionFn"; "styleClass": "styleClass"; "valueType": "valueType"; "bindValue": "bindValue"; "bindLabel": "bindLabel"; "label": "label"; "selectedFields": "selectedFields"; "emptyPlaceholder": "emptyPlaceholder"; "emptyMessage": "emptyMessage"; "multiple": "multiple"; "required": "required"; "hideLabel": "hideLabel"; "selectAllOption": "selectAllOption"; }, {}, never>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Injector } from "@angular/core";
|
|
2
|
+
import { DestroySubject } from "./destroy.subject";
|
|
3
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
4
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
5
|
+
import { Direction } from "@angular/cdk/bidi";
|
|
6
|
+
import { FormBuilder } from "@angular/forms";
|
|
7
|
+
import { CustomToastrService } from "../../../components/custom-toastr/services/custom-toastr.service";
|
|
8
|
+
import { MainfolderService } from "../../../shared-services/mainfolder.service";
|
|
9
|
+
import { UserPreferencesService } from "../../../core/services/user/user-preferences.service";
|
|
10
|
+
import { AppConfigService } from "../../../configuration/app-config.service";
|
|
11
|
+
import { AdapterService } from "../../../core/adapters/adapter.service";
|
|
12
|
+
import { NuxeoDialogService } from "../nuxeo-dialog/services/nuxeo-dialog.service";
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export declare abstract class BaseComponent extends DestroySubject {
|
|
15
|
+
#private;
|
|
16
|
+
protected cdr: ChangeDetectorRef;
|
|
17
|
+
protected activatedRoute: ActivatedRoute;
|
|
18
|
+
protected routerService: Router;
|
|
19
|
+
protected translateService: TranslateService;
|
|
20
|
+
protected formBuilder: FormBuilder;
|
|
21
|
+
protected toastrService: CustomToastrService;
|
|
22
|
+
protected mainFolderService: MainfolderService;
|
|
23
|
+
protected userPreferencesService: UserPreferencesService;
|
|
24
|
+
protected appConfigService: AppConfigService;
|
|
25
|
+
protected nuxeoDialogService: NuxeoDialogService;
|
|
26
|
+
protected adapter: AdapterService;
|
|
27
|
+
set loading(value: boolean);
|
|
28
|
+
get loading(): boolean;
|
|
29
|
+
constructor(injector: Injector);
|
|
30
|
+
get currentLang(): string;
|
|
31
|
+
get isArabic(): boolean;
|
|
32
|
+
get isArabic$(): import("rxjs").Observable<boolean>;
|
|
33
|
+
get direction(): Direction;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent, never>;
|
|
35
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent, never, never, { "loading": "loading"; }, {}, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DestroySubject implements OnDestroy {
|
|
5
|
+
protected destroy$: Subject<void>;
|
|
6
|
+
ngOnDestroy(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DestroySubject, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DestroySubject, never, never, {}, {}, never>;
|
|
9
|
+
}
|
package/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { ConfirmationDialogConfig } from "../models/confirm-options.model";
|
|
3
|
+
import { BaseDialogComponent } from "../../base/base-dialog.component";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NdfConfirmationDialogComponent extends BaseDialogComponent<NdfConfirmationDialogComponent, ConfirmationDialogConfig, boolean> {
|
|
6
|
+
constructor(injector: Injector);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NdfConfirmationDialogComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NdfConfirmationDialogComponent, "ndf-confirmation-dialog", never, {}, {}, never, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DialogActionType } from './dialog-option.model';
|
|
2
|
+
interface ConfirmButton {
|
|
3
|
+
show?: boolean;
|
|
4
|
+
label?: string;
|
|
5
|
+
color?: 'primary' | 'accent' | 'warn';
|
|
6
|
+
fn: DialogActionType;
|
|
7
|
+
}
|
|
8
|
+
export interface ConfirmationDialogConfig {
|
|
9
|
+
title?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
icon?: {
|
|
12
|
+
show?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
color?: 'primary' | 'accent' | 'warn' | 'basic' | 'info' | 'success' | 'warning' | 'error';
|
|
15
|
+
};
|
|
16
|
+
actions?: {
|
|
17
|
+
confirm?: ConfirmButton;
|
|
18
|
+
moreActions?: Array<ConfirmButton>;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultConfirmConfig: ConfirmationDialogConfig;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare type DialogActionType = (...args: any[]) => Observable<any>;
|
|
4
|
+
export interface DialogOptions {
|
|
5
|
+
component: Type<any> | TemplateRef<any>;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
panelClass?: string | Array<string>;
|
|
9
|
+
config?: {
|
|
10
|
+
title?: string;
|
|
11
|
+
subTitle?: string;
|
|
12
|
+
contentTemplate?: TemplateRef<any>;
|
|
13
|
+
actionsTemplate?: TemplateRef<any>;
|
|
14
|
+
};
|
|
15
|
+
data?: Record<string, any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./nuxeo.dialog";
|
|
3
|
+
import * as i2 from "./confirmation/ndf-confirmation-dialog.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@ngx-translate/core";
|
|
6
|
+
import * as i5 from "@angular/material/icon";
|
|
7
|
+
import * as i6 from "@angular/material/dialog";
|
|
8
|
+
import * as i7 from "@angular/material/tooltip";
|
|
9
|
+
export declare class NuxeoDialogModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NuxeoDialogModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NuxeoDialogModule, [typeof i1.NdfNuxeoDialog, typeof i2.NdfConfirmationDialogComponent], [typeof i3.CommonModule, typeof i4.TranslateModule, typeof i5.MatIconModule, typeof i6.MatDialogModule, typeof i7.MatTooltipModule], [typeof i1.NdfNuxeoDialog, typeof i2.NdfConfirmationDialogComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NuxeoDialogModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef, Injector } from "@angular/core";
|
|
2
|
+
import { MatDialogRef } from "@angular/material/dialog";
|
|
3
|
+
import { DialogActionType } from "./models/dialog-option.model";
|
|
4
|
+
import { DestroySubject } from "../base/destroy.subject";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NdfNuxeoDialog<TData = any> extends DestroySubject {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
dialogTitle: string;
|
|
9
|
+
subTitle: string;
|
|
10
|
+
loaderMode: "spinner" | "progressBar";
|
|
11
|
+
contentTemplate: any;
|
|
12
|
+
actionsTemplate: any;
|
|
13
|
+
dialogRef: MatDialogRef<NdfNuxeoDialog>;
|
|
14
|
+
data: TData;
|
|
15
|
+
dialogBody: ElementRef<HTMLDivElement>;
|
|
16
|
+
dialogBodyTopOffset: number;
|
|
17
|
+
constructor(injector: Injector);
|
|
18
|
+
executeAction(action?: DialogActionType, ...params: any[]): void;
|
|
19
|
+
isArrowFunction(fn: Function): boolean;
|
|
20
|
+
onClose(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NdfNuxeoDialog<any>, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NdfNuxeoDialog<any>, "ndf-nuxeo-dialog", never, { "loading": "loading"; "dialogTitle": "dialogTitle"; "subTitle": "subTitle"; "loaderMode": "loaderMode"; }, {}, ["contentTemplate", "actionsTemplate"], never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MatDialog } from "@angular/material/dialog";
|
|
2
|
+
import { DialogOptions } from "../models/dialog-option.model";
|
|
3
|
+
import { ConfirmationDialogConfig } from "../models/confirm-options.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NuxeoDialogService {
|
|
6
|
+
#private;
|
|
7
|
+
private dialog;
|
|
8
|
+
constructor(dialog: MatDialog);
|
|
9
|
+
open(options: DialogOptions): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
10
|
+
showConfirm(config: ConfirmationDialogConfig): import("@angular/material/dialog").MatDialogRef<any, any>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NuxeoDialogService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NuxeoDialogService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './nuxeo-mapper';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class NuxeoMapper {
|
|
2
|
+
static schemaToModel<Schemas extends Record<string, any>>(properties: Record<string, any>): {
|
|
3
|
+
[K in keyof Schemas]: Schemas[K];
|
|
4
|
+
};
|
|
5
|
+
static modelToSchema<Schemas extends Record<string, any>>(model: {
|
|
6
|
+
[K in keyof Schemas]: Schemas[K];
|
|
7
|
+
}): Record<string, any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const ENTITY_TYPE = "entity-type";
|
|
2
|
+
export interface NuxeoQuickFilter {
|
|
3
|
+
name: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface NuxeoPagination<T> {
|
|
7
|
+
[ENTITY_TYPE]: string;
|
|
8
|
+
isPaginable: boolean;
|
|
9
|
+
resultsCount: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
maxPageSize: number;
|
|
12
|
+
resultsCountLimit: number;
|
|
13
|
+
currentPageSize: number;
|
|
14
|
+
currentPageIndex: number;
|
|
15
|
+
currentPageOffset: number;
|
|
16
|
+
numberOfPages: number;
|
|
17
|
+
isPreviousPageAvailable: boolean;
|
|
18
|
+
isNextPageAvailable: boolean;
|
|
19
|
+
isLastPageAvailable: boolean;
|
|
20
|
+
isSortable: boolean;
|
|
21
|
+
hasError: boolean;
|
|
22
|
+
errorMessage: string | null;
|
|
23
|
+
totalSize: number;
|
|
24
|
+
pageIndex: number;
|
|
25
|
+
pageCount: number;
|
|
26
|
+
quickFilters: NuxeoQuickFilter[];
|
|
27
|
+
aggregations?: Record<string, any>;
|
|
28
|
+
entries: T[];
|
|
29
|
+
}
|
|
30
|
+
export interface NuxeoResponse {
|
|
31
|
+
[ENTITY_TYPE]: string;
|
|
32
|
+
entries: Entity[];
|
|
33
|
+
}
|
|
34
|
+
export declare type Entity = {
|
|
35
|
+
[ENTITY_TYPE]: string;
|
|
36
|
+
repository?: string;
|
|
37
|
+
uid?: string;
|
|
38
|
+
path?: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
state?: string;
|
|
41
|
+
parentRef?: string | null;
|
|
42
|
+
isCheckedOut?: boolean;
|
|
43
|
+
isRecord?: boolean;
|
|
44
|
+
retainUntil?: string | null;
|
|
45
|
+
hasLegalHold?: boolean;
|
|
46
|
+
isUnderRetentionOrLegalHold?: boolean;
|
|
47
|
+
isVersion?: boolean;
|
|
48
|
+
isProxy?: boolean;
|
|
49
|
+
changeToken?: string;
|
|
50
|
+
contextParameters?: Record<string, any>;
|
|
51
|
+
isTrashed?: boolean;
|
|
52
|
+
title?: string;
|
|
53
|
+
lastModified?: string;
|
|
54
|
+
properties?: Record<string, any>;
|
|
55
|
+
facets?: string[];
|
|
56
|
+
schemas?: Schema[];
|
|
57
|
+
};
|
|
58
|
+
export interface Schema {
|
|
59
|
+
name: string;
|
|
60
|
+
prefix: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Entity, ENTITY_TYPE } from './nuxeo-response.model';
|
|
2
|
+
export interface Task {
|
|
3
|
+
[ENTITY_TYPE]?: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
workflowInstanceId?: string;
|
|
7
|
+
workflowModelName?: string;
|
|
8
|
+
workflowInitiator?: string;
|
|
9
|
+
workflowTitle?: string;
|
|
10
|
+
workflowLifeCycleState?: string;
|
|
11
|
+
graphResource?: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
directive?: any;
|
|
14
|
+
created?: string;
|
|
15
|
+
dueDate?: string;
|
|
16
|
+
nodeName?: string;
|
|
17
|
+
targetDocumentIds?: Entity[];
|
|
18
|
+
actors?: Actor[];
|
|
19
|
+
delegatedActors?: any[];
|
|
20
|
+
comments?: any[];
|
|
21
|
+
variables?: Record<string, any>;
|
|
22
|
+
taskInfo?: TaskInfo;
|
|
23
|
+
workflowInitiatorDetails?: WorkflowInitiatorDetails;
|
|
24
|
+
actorsDetails?: Record<string, any>[];
|
|
25
|
+
customTaskVariables?: Record<string, any>;
|
|
26
|
+
workflowVariables?: Record<string, any>;
|
|
27
|
+
}
|
|
28
|
+
export interface Actor {
|
|
29
|
+
id?: string;
|
|
30
|
+
[ENTITY_TYPE]?: string;
|
|
31
|
+
properties?: BaseProperties;
|
|
32
|
+
extendedGroups?: any[];
|
|
33
|
+
isPartial?: boolean;
|
|
34
|
+
isAdministrator?: boolean;
|
|
35
|
+
isAnonymous?: boolean;
|
|
36
|
+
birthdate?: any;
|
|
37
|
+
phonenumber?: any;
|
|
38
|
+
avatar?: any;
|
|
39
|
+
userGroups?: BaseModel[];
|
|
40
|
+
fullName?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface WorkflowInitiatorDetails {
|
|
43
|
+
properties?: BaseProperties;
|
|
44
|
+
fullName?: string;
|
|
45
|
+
birthdate?: any;
|
|
46
|
+
phonenumber?: any;
|
|
47
|
+
avatar?: any;
|
|
48
|
+
}
|
|
49
|
+
export interface TaskInfo {
|
|
50
|
+
allowTaskReassignment?: boolean;
|
|
51
|
+
taskActions?: BaseModel[];
|
|
52
|
+
layoutResource?: BaseModel;
|
|
53
|
+
schemas?: BaseModel[];
|
|
54
|
+
}
|
|
55
|
+
interface BaseModel {
|
|
56
|
+
name?: string;
|
|
57
|
+
url?: string;
|
|
58
|
+
label?: string;
|
|
59
|
+
validate?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface BaseProperties {
|
|
62
|
+
firstName?: string;
|
|
63
|
+
lastName?: string;
|
|
64
|
+
jobTitle?: any;
|
|
65
|
+
tenantId?: any;
|
|
66
|
+
groups?: string[];
|
|
67
|
+
company?: any;
|
|
68
|
+
email?: string;
|
|
69
|
+
username?: string;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { CachedFullHttpOptions, CachedFullQueryOptions, CachedHttpOptions, CachedQueryOptions, OperationOptions, QueryOptions, RequestOptions } from "./models";
|
|
5
|
+
import { HttpBaseService } from "./http-base.service";
|
|
6
|
+
import { AdapterService } from "../../../core/adapters/adapter.service";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare abstract class BaseService extends HttpBaseService {
|
|
9
|
+
#private;
|
|
10
|
+
protected adapterService: AdapterService;
|
|
11
|
+
protected translateService: TranslateService;
|
|
12
|
+
get user(): any;
|
|
13
|
+
get userName(): any;
|
|
14
|
+
constructor(injector: Injector);
|
|
15
|
+
protected automation<TResponse = unknown>(operationOrOptions: string | OperationOptions, input?: string, params?: any, context?: any, headers?: any, isCustomAutomation?: boolean): Observable<TResponse>;
|
|
16
|
+
protected customAutomation<TResponse = unknown>(operationOrOptions: string | OperationOptions, input?: string, params?: any, context?: any, headers?: any): Observable<TResponse>;
|
|
17
|
+
protected request<TResponse>(endpointOrOptions: string | RequestOptions, queryParams?: any, headers?: any, payload?: any, type?: string): Observable<TResponse>;
|
|
18
|
+
protected query<TResponse>(pageProviderOrOptions: string | QueryOptions, params?: any, headers?: any): Observable<TResponse>;
|
|
19
|
+
protected hasItemInCache(key: string): boolean;
|
|
20
|
+
protected cachedQuery<TResponse>(options: CachedQueryOptions | CachedFullQueryOptions): Observable<TResponse>;
|
|
21
|
+
protected cachedGet<TResponse>(options: CachedHttpOptions | CachedFullHttpOptions): Observable<TResponse>;
|
|
22
|
+
protected fetch<TResponse>(path: string, headers?: any): Observable<TResponse>;
|
|
23
|
+
token(): Promise<string>;
|
|
24
|
+
isUserInRole(role: string): Observable<any>;
|
|
25
|
+
doLogout(): void;
|
|
26
|
+
getDuplicates(params?: {}, body?: {}): Observable<any>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseService>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { BaseCacheOptions } from "./models";
|
|
3
|
+
import { UserPreferencesService } from "../../../core/services/user/user-preferences.service";
|
|
4
|
+
import { UtilityService } from "../../../core/utilities/utility.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CacheBaseService {
|
|
7
|
+
#private;
|
|
8
|
+
private userPreferencesService;
|
|
9
|
+
private utilityService;
|
|
10
|
+
constructor(userPreferencesService: UserPreferencesService, utilityService: UtilityService);
|
|
11
|
+
hasItem(cacheKey: string): boolean;
|
|
12
|
+
clearAll(userName: string): void;
|
|
13
|
+
validateTTL(userName: string): void;
|
|
14
|
+
startFetchingItems(options: BaseCacheOptions): Observable<any>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CacheBaseService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CacheBaseService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './default-ttl-config';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const DEFAULT_CACHE_OPTIONS: {
|
|
2
|
+
PREFIX: string;
|
|
3
|
+
PAGE_KEY: string;
|
|
4
|
+
TOTAL_PAGE_KEY: string;
|
|
5
|
+
RESULTS_COUNT_KEY: string;
|
|
6
|
+
MAPPED_DATA_KEY: string;
|
|
7
|
+
UNIQUE_COMPARE_KEY: string;
|
|
8
|
+
MIN_COMPARE_DATE_KEY: string;
|
|
9
|
+
LAST_MODIFIED_KEY: string;
|
|
10
|
+
LAST_MODIFIED_PATH: string;
|
|
11
|
+
EXCLUDE_KEYS_WHEN_UPDATE: string[];
|
|
12
|
+
CHILDREN_PATH: string;
|
|
13
|
+
PARENT_KEY: string;
|
|
14
|
+
REQUEST: () => import("rxjs").Observable<unknown>;
|
|
15
|
+
PREPARE_DATA: (result: Array<Record<string, any>>) => Array<Record<string, any>>;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './default-cache-options';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { HttpOptions } from "./models";
|
|
3
|
+
import { Observable, OperatorFunction } from "rxjs";
|
|
4
|
+
export declare abstract class HttpBaseService {
|
|
5
|
+
#private;
|
|
6
|
+
get environment(): import("../../../core/env").Environment;
|
|
7
|
+
constructor(injector: Injector);
|
|
8
|
+
protected get<TResponse>(endpointOrOptions: string | HttpOptions, params?: any, headers?: any, responseType?: any): Observable<TResponse>;
|
|
9
|
+
protected post<TResponse>(endpointOrOptions: string | HttpOptions, payload?: any, params?: any, headers?: any, responseType?: any): Observable<TResponse>;
|
|
10
|
+
protected put<TResponse>(endpointOrOptions: string | HttpOptions, payload?: any, params?: any, headers?: any, responseType?: any): Observable<TResponse>;
|
|
11
|
+
protected patch<TResponse>(endpointOrOptions: string | HttpOptions, payload?: any, params?: any, headers?: any, responseType?: any): Observable<TResponse>;
|
|
12
|
+
protected delete<TResponse>(endpointOrOptions: string | HttpOptions, params?: any, headers?: any, responseType?: any): Observable<TResponse>;
|
|
13
|
+
protected httpAutomation<TResponse = unknown>(endpoint: string, payload?: any, responseType?: any): Observable<TResponse>;
|
|
14
|
+
protected catchErrors<TResponse>(): OperatorFunction<TResponse, TResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { HttpOptions, QueryOptions } from '../..';
|
|
3
|
+
declare type RequestFunctionType = (...params: any[]) => Observable<any>;
|
|
4
|
+
declare type PrepareDataBeforeCachingType = (result: Array<Record<string, any>>) => Array<Record<string, any>>;
|
|
5
|
+
export declare enum CachingExpiryUnit {
|
|
6
|
+
YEARS = "years",
|
|
7
|
+
MONTHS = "months",
|
|
8
|
+
WEEKS = "weeks",
|
|
9
|
+
DAYS = "days",
|
|
10
|
+
HOURS = "hours",
|
|
11
|
+
MINUTES = "minutes",
|
|
12
|
+
SECONDS = "seconds",
|
|
13
|
+
MILLI_SECONDS = "milliseconds"
|
|
14
|
+
}
|
|
15
|
+
interface BaseOption {
|
|
16
|
+
cacheKey: string;
|
|
17
|
+
prepareDataBeforeCaching: PrepareDataBeforeCachingType;
|
|
18
|
+
inMemory?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare type CachedQueryOptions = {} & BaseOption & QueryOptions;
|
|
21
|
+
export declare type CachedHttpOptions = {} & BaseOption & HttpOptions;
|
|
22
|
+
export declare type CachedFullQueryOptions = {} & CachedQueryOptions & BaseCacheOptions;
|
|
23
|
+
export declare type CachedFullHttpOptions = {} & CachedHttpOptions & BaseCacheOptions;
|
|
24
|
+
export declare type BaseCacheOptions = {
|
|
25
|
+
userName: string;
|
|
26
|
+
request: RequestFunctionType;
|
|
27
|
+
pageKey?: string;
|
|
28
|
+
totalPageKey?: string;
|
|
29
|
+
resultsCount?: string;
|
|
30
|
+
mappedDataKey?: string;
|
|
31
|
+
uniqueCompareKey?: string;
|
|
32
|
+
minCompareDateKey?: string;
|
|
33
|
+
lastModifiedDateKey?: string;
|
|
34
|
+
lastModifiedDatePath?: string;
|
|
35
|
+
excludeKeysWhenUpdate?: string[];
|
|
36
|
+
childrenPath?: string;
|
|
37
|
+
parentKey?: string;
|
|
38
|
+
} & BaseOption;
|
|
39
|
+
export interface CacheInfo {
|
|
40
|
+
data: Array<Record<string, any>>;
|
|
41
|
+
firstFetchingDate: string;
|
|
42
|
+
lastModifiedDate: string;
|
|
43
|
+
resultsCount: number;
|
|
44
|
+
fetchingItemsFromTheServer: boolean;
|
|
45
|
+
onFinishFetching: Subject<any>;
|
|
46
|
+
request?: RequestFunctionType;
|
|
47
|
+
params?: Record<string, any>;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './base/index';
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './lib/nuxeo-development-framework.component';
|
|
2
2
|
export * from './lib/nuxeo-development-framework.module';
|
|
3
3
|
export * from './lib/nuxeo-development-framework.service';
|
|
4
|
+
export * from './lib/shared/components/index';
|
|
5
|
+
export * from './lib/shared/models/index';
|
|
6
|
+
export * from './lib/shared/services/index';
|
|
4
7
|
export * from './lib/components/avatar/avatar.module';
|
|
5
8
|
export * from './lib/components/avatar/avatar/avatar.component';
|
|
6
9
|
export * from './lib/components/card/card.component';
|