@c8y/ngx-components 1017.0.145 → 1017.0.147

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.
@@ -427,11 +427,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
427
427
  }], ctorParameters: function () { return [{ type: i2.InventoryService }]; } });
428
428
 
429
429
  class AddGroupComponent {
430
- constructor(fb, addGroupService, alert, subAssetsService) {
430
+ constructor(fb, addGroupService, alert, subAssetsService, permissionsService) {
431
431
  this.fb = fb;
432
432
  this.addGroupService = addGroupService;
433
433
  this.alert = alert;
434
434
  this.subAssetsService = subAssetsService;
435
+ this.permissionsService = permissionsService;
435
436
  this.refresh = new EventEmitter();
436
437
  this.onDeviceQueryStringChange = new EventEmitter();
437
438
  this.onCancel = new EventEmitter();
@@ -464,7 +465,12 @@ class AddGroupComponent {
464
465
  description: ['']
465
466
  });
466
467
  this.subscription = this.onCancel.subscribe(() => this.resetStepper());
467
- this.canCreateGroup = this.subAssetsService.canCreateGroup();
468
+ this.canCreateGroup =
469
+ this.subAssetsService.canCreateGroup() ||
470
+ (await this.permissionsService.canEdit([], { id: this.currentGroupId }, {
471
+ skipOwnerCheck: true,
472
+ skipRolesCheck: true
473
+ }));
468
474
  this.canAssignDevice = await this.subAssetsService.canAssignDevice({
469
475
  id: this.currentGroupId
470
476
  });
@@ -511,12 +517,12 @@ class AddGroupComponent {
511
517
  }
512
518
  }
513
519
  }
