@bizdoc/core 1.17.1 → 1.17.2

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.
Files changed (28) hide show
  1. package/esm2020/lib/admin/architecture/elements/control.component.mjs +7 -5
  2. package/esm2020/lib/admin/architecture/elements/rule.component.mjs +1 -1
  3. package/esm2020/lib/core/fields/checklist.designer.mjs +11 -11
  4. package/esm2020/lib/core/fields/checklist.field.mjs +16 -24
  5. package/esm2020/lib/core/fields/options.base.mjs +41 -0
  6. package/esm2020/lib/core/fields/options.component.mjs +3 -3
  7. package/esm2020/lib/core/fields/radio-button.designer.mjs +9 -8
  8. package/esm2020/lib/core/fields/radio-button.field.mjs +16 -23
  9. package/esm2020/lib/core/fields/select.designer.mjs +12 -12
  10. package/esm2020/lib/core/fields/select.field.mjs +17 -23
  11. package/esm2020/lib/reports/arguments-component.mjs +1 -1
  12. package/esm2020/lib/reports/report-ref.mjs +4 -2
  13. package/esm2020/lib/reports/report-viewer.component.mjs +4 -2
  14. package/fesm2015/bizdoc-core.mjs +458 -439
  15. package/fesm2015/bizdoc-core.mjs.map +1 -1
  16. package/fesm2020/bizdoc-core.mjs +454 -435
  17. package/fesm2020/bizdoc-core.mjs.map +1 -1
  18. package/lib/admin/architecture/elements/control.component.d.ts +1 -0
  19. package/lib/admin/architecture/elements/rule.component.d.ts +1 -2
  20. package/lib/core/fields/checklist.designer.d.ts +7 -10
  21. package/lib/core/fields/checklist.field.d.ts +2 -13
  22. package/lib/core/fields/options.base.d.ts +28 -0
  23. package/lib/core/fields/radio-button.designer.d.ts +6 -6
  24. package/lib/core/fields/radio-button.field.d.ts +2 -13
  25. package/lib/core/fields/select.designer.d.ts +5 -6
  26. package/lib/core/fields/select.field.d.ts +2 -14
  27. package/lib/reports/report-ref.d.ts +3 -1
  28. package/package.json +1 -1
@@ -5,6 +5,7 @@ export declare class ControlDesignComponent extends DesignerTypeElementComponent
5
5
  datatypes: ElementInfo[];
6
6
  readonly form: import("@angular/forms").FormGroup<{
7
7
  dataType: import("@angular/forms").FormControl<any>;
8
+ visible: import("@angular/forms").FormControl<unknown>;
8
9
  }>;
9
10
  ngOnInit(): void;
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<ControlDesignComponent, never>;
@@ -1,8 +1,7 @@
1
- import { FormGroup } from "@angular/forms";
2
1
  import { DesignerTypeElementComponent } from "../designer.base";
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class RuleDesignComponent extends DesignerTypeElementComponent {
5
- readonly form: FormGroup<{}>;
4
+ readonly form: import("@angular/forms").FormGroup<{}>;
6
5
  static ɵfac: i0.ɵɵFactoryDeclaration<RuleDesignComponent, never>;
7
6
  static ɵcmp: i0.ɵɵComponentDeclaration<RuleDesignComponent, "ng-component", never, {}, {}, never, never, false>;
8
7
  }
@@ -1,22 +1,19 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { FormBuilder } from '@angular/forms';
3
2
  import { ControlDesigner } from '../base';
4
- import { LocalizedString, Type } from '../models';
3
+ import { LocalizedString } from '../models';
5
4
  import { SessionService } from '../session.service';
5
+ import { OptionsControlDesigner } from './options.base';
6
6
  import * as i0 from "@angular/core";
