@juice-js/tenants 1.1.1 → 1.1.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -245,10 +245,11 @@ class TenantsComponent {
245
245
  });
246
246
  let firstLoad = true;
247
247
  this.route.queryParams.subscribe(params => {
248
- console.debug("route.queryParams.subscribe", params);
248
+ console.debug("route.queryParams.subscribe", params, firstLoad);
249
249
  if (firstLoad) {
250
250
  firstLoad = false;
251
251
  this.initFormAndTableEvents();
252
+ return;
252
253
  }
253
254
  var q = params['q'] || "";
254
255
  this.filterText?.setValue(q);
@@ -666,10 +667,10 @@ class TenantsComponent {
666
667
  }
667
668
  }
668
669
  TenantsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TenantsComponent, deps: [{ token: TenantAdminService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i3.Location }, { token: i2.UrlSerializer }, { token: i4.FormBuilder }, { token: i5.MatDialog }, { token: i6.MatSnackBar }, { token: i7.TranslateService }, { token: TenantConfiguration }], target: i0.ɵɵFactoryTarget.Component });
669
- TenantsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TenantsComponent, selector: "juice-tenants", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatMultiSort, descendants: true }], ngImport: i0, template: "<div class=\"mat-elevation-z2 minimum-density\">\n <form [formGroup]=\"form\" class=\"table-form\">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ''}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div style=\"flex: 1 auto; text-align: right;\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n </form>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell{display:flex;justify-content:space-between;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell button{margin-top:6px;height:28px}.actions-cell{display:flex;justify-content:center;align-items:center;padding-top:2px;padding-bottom:2px}.actions-cell button{height:28px}.table-form{display:flex;flex-direction:row;align-items:baseline}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}\n"], dependencies: [{ kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i9.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: i9.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.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: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i15.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i16.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i17.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i17.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i17.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i17.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i17.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i17.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i17.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i17.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i17.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i17.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i18.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: i19.MatMultiSortHeaderComponent, selector: "[mat-multi-sort-header]", inputs: ["mat-multi-sort-header"], exportAs: ["matMultiSortHeader"] }, { kind: "directive", type: i19.MatMultiSort, selector: "[matMultiSort]", exportAs: ["matMultiSort"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }] });
670
+ TenantsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TenantsComponent, selector: "juice-tenants", viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatMultiSort, descendants: true }], ngImport: i0, template: "<div class=\"mat-elevation-z2 minimum-density\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form\">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ''}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell{display:flex;justify-content:space-between;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell button{margin-top:6px;height:28px}.actions-cell{display:flex;justify-content:center;align-items:center;padding-top:2px;padding-bottom:2px}.actions-cell button{height:28px}.table-form{display:flex;flex-direction:row;align-items:baseline}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"], dependencies: [{ kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i9.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: i9.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.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: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i13.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i13.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i13.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i13.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i14.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: i15.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i15.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i16.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i17.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i17.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i17.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i17.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i17.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i17.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i17.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i17.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i17.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i17.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i18.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "component", type: i19.MatMultiSortHeaderComponent, selector: "[mat-multi-sort-header]", inputs: ["mat-multi-sort-header"], exportAs: ["matMultiSortHeader"] }, { kind: "directive", type: i19.MatMultiSort, selector: "[matMultiSort]", exportAs: ["matMultiSort"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }] });
670
671
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TenantsComponent, decorators: [{
671
672
  type: Component,
672
- args: [{ selector: 'juice-tenants', template: "<div class=\"mat-elevation-z2 minimum-density\">\n <form [formGroup]=\"form\" class=\"table-form\">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ''}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div style=\"flex: 1 auto; text-align: right;\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n </form>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell{display:flex;justify-content:space-between;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell button{margin-top:6px;height:28px}.actions-cell{display:flex;justify-content:center;align-items:center;padding-top:2px;padding-bottom:2px}.actions-cell button{height:28px}.table-form{display:flex;flex-direction:row;align-items:baseline}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}\n"] }]
673
+ args: [{ selector: 'juice-tenants', template: "<div class=\"mat-elevation-z2 minimum-density\">\n <div class=\"controls\">\n <form [formGroup]=\"form\" class=\"table-form\">\n <mat-form-field [style.width.px]=\"300\">\n <input matInput type=\"text\" placeholder=\"{{ 'Search' | translate }}\" formControlName=\"filterText\" (keyup.enter)=\"getData()\">\n <button *ngIf=\"filterText?.value\" type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"clearFilterText();\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field [style.width.px]=\"200\">\n <mat-label>{{ 'Statuses' | translate }}</mat-label>\n <mat-select formControlName=\"statuses\" multiple [compareWith]=\"statusCompareFn\" placeholder=\"{{ 'Any status' | translate }}\">\n <mat-select-trigger>\n {{statusOptions[statuses?.value?.[0]||-1] || ''}}\n <span *ngIf=\"(statuses?.value?.length || 0) > 1\" class=\"additional-selection\">\n (+{{(statuses?.value?.length || 0) - 1}} {{statuses?.value?.length === 2 ? 'other' : 'others'}})\n </span>\n </mat-select-trigger>\n <option class=\"clear-statuses\" (click)=\"clearStatuses()\">{{'Any status' | translate}}</option>\n <mat-option *ngFor=\"let s of statusOptions | keyvalue\" [value]=\"s.key\">\n {{s.value}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n \n </form>\n <div class=\"control-buttons\">\n <div class=\"control-buttons-container\">\n <button mat-button (click)=\"rootSettings()\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button type=\"button\" mat-button (click)=\"add()\" color=\"primary\"><mat-icon>add</mat-icon> {{ 'New Organization'}}</button>\n </div>\n <div class=\"spacer\"></div>\n </div>\n </div>\n <table mat-table [dataSource]=\"table.dataSource\" matMultiSort (matSortChange)=\"table.onSortEvent()\">\n \n <!--- Note that these columns can be defined in any order.\n The actual rendered columns are set as a property on the row definition\" -->\n <ng-container matColumnDef=\"identifier\">\n <th mat-header-cell *matHeaderCellDef mat-multi-sort-header=\"identifier\" disableClear=\"true\"> {{ 'Identifier' | translate }} </th>\n <td class=\"button-cell\" mat-cell *matCellDef=\"let row\"> {{row.identifier}} \n <button mat-icon-button [cdkCopyToClipboard]=\"row.identifier\" \n [attr.aria-label]=\"'Copy' | translate\">\n <mat-icon>content_copy</mat-icon>\n </button>\n </td>\n </ng-container>\n <ng-container matColumnDef=\"name\">\n <th mat-header-cell *matHeaderCellDef > {{'Name'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\"> \n {{row.name}}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef > {{'Status'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" [class]=\"statusHelper.getColor(row.status)\"> \n {{row.status}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"> {{'Actions'|translate}} </th>\n <td mat-cell *matCellDef=\"let row\" > \n <div class=\"actions-cell\">\n <button mat-button (click)=\"settings(row.id)\">\n <mat-icon>settings</mat-icon>{{'Settings' | translate}}\n </button>\n <button mat-button (click)=\"detail(row.id)\">\n <mat-icon>info</mat-icon>{{'Detail' | translate}}\n </button>\n <button mat-button (click)=\"edit(row.id)\">\n <mat-icon>edit</mat-icon>{{'Edit' | translate}}\n </button>\n \n <button mat-icon-button [matMenuTriggerFor]=\"appMenu\" [matMenuTriggerData]=\"{id: row.id, status: row.status}\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n <mat-paginator [pageSize]=\"table.pageSize\" [pageIndex]=\"table.pageIndex\" \n [pageSizeOptions]=\"table.pageSizeOptions\"\n [length]=\"table.totalElements ? table.totalElements : 0\" \n (page)=\"table.onPaginationEvent($event)\"\n aria-label=\"Items per page\"\n showFirstLastButtons>\n </mat-paginator>\n\n</div>\n<mat-menu #appMenu=\"matMenu\" class=\"minimum-density\">\n <ng-template matMenuContent let-id=\"id\" let-status=\"status\">\n <button *ngIf=\"canApproval(status)\" class=\"color-success\" mat-menu-item (click)=\"approve(id)\">\n <mat-icon>check_circle_outline</mat-icon>{{'Approve' | translate}}\n </button>\n <button *ngIf=\"canApproval(status)\" class=\"color-warn\" mat-menu-item (click)=\"reject(id)\">\n <mat-icon>highlight_off</mat-icon>{{'Reject' | translate}}\n </button>\n <button *ngIf=\"canActivate(status)\" class=\"color-success\" mat-menu-item (click)=\"activate(id)\">\n <mat-icon>present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canReactivate(status)\" class=\"color-success\" mat-menu-item (click)=\"reactivate(id)\">\n <mat-icon >present_to_all</mat-icon>{{'Activate' | translate}}\n </button>\n <button *ngIf=\"canDeactivate(status)\" class=\"color-warn\" mat-menu-item (click)=\"deactivate(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Deactivate' | translate}}\n </button>\n <button *ngIf=\"canSuspend(status)\" class=\"color-warn\" mat-menu-item (click)=\"suspend(id)\">\n <mat-icon >cancel_presentation</mat-icon>{{'Suspend' | translate}}\n </button>\n <button [disabled]=\"!canAbandon(status)\" mat-menu-item (click)=\"abandon(id)\" class=\"color-warn\">\n <mat-icon >delete</mat-icon>{{'Abandon' | translate}}\n </button>\n <button *ngIf=\"canDelete(status)\" class=\"color-warn\" mat-menu-item (click)=\"delete(id)\">\n <mat-icon >delete</mat-icon>{{'Delete' | translate}}\n </button>\n </ng-template>\n</mat-menu>", styles: [":host{display:block}mat-form-field{width:100%}.mat-mdc-button-base{margin:0 8px 8px 0}.additional-selection{opacity:.75;font-size:.75em;line-height:0}.clear-statuses{padding:10px;cursor:pointer}.button-cell{display:flex;justify-content:space-between;align-items:center;padding-top:2px;padding-bottom:2px}.button-cell button{margin-top:6px;height:28px}.actions-cell{display:flex;justify-content:center;align-items:center;padding-top:2px;padding-bottom:2px}.actions-cell button{height:28px}.table-form{display:flex;flex-direction:row;align-items:baseline}.table-form mat-card-actions{flex:1 1 auto}.mat-mdc-menu-item{min-height:38px}.controls{display:flex}.controls .control-buttons{flex:1;display:flex;flex-direction:column}.controls .control-buttons .control-buttons-container{flex:1;display:flex;align-items:center;justify-content:flex-end}.controls .spacer{height:22px}\n"] }]
673
674
  }], ctorParameters: function () { return [{ type: TenantAdminService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3.Location }, { type: i2.UrlSerializer }, { type: i4.FormBuilder }, { type: i5.MatDialog }, { type: i6.MatSnackBar }, { type: i7.TranslateService }, { type: TenantConfiguration }]; }, propDecorators: { paginator: [{
674
675
  type: ViewChild,
675
676
  args: [MatPaginator]