514
- AddGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddGroupComponent, deps: [{ token: i1$2.FormBuilder }, { token: AddGroupService }, { token: i1.AlertService }, { token: SubAssetsService }], target: i0.ɵɵFactoryTarget.Component });
520
+ AddGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddGroupComponent, deps: [{ token: i1$2.FormBuilder }, { token: AddGroupService }, { token: i1.AlertService }, { token: SubAssetsService }, { token: i1.Permissions }], target: i0.ɵɵFactoryTarget.Component });
515
521
  AddGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: AddGroupComponent, selector: "c8y-add-group", inputs: { currentGroupId: "currentGroupId", refresh: "refresh" }, outputs: { onDeviceQueryStringChange: "onDeviceQueryStringChange", onCancel: "onCancel" }, host: { listeners: { "document:keydown.enter": "onEnterKeyDown($event)", "document:keydown.escape": "onEscapeKeyDown($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: C8yStepper, descendants: true }, { propertyName: "nameInputRef", first: true, predicate: ["nameRef"], descendants: true }], ngImport: i0, template: "<c8y-title *ngIf=\"!currentGroupId\">\n {{ 'Add group' | translate }}\n</c8y-title>\n\n<div class=\"d-contents\" *ngIf=\"!currentGroupId; else stepper\">\n <ng-container [ngTemplateOutlet]=\"stepper\"></ng-container>\n</div>\n\n<ng-template #stepper>\n <c8y-stepper\n class=\"d-col flex-nowrap no-align-items fit-h c8y-stepper--no-btns\"\n [disableDefaultIcons]=\"{ edit: true, done: false }\"\n [customClasses]=\"['col-md-6', 'col-md-offset-3', 'm-t-24', 'm-b-40', 'p-0', 'flex-no-shrink']\"\n linear\n >\n <cdk-step [stepControl]=\"formGroupStepOne\" [label]=\"'New group' | translate\">\n <div class=\"p-16 p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <div class=\"h4 text-center text-medium\">\n {{ 'New group' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block p-b-0\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <c8y-form-group [novalidation]=\"true\">\n <div [formGroup]=\"formGroupStepOne\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n formControlName=\"name\"\n placeholder=\"{{ 'e.g. First floor' | translate }} \"\n maxlength=\"254\"\n #nameRef\n required\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n type=\"text\"\n formControlName=\"description\"\n placeholder=\"{{ 'e.g. first floor devices' | translate }}\"\n />\n </c8y-form-group>\n </div>\n </c8y-form-group>\n <c8y-form-group>\n <div [formGroup]=\"formGroupStepOne\"></div>\n </c8y-form-group>\n <div class=\"alert alert-info max-width-100\" translate *ngIf=\"!canAssignDevice\">\n You don't have permission to assign devices.\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <c8y-stepper-buttons\n class=\"d-block card-footer p-24 separator\"\n (onCancel)=\"onCancel.emit()\"\n (onCustom)=\"createGroup()\"\n [disabled]=\"!canCreateGroup\"\n [labels]=\"\n canAssignDevice\n ? { next: btnLabels.next, cancel: btnLabels.cancel }\n : { custom: btnLabels.create, cancel: btnLabels.cancel }\n \"\n [showButtons]=\"\n canAssignDevice ? { next: true, cancel: true } : { custom: true, cancel: true }\n \"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step [label]=\"'Assign devices' | translate\">\n <div class=\"p-16 p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <div class=\"h4 text-center text-medium\">\n {{ 'Assign devices' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 no-gutter flex-grow\">\n <c8y-device-grid\n [title]=\"'Select target devices' | translate\"\n [actionControls]=\"[]\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"true\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n c8yProductExperience\n [actionName]=\"'subAssetsAddGroup'\"\n ></c8y-device-grid>\n </div>\n <c8y-stepper-buttons\n class=\"d-block card-footer p-24 separator\"\n (onCancel)=\"onCancel.emit()\"\n (onCustom)=\"createGroup()\"\n [labels]=\"{ custom: btnLabels.create }\"\n [disabled]=\"!canAssignDevice\"\n [pending]=\"pendingStatus\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "component", type: i1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i1.C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: i6.CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "component", type: i1.C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "directive", type: i1.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "actionControls", "selectable", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] });
516
522
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: AddGroupComponent, decorators: [{
517
523
  type: Component,
518
524
  args: [{ selector: 'c8y-add-group', template: "<c8y-title *ngIf=\"!currentGroupId\">\n {{ 'Add group' | translate }}\n</c8y-title>\n\n<div class=\"d-contents\" *ngIf=\"!currentGroupId; else stepper\">\n <ng-container [ngTemplateOutlet]=\"stepper\"></ng-container>\n</div>\n\n<ng-template #stepper>\n <c8y-stepper\n class=\"d-col flex-nowrap no-align-items fit-h c8y-stepper--no-btns\"\n [disableDefaultIcons]=\"{ edit: true, done: false }\"\n [customClasses]=\"['col-md-6', 'col-md-offset-3', 'm-t-24', 'm-b-40', 'p-0', 'flex-no-shrink']\"\n linear\n >\n <cdk-step [stepControl]=\"formGroupStepOne\" [label]=\"'New group' | translate\">\n <div class=\"p-16 p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <div class=\"h4 text-center text-medium\">\n {{ 'New group' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block p-b-0\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <c8y-form-group [novalidation]=\"true\">\n <div [formGroup]=\"formGroupStepOne\">\n <c8y-form-group>\n <label translate>Name</label>\n <input\n class=\"form-control\"\n type=\"text\"\n formControlName=\"name\"\n placeholder=\"{{ 'e.g. First floor' | translate }} \"\n maxlength=\"254\"\n #nameRef\n required\n />\n </c8y-form-group>\n\n <c8y-form-group>\n <label translate>Description</label>\n <input\n class=\"form-control\"\n type=\"text\"\n formControlName=\"description\"\n placeholder=\"{{ 'e.g. first floor devices' | translate }}\"\n />\n </c8y-form-group>\n </div>\n </c8y-form-group>\n <c8y-form-group>\n <div [formGroup]=\"formGroupStepOne\"></div>\n </c8y-form-group>\n <div class=\"alert alert-info max-width-100\" translate *ngIf=\"!canAssignDevice\">\n You don't have permission to assign devices.\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <c8y-stepper-buttons\n class=\"d-block card-footer p-24 separator\"\n (onCancel)=\"onCancel.emit()\"\n (onCustom)=\"createGroup()\"\n [disabled]=\"!canCreateGroup\"\n [labels]=\"\n canAssignDevice\n ? { next: btnLabels.next, cancel: btnLabels.cancel }\n : { custom: btnLabels.create, cancel: btnLabels.cancel }\n \"\n [showButtons]=\"\n canAssignDevice ? { next: true, cancel: true } : { custom: true, cancel: true }\n \"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step [label]=\"'Assign devices' | translate\">\n <div class=\"p-16 p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"row\">\n <div class=\"col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4\">\n <div class=\"h4 text-center text-medium\">\n {{ 'Assign devices' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-xs-12 no-gutter flex-grow\">\n <c8y-device-grid\n [title]=\"'Select target devices' | translate\"\n [actionControls]=\"[]\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"true\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n c8yProductExperience\n [actionName]=\"'subAssetsAddGroup'\"\n ></c8y-device-grid>\n </div>\n <c8y-stepper-buttons\n class=\"d-block card-footer p-24 separator\"\n (onCancel)=\"onCancel.emit()\"\n (onCustom)=\"createGroup()\"\n [labels]=\"{ custom: btnLabels.create }\"\n [disabled]=\"!canAssignDevice\"\n [pending]=\"pendingStatus\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</ng-template>\n" }]
519
- }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: AddGroupService }, { type: i1.AlertService }, { type: SubAssetsService }]; }, propDecorators: { currentGroupId: [{
525
+ }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: AddGroupService }, { type: i1.AlertService }, { type: SubAssetsService }, { type: i1.Permissions }]; }, propDecorators: { currentGroupId: [{
520
526
  type: Input
521
527
  }], refresh: [{
522
528
  type: Input
@@ -1571,10 +1577,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1571
1577
  }], ctorParameters: function () { return [{ type: i1.Permissions }, { type: SubAssetsService }]; } });
