@bizdoc/core 2.4.4 → 2.4.6
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/assets/bizdoc-schema.json +3 -0
- package/assets/themes/brown.min.css +1 -1
- package/assets/themes/dark.min.css +1 -1
- package/assets/themes/deep-purple-light-blue.min.css +2 -2
- package/assets/themes/deep-purple-teal.min.css +1 -1
- package/assets/themes/default.min.css +1 -1
- package/assets/themes/green.min.css +1 -1
- package/assets/themes/indigo.min.css +1 -1
- package/esm2022/lib/bizdoc.module.mjs +3 -3
- package/esm2022/lib/compose/compose.pane.component.mjs +1 -1
- package/esm2022/lib/compose/form-ref.mjs +12 -21
- package/esm2022/lib/compose/form-selector/form-selector.sheet.mjs +11 -41
- package/esm2022/lib/compose/form.component.mjs +12 -14
- package/esm2022/lib/compose/new-menu.component.mjs +16 -43
- package/esm2022/lib/compose/overlay.component.exp.mjs +93 -0
- package/esm2022/lib/core/base.mjs +1 -1
- package/esm2022/lib/core/configuration.mjs +1 -1
- package/esm2022/lib/core/document-factory.service.mjs +136 -0
- package/esm2022/lib/core/info/document-info.service.mjs +1 -1
- package/esm2022/lib/core/inputs/auto-complete.input.mjs +3 -3
- package/esm2022/lib/core/inputs/select.input.mjs +5 -4
- package/esm2022/lib/core/mailbox.service.mjs +7 -7
- package/esm2022/lib/core/models.mjs +1 -1
- package/esm2022/lib/home/home.desktop.component.mjs +9 -37
- package/esm2022/lib/notifications/types/invite.notification.mjs +8 -8
- package/esm2022/lib/shared.module.mjs +10 -8
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/bizdoc-core.mjs +276 -170
- package/fesm2022/bizdoc-core.mjs.map +1 -1
- package/lib/compose/form-ref.d.ts +7 -12
- package/lib/compose/form-selector/form-selector.sheet.d.ts +4 -6
- package/lib/compose/form.component.d.ts +1 -0
- package/lib/compose/new-menu.component.d.ts +5 -10
- package/lib/compose/overlay.component.exp.d.ts +28 -0
- package/lib/core/base.d.ts +6 -1
- package/lib/core/configuration.d.ts +1 -1
- package/lib/core/document-factory.service.d.ts +28 -0
- package/lib/core/mailbox.service.d.ts +1 -1
- package/lib/core/models.d.ts +1 -0
- package/lib/home/home.desktop.component.d.ts +3 -4
- package/lib/notifications/types/invite.notification.d.ts +3 -3
- package/lib/shared.module.d.ts +203 -202
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
@@ -5,21 +5,14 @@ import { RouterImpl } from "../core/router";
|
|
5
5
|
export declare class FormRef<M = any, O = any> {
|
6
6
|
private _router;
|
7
7
|
private _configuration;
|
8
|
-
readonly
|
9
|
-
readonly
|
10
|
-
readonly _modelChange: Subject<M>;
|
11
|
-
readonly _navigating: Subject<string | number>;
|
8
|
+
readonly _stateChange$: Subject<void>;
|
9
|
+
readonly _create$: Subject<false | M>;
|
12
10
|
_mode?: ViewMode;
|
13
11
|
constructor(_router: RouterImpl, _configuration: Form);
|
14
12
|
/** configuration options */
|
15
13
|
get options(): O;
|
16
14
|
get name(): string;
|
17
15
|
private _help;
|
18
|
-
/** intercept save */
|
19
|
-
saving(): import("rxjs").Observable<SaveEventArgs>;
|
20
|
-
/** listen to page navigate events */
|
21
|
-
navigating(): import("rxjs").Observable<string | number>;
|
22
|
-
modelChange(): import("rxjs").Observable<M>;
|
23
16
|
get mode(): ViewMode;
|
24
17
|
/** user guide */
|
25
18
|
get help(): string;
|
@@ -29,9 +22,11 @@ export declare class FormRef<M = any, O = any> {
|
|
29
22
|
* @param page
|
30
23
|
*/
|
31
24
|
navigate(page?: (string | number)): void;
|
25
|
+
/**
|
26
|
+
* Overlay form mode
|
27
|
+
* @param model
|
28
|
+
*/
|
29
|
+
complete(model?: M | false): void;
|
32
30
|
/** release events */
|
33
31
|
_destroy(): void;
|
34
32
|
}
|
35
|
-
export interface SaveEventArgs {
|
36
|
-
cancel: boolean;
|
37
|
-
}
|
@@ -3,26 +3,24 @@ import { MatBottomSheetRef } from '@angular/material/bottom-sheet';
|
|
3
3
|
import { MatDialog } from '@angular/material/dialog';
|
4
4
|
import { Form, RecipientModel } from '../../core/models';
|
5
5
|
import { SessionService } from '../../core/session.service';
|
6
|
-
import { MailboxService } from '../../core/mailbox.service';
|
7
6
|
import { PromptService } from '../../core/prompt.service';
|
7
|
+
import { DocumentFactory } from '../../core/document-factory.service';
|
8
8
|
import * as i0 from "@angular/core";
|
9
9
|
export declare class FormSelectorSheet {
|
10
10
|
private _dialog;
|
11
11
|
private _bsRef;
|
12
12
|
private _sb;
|
13
|
-
private
|
13
|
+
private _factory;
|
14
14
|
private _router;
|
15
15
|
private _session;
|
16
16
|
private readonly _done;
|
17
17
|
readonly done: import("rxjs").Observable<RecipientModel<any>>;
|
18
18
|
readonly forms: Form[];
|
19
19
|
/** form selector ctor */
|
20
|
-
constructor(_dialog: MatDialog, _bsRef: MatBottomSheetRef<FormSelectorSheet>, _sb: PromptService,
|
20
|
+
constructor(_dialog: MatDialog, _bsRef: MatBottomSheetRef<FormSelectorSheet>, _sb: PromptService, _factory: DocumentFactory, _router: Router, _session: SessionService);
|
21
21
|
open(form: string): void;
|
22
22
|
copy(event: MouseEvent): void;
|
23
|
-
private
|
24
|
-
private _error;
|
25
|
-
private _route;
|
23
|
+
private _nav;
|
26
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormSelectorSheet, never>;
|
27
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormSelectorSheet, "bizdoc-form-selector", never, {}, {}, never, never, false, never>;
|
28
26
|
}
|
@@ -60,6 +60,7 @@ export declare class ComposeFormComponent implements OnDestroy, OnInit, OnChange
|
|
60
60
|
ngOnInit(): void;
|
61
61
|
private _editing;
|
62
62
|
ngOnChanges(changes: SimpleChanges): void;
|
63
|
+
private _navPage;
|
63
64
|
private _fileChangeListener;
|
64
65
|
private _applychanges;
|
65
66
|
private _getActionAdjective;
|
@@ -2,35 +2,30 @@ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { Form, HeaderModel } from '../core/models';
|
5
|
-
import { PromptService } from '../core/prompt.service';
|
6
5
|
import { SessionService } from '../core/session.service';
|
7
6
|
import { PanesRouter } from '../core/slots/router.service';
|
8
7
|
import { MailboxService } from '../core/mailbox.service';
|
8
|
+
import { DocumentFactory } from '../core/document-factory.service';
|
9
9
|
import * as i0 from "@angular/core";
|
10
10
|
export declare class ComposeMenuComponent implements OnInit, OnDestroy {
|
11
11
|
private _session;
|
12
12
|
private _mailbox;
|
13
|
-
private
|
13
|
+
private _factory;
|
14
14
|
private _router;
|
15
15
|
readonly change: EventEmitter<any>;
|
16
16
|
readonly search: FormControl<string>;
|
17
17
|
items: Observable<HeaderModel[]>;
|
18
18
|
private readonly _destroy;
|
19
|
-
private readonly _working
|
19
|
+
private readonly _working$;
|
20
20
|
working: boolean;
|
21
21
|
readonly defaultgroup: Group;
|
22
22
|
readonly groups: Group[];
|
23
|
-
constructor(_session: SessionService, _mailbox: MailboxService,
|
23
|
+
constructor(_session: SessionService, _mailbox: MailboxService, _factory: DocumentFactory, _router: PanesRouter);
|
24
24
|
ngOnInit(): void;
|
25
25
|
clear(): void;
|
26
|
-
create(
|
26
|
+
create(formId: string): void;
|
27
27
|
copy(item: HeaderModel): void;
|
28
28
|
private _nav;
|
29
|
-
/**
|
30
|
-
* Handle http error response
|
31
|
-
* @param e
|
32
|
-
*/
|
33
|
-
private _error;
|
34
29
|
ngOnDestroy(): void;
|
35
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComposeMenuComponent, never>;
|
36
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<ComposeMenuComponent, "bizdoc-new-menu", never, {}, { "change": "change"; }, never, never, false, never>;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Injector, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
2
|
+
import { Subject } from 'rxjs';
|
3
|
+
import { RouterImpl } from '../core/router';
|
4
|
+
import { SessionService } from '../core/session.service';
|
5
|
+
import { BizDocComponentFactoryResolver } from '../core/component-factory-resolver';
|
6
|
+
import { HubService } from '../core/hub.service';
|
7
|
+
import { GuideService } from '../core/guide/guide.service';
|
8
|
+
import { Form } from '../core/models';
|
9
|
+
import * as i0 from "@angular/core";
|
10
|
+
export declare class OverlayFormComponent implements OnInit, OnDestroy {
|
11
|
+
private _router;
|
12
|
+
private _injector;
|
13
|
+
private _cf;
|
14
|
+
private _guide;
|
15
|
+
private _messaging;
|
16
|
+
readonly created$: Subject<any>;
|
17
|
+
container: ViewContainerRef;
|
18
|
+
private _formRef;
|
19
|
+
form: Form;
|
20
|
+
creating: boolean;
|
21
|
+
private readonly _destroy;
|
22
|
+
constructor(session: SessionService, _router: RouterImpl, _injector: Injector, _cf: BizDocComponentFactoryResolver, _guide: GuideService, _messaging: HubService, formId: string);
|
23
|
+
ngOnInit(): void;
|
24
|
+
guide(): void;
|
25
|
+
ngOnDestroy(): void;
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayFormComponent, never>;
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OverlayFormComponent, "ng-component", never, {}, {}, never, never, false, never>;
|
28
|
+
}
|
package/lib/core/base.d.ts
CHANGED
@@ -2,13 +2,18 @@ import { DocumentModel } from "../core/models";
|
|
2
2
|
import { AbstractControl, FormGroup } from "@angular/forms";
|
3
3
|
import { Observable } from "rxjs";
|
4
4
|
import { MatFormFieldAppearance } from "@angular/material/form-field";
|
5
|
-
export declare type ViewMode = 'compose' | 'preview' | 'print' | 'version';
|
5
|
+
export declare type ViewMode = 'compose' | 'preview' | 'print' | 'version' | 'overlay';
|
6
6
|
export declare type FormMode = '';
|
7
7
|
export interface FormComponent<TModel> extends ManagedComponent<TModel> {
|
8
8
|
form: FormGroup;
|
9
9
|
mode: ViewMode;
|
10
10
|
onBind(data: DocumentModel<TModel>, version?: TModel): void;
|
11
|
+
/**
|
12
|
+
*
|
13
|
+
* @param obj
|
14
|
+
*/
|
11
15
|
onMessage?<T = any>(obj: T): any;
|
16
|
+
onNavigate?(page: number | string): any;
|
12
17
|
onSave?(): Observable<boolean> | Promise<boolean> | boolean;
|
13
18
|
}
|
14
19
|
export interface ControlDesigner<T = any> {
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { RouterImpl } from './router';
|
2
|
+
import { Overlay } from '@angular/cdk/overlay';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
import { Directionality } from '@angular/cdk/bidi';
|
5
|
+
import { MailboxService } from './mailbox.service';
|
6
|
+
import { RecipientModel } from './models';
|
7
|
+
import { PromptService } from './prompt.service';
|
8
|
+
import { SessionService } from './session.service';
|
9
|
+
import * as i0 from "@angular/core";
|
10
|
+
export declare class DocumentFactory {
|
11
|
+
private _session;
|
12
|
+
private _mailbox;
|
13
|
+
private _ps;
|
14
|
+
private _overlay;
|
15
|
+
private _dir;
|
16
|
+
private _router;
|
17
|
+
constructor(_session: SessionService, _mailbox: MailboxService, _ps: PromptService, _overlay: Overlay, _dir: Directionality, _router: RouterImpl);
|
18
|
+
create(formId: string): Observable<RecipientModel<any>>;
|
19
|
+
private _nav;
|
20
|
+
copy(documentId: number): Observable<RecipientModel<any>>;
|
21
|
+
/**
|
22
|
+
* Handle http error response
|
23
|
+
* @param e
|
24
|
+
*/
|
25
|
+
private _error;
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentFactory, never>;
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentFactory>;
|
28
|
+
}
|
@@ -21,7 +21,7 @@ export declare class MailboxService {
|
|
21
21
|
/** */
|
22
22
|
readonly changed: Observable<RecipientModel<any>>;
|
23
23
|
readonly deleted: Observable<number>;
|
24
|
-
constructor(_session: SessionService, _auth: AuthenticationImpl,
|
24
|
+
constructor(messaging: HubService, _session: SessionService, _auth: AuthenticationImpl, _http: HttpClient);
|
25
25
|
formatDownloadUrl(document: DocumentModel, file: Attachment): Promise<string>;
|
26
26
|
download(documentId: number, fileId: number): Observable<any>;
|
27
27
|
removeattachment(recipientId: number, fileId: number): Observable<any>;
|
package/lib/core/models.d.ts
CHANGED
@@ -11,21 +11,21 @@ import { TranslateService } from '../core/translate.service';
|
|
11
11
|
import { HubService } from '../core/hub.service';
|
12
12
|
import { HomeBase } from './home-base.component';
|
13
13
|
import { MailboxService } from '../core/mailbox.service';
|
14
|
-
import { PromptService } from '../core/prompt.service';
|
15
14
|
import { SlotsComponent } from '../core/slots/slots.component';
|
16
15
|
import { GuideService } from '../core/guide/guide.service';
|
17
16
|
import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
18
17
|
import { FormControl } from '@angular/forms';
|
19
18
|
import { ListingItem, SearchService } from '../search/search.service';
|
20
19
|
import { ListingComponent } from '../search/declarations';
|
20
|
+
import { DocumentFactory } from '../core/document-factory.service';
|
21
21
|
import * as i0 from "@angular/core";
|
22
22
|
/** desktop home comp */
|
23
23
|
export declare class HomeComponent extends HomeBase {
|
24
24
|
private _router;
|
25
25
|
private _service;
|
26
26
|
private _mailbox;
|
27
|
+
private _factory;
|
27
28
|
private _popup;
|
28
|
-
private _sb;
|
29
29
|
private _guide;
|
30
30
|
dialog: boolean;
|
31
31
|
readonly sysAdmin: boolean;
|
@@ -56,7 +56,7 @@ export declare class HomeComponent extends HomeBase {
|
|
56
56
|
results: Observable<ListingItem[]>;
|
57
57
|
searching: boolean;
|
58
58
|
private _collapseToggle;
|
59
|
-
constructor(_router: PanesRouter, _service: SearchService, _mailbox: MailboxService,
|
59
|
+
constructor(_router: PanesRouter, _service: SearchService, _mailbox: MailboxService, _factory: DocumentFactory, _popup: Popup, _guide: GuideService, injector: Injector, session: SessionService, messaging: HubService, translate: TranslateService, snackBar: MatSnackBar, config: BizDocConfig);
|
60
60
|
ngOnInit(): void;
|
61
61
|
/** options */
|
62
62
|
options(evt: Event): void;
|
@@ -66,7 +66,6 @@ export declare class HomeComponent extends HomeBase {
|
|
66
66
|
closesubmenu(): void;
|
67
67
|
opennew(): void;
|
68
68
|
private _create;
|
69
|
-
private _handleErr;
|
70
69
|
opensubmenu(menu: string): void;
|
71
70
|
collapsesubmenu(): void;
|
72
71
|
togglePinned(): void;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { MailboxService } from "../../core/mailbox.service";
|
2
1
|
import { RouterImpl } from "../../core/router";
|
3
2
|
import { SessionService } from "../../core/session.service";
|
4
3
|
import { TranslateService } from "../../core/translate.service";
|
5
4
|
import { Notification } from "../../core/models";
|
5
|
+
import { DocumentFactory } from "../../core/document-factory.service";
|
6
6
|
import * as i0 from "@angular/core";
|
7
7
|
export declare class InviteNotification {
|
8
8
|
private _router;
|
9
|
-
private
|
9
|
+
private _factory;
|
10
10
|
notification: Invite;
|
11
11
|
message: string;
|
12
|
-
constructor(_router: RouterImpl,
|
12
|
+
constructor(_router: RouterImpl, _factory: DocumentFactory, session: SessionService, translate: TranslateService, notification: Invite);
|
13
13
|
open(_: MouseEvent): void;
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<InviteNotification, never>;
|
15
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<InviteNotification, "ng-component", never, {}, {}, never, never, false, never>;
|