@c8y/ngx-components 1018.503.23 → 1018.503.37

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.
Files changed (84) hide show
  1. package/api/services.d.ts +1 -1
  2. package/core/forms/validation-pattern.d.ts +4 -0
  3. package/device-grid/device-grid.component.d.ts +7 -2
  4. package/esm2020/api/services.mjs +2 -2
  5. package/esm2020/child-devices/child-devices.component.mjs +1 -1
  6. package/esm2020/core/bootstrap/bootstrap.component.mjs +3 -3
  7. package/esm2020/core/dynamic-forms/json-schema/c8y-json-schema.service.mjs +8 -2
  8. package/esm2020/core/forms/validation-pattern.mjs +5 -1
  9. package/esm2020/device-grid/device-grid-extension.service.mjs +13 -8
  10. package/esm2020/device-grid/device-grid.component.mjs +30 -15
  11. package/esm2020/device-list/device-list.component.mjs +1 -1
  12. package/esm2020/operations/device-selector/device-selector.component.mjs +1 -1
  13. package/esm2020/replace-device-wizard/replace-device-wizard.component.mjs +2 -2
  14. package/esm2020/sub-assets/add-group/add-group.component.mjs +4 -3
  15. package/esm2020/sub-assets/asset-properties-item.component.mjs +7 -3
  16. package/esm2020/sub-assets/asset-properties.component.mjs +25 -10
  17. package/esm2020/sub-assets/assign-devices/assign-devices.component.mjs +4 -3
  18. package/esm2020/sub-assets/location/asset-location.component.mjs +5 -3
  19. package/esm2020/trusted-certificates/crl/crl-check-settings.component.mjs +39 -0
  20. package/esm2020/trusted-certificates/crl/crl-settings.component.mjs +109 -0
  21. package/esm2020/trusted-certificates/crl/crl-settings.module.mjs +46 -0
  22. package/esm2020/trusted-certificates/factories/tabs.factory.mjs +36 -0
  23. package/esm2020/trusted-certificates/factories/trusted-certificates-navigation.factory.mjs +26 -0
  24. package/esm2020/trusted-certificates/index.mjs +4 -4
  25. package/esm2020/trusted-certificates/{add-trusted-certificate.component.mjs → list/add-trusted-certificate.component.mjs} +1 -1
  26. package/esm2020/trusted-certificates/list/trusted-certificate-list.component.mjs +184 -0
  27. package/esm2020/trusted-certificates/list/trusted-certificate-list.module.mjs +54 -0
  28. package/esm2020/trusted-certificates/list/trusted-certificate.model.mjs +36 -0
  29. package/esm2020/trusted-certificates/trusted-certificates.module.mjs +24 -35
  30. package/fesm2015/c8y-ngx-components-api.mjs +3 -2
  31. package/fesm2015/c8y-ngx-components-api.mjs.map +1 -1
  32. package/fesm2015/c8y-ngx-components-child-devices.mjs +1 -1
  33. package/fesm2015/c8y-ngx-components-child-devices.mjs.map +1 -1
  34. package/fesm2015/c8y-ngx-components-device-grid.mjs +41 -21
  35. package/fesm2015/c8y-ngx-components-device-grid.mjs.map +1 -1
  36. package/fesm2015/c8y-ngx-components-device-list.mjs +1 -1
  37. package/fesm2015/c8y-ngx-components-device-list.mjs.map +1 -1
  38. package/fesm2015/c8y-ngx-components-operations-device-selector.mjs +1 -1
  39. package/fesm2015/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
  40. package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs +1 -1
  41. package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
  42. package/fesm2015/c8y-ngx-components-sub-assets.mjs +39 -18
  43. package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
  44. package/fesm2015/c8y-ngx-components-trusted-certificates.mjs +329 -86
  45. package/fesm2015/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  46. package/fesm2015/c8y-ngx-components.mjs +10 -3
  47. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  48. package/fesm2020/c8y-ngx-components-api.mjs +3 -2
  49. package/fesm2020/c8y-ngx-components-api.mjs.map +1 -1
  50. package/fesm2020/c8y-ngx-components-child-devices.mjs +1 -1
  51. package/fesm2020/c8y-ngx-components-child-devices.mjs.map +1 -1
  52. package/fesm2020/c8y-ngx-components-device-grid.mjs +41 -21
  53. package/fesm2020/c8y-ngx-components-device-grid.mjs.map +1 -1
  54. package/fesm2020/c8y-ngx-components-device-list.mjs +1 -1
  55. package/fesm2020/c8y-ngx-components-device-list.mjs.map +1 -1
  56. package/fesm2020/c8y-ngx-components-operations-device-selector.mjs +1 -1
  57. package/fesm2020/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
  58. package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs +1 -1
  59. package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
  60. package/fesm2020/c8y-ngx-components-sub-assets.mjs +38 -17
  61. package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
  62. package/fesm2020/c8y-ngx-components-trusted-certificates.mjs +314 -85
  63. package/fesm2020/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  64. package/fesm2020/c8y-ngx-components.mjs +13 -3
  65. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  66. package/locales/locales.pot +48 -0
  67. package/package.json +1 -1
  68. package/sub-assets/add-group/add-group.component.d.ts +2 -1
  69. package/sub-assets/asset-properties.component.d.ts +6 -0
  70. package/sub-assets/assign-devices/assign-devices.component.d.ts +2 -1
  71. package/trusted-certificates/crl/crl-check-settings.component.d.ts +18 -0
  72. package/trusted-certificates/crl/crl-settings.component.d.ts +28 -0
  73. package/trusted-certificates/crl/crl-settings.module.d.ts +13 -0
  74. package/trusted-certificates/factories/tabs.factory.d.ts +10 -0
  75. package/trusted-certificates/index.d.ts +3 -3
  76. package/trusted-certificates/{trusted-certificates.component.d.ts → list/trusted-certificate-list.component.d.ts} +4 -4
  77. package/trusted-certificates/list/trusted-certificate-list.module.d.ts +15 -0
  78. package/trusted-certificates/trusted-certificates.module.d.ts +4 -10
  79. package/esm2020/trusted-certificates/trusted-certificate.model.mjs +0 -36
  80. package/esm2020/trusted-certificates/trusted-certificates-navigation.factory.mjs +0 -26
  81. package/esm2020/trusted-certificates/trusted-certificates.component.mjs +0 -184
  82. /package/trusted-certificates/{trusted-certificates-navigation.factory.d.ts → factories/trusted-certificates-navigation.factory.d.ts} +0 -0
  83. /package/trusted-certificates/{add-trusted-certificate.component.d.ts → list/add-trusted-certificate.component.d.ts} +0 -0
  84. /package/trusted-certificates/{trusted-certificate.model.d.ts → list/trusted-certificate.model.d.ts} +0 -0