1572
1578
 
1573
1579
  class SubAssetsComponent {
1574
- constructor(route, subAssetsService, contextRouteService) {
1580
+ constructor(route, subAssetsService, contextRouteService, permissionsService) {
1575
1581
  this.route = route;
1576
1582
  this.subAssetsService = subAssetsService;
1577
1583
  this.contextRouteService = contextRouteService;
1584
+ this.permissionsService = permissionsService;
1578
1585
  this.toggle = false;
1579
1586
  this.showAddGroup = false;
1580
1587
  this.showAssignDevices = false;
@@ -1601,7 +1608,10 @@ class SubAssetsComponent {
1601
1608
  this.group = { ...contextData };
1602
1609
  this.title = this.group.name;
1603
1610
  this.currentGroupId = this.group.id;
1604
- this.shouldDisableAddGroup = !this.subAssetsService.canCreateGroup();
1611
+ this.shouldDisableAddGroup = !(await this.permissionsService.canEdit([], this.group, {
1612
+ skipOwnerCheck: true,
1613
+ skipRolesCheck: true
1614
+ }));
1605
1615
  this.shouldDisableAssignDevices = !(await this.subAssetsService.canAssignDevice(this.group));
1606
1616
  this.customProperties = await this.subAssetsService.getCustomProperties(this.group);
1607
1617
  this.shouldShowAssetsProperties = this.customProperties.length > 0;
@@ -1622,12 +1632,12 @@ class SubAssetsComponent {
1622
1632
  }
1623
1633
  }
1624
1634
  }
1625
- SubAssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SubAssetsComponent, deps: [{ token: i3$1.ActivatedRoute }, { token: SubAssetsService }, { token: i1.ContextRouteService }], target: i0.ɵɵFactoryTarget.Component });
1635
+ SubAssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SubAssetsComponent, deps: [{ token: i3$1.ActivatedRoute }, { token: SubAssetsService }, { token: i1.ContextRouteService }, { token: i1.Permissions }], target: i0.ɵɵFactoryTarget.Component });
1626
1636
  SubAssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: SubAssetsComponent, selector: "c8y-sub-assets", ngImport: i0, template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n [disabled]=\"shouldDisableAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n [disabled]=\"shouldDisableAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"card content-fullpage\"\n [ngClass]=\"{\n 'card--grid grid__col--8-4--md grid__row--fit-auto': shouldShowAssetsProperties,\n 'd-flex d-col': !shouldShowAssetsProperties\n }\"\n>\n <c8y-group-info\n [group]=\"group\"\n (groupChange)=\"groupChange($event)\"\n class=\"grid__col--fullspan\"\n ></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n [columnsConfigKey]=\"'sub-assets-grid'\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n <div class=\"inner-scroll bg-level-1\" *ngIf=\"shouldShowAssetsProperties\">\n <c8y-asset-properties\n [properties]=\"customProperties\"\n [asset]=\"group\"\n (assetChange)=\"groupChange($event)\"\n class=\"d-contents\"\n ></c8y-asset-properties>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices = $event\"\n (selectedDevice)=\"showChildrenForDevice = $event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n *ngIf=\"showAssignChildDevices\"\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i1.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId"] }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "component", type: AddGroupComponent, selector: "c8y-add-group", inputs: ["currentGroupId", "refresh"], outputs: ["onDeviceQueryStringChange", "onCancel"] }, { kind: "component", type: SubAssetsGridComponent, selector: "c8y-sub-assets-grid", inputs: ["parent-group", "refresh", "title", "emptyStateText", "loadingItemsLabel", "columnsConfigKey", "columns", "pagination", "actionControls", "selectable", "baseQuery", "bulkActionControls", "filterable", "sortable", "displayOptions"], outputs: ["onColumnsChange", "itemsSelect"] }, { kind: "component", type: GroupInfoComponent, selector: "c8y-group-info", inputs: ["group"], outputs: ["groupChange"] }, { kind: "component", type: AssignDevicesComponent, selector: "c8y-assign-devices", inputs: ["currentGroupId", "refresh"], outputs: ["onCancel", "onShowChildDevices", "selectedDevice"] }, { kind: "component", type: AssignChildDevicesComponent, selector: "c8y-assign-child-devices", inputs: ["currentGroupId", "parentDevice", "refresh"], outputs: ["onCancel"] }, { kind: "component", type: AssetPropertiesComponent, selector: "c8y-asset-properties", inputs: ["asset", "properties"], outputs: ["assetChange"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] });
