@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.
- package/api/services.d.ts +1 -1
- package/core/forms/validation-pattern.d.ts +4 -0
- package/device-grid/device-grid.component.d.ts +7 -2
- package/esm2020/api/services.mjs +2 -2
- package/esm2020/child-devices/child-devices.component.mjs +1 -1
- package/esm2020/core/bootstrap/bootstrap.component.mjs +3 -3
- package/esm2020/core/dynamic-forms/json-schema/c8y-json-schema.service.mjs +8 -2
- package/esm2020/core/forms/validation-pattern.mjs +5 -1
- package/esm2020/device-grid/device-grid-extension.service.mjs +13 -8
- package/esm2020/device-grid/device-grid.component.mjs +30 -15
- package/esm2020/device-list/device-list.component.mjs +1 -1
- package/esm2020/operations/device-selector/device-selector.component.mjs +1 -1
- package/esm2020/replace-device-wizard/replace-device-wizard.component.mjs +2 -2
- package/esm2020/sub-assets/add-group/add-group.component.mjs +4 -3
- package/esm2020/sub-assets/asset-properties-item.component.mjs +7 -3
- package/esm2020/sub-assets/asset-properties.component.mjs +25 -10
- package/esm2020/sub-assets/assign-devices/assign-devices.component.mjs +4 -3
- package/esm2020/sub-assets/location/asset-location.component.mjs +5 -3
- package/esm2020/trusted-certificates/crl/crl-check-settings.component.mjs +39 -0
- package/esm2020/trusted-certificates/crl/crl-settings.component.mjs +109 -0
- package/esm2020/trusted-certificates/crl/crl-settings.module.mjs +46 -0
- package/esm2020/trusted-certificates/factories/tabs.factory.mjs +36 -0
- package/esm2020/trusted-certificates/factories/trusted-certificates-navigation.factory.mjs +26 -0
- package/esm2020/trusted-certificates/index.mjs +4 -4
- package/esm2020/trusted-certificates/{add-trusted-certificate.component.mjs → list/add-trusted-certificate.component.mjs} +1 -1
- package/esm2020/trusted-certificates/list/trusted-certificate-list.component.mjs +184 -0
- package/esm2020/trusted-certificates/list/trusted-certificate-list.module.mjs +54 -0
- package/esm2020/trusted-certificates/list/trusted-certificate.model.mjs +36 -0
- package/esm2020/trusted-certificates/trusted-certificates.module.mjs +24 -35
- package/fesm2015/c8y-ngx-components-api.mjs +3 -2
- package/fesm2015/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-child-devices.mjs +1 -1
- package/fesm2015/c8y-ngx-components-child-devices.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-device-grid.mjs +41 -21
- package/fesm2015/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-device-list.mjs +1 -1
- package/fesm2015/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-operations-device-selector.mjs +1 -1
- package/fesm2015/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs +1 -1
- package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-sub-assets.mjs +39 -18
- package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-trusted-certificates.mjs +329 -86
- package/fesm2015/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components.mjs +10 -3
- package/fesm2015/c8y-ngx-components.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-api.mjs +3 -2
- package/fesm2020/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-child-devices.mjs +1 -1
- package/fesm2020/c8y-ngx-components-child-devices.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-device-grid.mjs +41 -21
- package/fesm2020/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-device-list.mjs +1 -1
- package/fesm2020/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-operations-device-selector.mjs +1 -1
- package/fesm2020/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs +1 -1
- package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-sub-assets.mjs +38 -17
- package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-trusted-certificates.mjs +314 -85
- package/fesm2020/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components.mjs +13 -3
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +48 -0
- package/package.json +1 -1
- package/sub-assets/add-group/add-group.component.d.ts +2 -1
- package/sub-assets/asset-properties.component.d.ts +6 -0
- package/sub-assets/assign-devices/assign-devices.component.d.ts +2 -1
- package/trusted-certificates/crl/crl-check-settings.component.d.ts +18 -0
- package/trusted-certificates/crl/crl-settings.component.d.ts +28 -0
- package/trusted-certificates/crl/crl-settings.module.d.ts +13 -0
- package/trusted-certificates/factories/tabs.factory.d.ts +10 -0
- package/trusted-certificates/index.d.ts +3 -3
- package/trusted-certificates/{trusted-certificates.component.d.ts → list/trusted-certificate-list.component.d.ts} +4 -4
- package/trusted-certificates/list/trusted-certificate-list.module.d.ts +15 -0
- package/trusted-certificates/trusted-certificates.module.d.ts +4 -10
- package/esm2020/trusted-certificates/trusted-certificate.model.mjs +0 -36
- package/esm2020/trusted-certificates/trusted-certificates-navigation.factory.mjs +0 -26
- package/esm2020/trusted-certificates/trusted-certificates.component.mjs +0 -184
- /package/trusted-certificates/{trusted-certificates-navigation.factory.d.ts → factories/trusted-certificates-navigation.factory.d.ts} +0 -0
- /package/trusted-certificates/{add-trusted-certificate.component.d.ts → list/add-trusted-certificate.component.d.ts} +0 -0
- /package/trusted-certificates/{trusted-certificate.model.d.ts → list/trusted-certificate.model.d.ts} +0 -0
|
@@ -12,7 +12,7 @@ import * as i4 from '@c8y/ngx-components/assets-navigator';
|
|
|
12
12
|
import * as i3$1 from '@angular/common';
|
|
13
13
|
import * as i1 from '@ngx-translate/core';
|
|
14
14
|
import * as i6 from '@angular/cdk/stepper';
|
|
15
|
-
import { clone, cloneDeep, pick } from 'lodash-es';
|
|
15
|
+
import { clone, sortBy, isNumber, toPairs, fromPairs, cloneDeep, pick } from 'lodash-es';
|
|
16
16
|
import * as i3$2 from '@ngx-formly/core';
|
|
17
17
|
import * as i4$1 from 'ngx-bootstrap/tooltip';
|
|
18
18
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
@@ -515,6 +515,7 @@ class AddGroupComponent {
|
|
|
515
515
|
this.canCreateGroup = false;
|
|
516
516
|
this.canAssignDevice = false;
|
|
517
517
|
this.PRODUCT_EXPERIENCE = PRODUCT_EXPERIENCE;
|
|
518
|
+
this.builtInActionsToHide = ["DELETE" /* BuiltInActionType.Delete */];
|
|
518
519
|
this.ITEMS_SELECT_LIMIT = 15;
|
|
519
520
|
this.btnLabels = {
|
|
520
521
|
next: gettext('Next'),
|
|
@@ -603,10 +604,10 @@ class AddGroupComponent {
|
|
|
603
604
|
}
|
|
604
605
|
}
|
|
605
606
|
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 });
|
|
606
|
-
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" }] });
|
|
607
|
+
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" }] });
|
|
607
608
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AddGroupComponent, decorators: [{
|
|
608
609
|
type: Component,
|
|
609
|
-
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" }]
|
|
610
|
+
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" }]
|
|
610
611
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: AddGroupService }, { type: i3.AlertService }, { type: SubAssetsService }, { type: i3.GainsightService }, { type: i3.Permissions }]; }, propDecorators: { currentGroupId: [{
|
|
611
612
|
type: Input
|
|
612
613
|
}], refresh: [{
|
|
@@ -689,7 +690,7 @@ class AssetPropertiesItemComponent {
|
|
|
689
690
|
if (complexObj.file) {
|
|
690
691
|
complexProps[complexObj.key] = complexObj.value;
|
|
691
692
|
}
|
|
692
|
-
else
|
|
693
|
+
else {
|
|
693
694
|
complexProps[complexObj.key] = this.value[complexObj.key];
|
|
694
695
|
}
|
|
695
696
|
});
|
|
@@ -708,6 +709,10 @@ class AssetPropertiesItemComponent {
|
|
|
708
709
|
resolveJsonSchema() {
|
|
709
710
|
if (this.jsonSchema) {
|
|
710
711
|
const fieldConfig = this.c8yJsonSchemaService.toFieldConfig(this.jsonSchema, this.jsonSchema);
|
|
712
|
+
if (this.complex && this.complex.length > 0) {
|
|
713
|
+
const orderedFieldConfig = sortBy(fieldConfig.fieldGroup[0].fieldGroup, 'order');
|
|
714
|
+
fieldConfig.fieldGroup[0].fieldGroup = orderedFieldConfig;
|
|
715
|
+
}
|
|
711
716
|
this.form = new FormGroup({});
|
|
712
717
|
this.fields = [fieldConfig];
|
|
713
718
|
this.model = this.getModel();
|
|
@@ -929,10 +934,10 @@ class AssetLocationComponent {
|
|
|
929
934
|
* @param longitude Longitude of the marker
|
|
930
935
|
*/
|
|
931
936
|
setView(latitude, longitude) {
|
|
932
|
-
|
|
933
|
-
if (latitude && longitude && this.mapView) {
|
|
937
|
+
if (isNumber(latitude) && isNumber(longitude) && this.mapView) {
|
|
934
938
|
[latitude, longitude] = this.setLatLngValues(latitude, longitude);
|
|
935
|
-
|
|
939
|
+
this.config.center = [latitude, longitude];
|
|
940
|
+
this.mapView.center();
|
|
936
941
|
}
|
|
937
942
|
}
|
|
938
943
|
setLatLngValues(latitude, longitude) {
|
|
@@ -1014,6 +1019,17 @@ class AssetPropertiesComponent {
|
|
|
1014
1019
|
const property = Object.keys(schemaProperties || {})[0];
|
|
1015
1020
|
delete (((_b = mo === null || mo === void 0 ? void 0 : mo.c8y_JsonSchema) === null || _b === void 0 ? void 0 : _b.properties[property]) || {}).title;
|
|
1016
1021
|
}
|
|
1022
|
+
/**
|
|
1023
|
+
* This method is used to order the complex properties in the order specified by the user in asset properties screen.
|
|
1024
|
+
* @param mo - Managed object of the complex property associated with the asset.
|
|
1025
|
+
*/
|
|
1026
|
+
orderComplexProperties(mo) {
|
|
1027
|
+
var _a;
|
|
1028
|
+
const complexProperties = (_a = mo.c8y_JsonSchema.properties[mo.name]) === null || _a === void 0 ? void 0 : _a['properties'];
|
|
1029
|
+
const keyValuesArray = toPairs(complexProperties);
|
|
1030
|
+
const orderedProperties = sortBy(keyValuesArray, ([, value]) => value.order);
|
|
1031
|
+
mo.c8y_JsonSchema.properties[mo.name]['properties'] = fromPairs(orderedProperties);
|
|
1032
|
+
}
|
|
1017
1033
|
parseItem(mo, properties, asset) {
|
|
1018
1034
|
var _a, _b;
|
|
1019
1035
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1040,6 +1056,7 @@ class AssetPropertiesComponent {
|
|
|
1040
1056
|
if (type === 'object') {
|
|
1041
1057
|
// remove title to avoid excessive property name on asset complex properties form
|
|
1042
1058
|
this.deleteTitleFromMOJsonSchema(mo);
|
|
1059
|
+
this.orderComplexProperties(mo);
|
|
1043
1060
|
if (!value) {
|
|
1044
1061
|
value = {};
|
|
1045
1062
|
for (const prop in properties[key].properties) {
|
|
@@ -1082,16 +1099,12 @@ class AssetPropertiesComponent {
|
|
|
1082
1099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1083
1100
|
try {
|
|
1084
1101
|
if (prop.type === 'object') {
|
|
1085
|
-
|
|
1102
|
+
this.updateUndefinedToNull(propertyValue[prop.key]);
|
|
1086
1103
|
}
|
|
1087
1104
|
else {
|
|
1088
|
-
|
|
1089
|
-
if (value === undefined) {
|
|
1090
|
-
propertyValue[key] = null;
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
propertyValue = yield this.uploadFiles(propertyValue, prop.value);
|
|
1105
|
+
this.updateUndefinedToNull(propertyValue);
|
|
1094
1106
|
}
|
|
1107
|
+
propertyValue = yield this.uploadFiles(propertyValue, prop.value);
|
|
1095
1108
|
// Avoid making a PUT request containing just the id, as response body might be incomplete
|
|
1096
1109
|
const hasValues = Object.values(propertyValue).some(value => value !== undefined);
|
|
1097
1110
|
if (!hasValues) {
|
|
@@ -1112,6 +1125,13 @@ class AssetPropertiesComponent {
|
|
|
1112
1125
|
}
|
|
1113
1126
|
});
|
|
1114
1127
|
}
|
|
1128
|
+
updateUndefinedToNull(propertyValue) {
|
|
1129
|
+
for (const [key, value] of Object.entries(propertyValue)) {
|
|
1130
|
+
if (value === undefined) {
|
|
1131
|
+
propertyValue[key] = null;
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1115
1135
|
keepOrder(correctOrderedIds, properties) {
|
|
1116
1136
|
const orderedProperties = correctOrderedIds.map(({ id }) => {
|
|
1117
1137
|
const foundProperty = properties.find(property => property.id === id);
|
|
@@ -1166,10 +1186,10 @@ class AssetPropertiesComponent {
|
|
|
1166
1186
|
}
|
|
1167
1187
|
}
|
|
1168
1188
|
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 });
|
|
1169
|
-
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" }] });
|
|
1189
|
+
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" }] });
|
|
1170
1190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AssetPropertiesComponent, decorators: [{
|
|
1171
1191
|
type: Component,
|
|
1172
|
-
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" }]
|
|
1192
|
+
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" }]
|
|
1173
1193
|
}], ctorParameters: function () { return [{ type: i3.AssetTypesService }, { type: i2.InventoryService }, { type: i2.InventoryBinaryService }, { type: i3.AlertService }]; }, propDecorators: { asset: [{
|
|
1174
1194
|
type: Input
|
|
1175
1195
|
}], assetChange: [{
|
|
@@ -1765,6 +1785,7 @@ class AssignDevicesComponent {
|
|
|
1765
1785
|
this.actionControls = [];
|
|
1766
1786
|
this.headerActionControls = [];
|
|
1767
1787
|
this.showChildren = false;
|
|
1788
|
+
this.builtInActionsToHide = ["DELETE" /* BuiltInActionType.Delete */];
|
|
1768
1789
|
this.isSelectable = true;
|
|
1769
1790
|
}
|
|
1770
1791
|
onEnterKeyDown(_event) {
|
|
@@ -1862,7 +1883,7 @@ AssignDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
1862
1883
|
provide: DATA_GRID_CONFIGURATION_CONTEXT,
|
|
1863
1884
|
useValue: AssignDevicesComponent.GRID_CONFIG_CONTEXT
|
|
1864
1885
|
}
|
|
1865
|
-
], 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" }] });
|
|
1886
|
+
], 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" }] });
|
|
1866
1887
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: AssignDevicesComponent, decorators: [{
|
|
1867
1888
|
type: Component,
|
|
1868
1889
|
args: [{ selector: 'c8y-assign-devices', providers: [
|
|
@@ -1874,7 +1895,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1874
1895
|
provide: DATA_GRID_CONFIGURATION_CONTEXT,
|
|
1875
1896
|
useValue: AssignDevicesComponent.GRID_CONFIG_CONTEXT
|
|
1876
1897
|
}
|
|
1877
|
-
], 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" }]
|
|
1898
|
+
], 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" }]
|
|
1878
1899
|
}], ctorParameters: function () { return [{ type: i3.AlertService }, { type: SubAssetsService }, { type: i2.InventoryService }, { type: i3.GainsightService }]; }, propDecorators: { currentGroupId: [{
|
|
1879
1900
|
type: Input
|
|
1880
1901
|
}], refresh: [{
|