@@ -11,7 +11,7 @@ import * as i4 from '@c8y/ngx-components/assets-navigator';
11
11
  import * as i1 from '@ngx-translate/core';
12
12
  import * as i3$1 from '@angular/common';
13
13
  import * as i6 from '@angular/cdk/stepper';
14
- import { clone, cloneDeep, pick } from 'lodash-es';
14
+ import { clone, sortBy, isNumber, toPairs, fromPairs, cloneDeep, pick } from 'lodash-es';
15
15
  import * as i3$2 from '@ngx-formly/core';
16
16
  import * as i4$1 from 'ngx-bootstrap/tooltip';
17
17
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
@@ -498,6 +498,7 @@ class AddGroupComponent {
498
498
  this.canCreateGroup = false;
499
499
  this.canAssignDevice = false;
500
500
  this.PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE;
501
+ this.builtInActionsToHide = ["DELETE" /* BuiltInActionType.Delete */];
501
502
  this.ITEMS_SELECT_LIMIT = 15;
502
503
  this.btnLabels = {
503
504
  next: gettext('Next'),
@@ -582,10 +583,10 @@ class AddGroupComponent {
582
583
  }
583
584
  }
584
585
  AddGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddGroupComponent, deps: [{ token: i1$1.FormBuilder }, { token: AddGroupService }, { token: i3.AlertService }, { token: SubAssetsService }, { token: i3.GainsightService }, { token: i3.Permissions }], target: i0.ɵɵFactoryTarget.Component });
