@bizdoc/core 3.9.6 → 3.10.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.
@@ -1122,7 +1122,7 @@ class SessionService {
1122
1122
  */
1123
1123
  prepare() {
1124
1124
  const promises = [];
1125
- ('serviceWorker' in navigator) && loadServiceWorker();
1125
+ loadServiceWorker();
1126
1126
  this._config.maps && promises.push(this._loadGoogleMaps());
1127
1127
  promises.push(this._changeTheme(this.theme));
1128
1128
  return Promise.all(promises);
@@ -1175,15 +1175,15 @@ class SessionService {
1175
1175
  });
1176
1176
  }
1177
1177
  reportInboxRead(date, move) {
1178
- const { inboxView } = this._profile.options;
1179
- inboxView !== undefined &&
1180
- inboxView < date &&
1178
+ const { inboxTouch } = this._profile.options;
1179
+ inboxTouch !== undefined &&
1180
+ inboxTouch < date &&
1181
1181
  this._stepInboxCount(move);
1182
1182
  }
1183
1183
  reportNotificationsRead(date, move) {
1184
- const { notificationsView } = this._profile.options;
1185
- notificationsView !== undefined &&
1186
- notificationsView < date &&
1184
+ const { notificationsTouch } = this._profile.options;
1185
+ notificationsTouch !== undefined &&
1186
+ notificationsTouch < date &&
1187
1187
  !this.isImpersonating &&
1188
1188
  this._stepNotificationsCount(move);
1189
1189
  }
@@ -1214,10 +1214,10 @@ class SessionService {
1214
1214
  return this._accentpalette;
1215
1215
  }
1216
1216
  _isAboveWatermark(date) {
1217
- const { notificationsView } = this.profile.options;
1217
+ const { notificationsTouch } = this.profile.options;
1218
1218
  return !this.isImpersonating &&
1219
- notificationsView !== undefined &&
1220
- notificationsView < date;
1219
+ notificationsTouch !== undefined &&
1220
+ notificationsTouch < date;
1221
1221
  }
1222
1222
  get primeryPalette() {
1223
1223
  return this._primarypalette;
@@ -1279,6 +1279,12 @@ class SessionService {
1279
1279
  this.profile.available = value === 'Online' ? null : value;
1280
1280
  this._http.put(`/api/account/available?mode=${this.profile.available || ''}`, {}).subscribe();
1281
1281
  }
1282
+ get timeZone() { return this._profile.options.timeZone || Intl.DateTimeFormat().resolvedOptions().timeZone; }
1283
+ set timeZone(value) {
1284
+ this._http.put('/api/account/timezone', {
1285
+ value
1286
+ }).subscribe();
1287
+ }
1282
1288
  isInRole(role) {
1283
1289
  return this._http.get('/api/account/isInRole', {
1284
1290
  params: { role },
@@ -1356,7 +1362,7 @@ class SessionService {
1356
1362
  }
1357
1363
  return firstValueFrom(this._http.put('/api/account/inboxview', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1358
1364
  this._stepInboxCount(0);
1359
- this._profile.options.inboxView = e.time;
1365
+ this._profile.options.inboxTouch = e.time;
1360
1366
  })));
1361
1367
  }
1362
1368
  markNotificationsAsTouched() {
@@ -1366,7 +1372,7 @@ class SessionService {
1366
1372
  }
1367
1373
  return firstValueFrom(this._http.put('/api/account/notificationsView', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1368
1374
  this._stepNotificationsCount(0);
1369
- this._profile.options.notificationsView = e.time;
1375
+ this._profile.options.notificationsTouch = e.time;
1370
1376
  })));
1371
1377
  }