7
- export declare class ChecklistControlDesigner implements ControlDesigner<ChecklistModel>, OnInit {
8
- private _session;
7
+ export declare class ChecklistControlDesigner extends OptionsControlDesigner implements ControlDesigner<ChecklistModel> {
9
8
  private _fb;
10
- readonly datatypes: Type[];
9
+ model: ChecklistModel;
11
10
  readonly form: import("@angular/forms").FormGroup<{
12
11
  label: import("@angular/forms").FormControl<unknown>;
13
- multiple: import("@angular/forms").FormControl<unknown>;
14
- dataType: import("@angular/forms").FormControl<unknown>;
12
+ multiple: import("@angular/forms").FormControl<boolean>;
13
+ dataType: import("@angular/forms").FormControl<any>;
15
14
  hint: import("@angular/forms").FormControl<unknown>;
16
15
  }>;
17
- model: ChecklistModel;
18
- constructor(_session: SessionService, _fb: FormBuilder);
19
- ngOnInit(): void;
16
+ constructor(session: SessionService, _fb: FormBuilder);
20
17
  onBind(model: ChecklistModel): void;
21
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ChecklistControlDesigner, never>;
22
19
  static ɵcmp: i0.ɵɵComponentDeclaration<ChecklistControlDesigner, "ng-component", never, {}, {}, never, never, false>;
@@ -3,29 +3,18 @@ import { FormControl } from '@angular/forms';
3
3
  import { MatFormFieldAppearance } from '@angular/material/form-field';
4
4
  import { MatSelectionList } from '@angular/material/list';
5
5
  import { ControlComponent, ViewMode } from '../base';
6
- import { DatasourceService } from '../datasource.service';
7
- import { LocalizedString } from '../models';
6
+ import { OptionsControlField } from './options.base';
8
7
  import * as i0 from "@angular/core";
9
- export declare class ChecklistField implements ControlComponent, OnInit {
10
- private _ds;
8
+ export declare class ChecklistField extends OptionsControlField implements ControlComponent, OnInit {
11
9
  appearance: MatFormFieldAppearance;
12
- options?: {
13
- key: string;
14
- value: LocalizedString;
15
- }[];
16
10
  readonly control: FormControl<any>;
17
11
  params: any;
18
12
  input: MatSelectionList;
19
- constructor(_ds: DatasourceService);
20
13
  mode: ViewMode;
21
14
  multiple?: boolean;
22
- dataType: string;
23
15
  hint?: string;
24
16
  label: string;
25
- required?: boolean;
26
- ngOnInit(): void;
27
17
  focus(): void;
28
- optionOf(value: any): void;
29
18
  static ɵfac: i0.ɵɵFactoryDeclaration<ChecklistField, never>;
30
19
  static ɵcmp: i0.ɵɵComponentDeclaration<ChecklistField, "ng-component", never, { "params": "params"; }, {}, never, never, false>;
31
20
  }
@@ -0,0 +1,28 @@
1
+ import { AbstractControl, FormControl, ValidationErrors } from '@angular/forms';
2
+ import { DatasourceService } from '../datasource.service';
3
+ import { LocalizedString, Type } from '../models';
4
+ import { SessionService } from '../session.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare abstract class OptionsControlField {
7
+ private _ds;
8
+ abstract readonly control: FormControl;
9
+ dataType?: string;
10
+ required?: boolean;
11
+ options?: {
12
+ key: string;
13
+ value: LocalizedString;
14
+ }[];
15
+ constructor(_ds: DatasourceService);
16
+ ngOnInit(): void;
17
+ optionOf(value: any): LocalizedString;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionsControlField, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OptionsControlField, never, never, {}, {}, never, never, false>;
20
+ }
21
+ export declare abstract class OptionsControlDesigner {
22
+ private _session;
23
+ readonly _typeRequired: (control: AbstractControl) => ValidationErrors | null;
24
+ readonly datatypes: Type[];
25
+ constructor(_session: SessionService);
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionsControlDesigner, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OptionsControlDesigner, never, never, {}, {}, never, never, false>;
28
+ }
@@ -1,18 +1,18 @@
1
1
  import { FormBuilder } from "@angular/forms";
2
2
  import { ControlDesigner } from "../base";
3
- import { LocalizedString, Type } from "../models";
3
+ import { LocalizedString } from "../models";
4
4
  import { SessionService } from "../session.service";
5
+ import { OptionsControlDesigner } from "./options.base";
5
6
  import * as i0 from "@angular/core";
6
- export declare class RadioButtonControlDesigner implements ControlDesigner<RadioButtonModel> {
7
- private _session;
7
+ export declare class RadioButtonControlDesigner extends OptionsControlDesigner implements ControlDesigner<RadioButtonModel> {
8
8
  private _fb;
9
- readonly datatypes: Type[];
10
9
  readonly form: import("@angular/forms").FormGroup<{
11
10
  label: import("@angular/forms").FormControl<unknown>;
12
- dataType: import("@angular/forms").FormControl<unknown>;
11
+ dataType: import("@angular/forms").FormControl<any>;
12
+ hint: import("@angular/forms").FormControl<unknown>;
13
13
  }>;
14
14
  model: RadioButtonModel;
15
- constructor(_session: SessionService, _fb: FormBuilder);
15
+ constructor(session: SessionService, _fb: FormBuilder);
16
16
  onBind(model: RadioButtonModel): void;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonControlDesigner, never>;
18
18
  static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonControlDesigner, "ng-component", never, {}, {}, never, never, false>;
@@ -2,26 +2,15 @@ import { OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { MatRadioButton } from '@angular/material/radio';
4
4
  import { ControlComponent, ViewMode } from '../base';
5
- import { DatasourceService } from '../datasource.service';
6
- import { LocalizedString } from '../models';
5
+ import { OptionsControlField } from './options.base';
7
6
  import * as i0 from "@angular/core";
8
- export declare class RadioButtonField implements ControlComponent, OnInit {
9
- private _ds;
7
+ export declare class RadioButtonField extends OptionsControlField implements ControlComponent, OnInit {
10
8
  mode: ViewMode;
11
9
  hint?: string;
12
10
  label?: string;
13
- options?: {
14
- key: string;
15
- value: LocalizedString;
16
- }[];
17
- dataType?: string;
18
- required?: boolean;
19
11
  input: MatRadioButton;
20
12
  readonly control: FormControl<boolean>;
21
13
  focus(): void;
22
- ngOnInit(): void;
23
- optionOf(value: any): void;
24
- constructor(_ds: DatasourceService);
25
14
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonField, never>;
26
15
  static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonField, "ng-component", never, {}, {}, never, never, false>;
27
16
  }
@@ -1,21 +1,20 @@
1
1
  import { FormBuilder } from '@angular/forms';
2
2
  import { ControlDesigner } from '../base';
3
- import { LocalizedString, Type } from '../models';
3
+ import { LocalizedString } from '../models';
4
4
  import { SessionService } from '../session.service';
5
+ import { OptionsControlDesigner } from './options.base';
5
6
  import * as i0 from "@angular/core";
6
- export declare class SelectControlDesigner implements ControlDesigner<SelectModel> {
7
- private _session;
7
+ export declare class SelectControlDesigner extends OptionsControlDesigner implements ControlDesigner<SelectModel> {
8
8
  private _fb;
9
9
  readonly form: import("@angular/forms").FormGroup<{
10
10
  label: import("@angular/forms").FormControl<unknown>;
11
11
  placeholder: import("@angular/forms").FormControl<unknown>;
12
12
  autocomplete: import("@angular/forms").FormControl<unknown>;
13
13
  multiple: import("@angular/forms").FormControl<unknown>;
14
- dataType: import("@angular/forms").FormControl<unknown>;
14
+ dataType: import("@angular/forms").FormControl<any>;
15
15
  }>;
16
- readonly datatypes: Type[];
17
16
  model: SelectModel;
18
- constructor(_session: SessionService, _fb: FormBuilder);
17
+ constructor(session: SessionService, _fb: FormBuilder);
19
18
  onBind?(model: SelectModel): void;
20
19
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectControlDesigner, never>;
21
20
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectControlDesigner, "ng-component", never, {}, {}, never, never, false>;
@@ -2,34 +2,22 @@ import { OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { MatFormFieldAppearance } from '@angular/material/form-field';
4
4
  import { MatSelect } from '@angular/material/select';
5
- import { Observable } from 'rxjs';
6
5
  import { ControlComponent, ViewMode } from '../base';
7
6
  import { TypeSelect } from '../inputs/select.input';
8
- import { DatasourceService } from '../datasource.service';
9
- import { LocalizedString } from '../models';
7
+ import { OptionsControlField } from './options.base';
10
8
  import * as i0 from "@angular/core";
11
- export declare class SelectField implements ControlComponent<any>, OnInit {
12
- private _ds;
9
+ export declare class SelectField extends OptionsControlField implements ControlComponent<any>, OnInit {
13
10
  params: any;
14
11
  multiple?: boolean;
15
12
  autocomplete?: boolean;
16
13
  placeholder?: string;
17
14
  hint?: string;
18
- dataType?: string;
19
15
  label?: string;
20
- required?: boolean;
21
- options?: {
22
- key: string;
23
- value: LocalizedString;
24
- }[];
25
16
  readonly control: FormControl<any>;
26
17
  input: TypeSelect;
27
18
  select: MatSelect;
28
- source: Observable<any[]>;
29
- constructor(_ds: DatasourceService);
30
19
  appearance: MatFormFieldAppearance;
31
20
  mode: ViewMode;
32
- ngOnInit(): void;
33
21
  focus(): void;
34
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectField, never>;
35
23
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectField, "ng-component", never, {}, {}, never, never, false>;
@@ -7,7 +7,8 @@ export declare class ReportRef<O = any> {
7
7
  private _configuration;
8
8
  private _hub;
9
9
  readonly _resize: BehaviorSubject<Dimentions>;
10
- constructor(_configuration: Report, _hub: HubService, dim: Dimentions);
10
+ readonly _args: BehaviorSubject<O>;
11
+ constructor(_configuration: Report, args: O, _hub: HubService, dim: Dimentions);
11
12
  readonly _exporting: Subject<ExportEventArgs>;
12
13
  /** intercept user export */
13
14
  exporting(): Observable<ExportEventArgs>;
@@ -18,6 +19,7 @@ export declare class ReportRef<O = any> {
18
19
  get options(): O;
19
20
  /** configuration name */
20
21
  get name(): string;
22
+ get arguments(): O;
21
23
  _destroy(): void;
22
24
  }
23
25
  export interface ExportEventArgs {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizdoc/core",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "author": "Moding Ltd.",
5
5
  "homepage": "https://github.com/moding-il/bizdoc.core",
6
6
  "license": "https://github.com/moding-il/bizdoc.core/blob/master/License.md",