585
- AddGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: AddGroupComponent, selector: "c8y-add-group", inputs: { currentGroupId: "currentGroupId", refresh: "refresh" }, outputs: { onDeviceQueryStringChange: "onDeviceQueryStringChange", onCancel: "onCancel" }, host: { listeners: { "document:keydown.enter": "onEnterKeyDown($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: C8yStepper, descendants: true }, { propertyName: "nameInputRef", first: true, predicate: ["nameRef"], descendants: true }], ngImport: i0, template: "<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 c8yProductExperience\n inherit\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i3.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: i3.C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
586
+ AddGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: AddGroupComponent, selector: "c8y-add-group", inputs: { currentGroupId: "currentGroupId", refresh: "refresh" }, outputs: { onDeviceQueryStringChange: "onDeviceQueryStringChange", onCancel: "onCancel" }, host: { listeners: { "document:keydown.enter": "onEnterKeyDown($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: C8yStepper, descendants: true }, { propertyName: "nameInputRef", first: true, predicate: ["nameRef"], descendants: true }], ngImport: i0, template: "<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 c8yProductExperience\n inherit\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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 [builtInActionsToHide]=\"builtInActionsToHide\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"true\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i3.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: i3.C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "builtInActionsToHide", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
586
587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddGroupComponent, decorators: [{
587
588
  type: Component,
588
- args: [{ selector: 'c8y-add-group', template: "<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 c8yProductExperience\n inherit\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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" }]
589
+ args: [{ selector: 'c8y-add-group', template: "<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 c8yProductExperience\n inherit\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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 [builtInActionsToHide]=\"builtInActionsToHide\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"true\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ADD_GROUP.COMPONENTS.ADD_GROUP }\"\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" }]
589
590
  }], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: AddGroupService }, { type: i3.AlertService }, { type: SubAssetsService }, { type: i3.GainsightService }, { type: i3.Permissions }]; }, propDecorators: { currentGroupId: [{
590
591
  type: Input
591
592
  }], refresh: [{
@@ -664,7 +665,7 @@ class AssetPropertiesItemComponent {
664
665
  if (complexObj.file) {
665
666
  complexProps[complexObj.key] = complexObj.value;
666
667
  }
667
- else if (this.value[complexObj.key] != null) {
668
+ else {
668
669
  complexProps[complexObj.key] = this.value[complexObj.key];
669
670
  }
670
671
  });
@@ -683,6 +684,10 @@ class AssetPropertiesItemComponent {
683
684
  resolveJsonSchema() {
684
685
  if (this.jsonSchema) {
685
686
  const fieldConfig = this.c8yJsonSchemaService.toFieldConfig(this.jsonSchema, this.jsonSchema);
687
+ if (this.complex && this.complex.length > 0) {
688
+ const orderedFieldConfig = sortBy(fieldConfig.fieldGroup[0].fieldGroup, 'order');
689
+ fieldConfig.fieldGroup[0].fieldGroup = orderedFieldConfig;
690
+ }
686
691
  this.form = new FormGroup({});
687
692
  this.fields = [fieldConfig];
688
693
  this.model = this.getModel();
@@ -898,9 +903,10 @@ class AssetLocationComponent {
898
903
  * @param longitude Longitude of the marker
899
904
  */
900
905
  setView(latitude, longitude) {
901
- if (latitude && longitude && this.mapView) {
906
+ if (isNumber(latitude) && isNumber(longitude) && this.mapView) {
902
907
  [latitude, longitude] = this.setLatLngValues(latitude, longitude);
903
- this.mapView.map?.setView([latitude, longitude]);
908
+ this.config.center = [latitude, longitude];
909
+ this.mapView.center();
904
910
  }
905
911
  }
906
912
  setLatLngValues(latitude, longitude) {
@@ -976,6 +982,16 @@ class AssetPropertiesComponent {
976
982
  const property = Object.keys(schemaProperties || {})[0];
977
983
  delete (mo?.c8y_JsonSchema?.properties[property] || {}).title;
978
984
  }
985
+ /**
986
+ * This method is used to order the complex properties in the order specified by the user in asset properties screen.
987
+ * @param mo - Managed object of the complex property associated with the asset.
988
+ */
989
+ orderComplexProperties(mo) {
990
+ const complexProperties = mo.c8y_JsonSchema.properties[mo.name]?.['properties'];
991
+ const keyValuesArray = toPairs(complexProperties);
992
+ const orderedProperties = sortBy(keyValuesArray, ([, value]) => value.order);
993
+ mo.c8y_JsonSchema.properties[mo.name]['properties'] = fromPairs(orderedProperties);
994
+ }
979
995
  async parseItem(mo, properties, asset) {
980
996
  if (!asset) {
981
997
  return [];
@@ -1000,6 +1016,7 @@ class AssetPropertiesComponent {
1000
1016
  if (type === 'object') {
1001
1017
  // remove title to avoid excessive property name on asset complex properties form
1002
1018
  this.deleteTitleFromMOJsonSchema(mo);
1019
+ this.orderComplexProperties(mo);
1003
1020
  if (!value) {
1004
1021
  value = {};
1005
1022
  for (const prop in properties[key].properties) {
@@ -1038,16 +1055,12 @@ class AssetPropertiesComponent {
1038
1055
  async save(propertyValue, prop) {
1039
1056
  try {
1040
1057
  if (prop.type === 'object') {
1041
- propertyValue[prop.key] = await this.uploadFiles(propertyValue[prop.key], prop.value);
1058
+ this.updateUndefinedToNull(propertyValue[prop.key]);
1042
1059
  }
1043
1060
  else {
1044
- for (const [key, value] of Object.entries(propertyValue)) {
1045
- if (value === undefined) {
1046
- propertyValue[key] = null;
1047
- }
1048
- }
1049
- propertyValue = await this.uploadFiles(propertyValue, prop.value);
1061
+ this.updateUndefinedToNull(propertyValue);
1050
1062
  }
1063
+ propertyValue = await this.uploadFiles(propertyValue, prop.value);
1051
1064
  // Avoid making a PUT request containing just the id, as response body might be incomplete
1052
1065
  const hasValues = Object.values(propertyValue).some(value => value !== undefined);
1053
1066
  if (!hasValues) {
@@ -1067,6 +1080,13 @@ class AssetPropertiesComponent {
1067
1080
  this.toggleEdit(prop);
1068
1081
  }
1069
1082
  }
1083
+ updateUndefinedToNull(propertyValue) {
1084
+ for (const [key, value] of Object.entries(propertyValue)) {
1085
+ if (value === undefined) {
1086
+ propertyValue[key] = null;
1087
+ }
1088
+ }
1089
+ }
1070
1090
  keepOrder(correctOrderedIds, properties) {
1071
1091
  const orderedProperties = correctOrderedIds.map(({ id }) => {
1072
1092
  const foundProperty = properties.find(property => property.id === id);
@@ -1117,10 +1137,10 @@ class AssetPropertiesComponent {
1117
1137
  }
1118
1138
  }
1119
1139
  AssetPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AssetPropertiesComponent, deps: [{ token: i3.AssetTypesService }, { token: i2.InventoryService }, { token: i2.InventoryBinaryService }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Component });
1120
- AssetPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: AssetPropertiesComponent, selector: "c8y-asset-properties", inputs: { asset: "asset", properties: "properties" }, outputs: { assetChange: "assetChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div class=\"card-header bg-inherit separator sticky-top\">\n <h1\n class=\"card-title p-t-4 p-b-4\"\n ngNonBindable\n translate\n [translateParams]=\"{ label: assetType?.label || '' | translate }\"\n >\n {{ label }} properties\n </h1>\n </div>\n <div class=\"card-block\">\n <div\n class=\"text-center\"\n *ngIf=\"isLoading\"\n >\n <c8y-loading></c8y-loading>\n </div>\n\n <ng-container *ngIf=\"!isLoading\">\n <div\n class=\"card m-b-8\"\n title=\"{{ prop.description | translate }}\"\n *ngFor=\"let prop of customProperties\"\n [ngClass]=\"{ 'card-highlight': prop.isEdit }\"\n >\n <div\n class=\"card-block\"\n [ngClass]=\"{ 'p-b-0': prop.isEdit }\"\n >\n <div\n class=\"d-flex p-b-8 a-i-center\"\n *ngIf=\"!prop.isEdit\"\n >\n <p\n class=\"text-medium text-truncate\"\n title=\"{{ prop?.label | translate }}\"\n >\n {{ prop?.label | translate }}\n </p>\n <button\n class=\"btn btn-dot m-l-auto text-12\"\n [attr.aria-label]=\"'Edit' | translate\"\n tooltip=\"{{ 'Edit' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleEdit(prop)\"\n >\n <i c8yIcon=\"pencil\"></i>\n </button>\n </div>\n <c8y-asset-properties-item\n #assetProps\n [file]=\"prop.file\"\n [key]=\"prop.key\"\n [type]=\"prop.type\"\n [value]=\"prop.value\"\n [complex]=\"prop.complex\"\n [isEdit]=\"prop.isEdit\"\n [jsonSchema]=\"prop.jsonSchema\"\n ></c8y-asset-properties-item>\n <div *ngIf=\"prop.key === 'c8y_Position'\">\n <c8y-asset-location\n [locationMO]=\"asset\"\n [isEdit]=\"prop.isEdit\"\n [form]=\"assetProps.form\"\n ></c8y-asset-location>\n </div>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"prop.isEdit\"\n >\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"toggleEdit(prop)\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"!assetProps?.form?.valid\"\n (click)=\"save(assetProps.form.value, prop)\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.LoadingComponent, selector: "c8y-loading" }, { kind: "directive", type: i4$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: AssetPropertiesItemComponent, selector: "c8y-asset-properties-item", inputs: ["key", "value", "label", "type", "file", "complex", "isEdit", "jsonSchema"] }, { kind: "component", type: AssetLocationComponent, selector: "c8y-asset-location", inputs: ["isEdit", "locationMO", "form"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
1140
+ AssetPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: AssetPropertiesComponent, selector: "c8y-asset-properties", inputs: { asset: "asset", properties: "properties" }, outputs: { assetChange: "assetChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div class=\"card-header bg-inherit separator sticky-top\">\n <h1\n class=\"card-title p-t-4 p-b-4\"\n ngNonBindable\n translate\n [translateParams]=\"{ label: assetType?.label || '' | translate }\"\n >\n {{ label }} properties\n </h1>\n </div>\n <div class=\"card-block\">\n <div\n class=\"text-center\"\n *ngIf=\"isLoading\"\n >\n <c8y-loading></c8y-loading>\n </div>\n\n <ng-container *ngIf=\"!isLoading\">\n <div\n class=\"card m-b-8\"\n title=\"{{ prop.description | translate }}\"\n *ngFor=\"let prop of customProperties\"\n [ngClass]=\"{ 'card-highlight': prop.isEdit }\"\n >\n <div\n class=\"card-block\"\n [ngClass]=\"{ 'p-b-0': prop.isEdit }\"\n >\n <div\n class=\"d-flex p-b-8 a-i-center\"\n *ngIf=\"!prop.isEdit\"\n >\n <p\n class=\"text-medium text-truncate\"\n title=\"{{ prop?.label | translate }}\"\n >\n {{ prop?.label | translate }}\n </p>\n <button\n class=\"btn btn-dot m-l-auto text-12\"\n [attr.aria-label]=\"'Edit' | translate\"\n tooltip=\"{{ 'Edit' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleEdit(prop)\"\n >\n <i c8yIcon=\"pencil\"></i>\n </button>\n </div>\n <c8y-asset-properties-item\n #assetProps\n [file]=\"prop.file\"\n [key]=\"prop.key\"\n [type]=\"prop.type\"\n [value]=\"prop.value\"\n [complex]=\"prop.complex\"\n [isEdit]=\"prop.isEdit\"\n [jsonSchema]=\"prop.jsonSchema\"\n ></c8y-asset-properties-item>\n <div *ngIf=\"prop.key === 'c8y_Position'\">\n <c8y-asset-location\n [locationMO]=\"asset\"\n [isEdit]=\"prop.isEdit\"\n [form]=\"assetProps.form\"\n ></c8y-asset-location>\n </div>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"prop.isEdit\"\n >\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"toggleEdit(prop)\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"!assetProps?.form?.valid || !assetProps?.form?.dirty \"\n (click)=\"save(assetProps.form.value, prop)\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.LoadingComponent, selector: "c8y-loading" }, { kind: "directive", type: i4$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: AssetPropertiesItemComponent, selector: "c8y-asset-properties-item", inputs: ["key", "value", "label", "type", "file", "complex", "isEdit", "jsonSchema"] }, { kind: "component", type: AssetLocationComponent, selector: "c8y-asset-location", inputs: ["isEdit", "locationMO", "form"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
1121
1141
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AssetPropertiesComponent, decorators: [{
1122
1142
  type: Component,
1123
- args: [{ selector: 'c8y-asset-properties', template: "<ng-container>\n <div class=\"card-header bg-inherit separator sticky-top\">\n <h1\n class=\"card-title p-t-4 p-b-4\"\n ngNonBindable\n translate\n [translateParams]=\"{ label: assetType?.label || '' | translate }\"\n >\n {{ label }} properties\n </h1>\n </div>\n <div class=\"card-block\">\n <div\n class=\"text-center\"\n *ngIf=\"isLoading\"\n >\n <c8y-loading></c8y-loading>\n </div>\n\n <ng-container *ngIf=\"!isLoading\">\n <div\n class=\"card m-b-8\"\n title=\"{{ prop.description | translate }}\"\n *ngFor=\"let prop of customProperties\"\n [ngClass]=\"{ 'card-highlight': prop.isEdit }\"\n >\n <div\n class=\"card-block\"\n [ngClass]=\"{ 'p-b-0': prop.isEdit }\"\n >\n <div\n class=\"d-flex p-b-8 a-i-center\"\n *ngIf=\"!prop.isEdit\"\n >\n <p\n class=\"text-medium text-truncate\"\n title=\"{{ prop?.label | translate }}\"\n >\n {{ prop?.label | translate }}\n </p>\n <button\n class=\"btn btn-dot m-l-auto text-12\"\n [attr.aria-label]=\"'Edit' | translate\"\n tooltip=\"{{ 'Edit' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleEdit(prop)\"\n >\n <i c8yIcon=\"pencil\"></i>\n </button>\n </div>\n <c8y-asset-properties-item\n #assetProps\n [file]=\"prop.file\"\n [key]=\"prop.key\"\n [type]=\"prop.type\"\n [value]=\"prop.value\"\n [complex]=\"prop.complex\"\n [isEdit]=\"prop.isEdit\"\n [jsonSchema]=\"prop.jsonSchema\"\n ></c8y-asset-properties-item>\n <div *ngIf=\"prop.key === 'c8y_Position'\">\n <c8y-asset-location\n [locationMO]=\"asset\"\n [isEdit]=\"prop.isEdit\"\n [form]=\"assetProps.form\"\n ></c8y-asset-location>\n </div>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"prop.isEdit\"\n >\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"toggleEdit(prop)\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"!assetProps?.form?.valid\"\n (click)=\"save(assetProps.form.value, prop)\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n</ng-container>\n" }]
1143
+ args: [{ selector: 'c8y-asset-properties', template: "<ng-container>\n <div class=\"card-header bg-inherit separator sticky-top\">\n <h1\n class=\"card-title p-t-4 p-b-4\"\n ngNonBindable\n translate\n [translateParams]=\"{ label: assetType?.label || '' | translate }\"\n >\n {{ label }} properties\n </h1>\n </div>\n <div class=\"card-block\">\n <div\n class=\"text-center\"\n *ngIf=\"isLoading\"\n >\n <c8y-loading></c8y-loading>\n </div>\n\n <ng-container *ngIf=\"!isLoading\">\n <div\n class=\"card m-b-8\"\n title=\"{{ prop.description | translate }}\"\n *ngFor=\"let prop of customProperties\"\n [ngClass]=\"{ 'card-highlight': prop.isEdit }\"\n >\n <div\n class=\"card-block\"\n [ngClass]=\"{ 'p-b-0': prop.isEdit }\"\n >\n <div\n class=\"d-flex p-b-8 a-i-center\"\n *ngIf=\"!prop.isEdit\"\n >\n <p\n class=\"text-medium text-truncate\"\n title=\"{{ prop?.label | translate }}\"\n >\n {{ prop?.label | translate }}\n </p>\n <button\n class=\"btn btn-dot m-l-auto text-12\"\n [attr.aria-label]=\"'Edit' | translate\"\n tooltip=\"{{ 'Edit' | translate }}\"\n type=\"button\"\n [delay]=\"500\"\n (click)=\"toggleEdit(prop)\"\n >\n <i c8yIcon=\"pencil\"></i>\n </button>\n </div>\n <c8y-asset-properties-item\n #assetProps\n [file]=\"prop.file\"\n [key]=\"prop.key\"\n [type]=\"prop.type\"\n [value]=\"prop.value\"\n [complex]=\"prop.complex\"\n [isEdit]=\"prop.isEdit\"\n [jsonSchema]=\"prop.jsonSchema\"\n ></c8y-asset-properties-item>\n <div *ngIf=\"prop.key === 'c8y_Position'\">\n <c8y-asset-location\n [locationMO]=\"asset\"\n [isEdit]=\"prop.isEdit\"\n [form]=\"assetProps.form\"\n ></c8y-asset-location>\n </div>\n </div>\n <div\n class=\"card-footer p-t-0\"\n *ngIf=\"prop.isEdit\"\n >\n <button\n class=\"btn btn-default btn-sm\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"toggleEdit(prop)\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Save' | translate }}\"\n type=\"button\"\n [disabled]=\"!assetProps?.form?.valid || !assetProps?.form?.dirty \"\n (click)=\"save(assetProps.form.value, prop)\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n</ng-container>\n" }]
1124
1144
  }], ctorParameters: function () { return [{ type: i3.AssetTypesService }, { type: i2.InventoryService }, { type: i2.InventoryBinaryService }, { type: i3.AlertService }]; }, propDecorators: { asset: [{
1125
1145
  type: Input
1126
1146
  }], assetChange: [{
@@ -1701,6 +1721,7 @@ class AssignDevicesComponent {
1701
1721
  this.actionControls = [];
1702
1722
  this.headerActionControls = [];
1703
1723
  this.showChildren = false;
1724
+ this.builtInActionsToHide = ["DELETE" /* BuiltInActionType.Delete */];
1704
1725
  this.isSelectable = true;
1705
1726
  }
1706
1727
  onEnterKeyDown(_event) {
@@ -1794,7 +1815,7 @@ AssignDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1794
1815
  provide: DATA_GRID_CONFIGURATION_CONTEXT,
1795
1816
  useValue: AssignDevicesComponent.GRID_CONFIG_CONTEXT
1796
1817
  }
1797
- ], viewQueries: [{ propertyName: "showDevicesToggle", first: true, predicate: ["showDevicesToggle"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"card-block flex-no-shrink separator-bottom col-xs-12 large-padding p-t-24 p-b-24\">\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<c8y-device-grid\n [title]=\"''\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"isSelectable\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n [baseQuery]=\"baseQuery\"\n [headerActionControls]=\"headerActionControls\"\n [withChildren]=\"true\"\n class=\"flex-grow col-xs-12 no-gutter\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES }\"\n></c8y-device-grid>\n\n<div class=\"text-center card-footer p-24 separator\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Cancel' | translate }}\"\n (click)=\"onCancel.emit()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.CANCEL\n }\"\n >\n <span>{{ 'Cancel' | translate }}</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [ngClass]=\"{ 'btn-pending': pendingStatus }\"\n type=\"button\"\n title=\"{{ 'Assign' | translate }}\"\n (click)=\"assignDevices()\"\n [disabled]=\"selected.length === 0 || !canAssignDevice\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.ASSIGN\n }\"\n >\n <span>{{ 'Assign' | translate }}</span>\n </button>\n</div>\n\n<ng-template #showDevicesToggle let-control=\"headerActionControl\">\n <label class=\"c8y-switch a-s-center\" title=\"{{ control.text | translate }}\">\n <input type=\"checkbox\" [(ngModel)]=\"showChildren\" (click)=\"control.callback()\" />\n <span></span>\n <span>{{ control.text | translate }}</span>\n </label>\n <button\n class=\"btn-help m-r-16 a-s-center\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"childDevicesPop\"\n placement=\"bottom\"\n triggers=\"focus\"\n ></button>\n <ng-template #childDevicesPop>\n <span translate>\n Displays the button\n <span title=\"Child devices icon\" class=\"btn btn-dot btn-icon no-pointer\">\n <i class=\"text-primary dlt-c8y-icon-enter-bottom\"></i>\n </span>\n next to target devices with children. Clicking it displays a list with all child devices of\n the selected target device.\n </span>\n </ng-template>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i7.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "directive", type: i7$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
1818
+ ], viewQueries: [{ propertyName: "showDevicesToggle", first: true, predicate: ["showDevicesToggle"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<div class=\"card-block flex-no-shrink separator-bottom col-xs-12 large-padding p-t-24 p-b-24\">\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<c8y-device-grid\n [title]=\"''\"\n [actionControls]=\"actionControls\"\n [builtInActionsToHide]=\"builtInActionsToHide\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"isSelectable\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n [baseQuery]=\"baseQuery\"\n [headerActionControls]=\"headerActionControls\"\n [withChildren]=\"true\"\n class=\"flex-grow col-xs-12 no-gutter\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES }\"\n></c8y-device-grid>\n\n<div class=\"text-center card-footer p-24 separator\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Cancel' | translate }}\"\n (click)=\"onCancel.emit()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.CANCEL\n }\"\n >\n <span>{{ 'Cancel' | translate }}</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [ngClass]=\"{ 'btn-pending': pendingStatus }\"\n type=\"button\"\n title=\"{{ 'Assign' | translate }}\"\n (click)=\"assignDevices()\"\n [disabled]=\"selected.length === 0 || !canAssignDevice\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.ASSIGN\n }\"\n >\n <span>{{ 'Assign' | translate }}</span>\n </button>\n</div>\n\n<ng-template #showDevicesToggle let-control=\"headerActionControl\">\n <label class=\"c8y-switch a-s-center\" title=\"{{ control.text | translate }}\">\n <input type=\"checkbox\" [(ngModel)]=\"showChildren\" (click)=\"control.callback()\" />\n <span></span>\n <span>{{ control.text | translate }}</span>\n </label>\n <button\n class=\"btn-help m-r-16 a-s-center\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"childDevicesPop\"\n placement=\"bottom\"\n triggers=\"focus\"\n ></button>\n <ng-template #childDevicesPop>\n <span translate>\n Displays the button\n <span title=\"Child devices icon\" class=\"btn btn-dot btn-icon no-pointer\">\n <i class=\"text-primary dlt-c8y-icon-enter-bottom\"></i>\n </span>\n next to target devices with children. Clicking it displays a list with all child devices of\n the selected target device.\n </span>\n </ng-template>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i7.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "builtInActionsToHide", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "directive", type: i7$1.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
1798
1819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AssignDevicesComponent, decorators: [{
1799
1820
  type: Component,
1800
1821
  args: [{ selector: 'c8y-assign-devices', providers: [
@@ -1806,7 +1827,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1806
1827
  provide: DATA_GRID_CONFIGURATION_CONTEXT,
1807
1828
  useValue: AssignDevicesComponent.GRID_CONFIG_CONTEXT
1808
1829
  }
1809
- ], template: "<div class=\"card-block flex-no-shrink separator-bottom col-xs-12 large-padding p-t-24 p-b-24\">\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<c8y-device-grid\n [title]=\"''\"\n [actionControls]=\"actionControls\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"isSelectable\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n [baseQuery]=\"baseQuery\"\n [headerActionControls]=\"headerActionControls\"\n [withChildren]=\"true\"\n class=\"flex-grow col-xs-12 no-gutter\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES }\"\n></c8y-device-grid>\n\n<div class=\"text-center card-footer p-24 separator\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Cancel' | translate }}\"\n (click)=\"onCancel.emit()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.CANCEL\n }\"\n >\n <span>{{ 'Cancel' | translate }}</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [ngClass]=\"{ 'btn-pending': pendingStatus }\"\n type=\"button\"\n title=\"{{ 'Assign' | translate }}\"\n (click)=\"assignDevices()\"\n [disabled]=\"selected.length === 0 || !canAssignDevice\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.ASSIGN\n }\"\n >\n <span>{{ 'Assign' | translate }}</span>\n </button>\n</div>\n\n<ng-template #showDevicesToggle let-control=\"headerActionControl\">\n <label class=\"c8y-switch a-s-center\" title=\"{{ control.text | translate }}\">\n <input type=\"checkbox\" [(ngModel)]=\"showChildren\" (click)=\"control.callback()\" />\n <span></span>\n <span>{{ control.text | translate }}</span>\n </label>\n <button\n class=\"btn-help m-r-16 a-s-center\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"childDevicesPop\"\n placement=\"bottom\"\n triggers=\"focus\"\n ></button>\n <ng-template #childDevicesPop>\n <span translate>\n Displays the button\n <span title=\"Child devices icon\" class=\"btn btn-dot btn-icon no-pointer\">\n <i class=\"text-primary dlt-c8y-icon-enter-bottom\"></i>\n </span>\n next to target devices with children. Clicking it displays a list with all child devices of\n the selected target device.\n </span>\n </ng-template>\n</ng-template>\n" }]
1830
+ ], template: "<div class=\"card-block flex-no-shrink separator-bottom col-xs-12 large-padding p-t-24 p-b-24\">\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<c8y-device-grid\n [title]=\"''\"\n [actionControls]=\"actionControls\"\n [builtInActionsToHide]=\"builtInActionsToHide\"\n [infiniteScroll]=\"'auto'\"\n [selectable]=\"isSelectable\"\n [pagination]=\"pagination\"\n (itemsSelect)=\"onSelected($event)\"\n [refresh]=\"refresh\"\n [baseQuery]=\"baseQuery\"\n [headerActionControls]=\"headerActionControls\"\n [withChildren]=\"true\"\n class=\"flex-grow col-xs-12 no-gutter\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{ component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES }\"\n></c8y-device-grid>\n\n<div class=\"text-center card-footer p-24 separator\">\n <button\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Cancel' | translate }}\"\n (click)=\"onCancel.emit()\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.CANCEL\n }\"\n >\n <span>{{ 'Cancel' | translate }}</span>\n </button>\n <button\n class=\"btn btn-primary\"\n [ngClass]=\"{ 'btn-pending': pendingStatus }\"\n type=\"button\"\n title=\"{{ 'Assign' | translate }}\"\n (click)=\"assignDevices()\"\n [disabled]=\"selected.length === 0 || !canAssignDevice\"\n c8yProductExperience\n [actionName]=\"PRODUCT_EXPERIENCE.EVENT\"\n [actionData]=\"{\n component: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.COMPONENTS.ASSIGN_DEVICES,\n action: PRODUCT_EXPERIENCE.ASSIGN_DEVICES.ACTIONS.ASSIGN\n }\"\n >\n <span>{{ 'Assign' | translate }}</span>\n </button>\n</div>\n\n<ng-template #showDevicesToggle let-control=\"headerActionControl\">\n <label class=\"c8y-switch a-s-center\" title=\"{{ control.text | translate }}\">\n <input type=\"checkbox\" [(ngModel)]=\"showChildren\" (click)=\"control.callback()\" />\n <span></span>\n <span>{{ control.text | translate }}</span>\n </label>\n <button\n class=\"btn-help m-r-16 a-s-center\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"childDevicesPop\"\n placement=\"bottom\"\n triggers=\"focus\"\n ></button>\n <ng-template #childDevicesPop>\n <span translate>\n Displays the button\n <span title=\"Child devices icon\" class=\"btn btn-dot btn-icon no-pointer\">\n <i class=\"text-primary dlt-c8y-icon-enter-bottom\"></i>\n </span>\n next to target devices with children. Clicking it displays a list with all child devices of\n the selected target device.\n </span>\n </ng-template>\n</ng-template>\n" }]
1810
1831
  }], ctorParameters: function () { return [{ type: i3.AlertService }, { type: SubAssetsService }, { type: i2.InventoryService }, { type: i3.GainsightService }]; }, propDecorators: { currentGroupId: [{
1811
1832
  type: Input
1812
1833
  }], refresh: [{