@c8y/ngx-components 1021.22.94 → 1021.22.98
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/esm2022/core/bootstrap/cookie-banner/cookie-banner.component.mjs +3 -3
- package/esm2022/sub-assets/asset-properties.component.mjs +10 -3
- package/esm2022/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table/datapoints-table.component.mjs +3 -3
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +9 -2
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +2 -2
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/sub-assets/asset-properties.component.d.ts +2 -0
- package/sub-assets/asset-properties.component.d.ts.map +1 -1
|
@@ -846,6 +846,7 @@ class AssetPropertiesComponent {
|
|
|
846
846
|
this.customProperties = [];
|
|
847
847
|
this.isEdit = false;
|
|
848
848
|
this.isLoading = false;
|
|
849
|
+
this.POSITION_PROPERTY_KEY = 'c8y_Position';
|
|
849
850
|
}
|
|
850
851
|
ngOnChanges(changes) {
|
|
851
852
|
if (changes.asset) {
|
|
@@ -874,6 +875,7 @@ class AssetPropertiesComponent {
|
|
|
874
875
|
if (mo.c8y_JsonSchema) {
|
|
875
876
|
const [item] = await this.parseItem(mo, mo.c8y_JsonSchema.properties, this.asset);
|
|
876
877
|
this.setItemRequired(item, mo);
|
|
878
|
+
this.updatePositionKeyLabel(item);
|
|
877
879
|
properties.push(item);
|
|
878
880
|
}
|
|
879
881
|
}
|
|
@@ -1033,6 +1035,11 @@ class AssetPropertiesComponent {
|
|
|
1033
1035
|
}
|
|
1034
1036
|
return model;
|
|
1035
1037
|
}
|
|
1038
|
+
updatePositionKeyLabel(item) {
|
|
1039
|
+
if (item.label === this.POSITION_PROPERTY_KEY) {
|
|
1040
|
+
item.label = gettext('Location');
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1036
1043
|
setItemRequired(item, mo) {
|
|
1037
1044
|
const isAssetPropertyRequired = !!this.assetType?.c8y_IsAssetType?.properties.find(p => p.id === mo.id)?.isRequired;
|
|
1038
1045
|
if (!isAssetPropertyRequired) {
|
|
@@ -1048,11 +1055,11 @@ class AssetPropertiesComponent {
|
|
|
1048
1055
|
}
|
|
1049
1056
|
}
|
|
1050
1057
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AssetPropertiesComponent, deps: [{ token: i3.AssetTypesRealtimeService }, { token: i2.InventoryService }, { token: i2.InventoryBinaryService }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1051
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", 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 ===
|
|
1058
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", 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 === POSITION_PROPERTY_KEY\">\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: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { 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" }] }); }
|
|
1052
1059
|
}
|
|
1053
1060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AssetPropertiesComponent, decorators: [{
|
|
1054
1061
|
type: Component,
|
|
1055
|
-
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 ===
|
|
1062
|
+
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 === POSITION_PROPERTY_KEY\">\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" }]
|
|
1056
1063
|
}], ctorParameters: () => [{ type: i3.AssetTypesRealtimeService }, { type: i2.InventoryService }, { type: i2.InventoryBinaryService }, { type: i3.AlertService }], propDecorators: { asset: [{
|
|
1057
1064
|
type: Input
|
|
1058
1065
|
}], assetChange: [{
|