@c8y/ngx-components 1023.4.6 → 1023.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/c8y-ngx-components-actility-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-actility-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs +7 -7
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +9 -9
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +12 -12
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +3 -3
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +76 -76
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-api.mjs +7 -7
- package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
- package/fesm2022/c8y-ngx-components-app-logs.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +39 -39
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs} +13 -13
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs.map → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +114 -114
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +15 -15
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +36 -36
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +13 -13
- package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
- package/fesm2022/c8y-ngx-components-child-devices.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs +68 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs +44 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +6 -6
- package/fesm2022/c8y-ngx-components-connectivity.mjs +53 -53
- package/fesm2022/c8y-ngx-components-connectivity.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs} +10 -10
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +102 -102
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs} +16 -16
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +6 -6
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
- package/fesm2022/c8y-ngx-components-data-broker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +24 -24
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +7 -7
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +40 -40
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +33 -33
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +43 -43
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
- package/fesm2022/c8y-ngx-components-device-protocols.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
- package/fesm2022/c8y-ngx-components-device-shell.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +30 -30
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
- package/fesm2022/c8y-ngx-components-exports-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
- package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
- package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +118 -118
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +19 -19
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
- package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-location.mjs +28 -28
- package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +19 -19
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
- package/fesm2022/c8y-ngx-components-messaging-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +19 -19
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device.mjs +10 -10
- package/fesm2022/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
- package/fesm2022/c8y-ngx-components-reports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-search.mjs +19 -19
- package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services.mjs +29 -29
- package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +9 -9
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets.mjs +6 -6
- package/fesm2022/c8y-ngx-components-static-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +60 -60
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +41 -41
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +6 -6
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +12 -12
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +12 -12
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-translation-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +62 -43
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
- package/fesm2022/c8y-ngx-components-user-roles.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +19 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +27 -27
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +7 -7
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +24 -24
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs +5 -2
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1329 -1325
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/upgrade/index.d.ts +1 -0
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/widget-providers/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs +0 -68
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs +0 -44
|
@@ -44,10 +44,10 @@ class MapEventInfoComponent {
|
|
|
44
44
|
this.event = data[0];
|
|
45
45
|
this.loading = false;
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapEventInfoComponent, deps: [{ token: i1.EventService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapEventInfoComponent, decorators: [{
|
|
51
51
|
type: Component,
|
|
52
52
|
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" }]
|
|
53
53
|
}], ctorParameters: () => [{ type: i1.EventService }], propDecorators: { asset: [{
|
|
@@ -235,10 +235,10 @@ class MapWidgetConfigComponent {
|
|
|
235
235
|
});
|
|
236
236
|
this.previewMap.addMarkerToMap(this.centerIcon);
|
|
237
237
|
}
|
|
238
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
239
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.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 }); }
|
|
239
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: "@if (formConfig) {\n <fieldset class=\"c8y-fieldset\">\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 @if (canAutoCenter()) {\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 (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n } @else {\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 }\n </div>\n </div>\n\n <c8y-messages\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n\n @if (isPositionedDevice()) {\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Follow' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-12\">\n <div class=\"form-group form-group-sm m-b-16\">\n <label class=\"c8y-switch c8y-switch--inline\">\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 </div>\n </fieldset>\n }\n}\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n @if (config.mapConfig) {\n <c8y-map\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 }\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.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: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i5.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: "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: i6$1.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: i7.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }] }); }
|
|
240
240
|
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapWidgetConfigComponent, decorators: [{
|
|
242
242
|
type: Component,
|
|
243
243
|
args: [{ selector: 'c8y-map-widget-config', viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], standalone: true, imports: [
|
|
244
244
|
CommonModule,
|
|
@@ -405,10 +405,10 @@ class MapWidgetComponent {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
409
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.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 }, { token: i2.DynamicComponentService }, { token: i5$1.WidgetConfigMigrationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: MapWidgetComponent, isStandalone: true, selector: "c8y-map-widget", inputs: { config: "config" }, viewQueries: [{ propertyName: "clusterMap", first: true, predicate: ClusterMapComponent, descendants: true }], ngImport: i0, template: "@if (mapConfig) {\n <c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [assets]=\"assets\"\n [buttonsConfig]=\"{\n autoRefresh: { show: false },\n refresh: { show: false },\n realtime: { show: false },\n fitToBounds: { show: true }\n }\"\n >\n <c8y-global-context-widget-wrapper\n *ngIf=\"controls\"\n [widgetControls]=\"controls\"\n [config]=\"config\"\n [isLoading]=\"mapWidget.isLoading$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n </c8y-map-status>\n\n <c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n [asset]=\"assets\"\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}\n", dependencies: [{ kind: "component", type: MapEventInfoComponent, selector: "c8y-map-event-info", inputs: ["asset"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule$1 }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { 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"] }, { kind: "component", type: GlobalContextWidgetWrapperComponent, selector: "c8y-global-context-widget-wrapper", inputs: ["isLoading", "displayMode", "widgetControls", "controlLinks", "dashboardChildForLegacy", "config"], outputs: ["globalContextChange"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i2.AssetLinkPipe, name: "assetLink" }] }); }
|
|
410
410
|
}
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MapWidgetComponent, decorators: [{
|
|
412
412
|
type: Component,
|
|
413
413
|
args: [{ selector: 'c8y-map-widget', standalone: true, imports: [
|
|
414
414
|
MapEventInfoComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-map.mjs","sources":["../../widgets/implementations/map/map-event-info.component.ts","../../widgets/implementations/map/map-event-info.component.html","../../widgets/implementations/map/map-widget-config.component.ts","../../widgets/implementations/map/map-widget-config.component.html","../../widgets/implementations/map/map-widget.component.ts","../../widgets/implementations/map/map-widget.component.html","../../widgets/implementations/map/c8y-ngx-components-widgets-implementations-map.ts"],"sourcesContent":["import { CommonModule as NgCommonModule } from '@angular/common';\nimport { Component, Input, OnChanges } from '@angular/core';\nimport { EventService, IEvent, IManagedObject } from '@c8y/client';\nimport { C8yTranslateDirective, DatePipe, LoadingComponent } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-map-event-info',\n templateUrl: './map-event-info.component.html',\n standalone: true,\n imports: [NgCommonModule, C8yTranslateDirective, DatePipe, LoadingComponent]\n})\nexport class MapEventInfoComponent implements OnChanges {\n @Input()\n asset: IManagedObject;\n\n loading = true;\n\n event: IEvent;\n\n constructor(private eventService: EventService) {}\n\n async ngOnChanges() {\n this.loading = true;\n const { data } = await this.eventService.list({\n dateFrom: '1970-01-01',\n dateTo: new Date(Date.now()).toISOString(),\n fragmentType: 'c8y_Position',\n pageSize: 1,\n source: this.asset.id\n });\n this.event = data[0];\n this.loading = false;\n }\n}\n","<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","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n Component,\n computed,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport {\n ControlContainer,\n NgForm,\n FormsModule as NgFormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport type { IIdentified } from '@c8y/client';\nimport { AlertService, C8yTranslatePipe, CommonModule, FormsModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { GLOBAL_CONTEXT_DISPLAY_MODE, RefreshOption } from '@c8y/ngx-components/global-context';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { isUndefined } from 'lodash';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { combineLatestWith, take, takeUntil } from 'rxjs/operators';\nimport { MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget-config',\n templateUrl: './map-widget-config.component.html',\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],\n standalone: true,\n imports: [\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n TooltipModule,\n ReactiveFormsModule,\n PopoverModule,\n C8yTranslatePipe\n ]\n})\nexport class MapWidgetConfigComponent implements OnInit, OnChanges, OnDestroy {\n @Input() config: MapWidgetConfig = {\n mapConfig: undefined\n };\n formConfig: ClusterMapConfig;\n\n readonly device = signal<IIdentified | undefined>(undefined);\n readonly assets = signal<PositionManagedObject[]>([]);\n\n readonly canAutoCenter = computed(() => {\n const assetsList = this.assets();\n const deviceValue = this.device();\n\n const isSingleAsset = assetsList?.length === 1;\n const idMatchesDevice = deviceValue?.id === assetsList[0]?.id;\n\n if (isSingleAsset && idMatchesDevice) {\n return this.mapService.hasPosition(assetsList[0]);\n }\n return false;\n });\n\n readonly isPositionedDevice = computed(() => {\n const assetsList = this.assets();\n const deviceValue = this.device();\n\n const isSingleAsset = assetsList?.length === 1;\n const idMatchesDevice = deviceValue?.id === assetsList[0]?.id;\n\n if (isSingleAsset && idMatchesDevice) {\n return this.mapService.isPositionedDevice(assetsList[0]);\n }\n return false;\n });\n\n refreshOption: RefreshOption = 'live';\n\n private destroyed$ = new Subject<void>();\n private leaflet: typeof L;\n private centerIcon: L.Marker;\n // JS precision for floating point number is 15 for 64-bit and because of this provided to leaflet are recalculated\n // to values almost-like provided (e.g. 0 is recalculated to 1.46e-14; for 180 it's 180.00000000000003).\n // To ensure provided value has no floating point error, number needs to be rounded to fixed point 13.\n private readonly FIXED_POINT_DIGITS = 13;\n\n @ViewChild(MapComponent)\n previewMap: MapComponent;\n\n @ViewChild('previewMap')\n set previewMapSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n\n constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>,\n private widgetConfigService: WidgetConfigService\n ) {}\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n }\n\n ngOnInit() {\n this.device.set(this.config.device);\n\n this.defaultMapConfig.pipe(takeUntil(this.destroyed$)).subscribe(defaultConfig => {\n this.formConfig = {\n zoomLevel: defaultConfig.zoomLevel,\n center: defaultConfig.center\n };\n this.initForm();\n });\n }\n\n async initForm() {\n if (!this.config.mapConfig) {\n this.config.mapConfig = this.formConfig;\n }\n\n this.formConfig = {\n ...this.formConfig,\n ...this.config.mapConfig,\n disablePan: false,\n displayMode: this.config.mapConfig?.displayMode ?? GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD,\n // Keep both in sync\n realtime:\n this.config.mapConfig?.isRealtimeEnabled ?? this.config.mapConfig?.realtime ?? false,\n refreshOption: this.config.mapConfig?.refreshOption,\n refreshInterval: this.config.mapConfig?.refreshInterval ?? 30_000\n };\n\n await this.updateAsset();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes.config) {\n this.device.set(this.config.device);\n\n if (\n changes.config.currentValue !== changes.config.previousValue &&\n !changes.config.firstChange\n ) {\n await this.updateAsset();\n }\n }\n }\n\n previewMapInit(leaflet: typeof L): void {\n this.leaflet = leaflet;\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n onBeforeSave() {\n this.config.mapConfig = this.formConfig;\n return true;\n }\n\n zoomLevelChanged() {\n this.config.mapConfig = {\n ...this.config.mapConfig,\n zoomLevel: this.formConfig.zoomLevel\n };\n }\n\n changeCenter() {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n this.config.mapConfig = { ...this.formConfig, center: [...this.formConfig.center] };\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n changeCenterOnEnterKey(event: KeyboardEvent): void {\n event.preventDefault();\n this.changeCenter();\n }\n\n onPreviewZoomStart() {\n this.centerIcon.remove();\n }\n\n onPreviewZoomEnd(event: L.LeafletEvent) {\n this.formConfig.zoomLevel = Math.floor(event.target.getZoom());\n }\n\n onPreviewMapMove(event: L.LeafletEvent) {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n const { lat, lng } = event.target.getCenter();\n const fixedLat = +lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +lng.toFixed(this.FIXED_POINT_DIGITS);\n this.addCenterIcon(fixedLat, fixedLng);\n this.formConfig.center = [fixedLat, fixedLng];\n }\n\n useOwnPosition() {\n navigator.geolocation.getCurrentPosition(({ coords }) => {\n this.formConfig.center = [coords.latitude, coords.longitude];\n this.changeCenter();\n });\n }\n\n centerToAsset() {\n this.formConfig.center = [\n this.config.device.c8y_Position.lat,\n this.config.device.c8y_Position.lng\n ];\n this.changeCenter();\n }\n\n async fitToBounds() {\n const assetsList = this.assets();\n if (!assetsList?.length || !this.previewMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(assetsList);\n\n // map.fitBounds causes zoom and move events, so get new center and zoom level only when these events are finished\n fromEvent<L.LeafletEvent>(this.previewMap.map, 'moveend')\n .pipe(combineLatestWith(fromEvent<L.LeafletEvent>(this.previewMap.map, 'zoomend')), take(1))\n .subscribe(() => {\n const center = this.previewMap.map.getCenter();\n const zoom = this.previewMap.map.getZoom();\n\n const fixedLat = +center.lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +center.lng.toFixed(this.FIXED_POINT_DIGITS);\n this.formConfig.center = [fixedLat, fixedLng];\n this.formConfig.zoomLevel = Math.floor(zoom);\n\n this.changeCenter();\n });\n\n this.previewMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n selectIcon(icon: string) {\n this.formConfig.icon = icon;\n this.config.mapConfig.icon = icon;\n this.previewMap.refreshMarkers();\n }\n\n private async updateAsset() {\n const { data, paging } = await this.mapService.getAllPositionMOs(this.device());\n const onlyAssetsWithLatLng = data.filter(\n asset => !isUndefined(asset.c8y_Position?.lat) && !isUndefined(asset.c8y_Position?.lng)\n );\n\n this.assets.set(onlyAssetsWithLatLng);\n\n if (paging.totalPages > 1) {\n this.alertService.danger(\n gettext(\n 'It might be possible that assets are not shown in the preview, as the current selection has more than 500 assets and the preview only supports a maximum of 500 assets.'\n )\n );\n }\n }\n\n private addCenterIcon(lat: number, lng: number) {\n const titleText = this.translateService.instant(gettext('Map center'));\n const icon = this.leaflet.divIcon({\n html: `<i style=\"pointer-events: none\" class=\"c8y-map-marker-icon text-muted dlt-c8y-icon-target icon-2x\" title=\"${titleText}\" />`\n });\n this.centerIcon = this.leaflet.marker([lat, lng], {\n icon\n });\n this.previewMap.addMarkerToMap(this.centerIcon);\n }\n}\n","@if (formConfig) {\n <fieldset class=\"c8y-fieldset\">\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 @if (canAutoCenter()) {\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 (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n } @else {\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 }\n </div>\n </div>\n\n <c8y-messages\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n\n @if (isPositionedDevice()) {\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Follow' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-12\">\n <div class=\"form-group form-group-sm m-b-16\">\n <label class=\"c8y-switch c8y-switch--inline\">\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 </div>\n </fieldset>\n }\n}\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n @if (config.mapConfig) {\n <c8y-map\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 }\n </div>\n</ng-template>\n","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewChild\n} from '@angular/core';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { IIdentified, InventoryService } from '@c8y/client';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentService,\n FormsModule,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n GLOBAL_CONTEXT_DISPLAY_MODE,\n GlobalContextWidgetWrapperComponent,\n WidgetConfigMigrationService,\n WidgetControls\n} from '@c8y/ngx-components/global-context';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapComponent,\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { debounce, merge } from 'lodash-es';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { MapEventInfoComponent } from './map-event-info.component';\nimport { MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget',\n templateUrl: './map-widget.component.html',\n standalone: true,\n imports: [\n MapEventInfoComponent,\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule,\n RouterLink,\n GlobalContextWidgetWrapperComponent\n ]\n})\nexport class MapWidgetComponent implements OnInit, OnDestroy, AfterViewInit, DynamicComponent {\n mapConfig: ClusterMapConfig = { center: [0, 0] };\n rootNode: IIdentified;\n @Input() config: MapWidgetConfig;\n\n @ViewChild(ClusterMapComponent)\n clusterMap: ClusterMapComponent;\n alerts: DynamicComponentAlertAggregator;\n assets: PositionManagedObject[];\n\n private TIMEOUT_ERROR_TEXT = gettext(\n 'The request is taking longer than usual. We apologize for the inconvenience.'\n );\n private SERVER_ERROR_TEXT = gettext('Server error occurred.');\n private savedNode: IIdentified;\n private destroy$ = new Subject<void>();\n private resizeObserver: ResizeObserver;\n controls: WidgetControls;\n\n constructor(\n dashboardChild: DashboardChildComponent,\n @Optional() private dashboardContextComponent: ContextDashboardComponent,\n private inventory: InventoryService,\n private mapService: MapService,\n @Optional() private widgetsDashboardComponent: WidgetsDashboardComponent,\n private dynamicComponentService: DynamicComponentService,\n private widgetConfigMigrationService: WidgetConfigMigrationService\n ) {\n this.listenToWidgetResizeEvent(dashboardChild);\n }\n\n async ngOnInit() {\n this.alerts.setAlertGroupDismissStrategy(\n 'warning',\n DismissAlertStrategy.TEMPORARY_OR_PERMANENT\n );\n\n await this.applyDeviceTypeTarget();\n\n if (this.config.device) {\n this.rootNode = this.config.device;\n }\n this.mapConfig = { ...this.config.mapConfig };\n\n // Check for legacy widget BEFORE updateMapConfigRealtime() overwrites it\n const isLegacyWidgetWithRealtime =\n !this.config.hasOwnProperty('displayMode') && this.mapConfig.realtime;\n\n this.updateMapConfigRealtime();\n this.savedNode = this.rootNode;\n await this.updateAssets();\n\n const migratedConfig = this.widgetConfigMigrationService.migrateWidgetConfig(this.config);\n this.config = merge(this.config, migratedConfig);\n\n // For legacy widgets (with realtime), set displayMode to 'view_and_config' to maintain previous behavior to some degree\n // TODO: adjust widgetConfigMigrationService.migrateWidgetConfig or do nothing.\n // Map widget is a special case since it blocks auto-refresh in the config live mode.\n if (isLegacyWidgetWithRealtime) {\n this.config.displayMode = GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG;\n }\n\n if (this.assets.length > 1) {\n this.mapConfig = {\n ...this.mapConfig,\n follow: false\n };\n }\n\n this.controls =\n (await this.dynamicComponentService.getById(defaultWidgetIds.MAP)).data?.widgetControls || {};\n }\n\n ngAfterViewInit(): void {\n this.subscribeToErrorsOccurred();\n\n if (this.widgetsDashboardComponent) {\n const resizeCallback = debounce(() => {\n // initial size of map is assigned when left drawer is closed, but if it is opened after initialization\n // the map size is not updated, so we need to call invalidateSize so that map use the correct size\n this.clusterMap.map?.invalidateSize(false);\n }, 100);\n this.resizeObserver = new ResizeObserver(resizeCallback);\n\n this.resizeObserver.observe(this.widgetsDashboardComponent.nativeElement);\n }\n }\n\n startFollow(context) {\n if (context.id !== this.rootNode?.id) {\n this.rootNode = context;\n }\n\n this.mapConfig = {\n ...this.mapConfig,\n follow: true\n };\n }\n\n stopFollow() {\n this.mapConfig = {\n ...this.mapConfig,\n follow: false\n };\n this.rootNode = this.savedNode;\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n this.destroy$.next();\n }\n\n async fitToBounds() {\n await this.updateAssets();\n if (this.assets.length === 0 || !this.clusterMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n this.clusterMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n async onGlobalContext(event) {\n const { context } = event;\n\n const isRealtime = this.mapConfig.realtime;\n if (!isRealtime && context.isAutoRefreshEnabled) {\n // If follow is enabled, fetch latest position and center map before reload\n if (this.mapConfig.follow && this.config.device?.c8y_Position) {\n await this.updateAssets();\n if (this.assets?.length === 1) {\n // Update clusterMap's asset so marker can be rendered even if cluster query returns 0 positions\n (this.clusterMap as any).assets = this.assets[0];\n this.clusterMap?.moveToPositionOfMo(this.assets[0]);\n // Prevent cluster subscription from re-centering to same position\n const pos = this.assets[0].c8y_Position;\n (this.clusterMap as any).lastFollowedPosition = { lat: pos.lat, lng: pos.lng };\n }\n }\n\n this.clusterMap?.reload();\n }\n }\n\n private async updateAssets() {\n this.assets = (await this.mapService.getAllPositionMOs(this.config.device)).data;\n }\n\n private listenToWidgetResizeEvent(dashboardChild: DashboardChildComponent) {\n dashboardChild.changeEnd\n .pipe(\n filter(child => child.lastChange === 'resize'),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.clusterMap.reset();\n });\n }\n\n private subscribeToErrorsOccurred() {\n this.clusterMap.errorNotifier\n .pipe(filter(Boolean), takeUntil(this.destroy$))\n .subscribe(error => {\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text:\n error?.name === 'TimeoutError'\n ? this.TIMEOUT_ERROR_TEXT\n : (error?.message ?? this.SERVER_ERROR_TEXT)\n })\n );\n });\n }\n\n private updateMapConfigRealtime() {\n this.mapConfig.realtime = this.config.realtime || false;\n }\n\n private async applyDeviceTypeTarget() {\n const hasDeviceTarget = !!this.config.device; // The map widget supports not selecting any target\n const isDeviceTypeDashboard = !!this.dashboardContextComponent?.dashboard?.deviceType;\n if (isDeviceTypeDashboard && hasDeviceTarget) {\n const context = this.dashboardContextComponent.context;\n if (context?.id) {\n const { id } = context;\n this.config.device = (await this.inventory.detail(id)).data;\n }\n }\n }\n}\n","@if (mapConfig) {\n <c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [assets]=\"assets\"\n [buttonsConfig]=\"{\n autoRefresh: { show: false },\n refresh: { show: false },\n realtime: { show: false },\n fitToBounds: { show: true }\n }\"\n >\n <c8y-global-context-widget-wrapper\n *ngIf=\"controls\"\n [widgetControls]=\"controls\"\n [config]=\"config\"\n [isLoading]=\"mapWidget.isLoading$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n </c8y-map-status>\n\n <c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n [asset]=\"assets\"\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}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCommonModule","i4","NgFormsModule","CommonModule","FormsModule","i6","i1","i2","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWa,qBAAqB,CAAA;AAQhC,IAAA,WAAA,CAAoB,YAA0B,EAAA;QAA1B,IAAA,CAAA,YAAY,GAAZ,YAAY;QAJhC,IAAA,CAAA,OAAO,GAAG,IAAI;IAImC;AAEjD,IAAA,MAAM,WAAW,GAAA;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;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mC,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,yBAAA,EAAA,QAAA,CAAA,EAAA,OAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAE,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAG1B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAlB9B,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EAAA,OAAA,EACP;wBACP,qBAAqB;wBACrBN,YAAc;wBACdE,WAAa;wBACbC,cAAY;wBACZC,aAAW;wBACX,kBAAkB;wBAClB,SAAS;wBACT,aAAa;wBACb,aAAa;wBACb,UAAU;wBACV;AACD,qBAAA,EAAA,QAAA,EAAA,uzDAAA,EAAA;;0BAuBE;;0BAGA;4HArBM,MAAM,EAAA,CAAA;sBAAd;gBAGD,UAAU,EAAA,CAAA;sBADT,SAAS;uBAAC,mBAAmB;;;AEzEhC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-map.mjs","sources":["../../widgets/implementations/map/map-event-info.component.ts","../../widgets/implementations/map/map-event-info.component.html","../../widgets/implementations/map/map-widget-config.component.ts","../../widgets/implementations/map/map-widget-config.component.html","../../widgets/implementations/map/map-widget.component.ts","../../widgets/implementations/map/map-widget.component.html","../../widgets/implementations/map/c8y-ngx-components-widgets-implementations-map.ts"],"sourcesContent":["import { CommonModule as NgCommonModule } from '@angular/common';\nimport { Component, Input, OnChanges } from '@angular/core';\nimport { EventService, IEvent, IManagedObject } from '@c8y/client';\nimport { C8yTranslateDirective, DatePipe, LoadingComponent } from '@c8y/ngx-components';\n\n@Component({\n selector: 'c8y-map-event-info',\n templateUrl: './map-event-info.component.html',\n standalone: true,\n imports: [NgCommonModule, C8yTranslateDirective, DatePipe, LoadingComponent]\n})\nexport class MapEventInfoComponent implements OnChanges {\n @Input()\n asset: IManagedObject;\n\n loading = true;\n\n event: IEvent;\n\n constructor(private eventService: EventService) {}\n\n async ngOnChanges() {\n this.loading = true;\n const { data } = await this.eventService.list({\n dateFrom: '1970-01-01',\n dateTo: new Date(Date.now()).toISOString(),\n fragmentType: 'c8y_Position',\n pageSize: 1,\n source: this.asset.id\n });\n this.event = data[0];\n this.loading = false;\n }\n}\n","<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","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n Component,\n computed,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport {\n ControlContainer,\n NgForm,\n FormsModule as NgFormsModule,\n ReactiveFormsModule\n} from '@angular/forms';\nimport type { IIdentified } from '@c8y/client';\nimport { AlertService, C8yTranslatePipe, CommonModule, FormsModule } from '@c8y/ngx-components';\nimport { WidgetConfigService } from '@c8y/ngx-components/context-dashboard';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { GLOBAL_CONTEXT_DISPLAY_MODE, RefreshOption } from '@c8y/ngx-components/global-context';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MAP_DEFAULT_CONFIG,\n MapComponent,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport type { MapDefaultConfig } from '@c8y/options';\nimport { TranslateService } from '@ngx-translate/core';\nimport type L from 'leaflet';\nimport { isUndefined } from 'lodash';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { combineLatestWith, take, takeUntil } from 'rxjs/operators';\nimport { MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget-config',\n templateUrl: './map-widget-config.component.html',\n viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],\n standalone: true,\n imports: [\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n TooltipModule,\n ReactiveFormsModule,\n PopoverModule,\n C8yTranslatePipe\n ]\n})\nexport class MapWidgetConfigComponent implements OnInit, OnChanges, OnDestroy {\n @Input() config: MapWidgetConfig = {\n mapConfig: undefined\n };\n formConfig: ClusterMapConfig;\n\n readonly device = signal<IIdentified | undefined>(undefined);\n readonly assets = signal<PositionManagedObject[]>([]);\n\n readonly canAutoCenter = computed(() => {\n const assetsList = this.assets();\n const deviceValue = this.device();\n\n const isSingleAsset = assetsList?.length === 1;\n const idMatchesDevice = deviceValue?.id === assetsList[0]?.id;\n\n if (isSingleAsset && idMatchesDevice) {\n return this.mapService.hasPosition(assetsList[0]);\n }\n return false;\n });\n\n readonly isPositionedDevice = computed(() => {\n const assetsList = this.assets();\n const deviceValue = this.device();\n\n const isSingleAsset = assetsList?.length === 1;\n const idMatchesDevice = deviceValue?.id === assetsList[0]?.id;\n\n if (isSingleAsset && idMatchesDevice) {\n return this.mapService.isPositionedDevice(assetsList[0]);\n }\n return false;\n });\n\n refreshOption: RefreshOption = 'live';\n\n private destroyed$ = new Subject<void>();\n private leaflet: typeof L;\n private centerIcon: L.Marker;\n // JS precision for floating point number is 15 for 64-bit and because of this provided to leaflet are recalculated\n // to values almost-like provided (e.g. 0 is recalculated to 1.46e-14; for 180 it's 180.00000000000003).\n // To ensure provided value has no floating point error, number needs to be rounded to fixed point 13.\n private readonly FIXED_POINT_DIGITS = 13;\n\n @ViewChild(MapComponent)\n previewMap: MapComponent;\n\n @ViewChild('previewMap')\n set previewMapSet(template: TemplateRef<any>) {\n if (template) {\n this.widgetConfigService.setPreview(template);\n return;\n }\n this.widgetConfigService.setPreview(null);\n }\n\n constructor(\n private mapService: MapService,\n private alertService: AlertService,\n private translateService: TranslateService,\n @Inject(MAP_DEFAULT_CONFIG) private defaultMapConfig: Observable<MapDefaultConfig>,\n private widgetConfigService: WidgetConfigService\n ) {}\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n }\n\n ngOnInit() {\n this.device.set(this.config.device);\n\n this.defaultMapConfig.pipe(takeUntil(this.destroyed$)).subscribe(defaultConfig => {\n this.formConfig = {\n zoomLevel: defaultConfig.zoomLevel,\n center: defaultConfig.center\n };\n this.initForm();\n });\n }\n\n async initForm() {\n if (!this.config.mapConfig) {\n this.config.mapConfig = this.formConfig;\n }\n\n this.formConfig = {\n ...this.formConfig,\n ...this.config.mapConfig,\n disablePan: false,\n displayMode: this.config.mapConfig?.displayMode ?? GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD,\n // Keep both in sync\n realtime:\n this.config.mapConfig?.isRealtimeEnabled ?? this.config.mapConfig?.realtime ?? false,\n refreshOption: this.config.mapConfig?.refreshOption,\n refreshInterval: this.config.mapConfig?.refreshInterval ?? 30_000\n };\n\n await this.updateAsset();\n }\n\n async ngOnChanges(changes: SimpleChanges) {\n if (changes.config) {\n this.device.set(this.config.device);\n\n if (\n changes.config.currentValue !== changes.config.previousValue &&\n !changes.config.firstChange\n ) {\n await this.updateAsset();\n }\n }\n }\n\n previewMapInit(leaflet: typeof L): void {\n this.leaflet = leaflet;\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n onBeforeSave() {\n this.config.mapConfig = this.formConfig;\n return true;\n }\n\n zoomLevelChanged() {\n this.config.mapConfig = {\n ...this.config.mapConfig,\n zoomLevel: this.formConfig.zoomLevel\n };\n }\n\n changeCenter() {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n this.config.mapConfig = { ...this.formConfig, center: [...this.formConfig.center] };\n this.addCenterIcon(this.formConfig.center[0], this.formConfig.center[1]);\n }\n\n changeCenterOnEnterKey(event: KeyboardEvent): void {\n event.preventDefault();\n this.changeCenter();\n }\n\n onPreviewZoomStart() {\n this.centerIcon.remove();\n }\n\n onPreviewZoomEnd(event: L.LeafletEvent) {\n this.formConfig.zoomLevel = Math.floor(event.target.getZoom());\n }\n\n onPreviewMapMove(event: L.LeafletEvent) {\n if (this.centerIcon) {\n this.centerIcon.remove();\n }\n const { lat, lng } = event.target.getCenter();\n const fixedLat = +lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +lng.toFixed(this.FIXED_POINT_DIGITS);\n this.addCenterIcon(fixedLat, fixedLng);\n this.formConfig.center = [fixedLat, fixedLng];\n }\n\n useOwnPosition() {\n navigator.geolocation.getCurrentPosition(({ coords }) => {\n this.formConfig.center = [coords.latitude, coords.longitude];\n this.changeCenter();\n });\n }\n\n centerToAsset() {\n this.formConfig.center = [\n this.config.device.c8y_Position.lat,\n this.config.device.c8y_Position.lng\n ];\n this.changeCenter();\n }\n\n async fitToBounds() {\n const assetsList = this.assets();\n if (!assetsList?.length || !this.previewMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(assetsList);\n\n // map.fitBounds causes zoom and move events, so get new center and zoom level only when these events are finished\n fromEvent<L.LeafletEvent>(this.previewMap.map, 'moveend')\n .pipe(combineLatestWith(fromEvent<L.LeafletEvent>(this.previewMap.map, 'zoomend')), take(1))\n .subscribe(() => {\n const center = this.previewMap.map.getCenter();\n const zoom = this.previewMap.map.getZoom();\n\n const fixedLat = +center.lat.toFixed(this.FIXED_POINT_DIGITS);\n const fixedLng = +center.lng.toFixed(this.FIXED_POINT_DIGITS);\n this.formConfig.center = [fixedLat, fixedLng];\n this.formConfig.zoomLevel = Math.floor(zoom);\n\n this.changeCenter();\n });\n\n this.previewMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n selectIcon(icon: string) {\n this.formConfig.icon = icon;\n this.config.mapConfig.icon = icon;\n this.previewMap.refreshMarkers();\n }\n\n private async updateAsset() {\n const { data, paging } = await this.mapService.getAllPositionMOs(this.device());\n const onlyAssetsWithLatLng = data.filter(\n asset => !isUndefined(asset.c8y_Position?.lat) && !isUndefined(asset.c8y_Position?.lng)\n );\n\n this.assets.set(onlyAssetsWithLatLng);\n\n if (paging.totalPages > 1) {\n this.alertService.danger(\n gettext(\n 'It might be possible that assets are not shown in the preview, as the current selection has more than 500 assets and the preview only supports a maximum of 500 assets.'\n )\n );\n }\n }\n\n private addCenterIcon(lat: number, lng: number) {\n const titleText = this.translateService.instant(gettext('Map center'));\n const icon = this.leaflet.divIcon({\n html: `<i style=\"pointer-events: none\" class=\"c8y-map-marker-icon text-muted dlt-c8y-icon-target icon-2x\" title=\"${titleText}\" />`\n });\n this.centerIcon = this.leaflet.marker([lat, lng], {\n icon\n });\n this.previewMap.addMarkerToMap(this.centerIcon);\n }\n}\n","@if (formConfig) {\n <fieldset class=\"c8y-fieldset\">\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 @if (canAutoCenter()) {\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 (click)=\"centerToAsset()\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"location\"\n ></i>\n </button>\n } @else {\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 }\n </div>\n </div>\n\n <c8y-messages\n [helpMessage]=\"'Drag the map to the desired position' | translate\"\n ></c8y-messages>\n </c8y-form-group>\n </fieldset>\n\n @if (isPositionedDevice()) {\n <fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Follow' | translate }}</legend>\n <div class=\"row tight-grid d-flex a-i-center\">\n <div class=\"col-xs-12\">\n <div class=\"form-group form-group-sm m-b-16\">\n <label class=\"c8y-switch c8y-switch--inline\">\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 </div>\n </fieldset>\n }\n}\n\n<ng-template #previewMap>\n <div style=\"width: 100%; height: 100%\">\n @if (config.mapConfig) {\n <c8y-map\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 }\n </div>\n</ng-template>\n","import { CommonModule as NgCommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewChild\n} from '@angular/core';\nimport { FormsModule as NgFormsModule } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { IIdentified, InventoryService } from '@c8y/client';\nimport {\n AssetLinkPipe,\n CommonModule,\n DashboardChildComponent,\n DismissAlertStrategy,\n DynamicComponent,\n DynamicComponentAlert,\n DynamicComponentAlertAggregator,\n DynamicComponentService,\n FormsModule,\n WidgetsDashboardComponent\n} from '@c8y/ngx-components';\nimport { ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n GLOBAL_CONTEXT_DISPLAY_MODE,\n GlobalContextWidgetWrapperComponent,\n WidgetConfigMigrationService,\n WidgetControls\n} from '@c8y/ngx-components/global-context';\nimport { IconSelectorModule } from '@c8y/ngx-components/icon-selector';\nimport {\n ClusterMapComponent,\n ClusterMapConfig,\n defaultFitBoundsOptions,\n MapModule,\n MapService,\n PositionManagedObject\n} from '@c8y/ngx-components/map';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { debounce, merge } from 'lodash-es';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { MapEventInfoComponent } from './map-event-info.component';\nimport { MapWidgetConfig } from './map-widget.model';\n\n@Component({\n selector: 'c8y-map-widget',\n templateUrl: './map-widget.component.html',\n standalone: true,\n imports: [\n MapEventInfoComponent,\n NgCommonModule,\n NgFormsModule,\n CommonModule,\n FormsModule,\n IconSelectorModule,\n MapModule,\n AssetLinkPipe,\n TooltipModule,\n RouterLink,\n GlobalContextWidgetWrapperComponent\n ]\n})\nexport class MapWidgetComponent implements OnInit, OnDestroy, AfterViewInit, DynamicComponent {\n mapConfig: ClusterMapConfig = { center: [0, 0] };\n rootNode: IIdentified;\n @Input() config: MapWidgetConfig;\n\n @ViewChild(ClusterMapComponent)\n clusterMap: ClusterMapComponent;\n alerts: DynamicComponentAlertAggregator;\n assets: PositionManagedObject[];\n\n private TIMEOUT_ERROR_TEXT = gettext(\n 'The request is taking longer than usual. We apologize for the inconvenience.'\n );\n private SERVER_ERROR_TEXT = gettext('Server error occurred.');\n private savedNode: IIdentified;\n private destroy$ = new Subject<void>();\n private resizeObserver: ResizeObserver;\n controls: WidgetControls;\n\n constructor(\n dashboardChild: DashboardChildComponent,\n @Optional() private dashboardContextComponent: ContextDashboardComponent,\n private inventory: InventoryService,\n private mapService: MapService,\n @Optional() private widgetsDashboardComponent: WidgetsDashboardComponent,\n private dynamicComponentService: DynamicComponentService,\n private widgetConfigMigrationService: WidgetConfigMigrationService\n ) {\n this.listenToWidgetResizeEvent(dashboardChild);\n }\n\n async ngOnInit() {\n this.alerts.setAlertGroupDismissStrategy(\n 'warning',\n DismissAlertStrategy.TEMPORARY_OR_PERMANENT\n );\n\n await this.applyDeviceTypeTarget();\n\n if (this.config.device) {\n this.rootNode = this.config.device;\n }\n this.mapConfig = { ...this.config.mapConfig };\n\n // Check for legacy widget BEFORE updateMapConfigRealtime() overwrites it\n const isLegacyWidgetWithRealtime =\n !this.config.hasOwnProperty('displayMode') && this.mapConfig.realtime;\n\n this.updateMapConfigRealtime();\n this.savedNode = this.rootNode;\n await this.updateAssets();\n\n const migratedConfig = this.widgetConfigMigrationService.migrateWidgetConfig(this.config);\n this.config = merge(this.config, migratedConfig);\n\n // For legacy widgets (with realtime), set displayMode to 'view_and_config' to maintain previous behavior to some degree\n // TODO: adjust widgetConfigMigrationService.migrateWidgetConfig or do nothing.\n // Map widget is a special case since it blocks auto-refresh in the config live mode.\n if (isLegacyWidgetWithRealtime) {\n this.config.displayMode = GLOBAL_CONTEXT_DISPLAY_MODE.VIEW_AND_CONFIG;\n }\n\n if (this.assets.length > 1) {\n this.mapConfig = {\n ...this.mapConfig,\n follow: false\n };\n }\n\n this.controls =\n (await this.dynamicComponentService.getById(defaultWidgetIds.MAP)).data?.widgetControls || {};\n }\n\n ngAfterViewInit(): void {\n this.subscribeToErrorsOccurred();\n\n if (this.widgetsDashboardComponent) {\n const resizeCallback = debounce(() => {\n // initial size of map is assigned when left drawer is closed, but if it is opened after initialization\n // the map size is not updated, so we need to call invalidateSize so that map use the correct size\n this.clusterMap.map?.invalidateSize(false);\n }, 100);\n this.resizeObserver = new ResizeObserver(resizeCallback);\n\n this.resizeObserver.observe(this.widgetsDashboardComponent.nativeElement);\n }\n }\n\n startFollow(context) {\n if (context.id !== this.rootNode?.id) {\n this.rootNode = context;\n }\n\n this.mapConfig = {\n ...this.mapConfig,\n follow: true\n };\n }\n\n stopFollow() {\n this.mapConfig = {\n ...this.mapConfig,\n follow: false\n };\n this.rootNode = this.savedNode;\n }\n\n ngOnDestroy(): void {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n this.destroy$.next();\n }\n\n async fitToBounds() {\n await this.updateAssets();\n if (this.assets.length === 0 || !this.clusterMap?.map) {\n return;\n }\n\n const bounds = await this.mapService.getAssetsBounds(this.assets);\n\n this.clusterMap.map.fitBounds(bounds, defaultFitBoundsOptions);\n }\n\n async onGlobalContext(event) {\n const { context } = event;\n\n const isRealtime = this.mapConfig.realtime;\n if (!isRealtime && context.isAutoRefreshEnabled) {\n // If follow is enabled, fetch latest position and center map before reload\n if (this.mapConfig.follow && this.config.device?.c8y_Position) {\n await this.updateAssets();\n if (this.assets?.length === 1) {\n // Update clusterMap's asset so marker can be rendered even if cluster query returns 0 positions\n (this.clusterMap as any).assets = this.assets[0];\n this.clusterMap?.moveToPositionOfMo(this.assets[0]);\n // Prevent cluster subscription from re-centering to same position\n const pos = this.assets[0].c8y_Position;\n (this.clusterMap as any).lastFollowedPosition = { lat: pos.lat, lng: pos.lng };\n }\n }\n\n this.clusterMap?.reload();\n }\n }\n\n private async updateAssets() {\n this.assets = (await this.mapService.getAllPositionMOs(this.config.device)).data;\n }\n\n private listenToWidgetResizeEvent(dashboardChild: DashboardChildComponent) {\n dashboardChild.changeEnd\n .pipe(\n filter(child => child.lastChange === 'resize'),\n takeUntil(this.destroy$)\n )\n .subscribe(() => {\n this.clusterMap.reset();\n });\n }\n\n private subscribeToErrorsOccurred() {\n this.clusterMap.errorNotifier\n .pipe(filter(Boolean), takeUntil(this.destroy$))\n .subscribe(error => {\n this.alerts.addAlerts(\n new DynamicComponentAlert({\n type: 'warning',\n text:\n error?.name === 'TimeoutError'\n ? this.TIMEOUT_ERROR_TEXT\n : (error?.message ?? this.SERVER_ERROR_TEXT)\n })\n );\n });\n }\n\n private updateMapConfigRealtime() {\n this.mapConfig.realtime = this.config.realtime || false;\n }\n\n private async applyDeviceTypeTarget() {\n const hasDeviceTarget = !!this.config.device; // The map widget supports not selecting any target\n const isDeviceTypeDashboard = !!this.dashboardContextComponent?.dashboard?.deviceType;\n if (isDeviceTypeDashboard && hasDeviceTarget) {\n const context = this.dashboardContextComponent.context;\n if (context?.id) {\n const { id } = context;\n this.config.device = (await this.inventory.detail(id)).data;\n }\n }\n }\n}\n","@if (mapConfig) {\n <c8y-map-status\n [clusterMap]=\"mapWidget\"\n [(config)]=\"mapConfig\"\n (onUnfollow)=\"stopFollow()\"\n (fitAssetsToBounds)=\"fitToBounds()\"\n [assets]=\"assets\"\n [buttonsConfig]=\"{\n autoRefresh: { show: false },\n refresh: { show: false },\n realtime: { show: false },\n fitToBounds: { show: true }\n }\"\n >\n <c8y-global-context-widget-wrapper\n *ngIf=\"controls\"\n [widgetControls]=\"controls\"\n [config]=\"config\"\n [isLoading]=\"mapWidget.isLoading$ | async\"\n (globalContextChange)=\"onGlobalContext($event)\"\n ></c8y-global-context-widget-wrapper>\n </c8y-map-status>\n\n <c8y-cluster-map\n #mapWidget\n [rootNode]=\"rootNode\"\n [config]=\"mapConfig\"\n [asset]=\"assets\"\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}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCommonModule","i4","NgFormsModule","CommonModule","FormsModule","i6","i1","i2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{ data: mo } = await this.binary.create(file);
|
|
38
38
|
return mo.id;
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
41
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetService, deps: [{ token: i2.FilesService }, { token: i2$1.InventoryService }, { token: i2$1.InventoryBinaryService }, { token: i2.AlertService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
41
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetService, providedIn: 'root' }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetService, decorators: [{
|
|
44
44
|
type: Injectable,
|
|
45
45
|
args: [{ providedIn: 'root' }]
|
|
46
46
|
}], ctorParameters: () => [{ type: i2.FilesService }, { type: i2$1.InventoryService }, { type: i2$1.InventoryBinaryService }, { type: i2.AlertService }, { type: i3.TranslateService }] });
|
|
@@ -162,10 +162,10 @@ class MarkdownWidgetConfigComponent {
|
|
|
162
162
|
}
|
|
163
163
|
return removedError;
|
|
164
164
|
}
|
|
165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
166
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetConfigComponent, deps: [{ token: i1.FormBuilder }, { token: i1.NgForm }, { token: i2.AlertService }, { token: MarkdownWidgetService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
166
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: MarkdownWidgetConfigComponent, isStandalone: true, selector: "c8y-markdown-widget-config", inputs: { config: "config" }, ngImport: i0, template: "<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\" class=\"\">\n <div class=\"form-group\">\n <label title=\"{{ 'Upload a binary' | translate }}\" class=\"c8y-radio radio-inline\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadBinary\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label title=\"{{ 'Provide a file path' | translate }}\" class=\"c8y-radio radio-inline m-l-8\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadUrl\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>\n {{ 'Provide a file path' | translate }}\n </span>\n </label>\n </div>\n <ng-container [ngSwitch]=\"uploadChoice\">\n <div *ngSwitchCase=\"'uploadBinary'\">\n <c8y-form-group class=\"m-b-8\">\n <c8y-drop-area\n formControlName=\"droppedFile\"\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n </div>\n <div *ngSwitchCase=\"'uploadUrl'\">\n <c8y-form-group class=\"m-b-8\">\n <div class=\"m-b-4 p-b-8\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n type=\"text\"\n class=\"form-control\"\n formControlName=\"contentUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n />\n </div>\n </div>\n </c8y-form-group>\n </div>\n </ng-container>\n </form>\n</fieldset>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.DropAreaComponent, selector: "c8y-drop-area", inputs: ["formControl", "title", "message", "icon", "loadingMessage", "forceHideList", "alwaysShow", "clickToOpen", "loading", "progress", "maxAllowedFiles", "files", "maxFileSizeInMegaBytes", "accept"], outputs: ["dropped"] }, { 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.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: ReactiveFormsModule }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
167
167
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetConfigComponent, decorators: [{
|
|
169
169
|
type: Component,
|
|
170
170
|
args: [{ selector: 'c8y-markdown-widget-config', standalone: true, imports: [CoreModule, ReactiveFormsModule], template: "<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\" class=\"\">\n <div class=\"form-group\">\n <label title=\"{{ 'Upload a binary' | translate }}\" class=\"c8y-radio radio-inline\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadBinary\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label title=\"{{ 'Provide a file path' | translate }}\" class=\"c8y-radio radio-inline m-l-8\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadUrl\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>\n {{ 'Provide a file path' | translate }}\n </span>\n </label>\n </div>\n <ng-container [ngSwitch]=\"uploadChoice\">\n <div *ngSwitchCase=\"'uploadBinary'\">\n <c8y-form-group class=\"m-b-8\">\n <c8y-drop-area\n formControlName=\"droppedFile\"\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n </div>\n <div *ngSwitchCase=\"'uploadUrl'\">\n <c8y-form-group class=\"m-b-8\">\n <div class=\"m-b-4 p-b-8\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n type=\"text\"\n class=\"form-control\"\n formControlName=\"contentUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n />\n </div>\n </div>\n </c8y-form-group>\n </div>\n </ng-container>\n </form>\n</fieldset>\n" }]
|
|
171
171
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i1.NgForm }, { type: i2.AlertService }, { type: MarkdownWidgetService }], propDecorators: { config: [{
|
|
@@ -221,10 +221,10 @@ class MarkdownWidgetViewComponent {
|
|
|
221
221
|
const result = await this.client.fetch(`/apps/${this.contextPath}${this.config.contentUrl}`, options);
|
|
222
222
|
return result;
|
|
223
223
|
}
|
|
224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
225
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
224
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetViewComponent, deps: [{ token: i2.AppStateService }, { token: i2$1.FetchClient }, { token: MarkdownWidgetService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
225
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: MarkdownWidgetViewComponent, isStandalone: true, selector: "c8y-markdown-widget-view", inputs: { config: "config" }, ngImport: i0, template: "<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n", dependencies: [{ kind: "pipe", type: MarkdownToHtmlPipe, name: "markdownToHtml" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
226
226
|
}
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MarkdownWidgetViewComponent, decorators: [{
|
|
228
228
|
type: Component,
|
|
229
229
|
args: [{ selector: 'c8y-markdown-widget-view', standalone: true, imports: [MarkdownToHtmlPipe, AsyncPipe], template: "<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n" }]
|
|
230
230
|
}], ctorParameters: () => [{ type: i2.AppStateService }, { type: i2$1.FetchClient }, { type: MarkdownWidgetService }], propDecorators: { config: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-implementations-markdown.mjs","sources":["../../widgets/implementations/markdown/markdown-widget.service.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.html","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.ts","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.html","../../widgets/implementations/markdown/c8y-ngx-components-widgets-implementations-markdown.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { IManagedObjectBinary, InventoryBinaryService, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { FilesService, AlertService } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Injectable({ providedIn: 'root' })\nexport class MarkdownWidgetService {\n constructor(\n private fileService: FilesService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private alert: AlertService,\n private translate: TranslateService\n ) {}\n\n async getFile(markdownBinaryId: string | null): Promise<File> {\n if (!markdownBinaryId) {\n return null;\n }\n\n try {\n const { data: markdownBinaryMo } = await this.inventory.detail(markdownBinaryId);\n const file = await this.fileService.getFile(markdownBinaryMo as IManagedObjectBinary);\n return file;\n } catch (e) {\n const text = this.translate.instant(\n gettext('Unable to retrieve binary with ID: {{ markdownBinaryId }}'),\n { markdownBinaryId }\n );\n this.alert.danger(text, e?.data);\n }\n\n return null;\n }\n\n async uploadFile(file: File): Promise<string> {\n const { data: mo } = await this.binary.create(file);\n return mo.id;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AlertService, C8yValidators, CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport {\n AbstractControl,\n FormBuilder,\n FormGroup,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\n\n@Component({\n selector: 'c8y-markdown-widget-config',\n templateUrl: './markdown-widget-config.component.html',\n standalone: true,\n imports: [CoreModule, ReactiveFormsModule]\n})\nexport class MarkdownWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: MarkdownWidgetConfig;\n formGroup: FormGroup;\n fileFromConfig: File;\n uploadChoice: 'uploadBinary' | 'uploadUrl' = 'uploadUrl';\n loading = false;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private alert: AlertService,\n private markdownService: MarkdownWidgetService\n ) {}\n\n async onBeforeSave(config?: MarkdownWidgetConfig): Promise<boolean> {\n if (this.formGroup.invalid) {\n return false;\n }\n if (this.uploadChoice === 'uploadUrl') {\n Object.assign(config, {\n contentUrl: this.formGroup.value.contentUrl,\n markdownBinaryId: null\n });\n return true;\n }\n const fileFromForm = this.getFileFromFormValue(this.formGroup.value);\n if (fileFromForm && fileFromForm !== this.fileFromConfig) {\n try {\n const markdownBinaryId = await this.markdownService.uploadFile(fileFromForm);\n Object.assign(config, { markdownBinaryId, contentUrl: null });\n return true;\n } catch (e) {\n this.alert.danger(gettext('Unable to upload Markdown file.'), e?.data);\n return false;\n }\n }\n if (!fileFromForm) {\n Object.assign(config, { contentUrl: '/readme.md', markdownBinaryId: null });\n }\n return true;\n }\n\n async ngOnInit() {\n this.initForm();\n if (this.config.markdownBinaryId) {\n this.uploadChoice = 'uploadBinary';\n this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);\n this.formGroup.patchValue({\n droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]\n });\n }\n }\n\n onChange(value: 'uploadBinary' | 'uploadUrl') {\n this.uploadChoice = value;\n this.formGroup.controls['uploadChoice'].patchValue(value);\n }\n\n private getFileFromFormValue(formValue: any): File | null {\n const binary: any[] = formValue?.droppedFile || [];\n return binary[0]?.file || null;\n }\n\n private initForm(): void {\n this.formGroup = this.formBuilder.group(\n {\n contentUrl: ['', [Validators.maxLength(2000)]],\n droppedFile: [\n null,\n [\n Validators.minLength(1),\n Validators.maxLength(1),\n C8yValidators.filesValidator({ maximumFileSizeInKb: 1000 })\n ]\n ],\n uploadChoice: [this.config.markdownBinaryId ? 'uploadBinary' : 'uploadUrl', []]\n },\n { validators: this.requireEitherBinaryOrUrl() }\n );\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private requireEitherBinaryOrUrl(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const url = control.get(`contentUrl`);\n const uploadBinary = control.get(`droppedFile`);\n\n const urlDefined = url && url.value !== undefined && url.value !== null;\n const uploadBinaryDefined =\n uploadBinary && uploadBinary.value !== undefined && uploadBinary.value !== null;\n\n const errors = {};\n if (this.uploadChoice === 'uploadBinary' && !uploadBinaryDefined) {\n // sets error\n const error = { required: true };\n uploadBinary.setErrors(Object.assign({}, uploadBinary.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(uploadBinary, ['required']);\n }\n\n if (this.uploadChoice === 'uploadUrl' && (!urlDefined || url.value === '')) {\n // sets error\n const error = { required: true };\n url.setErrors(Object.assign({}, url.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(url, ['required']);\n }\n\n return Object.keys(errors).length ? errors : null;\n };\n }\n\n private removeErrors(control: AbstractControl, errors: string[]): boolean {\n if (!control || !control.errors) {\n return false;\n }\n let removedError = false;\n for (const error of errors) {\n if (control.errors[error]) {\n removedError = true;\n delete control.errors[error];\n }\n }\n if (removedError) {\n control.setErrors(\n Object.keys(control.errors).length ? Object.assign({}, control.errors) : null\n );\n }\n return removedError;\n }\n}\n","<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\" class=\"\">\n <div class=\"form-group\">\n <label title=\"{{ 'Upload a binary' | translate }}\" class=\"c8y-radio radio-inline\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadBinary\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label title=\"{{ 'Provide a file path' | translate }}\" class=\"c8y-radio radio-inline m-l-8\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadUrl\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>\n {{ 'Provide a file path' | translate }}\n </span>\n </label>\n </div>\n <ng-container [ngSwitch]=\"uploadChoice\">\n <div *ngSwitchCase=\"'uploadBinary'\">\n <c8y-form-group class=\"m-b-8\">\n <c8y-drop-area\n formControlName=\"droppedFile\"\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n </div>\n <div *ngSwitchCase=\"'uploadUrl'\">\n <c8y-form-group class=\"m-b-8\">\n <div class=\"m-b-4 p-b-8\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n type=\"text\"\n class=\"form-control\"\n formControlName=\"contentUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n />\n </div>\n </div>\n </c8y-form-group>\n </div>\n </ng-container>\n </form>\n</fieldset>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IFetchOptions, FetchClient, IFetchResponse } from '@c8y/client';\nimport { AppStateService, MarkdownToHtmlPipe } from '@c8y/ngx-components';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'c8y-markdown-widget-view',\n templateUrl: './markdown-widget-view.component.html',\n standalone: true,\n imports: [MarkdownToHtmlPipe, AsyncPipe]\n})\nexport class MarkdownWidgetViewComponent implements OnInit {\n @Input() config: MarkdownWidgetConfig;\n loading: boolean;\n markdown: string;\n contextPath: string;\n private readonly headers: any = { 'Content-Type': 'text/markdown', responseType: 'blob' };\n\n constructor(\n private appState: AppStateService,\n private client: FetchClient,\n private markdownWidgetService: MarkdownWidgetService\n ) {}\n\n async ngOnInit() {\n this.contextPath = this.appState.state.app.contextPath;\n if (this.config.markdownBinaryId) {\n const readmeContent = await (\n await this.markdownWidgetService.getFile(this.config.markdownBinaryId)\n ).text();\n this.markdown = readmeContent;\n } else if (this.config.contentUrl?.toLowerCase() === '/readme.md') {\n this.markdown = await this.getReadmeFileContent();\n } else {\n this.setContentFromUrl(this.config.contentUrl);\n }\n }\n\n setContentFromUrl(url: string) {\n const req = new XMLHttpRequest();\n\n req.onreadystatechange = () => this.render(req);\n req.addEventListener('load', () => this.render(req));\n req.open('GET', url);\n req.responseType = 'text';\n req.setRequestHeader('Accept', 'text/html');\n req.send();\n }\n\n private async render(req: XMLHttpRequest) {\n if (req.readyState === 4 && req.status === 200) {\n this.markdown = req.response;\n }\n }\n\n private async getReadmeFileContent(): Promise<string> {\n const readmeFile = await this.getReadmeFile();\n\n if (readmeFile.status === 200) {\n return await readmeFile.text();\n }\n return '';\n }\n\n private async getReadmeFile(): Promise<IFetchResponse> {\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers\n };\n const result: IFetchResponse = await this.client.fetch(\n `/apps/${this.contextPath}${this.config.contentUrl}`,\n options\n );\n return result;\n }\n}\n","<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3.MarkdownWidgetService"],"mappings":";;;;;;;;;;;;MAOa,qBAAqB,CAAA;IAChC,WAAA,CACU,WAAyB,EACzB,SAA2B,EAC3B,MAA8B,EAC9B,KAAmB,EACnB,SAA2B,EAAA;QAJ3B,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,SAAS,GAAT,SAAS;IAChB;IAEH,MAAM,OAAO,CAAC,gBAA+B,EAAA;QAC3C,IAAI,CAAC,gBAAgB,EAAE;AACrB,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,IAAI;AACF,YAAA,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAChF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,gBAAwC,CAAC;AACrF,YAAA,OAAO,IAAI;QACb;QAAE,OAAO,CAAC,EAAE;AACV,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CACjC,OAAO,CAAC,2DAA2D,CAAC,EACpE,EAAE,gBAAgB,EAAE,CACrB;YACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC;QAClC;AAEA,QAAA,OAAO,IAAI;IACb;IAEA,MAAM,UAAU,CAAC,IAAU,EAAA;AACzB,QAAA,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACnD,OAAO,EAAE,CAAC,EAAE;IACd;8GAhCW,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ACD,MAAM,MAAM,GAAmB,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CACpD,CAAA,MAAA,EAAS,IAAI,CAAC,WAAW,CAAA,EAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAA,CAAE,EACpD,OAAO,CACR;AACD,QAAA,OAAO,MAAM;IACf;8GA/DW,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAF,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,qBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbxC,0HACA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EDUY,kBAAkB,kDAAE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAE5B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,cAExB,IAAI,EAAA,OAAA,EACP,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,0HAAA,EAAA;iJAG/B,MAAM,EAAA,CAAA;sBAAd;;;AEdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-implementations-markdown.mjs","sources":["../../widgets/implementations/markdown/markdown-widget.service.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.ts","../../widgets/implementations/markdown/markdown-widget-config/markdown-widget-config.component.html","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.ts","../../widgets/implementations/markdown/markdown-widget-view/markdown-widget-view.component.html","../../widgets/implementations/markdown/c8y-ngx-components-widgets-implementations-markdown.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { IManagedObjectBinary, InventoryBinaryService, InventoryService } from '@c8y/client';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { FilesService, AlertService } from '@c8y/ngx-components';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Injectable({ providedIn: 'root' })\nexport class MarkdownWidgetService {\n constructor(\n private fileService: FilesService,\n private inventory: InventoryService,\n private binary: InventoryBinaryService,\n private alert: AlertService,\n private translate: TranslateService\n ) {}\n\n async getFile(markdownBinaryId: string | null): Promise<File> {\n if (!markdownBinaryId) {\n return null;\n }\n\n try {\n const { data: markdownBinaryMo } = await this.inventory.detail(markdownBinaryId);\n const file = await this.fileService.getFile(markdownBinaryMo as IManagedObjectBinary);\n return file;\n } catch (e) {\n const text = this.translate.instant(\n gettext('Unable to retrieve binary with ID: {{ markdownBinaryId }}'),\n { markdownBinaryId }\n );\n this.alert.danger(text, e?.data);\n }\n\n return null;\n }\n\n async uploadFile(file: File): Promise<string> {\n const { data: mo } = await this.binary.create(file);\n return mo.id;\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { AlertService, C8yValidators, CoreModule, OnBeforeSave } from '@c8y/ngx-components';\nimport {\n AbstractControl,\n FormBuilder,\n FormGroup,\n NgForm,\n ReactiveFormsModule,\n ValidationErrors,\n ValidatorFn,\n Validators\n} from '@angular/forms';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\n\n@Component({\n selector: 'c8y-markdown-widget-config',\n templateUrl: './markdown-widget-config.component.html',\n standalone: true,\n imports: [CoreModule, ReactiveFormsModule]\n})\nexport class MarkdownWidgetConfigComponent implements OnInit, OnBeforeSave {\n @Input() config: MarkdownWidgetConfig;\n formGroup: FormGroup;\n fileFromConfig: File;\n uploadChoice: 'uploadBinary' | 'uploadUrl' = 'uploadUrl';\n loading = false;\n\n constructor(\n private formBuilder: FormBuilder,\n private form: NgForm,\n private alert: AlertService,\n private markdownService: MarkdownWidgetService\n ) {}\n\n async onBeforeSave(config?: MarkdownWidgetConfig): Promise<boolean> {\n if (this.formGroup.invalid) {\n return false;\n }\n if (this.uploadChoice === 'uploadUrl') {\n Object.assign(config, {\n contentUrl: this.formGroup.value.contentUrl,\n markdownBinaryId: null\n });\n return true;\n }\n const fileFromForm = this.getFileFromFormValue(this.formGroup.value);\n if (fileFromForm && fileFromForm !== this.fileFromConfig) {\n try {\n const markdownBinaryId = await this.markdownService.uploadFile(fileFromForm);\n Object.assign(config, { markdownBinaryId, contentUrl: null });\n return true;\n } catch (e) {\n this.alert.danger(gettext('Unable to upload Markdown file.'), e?.data);\n return false;\n }\n }\n if (!fileFromForm) {\n Object.assign(config, { contentUrl: '/readme.md', markdownBinaryId: null });\n }\n return true;\n }\n\n async ngOnInit() {\n this.initForm();\n if (this.config.markdownBinaryId) {\n this.uploadChoice = 'uploadBinary';\n this.fileFromConfig = await this.markdownService.getFile(this.config.markdownBinaryId);\n this.formGroup.patchValue({\n droppedFile: [{ file: this.fileFromConfig, name: this.fileFromConfig.name }]\n });\n }\n }\n\n onChange(value: 'uploadBinary' | 'uploadUrl') {\n this.uploadChoice = value;\n this.formGroup.controls['uploadChoice'].patchValue(value);\n }\n\n private getFileFromFormValue(formValue: any): File | null {\n const binary: any[] = formValue?.droppedFile || [];\n return binary[0]?.file || null;\n }\n\n private initForm(): void {\n this.formGroup = this.formBuilder.group(\n {\n contentUrl: ['', [Validators.maxLength(2000)]],\n droppedFile: [\n null,\n [\n Validators.minLength(1),\n Validators.maxLength(1),\n C8yValidators.filesValidator({ maximumFileSizeInKb: 1000 })\n ]\n ],\n uploadChoice: [this.config.markdownBinaryId ? 'uploadBinary' : 'uploadUrl', []]\n },\n { validators: this.requireEitherBinaryOrUrl() }\n );\n this.form.form.addControl('config', this.formGroup);\n this.formGroup.patchValue(this.config);\n }\n\n private requireEitherBinaryOrUrl(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const url = control.get(`contentUrl`);\n const uploadBinary = control.get(`droppedFile`);\n\n const urlDefined = url && url.value !== undefined && url.value !== null;\n const uploadBinaryDefined =\n uploadBinary && uploadBinary.value !== undefined && uploadBinary.value !== null;\n\n const errors = {};\n if (this.uploadChoice === 'uploadBinary' && !uploadBinaryDefined) {\n // sets error\n const error = { required: true };\n uploadBinary.setErrors(Object.assign({}, uploadBinary.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(uploadBinary, ['required']);\n }\n\n if (this.uploadChoice === 'uploadUrl' && (!urlDefined || url.value === '')) {\n // sets error\n const error = { required: true };\n url.setErrors(Object.assign({}, url.errors || {}, error));\n Object.assign(errors, error);\n } else {\n // remove previous error\n this.removeErrors(url, ['required']);\n }\n\n return Object.keys(errors).length ? errors : null;\n };\n }\n\n private removeErrors(control: AbstractControl, errors: string[]): boolean {\n if (!control || !control.errors) {\n return false;\n }\n let removedError = false;\n for (const error of errors) {\n if (control.errors[error]) {\n removedError = true;\n delete control.errors[error];\n }\n }\n if (removedError) {\n control.setErrors(\n Object.keys(control.errors).length ? Object.assign({}, control.errors) : null\n );\n }\n return removedError;\n }\n}\n","<fieldset class=\"c8y-fieldset\">\n <legend>{{ 'Source' | translate }}</legend>\n <form [formGroup]=\"formGroup\" class=\"\">\n <div class=\"form-group\">\n <label title=\"{{ 'Upload a binary' | translate }}\" class=\"c8y-radio radio-inline\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadBinary\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>{{ 'Upload a binary' | translate }}</span>\n </label>\n <label title=\"{{ 'Provide a file path' | translate }}\" class=\"c8y-radio radio-inline m-l-8\">\n <input\n #radio\n formControlName=\"uploadChoice\"\n type=\"radio\"\n value=\"uploadUrl\"\n name=\"uploadChoice\"\n (change)=\"onChange($event.target.value)\"\n />\n <span></span>\n <span>\n {{ 'Provide a file path' | translate }}\n </span>\n </label>\n </div>\n <ng-container [ngSwitch]=\"uploadChoice\">\n <div *ngSwitchCase=\"'uploadBinary'\">\n <c8y-form-group class=\"m-b-8\">\n <c8y-drop-area\n formControlName=\"droppedFile\"\n class=\"drop-area-sm\"\n [title]=\"'Drop file or click to browse' | translate\"\n [maxAllowedFiles]=\"1\"\n [accept]=\"'md'\"\n ></c8y-drop-area>\n </c8y-form-group>\n </div>\n <div *ngSwitchCase=\"'uploadUrl'\">\n <c8y-form-group class=\"m-b-8\">\n <div class=\"m-b-4 p-b-8\">\n <div class=\"input-group\">\n <span class=\"input-group-addon\">\n <i c8yIcon=\"globe\"></i>\n </span>\n <input\n type=\"text\"\n class=\"form-control\"\n formControlName=\"contentUrl\"\n placeholder=\"{{ 'e.g.' | translate }} http://example.com/binary.zip\"\n />\n </div>\n </div>\n </c8y-form-group>\n </div>\n </ng-container>\n </form>\n</fieldset>\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IFetchOptions, FetchClient, IFetchResponse } from '@c8y/client';\nimport { AppStateService, MarkdownToHtmlPipe } from '@c8y/ngx-components';\nimport { MarkdownWidgetConfig } from '../markdown-widget.model';\nimport { MarkdownWidgetService } from '../markdown-widget.service';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n selector: 'c8y-markdown-widget-view',\n templateUrl: './markdown-widget-view.component.html',\n standalone: true,\n imports: [MarkdownToHtmlPipe, AsyncPipe]\n})\nexport class MarkdownWidgetViewComponent implements OnInit {\n @Input() config: MarkdownWidgetConfig;\n loading: boolean;\n markdown: string;\n contextPath: string;\n private readonly headers: any = { 'Content-Type': 'text/markdown', responseType: 'blob' };\n\n constructor(\n private appState: AppStateService,\n private client: FetchClient,\n private markdownWidgetService: MarkdownWidgetService\n ) {}\n\n async ngOnInit() {\n this.contextPath = this.appState.state.app.contextPath;\n if (this.config.markdownBinaryId) {\n const readmeContent = await (\n await this.markdownWidgetService.getFile(this.config.markdownBinaryId)\n ).text();\n this.markdown = readmeContent;\n } else if (this.config.contentUrl?.toLowerCase() === '/readme.md') {\n this.markdown = await this.getReadmeFileContent();\n } else {\n this.setContentFromUrl(this.config.contentUrl);\n }\n }\n\n setContentFromUrl(url: string) {\n const req = new XMLHttpRequest();\n\n req.onreadystatechange = () => this.render(req);\n req.addEventListener('load', () => this.render(req));\n req.open('GET', url);\n req.responseType = 'text';\n req.setRequestHeader('Accept', 'text/html');\n req.send();\n }\n\n private async render(req: XMLHttpRequest) {\n if (req.readyState === 4 && req.status === 200) {\n this.markdown = req.response;\n }\n }\n\n private async getReadmeFileContent(): Promise<string> {\n const readmeFile = await this.getReadmeFile();\n\n if (readmeFile.status === 200) {\n return await readmeFile.text();\n }\n return '';\n }\n\n private async getReadmeFile(): Promise<IFetchResponse> {\n const options: IFetchOptions = {\n method: 'GET',\n headers: this.headers\n };\n const result: IFetchResponse = await this.client.fetch(\n `/apps/${this.contextPath}${this.config.contentUrl}`,\n options\n );\n return result;\n }\n}\n","<div id=\"helpContent\" class=\"p-16 p-t-0 markdown-content\" [innerHTML]=\"markdown | markdownToHtml | async\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3.MarkdownWidgetService"],"mappings":";;;;;;;;;;;;MAOa,qBAAqB,CAAA;IAChC,WAAA,CACU,WAAyB,EACzB,SAA2B,EAC3B,MAA8B,EAC9B,KAAmB,EACnB,SAA2B,EAAA;QAJ3B,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,G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