@bizdoc/core 1.17.0 → 1.17.1

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.
@@ -4259,10 +4259,8 @@ class SystemService {
4259
4259
  return this._http.get(`/api/system/form/${encodeURIComponent(name)}`);
4260
4260
  }
4261
4261
  controls() {
4262
- return this._controls || (this._controls = this._http.get(`/api/system/form/controls`).pipe(shareReplay$1()));
4263
- }
4264
- control(type) {
4265
- return this.controls().pipe(map$1(c => c.find(c => c.type === type)));
4262
+ return this._controls || (this._controls = this._http.get(`/api/system/form/controls`).
4263
+ pipe(tap$1(c => c.forEach(i => c[i.name] = i)), shareReplay$1()));
4266
4264
  }
4267
4265
  save(form) {
4268
4266
  const { workflow } = form;
@@ -28505,7 +28503,7 @@ class BoxFormRowComponent {
28505
28503
  }
28506
28504
  ngOnInit() {
28507
28505
  this.metadata.fields.forEach(f => {
28508
- const { controls } = this._session.profile, control = controls[f.type] || (controls[f.type] = controls.find(c => c.type === f.type)), selector = control.template;
28506
+ const { controls } = this._session.profile, { controlType } = f, control = controls[controlType] || (controls[controlType] = controls.find(c => c.name === controlType)), selector = control.template;
28509
28507
  const comp = this._cf.component(selector);
28510
28508
  const compRef = this._vc.createComponent(comp);
28511
28509
  const instance = compRef.instance;
@@ -28542,7 +28540,7 @@ class BoxFormControlComponent {
28542
28540
  this._session = _session;
28543
28541
  }
28544
28542
  ngOnInit() {
28545
- const { controls } = this._session.profile, control = controls[this.metadata.type] || (controls[this.metadata.type] = controls.find(c => c.type === this.metadata.type)), selector = control.template;
28543
+ const { controls } = this._session.profile, { controlType } = this.metadata, control = controls[controlType] || (controls[controlType] = controls.find(c => c.name === controlType)), selector = control.template;
28546
28544
  const comp = this._cf.component(selector);
28547
28545
  const compRef = this._vc.createComponent(comp);
28548
28546
  const instance = compRef.instance;
@@ -32473,6 +32471,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.5", ngImpor
32473
32471
  args: [{ template: "<bizdoc-designer-element [form]=\"form\">\r\n <ng-template bizdocEditContent>\r\n <form autocomplete=\"off\" [formGroup]=\"form\" class=\"column\">\r\n <mat-form-field>\r\n <mat-label>{{'DataType'|translate}}</mat-label>\r\n <mat-select required formControlName=\"dataType\">\r\n <mat-option *ngFor=\"let t of datatypes\" [value]=\"t.name\">{{t.title}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </form>\r\n </ng-template>\r\n</bizdoc-designer-element>\r\n" }]
32474
32472
  }] });
32475
32473
 
32474
+ class ControlDesignComponent extends DesignerTypeElementComponent {
32475
+ constructor() {
32476
+ super(...arguments);
32477
+ this.form = this._fb.group({
32478
+ dataType: this._fb.control(null, Validators.required)
32479
+ });
32480
+ }
32481
+ ngOnInit() {
32482
+ this.datatypes = this._ref.designer.types;
32483
+ super.ngOnInit();
32484
+ }
32485
+ }
32486
+ ControlDesignComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.5", ngImport: i0, type: ControlDesignComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
32487
+ ControlDesignComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.5", type: ControlDesignComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<bizdoc-designer-element [form]=\"form\">\r\n <ng-template bizdocEditContent>\r\n <form autocomplete=\"off\" [formGroup]=\"form\" class=\"column\">\r\n </form>\r\n </ng-template>\r\n</bizdoc-designer-element>\r\n", dependencies: [{ kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: EditContentDirective, selector: "[bizdocEditContent]" }, { kind: "component", type: DesignerItemComponent, selector: "bizdoc-designer-element", inputs: ["privileges", "icon", "form", "state"], outputs: ["continue", "save"] }] });
32488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.5", ngImport: i0, type: ControlDesignComponent, decorators: [{
32489
+ type: Component,
32490
+ args: [{ template: "<bizdoc-designer-element [form]=\"form\">\r\n <ng-template bizdocEditContent>\r\n <form autocomplete=\"off\" [formGroup]=\"form\" class=\"column\">\r\n </form>\r\n </ng-template>\r\n</bizdoc-designer-element>\r\n" }]
32491
+ }] });
32492
+
32476
32493
  /** filter component*/
