@c8y/ngx-components 1022.28.2 → 1022.33.0
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/asset-properties/asset-properties.model.d.ts +12 -3
- package/asset-properties/asset-properties.model.d.ts.map +1 -1
- package/asset-properties/asset-properties.service.d.ts +20 -2
- package/asset-properties/asset-properties.service.d.ts.map +1 -1
- package/asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.d.ts +14 -0
- package/asset-properties/asset-property-list/asset-property-icon-tooltip.pipe.d.ts.map +1 -0
- package/asset-properties/asset-property-list/asset-property-icon.pipe.d.ts.map +1 -1
- package/asset-properties/asset-property-list/asset-property-list.component.d.ts +28 -18
- package/asset-properties/asset-property-list/asset-property-list.component.d.ts.map +1 -1
- package/asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.d.ts +2 -2
- package/asset-properties/asset-property-selector-drawer/asset-property-selector-drawer.component.d.ts.map +1 -1
- package/asset-properties/custom-properties-drawer/custom-properties-drawer.component.d.ts +97 -0
- package/asset-properties/custom-properties-drawer/custom-properties-drawer.component.d.ts.map +1 -0
- package/asset-properties/custom-properties-drawer.service.d.ts +12 -0
- package/asset-properties/custom-properties-drawer.service.d.ts.map +1 -0
- package/asset-properties/index.d.ts +1 -0
- package/asset-properties/index.d.ts.map +1 -1
- package/context-dashboard/dashboard-detail.service.d.ts +2 -2
- package/context-dashboard/widget-config-hook/widget-config-hook.model.d.ts +2 -1
- package/context-dashboard/widget-config-hook/widget-config-hook.model.d.ts.map +1 -1
- package/context-dashboard/widget-config.component.d.ts +3 -1
- package/context-dashboard/widget-config.component.d.ts.map +1 -1
- package/context-dashboard/widget-config.service.d.ts +14 -8
- package/context-dashboard/widget-config.service.d.ts.map +1 -1
- package/core/dynamic-component/dynamic-component.model.d.ts +26 -0
- package/core/dynamic-component/dynamic-component.model.d.ts.map +1 -1
- package/core/i18n/pattern-messages.data.d.ts +7 -0
- package/core/i18n/pattern-messages.data.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/query-param-handler/query-param-handler.service.d.ts +1 -1
- package/core/query-param-handler/query-param-handler.service.d.ts.map +1 -1
- package/core/query-param-handler/query-param-modal-handler.service.d.ts +16 -5
- package/core/query-param-handler/query-param-modal-handler.service.d.ts.map +1 -1
- package/core/resizable-grid/index.d.ts +2 -0
- package/core/resizable-grid/index.d.ts.map +1 -0
- package/core/resizable-grid/resizable-grid.component.d.ts +114 -0
- package/core/resizable-grid/resizable-grid.component.d.ts.map +1 -0
- package/dashboard-manager/devicemanagement/c8y-ngx-components-dashboard-manager-devicemanagement.d.ts.map +1 -0
- package/dashboard-manager/devicemanagement/index.d.ts +2 -0
- package/dashboard-manager/devicemanagement/index.d.ts.map +1 -0
- package/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.d.ts.map +1 -1
- 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-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-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +73 -73
- 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 +427 -66
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-WUN1r4fC.mjs → c8y-ngx-components-asset-property-grid.component-CRnyUbyz.mjs} +13 -13
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-WUN1r4fC.mjs.map → c8y-ngx-components-asset-property-grid.component-CRnyUbyz.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-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 +33 -33
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +10 -10
- 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-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-C-JLbcn5.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BWyhab0H.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C-JLbcn5.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BWyhab0H.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RXvOcs04.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DjlpSztw.mjs} +10 -10
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-RXvOcs04.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DjlpSztw.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DmPIJGXO.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-B2zLhv0X.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DmPIJGXO.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-B2zLhv0X.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.mjs +133 -116
- 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-DtLAOoFx.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CwfVxTSx.mjs} +16 -16
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DtLAOoFx.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CwfVxTSx.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 +19 -0
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -0
- 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-devicemanagement.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 +41 -40
- 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-models.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +27 -27
- 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-exports.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-icon-selector-icons-arrows.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-city.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-dateAndTime.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-devicesAndSensors.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-ecommerce.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-editing.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-filesAndFolders.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-finance.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-hands.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-location.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-messaging.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-multimedia.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-network.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-office.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-people.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs +1 -0
- package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-programming.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-security.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-transport.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-userInterface.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons-weather.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-icons.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector-model.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 +10 -10
- 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-product-experience.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-mappings.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 +13 -29
- 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 +33 -27
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs +17 -320
- 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 +3 -3
- 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 +41 -41
- 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-cockpit-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-cockpit.mjs +4 -4
- package/fesm2022/c8y-ngx-components-widgets-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-all-critical-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-recent-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-applications.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-notes.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-cockpit-legacy-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-cockpit-welcome.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-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-device-control-message.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-device-management-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-help-and-service.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +18 -14
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs +4 -2
- package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-linear-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs +4 -2
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-radial-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-silo.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-device-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +22 -22
- 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 +50 -36
- 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 +22 -22
- 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-import-export-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets.mjs +4 -4
- package/fesm2022/c8y-ngx-components-widgets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1658 -1315
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/icon-selector/icons/index.d.ts +1 -1
- package/icon-selector/icons/platform/index.d.ts +2 -2
- package/icon-selector/icons/platform/index.d.ts.map +1 -1
- package/locales/de.po +26 -3
- package/locales/es.po +26 -3
- package/locales/fr.po +26 -3
- package/locales/ja_JP.po +25 -3
- package/locales/ko.po +26 -3
- package/locales/locales.pot +25 -2
- package/locales/nl.po +26 -3
- package/locales/pl.po +26 -3
- package/locales/pt_BR.po +26 -3
- package/locales/zh_CN.po +26 -3
- package/locales/zh_TW.po +26 -3
- package/package.json +1 -1
- package/replace-device/replace-device.module.d.ts.map +1 -1
- package/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.d.ts +6 -6
- package/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.d.ts.map +1 -1
- package/sensor-phone/sensor-phone-modal/sensor-phone.model.d.ts +0 -1
- package/sensor-phone/sensor-phone-modal/sensor-phone.model.d.ts.map +1 -1
- package/sensor-phone/sensor-phone.module.d.ts +2 -3
- package/sensor-phone/sensor-phone.module.d.ts.map +1 -1
- package/widgets/definitions/datapoints-table/index.d.ts +1 -2
- package/widgets/definitions/datapoints-table/index.d.ts.map +1 -1
- package/widgets/definitions/html-widget/html-widget-config.factory.d.ts +1 -1
- package/widgets/definitions/html-widget/html-widget-config.factory.d.ts.map +1 -1
- package/widgets/definitions/image/index.d.ts +1 -1
- package/widgets/definitions/image/index.d.ts.map +1 -1
- package/widgets/definitions/markdown/index.d.ts +1 -1
- package/widgets/definitions/markdown/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/datapoints-table-view/datapoints-table-view.component.d.ts.map +1 -1
- package/widgets/implementations/three-d-rotation/three-d-rotation-widget-view/three-d-rotation-widget-view.component.d.ts.map +1 -1
|
@@ -96,10 +96,10 @@ class KpiWidgetConfigComponent {
|
|
|
96
96
|
])
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
100
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KpiWidgetConfigComponent, deps: [{ token: i1.FormBuilder }, { token: i1.NgForm }, { token: i2.WidgetConfigComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
100
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: KpiWidgetConfigComponent, isStandalone: true, selector: "c8y-kpi-widget-config", inputs: { config: "config" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\">\n <c8y-datapoint-selection-list\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n name=\"datapoints\"\n class=\"bg-inherit no-card-context\"\n ></c8y-datapoint-selection-list>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Layout' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-md-3\">\n <div class=\"form-group form-group-sm d-flex a-i-center gap-8 m-b-0 m-t-8\">\n <label translate>Icon</label>\n <c8y-icon-selector-wrapper name=\"icon\" formControlName=\"icon\"></c8y-icon-selector-wrapper>\n </div>\n </div>\n <div class=\"col-md-9\">\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <label [title]=\"'Font size of measurement value (px)' | translate\" translate>\n Font size of measurement value (px)\n </label>\n <input\n class=\"form-control\"\n formControlName=\"fontSize\"\n name=\"fontSize\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 36 }\"\n />\n <c8y-messages\n [show]=\"formGroup.controls?.fontSize?.touched && formGroup?.controls?.fontSize?.errors\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display' | translate }}</legend>\n <div class=\"d-flex gap-16 flex-wrap\">\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show timestamp' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTimestamp\" name=\"showTimestamp\" />\n <span></span>\n <span translate>Show timestamp</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showIcon\" name=\"showIcon\" />\n <span></span>\n <span translate>Show icon</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show trend icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTrend\" name=\"showTrend\" />\n <span></span>\n <span translate>Show trend icon</span>\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Indicates the trend between the last two measurement values.' | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend translate>\n Number of decimal places\n </legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n formControlName=\"numberOfDecimalPlaces\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i1$1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i1$1.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i1$1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i4.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i5.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i6.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
101
101
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KpiWidgetConfigComponent, decorators: [{
|
|
103
103
|
type: Component,
|
|
104
104
|
args: [{ selector: 'c8y-kpi-widget-config', standalone: true, imports: [CoreModule, DatapointSelectorModule, IconSelectorModule, PopoverModule], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], template: "<form [formGroup]=\"formGroup\">\n <c8y-datapoint-selection-list\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n name=\"datapoints\"\n class=\"bg-inherit no-card-context\"\n ></c8y-datapoint-selection-list>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Layout' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-md-3\">\n <div class=\"form-group form-group-sm d-flex a-i-center gap-8 m-b-0 m-t-8\">\n <label translate>Icon</label>\n <c8y-icon-selector-wrapper name=\"icon\" formControlName=\"icon\"></c8y-icon-selector-wrapper>\n </div>\n </div>\n <div class=\"col-md-9\">\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <label [title]=\"'Font size of measurement value (px)' | translate\" translate>\n Font size of measurement value (px)\n </label>\n <input\n class=\"form-control\"\n formControlName=\"fontSize\"\n name=\"fontSize\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 36 }\"\n />\n <c8y-messages\n [show]=\"formGroup.controls?.fontSize?.touched && formGroup?.controls?.fontSize?.errors\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display' | translate }}</legend>\n <div class=\"d-flex gap-16 flex-wrap\">\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show timestamp' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTimestamp\" name=\"showTimestamp\" />\n <span></span>\n <span translate>Show timestamp</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showIcon\" name=\"showIcon\" />\n <span></span>\n <span translate>Show icon</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show trend icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTrend\" name=\"showTrend\" />\n <span></span>\n <span translate>Show trend icon</span>\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Indicates the trend between the last two measurement values.' | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend translate>\n Number of decimal places\n </legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n formControlName=\"numberOfDecimalPlaces\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n\n" }]
|
|
105
105
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i1.NgForm }, { type: i2.WidgetConfigComponent }], propDecorators: { config: [{
|
|
@@ -219,10 +219,10 @@ class KpiWidgetViewComponent {
|
|
|
219
219
|
datapoint.__target = { name, id };
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
223
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KpiWidgetViewComponent, deps: [{ token: i1$1.MeasurementRealtimeService }, { token: i2.ContextDashboardComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: KpiWidgetViewComponent, isStandalone: true, selector: "c8y-kpi-widget-view", inputs: { config: "config" }, providers: [MeasurementRealtimeService], ngImport: i0, template: "<div\n class=\"kpi-widget__container d-flex d-col fit-h fit-w a-i-center j-c-center\"\n *ngIf=\"state$ | async as lastState; else noMeasurementFound\"\n>\n <div class=\"d-flex a-i-center j-c-center fit-w\">\n <div\n class=\"m-r-16 flex-no-shrink text-muted\"\n [ngClass]=\"lastState.colorClass\"\n *ngIf=\"config.icon && config.showIcon\"\n >\n <i class=\"icon-32\" [c8yIcon]=\"config.icon\"></i>\n </div>\n <div class=\"text-truncate\">\n <span\n class=\"text-truncate text-medium\"\n [ngClass]=\"lastState.colorClass\"\n [ngStyle]=\"{ 'font-size': (config.fontSize || '36') + 'px' }\"\n title=\"{{\n lastState.colorClass === 'text-danger'\n ? ('Within red range:' | translate)\n : lastState.colorClass === 'text-warning'\n ? ('Within yellow range:' | translate)\n : ''\n }} {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }} {{ lastState.unit || '' }}\"\n >\n {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }}\n <small class=\"text-regular\">{{ lastState.unit || '' }}</small>\n </span>\n </div>\n <div\n class=\"dot dot-info dot-30 m-l-16 flex-no-shrink\"\n *ngIf=\"config?.showTrend && lastState.previousValue as previousValue\"\n >\n <i\n class=\"icon-20\"\n [title]=\"\n ('Previous value' | translate) +\n ': ' +\n (previousValue.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')) +\n ' (' +\n (previousValue.date | date: 'medium') +\n ')'\n \"\n c8yIcon=\"arrow-dotted-up\"\n [ngStyle]=\"{ transform: 'rotate(' + lastState.trend + ')' }\"\n ></i>\n </div>\n </div>\n <div class=\"d-flex j-c-center\">\n <p *ngIf=\"config?.showTimestamp\" class=\"icon-flex text-center text-muted small\">\n <i c8yIcon=\"calendar\"></i>\n {{ lastState.latestMeasurement.date | date: 'medium' }}\n </p>\n </div>\n</div>\n\n<ng-template #noMeasurementFound>\n <div class=\"d-flex fit-h fit-w j-c-center a-i-center\">\n <c8y-ui-empty-state\n *ngIf=\"noDataInitiallyInDB\"\n class=\"fit-w\"\n [icon]=\"'line-chart'\"\n [title]=\"'No measurement to display.' | translate\"\n [subtitle]=\"'Waiting for measurements to be created.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <c8y-loading *ngIf=\"!noDataInitiallyInDB\"></c8y-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1$1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "component", type: i1$1.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }] }); }
|
|
224
224
|
}
|
|
225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KpiWidgetViewComponent, decorators: [{
|
|
226
226
|
type: Component,
|
|
227
227
|
args: [{ selector: 'c8y-kpi-widget-view', standalone: true, imports: [CoreModule], providers: [MeasurementRealtimeService], template: "<div\n class=\"kpi-widget__container d-flex d-col fit-h fit-w a-i-center j-c-center\"\n *ngIf=\"state$ | async as lastState; else noMeasurementFound\"\n>\n <div class=\"d-flex a-i-center j-c-center fit-w\">\n <div\n class=\"m-r-16 flex-no-shrink text-muted\"\n [ngClass]=\"lastState.colorClass\"\n *ngIf=\"config.icon && config.showIcon\"\n >\n <i class=\"icon-32\" [c8yIcon]=\"config.icon\"></i>\n </div>\n <div class=\"text-truncate\">\n <span\n class=\"text-truncate text-medium\"\n [ngClass]=\"lastState.colorClass\"\n [ngStyle]=\"{ 'font-size': (config.fontSize || '36') + 'px' }\"\n title=\"{{\n lastState.colorClass === 'text-danger'\n ? ('Within red range:' | translate)\n : lastState.colorClass === 'text-warning'\n ? ('Within yellow range:' | translate)\n : ''\n }} {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }} {{ lastState.unit || '' }}\"\n >\n {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }}\n <small class=\"text-regular\">{{ lastState.unit || '' }}</small>\n </span>\n </div>\n <div\n class=\"dot dot-info dot-30 m-l-16 flex-no-shrink\"\n *ngIf=\"config?.showTrend && lastState.previousValue as previousValue\"\n >\n <i\n class=\"icon-20\"\n [title]=\"\n ('Previous value' | translate) +\n ': ' +\n (previousValue.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')) +\n ' (' +\n (previousValue.date | date: 'medium') +\n ')'\n \"\n c8yIcon=\"arrow-dotted-up\"\n [ngStyle]=\"{ transform: 'rotate(' + lastState.trend + ')' }\"\n ></i>\n </div>\n </div>\n <div class=\"d-flex j-c-center\">\n <p *ngIf=\"config?.showTimestamp\" class=\"icon-flex text-center text-muted small\">\n <i c8yIcon=\"calendar\"></i>\n {{ lastState.latestMeasurement.date | date: 'medium' }}\n </p>\n </div>\n</div>\n\n<ng-template #noMeasurementFound>\n <div class=\"d-flex fit-h fit-w j-c-center a-i-center\">\n <c8y-ui-empty-state\n *ngIf=\"noDataInitiallyInDB\"\n class=\"fit-w\"\n [icon]=\"'line-chart'\"\n [title]=\"'No measurement to display.' | translate\"\n [subtitle]=\"'Waiting for measurements to be created.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <c8y-loading *ngIf=\"!noDataInitiallyInDB\"></c8y-loading>\n </div>\n</ng-template>\n" }]
|
|
228
228
|
}], ctorParameters: () => [{ type: i1$1.MeasurementRealtimeService }, { type: i2.ContextDashboardComponent, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-kpi.mjs","sources":["../../widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.ts","../../widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.html","../../widgets/implementations/kpi/kpi-widget-view/kpi-widget-view.component.ts","../../widgets/implementations/kpi/kpi-widget-view/kpi-widget-view.component.html","../../widgets/implementations/kpi/c8y-ngx-components-widgets-implementations-kpi.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n FormBuilder,\n NgForm,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard';\nimport {\n DatapointAttributesFormConfig,\n DatapointSelectorModalOptions,\n DatapointSelectorModule,\n KPIDetails\n} from '@c8y/ngx-components/datapoint-selector';\nimport { Observable } from 'rxjs';\nimport { KpiWidgetConfig } from '../kpi-widget.model';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\nexport function exactlyASingleDatapointActive(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const datapoints: KPIDetails[] = control.value;\n\n if (!datapoints || !datapoints.length) {\n return null;\n }\n\n const activeDatapoints = datapoints.filter(datapoint => datapoint.__active);\n\n if (activeDatapoints.length === 1) {\n return null;\n }\n\n return { exactlyOneDatapointNeedsToBeActive: true };\n };\n}\n\n@Component({\n selector: 'c8y-kpi-widget-config',\n templateUrl: './kpi-widget-config.component.html',\n standalone: true,\n imports: [CoreModule, DatapointSelectorModule, IconSelectorModule, PopoverModule],\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\n})\nexport class KpiWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: KpiWidgetConfig;\n datapointSelectionConfig: Partial<DatapointSelectorModalOptions> = {};\n defaultFormOptions: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true\n };\n formGroup: ReturnType<KpiWidgetConfigComponent['createForm']>;\n availableIcons: string[] = [];\n private limits = {\n fontSizeMax: 72,\n fontSizeMin: 18,\n numberOfDecimalPlacesMax: 10,\n numberOfDecimalPlacesMin: 0\n } as const;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private widgetConfig: WidgetConfigComponent\n ) {}\n\n onBeforeSave(config?: KpiWidgetConfig): boolean | Promise<boolean> | Observable<boolean> {\n if (this.formGroup.valid) {\n Object.assign(config, this.formGroup.value);\n return true;\n }\n return false;\n }\n\n async ngOnInit() {\n if (this.widgetConfig.context?.id) {\n this.datapointSelectionConfig.contextAsset = this.widgetConfig?.context;\n }\n this.initForm();\n if (this.config?.datapoints) {\n this.formGroup.patchValue({ datapoints: this.config.datapoints });\n }\n }\n\n private initForm(): void {\n this.formGroup = this.createForm();\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private createForm() {\n return this.formBuilder.group({\n numberOfDecimalPlaces: [\n 2,\n [\n Validators.required,\n Validators.min(this.limits.numberOfDecimalPlacesMin),\n Validators.max(this.limits.numberOfDecimalPlacesMax)\n ]\n ],\n showTimestamp: [true, []],\n showTrend: [true, []],\n showIcon: [true, []],\n icon: ['water', [Validators.required, Validators.minLength(1)]],\n fontSize: [\n 36,\n [\n Validators.required,\n Validators.min(this.limits.fontSizeMin),\n Validators.max(this.limits.fontSizeMax)\n ]\n ],\n datapoints: this.formBuilder.control(new Array<KPIDetails>(), [\n Validators.required,\n Validators.minLength(1),\n exactlyASingleDatapointActive()\n ])\n });\n }\n}\n","<form [formGroup]=\"formGroup\">\n <c8y-datapoint-selection-list\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n name=\"datapoints\"\n class=\"bg-inherit no-card-context\"\n ></c8y-datapoint-selection-list>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Layout' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-md-3\">\n <div class=\"form-group form-group-sm d-flex a-i-center gap-8 m-b-0 m-t-8\">\n <label translate>Icon</label>\n <c8y-icon-selector-wrapper name=\"icon\" formControlName=\"icon\"></c8y-icon-selector-wrapper>\n </div>\n </div>\n <div class=\"col-md-9\">\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <label [title]=\"'Font size of measurement value (px)' | translate\" translate>\n Font size of measurement value (px)\n </label>\n <input\n class=\"form-control\"\n formControlName=\"fontSize\"\n name=\"fontSize\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 36 }\"\n />\n <c8y-messages\n [show]=\"formGroup.controls?.fontSize?.touched && formGroup?.controls?.fontSize?.errors\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display' | translate }}</legend>\n <div class=\"d-flex gap-16 flex-wrap\">\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show timestamp' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTimestamp\" name=\"showTimestamp\" />\n <span></span>\n <span translate>Show timestamp</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showIcon\" name=\"showIcon\" />\n <span></span>\n <span translate>Show icon</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show trend icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTrend\" name=\"showTrend\" />\n <span></span>\n <span translate>Show trend icon</span>\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Indicates the trend between the last two measurement values.' | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend translate>\n Number of decimal places\n </legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n formControlName=\"numberOfDecimalPlaces\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n\n","import { Component, Input, OnInit, Optional } from '@angular/core';\nimport { CoreModule, MeasurementRealtimeService } from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { combineLatest, NEVER, Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map, pairwise, startWith, tap } from 'rxjs/operators';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { KpiWidgetConfig } from '../kpi-widget.model';\n\ninterface MeasurementValue {\n unit?: string;\n value: number;\n date: string;\n}\n\nenum ColorClass {\n danger = 'text-danger',\n warning = 'text-warning',\n unknown = ''\n}\n\n@Component({\n selector: 'c8y-kpi-widget-view',\n templateUrl: './kpi-widget-view.component.html',\n standalone: true,\n imports: [CoreModule],\n providers: [MeasurementRealtimeService]\n})\nexport class KpiWidgetViewComponent implements OnInit {\n @Input() config: KpiWidgetConfig = { datapoints: [] };\n state$: Observable<{\n latestMeasurement: MeasurementValue;\n previousValue: MeasurementValue | undefined;\n trend: string;\n unit: string;\n colorClass: ColorClass;\n }> = NEVER;\n\n // used to differentiate between loading state and empty state\n noDataInitiallyInDB = false;\n\n constructor(\n private measurementRealtime: MeasurementRealtimeService,\n @Optional() private dashboard: ContextDashboardComponent\n ) {}\n\n async ngOnInit() {\n const datapoints = this.config.datapoints || [];\n const datapoint: KPIDetails = datapoints.find(tmp => tmp?.__active);\n if (!datapoint) {\n return;\n }\n\n this.state$ = this.setupObservable(datapoint);\n }\n\n setupObservable(datapoint: KPIDetails): Observable<{\n latestMeasurement: MeasurementValue;\n previousValue: MeasurementValue | undefined;\n trend: string;\n unit: string;\n colorClass: ColorClass;\n }> {\n this.assignContextFromContextDashboard(datapoint);\n const latestMeasurement$ = this.getLatestMeasurement$(datapoint);\n const lastTwoValues$ = this.getLastTwoValuesOfObservable$(latestMeasurement$);\n\n const previousValue$ = lastTwoValues$.pipe(\n map(([previousVal]) => previousVal),\n startWith(undefined as MeasurementValue | undefined)\n );\n\n const unit$ = latestMeasurement$.pipe(\n map(latestMeasurementValue => datapoint.unit || latestMeasurementValue.unit || ''),\n startWith(''),\n distinctUntilChanged()\n );\n\n return combineLatest([\n latestMeasurement$,\n previousValue$,\n this.getTrendOfLatestMeasurements$(lastTwoValues$),\n unit$,\n this.getColorClass$(latestMeasurement$, datapoint)\n ]).pipe(\n map(([latestMeasurement, previousValue, trend, unit, colorClass]) => {\n return {\n latestMeasurement,\n previousValue,\n trend,\n unit,\n colorClass\n };\n })\n );\n }\n\n private getLatestMeasurement$(datapoint: KPIDetails): Observable<MeasurementValue> {\n return this.measurementRealtime\n .latestValueOfSpecificMeasurement$(\n datapoint.fragment,\n datapoint.series,\n datapoint.__target,\n // we only need the last two values in case we want to show a trend\n this.config.showTrend ? 2 : 1,\n // null will be emitted in case no measurement was found initially\n true\n )\n .pipe(\n tap(measurement => {\n if (!measurement) {\n this.noDataInitiallyInDB = true;\n }\n }),\n filter(measurement => !!measurement),\n map(measurement => {\n return {\n unit: measurement[datapoint.fragment][datapoint.series].unit,\n value: measurement[datapoint.fragment][datapoint.series].value,\n date: measurement.time as string\n };\n })\n );\n }\n\n private getColorClass$(\n measurementAndDatapointCombination$: Observable<MeasurementValue>,\n datapoint: KPIDetails\n ): Observable<ColorClass> {\n return measurementAndDatapointCombination$.pipe(\n map(latestMeasurementValue => {\n if (this.inRangeOf(datapoint, latestMeasurementValue.value, 'redRangeMin', 'redRangeMax')) {\n return ColorClass.danger;\n }\n\n if (\n this.inRangeOf(\n datapoint,\n latestMeasurementValue.value,\n 'yellowRangeMin',\n 'yellowRangeMax'\n )\n ) {\n return ColorClass.warning;\n }\n\n return ColorClass.unknown;\n }),\n startWith(ColorClass.unknown),\n distinctUntilChanged()\n );\n }\n\n private getLastTwoValuesOfObservable$<T>(input$: Observable<T>): Observable<T[]> {\n return input$.pipe(pairwise());\n }\n\n private getTrendOfLatestMeasurements$(latestMeasurement$: Observable<MeasurementValue[]>) {\n return latestMeasurement$.pipe(\n map(res => {\n if (res.length === 2) {\n const oldValue = res[0].value;\n const newValue = res[1].value;\n if (oldValue < newValue) {\n return '45deg';\n }\n if (oldValue > newValue) {\n return '135deg';\n }\n }\n return '90deg';\n }),\n startWith('90deg'),\n distinctUntilChanged()\n );\n }\n\n private inRangeOf(\n datapoint: KPIDetails,\n measurementValue: number,\n minAttribute: string,\n maxAttribute: string\n ): boolean {\n if (\n typeof datapoint[minAttribute] === 'number' &&\n typeof datapoint[maxAttribute] === 'number'\n ) {\n if (\n measurementValue >= datapoint[minAttribute] &&\n measurementValue < datapoint[maxAttribute]\n ) {\n return true;\n }\n }\n return false;\n }\n\n private assignContextFromContextDashboard(datapoint: KPIDetails) {\n if (!this.dashboard?.isDeviceTypeDashboard) {\n return;\n }\n const context = this.dashboard?.context;\n if (context?.id) {\n const { name, id } = context;\n datapoint.__target = { name, id };\n }\n }\n}\n","<div\n class=\"kpi-widget__container d-flex d-col fit-h fit-w a-i-center j-c-center\"\n *ngIf=\"state$ | async as lastState; else noMeasurementFound\"\n>\n <div class=\"d-flex a-i-center j-c-center fit-w\">\n <div\n class=\"m-r-16 flex-no-shrink text-muted\"\n [ngClass]=\"lastState.colorClass\"\n *ngIf=\"config.icon && config.showIcon\"\n >\n <i class=\"icon-32\" [c8yIcon]=\"config.icon\"></i>\n </div>\n <div class=\"text-truncate\">\n <span\n class=\"text-truncate text-medium\"\n [ngClass]=\"lastState.colorClass\"\n [ngStyle]=\"{ 'font-size': (config.fontSize || '36') + 'px' }\"\n title=\"{{\n lastState.colorClass === 'text-danger'\n ? ('Within red range:' | translate)\n : lastState.colorClass === 'text-warning'\n ? ('Within yellow range:' | translate)\n : ''\n }} {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }} {{ lastState.unit || '' }}\"\n >\n {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }}\n <small class=\"text-regular\">{{ lastState.unit || '' }}</small>\n </span>\n </div>\n <div\n class=\"dot dot-info dot-30 m-l-16 flex-no-shrink\"\n *ngIf=\"config?.showTrend && lastState.previousValue as previousValue\"\n >\n <i\n class=\"icon-20\"\n [title]=\"\n ('Previous value' | translate) +\n ': ' +\n (previousValue.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')) +\n ' (' +\n (previousValue.date | date: 'medium') +\n ')'\n \"\n c8yIcon=\"arrow-dotted-up\"\n [ngStyle]=\"{ transform: 'rotate(' + lastState.trend + ')' }\"\n ></i>\n </div>\n </div>\n <div class=\"d-flex j-c-center\">\n <p *ngIf=\"config?.showTimestamp\" class=\"icon-flex text-center text-muted small\">\n <i c8yIcon=\"calendar\"></i>\n {{ lastState.latestMeasurement.date | date: 'medium' }}\n </p>\n </div>\n</div>\n\n<ng-template #noMeasurementFound>\n <div class=\"d-flex fit-h fit-w j-c-center a-i-center\">\n <c8y-ui-empty-state\n *ngIf=\"noDataInitiallyInDB\"\n class=\"fit-w\"\n [icon]=\"'line-chart'\"\n [title]=\"'No measurement to display.' | translate\"\n [subtitle]=\"'Waiting for measurements to be created.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <c8y-loading *ngIf=\"!noDataInitiallyInDB\"></c8y-loading>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;SAuBgB,6BAA6B,GAAA;IAC3C,OAAO,CAAC,OAAwB,KAA6B;AAC3D,QAAA,MAAM,UAAU,GAAiB,OAAO,CAAC,KAAK;QAE9C,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;AACrC,YAAA,OAAO,IAAI;;AAGb,QAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC,QAAQ,CAAC;AAE3E,QAAA,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;AACjC,YAAA,OAAO,IAAI;;AAGb,QAAA,OAAO,EAAE,kCAAkC,EAAE,IAAI,EAAE;AACrD,KAAC;AACH;MASa,wBAAwB,CAAA;AAgBnC,IAAA,WAAA,CACU,WAAwB,EACxB,IAAY,EACZ,YAAmC,EAAA;QAFnC,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAY,CAAA,YAAA,GAAZ,YAAY;QAjBtB,IAAwB,CAAA,wBAAA,GAA2C,EAAE;AACrE,QAAA,IAAA,CAAA,kBAAkB,GAA2C;AAC3D,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,eAAe,EAAE;SAClB;QAED,IAAc,CAAA,cAAA,GAAa,EAAE;AACrB,QAAA,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AAC,EAAA,QAAA,EAAA,29FAAA,EAAA;;0BAiBpC;yCAdM,MAAM,EAAA,CAAA;sBAAd;;;AE5BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-kpi.mjs","sources":["../../widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.ts","../../widgets/implementations/kpi/kpi-widget-config/kpi-widget-config.component.html","../../widgets/implementations/kpi/kpi-widget-view/kpi-widget-view.component.ts","../../widgets/implementations/kpi/kpi-widget-view/kpi-widget-view.component.html","../../widgets/implementations/kpi/c8y-ngx-components-widgets-implementations-kpi.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n FormBuilder,\n NgForm,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard';\nimport {\n DatapointAttributesFormConfig,\n DatapointSelectorModalOptions,\n DatapointSelectorModule,\n KPIDetails\n} from '@c8y/ngx-components/datapoint-selector';\nimport { Observable } from 'rxjs';\nimport { KpiWidgetConfig } from '../kpi-widget.model';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\n\nexport function exactlyASingleDatapointActive(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const datapoints: KPIDetails[] = control.value;\n\n if (!datapoints || !datapoints.length) {\n return null;\n }\n\n const activeDatapoints = datapoints.filter(datapoint => datapoint.__active);\n\n if (activeDatapoints.length === 1) {\n return null;\n }\n\n return { exactlyOneDatapointNeedsToBeActive: true };\n };\n}\n\n@Component({\n selector: 'c8y-kpi-widget-config',\n templateUrl: './kpi-widget-config.component.html',\n standalone: true,\n imports: [CoreModule, DatapointSelectorModule, IconSelectorModule, PopoverModule],\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }]\n})\nexport class KpiWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: KpiWidgetConfig;\n datapointSelectionConfig: Partial<DatapointSelectorModalOptions> = {};\n defaultFormOptions: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true\n };\n formGroup: ReturnType<KpiWidgetConfigComponent['createForm']>;\n availableIcons: string[] = [];\n private limits = {\n fontSizeMax: 72,\n fontSizeMin: 18,\n numberOfDecimalPlacesMax: 10,\n numberOfDecimalPlacesMin: 0\n } as const;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private widgetConfig: WidgetConfigComponent\n ) {}\n\n onBeforeSave(config?: KpiWidgetConfig): boolean | Promise<boolean> | Observable<boolean> {\n if (this.formGroup.valid) {\n Object.assign(config, this.formGroup.value);\n return true;\n }\n return false;\n }\n\n async ngOnInit() {\n if (this.widgetConfig.context?.id) {\n this.datapointSelectionConfig.contextAsset = this.widgetConfig?.context;\n }\n this.initForm();\n if (this.config?.datapoints) {\n this.formGroup.patchValue({ datapoints: this.config.datapoints });\n }\n }\n\n private initForm(): void {\n this.formGroup = this.createForm();\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private createForm() {\n return this.formBuilder.group({\n numberOfDecimalPlaces: [\n 2,\n [\n Validators.required,\n Validators.min(this.limits.numberOfDecimalPlacesMin),\n Validators.max(this.limits.numberOfDecimalPlacesMax)\n ]\n ],\n showTimestamp: [true, []],\n showTrend: [true, []],\n showIcon: [true, []],\n icon: ['water', [Validators.required, Validators.minLength(1)]],\n fontSize: [\n 36,\n [\n Validators.required,\n Validators.min(this.limits.fontSizeMin),\n Validators.max(this.limits.fontSizeMax)\n ]\n ],\n datapoints: this.formBuilder.control(new Array<KPIDetails>(), [\n Validators.required,\n Validators.minLength(1),\n exactlyASingleDatapointActive()\n ])\n });\n }\n}\n","<form [formGroup]=\"formGroup\">\n <c8y-datapoint-selection-list\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n name=\"datapoints\"\n class=\"bg-inherit no-card-context\"\n ></c8y-datapoint-selection-list>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Layout' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-md-3\">\n <div class=\"form-group form-group-sm d-flex a-i-center gap-8 m-b-0 m-t-8\">\n <label translate>Icon</label>\n <c8y-icon-selector-wrapper name=\"icon\" formControlName=\"icon\"></c8y-icon-selector-wrapper>\n </div>\n </div>\n <div class=\"col-md-9\">\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <label [title]=\"'Font size of measurement value (px)' | translate\" translate>\n Font size of measurement value (px)\n </label>\n <input\n class=\"form-control\"\n formControlName=\"fontSize\"\n name=\"fontSize\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 36 }\"\n />\n <c8y-messages\n [show]=\"formGroup.controls?.fontSize?.touched && formGroup?.controls?.fontSize?.errors\"\n ></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Display' | translate }}</legend>\n <div class=\"d-flex gap-16 flex-wrap\">\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show timestamp' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTimestamp\" name=\"showTimestamp\" />\n <span></span>\n <span translate>Show timestamp</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showIcon\" name=\"showIcon\" />\n <span></span>\n <span translate>Show icon</span>\n </label>\n </c8y-form-group>\n\n <c8y-form-group class=\"m-b-8\">\n <label [title]=\"'Show trend icon' | translate\" class=\"c8y-checkbox\">\n <input type=\"checkbox\" formControlName=\"showTrend\" name=\"showTrend\" />\n <span></span>\n <span translate>Show trend icon</span>\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{\n 'Indicates the trend between the last two measurement values.' | translate\n }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </c8y-form-group>\n </div>\n </fieldset>\n\n <fieldset class=\"c8y-fieldset\">\n <legend translate>\n Number of decimal places\n </legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n formControlName=\"numberOfDecimalPlaces\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n\n","import { Component, Input, OnInit, Optional } from '@angular/core';\nimport { CoreModule, MeasurementRealtimeService } from '@c8y/ngx-components';\nimport { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { combineLatest, NEVER, Observable } from 'rxjs';\nimport { distinctUntilChanged, filter, map, pairwise, startWith, tap } from 'rxjs/operators';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { KpiWidgetConfig } from '../kpi-widget.model';\n\ninterface MeasurementValue {\n unit?: string;\n value: number;\n date: string;\n}\n\nenum ColorClass {\n danger = 'text-danger',\n warning = 'text-warning',\n unknown = ''\n}\n\n@Component({\n selector: 'c8y-kpi-widget-view',\n templateUrl: './kpi-widget-view.component.html',\n standalone: true,\n imports: [CoreModule],\n providers: [MeasurementRealtimeService]\n})\nexport class KpiWidgetViewComponent implements OnInit {\n @Input() config: KpiWidgetConfig = { datapoints: [] };\n state$: Observable<{\n latestMeasurement: MeasurementValue;\n previousValue: MeasurementValue | undefined;\n trend: string;\n unit: string;\n colorClass: ColorClass;\n }> = NEVER;\n\n // used to differentiate between loading state and empty state\n noDataInitiallyInDB = false;\n\n constructor(\n private measurementRealtime: MeasurementRealtimeService,\n @Optional() private dashboard: ContextDashboardComponent\n ) {}\n\n async ngOnInit() {\n const datapoints = this.config.datapoints || [];\n const datapoint: KPIDetails = datapoints.find(tmp => tmp?.__active);\n if (!datapoint) {\n return;\n }\n\n this.state$ = this.setupObservable(datapoint);\n }\n\n setupObservable(datapoint: KPIDetails): Observable<{\n latestMeasurement: MeasurementValue;\n previousValue: MeasurementValue | undefined;\n trend: string;\n unit: string;\n colorClass: ColorClass;\n }> {\n this.assignContextFromContextDashboard(datapoint);\n const latestMeasurement$ = this.getLatestMeasurement$(datapoint);\n const lastTwoValues$ = this.getLastTwoValuesOfObservable$(latestMeasurement$);\n\n const previousValue$ = lastTwoValues$.pipe(\n map(([previousVal]) => previousVal),\n startWith(undefined as MeasurementValue | undefined)\n );\n\n const unit$ = latestMeasurement$.pipe(\n map(latestMeasurementValue => datapoint.unit || latestMeasurementValue.unit || ''),\n startWith(''),\n distinctUntilChanged()\n );\n\n return combineLatest([\n latestMeasurement$,\n previousValue$,\n this.getTrendOfLatestMeasurements$(lastTwoValues$),\n unit$,\n this.getColorClass$(latestMeasurement$, datapoint)\n ]).pipe(\n map(([latestMeasurement, previousValue, trend, unit, colorClass]) => {\n return {\n latestMeasurement,\n previousValue,\n trend,\n unit,\n colorClass\n };\n })\n );\n }\n\n private getLatestMeasurement$(datapoint: KPIDetails): Observable<MeasurementValue> {\n return this.measurementRealtime\n .latestValueOfSpecificMeasurement$(\n datapoint.fragment,\n datapoint.series,\n datapoint.__target,\n // we only need the last two values in case we want to show a trend\n this.config.showTrend ? 2 : 1,\n // null will be emitted in case no measurement was found initially\n true\n )\n .pipe(\n tap(measurement => {\n if (!measurement) {\n this.noDataInitiallyInDB = true;\n }\n }),\n filter(measurement => !!measurement),\n map(measurement => {\n return {\n unit: measurement[datapoint.fragment][datapoint.series].unit,\n value: measurement[datapoint.fragment][datapoint.series].value,\n date: measurement.time as string\n };\n })\n );\n }\n\n private getColorClass$(\n measurementAndDatapointCombination$: Observable<MeasurementValue>,\n datapoint: KPIDetails\n ): Observable<ColorClass> {\n return measurementAndDatapointCombination$.pipe(\n map(latestMeasurementValue => {\n if (this.inRangeOf(datapoint, latestMeasurementValue.value, 'redRangeMin', 'redRangeMax')) {\n return ColorClass.danger;\n }\n\n if (\n this.inRangeOf(\n datapoint,\n latestMeasurementValue.value,\n 'yellowRangeMin',\n 'yellowRangeMax'\n )\n ) {\n return ColorClass.warning;\n }\n\n return ColorClass.unknown;\n }),\n startWith(ColorClass.unknown),\n distinctUntilChanged()\n );\n }\n\n private getLastTwoValuesOfObservable$<T>(input$: Observable<T>): Observable<T[]> {\n return input$.pipe(pairwise());\n }\n\n private getTrendOfLatestMeasurements$(latestMeasurement$: Observable<MeasurementValue[]>) {\n return latestMeasurement$.pipe(\n map(res => {\n if (res.length === 2) {\n const oldValue = res[0].value;\n const newValue = res[1].value;\n if (oldValue < newValue) {\n return '45deg';\n }\n if (oldValue > newValue) {\n return '135deg';\n }\n }\n return '90deg';\n }),\n startWith('90deg'),\n distinctUntilChanged()\n );\n }\n\n private inRangeOf(\n datapoint: KPIDetails,\n measurementValue: number,\n minAttribute: string,\n maxAttribute: string\n ): boolean {\n if (\n typeof datapoint[minAttribute] === 'number' &&\n typeof datapoint[maxAttribute] === 'number'\n ) {\n if (\n measurementValue >= datapoint[minAttribute] &&\n measurementValue < datapoint[maxAttribute]\n ) {\n return true;\n }\n }\n return false;\n }\n\n private assignContextFromContextDashboard(datapoint: KPIDetails) {\n if (!this.dashboard?.isDeviceTypeDashboard) {\n return;\n }\n const context = this.dashboard?.context;\n if (context?.id) {\n const { name, id } = context;\n datapoint.__target = { name, id };\n }\n }\n}\n","<div\n class=\"kpi-widget__container d-flex d-col fit-h fit-w a-i-center j-c-center\"\n *ngIf=\"state$ | async as lastState; else noMeasurementFound\"\n>\n <div class=\"d-flex a-i-center j-c-center fit-w\">\n <div\n class=\"m-r-16 flex-no-shrink text-muted\"\n [ngClass]=\"lastState.colorClass\"\n *ngIf=\"config.icon && config.showIcon\"\n >\n <i class=\"icon-32\" [c8yIcon]=\"config.icon\"></i>\n </div>\n <div class=\"text-truncate\">\n <span\n class=\"text-truncate text-medium\"\n [ngClass]=\"lastState.colorClass\"\n [ngStyle]=\"{ 'font-size': (config.fontSize || '36') + 'px' }\"\n title=\"{{\n lastState.colorClass === 'text-danger'\n ? ('Within red range:' | translate)\n : lastState.colorClass === 'text-warning'\n ? ('Within yellow range:' | translate)\n : ''\n }} {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }} {{ lastState.unit || '' }}\"\n >\n {{\n lastState.latestMeasurement.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')\n }}\n <small class=\"text-regular\">{{ lastState.unit || '' }}</small>\n </span>\n </div>\n <div\n class=\"dot dot-info dot-30 m-l-16 flex-no-shrink\"\n *ngIf=\"config?.showTrend && lastState.previousValue as previousValue\"\n >\n <i\n class=\"icon-20\"\n [title]=\"\n ('Previous value' | translate) +\n ': ' +\n (previousValue.value\n | number\n : '1.' +\n (config.numberOfDecimalPlaces || '0') +\n '-' +\n (config.numberOfDecimalPlaces || '0')) +\n ' (' +\n (previousValue.date | date: 'medium') +\n ')'\n \"\n c8yIcon=\"arrow-dotted-up\"\n [ngStyle]=\"{ transform: 'rotate(' + lastState.trend + ')' }\"\n ></i>\n </div>\n </div>\n <div class=\"d-flex j-c-center\">\n <p *ngIf=\"config?.showTimestamp\" class=\"icon-flex text-center text-muted small\">\n <i c8yIcon=\"calendar\"></i>\n {{ lastState.latestMeasurement.date | date: 'medium' }}\n </p>\n </div>\n</div>\n\n<ng-template #noMeasurementFound>\n <div class=\"d-flex fit-h fit-w j-c-center a-i-center\">\n <c8y-ui-empty-state\n *ngIf=\"noDataInitiallyInDB\"\n class=\"fit-w\"\n [icon]=\"'line-chart'\"\n [title]=\"'No measurement to display.' | translate\"\n [subtitle]=\"'Waiting for measurements to be created.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <c8y-loading *ngIf=\"!noDataInitiallyInDB\"></c8y-loading>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;SAuBgB,6BAA6B,GAAA;IAC3C,OAAO,CAAC,OAAwB,KAA6B;AAC3D,QAAA,MAAM,UAAU,GAAiB,OAAO,CAAC,KAAK;QAE9C,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;AACrC,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC,QAAQ,CAAC;AAE3E,QAAA,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;AACjC,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,OAAO,EAAE,kCAAkC,EAAE,IAAI,EAAE;AACrD,IAAA,CAAC;AACH;MASa,wBAAwB,CAAA;AAgBnC,IAAA,WAAA,CACU,WAAwB,EACxB,IAAY,EACZ,YAAmC,EAAA;QAFnC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,YAAY,GAAZ,YAAY;QAjBtB,IAAA,CAAA,wBAAwB,GAA2C,EAAE;AACrE,QAAA,IAAA,CAAA,kBAAkB,GAA2C;AAC3D,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,eAAe,EAAE;SAClB;QAED,IAAA,CAAA,cAAc,GAAa,EAAE;AACrB,QAAA,IAAA,CAAA,MAAM,GAAG;AACf,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,wBAAwB,EAAE,EAAE;AA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AA,SAAA,EACV,CAAC,0BAA0B,CAAC,EAAA,QAAA,EAAA,29FAAA,EAAA;;0BAiBpC;yCAdM,MAAM,EAAA,CAAA;sBAAd;;;AE5BH;;AAEG;;;;"}
|
|
@@ -67,10 +67,10 @@ class LinearGaugeWidgetConfigComponent {
|
|
|
67
67
|
datapoints: this.formBuilder.control(new Array(), [Validators.required])
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
71
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LinearGaugeWidgetConfigComponent, deps: [{ token: i1.FormBuilder }, { token: i1.NgForm }, { token: i2.WidgetConfigComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LinearGaugeWidgetConfigComponent, isStandalone: true, selector: "c8y-linear-gauge-widget-config", inputs: { config: "config" }, ngImport: i0, template: "<form\n class=\"no-card-context\"\n [formGroup]=\"formGroup\"\n>\n <c8y-datapoint-selection-list\n class=\"bg-inherit d-block\"\n name=\"datapoints\"\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n ></c8y-datapoint-selection-list>\n <fieldset class=\"c8y-fieldset\">\n <legend translate>Decimal places</legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n name=\"fractionSize\"\n type=\"number\"\n formControlName=\"fractionSize\"\n step=\"1\"\n />\n <c8y-messages [show]=\"formGroup.controls.fractionSize.errors\"></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n", dependencies: [{ kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i3.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i1$1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i1$1.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i1$1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }] }); }
|
|
72
72
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LinearGaugeWidgetConfigComponent, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
75
|
args: [{ selector: 'c8y-linear-gauge-widget-config', standalone: true, imports: [DatapointSelectorModule, ReactiveFormsModule, CoreModule], template: "<form\n class=\"no-card-context\"\n [formGroup]=\"formGroup\"\n>\n <c8y-datapoint-selection-list\n class=\"bg-inherit d-block\"\n name=\"datapoints\"\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n ></c8y-datapoint-selection-list>\n <fieldset class=\"c8y-fieldset\">\n <legend translate>Decimal places</legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n name=\"fractionSize\"\n type=\"number\"\n formControlName=\"fractionSize\"\n step=\"1\"\n />\n <c8y-messages [show]=\"formGroup.controls.fractionSize.errors\"></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n" }]
|
|
76
76
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i1.NgForm }, { type: i2.WidgetConfigComponent }], propDecorators: { config: [{
|
|
@@ -182,10 +182,10 @@ class LinearGaugeWidgetViewComponent {
|
|
|
182
182
|
text: msg
|
|
183
183
|
}));
|
|
184
184
|
}
|
|
185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LinearGaugeWidgetViewComponent, deps: [{ token: i1$1.MeasurementRealtimeService }, { token: i2.ContextDashboardComponent, optional: true }, { token: i1$1.DynamicComponentComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: LinearGaugeWidgetViewComponent, isStandalone: true, selector: "c8y-linear-gauge-widget-view", inputs: { config: "config" }, providers: [MeasurementRealtimeService], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"p-l-16 p-r-16 p-b-16 fit-h d-flex d-col flex-center\"\n *ngIf=\"rangeDisplayConfig$ | async as rangeDisplayConfig\"\n [ngClass]=\"{\n 'p-t-40 j-c-center': rangeDisplayConfig.orientation === 'horizontal',\n }\"\n>\n <c8y-range-display [config]=\"rangeDisplayConfig\" [ngClass]=\"{'flex-grow': rangeDisplayConfig.orientation == 'vertical'}\"></c8y-range-display>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: RangeDisplayModule }, { kind: "component", type: i1$1.RangeDisplayComponent, selector: "c8y-range-display", inputs: ["config", "display"] }] }); }
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LinearGaugeWidgetViewComponent, decorators: [{
|
|
189
189
|
type: Component,
|
|
190
190
|
args: [{ selector: 'c8y-linear-gauge-widget-view', providers: [MeasurementRealtimeService], standalone: true, imports: [NgIf, NgClass, AsyncPipe, RangeDisplayModule], template: "<div\n class=\"p-l-16 p-r-16 p-b-16 fit-h d-flex d-col flex-center\"\n *ngIf=\"rangeDisplayConfig$ | async as rangeDisplayConfig\"\n [ngClass]=\"{\n 'p-t-40 j-c-center': rangeDisplayConfig.orientation === 'horizontal',\n }\"\n>\n <c8y-range-display [config]=\"rangeDisplayConfig\" [ngClass]=\"{'flex-grow': rangeDisplayConfig.orientation == 'vertical'}\"></c8y-range-display>\n</div>\n" }]
|
|
191
191
|
}], ctorParameters: () => [{ type: i1$1.MeasurementRealtimeService }, { type: i2.ContextDashboardComponent, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-linear-gauge.mjs","sources":["../../widgets/implementations/linear-gauge/linear-gauge-widget-config/linear-gauge-widget-config.component.ts","../../widgets/implementations/linear-gauge/linear-gauge-widget-config/linear-gauge-widget-config.component.html","../../widgets/implementations/linear-gauge/linear-gauge-widget-view/linear-gauge-widget-view.component.ts","../../widgets/implementations/linear-gauge/linear-gauge-widget-view/linear-gauge-widget-view.component.html","../../widgets/implementations/linear-gauge/c8y-ngx-components-widgets-implementations-linear-gauge.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { FormBuilder, NgForm, ReactiveFormsModule, Validators } from '@angular/forms';\nimport type {\n DatapointAttributesFormConfig,\n DatapointSelectorModalOptions,\n KPIDetails\n} from '@c8y/ngx-components/datapoint-selector';\nimport { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard';\nimport { CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport { DatapointSelectorModule } from '@c8y/ngx-components/datapoint-selector';\nimport { LinearGaugeWidgetConfig } from '../linear-gauge.model';\n\n@Component({\n selector: 'c8y-linear-gauge-widget-config',\n templateUrl: './linear-gauge-widget-config.component.html',\n standalone: true,\n imports: [DatapointSelectorModule, ReactiveFormsModule, CoreModule]\n})\nexport class LinearGaugeWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: LinearGaugeWidgetConfig;\n formGroup: ReturnType<LinearGaugeWidgetConfigComponent['createForm']>;\n datapointSelectionConfig: Partial<DatapointSelectorModalOptions> = {};\n defaultFormOptions: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n };\n private limits = {\n numberOfDecimalPlacesMax: 10,\n numberOfDecimalPlacesMin: 0\n } as const;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private widgetConfig: WidgetConfigComponent\n ) {}\n\n onBeforeSave(\n config?: LinearGaugeWidgetConfigComponent['config']\n ): boolean | Promise<boolean> | Observable<boolean> {\n if (this.formGroup.valid) {\n Object.assign(config, this.formGroup.value);\n return true;\n }\n return false;\n }\n\n ngOnInit() {\n if (this.widgetConfig.context?.id) {\n this.datapointSelectionConfig.contextAsset = this.widgetConfig?.context;\n }\n this.initForm();\n if (this.config?.datapoints) {\n this.formGroup.patchValue({ datapoints: this.config.datapoints });\n }\n if (typeof this.config?.fractionSize === 'number' && !Number.isNaN(this.config?.fractionSize)) {\n this.formGroup.patchValue({ fractionSize: this.config.fractionSize });\n }\n }\n\n private initForm(): void {\n this.formGroup = this.createForm();\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private createForm() {\n return this.formBuilder.group({\n fractionSize: [\n 2,\n [\n Validators.required,\n Validators.min(this.limits.numberOfDecimalPlacesMin),\n Validators.max(this.limits.numberOfDecimalPlacesMax)\n ]\n ],\n datapoints: this.formBuilder.control(new Array<KPIDetails>(), [Validators.required])\n });\n }\n}\n","<form\n class=\"no-card-context\"\n [formGroup]=\"formGroup\"\n>\n <c8y-datapoint-selection-list\n class=\"bg-inherit d-block\"\n name=\"datapoints\"\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n ></c8y-datapoint-selection-list>\n <fieldset class=\"c8y-fieldset\">\n <legend translate>Decimal places</legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n name=\"fractionSize\"\n type=\"number\"\n formControlName=\"fractionSize\"\n step=\"1\"\n />\n <c8y-messages [show]=\"formGroup.controls.fractionSize.errors\"></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n","import { Component, Input, OnChanges, Optional } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged, filter, map, shareReplay, switchMap } from 'rxjs/operators';\nimport {\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentComponent,\n MeasurementRealtimeService,\n RangeDisplay,\n RangeDisplayModule,\n gettext\n} from '@c8y/ngx-components';\nimport type { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { IMeasurementValue } from '@c8y/client';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { LinearGaugeWidgetConfig } from '../linear-gauge.model';\n\n@Component({\n selector: 'c8y-linear-gauge-widget-view',\n templateUrl: './linear-gauge-widget-view.component.html',\n providers: [MeasurementRealtimeService],\n standalone: true,\n imports: [NgIf, NgClass, AsyncPipe, RangeDisplayModule]\n})\nexport class LinearGaugeWidgetViewComponent implements OnChanges, DynamicComponent {\n @Input() config: LinearGaugeWidgetConfig;\n\n rangeDisplayConfig$: Observable<RangeDisplay>;\n alerts: DynamicComponentAlertAggregator;\n private activeDatapoint$ = new BehaviorSubject<KPIDetails>(null);\n\n constructor(\n private measurementRealtime: MeasurementRealtimeService,\n @Optional() private dashboard: ContextDashboardComponent,\n @Optional() private dynamicComponent?: DynamicComponentComponent\n ) {\n const activeDatapoint = this.activeDatapoint$.pipe(\n filter(dp => !!dp),\n map(dp => this.assignContextFromContextDashboard(dp)),\n distinctUntilChanged()\n );\n this.rangeDisplayConfig$ = activeDatapoint.pipe(\n switchMap(dp => this.getRangeDisplayConfig$(dp)),\n shareReplay({ refCount: true, bufferSize: 1 })\n );\n this.rangeDisplayConfig$\n .pipe(\n map(data => this.getErrorType(data)),\n distinctUntilChanged<ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>>(),\n takeUntilDestroyed<ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>>()\n )\n .subscribe(inRange => this.updateAlertStatus(inRange));\n }\n\n ngOnChanges(): void {\n const activeDp = this.config.datapoints.find(dp => dp.__active);\n this.activeDatapoint$.next(activeDp);\n }\n\n private getRangeDisplayConfig$(dp: KPIDetails): Observable<RangeDisplay> {\n return this.measurementRealtime\n .latestValueOfSpecificMeasurement$(dp.fragment, dp.series, dp.__target, 1, true)\n .pipe(\n map(m => {\n if (!m) {\n return null;\n }\n const date = m.time;\n const measurement: IMeasurementValue = m[dp.fragment][dp.series];\n return {\n current: measurement.value,\n fractionSize: this.config.fractionSize || 1,\n max: this.ensureIsNumber(dp.max),\n min: this.ensureIsNumber(dp.min),\n redRangeMax: this.ensureIsNumber(dp.redRangeMax),\n redRangeMin: this.ensureIsNumber(dp.redRangeMin),\n target: this.ensureIsNumber(dp.target),\n time: date,\n yellowRangeMax: this.ensureIsNumber(dp.yellowRangeMax),\n yellowRangeMin: this.ensureIsNumber(dp.yellowRangeMin),\n unit: measurement.unit || dp.unit,\n orientation: this.getOrientation()\n };\n })\n );\n }\n\n private ensureIsNumber(value: number | string): number {\n if (typeof value === 'number') {\n return value;\n }\n\n if (typeof value === 'string' && value.trim().length > 0) {\n const parsedValue = parseFloat(value);\n if (!isNaN(parsedValue)) {\n return parsedValue;\n }\n }\n return undefined;\n }\n\n private assignContextFromContextDashboard(datapoint: KPIDetails): KPIDetails {\n if (!this.dashboard?.isDeviceTypeDashboard) {\n return datapoint;\n }\n const context = this.dashboard?.context;\n if (context?.id) {\n const { name, id } = context;\n datapoint.__target = { name, id };\n }\n return datapoint;\n }\n\n private getOrientation(): 'horizontal' | 'vertical' {\n return this.dynamicComponent?.componentId === defaultWidgetIds.LINEAR_GAUGE\n ? 'horizontal'\n : 'vertical';\n }\n\n private getErrorType(data: RangeDisplay | null) {\n if (!data) {\n return 'NOT_FOUND';\n }\n\n if (!this.isInRange(data)) {\n return 'OUT_OF_RANGE';\n }\n\n return 'NONE';\n }\n\n private isInRange(data: RangeDisplay): boolean {\n if (!Number.isFinite(data.max) || !Number.isFinite(data.min)) {\n // default range is 0-100\n return data.current <= 100 && data.current >= 0;\n }\n return data.current <= data.max && data.current >= data.min;\n }\n\n private updateAlertStatus(\n errorType: ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>\n ): void {\n if (!this.alerts) {\n return;\n }\n this.alerts.clear();\n let msg: string;\n if (errorType === 'OUT_OF_RANGE') {\n msg = gettext('Current value out of defined range.');\n } else if (errorType === 'NOT_FOUND') {\n msg = gettext('Configured data point not available on the selected device.');\n }\n\n if (!msg) {\n return;\n }\n\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text: msg\n })\n );\n }\n}\n","<div\n class=\"p-l-16 p-r-16 p-b-16 fit-h d-flex d-col flex-center\"\n *ngIf=\"rangeDisplayConfig$ | async as rangeDisplayConfig\"\n [ngClass]=\"{\n 'p-t-40 j-c-center': rangeDisplayConfig.orientation === 'horizontal',\n }\"\n>\n <c8y-range-display [config]=\"rangeDisplayConfig\" [ngClass]=\"{'flex-grow': rangeDisplayConfig.orientation == 'vertical'}\"></c8y-range-display>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","i1"],"mappings":";;;;;;;;;;;;;;;MAmBa,gCAAgC,CAAA;AAe3C,IAAA,WAAA,CACU,WAAwB,EACxB,IAAY,EACZ,YAAmC,EAAA;QAFnC,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAY,CAAA,YAAA,GAAZ,YAAY;QAftB,IAAwB,CAAA,wBAAA,GAA2C,EAAE;AACrE,QAAA,IAAA,CAAA,kBAAkB,GAA2C;AAC3D,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,eAAe,EAAE,IAAI;AACrB,YAAA,SAAS,EAAE,IAAI;AACf,YAAA,UAAU,EAAE;SACb;AACO,QAAA,IAAA,CAAA,MAA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A,qBAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAE3C,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,EAE7B,SAAA,EAAA,CAAC,0BAA0B,CAAC,cAC3B,IAAI,EAAA,OAAA,EACP,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,kBAAkB,CAAC,EAAA,QAAA,EAAA,2YAAA,EAAA;;0BAWpD;;0BACA;yCATM,MAAM,EAAA,CAAA;sBAAd;;;AE7BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-linear-gauge.mjs","sources":["../../widgets/implementations/linear-gauge/linear-gauge-widget-config/linear-gauge-widget-config.component.ts","../../widgets/implementations/linear-gauge/linear-gauge-widget-config/linear-gauge-widget-config.component.html","../../widgets/implementations/linear-gauge/linear-gauge-widget-view/linear-gauge-widget-view.component.ts","../../widgets/implementations/linear-gauge/linear-gauge-widget-view/linear-gauge-widget-view.component.html","../../widgets/implementations/linear-gauge/c8y-ngx-components-widgets-implementations-linear-gauge.ts"],"sourcesContent":["import { Component, Input, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { FormBuilder, NgForm, ReactiveFormsModule, Validators } from '@angular/forms';\nimport type {\n DatapointAttributesFormConfig,\n DatapointSelectorModalOptions,\n KPIDetails\n} from '@c8y/ngx-components/datapoint-selector';\nimport { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard';\nimport { CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport { DatapointSelectorModule } from '@c8y/ngx-components/datapoint-selector';\nimport { LinearGaugeWidgetConfig } from '../linear-gauge.model';\n\n@Component({\n selector: 'c8y-linear-gauge-widget-config',\n templateUrl: './linear-gauge-widget-config.component.html',\n standalone: true,\n imports: [DatapointSelectorModule, ReactiveFormsModule, CoreModule]\n})\nexport class LinearGaugeWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: LinearGaugeWidgetConfig;\n formGroup: ReturnType<LinearGaugeWidgetConfigComponent['createForm']>;\n datapointSelectionConfig: Partial<DatapointSelectorModalOptions> = {};\n defaultFormOptions: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n };\n private limits = {\n numberOfDecimalPlacesMax: 10,\n numberOfDecimalPlacesMin: 0\n } as const;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private widgetConfig: WidgetConfigComponent\n ) {}\n\n onBeforeSave(\n config?: LinearGaugeWidgetConfigComponent['config']\n ): boolean | Promise<boolean> | Observable<boolean> {\n if (this.formGroup.valid) {\n Object.assign(config, this.formGroup.value);\n return true;\n }\n return false;\n }\n\n ngOnInit() {\n if (this.widgetConfig.context?.id) {\n this.datapointSelectionConfig.contextAsset = this.widgetConfig?.context;\n }\n this.initForm();\n if (this.config?.datapoints) {\n this.formGroup.patchValue({ datapoints: this.config.datapoints });\n }\n if (typeof this.config?.fractionSize === 'number' && !Number.isNaN(this.config?.fractionSize)) {\n this.formGroup.patchValue({ fractionSize: this.config.fractionSize });\n }\n }\n\n private initForm(): void {\n this.formGroup = this.createForm();\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private createForm() {\n return this.formBuilder.group({\n fractionSize: [\n 2,\n [\n Validators.required,\n Validators.min(this.limits.numberOfDecimalPlacesMin),\n Validators.max(this.limits.numberOfDecimalPlacesMax)\n ]\n ],\n datapoints: this.formBuilder.control(new Array<KPIDetails>(), [Validators.required])\n });\n }\n}\n","<form\n class=\"no-card-context\"\n [formGroup]=\"formGroup\"\n>\n <c8y-datapoint-selection-list\n class=\"bg-inherit d-block\"\n name=\"datapoints\"\n [defaultFormOptions]=\"defaultFormOptions\"\n [config]=\"datapointSelectionConfig\"\n [minActiveCount]=\"1\"\n [maxActiveCount]=\"1\"\n formControlName=\"datapoints\"\n ></c8y-datapoint-selection-list>\n <fieldset class=\"c8y-fieldset\">\n <legend translate>Decimal places</legend>\n <c8y-form-group class=\"form-group-sm m-b-16\">\n <input\n class=\"form-control\"\n name=\"fractionSize\"\n type=\"number\"\n formControlName=\"fractionSize\"\n step=\"1\"\n />\n <c8y-messages [show]=\"formGroup.controls.fractionSize.errors\"></c8y-messages>\n </c8y-form-group>\n </fieldset>\n</form>\n","import { Component, Input, OnChanges, Optional } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport { distinctUntilChanged, filter, map, shareReplay, switchMap } from 'rxjs/operators';\nimport {\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentComponent,\n MeasurementRealtimeService,\n RangeDisplay,\n RangeDisplayModule,\n gettext\n} from '@c8y/ngx-components';\nimport type { KPIDetails } from '@c8y/ngx-components/datapoint-selector';\nimport { IMeasurementValue } from '@c8y/client';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { AsyncPipe, NgClass, NgIf } from '@angular/common';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { LinearGaugeWidgetConfig } from '../linear-gauge.model';\n\n@Component({\n selector: 'c8y-linear-gauge-widget-view',\n templateUrl: './linear-gauge-widget-view.component.html',\n providers: [MeasurementRealtimeService],\n standalone: true,\n imports: [NgIf, NgClass, AsyncPipe, RangeDisplayModule]\n})\nexport class LinearGaugeWidgetViewComponent implements OnChanges, DynamicComponent {\n @Input() config: LinearGaugeWidgetConfig;\n\n rangeDisplayConfig$: Observable<RangeDisplay>;\n alerts: DynamicComponentAlertAggregator;\n private activeDatapoint$ = new BehaviorSubject<KPIDetails>(null);\n\n constructor(\n private measurementRealtime: MeasurementRealtimeService,\n @Optional() private dashboard: ContextDashboardComponent,\n @Optional() private dynamicComponent?: DynamicComponentComponent\n ) {\n const activeDatapoint = this.activeDatapoint$.pipe(\n filter(dp => !!dp),\n map(dp => this.assignContextFromContextDashboard(dp)),\n distinctUntilChanged()\n );\n this.rangeDisplayConfig$ = activeDatapoint.pipe(\n switchMap(dp => this.getRangeDisplayConfig$(dp)),\n shareReplay({ refCount: true, bufferSize: 1 })\n );\n this.rangeDisplayConfig$\n .pipe(\n map(data => this.getErrorType(data)),\n distinctUntilChanged<ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>>(),\n takeUntilDestroyed<ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>>()\n )\n .subscribe(inRange => this.updateAlertStatus(inRange));\n }\n\n ngOnChanges(): void {\n const activeDp = this.config.datapoints.find(dp => dp.__active);\n this.activeDatapoint$.next(activeDp);\n }\n\n private getRangeDisplayConfig$(dp: KPIDetails): Observable<RangeDisplay> {\n return this.measurementRealtime\n .latestValueOfSpecificMeasurement$(dp.fragment, dp.series, dp.__target, 1, true)\n .pipe(\n map(m => {\n if (!m) {\n return null;\n }\n const date = m.time;\n const measurement: IMeasurementValue = m[dp.fragment][dp.series];\n return {\n current: measurement.value,\n fractionSize: this.config.fractionSize || 1,\n max: this.ensureIsNumber(dp.max),\n min: this.ensureIsNumber(dp.min),\n redRangeMax: this.ensureIsNumber(dp.redRangeMax),\n redRangeMin: this.ensureIsNumber(dp.redRangeMin),\n target: this.ensureIsNumber(dp.target),\n time: date,\n yellowRangeMax: this.ensureIsNumber(dp.yellowRangeMax),\n yellowRangeMin: this.ensureIsNumber(dp.yellowRangeMin),\n unit: measurement.unit || dp.unit,\n orientation: this.getOrientation()\n };\n })\n );\n }\n\n private ensureIsNumber(value: number | string): number {\n if (typeof value === 'number') {\n return value;\n }\n\n if (typeof value === 'string' && value.trim().length > 0) {\n const parsedValue = parseFloat(value);\n if (!isNaN(parsedValue)) {\n return parsedValue;\n }\n }\n return undefined;\n }\n\n private assignContextFromContextDashboard(datapoint: KPIDetails): KPIDetails {\n if (!this.dashboard?.isDeviceTypeDashboard) {\n return datapoint;\n }\n const context = this.dashboard?.context;\n if (context?.id) {\n const { name, id } = context;\n datapoint.__target = { name, id };\n }\n return datapoint;\n }\n\n private getOrientation(): 'horizontal' | 'vertical' {\n return this.dynamicComponent?.componentId === defaultWidgetIds.LINEAR_GAUGE\n ? 'horizontal'\n : 'vertical';\n }\n\n private getErrorType(data: RangeDisplay | null) {\n if (!data) {\n return 'NOT_FOUND';\n }\n\n if (!this.isInRange(data)) {\n return 'OUT_OF_RANGE';\n }\n\n return 'NONE';\n }\n\n private isInRange(data: RangeDisplay): boolean {\n if (!Number.isFinite(data.max) || !Number.isFinite(data.min)) {\n // default range is 0-100\n return data.current <= 100 && data.current >= 0;\n }\n return data.current <= data.max && data.current >= data.min;\n }\n\n private updateAlertStatus(\n errorType: ReturnType<LinearGaugeWidgetViewComponent['getErrorType']>\n ): void {\n if (!this.alerts) {\n return;\n }\n this.alerts.clear();\n let msg: string;\n if (errorType === 'OUT_OF_RANGE') {\n msg = gettext('Current value out of defined range.');\n } else if (errorType === 'NOT_FOUND') {\n msg = gettext('Configured data point not available on the selected device.');\n }\n\n if (!msg) {\n return;\n }\n\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text: msg\n })\n );\n }\n}\n","<div\n class=\"p-l-16 p-r-16 p-b-16 fit-h d-flex d-col flex-center\"\n *ngIf=\"rangeDisplayConfig$ | async as rangeDisplayConfig\"\n [ngClass]=\"{\n 'p-t-40 j-c-center': rangeDisplayConfig.orientation === 'horizontal',\n }\"\n>\n <c8y-range-display [config]=\"rangeDisplayConfig\" [ngClass]=\"{'flex-grow': rangeDisplayConfig.orientation == 'vertical'}\"></c8y-range-display>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","i1"],"mappings":";;;;;;;;;;;;;;;MAmBa,gCAAgC,CAAA;AAe3C,IAAA,WAAA,CACU,WAAwB,EACxB,IAAY,EACZ,YAAmC,EAAA;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EAAA,EAAA,QAAA,ECxBzC,2YASA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDiBY,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,SAAS,6CAAE,kBAAkB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,qBAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAE3C,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAP1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,EAAA,SAAA,EAE7B,CAAC,0BAA0B,CAAC,cAC3B,IAAI,EAAA,OAAA,EACP,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,kBAAkB,CAAC,EAAA,QAAA,EAAA,2YAAA,EAAA;;0BAWpD;;0BACA;yCATM,MAAM,EAAA,CAAA;sBAAd;;;AE7BH;;AAEG;;;;"}
|
|
@@ -38,10 +38,10 @@ class MapEventInfoComponent {
|
|
|
38
38
|
this.event = data[0];
|
|
39
39
|
this.loading = false;
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapEventInfoComponent, deps: [{ token: i1.EventService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MapEventInfoComponent, isStandalone: true, selector: "c8y-map-event-info", inputs: { asset: "asset" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"text-muted text-10 p-t-4 p-b-4\">\n <span translate>Last position update:</span>\n <br />\n <c8y-loading *ngIf=\"loading\"></c8y-loading>\n <ng-container *ngIf=\"!loading\">\n <i *ngIf=\"!event\" translate>No information found</i>\n <ng-container *ngIf=\"event\">\n <i>{{ event.time | c8yDate }}</i>\n <ng-content></ng-content>\n </ng-container>\n </ng-container>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }] }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapEventInfoComponent, decorators: [{
|
|
45
45
|
type: Component,
|
|
46
46
|
args: [{ selector: 'c8y-map-event-info', standalone: true, imports: [CommonModule, C8yTranslateDirective, DatePipe, LoadingComponent], template: "<div class=\"text-muted text-10 p-t-4 p-b-4\">\n <span translate>Last position update:</span>\n <br />\n <c8y-loading *ngIf=\"loading\"></c8y-loading>\n <ng-container *ngIf=\"!loading\">\n <i *ngIf=\"!event\" translate>No information found</i>\n <ng-container *ngIf=\"event\">\n <i>{{ event.time | c8yDate }}</i>\n <ng-content></ng-content>\n </ng-container>\n </ng-container>\n</div>\n" }]
|
|
47
47
|
}], ctorParameters: () => [{ type: i1.EventService }], propDecorators: { asset: [{
|
|
@@ -244,10 +244,10 @@ class MapWidgetConfigComponent {
|
|
|
244
244
|
});
|
|
245
245
|
this.previewMap.addMarkerToMap(this.centerIcon);
|
|
246
246
|
}
|
|
247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
248
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MapWidgetConfigComponent, isStandalone: true, selector: "c8y-map-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMap", first: true, predicate: MapComponent, descendants: true }, { propertyName: "previewMapSet", first: true, predicate: ["previewMap"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Map' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-xs-3\">\n <c8y-form-group class=\"m-b-16 text-center form-group-sm\">\n <label translate>Marker icon</label>\n <c8y-icon-selector-wrapper\n [canRemoveIcon]=\"true\"\n [selectedIcon]=\"formConfig.icon\"\n (onSelect)=\"selectIcon($event)\"\n ></c8y-icon-selector-wrapper>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-9\">\n <div class=\"form-group form-group-sm\">\n <label translate>Zoom level</label>\n <c8y-range\n class=\"label-bottom\"\n name=\"zoomLevel\"\n #range\n [(ngModel)]=\"formConfig.zoomLevel\"\n (change)=\"zoomLevelChanged()\"\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n </div>\n <c8y-form-group class=\"form-group-sm\">\n <label translate>Center bound</label>\n <div class=\"input-group input-group-sm\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lat.`latitude`' | translate }}\"\n name=\"centerLat\"\n type=\"number\"\n required\n [(ngModel)]=\"formConfig.center[0]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-90\"\n max=\"90\"\n step=\"0.1\"\n />\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lng.`longitude`' | translate }}\"\n name=\"centerLng\"\n type=\"number\"\n required\n min=\"-180\"\n max=\"180\"\n [(ngModel)]=\"formConfig.center[1]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-180\"\n max=\"180\"\n step=\"0.1\"\n />\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use your location' | translate\"\n [tooltip]=\"'Use your location' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"useOwnPosition()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location-arrow\"\n ></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use selected asset location' | translate\"\n [tooltip]=\"'Use selected asset location' | translate\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"canAutoCenter; else fitToBoundsButton\"\n (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n\n <ng-template #fitToBoundsButton>\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Fit to assets bounds' | translate\"\n [tooltip]=\"'Fit to assets bounds' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"fitToBounds()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"waypoint-map\"\n ></i>\n </button>\n </ng-template>\n <c8y-messages [helpMessage]=\"'Drag the map to the desired position' | translate\"></c8y-messages>\n </c8y-form-group>\n</fieldset>\n\n<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Auto refresh' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n id=\"selectExample\"\n name=\"refreshSelection\"\n [(ngModel)]=\"refreshOption\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Only refreshing on interaction' | translate\"\n value=\"none\"\n translate\n >\n No automatic refresh\n </option>\n <option\n [title]=\"'Refreshing after the given interval and on interaction' | translate\"\n value=\"interval\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use refresh interval\n </option>\n <option\n [title]=\"\n 'Refreshing after the given interval and on interaction, synchronized globally'\n | translate\n \"\n value=\"dashboard-auto-refresh-context\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use global refresh interval\n </option>\n <option\n [title]=\"'Live updating on each position change' | translate\"\n value=\"realtime\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Realtime\n </option>\n <option\n [title]=\"'Bind widget to dashboard realtime context' | translate\"\n value=\"dashboard-realtime-context\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Dashboard realtime context\n </option>\n </select>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-6\">\n <div class=\"form-group form-group-sm m-b-16\">\n <c8y-range\n class=\"label-bottom\"\n name=\"refreshInterval\"\n #intervalRange\n *ngIf=\"refreshOption === 'interval'\"\n [(ngModel)]=\"formConfig.refreshInterval\"\n >\n <ng-template #c8yRangeValue>\n <div>\n <span\n [translateParams]=\"{ intervalInSeconds: intervalRange.value * 0.001 }\"\n translate\n ngNonBindable\n >\n {{ intervalInSeconds }}s\n </span>\n </div>\n </ng-template>\n <input\n type=\"range\"\n min=\"5000\"\n max=\"100000\"\n step=\"1000\"\n />\n </c8y-range>\n </div>\n <label\n class=\"c8y-switch c8y-switch--inline\"\n *ngIf=\"refreshOption === 'realtime' || refreshOption === 'dashboard-realtime-context'\"\n >\n <input\n name=\"follow\"\n type=\"checkbox\"\n [(ngModel)]=\"formConfig.follow\"\n />\n <span></span>\n <span\n class=\"text-12\"\n translate\n >\n Follow selected\n </span>\n </label>\n </div>\n </div>\n</fieldset>\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n <c8y-map\n *ngIf=\"config.mapConfig\"\n [assets]=\"assets\"\n [config]=\"config.mapConfig\"\n (onMove)=\"onPreviewMapMove($event)\"\n (onZoomStart)=\"onPreviewZoomStart()\"\n (onZoomEnd)=\"onPreviewZoomEnd($event)\"\n (onInit)=\"previewMapInit($event)\"\n ></c8y-map>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i6.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2.MinValidationDirective, selector: "[min]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidationDirective, selector: "[max]", inputs: ["max"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2.RangeDirective, selector: "input[type=\"range\"]" }, { kind: "component", type: i2.RangeComponent, selector: "c8y-range", inputs: ["valueDisplayMode"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i7.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i4.MapComponent, selector: "c8y-map", inputs: ["config", "assets", "polyline$", "polylineOptions"], outputs: ["onRealtimeUpdate", "onMove", "onMoveEnd", "onZoomStart", "onZoomEnd", "onMap", "onInit"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapWidgetConfigComponent, deps: [{ token: i4.MapService }, { token: i2.AlertService }, { token: i3.TranslateService }, { token: MAP_DEFAULT_CONFIG }, { token: i4$1.WidgetConfigService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MapWidgetConfigComponent, isStandalone: true, selector: "c8y-map-widget-config", inputs: { config: "config" }, viewQueries: [{ propertyName: "previewMap", first: true, predicate: MapComponent, descendants: true }, { propertyName: "previewMapSet", first: true, predicate: ["previewMap"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Map' | translate }}</legend>\n <div class=\"row tight-grid\">\n <div class=\"col-xs-3\">\n <c8y-form-group class=\"m-b-16 text-center form-group-sm\">\n <label translate>Marker icon</label>\n <c8y-icon-selector-wrapper\n [canRemoveIcon]=\"true\"\n [selectedIcon]=\"formConfig.icon\"\n (onSelect)=\"selectIcon($event)\"\n ></c8y-icon-selector-wrapper>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-9\">\n <div class=\"form-group form-group-sm\">\n <label translate>Zoom level</label>\n <c8y-range\n class=\"label-bottom\"\n name=\"zoomLevel\"\n #range\n [(ngModel)]=\"formConfig.zoomLevel\"\n (change)=\"zoomLevelChanged()\"\n >\n <input\n type=\"range\"\n min=\"0\"\n max=\"18\"\n step=\"1\"\n />\n </c8y-range>\n </div>\n </div>\n </div>\n <c8y-form-group class=\"form-group-sm\">\n <label translate>Center bound</label>\n <div class=\"input-group input-group-sm\">\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lat.`latitude`' | translate }}\"\n name=\"centerLat\"\n type=\"number\"\n required\n [(ngModel)]=\"formConfig.center[0]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-90\"\n max=\"90\"\n step=\"0.1\"\n />\n <input\n class=\"form-control\"\n placeholder=\"{{ 'lng.`longitude`' | translate }}\"\n name=\"centerLng\"\n type=\"number\"\n required\n min=\"-180\"\n max=\"180\"\n [(ngModel)]=\"formConfig.center[1]\"\n (change)=\"changeCenter()\"\n (keydown.enter)=\"changeCenterOnEnterKey($event)\"\n min=\"-180\"\n max=\"180\"\n step=\"0.1\"\n />\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use your location' | translate\"\n [tooltip]=\"'Use your location' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"useOwnPosition()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location-arrow\"\n ></i>\n </button>\n </div>\n <div class=\"input-group-btn\">\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Use selected asset location' | translate\"\n [tooltip]=\"'Use selected asset location' | translate\"\n placement=\"top\"\n container=\"body\"\n *ngIf=\"canAutoCenter; else fitToBoundsButton\"\n (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n </div>\n </div>\n\n <ng-template #fitToBoundsButton>\n <button\n class=\"btn btn-default\"\n [attr.aria-label]=\"'Fit to assets bounds' | translate\"\n [tooltip]=\"'Fit to assets bounds' | translate\"\n placement=\"top\"\n container=\"body\"\n (click)=\"fitToBounds()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"waypoint-map\"\n ></i>\n </button>\n </ng-template>\n <c8y-messages [helpMessage]=\"'Drag the map to the desired position' | translate\"></c8y-messages>\n </c8y-form-group>\n</fieldset>\n\n<fieldset\n class=\"c8y-fieldset\"\n *ngIf=\"formConfig\"\n>\n <legend>{{ 'Auto refresh' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-6\">\n <c8y-form-group class=\"m-b-16 form-group-sm\">\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n title=\"{{ 'Refresh options`options for refreshing a view`' | translate }}\"\n id=\"selectExample\"\n name=\"refreshSelection\"\n [(ngModel)]=\"refreshOption\"\n (change)=\"updateRefreshOption()\"\n >\n <option\n [title]=\"'Only refreshing on interaction' | translate\"\n value=\"none\"\n translate\n >\n No automatic refresh\n </option>\n <option\n [title]=\"'Refreshing after the given interval and on interaction' | translate\"\n value=\"interval\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use refresh interval\n </option>\n <option\n [title]=\"\n 'Refreshing after the given interval and on interaction, synchronized globally'\n | translate\n \"\n value=\"dashboard-auto-refresh-context\"\n *ngIf=\"!isPositionedDevice\"\n translate\n >\n Use global refresh interval\n </option>\n <option\n [title]=\"'Live updating on each position change' | translate\"\n value=\"realtime\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Realtime\n </option>\n <option\n [title]=\"'Bind widget to dashboard realtime context' | translate\"\n value=\"dashboard-realtime-context\"\n *ngIf=\"isPositionedDevice\"\n translate\n >\n Dashboard realtime context\n </option>\n </select>\n </div>\n </c8y-form-group>\n </div>\n <div class=\"col-xs-6\">\n <div class=\"form-group form-group-sm m-b-16\">\n <c8y-range\n class=\"label-bottom\"\n name=\"refreshInterval\"\n #intervalRange\n *ngIf=\"refreshOption === 'interval'\"\n [(ngModel)]=\"formConfig.refreshInterval\"\n >\n <ng-template #c8yRangeValue>\n <div>\n <span\n [translateParams]=\"{ intervalInSeconds: intervalRange.value * 0.001 }\"\n translate\n ngNonBindable\n >\n {{ intervalInSeconds }}s\n </span>\n </div>\n </ng-template>\n <input\n type=\"range\"\n min=\"5000\"\n max=\"100000\"\n step=\"1000\"\n />\n </c8y-range>\n </div>\n <label\n class=\"c8y-switch c8y-switch--inline\"\n *ngIf=\"refreshOption === 'realtime' || refreshOption === 'dashboard-realtime-context'\"\n >\n <input\n name=\"follow\"\n type=\"checkbox\"\n [(ngModel)]=\"formConfig.follow\"\n />\n <span></span>\n <span\n class=\"text-12\"\n translate\n >\n Follow selected\n </span>\n </label>\n </div>\n </div>\n</fieldset>\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n <c8y-map\n *ngIf=\"config.mapConfig\"\n [assets]=\"assets\"\n [config]=\"config.mapConfig\"\n (onMove)=\"onPreviewMapMove($event)\"\n (onZoomStart)=\"onPreviewZoomStart()\"\n (onZoomEnd)=\"onPreviewZoomEnd($event)\"\n (onInit)=\"previewMapInit($event)\"\n ></c8y-map>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i6.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i2.MinValidationDirective, selector: "[min]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidationDirective, selector: "[max]", inputs: ["max"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i2.RangeDirective, selector: "input[type=\"range\"]" }, { kind: "component", type: i2.RangeComponent, selector: "c8y-range", inputs: ["valueDisplayMode"] }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "component", type: i7.IconSelectorWrapperComponent, selector: "c8y-icon-selector-wrapper", inputs: ["canRemoveIcon", "selectedIcon", "iconSize"], outputs: ["onSelect"] }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i4.MapComponent, selector: "c8y-map", inputs: ["config", "assets", "polyline$", "polylineOptions"], outputs: ["onRealtimeUpdate", "onMove", "onMoveEnd", "onZoomStart", "onZoomEnd", "onMap", "onInit"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i8.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
249
249
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapWidgetConfigComponent, decorators: [{
|
|
251
251
|
type: Component,
|
|
252
252
|
args: [{ selector: 'c8y-map-widget-config', viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], standalone: true, imports: [
|
|
253
253
|
CommonModule,
|
|
@@ -379,10 +379,10 @@ class MapWidgetComponent {
|
|
|
379
379
|
updateMapConfigRealtime() {
|
|
380
380
|
this.mapConfig.realtime = this.config.realtime || false;
|
|
381
381
|
}
|
|
382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
383
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapWidgetComponent, deps: [{ token: i2.DashboardChildComponent }, { token: i4$1.ContextDashboardComponent, optional: true }, { token: i1.InventoryService }, { token: i4.MapService }, { token: i2.WidgetsDashboardComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
383
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: MapWidgetComponent, isStandalone: true, selector: "c8y-map-widget", inputs: { config: "config" }, viewQueries: [{ propertyName: "clusterMap", first: true, predicate: ClusterMapComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [buttonsConfig]=\"\n config.widgetInstanceGlobalTimeContext\n ? { realtime: { show: false }, fitToBounds: { show: true } }\n : { fitToBounds: { show: true } }\n \"\n [assets]=\"assets\"\n></c8y-map-status>\n<c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n>\n <div\n class=\"map-marker\"\n *c8yMapPopup=\"let context\"\n >\n <a\n class=\"text-truncate deviceLink text-12\"\n routerLink=\"{{ context | assetLink }}\"\n >\n <strong>{{ context.name }}</strong>\n </a>\n <c8y-map-event-info [asset]=\"context\">\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Activate realtime on this asset and follow it if it moves' | translate\"\n type=\"button\"\n (click)=\"startFollow(context)\"\n *ngIf=\"!mapConfig.follow\"\n translate\n >\n Follow\n </button>\n <button\n class=\"btn btn-default btn-xs btn-block m-t-8\"\n [title]=\"'Stop following this asset.' | translate\"\n type=\"button\"\n (click)=\"stopFollow()\"\n *ngIf=\"mapConfig.follow\"\n translate\n >\n Unfollow\n </button>\n </c8y-map-event-info>\n </div>\n</c8y-cluster-map>\n", dependencies: [{ kind: "component", type: MapEventInfoComponent, selector: "c8y-map-event-info", inputs: ["asset"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: i2.AssetLinkPipe, name: "assetLink" }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: IconSelectorModule }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i4.MapStatusComponent, selector: "c8y-map-status", inputs: ["config", "assets", "clusterMap", "buttonsConfig"], outputs: ["configChange", "onUnfollow", "fitAssetsToBounds"] }, { kind: "component", type: i4.ClusterMapComponent, selector: "c8y-cluster-map", inputs: ["config", "rootNode", "asset", "showClusterColor"], outputs: ["mapChange"] }, { kind: "directive", type: i4.MapPopupDirective, selector: "[c8yMapPopup]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
384
384
|
}
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MapWidgetComponent, decorators: [{
|
|
386
386
|
type: Component,
|
|
387
387
|
args: [{ selector: 'c8y-map-widget', standalone: true, imports: [
|
|
388
388
|
MapEventInfoComponent,
|