ngx-techlify-core 16.0.4 → 16.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.
@@ -1533,8 +1533,7 @@ class TechlifyTaggerTagFormConfigModel {
1533
1533
  }
1534
1534
  }
1535
1535
 
1536
- var TechlifyTaggerTagFormFieldComponent_1;
1537
- let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1 = class TechlifyTaggerTagFormFieldComponent {
1536
+ class TechlifyTaggerTagFormFieldComponent {
1538
1537
  _focusMonitor;
1539
1538
  _elementRef;
1540
1539
  httpService;
@@ -1544,19 +1543,15 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1544
1543
  stateChanges = new Subject();
1545
1544
  focused = false;
1546
1545
  controlType = 'techlify-tagger-form-field';
1547
- id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent_1.nextId++}`;
1546
+ id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent.nextId++}`;
1548
1547
  onChange = (_) => { };
1549
1548
  onTouched = () => { };
1550
1549
  tagInputCtrl = new UntypedFormControl();
1551
1550
  filterString;
1552
1551
  tagInput;
1553
- /**Pass the configuration for Techlify Tagger */
1554
1552
  config = new TechlifyTaggerTagFormConfigModel();
1555
- /**Pass the Model Type for Techlify Tagger, Required */
1556
1553
  modelType;
1557
- /**Pass the Model ID for Techlify Tagger */
1558
1554
  modelId;
1559
- /**Pass the default list of tags */
1560
1555
  _allTags = [];
1561
1556
  get allTags() {
1562
1557
  return this._allTags;
@@ -1564,14 +1559,12 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1564
1559
  set allTags(value) {
1565
1560
  this._allTags = value;
1566
1561
  }
1567
- /**Pass the Categories to filter for a model */
1568
1562
  categories = [];
1569
- /**Pass default category to be used for assigning the tags, when we filter by more than one category */
1570
1563
  defaultCreateCategory;
1564
+ subscriptions = [];
1571
1565
  get tags() {
1572
1566
  return this.allTags.filter(x => this.value.some(y => y == x.id));
1573
1567
  }
1574
- //Default Getter and Setters for a Form Field Implementation
1575
1568
  get empty() {
1576
1569
  return this.value.length == 0;
1577
1570
  }
@@ -1614,26 +1607,23 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1614
1607
  this.stateChanges.next();
1615
1608
  }
1616
1609
  _placeholder;
1617
- ngOnInit() {
1618
- }
1610
+ ngOnInit() { }
1619
1611
  ngOnChanges(changes) {
1620
- //API to load all tags for the model type
1621
1612
  if (this.allTags.length == 0) {
1622
- this.httpService
1613
+ const sub = this.httpService
1623
1614
  .cache(!this.config.isCacheTags)
1624
1615
  .get(this.config.apiUrl, {
1625
1616
  params: {
1626
1617
  categories: this.categories.join(','),
1627
1618
  perPage: '1000'
1628
1619
  }
1629
- }).pipe(debounceTime(500), untilDestroyed(this)).subscribe((result) => {
1620
+ }).pipe(debounceTime(500)).subscribe((result) => {
1630
1621
  this.allTags = result.data;
1631
1622
  });
1623
+ this.subscriptions.push(sub);
1632
1624
  }
1633
- //API to load only the selected tags for the model
1634
1625
  if (this.modelId && this.value.length == 0) {
1635
- //Model Id is passed and no tags are present, so we query db for the avilable tags for the model ID.
1636
- this.httpService
1626
+ const sub = this.httpService
1637
1627
  .cache(!this.config.isCacheTags)
1638
1628
  .get(this.config.apiUrl, {
1639
1629
  params: {
@@ -1642,16 +1632,16 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1642
1632
  model_id: this.modelId,
1643
1633
  perPage: '1000'
1644
1634
  }
1645
- }).pipe(debounceTime(500), untilDestroyed(this)).subscribe((result) => {
1635
+ }).pipe(debounceTime(500)).subscribe((result) => {
1646
1636
  this.value = (result?.data || []).map((x) => x.id);
1647
1637
  this._handleInput();
1648
1638
  });
1639
+ this.subscriptions.push(sub);
1649
1640
  }
1650
1641
  }
1651
1642
  init() {
1652
1643
  if (this.modelId && this.allTags.length == 0) {
1653
- //Model Id is passed and no tags are passed, so we query db for the avilable tags for the model ID.
1654
- this.httpService
1644
+ const sub = this.httpService
1655
1645
  .cache(!this.config.isCacheTags)
1656
1646
  .get(this.config.apiUrl, {
1657
1647
  params: {
@@ -1659,9 +1649,10 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1659
1649
  model_type: this.modelType,
1660
1650
  model_id: this.modelId
1661
1651
  }
1662
- }).pipe(untilDestroyed(this)).subscribe((result) => {
1652
+ }).subscribe((result) => {
1663
1653
  this.allTags = result.data;
1664
1654
  });
1655
+ this.subscriptions.push(sub);
1665
1656
  }
1666
1657
  }
1667
1658
  get filteredTags() {
@@ -1673,11 +1664,11 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1673
1664
  this.httpService = httpService;
1674
1665
  this._formField = _formField;
1675
1666
  this.ngControl = ngControl;
1676
- this.tagInputCtrl.valueChanges
1667
+ const sub = this.tagInputCtrl.valueChanges
1677
1668
  .subscribe(filterValue => {
1678
1669
  this.filterString = filterValue;
1679
1670
  });
1680
- //Set Focus Monitor
1671
+ this.subscriptions.push(sub);
1681
1672
  _focusMonitor.monitor(_elementRef, true).subscribe(origin => {
1682
1673
  if (this.focused && !origin) {
1683
1674
  this.onTouched();
@@ -1689,22 +1680,15 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1689
1680
  this.ngControl.valueAccessor = this;
1690
1681
  }
1691
1682
  }
1692
- setDescribedByIds(ids) {
1693
- // Just a empty implementation for Mat Form Field Interface
1694
- }
1695
- onContainerClick() {
1696
- // Just a empty implementation for Mat Form Field Interface
1697
- }
1683
+ setDescribedByIds(ids) { }
1684
+ onContainerClick() { }
1698
1685
  async add(event) {
1699
1686
  const value = (event.value || '').trim();
1700
- // Add our tag
1701
- // Validate for single mode
1702
1687
  if (!this.config.isSingle || (this.value.length === 0)) {
1703
1688
  if (value && this.config.isCreateable) {
1704
1689
  const tags = this.allTags;
1705
1690
  let tag = tags.find((item) => item.title.toLowerCase() == value.toLowerCase());
1706
1691
  if (!tag) {
1707
- //No tag present in the list
1708
1692
  try {
1709
1693
  const result = await this.httpService.post(this.config.createApiUrl, {
1710
1694
  title: value,
@@ -1719,14 +1703,12 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1719
1703
  this.allTags.push(tag);
1720
1704
  }
1721
1705
  else {
1722
- //Optionally clean the existing value, to avoid duplicate
1723
1706
  this.remove(tag);
1724
1707
  }
1725
1708
  this.value.push(tag.id);
1726
1709
  this._handleInput();
1727
1710
  }
1728
1711
  }
1729
- // Clear the input value
1730
1712
  event.chipInput.inputElement.value = '';
1731
1713
  this.tagInputCtrl.setValue(null);
1732
1714
  }
@@ -1735,9 +1717,7 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1735
1717
  this._handleInput();
1736
1718
  }
1737
1719
  selected(event) {
1738
- // Validate for single mode
1739
1720
  if (!this.config.isSingle || (this.value.length === 0)) {
1740
- //Clean the existing value, to avoid duplicate
1741
1721
  this.remove({ id: event.option.value });
1742
1722
  this.value.push(event.option.value);
1743
1723
  this._handleInput();
@@ -1770,13 +1750,12 @@ let TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1
1770
1750
  ngOnDestroy() {
1771
1751
  this.stateChanges.complete();
1772
1752
  this._focusMonitor.stopMonitoring(this._elementRef);
1753
+ // Manually unsubscribe from all subscriptions
1754
+ this.subscriptions.forEach(subscription => subscription.unsubscribe());
1773
1755
  }
1774
1756
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TechlifyTaggerTagFormFieldComponent, deps: [{ token: i1$3.FocusMonitor }, { token: i0.ElementRef }, { token: HttpService }, { token: MAT_FORM_FIELD, optional: true }, { token: i1$4.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1775
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TechlifyTaggerTagFormFieldComponent, selector: "app-techlify-tagger-tag-form-field", inputs: { config: "config", modelType: "modelType", modelId: "modelId", allTags: "allTags", categories: "categories", defaultCreateCategory: "defaultCreateCategory", required: "required", disabled: "disabled", value: "value", placeholder: "placeholder" }, providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent_1 }], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-chip-grid #chipGrid aria-label=\"Tag Selection\">\n <mat-chip-row *ngFor=\"let tag of tags\" [editable]=\"config.selectable\" [removable]=\"config.removable\"\n (removed)=\"remove(tag)\">\n {{tag.title}}\n <button matChipRemove *ngIf=\"config.removable\" class=\"border-0\">\n <mat-icon class=\"mat-relative-icon\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n <input placeholder=\"{{config.isCreateable? config.placeholder:''}}\" #tagInput [formControl]=\"tagInputCtrl\"\n [matAutocomplete]=\"auto\" [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeysCodes\" (matChipInputTokenEnd)=\"add($event)\"\n #trigger=\"matAutocompleteTrigger\" (click)=\"trigger.openPanel()\">\n</mat-chip-grid>\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filteredTags\" [value]=\"tag.id\">\n {{tag.title}}\n </mat-option>\n</mat-autocomplete>", styles: [".mat-relative-icon{position:relative;top:-3px;right:7px;font-size:20px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i8$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
1776
- };
1777
- TechlifyTaggerTagFormFieldComponent = TechlifyTaggerTagFormFieldComponent_1 = __decorate([
1778
- UntilDestroy()
1779
- ], TechlifyTaggerTagFormFieldComponent);
1757
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TechlifyTaggerTagFormFieldComponent, selector: "app-techlify-tagger-tag-form-field", inputs: { config: "config", modelType: "modelType", modelId: "modelId", allTags: "allTags", categories: "categories", defaultCreateCategory: "defaultCreateCategory", required: "required", disabled: "disabled", value: "value", placeholder: "placeholder" }, providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<mat-chip-grid #chipGrid aria-label=\"Tag Selection\">\n <mat-chip-row *ngFor=\"let tag of tags\" [editable]=\"config.selectable\" [removable]=\"config.removable\"\n (removed)=\"remove(tag)\">\n {{tag.title}}\n <button matChipRemove *ngIf=\"config.removable\" class=\"border-0\">\n <mat-icon class=\"mat-relative-icon\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n <input placeholder=\"{{config.isCreateable? config.placeholder:''}}\" #tagInput [formControl]=\"tagInputCtrl\"\n [matAutocomplete]=\"auto\" [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeysCodes\" (matChipInputTokenEnd)=\"add($event)\"\n #trigger=\"matAutocompleteTrigger\" (click)=\"trigger.openPanel()\">\n</mat-chip-grid>\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filteredTags\" [value]=\"tag.id\">\n {{tag.title}}\n </mat-option>\n</mat-autocomplete>", styles: [".mat-relative-icon{position:relative;top:-3px;right:7px;font-size:20px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i7$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i8$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i8$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
1758
+ }
1780
1759
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TechlifyTaggerTagFormFieldComponent, decorators: [{
1781
1760
  type: Component,
1782
1761
  args: [{ selector: 'app-techlify-tagger-tag-form-field', providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }], template: "<mat-chip-grid #chipGrid aria-label=\"Tag Selection\">\n <mat-chip-row *ngFor=\"let tag of tags\" [editable]=\"config.selectable\" [removable]=\"config.removable\"\n (removed)=\"remove(tag)\">\n {{tag.title}}\n <button matChipRemove *ngIf=\"config.removable\" class=\"border-0\">\n <mat-icon class=\"mat-relative-icon\">cancel</mat-icon>\n </button>\n </mat-chip-row>\n <input placeholder=\"{{config.isCreateable? config.placeholder:''}}\" #tagInput [formControl]=\"tagInputCtrl\"\n [matAutocomplete]=\"auto\" [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeysCodes\" (matChipInputTokenEnd)=\"add($event)\"\n #trigger=\"matAutocompleteTrigger\" (click)=\"trigger.openPanel()\">\n</mat-chip-grid>\n<mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n <mat-option *ngFor=\"let tag of filteredTags\" [value]=\"tag.id\">\n {{tag.title}}\n </mat-option>\n</mat-autocomplete>", styles: [".mat-relative-icon{position:relative;top:-3px;right:7px;font-size:20px}\n"] }]
@@ -4736,14 +4715,14 @@ let EntityFilesViewAllComponent = class EntityFilesViewAllComponent {
4736
4715
  }
4737
4716
  }
4738
4717
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntityFilesViewAllComponent, deps: [{ token: EntityFileService }, { token: i3.Location }, { token: AlertService }, { token: i1.MatDialog }, { token: i1$4.UntypedFormBuilder }, { token: ErrorHandlerService }, { token: CurrentUserService }], target: i0.ɵɵFactoryTarget.Component });
4739
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EntityFilesViewAllComponent, selector: "app-entity-files-view-all", inputs: { entityId: "entityId", entityType: "entityType", viewOnly: "viewOnly", removeSearch: "removeSearch", hideTitleAndDetails: "hideTitleAndDetails", displayMode: "displayMode", allowMultipleFiles: "allowMultipleFiles", allowBulkUpdate: "allowBulkUpdate", useTechlifyTags: "useTechlifyTags", techlifyTagCategories: "techlifyTagCategories", techlifyTagConfig: "techlifyTagConfig", title: "title", permission: "permission" }, ngImport: i0, template: "<div>\n <div fxLayout=\"column\" [fxHide]=\"!this.documentIds.length\" fxHide.xs fxHide.sm fxHide.lt-md>\n <mat-card class=\"update_card\" *ngIf=\"this.documentIds.length\">\n <mat-card-header>\n <mat-card-title>\n <div mat-dialog-title class=\"mt-2 ml-2 text-center\">\n <div>Update Selected Rows</div>\n </div>\n </mat-card-title>\n </mat-card-header>\n <mat-card-content fxLayout=\"column\">\n <form [formGroup]=\"updateRowForm\">\n <div fxLayout=\"column\">\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"updateRowForm.get('title').value || updateRowForm.get('title').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('title', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('title').value || updateRowForm.get('title').value===0)\n && updateRowForm.get('title').valid\" (click)=\"bulkUpdate('title')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n <button mat-button *ngIf=\"updateRowForm.get('details').value || updateRowForm.get('details').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('details', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('details').value || updateRowForm.get('details').value===0)\n && updateRowForm.get('details').valid\" (click)=\"bulkUpdate('details')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n placeholder=\"Enter new tag\">\n </app-techlify-tagger-tag-form-field>\n <button mat-button *ngIf=\"updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('tag_ids', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0)\n && updateRowForm.get('tag_ids').valid\" (click)=\"bulkUpdate('tag_ids')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n </div>\n\n <div>\n <div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card [fxFlex]=\"this.documentIds.length ? '100%' : '70%'\">\n <mat-card-title>\n <div fxLayout fxLayoutGap=\"1rem\">\n <h3 class=\"font-weight-bold primary-color\" fxLayout=\"center center\">\n <mat-icon>\n <span class=\"material-icons\">\n description\n </span>\n </mat-icon>\n {{title}}s\n </h3>\n <div>\n <button type=\"button\" class=\"mx-1\" mat-raised-button color=\"primary\" (click)=\"addEntityFile()\"\n *ngIf=\"!viewOnly && isShowCreateAction\">\n <mat-icon>\n <span class=\"material-icons\">\n add_circle_outline\n </span>\n </mat-icon>\n {{title}}\n </button>\n </div>\n </div>\n </mat-card-title>\n <mat-card-subtitle>\n <form [formGroup]=\"filterFormGroup\" style=\"font-size: 10px;\" fxLayout fxLayoutGap=\"1rem\">\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Search\" name=\"title\"\n autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button\n (click)=\"resetFieldValue($event, 'title')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field [categories]=\"techlifyTagCategories\" formControlName=\"tag_ids\"\n placeholder=\"Select Tags\" [config]=\"techlifyTagConfig\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n\n\n <button mat-icon-button (click)=\"reload()\" *ngIf=\"isReload\" type=\"button\" matTooltip=\"Refresh\">\n <mat-icon>\n <span class=\"material-icons\">\n refresh\n </span>\n </mat-icon>\n </button>\n </form>\n </mat-card-subtitle>\n <mat-card-content class=\"entity-file-card\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width:30px\">\n <mat-checkbox name=\"employee\" [(ngModel)]=\"isAllSelected\" (change)=\"selectAll()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let element\" style=\"width:30px\">\n <mat-checkbox name=\"employee[{{element?.id}}]\" (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"element.is_selected\" (change)=\"employeeListModified($event, element)\"\n [disabled]=\"!entityFiles.length\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-read-more [text]=\"element.details\" [maxLength]=\"50\"></app-read-more>\n </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Tags Column -->\n <ng-container matColumnDef=\"tag\">\n <th mat-header-cell *matHeaderCellDef> Tag </th>\n <td mat-cell *matCellDef=\"let element\" class=\"p-1\">\n <mat-chip-listbox aria-label=\"Tags\">\n <mat-chip *ngFor=\"let tag of element.tags\">\n {{ tag?.title }}\n </mat-chip>\n </mat-chip-listbox>\n </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button *ngIf=\"isShowUpdateAction\" type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button *ngIf=\"isShowDeleteAction\" type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\" *ngIf=\"!this.documentIds.length\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n </div>\n </div>\n\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "component", type: FileDropperComponent, selector: "app-file-dropper", inputs: ["fileArray", "config", "styles"], outputs: ["fileChanged"] }, { kind: "component", type: DocumentViewerComponent, selector: "app-document-viewer", inputs: ["config", "file", "fileUrl", "disableEdit"], outputs: ["remove"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: i7$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i10$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i10$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i10$1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "directive", type: i10$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i7$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TechlifyTaggerTagFormFieldComponent, selector: "app-techlify-tagger-tag-form-field", inputs: ["config", "modelType", "modelId", "allTags", "categories", "defaultCreateCategory", "required", "disabled", "value", "placeholder"] }, { kind: "component", type: ReadMoreComponent, selector: "app-read-more", inputs: ["text", "maxLength"] }, { kind: "component", type: i24.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] });
4718
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EntityFilesViewAllComponent, selector: "app-entity-files-view-all", inputs: { entityId: "entityId", entityType: "entityType", viewOnly: "viewOnly", removeSearch: "removeSearch", hideTitleAndDetails: "hideTitleAndDetails", displayMode: "displayMode", allowMultipleFiles: "allowMultipleFiles", allowBulkUpdate: "allowBulkUpdate", useTechlifyTags: "useTechlifyTags", techlifyTagCategories: "techlifyTagCategories", techlifyTagConfig: "techlifyTagConfig", title: "title", permission: "permission" }, ngImport: i0, template: "<div>\n <div fxLayout=\"column\" [fxHide]=\"!this.documentIds.length\" fxHide.xs fxHide.sm fxHide.lt-md>\n <mat-card class=\"update_card\" *ngIf=\"this.documentIds.length\">\n <mat-card-header>\n <mat-card-title>\n <div mat-dialog-title class=\"mt-2 ml-2 text-center\">\n <div>Update Selected Rows</div>\n </div>\n </mat-card-title>\n </mat-card-header>\n <mat-card-content fxLayout=\"column\">\n <form [formGroup]=\"updateRowForm\">\n <div fxLayout=\"column\">\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"updateRowForm.get('title').value || updateRowForm.get('title').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('title', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('title').value || updateRowForm.get('title').value===0)\n && updateRowForm.get('title').valid\" (click)=\"bulkUpdate('title')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n <button mat-button *ngIf=\"updateRowForm.get('details').value || updateRowForm.get('details').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('details', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('details').value || updateRowForm.get('details').value===0)\n && updateRowForm.get('details').valid\" (click)=\"bulkUpdate('details')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n placeholder=\"Enter new tag\">\n </app-techlify-tagger-tag-form-field>\n <button mat-button *ngIf=\"updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('tag_ids', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0)\n && updateRowForm.get('tag_ids').valid\" (click)=\"bulkUpdate('tag_ids')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n </div>\n\n <div>\n <div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card [fxFlex]=\"this.documentIds.length ? '100%' : '70%'\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>\n description\n </mat-icon>\n <h3 class=\"font-weight-bold primary-color mb-0\">\n {{title}}s\n </h3>\n <mat-icon\n color=\"primary\"\n class=\"cursor-pointer\"\n *ngIf=\"!viewOnly && isShowCreateAction\"\n (click)=\"addEntityFile()\"\n >\n add\n </mat-icon>\n <div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content>\n <form [formGroup]=\"filterFormGroup\" style=\"font-size: 10px;\" fxLayout fxLayoutGap=\"1rem\">\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Search\" name=\"title\"\n autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button\n (click)=\"resetFieldValue($event, 'title')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field [categories]=\"techlifyTagCategories\" formControlName=\"tag_ids\"\n placeholder=\"Select Tags\" [config]=\"techlifyTagConfig\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n\n\n <button mat-icon-button (click)=\"reload()\" *ngIf=\"isReload\" type=\"button\" matTooltip=\"Refresh\">\n <mat-icon>\n <span class=\"material-icons\">\n refresh\n </span>\n </mat-icon>\n </button>\n </form>\n </mat-card-content>\n <mat-card-content class=\"entity-file-card p-0\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width:30px\">\n <mat-checkbox name=\"employee\" [(ngModel)]=\"isAllSelected\" (change)=\"selectAll()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let element\" style=\"width:30px\">\n <mat-checkbox name=\"employee[{{element?.id}}]\" (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"element.is_selected\" (change)=\"employeeListModified($event, element)\"\n [disabled]=\"!entityFiles.length\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-read-more [text]=\"element.details\" [maxLength]=\"50\"></app-read-more>\n </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Tags Column -->\n <ng-container matColumnDef=\"tag\">\n <th mat-header-cell *matHeaderCellDef> Tag </th>\n <td mat-cell *matCellDef=\"let element\" class=\"p-1\">\n <mat-chip-listbox aria-label=\"Tags\">\n <mat-chip *ngFor=\"let tag of element.tags\">\n {{ tag?.title }}\n </mat-chip>\n </mat-chip-listbox>\n </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button *ngIf=\"isShowUpdateAction\" type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button *ngIf=\"isShowDeleteAction\" type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\" *ngIf=\"!this.documentIds.length\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n </div>\n </div>\n\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n </div>\n</div>\n", styles: ["th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:2px}.entity-file-card{overflow-x:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i7.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "component", type: FileDropperComponent, selector: "app-file-dropper", inputs: ["fileArray", "config", "styles"], outputs: ["fileChanged"] }, { kind: "component", type: DocumentViewerComponent, selector: "app-document-viewer", inputs: ["config", "file", "fileUrl", "disableEdit"], outputs: ["remove"] }, { kind: "directive", type: i4.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: i7$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i10$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i10$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i10$1.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i10$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i7$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i7$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: TechlifyTaggerTagFormFieldComponent, selector: "app-techlify-tagger-tag-form-field", inputs: ["config", "modelType", "modelId", "allTags", "categories", "defaultCreateCategory", "required", "disabled", "value", "placeholder"] }, { kind: "component", type: ReadMoreComponent, selector: "app-read-more", inputs: ["text", "maxLength"] }, { kind: "component", type: i24.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }] });
4740
4719
  };
4741
4720
  EntityFilesViewAllComponent = __decorate([
4742
4721
  UntilDestroy()
4743
4722
  ], EntityFilesViewAllComponent);
4744
4723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntityFilesViewAllComponent, decorators: [{
4745
4724
  type: Component,
4746
- args: [{ selector: 'app-entity-files-view-all', template: "<div>\n <div fxLayout=\"column\" [fxHide]=\"!this.documentIds.length\" fxHide.xs fxHide.sm fxHide.lt-md>\n <mat-card class=\"update_card\" *ngIf=\"this.documentIds.length\">\n <mat-card-header>\n <mat-card-title>\n <div mat-dialog-title class=\"mt-2 ml-2 text-center\">\n <div>Update Selected Rows</div>\n </div>\n </mat-card-title>\n </mat-card-header>\n <mat-card-content fxLayout=\"column\">\n <form [formGroup]=\"updateRowForm\">\n <div fxLayout=\"column\">\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"updateRowForm.get('title').value || updateRowForm.get('title').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('title', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('title').value || updateRowForm.get('title').value===0)\n && updateRowForm.get('title').valid\" (click)=\"bulkUpdate('title')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n <button mat-button *ngIf=\"updateRowForm.get('details').value || updateRowForm.get('details').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('details', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('details').value || updateRowForm.get('details').value===0)\n && updateRowForm.get('details').valid\" (click)=\"bulkUpdate('details')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n placeholder=\"Enter new tag\">\n </app-techlify-tagger-tag-form-field>\n <button mat-button *ngIf=\"updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('tag_ids', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0)\n && updateRowForm.get('tag_ids').valid\" (click)=\"bulkUpdate('tag_ids')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n </div>\n\n <div>\n <div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card [fxFlex]=\"this.documentIds.length ? '100%' : '70%'\">\n <mat-card-title>\n <div fxLayout fxLayoutGap=\"1rem\">\n <h3 class=\"font-weight-bold primary-color\" fxLayout=\"center center\">\n <mat-icon>\n <span class=\"material-icons\">\n description\n </span>\n </mat-icon>\n {{title}}s\n </h3>\n <div>\n <button type=\"button\" class=\"mx-1\" mat-raised-button color=\"primary\" (click)=\"addEntityFile()\"\n *ngIf=\"!viewOnly && isShowCreateAction\">\n <mat-icon>\n <span class=\"material-icons\">\n add_circle_outline\n </span>\n </mat-icon>\n {{title}}\n </button>\n </div>\n </div>\n </mat-card-title>\n <mat-card-subtitle>\n <form [formGroup]=\"filterFormGroup\" style=\"font-size: 10px;\" fxLayout fxLayoutGap=\"1rem\">\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Search\" name=\"title\"\n autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button\n (click)=\"resetFieldValue($event, 'title')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field [categories]=\"techlifyTagCategories\" formControlName=\"tag_ids\"\n placeholder=\"Select Tags\" [config]=\"techlifyTagConfig\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n\n\n <button mat-icon-button (click)=\"reload()\" *ngIf=\"isReload\" type=\"button\" matTooltip=\"Refresh\">\n <mat-icon>\n <span class=\"material-icons\">\n refresh\n </span>\n </mat-icon>\n </button>\n </form>\n </mat-card-subtitle>\n <mat-card-content class=\"entity-file-card\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width:30px\">\n <mat-checkbox name=\"employee\" [(ngModel)]=\"isAllSelected\" (change)=\"selectAll()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let element\" style=\"width:30px\">\n <mat-checkbox name=\"employee[{{element?.id}}]\" (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"element.is_selected\" (change)=\"employeeListModified($event, element)\"\n [disabled]=\"!entityFiles.length\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-read-more [text]=\"element.details\" [maxLength]=\"50\"></app-read-more>\n </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Tags Column -->\n <ng-container matColumnDef=\"tag\">\n <th mat-header-cell *matHeaderCellDef> Tag </th>\n <td mat-cell *matCellDef=\"let element\" class=\"p-1\">\n <mat-chip-listbox aria-label=\"Tags\">\n <mat-chip *ngFor=\"let tag of element.tags\">\n {{ tag?.title }}\n </mat-chip>\n </mat-chip-listbox>\n </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button *ngIf=\"isShowUpdateAction\" type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button *ngIf=\"isShowDeleteAction\" type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\" *ngIf=\"!this.documentIds.length\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n </div>\n </div>\n\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n </div>\n</div>" }]
4725
+ args: [{ selector: 'app-entity-files-view-all', template: "<div>\n <div fxLayout=\"column\" [fxHide]=\"!this.documentIds.length\" fxHide.xs fxHide.sm fxHide.lt-md>\n <mat-card class=\"update_card\" *ngIf=\"this.documentIds.length\">\n <mat-card-header>\n <mat-card-title>\n <div mat-dialog-title class=\"mt-2 ml-2 text-center\">\n <div>Update Selected Rows</div>\n </div>\n </mat-card-title>\n </mat-card-header>\n <mat-card-content fxLayout=\"column\">\n <form [formGroup]=\"updateRowForm\">\n <div fxLayout=\"column\">\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <input matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"updateRowForm.get('title').value || updateRowForm.get('title').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('title', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('title').value || updateRowForm.get('title').value===0)\n && updateRowForm.get('title').valid\" (click)=\"bulkUpdate('title')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field fxFlex=\"100%\" class=\"px-1\">\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n <button mat-button *ngIf=\"updateRowForm.get('details').value || updateRowForm.get('details').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('details', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('details').value || updateRowForm.get('details').value===0)\n && updateRowForm.get('details').valid\" (click)=\"bulkUpdate('details')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n placeholder=\"Enter new tag\">\n </app-techlify-tagger-tag-form-field>\n <button mat-button *ngIf=\"updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0\"\n matSuffix mat-icon-button style=\"color:red\" (click)=\"resetFieldValueOfRow('tag_ids', $event)\">\n <mat-icon>close</mat-icon>\n </button>\n <button mat-button matSuffix mat-icon-button type=\"button\" style=\"color:green\" *ngIf=\"(updateRowForm.get('tag_ids').value || updateRowForm.get('tag_ids').value===0)\n && updateRowForm.get('tag_ids').valid\" (click)=\"bulkUpdate('tag_ids')\">\n <mat-icon>done</mat-icon>\n </button>\n </mat-form-field>\n </ng-container>\n </div>\n </form>\n </mat-card-content>\n </mat-card>\n\n </div>\n\n <div>\n <div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card [fxFlex]=\"this.documentIds.length ? '100%' : '70%'\">\n <mat-card-content>\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <mat-icon>\n description\n </mat-icon>\n <h3 class=\"font-weight-bold primary-color mb-0\">\n {{title}}s\n </h3>\n <mat-icon\n color=\"primary\"\n class=\"cursor-pointer\"\n *ngIf=\"!viewOnly && isShowCreateAction\"\n (click)=\"addEntityFile()\"\n >\n add\n </mat-icon>\n <div>\n </div>\n </div>\n </mat-card-content>\n <mat-card-content>\n <form [formGroup]=\"filterFormGroup\" style=\"font-size: 10px;\" fxLayout fxLayoutGap=\"1rem\">\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Search\" name=\"title\"\n autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button\n (click)=\"resetFieldValue($event, 'title')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field [categories]=\"techlifyTagCategories\" formControlName=\"tag_ids\"\n placeholder=\"Select Tags\" [config]=\"techlifyTagConfig\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n\n\n <button mat-icon-button (click)=\"reload()\" *ngIf=\"isReload\" type=\"button\" matTooltip=\"Refresh\">\n <mat-icon>\n <span class=\"material-icons\">\n refresh\n </span>\n </mat-icon>\n </button>\n </form>\n </mat-card-content>\n <mat-card-content class=\"entity-file-card p-0\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Select Column -->\n <ng-container matColumnDef=\"select\">\n <th mat-header-cell *matHeaderCellDef style=\"width:30px\">\n <mat-checkbox name=\"employee\" [(ngModel)]=\"isAllSelected\" (change)=\"selectAll()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let element\" style=\"width:30px\">\n <mat-checkbox name=\"employee[{{element?.id}}]\" (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"element.is_selected\" (change)=\"employeeListModified($event, element)\"\n [disabled]=\"!entityFiles.length\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-read-more [text]=\"element.details\" [maxLength]=\"50\"></app-read-more>\n </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Tags Column -->\n <ng-container matColumnDef=\"tag\">\n <th mat-header-cell *matHeaderCellDef> Tag </th>\n <td mat-cell *matCellDef=\"let element\" class=\"p-1\">\n <mat-chip-listbox aria-label=\"Tags\">\n <mat-chip *ngFor=\"let tag of element.tags\">\n {{ tag?.title }}\n </mat-chip>\n </mat-chip-listbox>\n </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button *ngIf=\"isShowUpdateAction\" type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button *ngIf=\"isShowDeleteAction\" type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n\n <mat-progress-bar mode=\"indeterminate\" *ngIf=\"isWorking\"></mat-progress-bar>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\" *ngIf=\"!this.documentIds.length\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n </div>\n </div>\n\n <div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n </div>\n</div>\n", styles: ["th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:2px}.entity-file-card{overflow-x:auto}\n"] }]
4747
4726
  }], ctorParameters: function () { return [{ type: EntityFileService }, { type: i3.Location }, { type: AlertService }, { type: i1.MatDialog }, { type: i1$4.UntypedFormBuilder }, { type: ErrorHandlerService }, { type: CurrentUserService }]; }, propDecorators: { entityId: [{
4748
4727
  type: Input
4749
4728
  }], entityType: [{