32477
32494
  class DesignerCubeFilterComponent {
32478
32495
  /** filter ctor */
@@ -33278,7 +33295,7 @@ let ConfigurationDesignerComponent = class ConfigurationDesignerComponent {
33278
33295
  { elements: r.nodes, type: 'Nodes', comp: NodeDesignerComponent, templates: r.tNodes },
33279
33296
  { elements: r.attributes, type: 'Attributes', comp: AttributeDesignComponent, templates: r.tAttributes },
33280
33297
  { elements: r.policies, type: 'Policies', comp: PolicyDesignComponent, templates: r.tPolicies },
33281
- { elements: r.controls, type: 'Controls', comp: AttributeDesignComponent, templates: [] },
33298
+ { elements: r.controls, type: 'Controls', comp: ControlDesignComponent, templates: [] },
33282
33299
  { elements: r.rules, type: 'Rules', comp: RuleDesignComponent, templates: r.tRules },
33283
33300
  ];
33284
33301
  this.sections.forEach(s => s.elements.forEach(e => {
@@ -33502,8 +33519,8 @@ class ControlPropertiesComponent {
33502
33519
  }
33503
33520
  }
33504
33521
  ngOnInit() {
33505
- this._system.control(this.field.type).subscribe(c => {
33506
- const comp = this._cf.component(c.template);
33522
+ this._system.controls().subscribe(c => {
33523
+ const comp = this._cf.component(c[this.field.controlType].template);
33507
33524
  const compRef = this.design.createComponent(comp);
33508
33525
  const instance = compRef.instance;
33509
33526
  Object.assign(instance, this.field);
@@ -33632,7 +33649,7 @@ class DesignControlComponent {
33632
33649
  !changes['metadata'].firstChange && Object.assign(this._instance, this.metadata);
33633
33650
  }
33634
33651
  ngOnInit() {
33635
- const { controls } = this._session.profile, control = controls[this.metadata.type] || (controls[this.metadata.type] = controls.find(c => c.type === this.metadata.type)), selector = control.template;
33652
+ const { controls } = this._session.profile, { controlType } = this.metadata, control = controls[controlType] || (controls[controlType] = controls.find(c => c.name === controlType)), selector = control.template;
33636
33653
  const comp = this._cf.component(selector);
33637
33654
  const compRef = this._vcr.createComponent(comp);
33638
33655
  const instance = this._instance = compRef.instance;
@@ -33688,10 +33705,7 @@ let FormDesignerComponent = class FormDesignerComponent {
33688
33705
  const { formId } = p;
33689
33706
  formId && this._open(formId);
33690
33707
  });
33691
- this._system.controls().subscribe(c => {
33692
- c.forEach(c => this._controls[c.type] = c);
33693
- this.controls = c;
33694
- });
33708
+ this._system.controls().subscribe(c => this.controls = c);
33695
33709
  }
33696
33710
  _open(formId) {
33697
33711
  this._ref.populate(formId).subscribe(r => {
@@ -33768,7 +33782,7 @@ let FormDesignerComponent = class FormDesignerComponent {
33768
33782
  policy: OpenPolicy.Dialog | OpenPolicy.Dismissable,
33769
33783
  state: {
33770
33784
  name, label, draft: true,
33771
- type: control.type
33785
+ controlType: control.name
33772
33786
  }
33773
33787
  }).then(e => e.closed().subscribe(v => {
33774
33788
  if (v) {
@@ -34680,6 +34694,7 @@ class SystemModule {
34680
34694
  Synchronize: 'Synchronize',
34681
34695
  Workflow: 'Workflow',
34682
34696
  DataType: 'Type',
34697
+ Controls: 'Controls',
34683
34698
  Paste: 'Paste',
34684
34699
  SkipInRoute: 'Skip if already in route',
34685
34700
  StandardTime: 'Standard time',
@@ -34690,6 +34705,7 @@ class SystemModule {
34690
34705
  Filters: 'Filters',
34691
34706
  },
34692
34707
  he: {
34708
+ Controls: 'פקדים',
34693
34709
  Attributes: 'תכונות נלוות',
34694
34710
  Indices: 'אינקסים',
34695
34711
  XAxis: 'ציר רוחב',
@@ -34767,7 +34783,7 @@ SystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
34767
34783
  SystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.5", ngImport: i0, type: SystemModule, declarations: [
34768
34784
  /** design */
34769
34785
  FormInviteDialog, PerformanceReportDesignComponent, NodeDesignerComponent, DesignerPrivilegesComponent, AddContentDirective, IconPickerComponent, EditContentDirective, WidgetContentDirective,
34770
- DocumentStateWidgetDesignComponent, PolicyDesignComponent, StateDesignComponent, RoleDesignComponent, GuideDesignComponent, AttributeDesignComponent, RuleDesignComponent, ReportDesignerComponent, FolderDesignComponent, UtilityDesignComponent, FormDesignComponent, WidgetDesignComponent, CubeDesignComponent, ActionDesignerComponent, ReportDesignerComponent, ViewDesignComponent, TypeDesignComponent,
34786
+ DocumentStateWidgetDesignComponent, PolicyDesignComponent, StateDesignComponent, RoleDesignComponent, GuideDesignComponent, ControlDesignComponent, AttributeDesignComponent, RuleDesignComponent, ReportDesignerComponent, FolderDesignComponent, UtilityDesignComponent, FormDesignComponent, WidgetDesignComponent, CubeDesignComponent, ActionDesignerComponent, ReportDesignerComponent, ViewDesignComponent, TypeDesignComponent,
34771
34787
  DesignerCubeFilterComponent, CubeIndexDesignComponent, ConfigurationDatasourceDesignComponent, ReturnToRoleActionDesignComponent, PivotViewDesignComponent, CubeViewDesignComponent, BoxFormDesignComponent, AnomalyRuleDesignComponent, UsageReportDesignComponent, DocumentsWidgetDesignComponent, PerformanceWidgetDesignComponent, DocumentsReportDesignComponent, TasksReportDesignComponent, ExploreViewDesignComponent, AnalysisWidgetDesignComponent, ParallelViewDesignComponent, SumViewDesignComponent, MatrixViewDesignComponent, ChartViewDesignComponent,
34772
34788
  /** utilities */
34773
34789
  ConfigurationDesignerComponent, DesignerItemComponent, DesignerItemOptionsComponent,
@@ -34813,7 +34829,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.5", ngImpor
34813
34829
  declarations: [
34814
34830
  /** design */
34815
34831
  FormInviteDialog, PerformanceReportDesignComponent, NodeDesignerComponent, DesignerPrivilegesComponent, AddContentDirective, IconPickerComponent, EditContentDirective, WidgetContentDirective,
34816
- DocumentStateWidgetDesignComponent, PolicyDesignComponent, StateDesignComponent, RoleDesignComponent, GuideDesignComponent, AttributeDesignComponent, RuleDesignComponent, ReportDesignerComponent, FolderDesignComponent, UtilityDesignComponent, FormDesignComponent, WidgetDesignComponent, CubeDesignComponent, ActionDesignerComponent, ReportDesignerComponent, ViewDesignComponent, TypeDesignComponent,
34832
+ DocumentStateWidgetDesignComponent, PolicyDesignComponent, StateDesignComponent, RoleDesignComponent, GuideDesignComponent, ControlDesignComponent, AttributeDesignComponent, RuleDesignComponent, ReportDesignerComponent, FolderDesignComponent, UtilityDesignComponent, FormDesignComponent, WidgetDesignComponent, CubeDesignComponent, ActionDesignerComponent, ReportDesignerComponent, ViewDesignComponent, TypeDesignComponent,
34817
34833
  DesignerCubeFilterComponent, CubeIndexDesignComponent, ConfigurationDatasourceDesignComponent, ReturnToRoleActionDesignComponent, PivotViewDesignComponent, CubeViewDesignComponent, BoxFormDesignComponent, AnomalyRuleDesignComponent, UsageReportDesignComponent, DocumentsWidgetDesignComponent, PerformanceWidgetDesignComponent, DocumentsReportDesignComponent, TasksReportDesignComponent, ExploreViewDesignComponent, AnalysisWidgetDesignComponent, ParallelViewDesignComponent, SumViewDesignComponent, MatrixViewDesignComponent, ChartViewDesignComponent,
34818
34834
  /** utilities */
34819
34835
  ConfigurationDesignerComponent, DesignerItemComponent, DesignerItemOptionsComponent,