@c8y/ngx-components 1023.5.3 → 1023.6.3
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/fesm2022/c8y-ngx-components-actility-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-actility-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs +7 -7
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +9 -9
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +12 -12
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +3 -3
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +76 -76
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-api.mjs +7 -7
- package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
- package/fesm2022/c8y-ngx-components-app-logs.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +39 -39
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs} +13 -13
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs.map → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +114 -114
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +15 -15
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +36 -36
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +13 -13
- package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
- package/fesm2022/c8y-ngx-components-child-devices.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs +68 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs +44 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +6 -6
- package/fesm2022/c8y-ngx-components-connectivity.mjs +53 -53
- package/fesm2022/c8y-ngx-components-connectivity.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs} +10 -10
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +102 -102
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs} +16 -16
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +6 -6
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
- package/fesm2022/c8y-ngx-components-data-broker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +24 -24
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +7 -7
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +40 -40
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +33 -33
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +43 -43
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
- package/fesm2022/c8y-ngx-components-device-protocols.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
- package/fesm2022/c8y-ngx-components-device-shell.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +30 -30
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
- package/fesm2022/c8y-ngx-components-exports-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
- package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
- package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +118 -118
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +19 -19
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
- package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-location.mjs +28 -28
- package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +19 -19
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
- package/fesm2022/c8y-ngx-components-messaging-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +19 -19
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device.mjs +10 -10
- package/fesm2022/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
- package/fesm2022/c8y-ngx-components-reports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-search.mjs +19 -19
- package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services.mjs +29 -29
- package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +9 -9
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets.mjs +6 -6
- package/fesm2022/c8y-ngx-components-static-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +60 -60
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +40 -40
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +6 -6
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +12 -12
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +12 -12
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-translation-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +62 -43
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
- package/fesm2022/c8y-ngx-components-user-roles.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +19 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +27 -27
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +7 -7
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +24 -24
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs +5 -2
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1323 -1323
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/upgrade/index.d.ts +1 -0
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/widget-providers/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs +0 -68
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs +0 -44
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-asset-properties.mjs","sources":["../../asset-properties/asset-properties.model.ts","../../asset-properties/computed-properties.service.ts","../../asset-properties/asset-properties.service.ts","../../asset-properties/asset-property-list/tree-data-source.ts","../../asset-properties/asset-property-list/asset-property-action.directive.ts","../../asset-properties/asset-property-list/asset-property-value.pipe.ts","../../asset-properties/asset-property-list/asset-property-icon.pipe.ts","../../asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.ts","../../asset-properties/computed-properties-config/computed-properties-config.component.ts","../../asset-properties/computed-properties-config/computed-properties-config.component.html","../../asset-properties/asset-property-list/asset-property-collapse-button-title.pipe.ts","../../asset-properties/asset-property-list/asset-property-drag-drop.service.ts","../../asset-properties/asset-property-list/asset-property-list.component.ts","../../asset-properties/asset-property-list/asset-property-list.component.html","../../asset-properties/custom-properties-drawer/custom-properties-drawer.component.ts","../../asset-properties/custom-properties-drawer/custom-properties-drawer.component.html","../../asset-properties/custom-properties-drawer.service.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.html","../../asset-properties/c8y-ngx-components-asset-properties.ts"],"sourcesContent":["import { Injector, Type } from '@angular/core';\nimport { IAlarm, IEvent, IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable } from 'rxjs';\n\ninterface ComputedPropertyContextMap {\n device: { type: 'device'; value: IManagedObject };\n group: { type: 'group'; value: IManagedObject };\n asset: { type: 'asset'; value: IManagedObject };\n alarm: { type: 'alarm'; value: IAlarm };\n event: { type: 'event'; value: IEvent };\n}\n\nexport type ValueCallbackMetadata = {\n /**\n * Mode of operation:\n * - 'singleValue': Get count only once (no real-time updates)\n * - 'realtime': Enable real-time updates (default)\n */\n mode?: 'singleValue' | 'realtime';\n /**\n * Observable to control real-time updates when mode is 'realtime'.\n * - true: Enable real-time updates (fetches current count from server and continues)\n * - false: Disable real-time updates (preserves current count, no server call)\n * If not provided, real-time runs continuously.\n */\n realtimeControl$?: Observable<boolean>;\n};\n\nexport type ComputedPropertyContextType = keyof ComputedPropertyContextMap;\nexport type ComputedPropertyContextValue =\n ComputedPropertyContextMap[keyof ComputedPropertyContextMap]['value'];\n\ntype ComputedPropertyDefinitionBase<\n TContext extends readonly ComputedPropertyContextType[] = ComputedPropertyContextType[],\n TConfig = any\n> = {\n name: string;\n prop: BaseProperty;\n contextType: TContext;\n value: ({\n config,\n context,\n metadata\n }: {\n config?: TConfig;\n context?: ComputedPropertyContextMap[TContext[number]]['value'];\n metadata?: ValueCallbackMetadata;\n }) => any | Observable<any> | Promise<any>;\n injector?: Injector;\n};\n\nexport type ComputedPropertyDefinition<\n TContext extends readonly ComputedPropertyContextType[] = ComputedPropertyContextType[],\n TConfig = any\n> = ComputedPropertyDefinitionBase<TContext, TConfig> &\n (\n | {\n configComponent?: never;\n loadConfigComponent?: never;\n }\n | {\n configComponent: Type<any>;\n loadConfigComponent?: never;\n }\n | {\n configComponent?: never;\n loadConfigComponent: () => Promise<Type<any>>;\n }\n );\n\nexport type ComputedPropertyComponent = {\n /**\n * The configuration which is shared between configuration component and display component.\n * Should be serializable to allow saving it to the API.\n */\n config: unknown;\n /**\n * The asset, device, group, alarm or event for which the property is displayed.\n */\n asset?: IManagedObject;\n};\n\nexport type AssetPropertyListConfig = {\n /**\n * List of properties that should be selected by default when the asset property list is loaded.\n */\n selectedProperties?: AssetPropertyType[];\n /**\n * Flag to enable or disable the filter functionality in the asset property list.\n * When enabled, a search input will be displayed to filter properties by their names.\n */\n filterable?: boolean;\n /**\n * The mode of the asset property list describing how the properties are selected.\n * - `single` - only one property can be selected at a time\n * - `multi` - multiple properties can be selected at a time\n * - `none` - no properties can be selected\n */\n selectMode?: 'single' | 'multi' | 'none';\n /**\n * The mode of the asset property list describing how the properties are expanded.\n * - `expandedByDefault` - all properties are expanded by default and collapse button is shown\n * - `collapsedByDefault` - all properties are collapsed by default and expand button is shown\n * - `nonCollapsible` - all properties are expanded all the time and collapse button is hidden\n */\n expansionMode?: 'expandedByDefault' | 'collapsedByDefault' | 'nonCollapsible';\n /**\n * Flag to show or hide the header of the asset property list.\n * Header includes select all checkbox (if applicable) and the title of the list columns.\n */\n showHeader?: boolean;\n /**\n * Flag to show or hide the value of the asset property.\n */\n showValue?: boolean;\n /**\n * Flag to show or hide the key of the asset property.\n * If set to true, the key of the property will be displayed alongside its value.\n */\n showKey?: boolean;\n /**\n * Defines what should be displayed when asset is not selected and there are no properties to show.\n * - `empty` - empty state with a message\n * - `default-properties` - default properties are shown (like ID, name, type, etc.)\n */\n emptyStateContent?: 'empty' | 'default-properties';\n /**\n * Flag to allow adding custom properties to the asset property list with additional dialog.\n */\n allowAddingCustomProperties?: boolean;\n /**\n * Asset property list allows to provide custom properties as an input.\n * This flag defines how the input properties are handled.\n * - `merge` - input properties are merged with properties from asset list\n * - `override` - input properties override properties from asset list, meaning that only input properties are shown\n */\n inputPropertiesHandle?: 'merge' | 'override';\n /**\n * Enable or disable drag and drop functionality for reordering properties.\n */\n allowDragAndDrop?: boolean;\n};\n\nexport const defaultAssetPropertyListConfig: AssetPropertyListConfig = {\n filterable: true,\n selectMode: 'none',\n expansionMode: 'expandedByDefault',\n showHeader: true,\n showValue: true,\n showKey: true,\n emptyStateContent: 'empty',\n allowAddingCustomProperties: false,\n inputPropertiesHandle: 'merge',\n allowDragAndDrop: false\n};\n\nexport const defaultAssetProperties: Array<BaseProperty> = [\n {\n c8y_JsonSchema: { properties: { name: { type: 'string', label: 'Name' } } },\n name: 'name',\n label: gettext('Name'),\n type: 'string',\n active: true,\n isEditable: true,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: { properties: { id: { type: 'string', label: 'ID' } } },\n name: 'id',\n label: gettext('ID'),\n type: 'string',\n active: true,\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { type: { type: 'string', label: 'Type' } }\n },\n name: 'type',\n label: gettext('Type'),\n type: 'string',\n active: true,\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { owner: { type: 'string', label: 'Owner' } }\n },\n name: 'owner',\n label: gettext('Owner'),\n type: 'string',\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { lastUpdated: { type: 'string', label: 'Last updated' } }\n },\n name: 'lastUpdated',\n label: gettext('Last updated'),\n type: 'string',\n isEditable: false,\n isStandardProperty: true\n }\n];\n\nexport const deviceAssetProperties: Array<BaseProperty> = [\n {\n label: gettext('Active alarms status'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_ActiveAlarmsStatus',\n c8y_JsonSchema: {\n properties: {\n c8y_ActiveAlarmsStatus: {\n key: 'c8y_ActiveAlarmsStatus',\n type: 'object',\n label: 'Active alarms status',\n properties: {\n critical: {\n title: 'Critical',\n type: 'number'\n },\n major: {\n title: 'Major',\n type: 'number'\n },\n minor: {\n title: 'Minor',\n type: 'number'\n },\n warning: {\n title: 'Warning',\n type: 'number'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Address'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Address',\n c8y_JsonSchema: {\n properties: {\n c8y_Address: {\n key: 'c8y_Address',\n type: 'object',\n label: 'Address',\n properties: {\n street: {\n title: 'Street',\n type: 'string'\n },\n city: {\n title: 'City',\n type: 'string'\n },\n cityCode: {\n title: 'City code',\n type: 'string'\n },\n territory: {\n title: 'Territory',\n type: 'string'\n },\n region: {\n title: 'Region',\n type: 'string'\n },\n country: {\n title: 'Country',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Agent'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Agent',\n c8y_JsonSchema: {\n properties: {\n c8y_Agent: {\n key: 'c8y_Agent',\n type: 'object',\n label: 'Agent',\n properties: {\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: 'string'\n },\n maintainer: {\n title: 'Maintainer',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Availability'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Availability',\n c8y_JsonSchema: {\n properties: {\n c8y_Availability: {\n key: 'c8y_Availability',\n type: 'object',\n label: 'Availability',\n properties: {\n status: {\n title: 'Status',\n type: 'string'\n },\n lastMessage: {\n title: 'Last message',\n type: 'string',\n printFormat: 'datetime'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Connection'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Connection',\n c8y_JsonSchema: {\n properties: {\n c8y_Connection: {\n key: 'c8y_Connection',\n type: 'object',\n label: 'Connection',\n properties: {\n status: {\n title: 'Status',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Communication mode'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_CommunicationMode',\n c8y_JsonSchema: {\n properties: {\n c8y_CommunicationMode: {\n key: 'c8y_CommunicationMode',\n type: 'object',\n label: 'Communication mode',\n properties: {\n mode: {\n title: 'Mode',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Firmware'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Firmware',\n c8y_JsonSchema: {\n properties: {\n c8y_Firmware: {\n key: 'c8y_Firmware',\n type: 'object',\n label: 'Firmware',\n properties: {\n moduleVersion: {\n title: 'Module version',\n type: 'string'\n },\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: ['string', 'null']\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Hardware'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Hardware',\n c8y_JsonSchema: {\n properties: {\n c8y_Hardware: {\n key: 'c8y_Hardware',\n type: 'object',\n label: 'Hardware',\n properties: {\n model: {\n title: 'Model',\n type: 'string'\n },\n serialNumber: {\n title: 'Serial number',\n type: 'string'\n },\n revision: {\n title: 'Revision',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('LPWAN device'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_LpwanDevice',\n c8y_JsonSchema: {\n properties: {\n c8y_LpwanDevice: {\n key: 'c8y_LpwanDevice',\n type: 'object',\n label: 'LPWAN device',\n properties: {\n provisioned: {\n title: 'Provisioned',\n type: 'boolean'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Mobile'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Mobile',\n c8y_JsonSchema: {\n properties: {\n c8y_Mobile: {\n key: 'c8y_Mobile',\n type: 'object',\n label: 'Mobile',\n properties: {\n cellId: {\n title: 'Cell ID',\n type: ['string', 'null']\n },\n connType: {\n title: 'Connection type',\n type: 'string',\n readOnly: true\n },\n currentOperator: {\n title: 'Current operator',\n type: 'string',\n readOnly: true\n },\n currentBand: {\n title: 'Current band',\n type: 'string',\n readOnly: true\n },\n ecn0: {\n title: 'ECN0',\n type: 'string',\n readOnly: true\n },\n iccid: {\n title: 'ICCID',\n type: ['string', 'null']\n },\n imei: {\n title: 'IMEI',\n type: ['string', 'null']\n },\n imsi: {\n title: 'IMSI',\n type: ['string', 'null']\n },\n lac: {\n title: 'LAC',\n type: ['string', 'null']\n },\n mcc: {\n title: 'MCC',\n type: ['string', 'null']\n },\n mnc: {\n title: 'MNC',\n type: ['string', 'null']\n },\n msisdn: {\n title: 'MSISDN',\n type: 'string'\n },\n rcsp: {\n title: 'RCSP',\n type: 'string',\n readOnly: true\n },\n rscp: {\n title: 'RSCP',\n type: 'string',\n readOnly: true\n },\n rsrp: {\n title: 'RSRP',\n type: 'string',\n readOnly: true\n },\n rsrq: {\n title: 'RSRQ',\n type: 'string',\n readOnly: true\n },\n rssi: {\n title: 'RSSI',\n type: 'string',\n readOnly: true\n }\n }\n }\n }\n }\n },\n {\n name: 'c8y_Notes',\n label: 'Notes',\n type: 'string',\n isEditable: true,\n isStandardProperty: true,\n c8y_JsonSchema: {\n properties: {\n c8y_Notes: {\n type: 'string',\n label: 'Notes',\n 'x-schema-form': {\n type: 'textarea'\n }\n }\n }\n }\n },\n {\n label: gettext('Position'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Position',\n c8y_JsonSchema: {\n properties: {\n c8y_Position: {\n key: 'c8y_Position',\n type: 'object',\n label: 'Position',\n properties: {\n lat: {\n title: 'Latitude',\n type: 'number'\n },\n lng: {\n title: 'Longitude',\n type: 'number'\n },\n alt: {\n title: 'Altitude',\n type: 'number'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Required availability'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_RequiredAvailability',\n c8y_JsonSchema: {\n properties: {\n c8y_RequiredAvailability: {\n key: 'c8y_RequiredAvailability',\n type: 'object',\n label: 'Required availability',\n properties: {\n responseInterval: {\n title: 'Response interval',\n description:\n 'Takes a value between -32768 and 32767 minutes (a negative value indicates that the device is under maintenance).',\n type: 'integer',\n minimum: -32768,\n maximum: 32767\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Software'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Software',\n c8y_JsonSchema: {\n properties: {\n c8y_Software: {\n key: 'c8y_Software',\n type: 'object',\n label: 'Software',\n properties: {\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: ['string', 'null']\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Network'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Network',\n c8y_JsonSchema: {\n properties: {\n c8y_Network: {\n key: 'c8y_Network',\n type: 'object',\n label: 'Network',\n properties: {\n c8y_DHCP: {\n title: 'DHCP',\n type: 'object',\n printFormat: 'hidden',\n name: 'c8y_DHCP',\n properties: {\n addressRange: {\n title: 'Address range',\n type: 'object',\n name: 'addressRange',\n printFormat: 'hidden',\n properties: {\n start: {\n title: 'Start',\n type: 'string'\n },\n end: {\n title: 'End',\n type: 'string'\n }\n }\n },\n dns1: {\n title: 'DNS 1',\n type: 'string'\n },\n dns2: {\n title: 'DNS 2',\n type: 'string'\n },\n enabled: {\n title: 'Enabled',\n type: 'integer'\n }\n }\n },\n c8y_LAN: {\n title: 'LAN',\n type: 'object',\n name: 'c8y_LAN',\n printFormat: 'hidden',\n properties: {\n enabled: {\n title: 'Enabled',\n type: 'integer'\n },\n ip: {\n title: 'IP',\n type: 'string'\n },\n mac: {\n title: 'MAC',\n type: 'string'\n },\n name: {\n title: 'Name',\n type: 'string'\n },\n netmask: {\n title: 'Netmask',\n type: 'string'\n }\n }\n },\n c8y_WAN: {\n title: 'WAN',\n type: 'object',\n name: 'c8y_WAN',\n printFormat: 'hidden',\n properties: {\n apn: {\n title: 'APN',\n type: 'string'\n },\n authType: {\n title: 'Auth type',\n type: 'string'\n },\n ip: {\n title: 'IP',\n type: 'string'\n },\n password: {\n title: 'Password',\n type: 'string'\n },\n simStatus: {\n title: 'SIM status',\n type: 'string'\n },\n username: {\n title: 'Username',\n type: 'string'\n }\n }\n }\n }\n }\n }\n }\n }\n];\n\nexport const RESULT_TYPES = {\n VALUE: { name: 'VALUE', value: 1, label: gettext('Only value') },\n VALUE_UNIT: { name: 'VALUE_UNIT', value: 2, label: gettext('Value and unit') },\n VALUE_UNIT_TIME: { name: 'VALUE_UNIT_TIME', value: 3, label: gettext('Value, unit and time') }\n};\nexport type C8yPropertyType =\n | 'string'\n | 'number'\n | 'integer'\n | 'boolean'\n | 'object'\n | 'array'\n | 'null'\n | 'date'\n | 'enum'\n | 'file'\n | 'c8y_JsonSchema'\n | ['string', 'null']\n | Array<C8yPropertyType>;\n\ntype C8yPropertyFormat = 'datetime' | 'hidden' | 'textarea';\n\nexport interface C8yJsonSchemaProperty {\n type: C8yPropertyType;\n title?: string;\n label?: string;\n description?: string;\n key?: string;\n name?: string;\n minimum?: number;\n maximum?: number;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n required?: boolean;\n readOnly?: boolean;\n printFormat?: C8yPropertyFormat;\n 'x-schema-form'?: {\n type: string;\n };\n properties?: Record<string, C8yJsonSchemaProperty>;\n items?: C8yJsonSchemaProperty;\n 'x-show-if-any-available'?: { contextPath: string }[];\n [key: string]: any;\n}\n\nexport interface C8yJsonSchema {\n properties: Record<string, C8yJsonSchemaProperty>;\n required?: string[];\n}\n\nexport interface BaseProperty {\n name: string;\n label: string;\n type: C8yPropertyType;\n isEditable?: boolean;\n temporary?: boolean;\n isStandardProperty?: boolean;\n c8y_JsonSchema?: C8yJsonSchema;\n active?: boolean;\n computed?: boolean;\n instanceId?: string;\n [key: string]: any;\n}\n\nexport interface NestedPropertyFields extends BaseProperty {\n title?: string;\n properties?: object;\n keyPath: string[];\n}\n\nexport type AssetPropertyType = BaseProperty | NestedPropertyFields;\n","import { inject, Injectable, InjectionToken, Injector } from '@angular/core';\nimport {\n ExtensionPointForPlugins,\n GenericHookOptions,\n GenericHookType,\n hookGeneric,\n PluginsResolveService,\n getInjectedHooks,\n stateToFactory,\n fromTriggerOnce,\n GroupService\n} from '@c8y/ngx-components';\nimport {\n ComputedPropertyContextType,\n ComputedPropertyContextValue,\n ComputedPropertyDefinition\n} from './asset-properties.model';\nimport { Router } from '@angular/router';\nimport {\n distinctUntilChanged,\n filter,\n firstValueFrom,\n map,\n mergeMap,\n Observable,\n shareReplay,\n take\n} from 'rxjs';\nimport { IAlarm, IEvent, IManagedObject } from '@c8y/client';\n\nexport const HOOK_COMPUTED_PROPERTY = new InjectionToken<ComputedPropertyDefinition[]>(\n 'HOOK_COMPUTED_PROPERTY'\n);\n\nexport function hookComputedProperty(\n property: GenericHookType<ComputedPropertyDefinition>,\n options?: Partial<GenericHookOptions>\n) {\n return hookGeneric<ComputedPropertyDefinition>(property, HOOK_COMPUTED_PROPERTY, options);\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ComputedPropertiesService extends ExtensionPointForPlugins<ComputedPropertyDefinition> {\n private groupService = inject(GroupService);\n\n constructor(\n rootInjector: Injector,\n private router: Router,\n plugins: PluginsResolveService\n ) {\n super(rootInjector, plugins);\n this.items$ = this.setupItemsObservable();\n }\n\n /**\n * Returns the current state.\n * @readonly\n * @returns The current set of computed properties.\n */\n get state(): Set<ComputedPropertyDefinition> {\n return this.state$.value;\n }\n\n add(propertyDef: ComputedPropertyDefinition) {\n this.state.add(propertyDef);\n this.emitNewState();\n }\n\n getByName(name: string): Promise<ComputedPropertyDefinition> {\n if (!name) {\n return Promise.resolve(undefined);\n }\n return firstValueFrom(\n this.items$.pipe(\n mergeMap((propertyDefs: ComputedPropertyDefinition[]) => propertyDefs),\n filter((propertyDef: ComputedPropertyDefinition) => propertyDef.name === name),\n take(1)\n )\n );\n }\n\n getByContext(asset: ComputedPropertyContextValue): Promise<ComputedPropertyDefinition[]> {\n if (!asset) {\n return Promise.resolve([]);\n }\n const computedPropertyContextType: ComputedPropertyContextType = this.getTypeOfContext(asset);\n\n return firstValueFrom(\n this.items$.pipe(\n map((propertyDefs: ComputedPropertyDefinition[]) =>\n propertyDefs.filter((propertyDef: ComputedPropertyDefinition) => {\n if (!propertyDef.contextType) {\n return true;\n }\n return propertyDef.contextType.includes(computedPropertyContextType);\n })\n )\n )\n );\n }\n\n private getTypeOfContext(context: ComputedPropertyContextValue): ComputedPropertyContextType {\n const isEvent = (item: IAlarm | IEvent): item is IEvent => !('severity' in item);\n const isAlarm = (item: IAlarm | IEvent): item is IAlarm => 'severity' in item;\n\n if (this.groupService.isDevice(context as IManagedObject)) {\n return 'device';\n } else if (\n this.groupService.isGroup(context as IManagedObject) &&\n !this.groupService.isAsset(context as IManagedObject)\n ) {\n return 'group';\n } else if (this.groupService.isAsset(context as IManagedObject)) {\n return 'asset';\n } else if (isAlarm(context as IAlarm | IEvent)) {\n return 'alarm';\n } else if (isEvent(context as IAlarm | IEvent)) {\n return 'event';\n }\n }\n\n protected setupItemsObservable(): Observable<ComputedPropertyDefinition[]> {\n return fromTriggerOnce<ComputedPropertyDefinition>(this.router, this.refresh$, [\n getInjectedHooks<ComputedPropertyDefinition>(HOOK_COMPUTED_PROPERTY, this.injectors),\n () => this.factories,\n stateToFactory(this.state$)\n ]).pipe(distinctUntilChanged(), shareReplay(1));\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { IManagedObject, InventoryService, IResultList } from '@c8y/client';\nimport { AlertService, AssetTypesRealtimeService, GroupService } from '@c8y/ngx-components';\nimport { isObjectLike, isEmpty, forOwn, isArray, find } from 'lodash-es';\nimport { firstValueFrom } from 'rxjs';\nimport {\n AssetPropertyType,\n C8yJsonSchemaProperty,\n NestedPropertyFields\n} from './asset-properties.model';\nimport { ComputedPropertiesService } from './computed-properties.service';\n/**\n * Service for managing asset properties.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AssetPropertiesService {\n private readonly FRAGMENTS_TO_OMIT = [\n 'additionParents',\n 'assetParents',\n 'deviceParents',\n 'childAdditions',\n 'childAssets',\n 'childDevices',\n 'c8y_IsDevice',\n '__children',\n 'c8y_ui',\n 'self',\n 'parent',\n 'c8y_DataPoint',\n 'c8y_Kpi_Migrated',\n /^c8y_Dashboard!\\d+/\n ];\n\n private inventoryService = inject(InventoryService);\n private assetTypesRealtimeService = inject(AssetTypesRealtimeService);\n private groupService = inject(GroupService);\n private alert = inject(AlertService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n\n /**\n * Filters added properties to only include those compatible with the given asset.\n * Currently only checks compatibility for computed properties.\n * @param allAddedProperties All properties that have been added by the user\n * @param asset The current asset context\n * @returns Promise resolving to properties compatible with the asset\n */\n async filterCompatibleProperties(\n allAddedProperties: AssetPropertyType[],\n asset: IManagedObject\n ): Promise<AssetPropertyType[]> {\n if (!asset || !allAddedProperties.length) {\n return allAddedProperties;\n }\n\n let availableComputedPropertyNames: Set<string> | null = null;\n const computedProperties = allAddedProperties.filter(prop => prop.computed);\n\n if (computedProperties.length > 0) {\n const availableComputedProperties = await this.computedPropertiesService.getByContext(asset);\n availableComputedPropertyNames = new Set(\n availableComputedProperties.map(({ prop }) => prop.name)\n );\n }\n\n const compatibleProperties: AssetPropertyType[] = [];\n\n for (const property of allAddedProperties) {\n if (await this.isPropertyAvailable(property, availableComputedPropertyNames)) {\n compatibleProperties.push(property);\n }\n }\n\n return compatibleProperties;\n }\n\n /**\n * Retrieves properties for an asset from asset library.\n * @param asset The asset for which to retrieve custom properties.\n * @returns A promise resolving to the list of custom properties.\n */\n async requestAssetProperties(asset: IManagedObject): Promise<IManagedObject[]> {\n if (asset && asset.type) {\n const assetType = await firstValueFrom(\n this.assetTypesRealtimeService.getAssetTypeByName$(asset.type)\n );\n if (assetType) {\n const { data } = await this.inventoryService.childAdditionsList(assetType, {\n pageSize: 2000,\n query: \"$filter=(has('c8y_IsAssetProperty'))\"\n });\n return data;\n }\n }\n return [];\n }\n\n /**\n * Retrieves the initial set of properties for an asset, based on its type.\n * @param asset The asset for which to retrieve properties.\n * @returns A promise resolving to the list of initial properties.\n */\n async getInitialProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n if (!asset) {\n return [];\n } else if (this.groupService.isDevice(asset)) {\n return await this.getDeviceProperties(asset);\n } else if (this.groupService.isGroup(asset) && !this.groupService.isAsset(asset)) {\n return await this.getGroupProperties(asset);\n } else if (this.groupService.isAsset(asset)) {\n return await this.getAssetProperties(asset);\n }\n return [];\n }\n\n /**\n * Retrieves properties for a device asset.\n * @param asset The device asset for which to retrieve properties.\n * @returns A promise resolving to the list of device properties.\n */\n async getDeviceProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n return this.getManagedObjectProperties(asset);\n }\n\n /**\n * Retrieves properties for a group asset.\n * @param asset The group asset for which to retrieve properties.\n * @returns A promise resolving to the list of group properties.\n */\n async getGroupProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n return this.getManagedObjectProperties(asset);\n }\n\n /**\n * Retrieves properties for a regular asset.\n * @param asset The asset for which to retrieve properties.\n * @returns A promise resolving to the list of asset properties.\n */\n async getAssetProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n const customProperties =\n this.categorizeCustomProperties(await this.requestAssetProperties(asset)) || [];\n return customProperties;\n }\n\n /**\n * Categorizes custom properties into simple and complex types.\n * @param properties The custom properties to categorize.\n * @returns The categorized custom properties.\n */\n categorizeCustomProperties(properties: IManagedObject[]): AssetPropertyType[] {\n const { simple, complex } = properties.reduce(\n (acc, property) => {\n const schema = property.c8y_JsonSchema.properties[property.name];\n if (schema.type === 'object') {\n acc.complex.push(property);\n } else {\n acc.simple.push(property);\n }\n return acc;\n },\n { simple: [], complex: [] }\n );\n\n return [...simple, ...complex] as AssetPropertyType[];\n }\n\n /**\n * Categorizes and flattens hierarchical properties into simple and complex types.\n * @param properties The hierarchical properties to categorize and flatten.\n * @returns The categorized and flattened properties.\n */\n categorizeAndFlattenHierarchicalProperties(properties: AssetPropertyType[]): {\n computed: AssetPropertyType[];\n simple: AssetPropertyType[];\n complex: AssetPropertyType[];\n } {\n const sortedProperties = [...properties].sort((a, b) => {\n const aLabel = (a.label || a.name || '').toLowerCase();\n const bLabel = (b.label || b.name || '').toLowerCase();\n return aLabel.localeCompare(bLabel);\n });\n const result = sortedProperties.reduce(\n (acc, property) => {\n property.active = false;\n if (property.computed) {\n acc.computed.push(property);\n } else if (this.isComplexProperty(property)) {\n acc.complex.push(property);\n this.addNestedProperties(property, acc.complex, true);\n } else {\n acc.simple.push(property);\n }\n return acc;\n },\n { computed: [], simple: [], complex: [] }\n );\n return result;\n }\n\n /**\n * Checks if a property is complex (i.e., has nested properties).\n * @param property The property to check.\n * @returns True if the property is complex, false otherwise.\n */\n isComplexProperty(property: AssetPropertyType): boolean {\n return (\n property.c8y_JsonSchema?.properties[property.name]?.type === 'object' ||\n property.properties !== undefined\n );\n }\n\n /**\n * Checks if property is available based on provided available computed property names.\n * @param property The property to check.\n * @param availableComputedPropertyNames Set of available computed property names.\n * @returns True if the property is available, false otherwise.\n */\n async isPropertyAvailable(\n property: AssetPropertyType,\n availableComputedPropertyNames: Set<string>\n ): Promise<boolean> {\n if (property.computed) {\n if (!availableComputedPropertyNames) {\n return false;\n }\n return availableComputedPropertyNames.has(property.name);\n }\n\n return true;\n }\n\n /**\n * Checks if two properties match for selection purposes.\n * @param property1 First property to compare.\n * @param property2 Second property to compare.\n * @returns True if properties match.\n */\n propertiesMatch(property1: AssetPropertyType, property2: AssetPropertyType): boolean {\n if (property1.name === property2.name) {\n const keyPath1 = (property1 as NestedPropertyFields).keyPath;\n const keyPath2 = (property2 as NestedPropertyFields).keyPath;\n\n if (keyPath1 && keyPath2) {\n return keyPath1.join('.') === keyPath2.join('.');\n } else if (!keyPath1 && !keyPath2) {\n if (\n property1.computed &&\n property2.computed &&\n property1.instanceId &&\n property2.instanceId\n ) {\n return property1.instanceId === property2.instanceId;\n }\n return true;\n }\n }\n return false;\n }\n\n /**\n * Retrieves custom properties from the properties library, optionally filtered by search text.\n * @param searchText Optional search text to filter properties.\n * @returns A promise resolving to the list of properties and paging information.\n */\n async getPropertiesFromPropertiesLibrary(searchText?: string) {\n const propertiesFromLibrary: AssetPropertyType[] = [];\n const { data: propertiesMOs, paging } =\n await this.requestPropertiesFromPropertiesLibrary(searchText);\n propertiesMOs.forEach(prop => {\n const name = Object.keys(prop.c8y_JsonSchema.properties)[0];\n propertiesFromLibrary.push({\n c8y_JsonSchema: prop.c8y_JsonSchema,\n label: prop.name,\n name,\n type: prop.c8y_JsonSchema.properties[name].type\n });\n });\n return { propertiesFromLibrary, paging };\n }\n\n private async requestPropertiesFromPropertiesLibrary(\n searchText?: string\n ): Promise<IResultList<IManagedObject>> {\n let queryFilter = '(type eq c8y_JsonSchema) and (appliesTo.MANAGED_OBJECTS eq true)';\n\n if (searchText?.trim()) {\n const escapedSearchText = searchText.replace(/'/g, \"''\");\n queryFilter += ` and (name eq '*${escapedSearchText}*')`;\n }\n\n const query = `$filter=(${queryFilter})`;\n const filter = {\n pageSize: 20,\n revert: true,\n query,\n withTotalPages: true,\n withTotalElements: true\n };\n try {\n const results = await this.inventoryService.list(filter);\n return results;\n } catch (error) {\n this.alert.addServerFailure(error);\n return null;\n }\n }\n\n private addNestedProperties(\n parentProperty: AssetPropertyType,\n complexProperties: AssetPropertyType[],\n sortChildren = false\n ): void {\n const schema = parentProperty.c8y_JsonSchema?.properties[parentProperty.name];\n if (!schema?.properties) {\n return;\n }\n this.flattenProperties(schema, complexProperties, parentProperty.name, [], sortChildren);\n }\n\n private flattenProperties(\n schema: C8yJsonSchemaProperty,\n result: AssetPropertyType[],\n parentName: string,\n parentPath: string[] = [],\n sortChildren = false\n ): void {\n const properties = schema.properties?.[parentName]?.properties || schema.properties;\n let entries = Object.entries(properties);\n if (sortChildren) {\n entries = entries.sort((a, b) => {\n const aLabel = (a[1].title || a[1].label || a[1].name || a[0] || '').toLowerCase();\n const bLabel = (b[1].title || b[1].label || b[1].name || b[0] || '').toLowerCase();\n return aLabel.localeCompare(bLabel);\n });\n }\n entries.forEach(([key, property]) => {\n const path = parentPath.includes(parentName) ? parentPath : [...parentPath, parentName];\n result.push({ ...property, keyPath: [...path, key] } as AssetPropertyType);\n if (property.properties) {\n this.flattenProperties(\n { properties: { [key]: property } } as C8yJsonSchemaProperty,\n result,\n key,\n [...path, key],\n sortChildren\n );\n }\n });\n }\n\n private getManagedObjectProperties(asset: IManagedObject): AssetPropertyType[] {\n return this.extractFragments(asset);\n }\n\n private extractFragments(object: IManagedObject): AssetPropertyType[] {\n const properties = [];\n for (const [key, value] of Object.entries(object)) {\n if (\n this.shouldSkipFragment(key) ||\n isArray(value) ||\n (isObjectLike(value) && isEmpty(value))\n ) {\n continue;\n }\n const newProp = {\n label: key,\n name: key,\n type: isObjectLike(value) ? 'object' : 'string',\n isEditable: true,\n c8y_JsonSchema: {\n properties: {\n [key]: {\n key: key,\n type: isObjectLike(value) ? 'object' : 'string',\n label: key,\n properties: {}\n }\n }\n }\n };\n\n if (isObjectLike(value)) {\n this.addPropertyItem(newProp.c8y_JsonSchema.properties[key].properties, value);\n }\n\n properties.push(newProp);\n }\n\n return properties;\n }\n\n private shouldSkipFragment(key: string): boolean {\n return !!find(this.FRAGMENTS_TO_OMIT, (fragmentToOmit: string | RegExp) => {\n if (fragmentToOmit instanceof RegExp) {\n return fragmentToOmit.test(key);\n }\n return fragmentToOmit === key;\n });\n }\n\n private addPropertyItem(properties, object) {\n if (!properties) {\n return;\n }\n forOwn(object, (value, key) => {\n properties[key] = { title: key, type: value ? typeof value : 'string' };\n if (isObjectLike(value)) {\n properties[key].type = 'object';\n this.addPropertyItem(properties[key]['properties'], value);\n }\n });\n }\n}\n","import { DataSource } from '@angular/cdk/collections';\nimport { AssetPropertyType } from '../asset-properties.model';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport interface AssetPropertyFlatNode {\n expandable: boolean;\n level: number;\n property: AssetPropertyType;\n isVisible: boolean;\n indeterminate?: boolean;\n contextAssetId?: string;\n}\n\nexport class FlatTreeDataSource extends DataSource<AssetPropertyFlatNode> {\n private _dataChange = new BehaviorSubject<AssetPropertyFlatNode[]>([]);\n\n constructor() {\n super();\n }\n\n get data(): AssetPropertyFlatNode[] {\n return this._dataChange.value;\n }\n\n set data(value: AssetPropertyFlatNode[]) {\n this._dataChange.next(value);\n }\n\n connect(): Observable<AssetPropertyFlatNode[]> {\n return this._dataChange.asObservable();\n }\n\n disconnect(): void {\n // No need to unsubscribe from the _dataChange subject since it's a BehaviorSubject\n }\n}\n","import { Directive, ElementRef, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[c8yAssetPropertyAction]',\n standalone: true\n})\nexport class AssetPropertyActionDirective {\n constructor(\n public template: TemplateRef<unknown>,\n public elementRef: ElementRef,\n public viewContainer: ViewContainerRef\n ) {}\n}\n","import { inject, Injector, Pipe, runInInjectionContext } from '@angular/core';\nimport { AssetPropertyType, ComputedPropertyContextValue } from '../asset-properties.model';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport { get } from 'lodash-es';\nimport { ComputedPropertiesService } from '../computed-properties.service';\nimport { from, isObservable, map, Observable, of, switchMap } from 'rxjs';\n\n/**\n * Formats the value of an asset property.\n * If the property is complex, it will be stringified.\n * If the property has a keyPath, it will be used to retrieve the value from the asset.\n * Otherwise, the value will be taken directly from the asset.\n * If the value is null or undefined, a dash ('-') will be returned.\n */\n@Pipe({\n name: 'c8yAssetPropertyValue',\n standalone: true\n})\nexport class AssetPropertyValuePipe {\n private assetPropertiesService = inject(AssetPropertiesService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n private injector = inject(Injector);\n\n transform(\n property: AssetPropertyType,\n context: ComputedPropertyContextValue\n ): Promise<string> | Observable<string> {\n if (property.computed) {\n return this.getCallbackComputedPropertyValue(property, context).pipe(\n map(val => this.formatPropertyValue(val))\n );\n }\n\n if (!property) {\n return of('-');\n }\n let value: string;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n value = JSON.stringify(context[property.name]);\n } else if ('keyPath' in property) {\n value = this.formatPropertyValue(get(context, property.keyPath));\n } else {\n value = this.formatPropertyValue(context[property.name]);\n }\n return of(value ?? '-');\n }\n\n private formatPropertyValue(value: any): string {\n if (value == null) {\n return null;\n }\n return typeof value === 'string' ? value : JSON.stringify(value);\n }\n\n private getCallbackComputedPropertyValue(\n property: AssetPropertyType,\n context: ComputedPropertyContextValue\n ): any | Promise<any> | Observable<any> {\n return from(this.computedPropertiesService.getByName(property.name)).pipe(\n switchMap(definition => {\n let value: any | Observable<any> | Promise<any> = '-';\n runInInjectionContext(definition.injector || this.injector, () => {\n value = definition.value({ config: property.config, context });\n });\n\n if (isObservable(value) || value instanceof Promise) {\n return value;\n } else {\n return of(value);\n }\n })\n );\n }\n}\n","import { Pipe } from '@angular/core';\nimport { AssetPropertyType } from '../asset-properties.model';\n\n/**\n * Pipe to transform asset property types into icon names.\n * Maps various property types to corresponding icon names.\n */\n@Pipe({\n name: 'c8yAssetPropertyIcon',\n standalone: true\n})\nexport class AssetPropertyIconPipe {\n transform(assetProperty: AssetPropertyType): string {\n if (assetProperty.computed) {\n return 'bolt';\n }\n const type = assetProperty.type;\n switch (type) {\n case 'string':\n return 'string';\n case 'number':\n return 'hashtag';\n case 'boolean':\n return 'true-false';\n case 'date':\n return 'calendar';\n case 'object':\n case 'c8y_JsonSchema':\n return 'c8y-css';\n case 'enum':\n return 'content';\n case 'file':\n return 'file';\n case 'integer':\n return 'unit';\n default:\n return 'mix-words';\n }\n }\n}\n","import { inject, Pipe } from '@angular/core';\nimport { AssetPropertyType, C8yPropertyType } from '../asset-properties.model';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\n\n/**\n * A pipe that transforms an asset property type into a tooltip string.\n * If the property is temporary, it appends \"(temporary)\" to the type and handles translation.\n * Otherwise, it returns the type as is.\n */\n@Pipe({\n name: 'c8yAssetPropertyIconTooltip',\n standalone: true\n})\nexport class AssetPropertyIconTooltipPipe {\n private translateService = inject(TranslateService);\n\n transform(property: AssetPropertyType): string | C8yPropertyType {\n if (!property) {\n return '';\n } else if (property.temporary) {\n return this.translateService.instant(gettext('{{assetPropertyType}}\\n(temporary)'), {\n assetPropertyType: property.type\n });\n } else {\n return property.type;\n }\n }\n}\n","import {\n Component,\n ComponentRef,\n EnvironmentInjector,\n inject,\n Injector,\n Input,\n reflectComponentType,\n Type,\n effect,\n viewChildren,\n ViewContainerRef\n} from '@angular/core';\nimport {\n AssetPropertyType,\n ComputedPropertyComponent,\n ComputedPropertyDefinition\n} from '../asset-properties.model';\nimport { C8yTranslatePipe, IconDirective, isPromise, OnBeforeSave } from '@c8y/ngx-components';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport { firstValueFrom, from, isObservable, Observable, of } from 'rxjs';\nimport { isUndefined } from 'lodash-es';\nimport { NgFor } from '@angular/common';\nimport { IManagedObject } from '@c8y/client';\n\ninterface PropertyConfig {\n property: AssetPropertyType;\n definition: ComputedPropertyDefinition;\n config: unknown;\n componentRef?: ComponentRef<Component>;\n componentInstance?: ComputedPropertyComponent;\n}\n\n@Component({\n selector: 'c8y-computed-properties-config',\n templateUrl: './computed-properties-config.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, IconDirective, FormsModule, NgFor]\n})\nexport class ComputedPropertiesConfigComponent {\n @Input() properties: AssetPropertyType[] = [];\n @Input() definitions: ComputedPropertyDefinition[] = [];\n @Input() asset?: IManagedObject;\n\n hosts = viewChildren('host', { read: ViewContainerRef });\n configForms = viewChildren('configForm', { read: NgForm });\n\n propertyConfigs: PropertyConfig[] = [];\n result: Promise<unknown[]> = new Promise((resolve, reject) => {\n this._close = resolve;\n this._cancel = reject;\n });\n\n private injector = inject(Injector);\n private bsModalRef = inject(BsModalRef);\n private _close: (value: unknown[]) => void;\n private _cancel: (reason?: any) => void;\n\n constructor() {\n effect(async () => {\n const hosts = this.hosts();\n if (!hosts || hosts.length === 0) {\n return;\n }\n for (let i = 0; i < this.propertyConfigs.length; i++) {\n const propertyConfig = this.propertyConfigs[i];\n const host = hosts[i];\n if (host && propertyConfig.definition) {\n await this.createConfigComponent(propertyConfig, host);\n }\n }\n });\n }\n\n ngOnInit() {\n this.propertyConfigs = this.properties.map((property, index) => ({\n property,\n definition: this.definitions[index],\n config: property.config || this.definitions[index].prop.config\n }));\n }\n\n get isFormValid(): boolean {\n return this.configForms().every(form => form.valid) ?? false;\n }\n\n async apply(): Promise<void> {\n const allValid = await this.callOnBeforeSaveHooks();\n if (allValid) {\n const configs = this.propertyConfigs.map(pc => pc.config);\n this._close(configs);\n this.bsModalRef.hide();\n }\n }\n\n cancel(): void {\n this.bsModalRef.hide();\n this._cancel();\n }\n\n private async createConfigComponent(\n propertyConfig: PropertyConfig,\n host: ViewContainerRef\n ): Promise<void> {\n const component = await this.getComponent(propertyConfig.definition);\n host.clear();\n const componentRef = host.createComponent(component, {\n environmentInjector: this.injector as EnvironmentInjector\n });\n\n propertyConfig.componentRef = componentRef;\n propertyConfig.componentInstance = componentRef.instance as ComputedPropertyComponent;\n\n const componentMetadata = this.safeReflectComponentType(component);\n const hasConfigInput = componentMetadata?.inputs.some(input => input.propName === 'config');\n\n if (hasConfigInput) {\n componentRef.setInput('config', propertyConfig.config);\n } else {\n propertyConfig.componentInstance.config = propertyConfig.config;\n }\n\n const hasAssetInput = componentMetadata?.inputs.some(input => input.propName === 'asset');\n if (hasAssetInput) {\n componentRef.setInput('asset', this.asset);\n } else {\n propertyConfig.componentInstance.asset = this.asset;\n }\n }\n\n private safeReflectComponentType(componentType: Type<any>) {\n try {\n return reflectComponentType(componentType);\n } catch (error) {\n console.warn('Failed to reflect component metadata:', error);\n return { inputs: [] };\n }\n }\n\n private async getComponent(definition: ComputedPropertyDefinition): Promise<Type<any>> {\n if (!!definition.loadConfigComponent) {\n return await definition.loadConfigComponent();\n } else if (!!definition.configComponent) {\n return definition.configComponent;\n }\n }\n\n private async callOnBeforeSaveHooks(): Promise<boolean> {\n const validationObservables = this.propertyConfigs\n .filter(pc => pc.componentRef)\n .map(pc => this.callSingleOnBeforeSaveHook(pc.componentRef, pc.config));\n\n try {\n const validationPromises = validationObservables.map(obs => firstValueFrom(obs));\n const results = await Promise.all(validationPromises);\n return results.every(result => result === true);\n } catch (error) {\n return false;\n }\n }\n\n private callSingleOnBeforeSaveHook(\n componentRef: ComponentRef<Component>,\n config: unknown\n ): Observable<boolean> {\n if (!componentRef) {\n return of(true);\n }\n const hook = (componentRef.instance as OnBeforeSave).onBeforeSave;\n if (hook) {\n const result = hook.call(componentRef.instance, config);\n if (isUndefined(result)) {\n return of(true);\n }\n if (isPromise(result)) {\n return from(result) as Observable<boolean>;\n }\n return (isObservable(result) ? result : of(result)) as Observable<boolean>;\n }\n return of(true);\n }\n}\n","<div class=\"viewport-modal has-asset-selector\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'bolt'\"></i>\n <div\n class=\"modal-title\"\n id=\"modal-title\"\n translate\n >\n Configure computed properties\n </div>\n </div>\n <div\n class=\"inner-scroll\"\n id=\"modal-body\"\n >\n <p\n class=\"p-t-16 p-l-24 p-r-24 p-b-16 bg-component separator-bottom sticky-top text-center text-balance\"\n translate\n >\n Configure the settings below for each computed property. These configurations determine how\n the properties will be calculated and displayed. All required fields must be completed before\n you can apply the changes.\n </p>\n <div class=\"p-24 p-t-0\">\n <fieldset\n class=\"property-config-section c8y-fieldset p-b-8\"\n *ngFor=\"let propertyConfig of propertyConfigs; let i = index\"\n >\n <legend>\n {{ (propertyConfig.property.label || propertyConfig.property.name) | translate }}\n <span class=\"a-s-center m-l-8 tag tag--default\">{{ propertyConfig.property.name }}</span>\n </legend>\n <form\n class=\"property-config-form\"\n name=\"configForm{{ i }}\"\n #configForm=\"ngForm\"\n >\n <ng-template #host></ng-template>\n </form>\n </fieldset>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n [title]=\"'Cancel' | translate\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n [title]=\"'Apply' | translate\"\n type=\"button\"\n (click)=\"apply()\"\n [disabled]=\"!isFormValid\"\n >\n {{ 'Apply' | translate }}\n </button>\n </div>\n</div>\n","import { inject, Pipe } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AssetPropertyFlatNode } from './tree-data-source';\n\n/**\n * Pipe to get the title for the collapse/expand button of a tree node.\n */\n@Pipe({\n name: 'c8yAssetPropertyCollapseButtonTitle',\n standalone: true\n})\nexport class AssetPropertyCollapseButtonTitlePipe {\n private collapseLabel = gettext('Collapse \"{{ assetPropertyLabel }}\"');\n private expandLabel = gettext('Expand \"{{ assetPropertyLabel }}\"');\n private readonly translateService = inject(TranslateService);\n\n transform(expanded: boolean, node: AssetPropertyFlatNode): string {\n if (!node) {\n return '';\n } else {\n const template = expanded ? this.collapseLabel : this.expandLabel;\n const assetPropertyLabel = node.property.label || node.property.title || node.property.name;\n return this.translateService.instant(template, {\n assetPropertyLabel: this.translateService.instant(assetPropertyLabel)\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetPropertyFlatNode } from './tree-data-source';\nimport { NestedPropertyFields } from '../asset-properties.model';\n\nexport interface DragDropContext {\n draggedNode: AssetPropertyFlatNode;\n previousIndex: number;\n currentIndex: number;\n data: AssetPropertyFlatNode[];\n}\n\nexport interface DropPosition {\n targetLevel: number;\n targetParentPath: string;\n insertIndex: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AssetPropertyDragDropService {\n /**\n * Main method to handle the drag and drop operation\n */\n handleDrop(context: DragDropContext): AssetPropertyFlatNode[] | null {\n if (context.previousIndex === context.currentIndex) {\n return null;\n }\n\n if (!this.validateDrop(context)) {\n return null;\n }\n\n return this.performMove(context);\n }\n\n /**\n * Validates if the drop operation is allowed\n */\n private validateDrop(context: DragDropContext): boolean {\n const { draggedNode } = context;\n\n // Get source and target information\n const draggedLevel = this.getNodeLevel(draggedNode);\n const dropPosition = this.calculateDropPosition(context);\n\n // Validation 1: Check level compatibility\n if (!this.validateLevelCompatibility(draggedLevel, dropPosition.targetLevel)) {\n return false;\n }\n\n // Validation 2: For children, check parent compatibility\n if (draggedLevel > 0) {\n if (\n !this.validateParentCompatibility(draggedNode, dropPosition.targetParentPath, draggedLevel)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Validates that source and target levels match\n */\n private validateLevelCompatibility(sourceLevel: number, targetLevel: number): boolean {\n return sourceLevel === targetLevel;\n }\n\n /**\n * Validates that child nodes stay within their parent\n */\n private validateParentCompatibility(\n node: AssetPropertyFlatNode,\n targetParentPath: string,\n nodeLevel: number\n ): boolean {\n const sourceParentPath = this.getParentPath(node, nodeLevel);\n return !!targetParentPath && sourceParentPath === targetParentPath;\n }\n\n /**\n * Performs the actual move operation\n */\n private performMove(context: DragDropContext): AssetPropertyFlatNode[] {\n const { draggedNode } = context;\n\n return this.isExpandableNode(draggedNode)\n ? this.moveNodeWithChildren(context)\n : this.moveSingleNode(context);\n }\n\n /**\n * Moves a single node without children\n */\n private moveSingleNode(context: DragDropContext): AssetPropertyFlatNode[] {\n const result = [...context.data];\n const [removed] = result.splice(context.previousIndex, 1);\n result.splice(context.currentIndex, 0, removed);\n return result;\n }\n\n /**\n * Moves a parent node along with all its children\n */\n private moveNodeWithChildren(context: DragDropContext): AssetPropertyFlatNode[] {\n const { draggedNode, previousIndex, currentIndex, data } = context;\n\n // Find all children of the parent\n const childIndices = this.findChildIndices(draggedNode, data, previousIndex);\n\n // Collect all nodes to move (parent + children)\n const nodesToMove = this.collectNodesToMove(data, previousIndex, childIndices);\n\n // Remove nodes from their current position\n const remainingNodes = this.removeNodesFromData(data, previousIndex, childIndices);\n\n // Calculate adjusted insertion index\n const insertIndex = this.calculateAdjustedInsertIndex(\n previousIndex,\n currentIndex,\n childIndices\n );\n\n // Insert nodes at new position\n remainingNodes.splice(insertIndex, 0, ...nodesToMove);\n\n return remainingNodes;\n }\n\n /**\n * Finds indices of all children of a parent node\n */\n private findChildIndices(\n parentNode: AssetPropertyFlatNode,\n data: AssetPropertyFlatNode[],\n parentIndex: number\n ): number[] {\n const childIndices: number[] = [];\n const parentKey = this.getNodeKey(parentNode);\n const parentLevel = this.getNodeLevel(parentNode);\n\n for (let i = parentIndex + 1; i < data.length; i++) {\n const node = data[i];\n\n if (node.level <= parentLevel) {\n // Reached a sibling or parent level - no more children\n break;\n }\n\n if (this.isChildOfParent(node, parentKey, parentLevel)) {\n childIndices.push(i);\n }\n }\n\n return childIndices;\n }\n\n /**\n * Collects parent and children nodes to move\n */\n private collectNodesToMove(\n data: AssetPropertyFlatNode[],\n parentIndex: number,\n childIndices: number[]\n ): AssetPropertyFlatNode[] {\n const nodes = [data[parentIndex]];\n childIndices.forEach(index => nodes.push(data[index]));\n return nodes;\n }\n\n /**\n * Removes nodes from data array\n */\n private removeNodesFromData(\n data: AssetPropertyFlatNode[],\n parentIndex: number,\n childIndices: number[]\n ): AssetPropertyFlatNode[] {\n const indicesToRemove = new Set([parentIndex, ...childIndices]);\n return data.filter((_, index) => !indicesToRemove.has(index));\n }\n\n /**\n * Calculates the adjusted insertion index when moving with children\n */\n private calculateAdjustedInsertIndex(\n previousIndex: number,\n targetIndex: number,\n childIndices: number[]\n ): number {\n if (targetIndex <= previousIndex) {\n // Moving up - no adjustment needed\n return targetIndex;\n }\n\n // Moving down - adjust for removed children\n const lastChildIndex =\n childIndices.length > 0 ? childIndices[childIndices.length - 1] : previousIndex;\n\n // Check if dropping within own children (only when children are visible)\n // After parent removal, children shift down by 1, so last child is at lastChildIndex - 1\n if (childIndices.length > 0 && targetIndex <= lastChildIndex - 1) {\n // Target is within our own children - no real move\n return previousIndex;\n }\n\n // Adjust for the number of removed children\n // currentIndex accounts for parent removal, we need to adjust for children\n return targetIndex - childIndices.length;\n }\n\n /**\n * Calculates the drop position details\n */\n private calculateDropPosition(context: DragDropContext): DropPosition {\n const { draggedNode, currentIndex, data, previousIndex } = context;\n const draggedLevel = this.getNodeLevel(draggedNode);\n\n // Create simulated data with item removed\n const simulatedData = [...data];\n simulatedData.splice(previousIndex, 1);\n\n // Calculate target level\n const targetLevel = this.calculateTargetLevel(simulatedData, currentIndex, draggedLevel);\n\n // Calculate target parent path for child nodes\n const targetParentPath =\n draggedLevel > 0 ? this.findTargetParentPath(simulatedData, currentIndex, draggedLevel) : '';\n\n return {\n targetLevel,\n targetParentPath,\n insertIndex: currentIndex\n };\n }\n\n /**\n * Determines the expected level at the target position\n */\n private calculateTargetLevel(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n draggedLevel: number\n ): number {\n // Handle edge cases\n if (targetIndex === 0) {\n return 0;\n }\n\n if (targetIndex >= simulatedData.length) {\n return this.calculateEndPositionLevel(simulatedData, draggedLevel);\n }\n\n // Handle middle positions\n return this.calculateMiddlePositionLevel(simulatedData, targetIndex, draggedLevel);\n }\n\n /**\n * Calculates level for end position drops\n */\n private calculateEndPositionLevel(\n simulatedData: AssetPropertyFlatNode[],\n draggedLevel: number\n ): number {\n if (simulatedData.length === 0) {\n return 0;\n }\n\n const lastItem = simulatedData[simulatedData.length - 1];\n\n // Allow root items to be placed after child groups\n if (lastItem.level > 0 && draggedLevel === 0) {\n return 0;\n }\n\n return lastItem.level;\n }\n\n /**\n * Calculates level for middle position drops\n */\n private calculateMiddlePositionLevel(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n draggedLevel: number\n ): number {\n const prevItem = simulatedData[targetIndex - 1];\n const nextItem = simulatedData[targetIndex];\n\n // Check for boundary positions\n if (this.isBoundaryPosition(prevItem, nextItem)) {\n return this.handleBoundaryPosition(prevItem, nextItem, draggedLevel);\n }\n\n // Check for parent-first-child position\n if (this.isParentFirstChildPosition(prevItem, nextItem)) {\n return nextItem.level;\n }\n\n // Default to previous item's level\n return prevItem?.level || 0;\n }\n\n /**\n * Finds the parent path for the target position\n */\n private findTargetParentPath(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n targetLevel: number\n ): string {\n // Look at surrounding items\n const prevItem = targetIndex > 0 ? simulatedData[targetIndex - 1] : null;\n const nextItem = targetIndex < simulatedData.length ? simulatedData[targetIndex] : null;\n\n // Check if dropping after a parent (becoming first child)\n if (this.isDroppingAfterParent(prevItem, targetLevel)) {\n return this.getNodeKey(prevItem);\n }\n\n // Check siblings for parent path\n const siblingParentPath = this.getParentPathFromSiblings(prevItem, nextItem, targetLevel);\n\n if (siblingParentPath) {\n return siblingParentPath;\n }\n\n // Search backwards for parent\n return this.searchBackwardsForParent(simulatedData, targetIndex, targetLevel);\n }\n\n private getNodeLevel(node: AssetPropertyFlatNode): number {\n return node.level;\n }\n\n private getNodeKey(node: AssetPropertyFlatNode): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n return keyPath?.join('.') || node.property.name;\n }\n\n private getParentPath(node: AssetPropertyFlatNode, level: number): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n return keyPath?.slice(0, level).join('.') || '';\n }\n\n private isExpandableNode(node: AssetPropertyFlatNode): boolean {\n return node.expandable;\n }\n\n private isChildOfParent(\n node: AssetPropertyFlatNode,\n parentKey: string,\n parentLevel: number\n ): boolean {\n const nodeKeyPath = (node.property as NestedPropertyFields).keyPath;\n if (!nodeKeyPath) return false;\n\n const nodeParentPath = nodeKeyPath.slice(0, parentLevel + 1).join('.');\n return nodeParentPath === parentKey;\n }\n\n private isBoundaryPosition(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null\n ): boolean {\n return !!(prevItem && nextItem && prevItem.level > 0 && nextItem.level === 0);\n }\n\n private isParentFirstChildPosition(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null\n ): boolean {\n return !!(prevItem?.expandable && nextItem && nextItem.level > prevItem.level);\n }\n\n private isDroppingAfterParent(\n prevItem: AssetPropertyFlatNode | null,\n targetLevel: number\n ): boolean {\n return !!(prevItem?.expandable && prevItem.level === targetLevel - 1);\n }\n\n private handleBoundaryPosition(\n prevItem: AssetPropertyFlatNode,\n nextItem: AssetPropertyFlatNode,\n draggedLevel: number\n ): number {\n if (draggedLevel === 0) {\n return 0;\n }\n\n if (draggedLevel === prevItem.level) {\n // Additional validation could go here for same-parent check\n return prevItem.level;\n }\n\n return prevItem.level;\n }\n\n private getParentPathFromSiblings(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null,\n targetLevel: number\n ): string {\n if (prevItem?.level === targetLevel) {\n return this.getParentPath(prevItem, targetLevel);\n }\n\n if (nextItem?.level === targetLevel) {\n return this.getParentPath(nextItem, targetLevel);\n }\n\n return '';\n }\n\n private searchBackwardsForParent(\n data: AssetPropertyFlatNode[],\n startIndex: number,\n targetLevel: number\n ): string {\n for (let i = startIndex - 1; i >= 0; i--) {\n const node = data[i];\n\n if (node.level === targetLevel - 1 && node.expandable) {\n return this.getNodeKey(node);\n }\n\n if (node.level < targetLevel - 1) {\n break;\n }\n }\n\n return '';\n }\n}\n","import { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport { CdkDragDrop, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport {\n Component,\n ContentChild,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n effect,\n viewChild,\n SimpleChanges\n} from '@angular/core';\nimport {\n AssetPropertyListConfig,\n AssetPropertyType,\n ComputedPropertyDefinition,\n defaultAssetProperties,\n defaultAssetPropertyListConfig,\n NestedPropertyFields\n} from '../asset-properties.model';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport {\n C8yTranslatePipe,\n EmptyStateComponent,\n IconDirective,\n ListGroupModule\n} from '@c8y/ngx-components';\nimport { FormsModule } from '@angular/forms';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { IManagedObject } from '@c8y/client';\nimport { BehaviorSubject, debounceTime, Subject, takeUntil } from 'rxjs';\nimport { CdkTree, CdkTreeModule } from '@angular/cdk/tree';\nimport { AssetPropertyFlatNode, FlatTreeDataSource } from './tree-data-source';\nimport { AssetPropertyActionDirective } from './asset-property-action.directive';\nimport { AssetPropertyValuePipe } from './asset-property-value.pipe';\nimport { CustomPropertiesDrawerService } from '../custom-properties-drawer.service';\nimport { AssetPropertyIconPipe } from './asset-property-icon.pipe';\nimport { AssetPropertyIconTooltipPipe } from './asset-property-icon-tooltip.pipe';\nimport { ComputedPropertiesService } from '../computed-properties.service';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { ComputedPropertiesConfigComponent } from '../computed-properties-config/computed-properties-config.component';\nimport { AssetPropertyCollapseButtonTitlePipe } from './asset-property-collapse-button-title.pipe';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AssetPropertyDragDropService } from './asset-property-drag-drop.service';\n\n/**\n * Represents a list of asset properties with hierarchical tree structure.\n */\n@Component({\n selector: 'c8y-asset-property-list',\n templateUrl: './asset-property-list.component.html',\n standalone: true,\n imports: [\n NgClass,\n AsyncPipe,\n FormsModule,\n ListGroupModule,\n C8yTranslatePipe,\n TooltipModule,\n IconDirective,\n CdkTreeModule,\n NgTemplateOutlet,\n AssetPropertyValuePipe,\n EmptyStateComponent,\n AssetPropertyIconPipe,\n NgClass,\n AssetPropertyIconTooltipPipe,\n AssetPropertyCollapseButtonTitlePipe,\n CdkDropList,\n CdkDrag\n ]\n})\nexport class AssetPropertyListComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Reference to the CDdk tree component.\n */\n tree = viewChild<CdkTree<AssetPropertyFlatNode>>('tree');\n /**\n * Configuration for the asset property list.\n */\n @Input() config: AssetPropertyListConfig = {};\n /**\n * Managed object representing the asset.\n */\n @Input() asset!: IManagedObject;\n /**\n * Extra properties to be displayed in the list.\n */\n @Input() extraProperties: AssetPropertyType[] = [];\n /**\n * Emits the selected properties.\n */\n @Output() selectedProperties = new EventEmitter<AssetPropertyType[]>();\n /**\n * List of all properties.\n */\n properties: AssetPropertyType[] = [];\n /**\n * Text input for filtering properties.\n */\n filterText = '';\n /**\n * Data source for the tree structure.\n */\n dataSource = new FlatTreeDataSource();\n /**\n * Map of flat nodes for quick lookup.\n */\n flatNodeMap = new Map<string, AssetPropertyFlatNode>();\n /**\n * Indicates if all nodes are selected.\n */\n allSelected = false;\n /**\n * Indicates if the selection state is indeterminate.\n */\n indeterminate = false;\n /**\n * Directive for asset property actions.\n */\n @ContentChild(AssetPropertyActionDirective)\n assetPropertyAction: AssetPropertyActionDirective;\n hasExpandableNodes: boolean;\n areAllNodesExpanded: boolean;\n collapseAllLabel = gettext('Collapse all');\n expandAllLabel = gettext('Expand all');\n dragHandleEnabledLabel = gettext('Click and drag to reorder');\n dragHandleDisabledLabel = gettext('Clear filtering to reorder');\n get cdkDragDisabled() {\n return !!this.filterText;\n }\n\n readonly TREE_NODE_INDENT = 24;\n /**\n * Stores all nodes in their complete ordered state (source of truth for order)\n */\n private allNodesComplete: AssetPropertyFlatNode[] = [];\n /**\n * Tracks which parent nodes are expanded (key = node key, value = expanded state)\n */\n private expansionState = new Map<string, boolean>();\n /**\n * List of properties that have been added temporarily as custom properties.\n */\n private allAddedProperties: AssetPropertyType[] = [];\n /**\n * List of properties that have been added temporarily as custom properties filtered according to context asset.\n */\n private displayAddedProperties: AssetPropertyType[] = [];\n /**\n * Subject for handling filter input.\n */\n private filterSubject$ = new BehaviorSubject<string>('');\n /**\n * Subject for handling component destruction.\n */\n private destroy$ = new Subject<void>();\n /**\n * Service for managing asset properties.\n */\n private assetPropertiesService = inject(AssetPropertiesService);\n private customPropertiesDrawerService = inject(CustomPropertiesDrawerService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n private modalService = inject(BsModalService);\n private dragDropService = inject(AssetPropertyDragDropService);\n\n /**\n * Constructor initializes reactive effects for expansion modes.\n */\n constructor() {\n effect(() => {\n if (\n (this.config.expansionMode === 'nonCollapsible' ||\n this.config.expansionMode === 'expandedByDefault') &&\n this.tree()\n ) {\n queueMicrotask(() => {\n this.expandAllNodesInState();\n this.rebuildVisibleData();\n });\n }\n });\n }\n\n ngOnInit() {\n this.config = {\n ...defaultAssetPropertyListConfig,\n ...this.config\n };\n this.filterSubject$\n .pipe(takeUntil(this.destroy$), debounceTime(200))\n .subscribe(() => this.filterTree());\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes['asset'] && !changes['asset'].firstChange) {\n await this.updateDisplayAddedProperties();\n }\n const shouldRebuild = changes['asset'] || changes['extraProperties'];\n await this.updateProperties(!!shouldRebuild);\n }\n\n ngAfterViewInit() {\n if (this.config.selectMode === 'single') {\n this.selectedProperties.next([]);\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Fetches and categorizes properties.\n * @returns A promise resolving to the list of asset properties.\n */\n async getProperties(): Promise<AssetPropertyType[]> {\n if (this.asset) {\n return this.categorizeAndFlattenHierarchicalProperties(\n await this.assetPropertiesService.getInitialProperties(this.asset)\n );\n } else {\n if (this.config?.emptyStateContent === 'default-properties') {\n return this.categorizeAndFlattenHierarchicalProperties(defaultAssetProperties);\n } else if (Array.isArray(this.config?.emptyStateContent)) {\n return this.config.emptyStateContent;\n }\n }\n return [];\n }\n\n /**\n * Opens the drawer to add new custom properties.\n */\n async addProperty() {\n const propertiesToAdd = await this.customPropertiesDrawerService.getCustomProperties(\n this.asset\n );\n if (!propertiesToAdd || propertiesToAdd.length === 0) {\n return;\n }\n\n const propertiesNeedingConfig: AssetPropertyType[] = [];\n const definitionsNeedingConfig: ComputedPropertyDefinition[] = [];\n const propertiesToActuallyAdd: AssetPropertyType[] = [];\n\n for (const prop of propertiesToAdd) {\n if (prop.computed) {\n const definition = await this.computedPropertiesService.getByName(prop.name);\n if (definition.configComponent || definition.loadConfigComponent) {\n propertiesNeedingConfig.push(prop);\n definitionsNeedingConfig.push(definition);\n } else {\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n }\n } else {\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n }\n }\n\n if (propertiesNeedingConfig.length > 0) {\n try {\n const configs = await this.configureMultipleProperties(\n propertiesNeedingConfig,\n definitionsNeedingConfig\n );\n\n propertiesNeedingConfig.forEach((prop, index) => {\n prop.config = configs[index];\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n });\n } catch {}\n }\n\n if (propertiesToActuallyAdd.length === 0) {\n return;\n }\n\n propertiesToActuallyAdd.forEach(prop => {\n if (this.asset?.id) {\n prop.contextAssetId = this.asset.id;\n }\n // Generate instanceId for computed properties to allow multiple instances\n if (prop.computed && !prop.instanceId) {\n prop.instanceId = crypto.randomUUID();\n }\n });\n this.allAddedProperties = this.allAddedProperties.concat(propertiesToActuallyAdd);\n await this.updateDisplayAddedProperties();\n await this.updateProperties(false, propertiesToActuallyAdd);\n this.selectedProperties.next(\n this.dataSource.data.filter(n => n.property.active).map(n => n.property)\n );\n }\n\n /**\n * Displays the configuration modal for multiple computed properties and updates their configurations.\n * @param properties Properties to configure.\n * @param definitions Computed property definitions including config components.\n * @returns Promise resolving to array of configurations.\n */\n configureMultipleProperties(\n properties: AssetPropertyType[],\n definitions: ComputedPropertyDefinition[]\n ): Promise<unknown[]> {\n const modalRef = this.modalService.show(ComputedPropertiesConfigComponent, {\n ignoreBackdropClick: true,\n class: 'modal-lg',\n ariaDescribedby: 'modal-body',\n ariaLabelledBy: 'modal-title',\n initialState: {\n properties,\n definitions,\n asset: this.asset\n }\n }).content;\n return modalRef.result;\n }\n\n /**\n * Displays the configuration modal for a computed property and updates its configuration.\n * @param property Property to configure.\n * @param definition Computed property definition including config component.\n * @returns true if the property was configured, false if cancelled.\n */\n async configureProperty(\n property: AssetPropertyType,\n definition: ComputedPropertyDefinition\n ): Promise<boolean> {\n try {\n const configs = await this.configureMultipleProperties([property], [definition]);\n property.config = configs[0];\n return true;\n } catch (err) {\n return false;\n }\n }\n\n /**\n * Removes temporary property from the list.\n * @param property The property to remove.\n */\n async removeProperty(property: AssetPropertyType): Promise<void> {\n let filterFn;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n filterFn = (p: AssetPropertyType) => {\n if (p === property) {\n // remove complex property itself\n return false;\n }\n if ('keyPath' in p && Array.isArray((p as NestedPropertyFields).keyPath)) {\n // remove children of complex property\n const keyPath = (p as NestedPropertyFields).keyPath;\n return keyPath[0] !== property.name;\n }\n return true;\n };\n } else {\n // Remove only the property itself\n filterFn = (p: AssetPropertyType) => p !== property;\n }\n\n this.allAddedProperties = this.allAddedProperties.filter(filterFn);\n this.displayAddedProperties = this.displayAddedProperties.filter(filterFn);\n\n // Also update the complete data when removing properties\n const propertyKey = (property as NestedPropertyFields).keyPath?.join('.') || property.name;\n this.allNodesComplete = this.allNodesComplete.filter(node => {\n const nodeKey =\n (node.property as NestedPropertyFields).keyPath?.join('.') || node.property.name;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n // Remove the property and its children\n return !nodeKey.startsWith(propertyKey);\n } else {\n return nodeKey !== propertyKey;\n }\n });\n\n this.properties = this.allNodesComplete.map(node => node.property);\n\n await this.updateProperties(false);\n }\n\n async editProperty(property: AssetPropertyType): Promise<void> {\n const definition = await this.computedPropertiesService.getByName(property.name);\n const configured = await this.configureProperty(property, definition);\n if (configured && this.asset?.id) {\n property.contextAssetId = this.asset.id;\n }\n await this.updateProperties(false);\n this.selectedProperties.next(\n this.dataSource.data.filter(n => n.property.active).map(n => n.property)\n );\n }\n\n hasChild(node: AssetPropertyFlatNode): boolean {\n return node.expandable;\n }\n\n /**\n * Checks if the property's context asset matches the current asset.\n * @param node The node to check.\n * @returns True if the context asset doesn't match the current asset.\n */\n isContextMismatch(node: AssetPropertyFlatNode): boolean {\n if (!node.property.computed || !node.contextAssetId) {\n return false;\n }\n return this.asset?.id !== node.contextAssetId;\n }\n\n /**\n * Gets the level of a node.\n * @param node The node to check.\n * @returns The level of the node.\n */\n getLevel(node: AssetPropertyFlatNode): number {\n return node.level;\n }\n\n /**\n * Gets the parent node of a given node.\n * @param node The node to check.\n * @returns The parent node or null if none exists.\n */\n getParentNode(node: AssetPropertyFlatNode): AssetPropertyFlatNode | null {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n\n if (!keyPath || keyPath.length <= 1) {\n return null;\n }\n\n const parentPath = keyPath.slice(0, -1).join('.');\n return this.flatNodeMap.get(parentPath) || null;\n }\n\n /**\n * Checks if a node is expanded.\n * @param node The node to check.\n * @returns True if the node is expanded.\n */\n isNodeExpanded(node: AssetPropertyFlatNode): boolean {\n if (!node.expandable) {\n return false;\n }\n const key = this.getNodeKey(node);\n return this.expansionState.get(key) ?? false;\n }\n\n /**\n * Toggles the expansion state of a node.\n * @param node The node to toggle.\n */\n toggleNode(node: AssetPropertyFlatNode): void {\n if (!node.expandable) {\n return;\n }\n\n const key = this.getNodeKey(node);\n const currentState = this.expansionState.get(key) ?? false;\n this.expansionState.set(key, !currentState);\n\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n /**\n * Selects or deselects all nodes.\n * @param selected True to select all, false to deselect.\n */\n selectAll(selected: boolean): void {\n this.allSelected = selected;\n this.indeterminate = false;\n\n const visibleNodes = this.dataSource.data.filter(node => node.isVisible);\n\n visibleNodes.forEach(node => {\n node.property.active = selected;\n });\n\n const selectedProperties = this.dataSource.data\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n\n /**\n * Handles single selection mode.\n * @param selected True if the node is selected.\n * @param node The node to select.\n */\n onSelectSingle(selected: boolean, node: AssetPropertyFlatNode): void {\n this.allNodesComplete.forEach(n => {\n n.property.active = false;\n });\n\n node.property.active = selected;\n\n if (selected && node.expandable && !this.isNodeExpanded(node)) {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n if (selected) {\n this.selectedProperties.next([node.property]);\n }\n }\n\n /**\n * Handles multi-selection mode.\n * @param selected True if the node is selected.\n * @param node The node to select.\n */\n onSelectMulti(selected: boolean, node: AssetPropertyFlatNode): void {\n node.property.active = selected;\n\n if (selected && node.expandable && !this.isNodeExpanded(node)) {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n if (node.expandable) {\n this.updateChildSelectionStatus(node, selected);\n }\n\n this.updateSelectAllState();\n\n const selectedProperties = this.allNodesComplete\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n\n /**\n * Initiates a filter operation.\n */\n onFilter(): void {\n this.filterSubject$.next(this.filterText);\n }\n\n /**\n * Clears the filter input.\n */\n clearFilter(): void {\n this.filterText = '';\n this.onFilter();\n }\n\n drop(event: CdkDragDrop<AssetPropertyFlatNode[]>) {\n if (this.cdkDragDisabled || !event.isPointerOverContainer) {\n return;\n }\n\n const newVisibleData = this.dragDropService.handleDrop({\n draggedNode: this.dataSource.data[event.previousIndex],\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n data: this.dataSource.data\n });\n\n if (newVisibleData) {\n this.updateCompleteDataOrder(newVisibleData);\n this.rebuildVisibleData();\n\n const selectedProperties = this.allNodesComplete\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n }\n\n /**\n * Toggles expansion of all nodes - expands all if any are collapsed, otherwise collapses all.\n */\n toggleExpandCollapseAll(): void {\n if (this.areAllNodesExpanded) {\n this.collapseAllNodesInState();\n } else {\n this.expandAllNodesInState();\n }\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n /**\n * Calculates the max-width for a column based on node level and configuration.\n * @param node The node to calculate width for.\n * @returns The calculated max-width CSS value.\n */\n getColumnMaxWidth(node: AssetPropertyFlatNode): string {\n const percentage = !this.config.showKey && !this.config.showValue ? '100' : '50';\n const levelOffset = (this.getLevel(node) + 1) * this.TREE_NODE_INDENT;\n const levelAdjustment = this.getLevel(node) * 12;\n return `calc(${percentage}% - ${levelOffset}px + ${levelAdjustment}px)`;\n }\n\n /**\n * Gets the unique key for a node.\n * @param node The node.\n * @returns The unique key.\n */\n private getNodeKey(node: AssetPropertyFlatNode): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (keyPath) {\n return keyPath.join('.');\n }\n if (node.property.computed && node.property.instanceId) {\n return `${node.property.name}:${node.property.instanceId}`;\n }\n return node.property.name;\n }\n\n /**\n * Updates the areAllNodesExpanded state based on expansion state.\n */\n private updateAreAllNodesExpandedState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n if (parentNodes.length === 0) {\n this.areAllNodesExpanded = false;\n return;\n }\n\n this.areAllNodesExpanded = parentNodes.every(node => {\n const key = this.getNodeKey(node);\n return this.expansionState.get(key) ?? false;\n });\n }\n\n /**\n * Expands all nodes in the expansion state.\n */\n private expandAllNodesInState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n parentNodes.forEach(node => {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n });\n this.areAllNodesExpanded = true;\n }\n\n /**\n * Collapses all nodes in the expansion state.\n */\n private collapseAllNodesInState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n parentNodes.forEach(node => {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, false);\n });\n this.areAllNodesExpanded = false;\n }\n\n /**\n * Updates the list of properties based on the configuration.\n * @param rebuildFromAsset If true, rebuilds from scratch. Otherwise preserves existing order and only adds new properties.\n * @param prependProperties New properties to add if not rebuilding from asset.\n */\n private async updateProperties(\n rebuildFromAsset = false,\n prependProperties: AssetPropertyType[] = []\n ): Promise<void> {\n const previouslySelectedProperties = this.dataSource.data\n .filter(node => node.property.active)\n .map(node => node.property);\n\n if (this.config.inputPropertiesHandle === 'merge' || !this.config.inputPropertiesHandle) {\n if (rebuildFromAsset) {\n this.properties = [\n ...prependProperties,\n ...this.displayAddedProperties,\n ...this.extraProperties,\n ...(await this.getProperties())\n ];\n } else {\n this.properties = [...prependProperties, ...this.properties];\n }\n } else if (this.config.inputPropertiesHandle === 'override') {\n this.properties = [\n ...prependProperties,\n ...this.displayAddedProperties,\n ...this.extraProperties\n ];\n }\n\n this.buildTreeNodes();\n\n if (previouslySelectedProperties.length > 0) {\n previouslySelectedProperties.forEach(selectedProp => {\n const matchingNode = this.dataSource.data.find(node =>\n this.assetPropertiesService.propertiesMatch(node.property, selectedProp)\n );\n if (matchingNode) {\n matchingNode.property.active = true;\n }\n });\n this.updateSelectAllState();\n }\n\n this.applySelectedPropertiesFromConfig();\n }\n\n private applySelectedPropertiesFromConfig(): void {\n if (!this.config.selectedProperties || this.config.selectedProperties.length === 0) {\n return;\n }\n\n this.config.selectedProperties.forEach((configProperty, index) => {\n const matchingNode = this.dataSource.data.find(node =>\n this.assetPropertiesService.propertiesMatch(node.property, configProperty)\n );\n\n if (matchingNode) {\n if (this.config.selectMode === 'single') {\n // For single mode, only select the first property and break\n if (index === 0) {\n this.onSelectSingle(true, matchingNode);\n }\n return;\n } else if (this.config.selectMode === 'multi') {\n this.onSelectMulti(true, matchingNode);\n }\n }\n });\n }\n\n /**\n * Updates the display added properties based on compatibility with current asset.\n */\n private async updateDisplayAddedProperties(): Promise<void> {\n this.displayAddedProperties = await this.assetPropertiesService.filterCompatibleProperties(\n this.allAddedProperties,\n this.asset\n );\n }\n\n /**\n * Updates the selection status of child nodes.\n * @param parent The parent node.\n * @param selected True if the parent is selected.\n */\n private updateChildSelectionStatus(parent: AssetPropertyFlatNode, selected: boolean): void {\n if (!parent.expandable) return;\n\n const parentKey =\n (parent.property as NestedPropertyFields).keyPath?.join('.') || parent.property.name;\n\n this.allNodesComplete.forEach(node => {\n const nodePath = (node.property as NestedPropertyFields).keyPath;\n if (nodePath && nodePath.join('.').startsWith(parentKey) && node !== parent) {\n node.property.active = selected;\n }\n });\n }\n\n /**\n * Checks if a property matches the filter criteria.\n * @param property The property to check.\n * @param filterText The filter text.\n * @returns True if the property matches.\n */\n private matchesSearch(property: AssetPropertyType, filterText: string): boolean {\n const filterByFields = [\n property.label,\n property.name,\n (property as NestedPropertyFields).keyPath?.join('.'),\n (property as NestedPropertyFields).title\n ].filter(Boolean);\n\n return filterByFields.some(field => field?.toLowerCase().includes(filterText));\n }\n\n /**\n * Updates the selection state for all nodes.\n */\n private updateSelectAllState(): void {\n if (this.config.selectMode !== 'multi') return;\n\n const visibleNodes = this.dataSource.data.filter(node => node.isVisible);\n\n const totalCount = visibleNodes.length;\n const selectedCount = visibleNodes.filter(node => node.property.active).length;\n\n this.allSelected = totalCount > 0 && selectedCount === totalCount;\n this.indeterminate = selectedCount > 0 && selectedCount < totalCount;\n\n // Update indeterminate state for each complex node\n this.updateIndeterminateStates();\n }\n\n /**\n * Builds the tree nodes from the properties.\n */\n private buildTreeNodes(): void {\n const treeData: AssetPropertyFlatNode[] = [];\n this.flatNodeMap.clear();\n\n this.properties.forEach(property => {\n const isComplex = this.assetPropertiesService.isComplexProperty(property);\n const hasKeyPath = !!(property as NestedPropertyFields).keyPath;\n const level = hasKeyPath ? (property as NestedPropertyFields).keyPath.length - 1 : 0;\n\n // For computed properties with instanceId, include it in the key to allow multiple instances\n let key: string;\n if (hasKeyPath) {\n key = (property as NestedPropertyFields).keyPath.join('.');\n } else if (property.computed && property.instanceId) {\n key = `${property.name}:${property.instanceId}`;\n } else {\n key = property.name;\n }\n\n const node: AssetPropertyFlatNode = {\n expandable: isComplex,\n level,\n property,\n isVisible: true,\n indeterminate: false,\n contextAssetId: property.contextAssetId\n };\n\n this.flatNodeMap.set(key, node);\n treeData.push(node);\n });\n\n this.allNodesComplete = [...treeData];\n\n // Apply filter and rebuild visible data\n this.filterTree();\n this.updateSelectAllState();\n this.hasExpandableNodes = this.allNodesComplete.some(node => node.expandable);\n\n if (\n this.config.expansionMode === 'nonCollapsible' ||\n this.config.expansionMode === 'expandedByDefault'\n ) {\n queueMicrotask(() => {\n this.expandAllNodesInState();\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n });\n }\n }\n\n /**\n * Update indeterminate state for all complex nodes\n */\n private updateIndeterminateStates(): void {\n // Only for multi-select mode\n if (this.config.selectMode !== 'multi') return;\n\n // For each complex node, check its children in complete data\n this.allNodesComplete.forEach(node => {\n if (node.expandable) {\n const parentKey =\n (node.property as NestedPropertyFields).keyPath?.join('.') || node.property.name;\n // Find direct children (level = parent.level + 1, keyPath starts with parentKey)\n const children = this.allNodesComplete.filter(child => {\n if (child === node) return false;\n const childKeyPath = (child.property as NestedPropertyFields).keyPath;\n if (!childKeyPath) return false;\n // Direct child: one level deeper, and keyPath starts with parentKey\n return (\n childKeyPath.length === node.level + 2 &&\n childKeyPath.slice(0, node.level + 1).join('.') === parentKey\n );\n });\n if (children.length > 0) {\n const selectedCount = children.filter(child => child.property.active).length;\n node.indeterminate = selectedCount > 0 && selectedCount < children.length;\n } else {\n node.indeterminate = false;\n }\n } else {\n node.indeterminate = false;\n }\n });\n }\n\n /**\n * Filters the tree nodes based on the filter input.\n */\n private filterTree(): void {\n const filterText = this.filterText?.toLowerCase() || '';\n\n const allNodes =\n this.allNodesComplete.length > 0\n ? [...this.allNodesComplete]\n : Array.from(this.flatNodeMap.values());\n\n if (!filterText) {\n allNodes.forEach(node => (node.isVisible = true));\n this.rebuildVisibleData();\n this.updateSelectAllState();\n return;\n }\n\n // First pass: Mark nodes that match the filter criteria\n allNodes.forEach(node => {\n node.isVisible = this.matchesSearch(node.property, filterText);\n });\n\n // Second pass: Make parent nodes of visible nodes also visible\n allNodes.forEach(node => {\n if (node.isVisible && node.level > 0) {\n // Find and mark parent nodes as visible\n this.makeParentsVisible(node);\n }\n });\n\n // When filtering, show all matching nodes regardless of expansion state\n const filteredNodes = allNodes.filter(node => node.isVisible);\n\n // Update the data source with filtered nodes (ignoring expansion state during filter)\n this.dataSource.data = filteredNodes;\n this.updateSelectAllState();\n }\n\n /**\n * Makes all parent nodes visible.\n * @param node The node whose parents should be made visible.\n */\n private makeParentsVisible(node: AssetPropertyFlatNode): void {\n if (!node || node.level === 0) return;\n\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (!keyPath) return;\n\n // Navigate up the path and find parents in the complete data\n for (let i = 1; i < keyPath.length; i++) {\n const parentPath = keyPath.slice(0, i).join('.');\n const parent = this.allNodesComplete.find(n => {\n const nodeKey = (n.property as NestedPropertyFields).keyPath?.join('.') || n.property.name;\n return nodeKey === parentPath;\n });\n if (parent) {\n parent.isVisible = true;\n } else {\n break;\n }\n }\n }\n\n /**\n * Rebuilds visible data based on expansion state (only when not filtering).\n */\n private rebuildVisibleData(): void {\n if (this.filterText) {\n return;\n }\n\n const visible: AssetPropertyFlatNode[] = [];\n\n for (const node of this.allNodesComplete) {\n if (this.shouldNodeBeVisible(node)) {\n visible.push(node);\n }\n }\n\n this.dataSource.data = visible;\n this.updateSelectAllState();\n }\n\n /**\n * Determines if a node should be visible based on expansion state.\n * @param node The node to check.\n * @returns True if the node should be visible.\n */\n private shouldNodeBeVisible(node: AssetPropertyFlatNode): boolean {\n // Root nodes always visible (when not filtered)\n if (node.level === 0) {\n return node.isVisible;\n }\n\n // Check all parents are expanded\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (!keyPath) {\n return node.isVisible;\n }\n\n for (let i = 1; i <= node.level; i++) {\n const parentPath = keyPath.slice(0, i).join('.');\n if (!this.expansionState.get(parentPath)) {\n return false;\n }\n }\n\n return node.isVisible;\n }\n\n /**\n * Updates complete data order after drag-drop on visible data.\n * @param newVisibleData The new order of visible nodes.\n */\n private updateCompleteDataOrder(newVisibleData: AssetPropertyFlatNode[]): void {\n // Create a map of visible nodes to their new positions\n const visiblePositionMap = new Map<AssetPropertyFlatNode, number>();\n newVisibleData.forEach((node, index) => {\n visiblePositionMap.set(node, index);\n });\n\n // Separate nodes into visible and hidden\n const visibleNodes: AssetPropertyFlatNode[] = [];\n const hiddenNodes: AssetPropertyFlatNode[] = [];\n\n this.allNodesComplete.forEach(node => {\n if (visiblePositionMap.has(node)) {\n visibleNodes.push(node);\n } else {\n hiddenNodes.push(node);\n }\n });\n\n // Sort visible nodes by their new positions\n visibleNodes.sort((a, b) => {\n return visiblePositionMap.get(a)! - visiblePositionMap.get(b)!;\n });\n\n // Reconstruct complete data: insert hidden children after their parents\n const result: AssetPropertyFlatNode[] = [];\n\n for (const visibleNode of visibleNodes) {\n result.push(visibleNode);\n\n if (visibleNode.expandable) {\n const parentKey = this.getNodeKey(visibleNode);\n const children = hiddenNodes.filter(hiddenNode => {\n const childKeyPath = (hiddenNode.property as NestedPropertyFields).keyPath;\n if (!childKeyPath) return false;\n const childParentPath = childKeyPath.slice(0, visibleNode.level + 1).join('.');\n return childParentPath === parentKey;\n });\n\n // Sort children by their original order (by level then by name)\n children.sort((a, b) => {\n if (a.level !== b.level) return a.level - b.level;\n const aKey = this.getNodeKey(a);\n const bKey = this.getNodeKey(b);\n return aKey.localeCompare(bKey);\n });\n\n result.push(...children);\n }\n }\n\n this.allNodesComplete = result;\n this.properties = result.map(node => node.property);\n }\n\n /**\n * Categorizes and flattens hierarchical properties.\n * @param properties The properties to categorize.\n * @returns The flattened list of properties.\n */\n private categorizeAndFlattenHierarchicalProperties(\n properties: AssetPropertyType[]\n ): AssetPropertyType[] {\n const { computed, simple, complex } =\n this.assetPropertiesService.categorizeAndFlattenHierarchicalProperties(properties);\n return [...computed, ...simple, ...complex];\n }\n}\n","<div\n class=\"tree-container bg-inherit\"\n [attr.aria-label]=\"'Asset property list' | translate\"\n role=\"tree\"\n>\n @if (config.showHeader || config.filterable) {\n <div class=\"select-all-container bg-inherit sticky-top separator-bottom\">\n @if (config.filterable) {\n <div\n class=\"form-group m-b-0 p-16 d-flex\"\n [ngClass]=\"{ 'separator-bottom': config.showHeader }\"\n >\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter properties' | translate\"\n placeholder=\"{{ 'Filter properties' | translate }}\"\n role=\"searchbox\"\n type=\"search\"\n autocomplete=\"off\"\n [(ngModel)]=\"filterText\"\n (input)=\"onFilter()\"\n [disabled]=\"!dataSource.data.length\"\n #filter\n />\n @if (filter.value.length === 0) {\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n >\n <i\n class=\"dlt-c8y-icon-search\"\n [c8yIcon]=\"'search'\"\n ></i>\n </span>\n }\n @if (filter.value.length > 0) {\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n >\n <i\n class=\"text-muted dlt-c8y-icon-times\"\n [c8yIcon]=\"'times'\"\n [attr.aria-label]=\"'Clear filter' | translate\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"clearFilter()\"\n ></i>\n </span>\n }\n </div>\n </div>\n }\n @if (config.showHeader && dataSource.data.length) {\n <div class=\"d-flex a-i-center overflow-hidden\">\n <div\n class=\"flex-no-shrink d-flex a-i-center\"\n [ngClass]=\"{\n 'p-l-40': !hasExpandableNodes && config.expansionMode !== 'nonCollapsible',\n 'p-r-8': config.selectMode !== 'none' && config.expansionMode === 'nonCollapsible'\n }\"\n >\n @if (config.expansionMode !== 'nonCollapsible' && hasExpandableNodes) {\n @let collapseAllButtonTitle =\n (areAllNodesExpanded ? collapseAllLabel : expandAllLabel) | translate;\n <button\n class=\"collapse-btn btn-dot flex-no-shrink\"\n [title]=\"collapseAllButtonTitle\"\n [attr.aria-label]=\"collapseAllButtonTitle\"\n type=\"button\"\n [ngClass]=\"{ active: areAllNodesExpanded }\"\n (click)=\"toggleExpandCollapseAll()\"\n >\n <i [c8yIcon]=\"'chevron-right'\"></i>\n </button>\n }\n </div>\n @if (config.selectMode === 'multi') {\n <c8y-list-item-checkbox\n class=\"p-l-4 p-r-4\"\n [ngModel]=\"allSelected\"\n [indeterminate]=\"indeterminate\"\n (onSelect)=\"selectAll($event)\"\n ></c8y-list-item-checkbox>\n }\n <div\n class=\"p-t-40\"\n [ngClass]=\"{\n 'p-l-24': config.selectMode === 'single',\n 'p-l-8': config.selectMode === 'none' && config.expansionMode === 'nonCollapsible'\n }\"\n ></div>\n <div class=\"content-flex-30 fit-w m-t-4 m-b-4 m-0\">\n <div class=\"col-6 d-flex a-i-center m-l-0 m-r-0\">\n <span class=\"flex-no-shrink p-l-4 p-r-8\">\n <div class=\"c8y-icon\"></div>\n </span>\n <span class=\"text-medium m-l-8\">\n {{ 'Property' | translate }}\n </span>\n </div>\n @if (config.showKey) {\n <div [ngClass]=\"{ 'col-3': config.showValue, 'col-6': !config.showValue }\">\n <span class=\"text-medium\">{{ 'Key' | translate }}</span>\n </div>\n }\n @if (config.showValue) {\n <div [ngClass]=\"{ 'col-3': config.showKey, 'col-6': !config.showKey }\">\n <span class=\"text-medium\">{{ 'Value' | translate }}</span>\n </div>\n }\n </div>\n @if (assetPropertyAction) {\n <div\n class=\"m-l-8 p-l-24 asset-property-list__actions\"\n [ngClass]=\"{\n 'p-r-40': config.allowAddingCustomProperties,\n 'p-r-8': !config.allowAddingCustomProperties\n }\"\n ></div>\n }\n </div>\n }\n </div>\n }\n\n @if (dataSource.data.length) {\n <cdk-tree\n role=\"presentation\"\n #tree\n [dataSource]=\"dataSource\"\n [levelAccessor]=\"getLevel\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListDisabled]=\"!config.allowDragAndDrop || dataSource.data.length < 2\"\n >\n <!-- Tree Node Definition -->\n <cdk-tree-node\n class=\"c8y-list__item--dense\"\n [attr.tabindex]=\"0\"\n [attr.aria-level]=\"getLevel(node) + 1\"\n [attr.aria-expanded]=\"hasChild(node) ? isNodeExpanded(node) : null\"\n [attr.aria-selected]=\"config.selectMode !== 'none' ? node.property.active : null\"\n role=\"treeitem\"\n *cdkTreeNodeDef=\"let node\"\n cdkTreeNodePadding\n [cdkTreeNodePaddingIndent]=\"TREE_NODE_INDENT\"\n [ngClass]=\"{\n nonCollapsible: config.expansionMode === 'nonCollapsible',\n nonSelectable: config.selectMode === 'none'\n }\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"cdkDragDisabled\"\n >\n <div class=\"d-flex p-relative overflow-visible bg-inherit fit-h\">\n @if (config.allowDragAndDrop && dataSource.data.length > 1) {\n <div\n class=\"drag-handle-wrapper\"\n [ngClass]=\"{ 'drag-handle-disabled': cdkDragDisabled }\"\n >\n <button\n class=\"drag-handle btn-clean\"\n [title]=\"\n (cdkDragDisabled ? dragHandleDisabledLabel : dragHandleEnabledLabel) | translate\n \"\n [attr.aria-label]=\"\n (cdkDragDisabled ? dragHandleDisabledLabel : dragHandleEnabledLabel) | translate\n \"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"cdkDragDisabled\"\n >\n <i [c8yIcon]=\"'drag-reorder'\"></i>\n </button>\n </div>\n }\n <!-- Toggle Button for expandable nodes -->\n @if (config.expansionMode !== 'nonCollapsible' && hasChild(node)) {\n @let collapseButtonTitle =\n isNodeExpanded(node) | c8yAssetPropertyCollapseButtonTitle: node;\n <button\n class=\"collapse-btn btn-dot flex-no-shrink\"\n [title]=\"collapseButtonTitle\"\n [attr.aria-label]=\"collapseButtonTitle\"\n [attr.aria-expanded]=\"isNodeExpanded(node)\"\n type=\"button\"\n (click)=\"toggleNode(node)\"\n [ngClass]=\"{ active: isNodeExpanded(node) }\"\n >\n <i [c8yIcon]=\"'chevron-right'\"></i>\n </button>\n }\n <!-- Placeholder for non-expandable nodes to maintain alignment -->\n @if (!hasChild(node) || config.expansionMode === 'nonCollapsible') {\n <div\n class=\"flex-no-shrink\"\n [ngClass]=\"{\n 'p-r-40': config.expansionMode !== 'nonCollapsible',\n 'p-r-8': config.expansionMode === 'nonCollapsible'\n }\"\n ></div>\n }\n <!-- Selection Controls -->\n @if (config.selectMode !== 'none') {\n <div class=\"d-contents\">\n @if (config.selectMode === 'single') {\n <c8y-list-item-radio\n class=\"p-l-4 p-r-4\"\n type=\"radio\"\n [selected]=\"node.property.active\"\n (onSelect)=\"onSelectSingle($event, node)\"\n ></c8y-list-item-radio>\n } @else if (config.selectMode === 'multi') {\n <c8y-list-item-checkbox\n class=\"p-l-4 p-r-4\"\n [ngModel]=\"node.property.active\"\n [indeterminate]=\"node.indeterminate\"\n (onSelect)=\"onSelectMulti($event, node)\"\n ></c8y-list-item-checkbox>\n }\n </div>\n }\n <div class=\"content-flex-30 fit-w bg-inherit m-0 min-width-0\">\n <div\n class=\"d-flex a-i-center bg-inherit m-0 flex-grow\"\n [style.max-width]=\"getColumnMaxWidth(node)\"\n >\n <c8y-li-icon\n class=\"p-r-4 p-l-4\"\n [icon]=\"node.property | c8yAssetPropertyIcon\"\n tooltip=\"{{ node.property | c8yAssetPropertyIconTooltip }}\"\n container=\"body\"\n [delay]=\"500\"\n [ngClass]=\"{\n 'p-l-4': config.selectMode !== 'none',\n 'p-l-8': config.selectMode === 'none'\n }\"\n ></c8y-li-icon>\n\n <span class=\"p-r-8 min-width-0 d-flex a-i-center\">\n @if (isContextMismatch(node)) {\n @let tooltipText =\n 'Property configured for a different asset. Reconfigure to match current asset.'\n | translate;\n <button\n class=\"btn-clean m-r-4\"\n [attr.aria-label]=\"tooltipText\"\n [tooltip]=\"tooltipText\"\n placement=\"top\"\n type=\"button\"\n [container]=\"'body'\"\n >\n <i\n class=\"status critical stroked-icon\"\n c8yIcon=\"exclamation-circle\"\n ></i>\n </button>\n }\n\n <div\n class=\"text-truncate\"\n title=\"{{\n node.property.label || node.property.title || node.property.name | translate\n }}\"\n [ngClass]=\"{\n 'text-muted': node.property.temporary,\n 'text-danger': isContextMismatch(node)\n }\"\n >\n {{ node.property.label || node.property.title || node.property.name | translate }}\n </div>\n </span>\n </div>\n @if (config.showKey) {\n <div\n class=\"d-flex a-i-center\"\n [ngClass]=\"{ 'col-3': config.showValue, 'col-6': !config.showValue }\"\n >\n <span\n class=\"d-inline-block tag tag--default a-s-center text-truncate\"\n title=\"{{\n node.property.keyPath?.join('.') || (node.property?.name | translate)\n }}\"\n >\n {{ node.property.keyPath?.join('.') || (node.property?.name | translate) }}\n </span>\n </div>\n }\n @if (asset && config.showValue) {\n <div\n class=\"d-flex a-i-center\"\n [ngClass]=\"{ 'col-3': config.showKey, 'col-6': !config.showKey }\"\n >\n @let value = node.property | c8yAssetPropertyValue: asset | async;\n <span\n class=\"tag tag--info d-inline-block a-s-center text-truncate\"\n title=\"{{ value }}\"\n >\n {{ value }}\n </span>\n </div>\n }\n </div>\n @if (assetPropertyAction || node.property.temporary) {\n <div\n class=\"m-l-8 showOnHover d-flex a-i-center j-c-end asset-property-list__actions\"\n [ngClass]=\"{\n 'p-l-32': !node.property.temporary && config.allowAddingCustomProperties,\n 'has-computed': node.property.computed && node.property.config\n }\"\n >\n @if (node.property.computed && node.property.config) {\n <button\n class=\"btn btn-dot m-l-auto\"\n title=\"{{ 'Configure' | translate }}\"\n (click)=\"editProperty(node.property)\"\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n }\n @if (node.property.temporary) {\n <button\n class=\"btn btn-dot btn-dot--danger\"\n [attr.aria-label]=\"'Remove' | translate\"\n tooltip=\"{{ 'Remove' | translate }}\"\n container=\"body\"\n type=\"button\"\n [ngClass]=\"{ 'm-l-auto': !node.property.computed || !node.property.config }\"\n [delay]=\"500\"\n (click)=\"removeProperty(node.property)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n <ng-container\n *ngTemplateOutlet=\"\n assetPropertyAction?.template;\n context: {\n $implicit: node.property\n }\n \"\n ></ng-container>\n </div>\n }\n </div>\n </cdk-tree-node>\n </cdk-tree>\n } @else {\n <c8y-ui-empty-state\n icon=\"list\"\n title=\"{{ 'No properties to display' | translate }}\"\n subtitle=\"{{ 'Select an asset to see the available properties.' | translate }}\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n @if (config.allowAddingCustomProperties) {\n <div class=\"sticky-bottom bg-inherit separator-top p-16\">\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n (click)=\"addProperty()\"\n data-cy=\"asset-property-item-add-button\"\n >\n <i [c8yIcon]=\"'plus'\"></i>\n {{ 'Add property' | translate }}\n </button>\n </div>\n }\n</div>\n","import { Component, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\nimport { IManagedObject, Paging } from '@c8y/client';\nimport {\n BottomDrawerRef,\n C8yTranslatePipe,\n FormsModule,\n IconDirective,\n LoadMoreComponent,\n TabComponent,\n TabsOutletComponent\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { cloneDeep } from 'lodash-es';\nimport {\n AssetPropertyListConfig,\n AssetPropertyType,\n defaultAssetProperties\n} from '../asset-properties.model';\nimport { AssetPropertyListComponent } from '../asset-property-list/asset-property-list.component';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport { BehaviorSubject, debounceTime, Subject, takeUntil } from 'rxjs';\nimport { NgIf } from '@angular/common';\nimport { ComputedPropertiesService } from '../computed-properties.service';\n\n/**\n * Represents a drawer component for selecting asset properties.\n */\n@Component({\n selector: 'c8y-custom-properties-drawer-component',\n templateUrl: './custom-properties-drawer.component.html',\n host: {\n class: 'd-contents'\n },\n standalone: true,\n imports: [\n C8yTranslatePipe,\n FormsModule,\n AssetPropertyListComponent,\n LoadMoreComponent,\n IconDirective,\n NgIf,\n TabComponent,\n TabsOutletComponent\n ]\n})\nexport class CustomPropertiesDrawerComponent implements OnInit {\n asset: IManagedObject;\n /**\n * Title of the drawer.\n */\n @Input() title = gettext('Select property');\n /**\n * Configuration for the asset property list.\n */\n config: AssetPropertyListConfig = {\n filterable: false,\n selectMode: 'multi',\n expansionMode: 'collapsedByDefault',\n showValue: false,\n emptyStateContent: 'default-properties',\n allowAddingCustomProperties: false,\n inputPropertiesHandle: 'override'\n };\n /**\n * Emits the selected properties when saved.\n */\n @Output() savePropertySelection = new EventEmitter<AssetPropertyType[]>();\n /**\n * Emits an event when the selection is canceled.\n */\n @Output() cancelPropertySelection = new EventEmitter<void>();\n /**\n * List of selected properties.\n */\n selectedProperties: AssetPropertyType[] = [];\n /**\n * Reference to the bottom drawer.\n */\n bottomDrawerRef = inject(BottomDrawerRef);\n /**\n * Promise resolving to the selected properties.\n */\n result: Promise<AssetPropertyType[]> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n\n tabNames = {\n regular: gettext('Properties'),\n computed: gettext('Computed properties')\n };\n paging: Paging<IManagedObject>;\n inputText = '';\n\n selectedTab: keyof typeof this.tabNames = 'regular';\n\n regularProperties: AssetPropertyType[] = [];\n computedProperties: AssetPropertyType[] = [];\n displayedProperties: AssetPropertyType[] = [];\n regularCount = 0;\n computedCount = 0;\n allComputedProperties: AssetPropertyType[] = [];\n\n private searchSubject$ = new BehaviorSubject<string>('');\n /**\n * Internal save handler.\n */\n private _save: (value: AssetPropertyType[]) => void;\n /**\n * Internal cancel handler.\n */\n private _cancel: (reason?: string | Error) => void;\n /**\n * Subject for handling component destruction.\n */\n private destroy$ = new Subject<void>();\n private assetPropertiesService = inject(AssetPropertiesService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n\n async ngOnInit() {\n const computedPropsResult = await this.computedPropertiesService.getByContext(this.asset);\n this.allComputedProperties = computedPropsResult.map(({ prop }) => prop);\n\n await this.updateProperties();\n\n this.searchSubject$\n .pipe(takeUntil(this.destroy$), debounceTime(350))\n .subscribe(() => this.updateProperties());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n /**\n * Updates the selected properties.\n * @param properties The selected properties.\n */\n onSelectedProperties(properties: AssetPropertyType[]): void {\n this.selectedProperties = cloneDeep(properties);\n }\n\n onTabChange(tabName: keyof typeof this.tabNames): void {\n this.selectedTab = tabName;\n this.updateDisplayedProperties();\n }\n\n onSearch() {\n this.searchSubject$.next(this.inputText);\n }\n\n clearSearch(): void {\n this.inputText = '';\n this.onSearch();\n }\n\n /**\n * Saves the selected properties and closes the drawer.\n */\n onSave(): void {\n this._save(this.selectedProperties);\n this.bottomDrawerRef.close();\n }\n\n /**\n * Cancels the selection and closes the drawer.\n */\n onCancel(): void {\n this._cancel();\n this.bottomDrawerRef.close();\n }\n\n async loadMore() {\n if (this.selectedTab !== 'regular' || !this.paging) {\n return;\n }\n\n const res = await this.paging.next();\n\n this.paging = res.paging;\n\n const propertiesFromLibrary: AssetPropertyType[] = [];\n const propertiesMOs = res.data;\n propertiesMOs.forEach(prop => {\n propertiesFromLibrary.push({\n c8y_JsonSchema: prop.c8y_JsonSchema,\n label: prop.name,\n name: Object.keys(prop.c8y_JsonSchema.properties)[0],\n type: prop.c8y_JsonSchema.type\n });\n });\n\n const categorizedNewProps =\n this.categorizeAndFlattenHierarchicalProperties(propertiesFromLibrary);\n const newRegularProps = categorizedNewProps.filter(prop => !prop.computed);\n\n this.regularProperties = [...this.regularProperties, ...newRegularProps];\n\n if (this.selectedTab === 'regular') {\n this.displayedProperties = this.regularProperties;\n }\n }\n\n /**\n * Checks if the select button should be disabled.\n * @returns True if all selected properties are inactive.\n */\n selectIsDisabled(): boolean {\n return this.selectedProperties?.every(({ active }) => !active);\n }\n\n private async updateProperties() {\n const { propertiesFromLibrary, paging } =\n await this.assetPropertiesService.getPropertiesFromPropertiesLibrary(this.inputText);\n this.paging = paging;\n\n const filteredComputedProperties = this.allComputedProperties.filter(prop =>\n prop.label.toLowerCase().includes(this.inputText?.trim().toLowerCase() || '')\n );\n const filteredDefaultProperties = defaultAssetProperties.filter(prop =>\n prop.label.toLowerCase().includes(this.inputText?.trim().toLowerCase() || '')\n );\n const allProperties = this.categorizeAndFlattenHierarchicalProperties([\n ...filteredComputedProperties,\n ...propertiesFromLibrary,\n ...filteredDefaultProperties\n ]);\n\n this.regularProperties = allProperties.filter(prop => !prop.computed);\n this.computedProperties = allProperties.filter(prop => prop.computed);\n\n this.regularCount = (paging.totalElements || 0) + filteredDefaultProperties.length;\n this.computedCount = filteredComputedProperties.length;\n\n this.updateDisplayedProperties();\n }\n\n private updateDisplayedProperties(): void {\n this.displayedProperties =\n this.selectedTab === 'regular' ? this.regularProperties : this.computedProperties;\n }\n\n /**\n * Categorizes and flattens hierarchical properties.\n * @param properties The properties to categorize.\n * @returns The flattened list of properties.\n */\n private categorizeAndFlattenHierarchicalProperties(\n properties: AssetPropertyType[]\n ): AssetPropertyType[] {\n const { computed, simple, complex } =\n this.assetPropertiesService.categorizeAndFlattenHierarchicalProperties(properties);\n return [...computed, ...simple, ...complex];\n }\n}\n","<div class=\"card-header separator\">\n <span class=\"h4 card-title\">{{ title | translate }}</span>\n</div>\n\n<div class=\"form-group m-b-8 p-16 d-flex\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search properties' | translate\"\n placeholder=\"{{ 'Search properties' | translate }}\"\n role=\"searchbox\"\n type=\"search\"\n autocomplete=\"off\"\n [(ngModel)]=\"inputText\"\n (input)=\"onSearch()\"\n #filter\n />\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n *ngIf=\"filter.value.length === 0\"\n >\n <i\n class=\"dlt-c8y-icon-search\"\n [c8yIcon]=\"'search'\"\n ></i>\n </span>\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n *ngIf=\"filter.value.length > 0\"\n >\n <i\n class=\"text-muted dlt-c8y-icon-times\"\n [c8yIcon]=\"'times'\"\n [attr.aria-label]=\"'Clear search' | translate\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"clearSearch()\"\n ></i>\n </span>\n </div>\n</div>\n\n<c8y-tabs-outlet\n class=\"elevation-none m-b-16\"\n outletName=\"assetPropertiesDrawerTabs\"\n orientation=\"horizontal\"\n></c8y-tabs-outlet>\n\n<c8y-tab\n [isActive]=\"selectedTab === 'regular'\"\n [tabsOutlet]=\"'assetPropertiesDrawerTabs'\"\n [priority]=\"1000\"\n (onSelect)=\"onTabChange('regular')\"\n>\n <i [c8yIcon]=\"'c8y-css'\"></i>\n <span>\n {{ tabNames.regular | translate }}\n <span aria-live=\"assertive\" class=\"m-l-4 badge badge-default flex-no-shrink\">\n {{ regularCount }}\n </span>\n </span>\n</c8y-tab>\n\n<c8y-tab\n [isActive]=\"selectedTab === 'computed'\"\n [tabsOutlet]=\"'assetPropertiesDrawerTabs'\"\n [priority]=\"900\"\n (onSelect)=\"onTabChange('computed')\"\n>\n <i [c8yIcon]=\"'bolt'\"></i>\n <span>\n {{ tabNames.computed | translate }}\n <span class=\"m-l-4 badge badge-default flex-no-shrink\" aria-live=\"assertive\">\n {{ computedCount }}\n </span>\n </span>\n</c8y-tab>\n\n<div class=\"inner-scroll flex-grow\">\n <c8y-asset-property-list\n class=\"bg-component\"\n [config]=\"config\"\n [extraProperties]=\"displayedProperties\"\n (selectedProperties)=\"onSelectedProperties($event)\"\n ></c8y-asset-property-list>\n <c8y-load-more\n *ngIf=\"selectedTab === 'regular'\"\n [paging]=\"paging\"\n [useIntersection]=\"true\"\n (onLoad)=\"loadMore()\"\n ></c8y-load-more>\n</div>\n\n<div class=\"card-footer text-center p-24 separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"onCancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Select' | translate }}\"\n type=\"button\"\n [disabled]=\"selectIsDisabled()\"\n (click)=\"onSave()\"\n >\n {{ 'Select' | translate }}\n </button>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { AssetPropertyType } from './asset-properties.model';\nimport { BottomDrawerService } from '@c8y/ngx-components';\nimport { CustomPropertiesDrawerComponent } from './custom-properties-drawer/custom-properties-drawer.component';\nimport { IManagedObject } from '@c8y/client';\n\n/**\n * Service to open a drawer for selecting custom asset properties.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomPropertiesDrawerService {\n private bottomDrawerService = inject(BottomDrawerService);\n\n async getCustomProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n const drawer = this.bottomDrawerService.openDrawer(CustomPropertiesDrawerComponent, {\n disableClickOutside: true,\n initialState: {\n asset\n }\n });\n\n try {\n const resultOf = await drawer.instance.result;\n return resultOf;\n } catch (ex) {\n return [];\n }\n }\n}\n","import { Component, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { BottomDrawerRef, C8yTranslatePipe, FormsModule } from '@c8y/ngx-components';\nimport { cloneDeep } from 'lodash-es';\nimport { AssetPropertyListConfig, AssetPropertyType } from '../asset-properties.model';\nimport { AssetPropertyListComponent } from '../asset-property-list/asset-property-list.component';\n\n/**\n * Represents a drawer component for selecting asset properties.\n */\n@Component({\n selector: 'c8y-asset-property-selector-drawer-component',\n templateUrl: './asset-property-selector-drawer.component.html',\n host: {\n class: 'd-contents'\n },\n standalone: true,\n imports: [C8yTranslatePipe, FormsModule, AssetPropertyListComponent]\n})\nexport class AssetPropertySelectorDrawerComponent {\n /**\n * Title of the drawer.\n */\n @Input() title = gettext('Select property');\n /**\n * Managed object representing the asset.\n */\n asset!: IManagedObject;\n /**\n * Configuration for the asset property list.\n */\n config: AssetPropertyListConfig;\n /**\n * Extra properties to be displayed in the list.\n */\n extraProperties: AssetPropertyType[] = [];\n /**\n * Emits the selected properties when saved.\n */\n @Output() savePropertySelection = new EventEmitter<AssetPropertyType[]>();\n /**\n * Emits an event when the selection is canceled.\n */\n @Output() cancelPropertySelection = new EventEmitter<void>();\n /**\n * List of selected properties.\n */\n selectedProperties: AssetPropertyType[] = [];\n /**\n * Reference to the bottom drawer.\n */\n bottomDrawerRef = inject(BottomDrawerRef);\n /**\n * Promise resolving to the selected properties.\n */\n result: Promise<AssetPropertyType[]> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n /**\n * Internal save handler.\n */\n private _save: (value: AssetPropertyType[]) => void;\n /**\n * Internal cancel handler.\n */\n private _cancel: (reason?: string | Error) => void;\n /**\n * Updates the selected properties.\n * @param properties The selected properties.\n */\n onSelectedProperties(properties: AssetPropertyType[]): void {\n this.selectedProperties = cloneDeep(properties);\n }\n\n /**\n * Saves the selected properties and closes the drawer.\n */\n onSave(): void {\n this._save(this.selectedProperties);\n this.bottomDrawerRef.close();\n }\n\n /**\n * Cancels the selection and closes the drawer.\n */\n onCancel(): void {\n this._cancel();\n this.bottomDrawerRef.close();\n }\n\n /**\n * Checks if the select button should be disabled.\n * @returns True if all selected properties are inactive.\n */\n selectIsDisabled(): boolean {\n return this.selectedProperties?.every(({ active }) => !active);\n }\n}\n","<div class=\"card-header separator\">\n <span class=\"h4 card-title\">{{ title | translate }}</span>\n</div>\n\n<div class=\"inner-scroll flex-grow\">\n <c8y-asset-property-list\n class=\"bg-component\"\n [asset]=\"asset\"\n [config]=\"config\"\n [extraProperties]=\"extraProperties\"\n (selectedProperties)=\"onSelectedProperties($event)\"\n ></c8y-asset-property-list>\n</div>\n\n<div class=\"card-footer text-center p-24 separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"onCancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Select' | translate }}\"\n type=\"button\"\n [disabled]=\"selectIsDisabled()\"\n (click)=\"onSave()\"\n >\n {{ 'Select' | translate }}\n </button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","FormsModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgJO,MAAM,8BAA8B,GAA4B;AACrE,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,aAAa,EAAE,mBAAmB;AAClC,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,qBAAqB,EAAE,OAAO;AAC9B,IAAA,gBAAgB,EAAE;;AAGb,MAAM,sBAAsB,GAAwB;AACzD,IAAA;AACE,QAAA,cAAc,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;AAC3E,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC;AACtB,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,U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3BAAA,EAAA;8BAM3D,KAAK,EAAA,CAAA;sBAAb;gBAgBS,qBAAqB,EAAA,CAAA;sBAA9B;gBAIS,uBAAuB,EAAA,CAAA;sBAAhC;;;AE5CH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-asset-properties.mjs","sources":["../../asset-properties/asset-properties.model.ts","../../asset-properties/computed-properties.service.ts","../../asset-properties/asset-properties.service.ts","../../asset-properties/asset-property-list/tree-data-source.ts","../../asset-properties/asset-property-list/asset-property-action.directive.ts","../../asset-properties/asset-property-list/asset-property-value.pipe.ts","../../asset-properties/asset-property-list/asset-property-icon.pipe.ts","../../asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.ts","../../asset-properties/computed-properties-config/computed-properties-config.component.ts","../../asset-properties/computed-properties-config/computed-properties-config.component.html","../../asset-properties/asset-property-list/asset-property-collapse-button-title.pipe.ts","../../asset-properties/asset-property-list/asset-property-drag-drop.service.ts","../../asset-properties/asset-property-list/asset-property-list.component.ts","../../asset-properties/asset-property-list/asset-property-list.component.html","../../asset-properties/custom-properties-drawer/custom-properties-drawer.component.ts","../../asset-properties/custom-properties-drawer/custom-properties-drawer.component.html","../../asset-properties/custom-properties-drawer.service.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.ts","../../asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.html","../../asset-properties/c8y-ngx-components-asset-properties.ts"],"sourcesContent":["import { Injector, Type } from '@angular/core';\nimport { IAlarm, IEvent, IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { Observable } from 'rxjs';\n\ninterface ComputedPropertyContextMap {\n device: { type: 'device'; value: IManagedObject };\n group: { type: 'group'; value: IManagedObject };\n asset: { type: 'asset'; value: IManagedObject };\n alarm: { type: 'alarm'; value: IAlarm };\n event: { type: 'event'; value: IEvent };\n}\n\nexport type ValueCallbackMetadata = {\n /**\n * Mode of operation:\n * - 'singleValue': Get count only once (no real-time updates)\n * - 'realtime': Enable real-time updates (default)\n */\n mode?: 'singleValue' | 'realtime';\n /**\n * Observable to control real-time updates when mode is 'realtime'.\n * - true: Enable real-time updates (fetches current count from server and continues)\n * - false: Disable real-time updates (preserves current count, no server call)\n * If not provided, real-time runs continuously.\n */\n realtimeControl$?: Observable<boolean>;\n};\n\nexport type ComputedPropertyContextType = keyof ComputedPropertyContextMap;\nexport type ComputedPropertyContextValue =\n ComputedPropertyContextMap[keyof ComputedPropertyContextMap]['value'];\n\ntype ComputedPropertyDefinitionBase<\n TContext extends readonly ComputedPropertyContextType[] = ComputedPropertyContextType[],\n TConfig = any\n> = {\n name: string;\n prop: BaseProperty;\n contextType: TContext;\n value: ({\n config,\n context,\n metadata\n }: {\n config?: TConfig;\n context?: ComputedPropertyContextMap[TContext[number]]['value'];\n metadata?: ValueCallbackMetadata;\n }) => any | Observable<any> | Promise<any>;\n injector?: Injector;\n};\n\nexport type ComputedPropertyDefinition<\n TContext extends readonly ComputedPropertyContextType[] = ComputedPropertyContextType[],\n TConfig = any\n> = ComputedPropertyDefinitionBase<TContext, TConfig> &\n (\n | {\n configComponent?: never;\n loadConfigComponent?: never;\n }\n | {\n configComponent: Type<any>;\n loadConfigComponent?: never;\n }\n | {\n configComponent?: never;\n loadConfigComponent: () => Promise<Type<any>>;\n }\n );\n\nexport type ComputedPropertyComponent = {\n /**\n * The configuration which is shared between configuration component and display component.\n * Should be serializable to allow saving it to the API.\n */\n config: unknown;\n /**\n * The asset, device, group, alarm or event for which the property is displayed.\n */\n asset?: IManagedObject;\n};\n\nexport type AssetPropertyListConfig = {\n /**\n * List of properties that should be selected by default when the asset property list is loaded.\n */\n selectedProperties?: AssetPropertyType[];\n /**\n * Flag to enable or disable the filter functionality in the asset property list.\n * When enabled, a search input will be displayed to filter properties by their names.\n */\n filterable?: boolean;\n /**\n * The mode of the asset property list describing how the properties are selected.\n * - `single` - only one property can be selected at a time\n * - `multi` - multiple properties can be selected at a time\n * - `none` - no properties can be selected\n */\n selectMode?: 'single' | 'multi' | 'none';\n /**\n * The mode of the asset property list describing how the properties are expanded.\n * - `expandedByDefault` - all properties are expanded by default and collapse button is shown\n * - `collapsedByDefault` - all properties are collapsed by default and expand button is shown\n * - `nonCollapsible` - all properties are expanded all the time and collapse button is hidden\n */\n expansionMode?: 'expandedByDefault' | 'collapsedByDefault' | 'nonCollapsible';\n /**\n * Flag to show or hide the header of the asset property list.\n * Header includes select all checkbox (if applicable) and the title of the list columns.\n */\n showHeader?: boolean;\n /**\n * Flag to show or hide the value of the asset property.\n */\n showValue?: boolean;\n /**\n * Flag to show or hide the key of the asset property.\n * If set to true, the key of the property will be displayed alongside its value.\n */\n showKey?: boolean;\n /**\n * Defines what should be displayed when asset is not selected and there are no properties to show.\n * - `empty` - empty state with a message\n * - `default-properties` - default properties are shown (like ID, name, type, etc.)\n */\n emptyStateContent?: 'empty' | 'default-properties';\n /**\n * Flag to allow adding custom properties to the asset property list with additional dialog.\n */\n allowAddingCustomProperties?: boolean;\n /**\n * Asset property list allows to provide custom properties as an input.\n * This flag defines how the input properties are handled.\n * - `merge` - input properties are merged with properties from asset list\n * - `override` - input properties override properties from asset list, meaning that only input properties are shown\n */\n inputPropertiesHandle?: 'merge' | 'override';\n /**\n * Enable or disable drag and drop functionality for reordering properties.\n */\n allowDragAndDrop?: boolean;\n};\n\nexport const defaultAssetPropertyListConfig: AssetPropertyListConfig = {\n filterable: true,\n selectMode: 'none',\n expansionMode: 'expandedByDefault',\n showHeader: true,\n showValue: true,\n showKey: true,\n emptyStateContent: 'empty',\n allowAddingCustomProperties: false,\n inputPropertiesHandle: 'merge',\n allowDragAndDrop: false\n};\n\nexport const defaultAssetProperties: Array<BaseProperty> = [\n {\n c8y_JsonSchema: { properties: { name: { type: 'string', label: 'Name' } } },\n name: 'name',\n label: gettext('Name'),\n type: 'string',\n active: true,\n isEditable: true,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: { properties: { id: { type: 'string', label: 'ID' } } },\n name: 'id',\n label: gettext('ID'),\n type: 'string',\n active: true,\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { type: { type: 'string', label: 'Type' } }\n },\n name: 'type',\n label: gettext('Type'),\n type: 'string',\n active: true,\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { owner: { type: 'string', label: 'Owner' } }\n },\n name: 'owner',\n label: gettext('Owner'),\n type: 'string',\n isEditable: false,\n isStandardProperty: true\n },\n {\n c8y_JsonSchema: {\n properties: { lastUpdated: { type: 'string', label: 'Last updated' } }\n },\n name: 'lastUpdated',\n label: gettext('Last updated'),\n type: 'string',\n isEditable: false,\n isStandardProperty: true\n }\n];\n\nexport const deviceAssetProperties: Array<BaseProperty> = [\n {\n label: gettext('Active alarms status'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_ActiveAlarmsStatus',\n c8y_JsonSchema: {\n properties: {\n c8y_ActiveAlarmsStatus: {\n key: 'c8y_ActiveAlarmsStatus',\n type: 'object',\n label: 'Active alarms status',\n properties: {\n critical: {\n title: 'Critical',\n type: 'number'\n },\n major: {\n title: 'Major',\n type: 'number'\n },\n minor: {\n title: 'Minor',\n type: 'number'\n },\n warning: {\n title: 'Warning',\n type: 'number'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Address'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Address',\n c8y_JsonSchema: {\n properties: {\n c8y_Address: {\n key: 'c8y_Address',\n type: 'object',\n label: 'Address',\n properties: {\n street: {\n title: 'Street',\n type: 'string'\n },\n city: {\n title: 'City',\n type: 'string'\n },\n cityCode: {\n title: 'City code',\n type: 'string'\n },\n territory: {\n title: 'Territory',\n type: 'string'\n },\n region: {\n title: 'Region',\n type: 'string'\n },\n country: {\n title: 'Country',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Agent'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Agent',\n c8y_JsonSchema: {\n properties: {\n c8y_Agent: {\n key: 'c8y_Agent',\n type: 'object',\n label: 'Agent',\n properties: {\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: 'string'\n },\n maintainer: {\n title: 'Maintainer',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Availability'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Availability',\n c8y_JsonSchema: {\n properties: {\n c8y_Availability: {\n key: 'c8y_Availability',\n type: 'object',\n label: 'Availability',\n properties: {\n status: {\n title: 'Status',\n type: 'string'\n },\n lastMessage: {\n title: 'Last message',\n type: 'string',\n printFormat: 'datetime'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Connection'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Connection',\n c8y_JsonSchema: {\n properties: {\n c8y_Connection: {\n key: 'c8y_Connection',\n type: 'object',\n label: 'Connection',\n properties: {\n status: {\n title: 'Status',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Communication mode'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_CommunicationMode',\n c8y_JsonSchema: {\n properties: {\n c8y_CommunicationMode: {\n key: 'c8y_CommunicationMode',\n type: 'object',\n label: 'Communication mode',\n properties: {\n mode: {\n title: 'Mode',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Firmware'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Firmware',\n c8y_JsonSchema: {\n properties: {\n c8y_Firmware: {\n key: 'c8y_Firmware',\n type: 'object',\n label: 'Firmware',\n properties: {\n moduleVersion: {\n title: 'Module version',\n type: 'string'\n },\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: ['string', 'null']\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Hardware'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Hardware',\n c8y_JsonSchema: {\n properties: {\n c8y_Hardware: {\n key: 'c8y_Hardware',\n type: 'object',\n label: 'Hardware',\n properties: {\n model: {\n title: 'Model',\n type: 'string'\n },\n serialNumber: {\n title: 'Serial number',\n type: 'string'\n },\n revision: {\n title: 'Revision',\n type: 'string'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('LPWAN device'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_LpwanDevice',\n c8y_JsonSchema: {\n properties: {\n c8y_LpwanDevice: {\n key: 'c8y_LpwanDevice',\n type: 'object',\n label: 'LPWAN device',\n properties: {\n provisioned: {\n title: 'Provisioned',\n type: 'boolean'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Mobile'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Mobile',\n c8y_JsonSchema: {\n properties: {\n c8y_Mobile: {\n key: 'c8y_Mobile',\n type: 'object',\n label: 'Mobile',\n properties: {\n cellId: {\n title: 'Cell ID',\n type: ['string', 'null']\n },\n connType: {\n title: 'Connection type',\n type: 'string',\n readOnly: true\n },\n currentOperator: {\n title: 'Current operator',\n type: 'string',\n readOnly: true\n },\n currentBand: {\n title: 'Current band',\n type: 'string',\n readOnly: true\n },\n ecn0: {\n title: 'ECN0',\n type: 'string',\n readOnly: true\n },\n iccid: {\n title: 'ICCID',\n type: ['string', 'null']\n },\n imei: {\n title: 'IMEI',\n type: ['string', 'null']\n },\n imsi: {\n title: 'IMSI',\n type: ['string', 'null']\n },\n lac: {\n title: 'LAC',\n type: ['string', 'null']\n },\n mcc: {\n title: 'MCC',\n type: ['string', 'null']\n },\n mnc: {\n title: 'MNC',\n type: ['string', 'null']\n },\n msisdn: {\n title: 'MSISDN',\n type: 'string'\n },\n rcsp: {\n title: 'RCSP',\n type: 'string',\n readOnly: true\n },\n rscp: {\n title: 'RSCP',\n type: 'string',\n readOnly: true\n },\n rsrp: {\n title: 'RSRP',\n type: 'string',\n readOnly: true\n },\n rsrq: {\n title: 'RSRQ',\n type: 'string',\n readOnly: true\n },\n rssi: {\n title: 'RSSI',\n type: 'string',\n readOnly: true\n }\n }\n }\n }\n }\n },\n {\n name: 'c8y_Notes',\n label: 'Notes',\n type: 'string',\n isEditable: true,\n isStandardProperty: true,\n c8y_JsonSchema: {\n properties: {\n c8y_Notes: {\n type: 'string',\n label: 'Notes',\n 'x-schema-form': {\n type: 'textarea'\n }\n }\n }\n }\n },\n {\n label: gettext('Position'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Position',\n c8y_JsonSchema: {\n properties: {\n c8y_Position: {\n key: 'c8y_Position',\n type: 'object',\n label: 'Position',\n properties: {\n lat: {\n title: 'Latitude',\n type: 'number'\n },\n lng: {\n title: 'Longitude',\n type: 'number'\n },\n alt: {\n title: 'Altitude',\n type: 'number'\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Required availability'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_RequiredAvailability',\n c8y_JsonSchema: {\n properties: {\n c8y_RequiredAvailability: {\n key: 'c8y_RequiredAvailability',\n type: 'object',\n label: 'Required availability',\n properties: {\n responseInterval: {\n title: 'Response interval',\n description:\n 'Takes a value between -32768 and 32767 minutes (a negative value indicates that the device is under maintenance).',\n type: 'integer',\n minimum: -32768,\n maximum: 32767\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Software'),\n type: 'object',\n isEditable: false,\n isStandardProperty: true,\n name: 'c8y_Software',\n c8y_JsonSchema: {\n properties: {\n c8y_Software: {\n key: 'c8y_Software',\n type: 'object',\n label: 'Software',\n properties: {\n name: {\n title: 'Name',\n type: 'string'\n },\n version: {\n title: 'Version',\n type: 'string'\n },\n url: {\n title: 'URL',\n type: ['string', 'null']\n }\n }\n }\n }\n }\n },\n {\n label: gettext('Network'),\n type: 'object',\n isEditable: true,\n isStandardProperty: true,\n name: 'c8y_Network',\n c8y_JsonSchema: {\n properties: {\n c8y_Network: {\n key: 'c8y_Network',\n type: 'object',\n label: 'Network',\n properties: {\n c8y_DHCP: {\n title: 'DHCP',\n type: 'object',\n printFormat: 'hidden',\n name: 'c8y_DHCP',\n properties: {\n addressRange: {\n title: 'Address range',\n type: 'object',\n name: 'addressRange',\n printFormat: 'hidden',\n properties: {\n start: {\n title: 'Start',\n type: 'string'\n },\n end: {\n title: 'End',\n type: 'string'\n }\n }\n },\n dns1: {\n title: 'DNS 1',\n type: 'string'\n },\n dns2: {\n title: 'DNS 2',\n type: 'string'\n },\n enabled: {\n title: 'Enabled',\n type: 'integer'\n }\n }\n },\n c8y_LAN: {\n title: 'LAN',\n type: 'object',\n name: 'c8y_LAN',\n printFormat: 'hidden',\n properties: {\n enabled: {\n title: 'Enabled',\n type: 'integer'\n },\n ip: {\n title: 'IP',\n type: 'string'\n },\n mac: {\n title: 'MAC',\n type: 'string'\n },\n name: {\n title: 'Name',\n type: 'string'\n },\n netmask: {\n title: 'Netmask',\n type: 'string'\n }\n }\n },\n c8y_WAN: {\n title: 'WAN',\n type: 'object',\n name: 'c8y_WAN',\n printFormat: 'hidden',\n properties: {\n apn: {\n title: 'APN',\n type: 'string'\n },\n authType: {\n title: 'Auth type',\n type: 'string'\n },\n ip: {\n title: 'IP',\n type: 'string'\n },\n password: {\n title: 'Password',\n type: 'string'\n },\n simStatus: {\n title: 'SIM status',\n type: 'string'\n },\n username: {\n title: 'Username',\n type: 'string'\n }\n }\n }\n }\n }\n }\n }\n }\n];\n\nexport const RESULT_TYPES = {\n VALUE: { name: 'VALUE', value: 1, label: gettext('Only value') },\n VALUE_UNIT: { name: 'VALUE_UNIT', value: 2, label: gettext('Value and unit') },\n VALUE_UNIT_TIME: { name: 'VALUE_UNIT_TIME', value: 3, label: gettext('Value, unit and time') }\n};\nexport type C8yPropertyType =\n | 'string'\n | 'number'\n | 'integer'\n | 'boolean'\n | 'object'\n | 'array'\n | 'null'\n | 'date'\n | 'enum'\n | 'file'\n | 'c8y_JsonSchema'\n | ['string', 'null']\n | Array<C8yPropertyType>;\n\ntype C8yPropertyFormat = 'datetime' | 'hidden' | 'textarea';\n\nexport interface C8yJsonSchemaProperty {\n type: C8yPropertyType;\n title?: string;\n label?: string;\n description?: string;\n key?: string;\n name?: string;\n minimum?: number;\n maximum?: number;\n minLength?: number;\n maxLength?: number;\n pattern?: string;\n required?: boolean;\n readOnly?: boolean;\n printFormat?: C8yPropertyFormat;\n 'x-schema-form'?: {\n type: string;\n };\n properties?: Record<string, C8yJsonSchemaProperty>;\n items?: C8yJsonSchemaProperty;\n 'x-show-if-any-available'?: { contextPath: string }[];\n [key: string]: any;\n}\n\nexport interface C8yJsonSchema {\n properties: Record<string, C8yJsonSchemaProperty>;\n required?: string[];\n}\n\nexport interface BaseProperty {\n name: string;\n label: string;\n type: C8yPropertyType;\n isEditable?: boolean;\n temporary?: boolean;\n isStandardProperty?: boolean;\n c8y_JsonSchema?: C8yJsonSchema;\n active?: boolean;\n computed?: boolean;\n instanceId?: string;\n [key: string]: any;\n}\n\nexport interface NestedPropertyFields extends BaseProperty {\n title?: string;\n properties?: object;\n keyPath: string[];\n}\n\nexport type AssetPropertyType = BaseProperty | NestedPropertyFields;\n","import { inject, Injectable, InjectionToken, Injector } from '@angular/core';\nimport {\n ExtensionPointForPlugins,\n GenericHookOptions,\n GenericHookType,\n hookGeneric,\n PluginsResolveService,\n getInjectedHooks,\n stateToFactory,\n fromTriggerOnce,\n GroupService\n} from '@c8y/ngx-components';\nimport {\n ComputedPropertyContextType,\n ComputedPropertyContextValue,\n ComputedPropertyDefinition\n} from './asset-properties.model';\nimport { Router } from '@angular/router';\nimport {\n distinctUntilChanged,\n filter,\n firstValueFrom,\n map,\n mergeMap,\n Observable,\n shareReplay,\n take\n} from 'rxjs';\nimport { IAlarm, IEvent, IManagedObject } from '@c8y/client';\n\nexport const HOOK_COMPUTED_PROPERTY = new InjectionToken<ComputedPropertyDefinition[]>(\n 'HOOK_COMPUTED_PROPERTY'\n);\n\nexport function hookComputedProperty(\n property: GenericHookType<ComputedPropertyDefinition>,\n options?: Partial<GenericHookOptions>\n) {\n return hookGeneric<ComputedPropertyDefinition>(property, HOOK_COMPUTED_PROPERTY, options);\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ComputedPropertiesService extends ExtensionPointForPlugins<ComputedPropertyDefinition> {\n private groupService = inject(GroupService);\n\n constructor(\n rootInjector: Injector,\n private router: Router,\n plugins: PluginsResolveService\n ) {\n super(rootInjector, plugins);\n this.items$ = this.setupItemsObservable();\n }\n\n /**\n * Returns the current state.\n * @readonly\n * @returns The current set of computed properties.\n */\n get state(): Set<ComputedPropertyDefinition> {\n return this.state$.value;\n }\n\n add(propertyDef: ComputedPropertyDefinition) {\n this.state.add(propertyDef);\n this.emitNewState();\n }\n\n getByName(name: string): Promise<ComputedPropertyDefinition> {\n if (!name) {\n return Promise.resolve(undefined);\n }\n return firstValueFrom(\n this.items$.pipe(\n mergeMap((propertyDefs: ComputedPropertyDefinition[]) => propertyDefs),\n filter((propertyDef: ComputedPropertyDefinition) => propertyDef.name === name),\n take(1)\n )\n );\n }\n\n getByContext(asset: ComputedPropertyContextValue): Promise<ComputedPropertyDefinition[]> {\n if (!asset) {\n return Promise.resolve([]);\n }\n const computedPropertyContextType: ComputedPropertyContextType = this.getTypeOfContext(asset);\n\n return firstValueFrom(\n this.items$.pipe(\n map((propertyDefs: ComputedPropertyDefinition[]) =>\n propertyDefs.filter((propertyDef: ComputedPropertyDefinition) => {\n if (!propertyDef.contextType) {\n return true;\n }\n return propertyDef.contextType.includes(computedPropertyContextType);\n })\n )\n )\n );\n }\n\n private getTypeOfContext(context: ComputedPropertyContextValue): ComputedPropertyContextType {\n const isEvent = (item: IAlarm | IEvent): item is IEvent => !('severity' in item);\n const isAlarm = (item: IAlarm | IEvent): item is IAlarm => 'severity' in item;\n\n if (this.groupService.isDevice(context as IManagedObject)) {\n return 'device';\n } else if (\n this.groupService.isGroup(context as IManagedObject) &&\n !this.groupService.isAsset(context as IManagedObject)\n ) {\n return 'group';\n } else if (this.groupService.isAsset(context as IManagedObject)) {\n return 'asset';\n } else if (isAlarm(context as IAlarm | IEvent)) {\n return 'alarm';\n } else if (isEvent(context as IAlarm | IEvent)) {\n return 'event';\n }\n }\n\n protected setupItemsObservable(): Observable<ComputedPropertyDefinition[]> {\n return fromTriggerOnce<ComputedPropertyDefinition>(this.router, this.refresh$, [\n getInjectedHooks<ComputedPropertyDefinition>(HOOK_COMPUTED_PROPERTY, this.injectors),\n () => this.factories,\n stateToFactory(this.state$)\n ]).pipe(distinctUntilChanged(), shareReplay(1));\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { IManagedObject, InventoryService, IResultList } from '@c8y/client';\nimport { AlertService, AssetTypesRealtimeService, GroupService } from '@c8y/ngx-components';\nimport { isObjectLike, isEmpty, forOwn, isArray, find } from 'lodash-es';\nimport { firstValueFrom } from 'rxjs';\nimport {\n AssetPropertyType,\n C8yJsonSchemaProperty,\n NestedPropertyFields\n} from './asset-properties.model';\nimport { ComputedPropertiesService } from './computed-properties.service';\n/**\n * Service for managing asset properties.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AssetPropertiesService {\n private readonly FRAGMENTS_TO_OMIT = [\n 'additionParents',\n 'assetParents',\n 'deviceParents',\n 'childAdditions',\n 'childAssets',\n 'childDevices',\n 'c8y_IsDevice',\n '__children',\n 'c8y_ui',\n 'self',\n 'parent',\n 'c8y_DataPoint',\n 'c8y_Kpi_Migrated',\n /^c8y_Dashboard!\\d+/\n ];\n\n private inventoryService = inject(InventoryService);\n private assetTypesRealtimeService = inject(AssetTypesRealtimeService);\n private groupService = inject(GroupService);\n private alert = inject(AlertService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n\n /**\n * Filters added properties to only include those compatible with the given asset.\n * Currently only checks compatibility for computed properties.\n * @param allAddedProperties All properties that have been added by the user\n * @param asset The current asset context\n * @returns Promise resolving to properties compatible with the asset\n */\n async filterCompatibleProperties(\n allAddedProperties: AssetPropertyType[],\n asset: IManagedObject\n ): Promise<AssetPropertyType[]> {\n if (!asset || !allAddedProperties.length) {\n return allAddedProperties;\n }\n\n let availableComputedPropertyNames: Set<string> | null = null;\n const computedProperties = allAddedProperties.filter(prop => prop.computed);\n\n if (computedProperties.length > 0) {\n const availableComputedProperties = await this.computedPropertiesService.getByContext(asset);\n availableComputedPropertyNames = new Set(\n availableComputedProperties.map(({ prop }) => prop.name)\n );\n }\n\n const compatibleProperties: AssetPropertyType[] = [];\n\n for (const property of allAddedProperties) {\n if (await this.isPropertyAvailable(property, availableComputedPropertyNames)) {\n compatibleProperties.push(property);\n }\n }\n\n return compatibleProperties;\n }\n\n /**\n * Retrieves properties for an asset from asset library.\n * @param asset The asset for which to retrieve custom properties.\n * @returns A promise resolving to the list of custom properties.\n */\n async requestAssetProperties(asset: IManagedObject): Promise<IManagedObject[]> {\n if (asset && asset.type) {\n const assetType = await firstValueFrom(\n this.assetTypesRealtimeService.getAssetTypeByName$(asset.type)\n );\n if (assetType) {\n const { data } = await this.inventoryService.childAdditionsList(assetType, {\n pageSize: 2000,\n query: \"$filter=(has('c8y_IsAssetProperty'))\"\n });\n return data;\n }\n }\n return [];\n }\n\n /**\n * Retrieves the initial set of properties for an asset, based on its type.\n * @param asset The asset for which to retrieve properties.\n * @returns A promise resolving to the list of initial properties.\n */\n async getInitialProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n if (!asset) {\n return [];\n } else if (this.groupService.isDevice(asset)) {\n return await this.getDeviceProperties(asset);\n } else if (this.groupService.isGroup(asset) && !this.groupService.isAsset(asset)) {\n return await this.getGroupProperties(asset);\n } else if (this.groupService.isAsset(asset)) {\n return await this.getAssetProperties(asset);\n }\n return [];\n }\n\n /**\n * Retrieves properties for a device asset.\n * @param asset The device asset for which to retrieve properties.\n * @returns A promise resolving to the list of device properties.\n */\n async getDeviceProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n return this.getManagedObjectProperties(asset);\n }\n\n /**\n * Retrieves properties for a group asset.\n * @param asset The group asset for which to retrieve properties.\n * @returns A promise resolving to the list of group properties.\n */\n async getGroupProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n return this.getManagedObjectProperties(asset);\n }\n\n /**\n * Retrieves properties for a regular asset.\n * @param asset The asset for which to retrieve properties.\n * @returns A promise resolving to the list of asset properties.\n */\n async getAssetProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n const customProperties =\n this.categorizeCustomProperties(await this.requestAssetProperties(asset)) || [];\n return customProperties;\n }\n\n /**\n * Categorizes custom properties into simple and complex types.\n * @param properties The custom properties to categorize.\n * @returns The categorized custom properties.\n */\n categorizeCustomProperties(properties: IManagedObject[]): AssetPropertyType[] {\n const { simple, complex } = properties.reduce(\n (acc, property) => {\n const schema = property.c8y_JsonSchema.properties[property.name];\n if (schema.type === 'object') {\n acc.complex.push(property);\n } else {\n acc.simple.push(property);\n }\n return acc;\n },\n { simple: [], complex: [] }\n );\n\n return [...simple, ...complex] as AssetPropertyType[];\n }\n\n /**\n * Categorizes and flattens hierarchical properties into simple and complex types.\n * @param properties The hierarchical properties to categorize and flatten.\n * @returns The categorized and flattened properties.\n */\n categorizeAndFlattenHierarchicalProperties(properties: AssetPropertyType[]): {\n computed: AssetPropertyType[];\n simple: AssetPropertyType[];\n complex: AssetPropertyType[];\n } {\n const sortedProperties = [...properties].sort((a, b) => {\n const aLabel = (a.label || a.name || '').toLowerCase();\n const bLabel = (b.label || b.name || '').toLowerCase();\n return aLabel.localeCompare(bLabel);\n });\n const result = sortedProperties.reduce(\n (acc, property) => {\n property.active = false;\n if (property.computed) {\n acc.computed.push(property);\n } else if (this.isComplexProperty(property)) {\n acc.complex.push(property);\n this.addNestedProperties(property, acc.complex, true);\n } else {\n acc.simple.push(property);\n }\n return acc;\n },\n { computed: [], simple: [], complex: [] }\n );\n return result;\n }\n\n /**\n * Checks if a property is complex (i.e., has nested properties).\n * @param property The property to check.\n * @returns True if the property is complex, false otherwise.\n */\n isComplexProperty(property: AssetPropertyType): boolean {\n return (\n property.c8y_JsonSchema?.properties[property.name]?.type === 'object' ||\n property.properties !== undefined\n );\n }\n\n /**\n * Checks if property is available based on provided available computed property names.\n * @param property The property to check.\n * @param availableComputedPropertyNames Set of available computed property names.\n * @returns True if the property is available, false otherwise.\n */\n async isPropertyAvailable(\n property: AssetPropertyType,\n availableComputedPropertyNames: Set<string>\n ): Promise<boolean> {\n if (property.computed) {\n if (!availableComputedPropertyNames) {\n return false;\n }\n return availableComputedPropertyNames.has(property.name);\n }\n\n return true;\n }\n\n /**\n * Checks if two properties match for selection purposes.\n * @param property1 First property to compare.\n * @param property2 Second property to compare.\n * @returns True if properties match.\n */\n propertiesMatch(property1: AssetPropertyType, property2: AssetPropertyType): boolean {\n if (property1.name === property2.name) {\n const keyPath1 = (property1 as NestedPropertyFields).keyPath;\n const keyPath2 = (property2 as NestedPropertyFields).keyPath;\n\n if (keyPath1 && keyPath2) {\n return keyPath1.join('.') === keyPath2.join('.');\n } else if (!keyPath1 && !keyPath2) {\n if (\n property1.computed &&\n property2.computed &&\n property1.instanceId &&\n property2.instanceId\n ) {\n return property1.instanceId === property2.instanceId;\n }\n return true;\n }\n }\n return false;\n }\n\n /**\n * Retrieves custom properties from the properties library, optionally filtered by search text.\n * @param searchText Optional search text to filter properties.\n * @returns A promise resolving to the list of properties and paging information.\n */\n async getPropertiesFromPropertiesLibrary(searchText?: string) {\n const propertiesFromLibrary: AssetPropertyType[] = [];\n const { data: propertiesMOs, paging } =\n await this.requestPropertiesFromPropertiesLibrary(searchText);\n propertiesMOs.forEach(prop => {\n const name = Object.keys(prop.c8y_JsonSchema.properties)[0];\n propertiesFromLibrary.push({\n c8y_JsonSchema: prop.c8y_JsonSchema,\n label: prop.name,\n name,\n type: prop.c8y_JsonSchema.properties[name].type\n });\n });\n return { propertiesFromLibrary, paging };\n }\n\n private async requestPropertiesFromPropertiesLibrary(\n searchText?: string\n ): Promise<IResultList<IManagedObject>> {\n let queryFilter = '(type eq c8y_JsonSchema) and (appliesTo.MANAGED_OBJECTS eq true)';\n\n if (searchText?.trim()) {\n const escapedSearchText = searchText.replace(/'/g, \"''\");\n queryFilter += ` and (name eq '*${escapedSearchText}*')`;\n }\n\n const query = `$filter=(${queryFilter})`;\n const filter = {\n pageSize: 20,\n revert: true,\n query,\n withTotalPages: true,\n withTotalElements: true\n };\n try {\n const results = await this.inventoryService.list(filter);\n return results;\n } catch (error) {\n this.alert.addServerFailure(error);\n return null;\n }\n }\n\n private addNestedProperties(\n parentProperty: AssetPropertyType,\n complexProperties: AssetPropertyType[],\n sortChildren = false\n ): void {\n const schema = parentProperty.c8y_JsonSchema?.properties[parentProperty.name];\n if (!schema?.properties) {\n return;\n }\n this.flattenProperties(schema, complexProperties, parentProperty.name, [], sortChildren);\n }\n\n private flattenProperties(\n schema: C8yJsonSchemaProperty,\n result: AssetPropertyType[],\n parentName: string,\n parentPath: string[] = [],\n sortChildren = false\n ): void {\n const properties = schema.properties?.[parentName]?.properties || schema.properties;\n let entries = Object.entries(properties);\n if (sortChildren) {\n entries = entries.sort((a, b) => {\n const aLabel = (a[1].title || a[1].label || a[1].name || a[0] || '').toLowerCase();\n const bLabel = (b[1].title || b[1].label || b[1].name || b[0] || '').toLowerCase();\n return aLabel.localeCompare(bLabel);\n });\n }\n entries.forEach(([key, property]) => {\n const path = parentPath.includes(parentName) ? parentPath : [...parentPath, parentName];\n result.push({ ...property, keyPath: [...path, key] } as AssetPropertyType);\n if (property.properties) {\n this.flattenProperties(\n { properties: { [key]: property } } as C8yJsonSchemaProperty,\n result,\n key,\n [...path, key],\n sortChildren\n );\n }\n });\n }\n\n private getManagedObjectProperties(asset: IManagedObject): AssetPropertyType[] {\n return this.extractFragments(asset);\n }\n\n private extractFragments(object: IManagedObject): AssetPropertyType[] {\n const properties = [];\n for (const [key, value] of Object.entries(object)) {\n if (\n this.shouldSkipFragment(key) ||\n isArray(value) ||\n (isObjectLike(value) && isEmpty(value))\n ) {\n continue;\n }\n const newProp = {\n label: key,\n name: key,\n type: isObjectLike(value) ? 'object' : 'string',\n isEditable: true,\n c8y_JsonSchema: {\n properties: {\n [key]: {\n key: key,\n type: isObjectLike(value) ? 'object' : 'string',\n label: key,\n properties: {}\n }\n }\n }\n };\n\n if (isObjectLike(value)) {\n this.addPropertyItem(newProp.c8y_JsonSchema.properties[key].properties, value);\n }\n\n properties.push(newProp);\n }\n\n return properties;\n }\n\n private shouldSkipFragment(key: string): boolean {\n return !!find(this.FRAGMENTS_TO_OMIT, (fragmentToOmit: string | RegExp) => {\n if (fragmentToOmit instanceof RegExp) {\n return fragmentToOmit.test(key);\n }\n return fragmentToOmit === key;\n });\n }\n\n private addPropertyItem(properties, object) {\n if (!properties) {\n return;\n }\n forOwn(object, (value, key) => {\n properties[key] = { title: key, type: value ? typeof value : 'string' };\n if (isObjectLike(value)) {\n properties[key].type = 'object';\n this.addPropertyItem(properties[key]['properties'], value);\n }\n });\n }\n}\n","import { DataSource } from '@angular/cdk/collections';\nimport { AssetPropertyType } from '../asset-properties.model';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport interface AssetPropertyFlatNode {\n expandable: boolean;\n level: number;\n property: AssetPropertyType;\n isVisible: boolean;\n indeterminate?: boolean;\n contextAssetId?: string;\n}\n\nexport class FlatTreeDataSource extends DataSource<AssetPropertyFlatNode> {\n private _dataChange = new BehaviorSubject<AssetPropertyFlatNode[]>([]);\n\n constructor() {\n super();\n }\n\n get data(): AssetPropertyFlatNode[] {\n return this._dataChange.value;\n }\n\n set data(value: AssetPropertyFlatNode[]) {\n this._dataChange.next(value);\n }\n\n connect(): Observable<AssetPropertyFlatNode[]> {\n return this._dataChange.asObservable();\n }\n\n disconnect(): void {\n // No need to unsubscribe from the _dataChange subject since it's a BehaviorSubject\n }\n}\n","import { Directive, ElementRef, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[c8yAssetPropertyAction]',\n standalone: true\n})\nexport class AssetPropertyActionDirective {\n constructor(\n public template: TemplateRef<unknown>,\n public elementRef: ElementRef,\n public viewContainer: ViewContainerRef\n ) {}\n}\n","import { inject, Injector, Pipe, runInInjectionContext } from '@angular/core';\nimport { AssetPropertyType, ComputedPropertyContextValue } from '../asset-properties.model';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport { get } from 'lodash-es';\nimport { ComputedPropertiesService } from '../computed-properties.service';\nimport { from, isObservable, map, Observable, of, switchMap } from 'rxjs';\n\n/**\n * Formats the value of an asset property.\n * If the property is complex, it will be stringified.\n * If the property has a keyPath, it will be used to retrieve the value from the asset.\n * Otherwise, the value will be taken directly from the asset.\n * If the value is null or undefined, a dash ('-') will be returned.\n */\n@Pipe({\n name: 'c8yAssetPropertyValue',\n standalone: true\n})\nexport class AssetPropertyValuePipe {\n private assetPropertiesService = inject(AssetPropertiesService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n private injector = inject(Injector);\n\n transform(\n property: AssetPropertyType,\n context: ComputedPropertyContextValue\n ): Promise<string> | Observable<string> {\n if (property.computed) {\n return this.getCallbackComputedPropertyValue(property, context).pipe(\n map(val => this.formatPropertyValue(val))\n );\n }\n\n if (!property) {\n return of('-');\n }\n let value: string;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n value = JSON.stringify(context[property.name]);\n } else if ('keyPath' in property) {\n value = this.formatPropertyValue(get(context, property.keyPath));\n } else {\n value = this.formatPropertyValue(context[property.name]);\n }\n return of(value ?? '-');\n }\n\n private formatPropertyValue(value: any): string {\n if (value == null) {\n return null;\n }\n return typeof value === 'string' ? value : JSON.stringify(value);\n }\n\n private getCallbackComputedPropertyValue(\n property: AssetPropertyType,\n context: ComputedPropertyContextValue\n ): any | Promise<any> | Observable<any> {\n return from(this.computedPropertiesService.getByName(property.name)).pipe(\n switchMap(definition => {\n let value: any | Observable<any> | Promise<any> = '-';\n runInInjectionContext(definition.injector || this.injector, () => {\n value = definition.value({ config: property.config, context });\n });\n\n if (isObservable(value) || value instanceof Promise) {\n return value;\n } else {\n return of(value);\n }\n })\n );\n }\n}\n","import { Pipe } from '@angular/core';\nimport { AssetPropertyType } from '../asset-properties.model';\n\n/**\n * Pipe to transform asset property types into icon names.\n * Maps various property types to corresponding icon names.\n */\n@Pipe({\n name: 'c8yAssetPropertyIcon',\n standalone: true\n})\nexport class AssetPropertyIconPipe {\n transform(assetProperty: AssetPropertyType): string {\n if (assetProperty.computed) {\n return 'bolt';\n }\n const type = assetProperty.type;\n switch (type) {\n case 'string':\n return 'string';\n case 'number':\n return 'hashtag';\n case 'boolean':\n return 'true-false';\n case 'date':\n return 'calendar';\n case 'object':\n case 'c8y_JsonSchema':\n return 'c8y-css';\n case 'enum':\n return 'content';\n case 'file':\n return 'file';\n case 'integer':\n return 'unit';\n default:\n return 'mix-words';\n }\n }\n}\n","import { inject, Pipe } from '@angular/core';\nimport { AssetPropertyType, C8yPropertyType } from '../asset-properties.model';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\n\n/**\n * A pipe that transforms an asset property type into a tooltip string.\n * If the property is temporary, it appends \"(temporary)\" to the type and handles translation.\n * Otherwise, it returns the type as is.\n */\n@Pipe({\n name: 'c8yAssetPropertyIconTooltip',\n standalone: true\n})\nexport class AssetPropertyIconTooltipPipe {\n private translateService = inject(TranslateService);\n\n transform(property: AssetPropertyType): string | C8yPropertyType {\n if (!property) {\n return '';\n } else if (property.temporary) {\n return this.translateService.instant(gettext('{{assetPropertyType}}\\n(temporary)'), {\n assetPropertyType: property.type\n });\n } else {\n return property.type;\n }\n }\n}\n","import {\n Component,\n ComponentRef,\n EnvironmentInjector,\n inject,\n Injector,\n Input,\n reflectComponentType,\n Type,\n effect,\n viewChildren,\n ViewContainerRef\n} from '@angular/core';\nimport {\n AssetPropertyType,\n ComputedPropertyComponent,\n ComputedPropertyDefinition\n} from '../asset-properties.model';\nimport { C8yTranslatePipe, IconDirective, isPromise, OnBeforeSave } from '@c8y/ngx-components';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\nimport { FormsModule, NgForm } from '@angular/forms';\nimport { firstValueFrom, from, isObservable, Observable, of } from 'rxjs';\nimport { isUndefined } from 'lodash-es';\nimport { NgFor } from '@angular/common';\nimport { IManagedObject } from '@c8y/client';\n\ninterface PropertyConfig {\n property: AssetPropertyType;\n definition: ComputedPropertyDefinition;\n config: unknown;\n componentRef?: ComponentRef<Component>;\n componentInstance?: ComputedPropertyComponent;\n}\n\n@Component({\n selector: 'c8y-computed-properties-config',\n templateUrl: './computed-properties-config.component.html',\n standalone: true,\n imports: [C8yTranslatePipe, IconDirective, FormsModule, NgFor]\n})\nexport class ComputedPropertiesConfigComponent {\n @Input() properties: AssetPropertyType[] = [];\n @Input() definitions: ComputedPropertyDefinition[] = [];\n @Input() asset?: IManagedObject;\n\n hosts = viewChildren('host', { read: ViewContainerRef });\n configForms = viewChildren('configForm', { read: NgForm });\n\n propertyConfigs: PropertyConfig[] = [];\n result: Promise<unknown[]> = new Promise((resolve, reject) => {\n this._close = resolve;\n this._cancel = reject;\n });\n\n private injector = inject(Injector);\n private bsModalRef = inject(BsModalRef);\n private _close: (value: unknown[]) => void;\n private _cancel: (reason?: any) => void;\n\n constructor() {\n effect(async () => {\n const hosts = this.hosts();\n if (!hosts || hosts.length === 0) {\n return;\n }\n for (let i = 0; i < this.propertyConfigs.length; i++) {\n const propertyConfig = this.propertyConfigs[i];\n const host = hosts[i];\n if (host && propertyConfig.definition) {\n await this.createConfigComponent(propertyConfig, host);\n }\n }\n });\n }\n\n ngOnInit() {\n this.propertyConfigs = this.properties.map((property, index) => ({\n property,\n definition: this.definitions[index],\n config: property.config || this.definitions[index].prop.config\n }));\n }\n\n get isFormValid(): boolean {\n return this.configForms().every(form => form.valid) ?? false;\n }\n\n async apply(): Promise<void> {\n const allValid = await this.callOnBeforeSaveHooks();\n if (allValid) {\n const configs = this.propertyConfigs.map(pc => pc.config);\n this._close(configs);\n this.bsModalRef.hide();\n }\n }\n\n cancel(): void {\n this.bsModalRef.hide();\n this._cancel();\n }\n\n private async createConfigComponent(\n propertyConfig: PropertyConfig,\n host: ViewContainerRef\n ): Promise<void> {\n const component = await this.getComponent(propertyConfig.definition);\n host.clear();\n const componentRef = host.createComponent(component, {\n environmentInjector: this.injector as EnvironmentInjector\n });\n\n propertyConfig.componentRef = componentRef;\n propertyConfig.componentInstance = componentRef.instance as ComputedPropertyComponent;\n\n const componentMetadata = this.safeReflectComponentType(component);\n const hasConfigInput = componentMetadata?.inputs.some(input => input.propName === 'config');\n\n if (hasConfigInput) {\n componentRef.setInput('config', propertyConfig.config);\n } else {\n propertyConfig.componentInstance.config = propertyConfig.config;\n }\n\n const hasAssetInput = componentMetadata?.inputs.some(input => input.propName === 'asset');\n if (hasAssetInput) {\n componentRef.setInput('asset', this.asset);\n } else {\n propertyConfig.componentInstance.asset = this.asset;\n }\n }\n\n private safeReflectComponentType(componentType: Type<any>) {\n try {\n return reflectComponentType(componentType);\n } catch (error) {\n console.warn('Failed to reflect component metadata:', error);\n return { inputs: [] };\n }\n }\n\n private async getComponent(definition: ComputedPropertyDefinition): Promise<Type<any>> {\n if (!!definition.loadConfigComponent) {\n return await definition.loadConfigComponent();\n } else if (!!definition.configComponent) {\n return definition.configComponent;\n }\n }\n\n private async callOnBeforeSaveHooks(): Promise<boolean> {\n const validationObservables = this.propertyConfigs\n .filter(pc => pc.componentRef)\n .map(pc => this.callSingleOnBeforeSaveHook(pc.componentRef, pc.config));\n\n try {\n const validationPromises = validationObservables.map(obs => firstValueFrom(obs));\n const results = await Promise.all(validationPromises);\n return results.every(result => result === true);\n } catch (error) {\n return false;\n }\n }\n\n private callSingleOnBeforeSaveHook(\n componentRef: ComponentRef<Component>,\n config: unknown\n ): Observable<boolean> {\n if (!componentRef) {\n return of(true);\n }\n const hook = (componentRef.instance as OnBeforeSave).onBeforeSave;\n if (hook) {\n const result = hook.call(componentRef.instance, config);\n if (isUndefined(result)) {\n return of(true);\n }\n if (isPromise(result)) {\n return from(result) as Observable<boolean>;\n }\n return (isObservable(result) ? result : of(result)) as Observable<boolean>;\n }\n return of(true);\n }\n}\n","<div class=\"viewport-modal has-asset-selector\">\n <div class=\"modal-header dialog-header\">\n <i [c8yIcon]=\"'bolt'\"></i>\n <div\n class=\"modal-title\"\n id=\"modal-title\"\n translate\n >\n Configure computed properties\n </div>\n </div>\n <div\n class=\"inner-scroll\"\n id=\"modal-body\"\n >\n <p\n class=\"p-t-16 p-l-24 p-r-24 p-b-16 bg-component separator-bottom sticky-top text-center text-balance\"\n translate\n >\n Configure the settings below for each computed property. These configurations determine how\n the properties will be calculated and displayed. All required fields must be completed before\n you can apply the changes.\n </p>\n <div class=\"p-24 p-t-0\">\n <fieldset\n class=\"property-config-section c8y-fieldset p-b-8\"\n *ngFor=\"let propertyConfig of propertyConfigs; let i = index\"\n >\n <legend>\n {{ (propertyConfig.property.label || propertyConfig.property.name) | translate }}\n <span class=\"a-s-center m-l-8 tag tag--default\">{{ propertyConfig.property.name }}</span>\n </legend>\n <form\n class=\"property-config-form\"\n name=\"configForm{{ i }}\"\n #configForm=\"ngForm\"\n >\n <ng-template #host></ng-template>\n </form>\n </fieldset>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n [title]=\"'Cancel' | translate\"\n type=\"button\"\n (click)=\"cancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n [title]=\"'Apply' | translate\"\n type=\"button\"\n (click)=\"apply()\"\n [disabled]=\"!isFormValid\"\n >\n {{ 'Apply' | translate }}\n </button>\n </div>\n</div>\n","import { inject, Pipe } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AssetPropertyFlatNode } from './tree-data-source';\n\n/**\n * Pipe to get the title for the collapse/expand button of a tree node.\n */\n@Pipe({\n name: 'c8yAssetPropertyCollapseButtonTitle',\n standalone: true\n})\nexport class AssetPropertyCollapseButtonTitlePipe {\n private collapseLabel = gettext('Collapse \"{{ assetPropertyLabel }}\"');\n private expandLabel = gettext('Expand \"{{ assetPropertyLabel }}\"');\n private readonly translateService = inject(TranslateService);\n\n transform(expanded: boolean, node: AssetPropertyFlatNode): string {\n if (!node) {\n return '';\n } else {\n const template = expanded ? this.collapseLabel : this.expandLabel;\n const assetPropertyLabel = node.property.label || node.property.title || node.property.name;\n return this.translateService.instant(template, {\n assetPropertyLabel: this.translateService.instant(assetPropertyLabel)\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AssetPropertyFlatNode } from './tree-data-source';\nimport { NestedPropertyFields } from '../asset-properties.model';\n\nexport interface DragDropContext {\n draggedNode: AssetPropertyFlatNode;\n previousIndex: number;\n currentIndex: number;\n data: AssetPropertyFlatNode[];\n}\n\nexport interface DropPosition {\n targetLevel: number;\n targetParentPath: string;\n insertIndex: number;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AssetPropertyDragDropService {\n /**\n * Main method to handle the drag and drop operation\n */\n handleDrop(context: DragDropContext): AssetPropertyFlatNode[] | null {\n if (context.previousIndex === context.currentIndex) {\n return null;\n }\n\n if (!this.validateDrop(context)) {\n return null;\n }\n\n return this.performMove(context);\n }\n\n /**\n * Validates if the drop operation is allowed\n */\n private validateDrop(context: DragDropContext): boolean {\n const { draggedNode } = context;\n\n // Get source and target information\n const draggedLevel = this.getNodeLevel(draggedNode);\n const dropPosition = this.calculateDropPosition(context);\n\n // Validation 1: Check level compatibility\n if (!this.validateLevelCompatibility(draggedLevel, dropPosition.targetLevel)) {\n return false;\n }\n\n // Validation 2: For children, check parent compatibility\n if (draggedLevel > 0) {\n if (\n !this.validateParentCompatibility(draggedNode, dropPosition.targetParentPath, draggedLevel)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Validates that source and target levels match\n */\n private validateLevelCompatibility(sourceLevel: number, targetLevel: number): boolean {\n return sourceLevel === targetLevel;\n }\n\n /**\n * Validates that child nodes stay within their parent\n */\n private validateParentCompatibility(\n node: AssetPropertyFlatNode,\n targetParentPath: string,\n nodeLevel: number\n ): boolean {\n const sourceParentPath = this.getParentPath(node, nodeLevel);\n return !!targetParentPath && sourceParentPath === targetParentPath;\n }\n\n /**\n * Performs the actual move operation\n */\n private performMove(context: DragDropContext): AssetPropertyFlatNode[] {\n const { draggedNode } = context;\n\n return this.isExpandableNode(draggedNode)\n ? this.moveNodeWithChildren(context)\n : this.moveSingleNode(context);\n }\n\n /**\n * Moves a single node without children\n */\n private moveSingleNode(context: DragDropContext): AssetPropertyFlatNode[] {\n const result = [...context.data];\n const [removed] = result.splice(context.previousIndex, 1);\n result.splice(context.currentIndex, 0, removed);\n return result;\n }\n\n /**\n * Moves a parent node along with all its children\n */\n private moveNodeWithChildren(context: DragDropContext): AssetPropertyFlatNode[] {\n const { draggedNode, previousIndex, currentIndex, data } = context;\n\n // Find all children of the parent\n const childIndices = this.findChildIndices(draggedNode, data, previousIndex);\n\n // Collect all nodes to move (parent + children)\n const nodesToMove = this.collectNodesToMove(data, previousIndex, childIndices);\n\n // Remove nodes from their current position\n const remainingNodes = this.removeNodesFromData(data, previousIndex, childIndices);\n\n // Calculate adjusted insertion index\n const insertIndex = this.calculateAdjustedInsertIndex(\n previousIndex,\n currentIndex,\n childIndices\n );\n\n // Insert nodes at new position\n remainingNodes.splice(insertIndex, 0, ...nodesToMove);\n\n return remainingNodes;\n }\n\n /**\n * Finds indices of all children of a parent node\n */\n private findChildIndices(\n parentNode: AssetPropertyFlatNode,\n data: AssetPropertyFlatNode[],\n parentIndex: number\n ): number[] {\n const childIndices: number[] = [];\n const parentKey = this.getNodeKey(parentNode);\n const parentLevel = this.getNodeLevel(parentNode);\n\n for (let i = parentIndex + 1; i < data.length; i++) {\n const node = data[i];\n\n if (node.level <= parentLevel) {\n // Reached a sibling or parent level - no more children\n break;\n }\n\n if (this.isChildOfParent(node, parentKey, parentLevel)) {\n childIndices.push(i);\n }\n }\n\n return childIndices;\n }\n\n /**\n * Collects parent and children nodes to move\n */\n private collectNodesToMove(\n data: AssetPropertyFlatNode[],\n parentIndex: number,\n childIndices: number[]\n ): AssetPropertyFlatNode[] {\n const nodes = [data[parentIndex]];\n childIndices.forEach(index => nodes.push(data[index]));\n return nodes;\n }\n\n /**\n * Removes nodes from data array\n */\n private removeNodesFromData(\n data: AssetPropertyFlatNode[],\n parentIndex: number,\n childIndices: number[]\n ): AssetPropertyFlatNode[] {\n const indicesToRemove = new Set([parentIndex, ...childIndices]);\n return data.filter((_, index) => !indicesToRemove.has(index));\n }\n\n /**\n * Calculates the adjusted insertion index when moving with children\n */\n private calculateAdjustedInsertIndex(\n previousIndex: number,\n targetIndex: number,\n childIndices: number[]\n ): number {\n if (targetIndex <= previousIndex) {\n // Moving up - no adjustment needed\n return targetIndex;\n }\n\n // Moving down - adjust for removed children\n const lastChildIndex =\n childIndices.length > 0 ? childIndices[childIndices.length - 1] : previousIndex;\n\n // Check if dropping within own children (only when children are visible)\n // After parent removal, children shift down by 1, so last child is at lastChildIndex - 1\n if (childIndices.length > 0 && targetIndex <= lastChildIndex - 1) {\n // Target is within our own children - no real move\n return previousIndex;\n }\n\n // Adjust for the number of removed children\n // currentIndex accounts for parent removal, we need to adjust for children\n return targetIndex - childIndices.length;\n }\n\n /**\n * Calculates the drop position details\n */\n private calculateDropPosition(context: DragDropContext): DropPosition {\n const { draggedNode, currentIndex, data, previousIndex } = context;\n const draggedLevel = this.getNodeLevel(draggedNode);\n\n // Create simulated data with item removed\n const simulatedData = [...data];\n simulatedData.splice(previousIndex, 1);\n\n // Calculate target level\n const targetLevel = this.calculateTargetLevel(simulatedData, currentIndex, draggedLevel);\n\n // Calculate target parent path for child nodes\n const targetParentPath =\n draggedLevel > 0 ? this.findTargetParentPath(simulatedData, currentIndex, draggedLevel) : '';\n\n return {\n targetLevel,\n targetParentPath,\n insertIndex: currentIndex\n };\n }\n\n /**\n * Determines the expected level at the target position\n */\n private calculateTargetLevel(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n draggedLevel: number\n ): number {\n // Handle edge cases\n if (targetIndex === 0) {\n return 0;\n }\n\n if (targetIndex >= simulatedData.length) {\n return this.calculateEndPositionLevel(simulatedData, draggedLevel);\n }\n\n // Handle middle positions\n return this.calculateMiddlePositionLevel(simulatedData, targetIndex, draggedLevel);\n }\n\n /**\n * Calculates level for end position drops\n */\n private calculateEndPositionLevel(\n simulatedData: AssetPropertyFlatNode[],\n draggedLevel: number\n ): number {\n if (simulatedData.length === 0) {\n return 0;\n }\n\n const lastItem = simulatedData[simulatedData.length - 1];\n\n // Allow root items to be placed after child groups\n if (lastItem.level > 0 && draggedLevel === 0) {\n return 0;\n }\n\n return lastItem.level;\n }\n\n /**\n * Calculates level for middle position drops\n */\n private calculateMiddlePositionLevel(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n draggedLevel: number\n ): number {\n const prevItem = simulatedData[targetIndex - 1];\n const nextItem = simulatedData[targetIndex];\n\n // Check for boundary positions\n if (this.isBoundaryPosition(prevItem, nextItem)) {\n return this.handleBoundaryPosition(prevItem, nextItem, draggedLevel);\n }\n\n // Check for parent-first-child position\n if (this.isParentFirstChildPosition(prevItem, nextItem)) {\n return nextItem.level;\n }\n\n // Default to previous item's level\n return prevItem?.level || 0;\n }\n\n /**\n * Finds the parent path for the target position\n */\n private findTargetParentPath(\n simulatedData: AssetPropertyFlatNode[],\n targetIndex: number,\n targetLevel: number\n ): string {\n // Look at surrounding items\n const prevItem = targetIndex > 0 ? simulatedData[targetIndex - 1] : null;\n const nextItem = targetIndex < simulatedData.length ? simulatedData[targetIndex] : null;\n\n // Check if dropping after a parent (becoming first child)\n if (this.isDroppingAfterParent(prevItem, targetLevel)) {\n return this.getNodeKey(prevItem);\n }\n\n // Check siblings for parent path\n const siblingParentPath = this.getParentPathFromSiblings(prevItem, nextItem, targetLevel);\n\n if (siblingParentPath) {\n return siblingParentPath;\n }\n\n // Search backwards for parent\n return this.searchBackwardsForParent(simulatedData, targetIndex, targetLevel);\n }\n\n private getNodeLevel(node: AssetPropertyFlatNode): number {\n return node.level;\n }\n\n private getNodeKey(node: AssetPropertyFlatNode): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n return keyPath?.join('.') || node.property.name;\n }\n\n private getParentPath(node: AssetPropertyFlatNode, level: number): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n return keyPath?.slice(0, level).join('.') || '';\n }\n\n private isExpandableNode(node: AssetPropertyFlatNode): boolean {\n return node.expandable;\n }\n\n private isChildOfParent(\n node: AssetPropertyFlatNode,\n parentKey: string,\n parentLevel: number\n ): boolean {\n const nodeKeyPath = (node.property as NestedPropertyFields).keyPath;\n if (!nodeKeyPath) return false;\n\n const nodeParentPath = nodeKeyPath.slice(0, parentLevel + 1).join('.');\n return nodeParentPath === parentKey;\n }\n\n private isBoundaryPosition(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null\n ): boolean {\n return !!(prevItem && nextItem && prevItem.level > 0 && nextItem.level === 0);\n }\n\n private isParentFirstChildPosition(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null\n ): boolean {\n return !!(prevItem?.expandable && nextItem && nextItem.level > prevItem.level);\n }\n\n private isDroppingAfterParent(\n prevItem: AssetPropertyFlatNode | null,\n targetLevel: number\n ): boolean {\n return !!(prevItem?.expandable && prevItem.level === targetLevel - 1);\n }\n\n private handleBoundaryPosition(\n prevItem: AssetPropertyFlatNode,\n nextItem: AssetPropertyFlatNode,\n draggedLevel: number\n ): number {\n if (draggedLevel === 0) {\n return 0;\n }\n\n if (draggedLevel === prevItem.level) {\n // Additional validation could go here for same-parent check\n return prevItem.level;\n }\n\n return prevItem.level;\n }\n\n private getParentPathFromSiblings(\n prevItem: AssetPropertyFlatNode | null,\n nextItem: AssetPropertyFlatNode | null,\n targetLevel: number\n ): string {\n if (prevItem?.level === targetLevel) {\n return this.getParentPath(prevItem, targetLevel);\n }\n\n if (nextItem?.level === targetLevel) {\n return this.getParentPath(nextItem, targetLevel);\n }\n\n return '';\n }\n\n private searchBackwardsForParent(\n data: AssetPropertyFlatNode[],\n startIndex: number,\n targetLevel: number\n ): string {\n for (let i = startIndex - 1; i >= 0; i--) {\n const node = data[i];\n\n if (node.level === targetLevel - 1 && node.expandable) {\n return this.getNodeKey(node);\n }\n\n if (node.level < targetLevel - 1) {\n break;\n }\n }\n\n return '';\n }\n}\n","import { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport { CdkDragDrop, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';\nimport {\n Component,\n ContentChild,\n EventEmitter,\n inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n effect,\n viewChild,\n SimpleChanges\n} from '@angular/core';\nimport {\n AssetPropertyListConfig,\n AssetPropertyType,\n ComputedPropertyDefinition,\n defaultAssetProperties,\n defaultAssetPropertyListConfig,\n NestedPropertyFields\n} from '../asset-properties.model';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport {\n C8yTranslatePipe,\n EmptyStateComponent,\n IconDirective,\n ListGroupModule\n} from '@c8y/ngx-components';\nimport { FormsModule } from '@angular/forms';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { IManagedObject } from '@c8y/client';\nimport { BehaviorSubject, debounceTime, Subject, takeUntil } from 'rxjs';\nimport { CdkTree, CdkTreeModule } from '@angular/cdk/tree';\nimport { AssetPropertyFlatNode, FlatTreeDataSource } from './tree-data-source';\nimport { AssetPropertyActionDirective } from './asset-property-action.directive';\nimport { AssetPropertyValuePipe } from './asset-property-value.pipe';\nimport { CustomPropertiesDrawerService } from '../custom-properties-drawer.service';\nimport { AssetPropertyIconPipe } from './asset-property-icon.pipe';\nimport { AssetPropertyIconTooltipPipe } from './asset-property-icon-tooltip.pipe';\nimport { ComputedPropertiesService } from '../computed-properties.service';\nimport { BsModalService } from 'ngx-bootstrap/modal';\nimport { ComputedPropertiesConfigComponent } from '../computed-properties-config/computed-properties-config.component';\nimport { AssetPropertyCollapseButtonTitlePipe } from './asset-property-collapse-button-title.pipe';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AssetPropertyDragDropService } from './asset-property-drag-drop.service';\n\n/**\n * Represents a list of asset properties with hierarchical tree structure.\n */\n@Component({\n selector: 'c8y-asset-property-list',\n templateUrl: './asset-property-list.component.html',\n standalone: true,\n imports: [\n NgClass,\n AsyncPipe,\n FormsModule,\n ListGroupModule,\n C8yTranslatePipe,\n TooltipModule,\n IconDirective,\n CdkTreeModule,\n NgTemplateOutlet,\n AssetPropertyValuePipe,\n EmptyStateComponent,\n AssetPropertyIconPipe,\n NgClass,\n AssetPropertyIconTooltipPipe,\n AssetPropertyCollapseButtonTitlePipe,\n CdkDropList,\n CdkDrag\n ]\n})\nexport class AssetPropertyListComponent implements OnInit, OnChanges, OnDestroy {\n /**\n * Reference to the CDdk tree component.\n */\n tree = viewChild<CdkTree<AssetPropertyFlatNode>>('tree');\n /**\n * Configuration for the asset property list.\n */\n @Input() config: AssetPropertyListConfig = {};\n /**\n * Managed object representing the asset.\n */\n @Input() asset!: IManagedObject;\n /**\n * Extra properties to be displayed in the list.\n */\n @Input() extraProperties: AssetPropertyType[] = [];\n /**\n * Emits the selected properties.\n */\n @Output() selectedProperties = new EventEmitter<AssetPropertyType[]>();\n /**\n * List of all properties.\n */\n properties: AssetPropertyType[] = [];\n /**\n * Text input for filtering properties.\n */\n filterText = '';\n /**\n * Data source for the tree structure.\n */\n dataSource = new FlatTreeDataSource();\n /**\n * Map of flat nodes for quick lookup.\n */\n flatNodeMap = new Map<string, AssetPropertyFlatNode>();\n /**\n * Indicates if all nodes are selected.\n */\n allSelected = false;\n /**\n * Indicates if the selection state is indeterminate.\n */\n indeterminate = false;\n /**\n * Directive for asset property actions.\n */\n @ContentChild(AssetPropertyActionDirective)\n assetPropertyAction: AssetPropertyActionDirective;\n hasExpandableNodes: boolean;\n areAllNodesExpanded: boolean;\n collapseAllLabel = gettext('Collapse all');\n expandAllLabel = gettext('Expand all');\n dragHandleEnabledLabel = gettext('Click and drag to reorder');\n dragHandleDisabledLabel = gettext('Clear filtering to reorder');\n get cdkDragDisabled() {\n return !!this.filterText;\n }\n\n readonly TREE_NODE_INDENT = 24;\n /**\n * Stores all nodes in their complete ordered state (source of truth for order)\n */\n private allNodesComplete: AssetPropertyFlatNode[] = [];\n /**\n * Tracks which parent nodes are expanded (key = node key, value = expanded state)\n */\n private expansionState = new Map<string, boolean>();\n /**\n * List of properties that have been added temporarily as custom properties.\n */\n private allAddedProperties: AssetPropertyType[] = [];\n /**\n * List of properties that have been added temporarily as custom properties filtered according to context asset.\n */\n private displayAddedProperties: AssetPropertyType[] = [];\n /**\n * Subject for handling filter input.\n */\n private filterSubject$ = new BehaviorSubject<string>('');\n /**\n * Subject for handling component destruction.\n */\n private destroy$ = new Subject<void>();\n /**\n * Service for managing asset properties.\n */\n private assetPropertiesService = inject(AssetPropertiesService);\n private customPropertiesDrawerService = inject(CustomPropertiesDrawerService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n private modalService = inject(BsModalService);\n private dragDropService = inject(AssetPropertyDragDropService);\n\n /**\n * Constructor initializes reactive effects for expansion modes.\n */\n constructor() {\n effect(() => {\n if (\n (this.config.expansionMode === 'nonCollapsible' ||\n this.config.expansionMode === 'expandedByDefault') &&\n this.tree()\n ) {\n queueMicrotask(() => {\n this.expandAllNodesInState();\n this.rebuildVisibleData();\n });\n }\n });\n }\n\n ngOnInit() {\n this.config = {\n ...defaultAssetPropertyListConfig,\n ...this.config\n };\n this.filterSubject$\n .pipe(takeUntil(this.destroy$), debounceTime(200))\n .subscribe(() => this.filterTree());\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes['asset'] && !changes['asset'].firstChange) {\n await this.updateDisplayAddedProperties();\n }\n const shouldRebuild = changes['asset'] || changes['extraProperties'];\n await this.updateProperties(!!shouldRebuild);\n }\n\n ngAfterViewInit() {\n if (this.config.selectMode === 'single') {\n this.selectedProperties.next([]);\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Fetches and categorizes properties.\n * @returns A promise resolving to the list of asset properties.\n */\n async getProperties(): Promise<AssetPropertyType[]> {\n if (this.asset) {\n return this.categorizeAndFlattenHierarchicalProperties(\n await this.assetPropertiesService.getInitialProperties(this.asset)\n );\n } else {\n if (this.config?.emptyStateContent === 'default-properties') {\n return this.categorizeAndFlattenHierarchicalProperties(defaultAssetProperties);\n } else if (Array.isArray(this.config?.emptyStateContent)) {\n return this.config.emptyStateContent;\n }\n }\n return [];\n }\n\n /**\n * Opens the drawer to add new custom properties.\n */\n async addProperty() {\n const propertiesToAdd = await this.customPropertiesDrawerService.getCustomProperties(\n this.asset\n );\n if (!propertiesToAdd || propertiesToAdd.length === 0) {\n return;\n }\n\n const propertiesNeedingConfig: AssetPropertyType[] = [];\n const definitionsNeedingConfig: ComputedPropertyDefinition[] = [];\n const propertiesToActuallyAdd: AssetPropertyType[] = [];\n\n for (const prop of propertiesToAdd) {\n if (prop.computed) {\n const definition = await this.computedPropertiesService.getByName(prop.name);\n if (definition.configComponent || definition.loadConfigComponent) {\n propertiesNeedingConfig.push(prop);\n definitionsNeedingConfig.push(definition);\n } else {\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n }\n } else {\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n }\n }\n\n if (propertiesNeedingConfig.length > 0) {\n try {\n const configs = await this.configureMultipleProperties(\n propertiesNeedingConfig,\n definitionsNeedingConfig\n );\n\n propertiesNeedingConfig.forEach((prop, index) => {\n prop.config = configs[index];\n prop.temporary = true;\n propertiesToActuallyAdd.push(prop);\n });\n } catch {}\n }\n\n if (propertiesToActuallyAdd.length === 0) {\n return;\n }\n\n propertiesToActuallyAdd.forEach(prop => {\n if (this.asset?.id) {\n prop.contextAssetId = this.asset.id;\n }\n // Generate instanceId for computed properties to allow multiple instances\n if (prop.computed && !prop.instanceId) {\n prop.instanceId = crypto.randomUUID();\n }\n });\n this.allAddedProperties = this.allAddedProperties.concat(propertiesToActuallyAdd);\n await this.updateDisplayAddedProperties();\n await this.updateProperties(false, propertiesToActuallyAdd);\n this.selectedProperties.next(\n this.dataSource.data.filter(n => n.property.active).map(n => n.property)\n );\n }\n\n /**\n * Displays the configuration modal for multiple computed properties and updates their configurations.\n * @param properties Properties to configure.\n * @param definitions Computed property definitions including config components.\n * @returns Promise resolving to array of configurations.\n */\n configureMultipleProperties(\n properties: AssetPropertyType[],\n definitions: ComputedPropertyDefinition[]\n ): Promise<unknown[]> {\n const modalRef = this.modalService.show(ComputedPropertiesConfigComponent, {\n ignoreBackdropClick: true,\n class: 'modal-lg',\n ariaDescribedby: 'modal-body',\n ariaLabelledBy: 'modal-title',\n initialState: {\n properties,\n definitions,\n asset: this.asset\n }\n }).content;\n return modalRef.result;\n }\n\n /**\n * Displays the configuration modal for a computed property and updates its configuration.\n * @param property Property to configure.\n * @param definition Computed property definition including config component.\n * @returns true if the property was configured, false if cancelled.\n */\n async configureProperty(\n property: AssetPropertyType,\n definition: ComputedPropertyDefinition\n ): Promise<boolean> {\n try {\n const configs = await this.configureMultipleProperties([property], [definition]);\n property.config = configs[0];\n return true;\n } catch (err) {\n return false;\n }\n }\n\n /**\n * Removes temporary property from the list.\n * @param property The property to remove.\n */\n async removeProperty(property: AssetPropertyType): Promise<void> {\n let filterFn;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n filterFn = (p: AssetPropertyType) => {\n if (p === property) {\n // remove complex property itself\n return false;\n }\n if ('keyPath' in p && Array.isArray((p as NestedPropertyFields).keyPath)) {\n // remove children of complex property\n const keyPath = (p as NestedPropertyFields).keyPath;\n return keyPath[0] !== property.name;\n }\n return true;\n };\n } else {\n // Remove only the property itself\n filterFn = (p: AssetPropertyType) => p !== property;\n }\n\n this.allAddedProperties = this.allAddedProperties.filter(filterFn);\n this.displayAddedProperties = this.displayAddedProperties.filter(filterFn);\n\n // Also update the complete data when removing properties\n const propertyKey = (property as NestedPropertyFields).keyPath?.join('.') || property.name;\n this.allNodesComplete = this.allNodesComplete.filter(node => {\n const nodeKey =\n (node.property as NestedPropertyFields).keyPath?.join('.') || node.property.name;\n if (this.assetPropertiesService.isComplexProperty(property)) {\n // Remove the property and its children\n return !nodeKey.startsWith(propertyKey);\n } else {\n return nodeKey !== propertyKey;\n }\n });\n\n this.properties = this.allNodesComplete.map(node => node.property);\n\n await this.updateProperties(false);\n }\n\n async editProperty(property: AssetPropertyType): Promise<void> {\n const definition = await this.computedPropertiesService.getByName(property.name);\n const configured = await this.configureProperty(property, definition);\n if (configured && this.asset?.id) {\n property.contextAssetId = this.asset.id;\n }\n await this.updateProperties(false);\n this.selectedProperties.next(\n this.dataSource.data.filter(n => n.property.active).map(n => n.property)\n );\n }\n\n hasChild(node: AssetPropertyFlatNode): boolean {\n return node.expandable;\n }\n\n /**\n * Checks if the property's context asset matches the current asset.\n * @param node The node to check.\n * @returns True if the context asset doesn't match the current asset.\n */\n isContextMismatch(node: AssetPropertyFlatNode): boolean {\n if (!node.property.computed || !node.contextAssetId) {\n return false;\n }\n return this.asset?.id !== node.contextAssetId;\n }\n\n /**\n * Gets the level of a node.\n * @param node The node to check.\n * @returns The level of the node.\n */\n getLevel(node: AssetPropertyFlatNode): number {\n return node.level;\n }\n\n /**\n * Gets the parent node of a given node.\n * @param node The node to check.\n * @returns The parent node or null if none exists.\n */\n getParentNode(node: AssetPropertyFlatNode): AssetPropertyFlatNode | null {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n\n if (!keyPath || keyPath.length <= 1) {\n return null;\n }\n\n const parentPath = keyPath.slice(0, -1).join('.');\n return this.flatNodeMap.get(parentPath) || null;\n }\n\n /**\n * Checks if a node is expanded.\n * @param node The node to check.\n * @returns True if the node is expanded.\n */\n isNodeExpanded(node: AssetPropertyFlatNode): boolean {\n if (!node.expandable) {\n return false;\n }\n const key = this.getNodeKey(node);\n return this.expansionState.get(key) ?? false;\n }\n\n /**\n * Toggles the expansion state of a node.\n * @param node The node to toggle.\n */\n toggleNode(node: AssetPropertyFlatNode): void {\n if (!node.expandable) {\n return;\n }\n\n const key = this.getNodeKey(node);\n const currentState = this.expansionState.get(key) ?? false;\n this.expansionState.set(key, !currentState);\n\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n /**\n * Selects or deselects all nodes.\n * @param selected True to select all, false to deselect.\n */\n selectAll(selected: boolean): void {\n this.allSelected = selected;\n this.indeterminate = false;\n\n const visibleNodes = this.dataSource.data.filter(node => node.isVisible);\n\n visibleNodes.forEach(node => {\n node.property.active = selected;\n });\n\n const selectedProperties = this.dataSource.data\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n\n /**\n * Handles single selection mode.\n * @param selected True if the node is selected.\n * @param node The node to select.\n */\n onSelectSingle(selected: boolean, node: AssetPropertyFlatNode): void {\n this.allNodesComplete.forEach(n => {\n n.property.active = false;\n });\n\n node.property.active = selected;\n\n if (selected && node.expandable && !this.isNodeExpanded(node)) {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n if (selected) {\n this.selectedProperties.next([node.property]);\n }\n }\n\n /**\n * Handles multi-selection mode.\n * @param selected True if the node is selected.\n * @param node The node to select.\n */\n onSelectMulti(selected: boolean, node: AssetPropertyFlatNode): void {\n node.property.active = selected;\n\n if (selected && node.expandable && !this.isNodeExpanded(node)) {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n if (node.expandable) {\n this.updateChildSelectionStatus(node, selected);\n }\n\n this.updateSelectAllState();\n\n const selectedProperties = this.allNodesComplete\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n\n /**\n * Initiates a filter operation.\n */\n onFilter(): void {\n this.filterSubject$.next(this.filterText);\n }\n\n /**\n * Clears the filter input.\n */\n clearFilter(): void {\n this.filterText = '';\n this.onFilter();\n }\n\n drop(event: CdkDragDrop<AssetPropertyFlatNode[]>) {\n if (this.cdkDragDisabled || !event.isPointerOverContainer) {\n return;\n }\n\n const newVisibleData = this.dragDropService.handleDrop({\n draggedNode: this.dataSource.data[event.previousIndex],\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n data: this.dataSource.data\n });\n\n if (newVisibleData) {\n this.updateCompleteDataOrder(newVisibleData);\n this.rebuildVisibleData();\n\n const selectedProperties = this.allNodesComplete\n .filter(n => n.property.active)\n .map(n => n.property);\n\n this.selectedProperties.next(selectedProperties);\n }\n }\n\n /**\n * Toggles expansion of all nodes - expands all if any are collapsed, otherwise collapses all.\n */\n toggleExpandCollapseAll(): void {\n if (this.areAllNodesExpanded) {\n this.collapseAllNodesInState();\n } else {\n this.expandAllNodesInState();\n }\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n }\n\n /**\n * Calculates the max-width for a column based on node level and configuration.\n * @param node The node to calculate width for.\n * @returns The calculated max-width CSS value.\n */\n getColumnMaxWidth(node: AssetPropertyFlatNode): string {\n const percentage = !this.config.showKey && !this.config.showValue ? '100' : '50';\n const levelOffset = (this.getLevel(node) + 1) * this.TREE_NODE_INDENT;\n const levelAdjustment = this.getLevel(node) * 12;\n return `calc(${percentage}% - ${levelOffset}px + ${levelAdjustment}px)`;\n }\n\n /**\n * Gets the unique key for a node.\n * @param node The node.\n * @returns The unique key.\n */\n private getNodeKey(node: AssetPropertyFlatNode): string {\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (keyPath) {\n return keyPath.join('.');\n }\n if (node.property.computed && node.property.instanceId) {\n return `${node.property.name}:${node.property.instanceId}`;\n }\n return node.property.name;\n }\n\n /**\n * Updates the areAllNodesExpanded state based on expansion state.\n */\n private updateAreAllNodesExpandedState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n if (parentNodes.length === 0) {\n this.areAllNodesExpanded = false;\n return;\n }\n\n this.areAllNodesExpanded = parentNodes.every(node => {\n const key = this.getNodeKey(node);\n return this.expansionState.get(key) ?? false;\n });\n }\n\n /**\n * Expands all nodes in the expansion state.\n */\n private expandAllNodesInState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n parentNodes.forEach(node => {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, true);\n });\n this.areAllNodesExpanded = true;\n }\n\n /**\n * Collapses all nodes in the expansion state.\n */\n private collapseAllNodesInState(): void {\n const parentNodes = this.allNodesComplete.filter(node => node.expandable);\n parentNodes.forEach(node => {\n const key = this.getNodeKey(node);\n this.expansionState.set(key, false);\n });\n this.areAllNodesExpanded = false;\n }\n\n /**\n * Updates the list of properties based on the configuration.\n * @param rebuildFromAsset If true, rebuilds from scratch. Otherwise preserves existing order and only adds new properties.\n * @param prependProperties New properties to add if not rebuilding from asset.\n */\n private async updateProperties(\n rebuildFromAsset = false,\n prependProperties: AssetPropertyType[] = []\n ): Promise<void> {\n const previouslySelectedProperties = this.dataSource.data\n .filter(node => node.property.active)\n .map(node => node.property);\n\n if (this.config.inputPropertiesHandle === 'merge' || !this.config.inputPropertiesHandle) {\n if (rebuildFromAsset) {\n this.properties = [\n ...prependProperties,\n ...this.displayAddedProperties,\n ...this.extraProperties,\n ...(await this.getProperties())\n ];\n } else {\n this.properties = [...prependProperties, ...this.properties];\n }\n } else if (this.config.inputPropertiesHandle === 'override') {\n this.properties = [\n ...prependProperties,\n ...this.displayAddedProperties,\n ...this.extraProperties\n ];\n }\n\n this.buildTreeNodes();\n\n if (previouslySelectedProperties.length > 0) {\n previouslySelectedProperties.forEach(selectedProp => {\n const matchingNode = this.dataSource.data.find(node =>\n this.assetPropertiesService.propertiesMatch(node.property, selectedProp)\n );\n if (matchingNode) {\n matchingNode.property.active = true;\n }\n });\n this.updateSelectAllState();\n }\n\n this.applySelectedPropertiesFromConfig();\n }\n\n private applySelectedPropertiesFromConfig(): void {\n if (!this.config.selectedProperties || this.config.selectedProperties.length === 0) {\n return;\n }\n\n this.config.selectedProperties.forEach((configProperty, index) => {\n const matchingNode = this.dataSource.data.find(node =>\n this.assetPropertiesService.propertiesMatch(node.property, configProperty)\n );\n\n if (matchingNode) {\n if (this.config.selectMode === 'single') {\n // For single mode, only select the first property and break\n if (index === 0) {\n this.onSelectSingle(true, matchingNode);\n }\n return;\n } else if (this.config.selectMode === 'multi') {\n this.onSelectMulti(true, matchingNode);\n }\n }\n });\n }\n\n /**\n * Updates the display added properties based on compatibility with current asset.\n */\n private async updateDisplayAddedProperties(): Promise<void> {\n this.displayAddedProperties = await this.assetPropertiesService.filterCompatibleProperties(\n this.allAddedProperties,\n this.asset\n );\n }\n\n /**\n * Updates the selection status of child nodes.\n * @param parent The parent node.\n * @param selected True if the parent is selected.\n */\n private updateChildSelectionStatus(parent: AssetPropertyFlatNode, selected: boolean): void {\n if (!parent.expandable) return;\n\n const parentKey =\n (parent.property as NestedPropertyFields).keyPath?.join('.') || parent.property.name;\n\n this.allNodesComplete.forEach(node => {\n const nodePath = (node.property as NestedPropertyFields).keyPath;\n if (nodePath && nodePath.join('.').startsWith(parentKey) && node !== parent) {\n node.property.active = selected;\n }\n });\n }\n\n /**\n * Checks if a property matches the filter criteria.\n * @param property The property to check.\n * @param filterText The filter text.\n * @returns True if the property matches.\n */\n private matchesSearch(property: AssetPropertyType, filterText: string): boolean {\n const filterByFields = [\n property.label,\n property.name,\n (property as NestedPropertyFields).keyPath?.join('.'),\n (property as NestedPropertyFields).title\n ].filter(Boolean);\n\n return filterByFields.some(field => field?.toLowerCase().includes(filterText));\n }\n\n /**\n * Updates the selection state for all nodes.\n */\n private updateSelectAllState(): void {\n if (this.config.selectMode !== 'multi') return;\n\n const visibleNodes = this.dataSource.data.filter(node => node.isVisible);\n\n const totalCount = visibleNodes.length;\n const selectedCount = visibleNodes.filter(node => node.property.active).length;\n\n this.allSelected = totalCount > 0 && selectedCount === totalCount;\n this.indeterminate = selectedCount > 0 && selectedCount < totalCount;\n\n // Update indeterminate state for each complex node\n this.updateIndeterminateStates();\n }\n\n /**\n * Builds the tree nodes from the properties.\n */\n private buildTreeNodes(): void {\n const treeData: AssetPropertyFlatNode[] = [];\n this.flatNodeMap.clear();\n\n this.properties.forEach(property => {\n const isComplex = this.assetPropertiesService.isComplexProperty(property);\n const hasKeyPath = !!(property as NestedPropertyFields).keyPath;\n const level = hasKeyPath ? (property as NestedPropertyFields).keyPath.length - 1 : 0;\n\n // For computed properties with instanceId, include it in the key to allow multiple instances\n let key: string;\n if (hasKeyPath) {\n key = (property as NestedPropertyFields).keyPath.join('.');\n } else if (property.computed && property.instanceId) {\n key = `${property.name}:${property.instanceId}`;\n } else {\n key = property.name;\n }\n\n const node: AssetPropertyFlatNode = {\n expandable: isComplex,\n level,\n property,\n isVisible: true,\n indeterminate: false,\n contextAssetId: property.contextAssetId\n };\n\n this.flatNodeMap.set(key, node);\n treeData.push(node);\n });\n\n this.allNodesComplete = [...treeData];\n\n // Apply filter and rebuild visible data\n this.filterTree();\n this.updateSelectAllState();\n this.hasExpandableNodes = this.allNodesComplete.some(node => node.expandable);\n\n if (\n this.config.expansionMode === 'nonCollapsible' ||\n this.config.expansionMode === 'expandedByDefault'\n ) {\n queueMicrotask(() => {\n this.expandAllNodesInState();\n this.rebuildVisibleData();\n this.updateAreAllNodesExpandedState();\n });\n }\n }\n\n /**\n * Update indeterminate state for all complex nodes\n */\n private updateIndeterminateStates(): void {\n // Only for multi-select mode\n if (this.config.selectMode !== 'multi') return;\n\n // For each complex node, check its children in complete data\n this.allNodesComplete.forEach(node => {\n if (node.expandable) {\n const parentKey =\n (node.property as NestedPropertyFields).keyPath?.join('.') || node.property.name;\n // Find direct children (level = parent.level + 1, keyPath starts with parentKey)\n const children = this.allNodesComplete.filter(child => {\n if (child === node) return false;\n const childKeyPath = (child.property as NestedPropertyFields).keyPath;\n if (!childKeyPath) return false;\n // Direct child: one level deeper, and keyPath starts with parentKey\n return (\n childKeyPath.length === node.level + 2 &&\n childKeyPath.slice(0, node.level + 1).join('.') === parentKey\n );\n });\n if (children.length > 0) {\n const selectedCount = children.filter(child => child.property.active).length;\n node.indeterminate = selectedCount > 0 && selectedCount < children.length;\n } else {\n node.indeterminate = false;\n }\n } else {\n node.indeterminate = false;\n }\n });\n }\n\n /**\n * Filters the tree nodes based on the filter input.\n */\n private filterTree(): void {\n const filterText = this.filterText?.toLowerCase() || '';\n\n const allNodes =\n this.allNodesComplete.length > 0\n ? [...this.allNodesComplete]\n : Array.from(this.flatNodeMap.values());\n\n if (!filterText) {\n allNodes.forEach(node => (node.isVisible = true));\n this.rebuildVisibleData();\n this.updateSelectAllState();\n return;\n }\n\n // First pass: Mark nodes that match the filter criteria\n allNodes.forEach(node => {\n node.isVisible = this.matchesSearch(node.property, filterText);\n });\n\n // Second pass: Make parent nodes of visible nodes also visible\n allNodes.forEach(node => {\n if (node.isVisible && node.level > 0) {\n // Find and mark parent nodes as visible\n this.makeParentsVisible(node);\n }\n });\n\n // When filtering, show all matching nodes regardless of expansion state\n const filteredNodes = allNodes.filter(node => node.isVisible);\n\n // Update the data source with filtered nodes (ignoring expansion state during filter)\n this.dataSource.data = filteredNodes;\n this.updateSelectAllState();\n }\n\n /**\n * Makes all parent nodes visible.\n * @param node The node whose parents should be made visible.\n */\n private makeParentsVisible(node: AssetPropertyFlatNode): void {\n if (!node || node.level === 0) return;\n\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (!keyPath) return;\n\n // Navigate up the path and find parents in the complete data\n for (let i = 1; i < keyPath.length; i++) {\n const parentPath = keyPath.slice(0, i).join('.');\n const parent = this.allNodesComplete.find(n => {\n const nodeKey = (n.property as NestedPropertyFields).keyPath?.join('.') || n.property.name;\n return nodeKey === parentPath;\n });\n if (parent) {\n parent.isVisible = true;\n } else {\n break;\n }\n }\n }\n\n /**\n * Rebuilds visible data based on expansion state (only when not filtering).\n */\n private rebuildVisibleData(): void {\n if (this.filterText) {\n return;\n }\n\n const visible: AssetPropertyFlatNode[] = [];\n\n for (const node of this.allNodesComplete) {\n if (this.shouldNodeBeVisible(node)) {\n visible.push(node);\n }\n }\n\n this.dataSource.data = visible;\n this.updateSelectAllState();\n }\n\n /**\n * Determines if a node should be visible based on expansion state.\n * @param node The node to check.\n * @returns True if the node should be visible.\n */\n private shouldNodeBeVisible(node: AssetPropertyFlatNode): boolean {\n // Root nodes always visible (when not filtered)\n if (node.level === 0) {\n return node.isVisible;\n }\n\n // Check all parents are expanded\n const keyPath = (node.property as NestedPropertyFields).keyPath;\n if (!keyPath) {\n return node.isVisible;\n }\n\n for (let i = 1; i <= node.level; i++) {\n const parentPath = keyPath.slice(0, i).join('.');\n if (!this.expansionState.get(parentPath)) {\n return false;\n }\n }\n\n return node.isVisible;\n }\n\n /**\n * Updates complete data order after drag-drop on visible data.\n * @param newVisibleData The new order of visible nodes.\n */\n private updateCompleteDataOrder(newVisibleData: AssetPropertyFlatNode[]): void {\n // Create a map of visible nodes to their new positions\n const visiblePositionMap = new Map<AssetPropertyFlatNode, number>();\n newVisibleData.forEach((node, index) => {\n visiblePositionMap.set(node, index);\n });\n\n // Separate nodes into visible and hidden\n const visibleNodes: AssetPropertyFlatNode[] = [];\n const hiddenNodes: AssetPropertyFlatNode[] = [];\n\n this.allNodesComplete.forEach(node => {\n if (visiblePositionMap.has(node)) {\n visibleNodes.push(node);\n } else {\n hiddenNodes.push(node);\n }\n });\n\n // Sort visible nodes by their new positions\n visibleNodes.sort((a, b) => {\n return visiblePositionMap.get(a)! - visiblePositionMap.get(b)!;\n });\n\n // Reconstruct complete data: insert hidden children after their parents\n const result: AssetPropertyFlatNode[] = [];\n\n for (const visibleNode of visibleNodes) {\n result.push(visibleNode);\n\n if (visibleNode.expandable) {\n const parentKey = this.getNodeKey(visibleNode);\n const children = hiddenNodes.filter(hiddenNode => {\n const childKeyPath = (hiddenNode.property as NestedPropertyFields).keyPath;\n if (!childKeyPath) return false;\n const childParentPath = childKeyPath.slice(0, visibleNode.level + 1).join('.');\n return childParentPath === parentKey;\n });\n\n // Sort children by their original order (by level then by name)\n children.sort((a, b) => {\n if (a.level !== b.level) return a.level - b.level;\n const aKey = this.getNodeKey(a);\n const bKey = this.getNodeKey(b);\n return aKey.localeCompare(bKey);\n });\n\n result.push(...children);\n }\n }\n\n this.allNodesComplete = result;\n this.properties = result.map(node => node.property);\n }\n\n /**\n * Categorizes and flattens hierarchical properties.\n * @param properties The properties to categorize.\n * @returns The flattened list of properties.\n */\n private categorizeAndFlattenHierarchicalProperties(\n properties: AssetPropertyType[]\n ): AssetPropertyType[] {\n const { computed, simple, complex } =\n this.assetPropertiesService.categorizeAndFlattenHierarchicalProperties(properties);\n return [...computed, ...simple, ...complex];\n }\n}\n","<div\n class=\"tree-container bg-inherit\"\n [attr.aria-label]=\"'Asset property list' | translate\"\n role=\"tree\"\n>\n @if (config.showHeader || config.filterable) {\n <div class=\"select-all-container bg-inherit sticky-top separator-bottom\">\n @if (config.filterable) {\n <div\n class=\"form-group m-b-0 p-16 d-flex\"\n [ngClass]=\"{ 'separator-bottom': config.showHeader }\"\n >\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Filter properties' | translate\"\n placeholder=\"{{ 'Filter properties' | translate }}\"\n role=\"searchbox\"\n type=\"search\"\n autocomplete=\"off\"\n [(ngModel)]=\"filterText\"\n (input)=\"onFilter()\"\n [disabled]=\"!dataSource.data.length\"\n #filter\n />\n @if (filter.value.length === 0) {\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n >\n <i\n class=\"dlt-c8y-icon-search\"\n [c8yIcon]=\"'search'\"\n ></i>\n </span>\n }\n @if (filter.value.length > 0) {\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n >\n <i\n class=\"text-muted dlt-c8y-icon-times\"\n [c8yIcon]=\"'times'\"\n [attr.aria-label]=\"'Clear filter' | translate\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"clearFilter()\"\n ></i>\n </span>\n }\n </div>\n </div>\n }\n @if (config.showHeader && dataSource.data.length) {\n <div class=\"d-flex a-i-center overflow-hidden\">\n <div\n class=\"flex-no-shrink d-flex a-i-center\"\n [ngClass]=\"{\n 'p-l-40': !hasExpandableNodes && config.expansionMode !== 'nonCollapsible',\n 'p-r-8': config.selectMode !== 'none' && config.expansionMode === 'nonCollapsible'\n }\"\n >\n @if (config.expansionMode !== 'nonCollapsible' && hasExpandableNodes) {\n @let collapseAllButtonTitle =\n (areAllNodesExpanded ? collapseAllLabel : expandAllLabel) | translate;\n <button\n class=\"collapse-btn btn-dot flex-no-shrink\"\n [title]=\"collapseAllButtonTitle\"\n [attr.aria-label]=\"collapseAllButtonTitle\"\n type=\"button\"\n [ngClass]=\"{ active: areAllNodesExpanded }\"\n (click)=\"toggleExpandCollapseAll()\"\n >\n <i [c8yIcon]=\"'chevron-right'\"></i>\n </button>\n }\n </div>\n @if (config.selectMode === 'multi') {\n <c8y-list-item-checkbox\n class=\"p-l-4 p-r-4\"\n [ngModel]=\"allSelected\"\n [indeterminate]=\"indeterminate\"\n (onSelect)=\"selectAll($event)\"\n ></c8y-list-item-checkbox>\n }\n <div\n class=\"p-t-40\"\n [ngClass]=\"{\n 'p-l-24': config.selectMode === 'single',\n 'p-l-8': config.selectMode === 'none' && config.expansionMode === 'nonCollapsible'\n }\"\n ></div>\n <div class=\"content-flex-30 fit-w m-t-4 m-b-4 m-0\">\n <div class=\"col-6 d-flex a-i-center m-l-0 m-r-0\">\n <span class=\"flex-no-shrink p-l-4 p-r-8\">\n <div class=\"c8y-icon\"></div>\n </span>\n <span class=\"text-medium m-l-8\">\n {{ 'Property' | translate }}\n </span>\n </div>\n @if (config.showKey) {\n <div [ngClass]=\"{ 'col-3': config.showValue, 'col-6': !config.showValue }\">\n <span class=\"text-medium\">{{ 'Key' | translate }}</span>\n </div>\n }\n @if (config.showValue) {\n <div [ngClass]=\"{ 'col-3': config.showKey, 'col-6': !config.showKey }\">\n <span class=\"text-medium\">{{ 'Value' | translate }}</span>\n </div>\n }\n </div>\n @if (assetPropertyAction) {\n <div\n class=\"m-l-8 p-l-24 asset-property-list__actions\"\n [ngClass]=\"{\n 'p-r-40': config.allowAddingCustomProperties,\n 'p-r-8': !config.allowAddingCustomProperties\n }\"\n ></div>\n }\n </div>\n }\n </div>\n }\n\n @if (dataSource.data.length) {\n <cdk-tree\n role=\"presentation\"\n #tree\n [dataSource]=\"dataSource\"\n [levelAccessor]=\"getLevel\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListDisabled]=\"!config.allowDragAndDrop || dataSource.data.length < 2\"\n >\n <!-- Tree Node Definition -->\n <cdk-tree-node\n class=\"c8y-list__item--dense\"\n [attr.tabindex]=\"0\"\n [attr.aria-level]=\"getLevel(node) + 1\"\n [attr.aria-expanded]=\"hasChild(node) ? isNodeExpanded(node) : null\"\n [attr.aria-selected]=\"config.selectMode !== 'none' ? node.property.active : null\"\n role=\"treeitem\"\n *cdkTreeNodeDef=\"let node\"\n cdkTreeNodePadding\n [cdkTreeNodePaddingIndent]=\"TREE_NODE_INDENT\"\n [ngClass]=\"{\n nonCollapsible: config.expansionMode === 'nonCollapsible',\n nonSelectable: config.selectMode === 'none'\n }\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"cdkDragDisabled\"\n >\n <div class=\"d-flex p-relative overflow-visible bg-inherit fit-h\">\n @if (config.allowDragAndDrop && dataSource.data.length > 1) {\n <div\n class=\"drag-handle-wrapper\"\n [ngClass]=\"{ 'drag-handle-disabled': cdkDragDisabled }\"\n >\n <button\n class=\"drag-handle btn-clean\"\n [title]=\"\n (cdkDragDisabled ? dragHandleDisabledLabel : dragHandleEnabledLabel) | translate\n \"\n [attr.aria-label]=\"\n (cdkDragDisabled ? dragHandleDisabledLabel : dragHandleEnabledLabel) | translate\n \"\n tabindex=\"-1\"\n type=\"button\"\n [disabled]=\"cdkDragDisabled\"\n >\n <i [c8yIcon]=\"'drag-reorder'\"></i>\n </button>\n </div>\n }\n <!-- Toggle Button for expandable nodes -->\n @if (config.expansionMode !== 'nonCollapsible' && hasChild(node)) {\n @let collapseButtonTitle =\n isNodeExpanded(node) | c8yAssetPropertyCollapseButtonTitle: node;\n <button\n class=\"collapse-btn btn-dot flex-no-shrink\"\n [title]=\"collapseButtonTitle\"\n [attr.aria-label]=\"collapseButtonTitle\"\n [attr.aria-expanded]=\"isNodeExpanded(node)\"\n type=\"button\"\n (click)=\"toggleNode(node)\"\n [ngClass]=\"{ active: isNodeExpanded(node) }\"\n >\n <i [c8yIcon]=\"'chevron-right'\"></i>\n </button>\n }\n <!-- Placeholder for non-expandable nodes to maintain alignment -->\n @if (!hasChild(node) || config.expansionMode === 'nonCollapsible') {\n <div\n class=\"flex-no-shrink\"\n [ngClass]=\"{\n 'p-r-40': config.expansionMode !== 'nonCollapsible',\n 'p-r-8': config.expansionMode === 'nonCollapsible'\n }\"\n ></div>\n }\n <!-- Selection Controls -->\n @if (config.selectMode !== 'none') {\n <div class=\"d-contents\">\n @if (config.selectMode === 'single') {\n <c8y-list-item-radio\n class=\"p-l-4 p-r-4\"\n type=\"radio\"\n [selected]=\"node.property.active\"\n (onSelect)=\"onSelectSingle($event, node)\"\n ></c8y-list-item-radio>\n } @else if (config.selectMode === 'multi') {\n <c8y-list-item-checkbox\n class=\"p-l-4 p-r-4\"\n [ngModel]=\"node.property.active\"\n [indeterminate]=\"node.indeterminate\"\n (onSelect)=\"onSelectMulti($event, node)\"\n ></c8y-list-item-checkbox>\n }\n </div>\n }\n <div class=\"content-flex-30 fit-w bg-inherit m-0 min-width-0\">\n <div\n class=\"d-flex a-i-center bg-inherit m-0 flex-grow\"\n [style.max-width]=\"getColumnMaxWidth(node)\"\n >\n <c8y-li-icon\n class=\"p-r-4 p-l-4\"\n [icon]=\"node.property | c8yAssetPropertyIcon\"\n tooltip=\"{{ node.property | c8yAssetPropertyIconTooltip }}\"\n container=\"body\"\n [delay]=\"500\"\n [ngClass]=\"{\n 'p-l-4': config.selectMode !== 'none',\n 'p-l-8': config.selectMode === 'none'\n }\"\n ></c8y-li-icon>\n\n <span class=\"p-r-8 min-width-0 d-flex a-i-center\">\n @if (isContextMismatch(node)) {\n @let tooltipText =\n 'Property configured for a different asset. Reconfigure to match current asset.'\n | translate;\n <button\n class=\"btn-clean m-r-4\"\n [attr.aria-label]=\"tooltipText\"\n [tooltip]=\"tooltipText\"\n placement=\"top\"\n type=\"button\"\n [container]=\"'body'\"\n >\n <i\n class=\"status critical stroked-icon\"\n c8yIcon=\"exclamation-circle\"\n ></i>\n </button>\n }\n\n <div\n class=\"text-truncate\"\n title=\"{{\n node.property.label || node.property.title || node.property.name | translate\n }}\"\n [ngClass]=\"{\n 'text-muted': node.property.temporary,\n 'text-danger': isContextMismatch(node)\n }\"\n >\n {{ node.property.label || node.property.title || node.property.name | translate }}\n </div>\n </span>\n </div>\n @if (config.showKey) {\n <div\n class=\"d-flex a-i-center\"\n [ngClass]=\"{ 'col-3': config.showValue, 'col-6': !config.showValue }\"\n >\n <span\n class=\"d-inline-block tag tag--default a-s-center text-truncate\"\n title=\"{{\n node.property.keyPath?.join('.') || (node.property?.name | translate)\n }}\"\n >\n {{ node.property.keyPath?.join('.') || (node.property?.name | translate) }}\n </span>\n </div>\n }\n @if (asset && config.showValue) {\n <div\n class=\"d-flex a-i-center\"\n [ngClass]=\"{ 'col-3': config.showKey, 'col-6': !config.showKey }\"\n >\n @let value = node.property | c8yAssetPropertyValue: asset | async;\n <span\n class=\"tag tag--info d-inline-block a-s-center text-truncate\"\n title=\"{{ value }}\"\n >\n {{ value }}\n </span>\n </div>\n }\n </div>\n @if (assetPropertyAction || node.property.temporary) {\n <div\n class=\"m-l-8 showOnHover d-flex a-i-center j-c-end asset-property-list__actions\"\n [ngClass]=\"{\n 'p-l-32': !node.property.temporary && config.allowAddingCustomProperties,\n 'has-computed': node.property.computed && node.property.config\n }\"\n >\n @if (node.property.computed && node.property.config) {\n <button\n class=\"btn btn-dot m-l-auto\"\n title=\"{{ 'Configure' | translate }}\"\n (click)=\"editProperty(node.property)\"\n >\n <i [c8yIcon]=\"'cog'\"></i>\n </button>\n }\n @if (node.property.temporary) {\n <button\n class=\"btn btn-dot btn-dot--danger\"\n [attr.aria-label]=\"'Remove' | translate\"\n tooltip=\"{{ 'Remove' | translate }}\"\n container=\"body\"\n type=\"button\"\n [ngClass]=\"{ 'm-l-auto': !node.property.computed || !node.property.config }\"\n [delay]=\"500\"\n (click)=\"removeProperty(node.property)\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n }\n <ng-container\n *ngTemplateOutlet=\"\n assetPropertyAction?.template;\n context: {\n $implicit: node.property\n }\n \"\n ></ng-container>\n </div>\n }\n </div>\n </cdk-tree-node>\n </cdk-tree>\n } @else {\n <c8y-ui-empty-state\n icon=\"list\"\n title=\"{{ 'No properties to display' | translate }}\"\n subtitle=\"{{ 'Select an asset to see the available properties.' | translate }}\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n }\n @if (config.allowAddingCustomProperties) {\n <div class=\"sticky-bottom bg-inherit separator-top p-16\">\n <button\n class=\"btn btn-default btn-sm m-l-8\"\n (click)=\"addProperty()\"\n data-cy=\"asset-property-item-add-button\"\n >\n <i [c8yIcon]=\"'plus'\"></i>\n {{ 'Add property' | translate }}\n </button>\n </div>\n }\n</div>\n","import { Component, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';\nimport { IManagedObject, Paging } from '@c8y/client';\nimport {\n BottomDrawerRef,\n C8yTranslatePipe,\n FormsModule,\n IconDirective,\n LoadMoreComponent,\n TabComponent,\n TabsOutletComponent\n} from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { cloneDeep } from 'lodash-es';\nimport {\n AssetPropertyListConfig,\n AssetPropertyType,\n defaultAssetProperties\n} from '../asset-properties.model';\nimport { AssetPropertyListComponent } from '../asset-property-list/asset-property-list.component';\nimport { AssetPropertiesService } from '../asset-properties.service';\nimport { BehaviorSubject, debounceTime, Subject, takeUntil } from 'rxjs';\nimport { NgIf } from '@angular/common';\nimport { ComputedPropertiesService } from '../computed-properties.service';\n\n/**\n * Represents a drawer component for selecting asset properties.\n */\n@Component({\n selector: 'c8y-custom-properties-drawer-component',\n templateUrl: './custom-properties-drawer.component.html',\n host: {\n class: 'd-contents'\n },\n standalone: true,\n imports: [\n C8yTranslatePipe,\n FormsModule,\n AssetPropertyListComponent,\n LoadMoreComponent,\n IconDirective,\n NgIf,\n TabComponent,\n TabsOutletComponent\n ]\n})\nexport class CustomPropertiesDrawerComponent implements OnInit {\n asset: IManagedObject;\n /**\n * Title of the drawer.\n */\n @Input() title = gettext('Select property');\n /**\n * Configuration for the asset property list.\n */\n config: AssetPropertyListConfig = {\n filterable: false,\n selectMode: 'multi',\n expansionMode: 'collapsedByDefault',\n showValue: false,\n emptyStateContent: 'default-properties',\n allowAddingCustomProperties: false,\n inputPropertiesHandle: 'override'\n };\n /**\n * Emits the selected properties when saved.\n */\n @Output() savePropertySelection = new EventEmitter<AssetPropertyType[]>();\n /**\n * Emits an event when the selection is canceled.\n */\n @Output() cancelPropertySelection = new EventEmitter<void>();\n /**\n * List of selected properties.\n */\n selectedProperties: AssetPropertyType[] = [];\n /**\n * Reference to the bottom drawer.\n */\n bottomDrawerRef = inject(BottomDrawerRef);\n /**\n * Promise resolving to the selected properties.\n */\n result: Promise<AssetPropertyType[]> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n\n tabNames = {\n regular: gettext('Properties'),\n computed: gettext('Computed properties')\n };\n paging: Paging<IManagedObject>;\n inputText = '';\n\n selectedTab: keyof typeof this.tabNames = 'regular';\n\n regularProperties: AssetPropertyType[] = [];\n computedProperties: AssetPropertyType[] = [];\n displayedProperties: AssetPropertyType[] = [];\n regularCount = 0;\n computedCount = 0;\n allComputedProperties: AssetPropertyType[] = [];\n\n private searchSubject$ = new BehaviorSubject<string>('');\n /**\n * Internal save handler.\n */\n private _save: (value: AssetPropertyType[]) => void;\n /**\n * Internal cancel handler.\n */\n private _cancel: (reason?: string | Error) => void;\n /**\n * Subject for handling component destruction.\n */\n private destroy$ = new Subject<void>();\n private assetPropertiesService = inject(AssetPropertiesService);\n private computedPropertiesService = inject(ComputedPropertiesService);\n\n async ngOnInit() {\n const computedPropsResult = await this.computedPropertiesService.getByContext(this.asset);\n this.allComputedProperties = computedPropsResult.map(({ prop }) => prop);\n\n await this.updateProperties();\n\n this.searchSubject$\n .pipe(takeUntil(this.destroy$), debounceTime(350))\n .subscribe(() => this.updateProperties());\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n /**\n * Updates the selected properties.\n * @param properties The selected properties.\n */\n onSelectedProperties(properties: AssetPropertyType[]): void {\n this.selectedProperties = cloneDeep(properties);\n }\n\n onTabChange(tabName: keyof typeof this.tabNames): void {\n this.selectedTab = tabName;\n this.updateDisplayedProperties();\n }\n\n onSearch() {\n this.searchSubject$.next(this.inputText);\n }\n\n clearSearch(): void {\n this.inputText = '';\n this.onSearch();\n }\n\n /**\n * Saves the selected properties and closes the drawer.\n */\n onSave(): void {\n this._save(this.selectedProperties);\n this.bottomDrawerRef.close();\n }\n\n /**\n * Cancels the selection and closes the drawer.\n */\n onCancel(): void {\n this._cancel();\n this.bottomDrawerRef.close();\n }\n\n async loadMore() {\n if (this.selectedTab !== 'regular' || !this.paging) {\n return;\n }\n\n const res = await this.paging.next();\n\n this.paging = res.paging;\n\n const propertiesFromLibrary: AssetPropertyType[] = [];\n const propertiesMOs = res.data;\n propertiesMOs.forEach(prop => {\n propertiesFromLibrary.push({\n c8y_JsonSchema: prop.c8y_JsonSchema,\n label: prop.name,\n name: Object.keys(prop.c8y_JsonSchema.properties)[0],\n type: prop.c8y_JsonSchema.type\n });\n });\n\n const categorizedNewProps =\n this.categorizeAndFlattenHierarchicalProperties(propertiesFromLibrary);\n const newRegularProps = categorizedNewProps.filter(prop => !prop.computed);\n\n this.regularProperties = [...this.regularProperties, ...newRegularProps];\n\n if (this.selectedTab === 'regular') {\n this.displayedProperties = this.regularProperties;\n }\n }\n\n /**\n * Checks if the select button should be disabled.\n * @returns True if all selected properties are inactive.\n */\n selectIsDisabled(): boolean {\n return this.selectedProperties?.every(({ active }) => !active);\n }\n\n private async updateProperties() {\n const { propertiesFromLibrary, paging } =\n await this.assetPropertiesService.getPropertiesFromPropertiesLibrary(this.inputText);\n this.paging = paging;\n\n const filteredComputedProperties = this.allComputedProperties.filter(prop =>\n prop.label.toLowerCase().includes(this.inputText?.trim().toLowerCase() || '')\n );\n const filteredDefaultProperties = defaultAssetProperties.filter(prop =>\n prop.label.toLowerCase().includes(this.inputText?.trim().toLowerCase() || '')\n );\n const allProperties = this.categorizeAndFlattenHierarchicalProperties([\n ...filteredComputedProperties,\n ...propertiesFromLibrary,\n ...filteredDefaultProperties\n ]);\n\n this.regularProperties = allProperties.filter(prop => !prop.computed);\n this.computedProperties = allProperties.filter(prop => prop.computed);\n\n this.regularCount = (paging.totalElements || 0) + filteredDefaultProperties.length;\n this.computedCount = filteredComputedProperties.length;\n\n this.updateDisplayedProperties();\n }\n\n private updateDisplayedProperties(): void {\n this.displayedProperties =\n this.selectedTab === 'regular' ? this.regularProperties : this.computedProperties;\n }\n\n /**\n * Categorizes and flattens hierarchical properties.\n * @param properties The properties to categorize.\n * @returns The flattened list of properties.\n */\n private categorizeAndFlattenHierarchicalProperties(\n properties: AssetPropertyType[]\n ): AssetPropertyType[] {\n const { computed, simple, complex } =\n this.assetPropertiesService.categorizeAndFlattenHierarchicalProperties(properties);\n return [...computed, ...simple, ...complex];\n }\n}\n","<div class=\"card-header separator\">\n <span class=\"h4 card-title\">{{ title | translate }}</span>\n</div>\n\n<div class=\"form-group m-b-8 p-16 d-flex\">\n <div class=\"input-group input-group-search\">\n <input\n class=\"form-control\"\n [attr.aria-label]=\"'Search properties' | translate\"\n placeholder=\"{{ 'Search properties' | translate }}\"\n role=\"searchbox\"\n type=\"search\"\n autocomplete=\"off\"\n [(ngModel)]=\"inputText\"\n (input)=\"onSearch()\"\n #filter\n />\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n *ngIf=\"filter.value.length === 0\"\n >\n <i\n class=\"dlt-c8y-icon-search\"\n [c8yIcon]=\"'search'\"\n ></i>\n </span>\n <span\n class=\"input-group-addon\"\n [attr.aria-hidden]=\"true\"\n *ngIf=\"filter.value.length > 0\"\n >\n <i\n class=\"text-muted dlt-c8y-icon-times\"\n [c8yIcon]=\"'times'\"\n [attr.aria-label]=\"'Clear search' | translate\"\n tabindex=\"0\"\n role=\"button\"\n (click)=\"clearSearch()\"\n ></i>\n </span>\n </div>\n</div>\n\n<c8y-tabs-outlet\n class=\"elevation-none m-b-16\"\n outletName=\"assetPropertiesDrawerTabs\"\n orientation=\"horizontal\"\n></c8y-tabs-outlet>\n\n<c8y-tab\n [isActive]=\"selectedTab === 'regular'\"\n [tabsOutlet]=\"'assetPropertiesDrawerTabs'\"\n [priority]=\"1000\"\n (onSelect)=\"onTabChange('regular')\"\n>\n <i [c8yIcon]=\"'c8y-css'\"></i>\n <span>\n {{ tabNames.regular | translate }}\n <span aria-live=\"assertive\" class=\"m-l-4 badge badge-default flex-no-shrink\">\n {{ regularCount }}\n </span>\n </span>\n</c8y-tab>\n\n<c8y-tab\n [isActive]=\"selectedTab === 'computed'\"\n [tabsOutlet]=\"'assetPropertiesDrawerTabs'\"\n [priority]=\"900\"\n (onSelect)=\"onTabChange('computed')\"\n>\n <i [c8yIcon]=\"'bolt'\"></i>\n <span>\n {{ tabNames.computed | translate }}\n <span class=\"m-l-4 badge badge-default flex-no-shrink\" aria-live=\"assertive\">\n {{ computedCount }}\n </span>\n </span>\n</c8y-tab>\n\n<div class=\"inner-scroll flex-grow\">\n <c8y-asset-property-list\n class=\"bg-component\"\n [config]=\"config\"\n [extraProperties]=\"displayedProperties\"\n (selectedProperties)=\"onSelectedProperties($event)\"\n ></c8y-asset-property-list>\n <c8y-load-more\n *ngIf=\"selectedTab === 'regular'\"\n [paging]=\"paging\"\n [useIntersection]=\"true\"\n (onLoad)=\"loadMore()\"\n ></c8y-load-more>\n</div>\n\n<div class=\"card-footer text-center p-24 separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"onCancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Select' | translate }}\"\n type=\"button\"\n [disabled]=\"selectIsDisabled()\"\n (click)=\"onSave()\"\n >\n {{ 'Select' | translate }}\n </button>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { AssetPropertyType } from './asset-properties.model';\nimport { BottomDrawerService } from '@c8y/ngx-components';\nimport { CustomPropertiesDrawerComponent } from './custom-properties-drawer/custom-properties-drawer.component';\nimport { IManagedObject } from '@c8y/client';\n\n/**\n * Service to open a drawer for selecting custom asset properties.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomPropertiesDrawerService {\n private bottomDrawerService = inject(BottomDrawerService);\n\n async getCustomProperties(asset: IManagedObject): Promise<AssetPropertyType[]> {\n const drawer = this.bottomDrawerService.openDrawer(CustomPropertiesDrawerComponent, {\n disableClickOutside: true,\n initialState: {\n asset\n }\n });\n\n try {\n const resultOf = await drawer.instance.result;\n return resultOf;\n } catch (ex) {\n return [];\n }\n }\n}\n","import { Component, EventEmitter, inject, Input, Output } from '@angular/core';\nimport { IManagedObject } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { BottomDrawerRef, C8yTranslatePipe, FormsModule } from '@c8y/ngx-components';\nimport { cloneDeep } from 'lodash-es';\nimport { AssetPropertyListConfig, AssetPropertyType } from '../asset-properties.model';\nimport { AssetPropertyListComponent } from '../asset-property-list/asset-property-list.component';\n\n/**\n * Represents a drawer component for selecting asset properties.\n */\n@Component({\n selector: 'c8y-asset-property-selector-drawer-component',\n templateUrl: './asset-property-selector-drawer.component.html',\n host: {\n class: 'd-contents'\n },\n standalone: true,\n imports: [C8yTranslatePipe, FormsModule, AssetPropertyListComponent]\n})\nexport class AssetPropertySelectorDrawerComponent {\n /**\n * Title of the drawer.\n */\n @Input() title = gettext('Select property');\n /**\n * Managed object representing the asset.\n */\n asset!: IManagedObject;\n /**\n * Configuration for the asset property list.\n */\n config: AssetPropertyListConfig;\n /**\n * Extra properties to be displayed in the list.\n */\n extraProperties: AssetPropertyType[] = [];\n /**\n * Emits the selected properties when saved.\n */\n @Output() savePropertySelection = new EventEmitter<AssetPropertyType[]>();\n /**\n * Emits an event when the selection is canceled.\n */\n @Output() cancelPropertySelection = new EventEmitter<void>();\n /**\n * List of selected properties.\n */\n selectedProperties: AssetPropertyType[] = [];\n /**\n * Reference to the bottom drawer.\n */\n bottomDrawerRef = inject(BottomDrawerRef);\n /**\n * Promise resolving to the selected properties.\n */\n result: Promise<AssetPropertyType[]> = new Promise((resolve, reject) => {\n this._save = resolve;\n this._cancel = reject;\n });\n /**\n * Internal save handler.\n */\n private _save: (value: AssetPropertyType[]) => void;\n /**\n * Internal cancel handler.\n */\n private _cancel: (reason?: string | Error) => void;\n /**\n * Updates the selected properties.\n * @param properties The selected properties.\n */\n onSelectedProperties(properties: AssetPropertyType[]): void {\n this.selectedProperties = cloneDeep(properties);\n }\n\n /**\n * Saves the selected properties and closes the drawer.\n */\n onSave(): void {\n this._save(this.selectedProperties);\n this.bottomDrawerRef.close();\n }\n\n /**\n * Cancels the selection and closes the drawer.\n */\n onCancel(): void {\n this._cancel();\n this.bottomDrawerRef.close();\n }\n\n /**\n * Checks if the select button should be disabled.\n * @returns True if all selected properties are inactive.\n */\n selectIsDisabled(): boolean {\n return this.selectedProperties?.every(({ active }) => !active);\n }\n}\n","<div class=\"card-header separator\">\n <span class=\"h4 card-title\">{{ title | translate }}</span>\n</div>\n\n<div class=\"inner-scroll flex-grow\">\n <c8y-asset-property-list\n class=\"bg-component\"\n [asset]=\"asset\"\n [config]=\"config\"\n [extraProperties]=\"extraProperties\"\n (selectedProperties)=\"onSelectedProperties($event)\"\n ></c8y-asset-property-list>\n</div>\n\n<div class=\"card-footer text-center p-24 separator flex-no-shrink\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Cancel' | translate }}\"\n type=\"button\"\n (click)=\"onCancel()\"\n >\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary\"\n title=\"{{ 'Select' | translate }}\"\n type=\"button\"\n [disabled]=\"selectIsDisabled()\"\n (click)=\"onSave()\"\n >\n {{ 'Select' | translate }}\n </button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","FormsModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgJO,MAAM,8BAA8B,GAA4B;AACrE,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,aAAa,EAAE,mBAAmB;AAClC,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,qBAAqB,EAAE,OAAO;AAC9B,IAAA,gBAAgB,EAAE;;AAGb,MAAM,sBAAsB,GAAwB;AACzD,IAAA;AACE,QAAA,cAAc,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;AAC3E,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC;AACtB,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,UAAU,EAAE,IAAI;AAChB,QAAA,kBAAkB,EAAE;AACrB,KAAA;AACD,IAAA;AACE,QAAA,cAAc,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EA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