1627
1637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SubAssetsComponent, decorators: [{
1628
1638
  type: Component,
1629
1639
  args: [{ selector: 'c8y-sub-assets', template: "<c8y-title>\n {{ title }}\n</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Add group' | translate }}\"\n (click)=\"showAddGroup = !showAddGroup\"\n [disabled]=\"shouldDisableAddGroup\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span translate>Add group</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"!isSmartGroup()\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Assign devices' | translate }}\"\n (click)=\"showAssignDevices = !showAssignDevices\"\n [disabled]=\"shouldDisableAssignDevices\"\n >\n <i c8yIcon=\"plus-circle\" class=\"m-r-4\"></i>\n <span translate>Assign devices</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"card content-fullpage\"\n [ngClass]=\"{\n 'card--grid grid__col--8-4--md grid__row--fit-auto': shouldShowAssetsProperties,\n 'd-flex d-col': !shouldShowAssetsProperties\n }\"\n>\n <c8y-group-info\n [group]=\"group\"\n (groupChange)=\"groupChange($event)\"\n class=\"grid__col--fullspan\"\n ></c8y-group-info>\n <c8y-sub-assets-grid\n [refresh]=\"refresh\"\n [parent-group]=\"group\"\n [filterable]=\"filterable\"\n [displayOptions]=\"displayOptions\"\n [columnsConfigKey]=\"'sub-assets-grid'\"\n class=\"d-contents\"\n ></c8y-sub-assets-grid>\n <div class=\"inner-scroll bg-level-1\" *ngIf=\"shouldShowAssetsProperties\">\n <c8y-asset-properties\n [properties]=\"customProperties\"\n [asset]=\"group\"\n (assetChange)=\"groupChange($event)\"\n class=\"d-contents\"\n ></c8y-asset-properties>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAddGroup }\">\n <div class=\"bottom-drawer\">\n <c8y-add-group\n [currentGroupId]=\"currentGroupId\"\n [refresh]=\"refresh\"\n (onCancel)=\"showAddGroup = false\"\n *ngIf=\"showAddGroup\"\n ></c8y-add-group>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignDevices }\">\n <div class=\"bottom-drawer\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-devices\n class=\"d-contents\"\n (onCancel)=\"showAssignDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n (onShowChildDevices)=\"showAssignChildDevices = $event\"\n (selectedDevice)=\"showChildrenForDevice = $event\"\n *ngIf=\"showAssignDevices\"\n ></c8y-assign-devices>\n </div>\n </div>\n</div>\n\n<div [ngClass]=\"{ drawerOpen: showAssignChildDevices }\">\n <div class=\"bottom-drawer m-t-40\">\n <div class=\"d-flex d-col no-align-items fit-h\">\n <c8y-assign-child-devices\n *ngIf=\"showAssignChildDevices\"\n class=\"d-contents\"\n (onCancel)=\"showAssignChildDevices = false\"\n [refresh]=\"refresh\"\n [currentGroupId]=\"currentGroupId\"\n [parentDevice]=\"showChildrenForDevice\"\n ></c8y-assign-child-devices>\n </div>\n </div>\n</div>\n" }]
1630
- }], ctorParameters: function () { return [{ type: i3$1.ActivatedRoute }, { type: SubAssetsService }, { type: i1.ContextRouteService }]; } });
1640
+ }], ctorParameters: function () { return [{ type: i3$1.ActivatedRoute }, { type: SubAssetsService }, { type: i1.ContextRouteService }, { type: i1.Permissions }]; } });
1631
1641
 
1632
1642
  class SubAssetsModule {
1633
1643
  }