1372
1378
  _constructPalette(color) {
@@ -1455,9 +1461,9 @@ function promote(move, counter) {
1455
1461
  return counter;
1456
1462
  }
1457
1463
  function loadServiceWorker() {
1458
- window.addEventListener('load', function () {
1459
- navigator.serviceWorker.register('/js/app-sw.js').then(function () {
1460
- }, null);
1464
+ ('serviceWorker' in navigator) && window.addEventListener('load', function () {
1465
+ setTimeout(() => navigator.serviceWorker.register('/js/app-sw.js').then(function () {
1466
+ }, null), 5000);
1461
1467
  });
1462
1468
  }
1463
1469
 
@@ -4809,8 +4815,7 @@ class OptionsControlField {
4809
4815
  }
4810
4816
  ngOnInit() {
4811
4817
  this.required && this.control.addValidators(Validators.required);
4812
- if (this.dataType)
4813
- this._ds.all(this.dataType).subscribe(v => this.options = v);
4818
+ this.dataType && this._ds.all(this.dataType).subscribe(v => this.options = v);
4814
4819
  }
4815
4820
  optionOf(value) {
4816
4821
  return this.options?.find(o => o.key === value)?.value;
@@ -5797,7 +5802,7 @@ let CheckboxControlDesigner = class CheckboxControlDesigner {
5797
5802
  constructor(_fb) {
5798
5803
  this._fb = _fb;
5799
5804
  this.form = this._fb.group({
5800
- label: this._fb.control(null, Validators.required),
5805
+ label: this._fb.control(null),
5801
5806
  hint: null,
5802
5807
  });
5803
5808
  }
@@ -5882,10 +5887,10 @@ let ChecklistControlDesigner = class ChecklistControlDesigner extends OptionsCon
5882
5887
  }
5883
5888
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ChecklistControlDesigner, deps: [{ token: SystemService }, { token: i1$2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
5884
5889
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: ChecklistControlDesigner, isStandalone: false, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
5885
- <form autocomplete="off" [formGroup]="form" class="column">
5886
- <bizdoc-localized-string [placeholder]="'Label'|translate" required formControlName="label"></bizdoc-localized-string>
5887
- <mat-checkbox formControlName="multiple">{{'Multiple'|translate}}</mat-checkbox>
5888
- @if (datatypes) {
5890
+ <form autocomplete="off" [formGroup]="form" class="column">
5891
+ <bizdoc-localized-string [placeholder]="'Label'|translate" formControlName="label"></bizdoc-localized-string>
5892
+ <mat-checkbox formControlName="multiple">{{'Multiple'|translate}}</mat-checkbox>
5893
+ @if (datatypes) {
5889
5894
  <mat-form-field>
5890
5895
  <mat-label>{{'DataType'|translate}}</mat-label>
5891
5896
  <mat-select formControlName="dataType">
@@ -5910,7 +5915,7 @@ let ChecklistControlDesigner = class ChecklistControlDesigner extends OptionsCon
5910
5915
  </mat-form-field>
5911
5916
  }
5912
5917
  <bizdoc-design-options [form]="form" [model]="model"></bizdoc-design-options>
5913
- </form>`, isInline: true, dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$6.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: LocalizedStringComponent, selector: "bizdoc-localized-string", inputs: ["class", "floatLabel", "value", "placeholder", "required", "disabled", "maxlength"] }, { kind: "component", type: ControlOptionsComponent, selector: "bizdoc-design-options", inputs: ["form", "model"] }, { kind: "pipe", type: ArraySortPipe, name: "sort" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
5918
+ </form>`, isInline: true, dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$6.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: LocalizedStringComponent, selector: "bizdoc-localized-string", inputs: ["class", "floatLabel", "value", "placeholder", "required", "disabled", "maxlength"] }, { kind: "component", type: ControlOptionsComponent, selector: "bizdoc-design-options", inputs: ["form", "model"] }, { kind: "pipe", type: ArraySortPipe, name: "sort" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
5914
5919
  };
5915
5920
  ChecklistControlDesigner = __decorate([
5916
5921
  BizDoc({ selector: 'checklist-control-designer' })
@@ -5920,10 +5925,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
5920
5925
  args: [{
5921
5926
  standalone: false,
5922
5927
  template: `
5923
- <form autocomplete="off" [formGroup]="form" class="column">
5924
- <bizdoc-localized-string [placeholder]="'Label'|translate" required formControlName="label"></bizdoc-localized-string>
5925
- <mat-checkbox formControlName="multiple">{{'Multiple'|translate}}</mat-checkbox>
5926
- @if (datatypes) {
5928
+ <form autocomplete="off" [formGroup]="form" class="column">
5929
+ <bizdoc-localized-string [placeholder]="'Label'|translate" formControlName="label"></bizdoc-localized-string>
5930
+ <mat-checkbox formControlName="multiple">{{'Multiple'|translate}}</mat-checkbox>
5931
+ @if (datatypes) {
5927
5932
  <mat-form-field>
5928
5933
  <mat-label>{{'DataType'|translate}}</mat-label>
5929
5934
  <mat-select formControlName="dataType">
@@ -6538,9 +6543,9 @@ class LayoutComponent {
6538
6543
  });
6539
6544
  this.form.statusChanges.pipe(startWith(), takeUntil(this._destroy)).subscribe(() => {
6540
6545
  this.dirtyChange.emit(this.form.dirty);
6541
- this.valid = this.form.valid;
6542
- this.validChange.emit(this.form.valid);
6546
+ this.validChange.emit(this.valid = this.form.valid);
6543
6547
  });
6548
+ this.validChange.emit(this.valid = this.form.valid);
6544
6549
  }
6545
6550
  /** */
6546
6551
  focus() {
@@ -7711,7 +7716,8 @@ class ActionDialog {
7711
7716
  this._fr = _fr;
7712
7717
  this.arguments = {};
7713
7718
  this._destroy = new Subject();
7714
- this.action = session.profile.actions.find(a => a.name === data.action);
7719
+ const action = this.action = session.profile.actions.find(a => a.name === data.action);
7720
+ this.verb = decapitalize(action.verb || action.title);
7715
7721
  }
7716
7722
  ngOnInit() {
7717
7723
  if (this.action.template) {
@@ -7728,21 +7734,22 @@ class ActionDialog {
7728
7734
  this.valid = true;
7729
7735
  }
7730
7736
  attached(compRef) {
7731
- const { instance } = compRef;
7732
- instance.form.valueChanges.pipe(takeUntil(this._destroy)).subscribe(v => this.arguments = v);
7733
- instance.form.statusChanges.pipe(takeUntil(this._destroy)).
7734
- subscribe(() => this.valid = instance.form.valid);
7737
+ const { instance: { form } } = compRef;
7738
+ this.valid = form.valid;
7739
+ form.valueChanges.pipe(takeUntil(this._destroy)).subscribe(v => this.arguments = v);
7740
+ form.statusChanges.pipe(takeUntil(this._destroy)).
7741
+ subscribe(() => this.valid = form.valid);
7735
7742
  }
7736
7743
  ngOnDestroy() {
7737
7744
  this._destroy.next();
7738
7745
  this._destroy.complete();
7739
7746
  }
7740
7747
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ActionDialog, deps: [{ token: MAT_DIALOG_DATA }, { token: SessionService }, { token: BizDocComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component }); }
7741
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: ActionDialog, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content class=\"column\">\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : (action.verb || action.title).toLowerCase() }}\r\n </p>\r\n }\r\n @if (!action.template) {\r\n <bizdoc-layout [fields]=\"action.arguments!\"\r\n [(model)]=\"arguments\"\r\n [(valid)]=\"valid\"></bizdoc-layout>\r\n } @else {\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n }\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" [mat-dialog-close]=\"arguments\" color=\"primary\">{{'OK'|translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n</mat-dialog-actions>\r\n<ng-template #template>\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n</ng-template>\r\n", styles: [":host ::ng-deep form{display:flex}\n"], dependencies: [{ kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: i2$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: LayoutComponent, selector: "bizdoc-layout", inputs: ["fields", "model", "dirty", "params", "valid"], outputs: ["modelChange", "dirtyChange", "validChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
7748
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: ActionDialog, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content class=\"column\">\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : verb }}\r\n </p>\r\n }\r\n @if (!action.template) {\r\n <bizdoc-layout [fields]=\"action.arguments!\"\r\n [(model)]=\"arguments\"\r\n [(valid)]=\"valid\"></bizdoc-layout>\r\n } @else {\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n }\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" [mat-dialog-close]=\"arguments\" color=\"primary\">{{'OK'|translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"], dependencies: [{ kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: i2$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: LayoutComponent, selector: "bizdoc-layout", inputs: ["fields", "model", "dirty", "params", "valid"], outputs: ["modelChange", "dirtyChange", "validChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
7742
7749
  }
7743
7750
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ActionDialog, decorators: [{
7744
7751
  type: Component,
7745
- args: [{ standalone: false, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content class=\"column\">\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : (action.verb || action.title).toLowerCase() }}\r\n </p>\r\n }\r\n @if (!action.template) {\r\n <bizdoc-layout [fields]=\"action.arguments!\"\r\n [(model)]=\"arguments\"\r\n [(valid)]=\"valid\"></bizdoc-layout>\r\n } @else {\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n }\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" [mat-dialog-close]=\"arguments\" color=\"primary\">{{'OK'|translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n</mat-dialog-actions>\r\n<ng-template #template>\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n</ng-template>\r\n", styles: [":host ::ng-deep form{display:flex}\n"] }]
7752
+ args: [{ standalone: false, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content class=\"column\">\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : verb }}\r\n </p>\r\n }\r\n @if (!action.template) {\r\n <bizdoc-layout [fields]=\"action.arguments!\"\r\n [(model)]=\"arguments\"\r\n [(valid)]=\"valid\"></bizdoc-layout>\r\n } @else {\r\n <ng-container [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-container>\r\n }\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" [mat-dialog-close]=\"arguments\" color=\"primary\">{{'OK'|translate}}</button>\r\n <button mat-button mat-dialog-close>{{'Cancel' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"] }]
7746
7753
  }], ctorParameters: () => [{ type: undefined, decorators: [{
7747
7754
  type: Inject,
7748
7755
  args: [MAT_DIALOG_DATA]
@@ -13931,13 +13938,13 @@ class CommentsComponent {
13931
13938
  window.localStorage.setItem(id, this.input.text);
13932
13939
  }
13933
13940
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: CommentsComponent, deps: [{ token: AccountService }, { token: SessionService }, { token: PromptService }, { token: TranslateService }, { token: ChatInfo }, { token: MailboxService }, { token: HubService }, { token: BIZDOC_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
13934
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: CommentsComponent, isStandalone: false, selector: "bizdoc-comments", inputs: { model: "model" }, outputs: { change: "change" }, host: { classAttribute: "comments" }, viewQueries: [{ propertyName: "threadElement", first: true, predicate: ["thread"], descendants: true, read: ElementRef, static: true }, { propertyName: "input", first: true, predicate: EditInputComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (!model.comments.length) {\r\n <bizdoc-none icon=\"format_quote\"></bizdoc-none>\r\n}\r\n\r\n<div class=\"column comments-thread mat-body\" #thread (scroll)=\"onScroll($event)\">\r\n @for (c of model.comments; track c.id) {\r\n <ng-container>\r\n @if (!c.deleted || showDeleted.has(c.id)) {\r\n <bizdoc-comment role=\"listitem\"\r\n [model]=\"model\"\r\n [item]=\"c\"\r\n (reply)=\"reply(c)\">\r\n </bizdoc-comment>\r\n } @else {\r\n <a (click)=\"showDeleted.add(c.id)\" class=\"comment-deleted\">{{'Deleted' | translate}}</a>\r\n }\r\n </ng-container>\r\n }\r\n</div>\r\n\r\n<small class=\"mat-body comments-typing\" [style.visibility]=\"typing ? 'visible': 'hidden'\">{{'Typing' | translate : typing}}</small>\r\n\r\n@if (replyName) {\r\n<small class=\"mat-body comments-reply\">\r\n {{'ReplyTo' |translate : replyName }}\r\n &nbsp; <a class=\"comment-cancel-reply\" (click)=\"clearReply()\">{{'Cancel'|translate}}</a>\r\n</small>\r\n}\r\n\r\n<bizdoc-edit-text (ok)=\"post($event)\" (change)=\"_textChange.next()\"\r\n placeholder=\"CommentHere\"\r\n [disabled]=\"sending\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\r\n</bizdoc-edit-text>\r\n", styles: [":host{display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;height:100%}.comments-thread{flex:1 1 auto;overflow:auto;padding:8px 12px 0}.comment-deleted{align-self:center}.comments-typing,.comments-reply{font-size:11px;padding:0 8px}.comments-reply .comment-cancel-reply{font-variant:small-caps}\n"], dependencies: [{ kind: "component", type: EditInputComponent, selector: "bizdoc-edit-text", inputs: ["placeholder", "text", "image", "resource", "disabled", "autofocus", "cache"], outputs: ["change", "ok", "focus", "blur"] }, { kind: "component", type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }, { kind: "component", type: CommentComponent, selector: "bizdoc-comment", inputs: ["model", "item"], outputs: ["deleted", "reply"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
13941
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: CommentsComponent, isStandalone: false, selector: "bizdoc-comments", inputs: { model: "model" }, outputs: { change: "change" }, host: { classAttribute: "comments" }, viewQueries: [{ propertyName: "threadElement", first: true, predicate: ["thread"], descendants: true, read: ElementRef, static: true }, { propertyName: "input", first: true, predicate: EditInputComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (!model.comments.length) {\r\n <bizdoc-none icon=\"format_quote\"></bizdoc-none>\r\n}\r\n\r\n<div class=\"column comments-thread mat-body\" #thread (scroll)=\"onScroll($event)\">\r\n @for (c of model.comments; track c.id) {\r\n <ng-container>\r\n @if (!c.deleted || showDeleted.has(c.id)) {\r\n <bizdoc-comment role=\"listitem\"\r\n [model]=\"model\"\r\n [item]=\"c\"\r\n (reply)=\"reply(c)\">\r\n </bizdoc-comment>\r\n } @else {\r\n <a (click)=\"showDeleted.add(c.id)\" class=\"comment-deleted\">{{'Deleted' | translate}}</a>\r\n }\r\n </ng-container>\r\n }\r\n</div>\r\n\r\n<small class=\"mat-body comments-typing\" [style.visibility]=\"typing ? 'visible': 'hidden'\">{{'Typing' | translate : typing}}</small>\r\n\r\n@if (replyName) {\r\n<small class=\"mat-body comments-reply\">\r\n {{'ReplyTo' |translate : replyName }}\r\n &nbsp; <a class=\"comment-cancel-reply\" (click)=\"clearReply()\">{{'Cancel'|translate}}</a>\r\n</small>\r\n}\r\n\r\n<bizdoc-edit-text (ok)=\"post($event)\" (change)=\"_textChange.next()\"\r\n placeholder=\"CommentHere\"\r\n [disabled]=\"sending\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\r\n</bizdoc-edit-text>\r\n", styles: [":host{display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;height:100%}.comments-thread{flex:1 1 auto;overflow:auto;padding:8px 12px 0}.comment-deleted{align-self:center}.comments-typing,.comments-reply{font-size:11px;padding:0 8px}.comments-reply .comment-cancel-reply{font-variant-caps:all-small-caps}\n"], dependencies: [{ kind: "component", type: EditInputComponent, selector: "bizdoc-edit-text", inputs: ["placeholder", "text", "image", "resource", "disabled", "autofocus", "cache"], outputs: ["change", "ok", "focus", "blur"] }, { kind: "component", type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }, { kind: "component", type: CommentComponent, selector: "bizdoc-comment", inputs: ["model", "item"], outputs: ["deleted", "reply"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
13935
13942
  }
13936
13943
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: CommentsComponent, decorators: [{
13937
13944
  type: Component,
13938
13945
  args: [{ standalone: false, selector: 'bizdoc-comments', host: {
13939
13946
  class: 'comments'
13940
- }, template: "@if (!model.comments.length) {\r\n <bizdoc-none icon=\"format_quote\"></bizdoc-none>\r\n}\r\n\r\n<div class=\"column comments-thread mat-body\" #thread (scroll)=\"onScroll($event)\">\r\n @for (c of model.comments; track c.id) {\r\n <ng-container>\r\n @if (!c.deleted || showDeleted.has(c.id)) {\r\n <bizdoc-comment role=\"listitem\"\r\n [model]=\"model\"\r\n [item]=\"c\"\r\n (reply)=\"reply(c)\">\r\n </bizdoc-comment>\r\n } @else {\r\n <a (click)=\"showDeleted.add(c.id)\" class=\"comment-deleted\">{{'Deleted' | translate}}</a>\r\n }\r\n </ng-container>\r\n }\r\n</div>\r\n\r\n<small class=\"mat-body comments-typing\" [style.visibility]=\"typing ? 'visible': 'hidden'\">{{'Typing' | translate : typing}}</small>\r\n\r\n@if (replyName) {\r\n<small class=\"mat-body comments-reply\">\r\n {{'ReplyTo' |translate : replyName }}\r\n &nbsp; <a class=\"comment-cancel-reply\" (click)=\"clearReply()\">{{'Cancel'|translate}}</a>\r\n</small>\r\n}\r\n\r\n<bizdoc-edit-text (ok)=\"post($event)\" (change)=\"_textChange.next()\"\r\n placeholder=\"CommentHere\"\r\n [disabled]=\"sending\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\r\n</bizdoc-edit-text>\r\n", styles: [":host{display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;height:100%}.comments-thread{flex:1 1 auto;overflow:auto;padding:8px 12px 0}.comment-deleted{align-self:center}.comments-typing,.comments-reply{font-size:11px;padding:0 8px}.comments-reply .comment-cancel-reply{font-variant:small-caps}\n"] }]
13947
+ }, template: "@if (!model.comments.length) {\r\n <bizdoc-none icon=\"format_quote\"></bizdoc-none>\r\n}\r\n\r\n<div class=\"column comments-thread mat-body\" #thread (scroll)=\"onScroll($event)\">\r\n @for (c of model.comments; track c.id) {\r\n <ng-container>\r\n @if (!c.deleted || showDeleted.has(c.id)) {\r\n <bizdoc-comment role=\"listitem\"\r\n [model]=\"model\"\r\n [item]=\"c\"\r\n (reply)=\"reply(c)\">\r\n </bizdoc-comment>\r\n } @else {\r\n <a (click)=\"showDeleted.add(c.id)\" class=\"comment-deleted\">{{'Deleted' | translate}}</a>\r\n }\r\n </ng-container>\r\n }\r\n</div>\r\n\r\n<small class=\"mat-body comments-typing\" [style.visibility]=\"typing ? 'visible': 'hidden'\">{{'Typing' | translate : typing}}</small>\r\n\r\n@if (replyName) {\r\n<small class=\"mat-body comments-reply\">\r\n {{'ReplyTo' |translate : replyName }}\r\n &nbsp; <a class=\"comment-cancel-reply\" (click)=\"clearReply()\">{{'Cancel'|translate}}</a>\r\n</small>\r\n}\r\n\r\n<bizdoc-edit-text (ok)=\"post($event)\" (change)=\"_textChange.next()\"\r\n placeholder=\"CommentHere\"\r\n [disabled]=\"sending\" (focus)=\"onFocus()\" (blur)=\"onBlur()\">\r\n</bizdoc-edit-text>\r\n", styles: [":host{display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;height:100%}.comments-thread{flex:1 1 auto;overflow:auto;padding:8px 12px 0}.comment-deleted{align-self:center}.comments-typing,.comments-reply{font-size:11px;padding:0 8px}.comments-reply .comment-cancel-reply{font-variant-caps:all-small-caps}\n"] }]
13941
13948
  }], ctorParameters: () => [{ type: AccountService }, { type: SessionService }, { type: PromptService }, { type: TranslateService }, { type: ChatInfo }, { type: MailboxService }, { type: HubService }, { type: undefined, decorators: [{
13942
13949
  type: Inject,
13943
13950
  args: [BIZDOC_CONFIG]
@@ -21619,6 +21626,11 @@ class HomeComponent extends HomeBase {
21619
21626
  this.input.nativeElement.focus();
21620
21627
  setTimeout(() => this.trigger.openPanel(), 200);
21621
21628
  }
21629
+ /**
21630
+ *
21631
+ * @param item
21632
+ * @param compRef
21633
+ */
21622
21634
  onAttached(item, compRef) {
21623
21635
  item.instance = compRef.instance;
21624
21636
  compRef.instance.onBind(item.model);
@@ -21924,7 +21936,8 @@ class ActionPaneComponent extends ActionBase {
21924
21936
  this.okChange = new EventEmitter();
21925
21937
  this._destroy = new Subject();
21926
21938
  this.model = _pane.data['item'];
21927
- this.action = session.profile.actions.find(a => a.name === _pane.params['action']);
21939
+ const action = this.action = session.profile.actions.find(a => a.name === _pane.params['action']);
21940
+ this.verb = decapitalize(action.verb || action.title);
21928
21941
  }
21929
21942
  close() { this._pane.close(); }
21930
21943
  ok() {
@@ -21955,11 +21968,11 @@ class ActionPaneComponent extends ActionBase {
21955
21968
  this._destroy.complete();
21956
21969
  }
21957
21970
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ActionPaneComponent, deps: [{ token: PaneRef }, { token: MailboxService }, { token: BizDocComponentFactoryResolver }, { token: AccountService }, { token: PromptService }, { token: TranslateService }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Component }); }
21958
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: ActionPaneComponent, isStandalone: false, selector: "bizdoc-action-dialog-pane", viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content>\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : (action.verb || action.title).toLowerCase() }}\r\n </p>\r\n }\r\n <ng-container #container>\r\n </ng-container>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" (click)=\"ok()\" color=\"primary\">{{'Yes'|translate}}</button>\r\n <button mat-button (click)='close()'>{{'No' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"], dependencies: [{ kind: "directive", type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
21971
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: ActionPaneComponent, isStandalone: false, selector: "bizdoc-action-dialog-pane", viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content>\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : verb }}\r\n </p>\r\n }\r\n <ng-container #container>\r\n </ng-container>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" (click)=\"ok()\" color=\"primary\">{{'Yes'|translate}}</button>\r\n <button mat-button (click)='close()'>{{'No' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"], dependencies: [{ kind: "directive", type: i2$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
21959
21972
  }
21960
21973
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ActionPaneComponent, decorators: [{
21961
21974
  type: Component,
21962
- args: [{ standalone: false, selector: 'bizdoc-action-dialog-pane', template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content>\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : (action.verb || action.title).toLowerCase() }}\r\n </p>\r\n }\r\n <ng-container #container>\r\n </ng-container>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" (click)=\"ok()\" color=\"primary\">{{'Yes'|translate}}</button>\r\n <button mat-button (click)='close()'>{{'No' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"] }]
21975
+ args: [{ standalone: false, selector: 'bizdoc-action-dialog-pane', template: "<h2 mat-dialog-title>{{action.title}}</h2>\r\n<mat-dialog-content>\r\n @if (!action.arguments?.length) {\r\n <p>\r\n {{ 'ActionAsk' | translate : verb }}\r\n </p>\r\n }\r\n <ng-container #container>\r\n </ng-container>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button type=\"submit\" [disabled]=\"!valid\" (click)=\"ok()\" color=\"primary\">{{'Yes'|translate}}</button>\r\n <button mat-button (click)='close()'>{{'No' | translate}}</button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep form{display:flex}\n"] }]
21963
21976
  }], ctorParameters: () => [{ type: PaneRef }, { type: MailboxService }, { type: BizDocComponentFactoryResolver }, { type: AccountService }, { type: PromptService }, { type: TranslateService }, { type: SessionService }], propDecorators: { container: [{
21964
21977
  type: ViewChild,
21965
21978
  args: ['container']