@c8y/ngx-components 1023.14.174 → 1023.14.175
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-advanced-software-management.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +9 -9
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +12 -12
- package/fesm2022/c8y-ngx-components-ai.mjs +3 -3
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
- package/fesm2022/c8y-ngx-components-alarms.mjs +76 -76
- package/fesm2022/c8y-ngx-components-api.mjs +7 -7
- package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +39 -39
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-f-_aEo66.mjs → c8y-ngx-components-asset-property-grid.component-BZ3PAyuR.mjs} +13 -13
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-f-_aEo66.mjs.map → c8y-ngx-components-asset-property-grid.component-BZ3PAyuR.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +120 -120
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +17 -17
- 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.mjs +36 -36
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +13 -13
- package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-LHAUigva.mjs → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-GG2zPxo7.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-LHAUigva.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-GG2zPxo7.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-LtP3NmEZ.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B5jQE945.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-LtP3NmEZ.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B5jQE945.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-DVCbhO9J.mjs → c8y-ngx-components-computed-asset-properties-event-count-config.component-CoxLRePT.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-DVCbhO9J.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-CoxLRePT.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-B2arQ9BP.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Cp2nq21L.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-B2arQ9BP.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Cp2nq21L.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-context-dashboard-asset-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-JMTpQkY3.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-Cbimsi_L.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-JMTpQkY3.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-Cbimsi_L.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-CIOgylW-.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DatFnIwp.mjs} +10 -10
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-CIOgylW-.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DatFnIwp.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-1xx4pGiq.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-Cqy2OUcS.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-1xx4pGiq.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-Cqy2OUcS.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +102 -102
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DoXvIpvX.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CiiQzFm8.mjs} +16 -16
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DoXvIpvX.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-CiiQzFm8.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +6 -6
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
- package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +24 -24
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +13 -13
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +40 -40
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +33 -33
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
- package/fesm2022/c8y-ngx-components-device-enrolment-modal.mjs +9 -9
- package/fesm2022/c8y-ngx-components-device-enrolment.mjs +6 -6
- package/fesm2022/c8y-ngx-components-device-grid.mjs +43 -43
- package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
- package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
- package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
- package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
- package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
- package/fesm2022/c8y-ngx-components-echart.mjs +30 -30
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
- package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events.mjs +3 -3
- package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
- package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
- package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
- package/fesm2022/c8y-ngx-components-global-context.mjs +130 -130
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +19 -19
- package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
- package/fesm2022/c8y-ngx-components-location.mjs +28 -28
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-map.mjs +19 -19
- package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +19 -19
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
- package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
- package/fesm2022/c8y-ngx-components-replace-device.mjs +10 -10
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
- package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
- package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
- package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
- package/fesm2022/c8y-ngx-components-search.mjs +19 -19
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs +7 -7
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services.mjs +29 -29
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs +6 -8
- 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.mjs +6 -6
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +60 -60
- package/fesm2022/c8y-ngx-components-tenants.mjs +40 -40
- package/fesm2022/c8y-ngx-components-time-context.mjs +6 -6
- package/fesm2022/c8y-ngx-components-tracking.mjs +12 -12
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +4 -5
- 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.mjs +6 -6
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
- package/fesm2022/c8y-ngx-components-upgrade.mjs +41 -41
- package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +19 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +27 -27
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +10 -10
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +24 -24
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
- package/fesm2022/c8y-ngx-components.mjs +1338 -1338
- package/package.json +1 -1
- package/static-assets/data/index.d.ts.map +1 -1
- package/translation-editor/data/index.d.ts.map +1 -1
|
@@ -19,10 +19,10 @@ class LastUpdatedDateCellRendererComponent {
|
|
|
19
19
|
constructor(context) {
|
|
20
20
|
this.context = context;
|
|
21
21
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LastUpdatedDateCellRendererComponent, deps: [{ token: i1.CellRendererContext }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: LastUpdatedDateCellRendererComponent, isStandalone: true, selector: "c8y-last-updated-date-cell-renderer", ngImport: i0, template: `{{ context.value | c8yDate }}`, isInline: true, dependencies: [{ kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LastUpdatedDateCellRendererComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{
|
|
28
28
|
template: `{{ context.value | c8yDate }}`,
|
|
@@ -107,14 +107,14 @@ class ServicesNameCellRendererComponent {
|
|
|
107
107
|
constructor(context) {
|
|
108
108
|
this.context = context;
|
|
109
109
|
}
|
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesNameCellRendererComponent, deps: [{ token: i1.CellRendererContext }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ServicesNameCellRendererComponent, isStandalone: true, selector: "c8y-services-name-cell-renderer", ngImport: i0, template: `
|
|
112
112
|
<a class="interact" [title]="context.item.name" [routerLink]="['/service', context.item.id]">
|
|
113
113
|
{{ context.item.name }}
|
|
114
114
|
</a>
|
|
115
115
|
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
116
116
|
}
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesNameCellRendererComponent, decorators: [{
|
|
118
118
|
type: Component,
|
|
119
119
|
args: [{
|
|
120
120
|
template: `
|
|
@@ -254,10 +254,10 @@ class StatusOptionsService {
|
|
|
254
254
|
constructor(options) {
|
|
255
255
|
this._options = [...SERVICE_STATUS_OPTIONS, ...flatten(options)];
|
|
256
256
|
}
|
|
257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
258
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StatusOptionsService, deps: [{ token: HOOK_SERVICE_STATUS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
258
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StatusOptionsService, providedIn: 'root' }); }
|
|
259
259
|
}
|
|
260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StatusOptionsService, decorators: [{
|
|
261
261
|
type: Injectable,
|
|
262
262
|
args: [{
|
|
263
263
|
providedIn: 'root'
|
|
@@ -274,10 +274,10 @@ class ServicesStatusCellRendererComponent {
|
|
|
274
274
|
this.context = context;
|
|
275
275
|
this.statusOptionsService = statusOptionsService;
|
|
276
276
|
}
|
|
277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesStatusCellRendererComponent, deps: [{ token: i1.CellRendererContext }, { token: StatusOptionsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
278
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ServicesStatusCellRendererComponent, isStandalone: true, selector: "c8y-services-status-cell-renderer", ngImport: i0, template: "<span [ngSwitch]=\"context.item.status\">\n <ng-container *ngFor=\"let option of statusOptionsService.options\">\n <i\n *ngSwitchCase=\"option.key\"\n [c8yIcon]=\"option.icon\"\n class=\"{{ option.class }}\"\n [tooltip]=\"option.label | translate\"\n container=\"body\"\n placement=\"top\"\n ></i>\n </ng-container>\n <i\n *ngSwitchDefault\n c8yIcon=\"job\"\n class=\"text-primary\"\n [tooltip]=\"context.item.status\"\n container=\"body\"\n placement=\"top\"\n ></i>\n</span>\n", dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: 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: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
|
|
279
279
|
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesStatusCellRendererComponent, decorators: [{
|
|
281
281
|
type: Component,
|
|
282
282
|
args: [{ selector: 'c8y-services-status-cell-renderer', imports: [
|
|
283
283
|
NgSwitch,
|
|
@@ -422,10 +422,10 @@ class ServicesDeviceTabComponent {
|
|
|
422
422
|
trackByName(_index, column) {
|
|
423
423
|
return column.name;
|
|
424
424
|
}
|
|
425
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
426
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$2.InventoryService }, { token: i1.DataGridService }, { token: StatusOptionsService }, { token: i5.ServiceCommandService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ServicesDeviceTabComponent, isStandalone: true, selector: "c8y-services-device-tab", ngImport: i0, template: "<div class=\"content-fullpage\">\n <c8y-data-grid\n [title]=\"'Services' | translate\"\n [refresh]=\"refresh$\"\n [actionControls]=\"actionControls\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'c8y-tools'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : null\"\n *emptyStateContext=\"let stats; isLoading as isLoading\"\n [horizontal]=\"stats?.size > 0\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "loading", "columns", "rows", "pagination", "childNodePagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows", "treeGrid", "hideReload", "childNodesProperty", "parentNodeLabelProperty"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "directive", type: EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
|
|
427
427
|
}
|
|
428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabComponent, decorators: [{
|
|
429
429
|
type: Component,
|
|
430
430
|
args: [{ selector: 'c8y-services-device-tab', imports: [DataGridComponent, EmptyStateContextDirective, EmptyStateComponent, C8yTranslatePipe], template: "<div class=\"content-fullpage\">\n <c8y-data-grid\n [title]=\"'Services' | translate\"\n [refresh]=\"refresh$\"\n [actionControls]=\"actionControls\"\n [pagination]=\"pagination\"\n [columns]=\"columns\"\n [infiniteScroll]=\"'auto'\"\n [serverSideDataCallback]=\"serverSideDataCallback\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'c8y-tools'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : null\"\n *emptyStateContext=\"let stats; isLoading as isLoading\"\n [horizontal]=\"stats?.size > 0\"\n ></c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n" }]
|
|
431
431
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$2.InventoryService }, { type: i1.DataGridService }, { type: StatusOptionsService }, { type: i5.ServiceCommandService }] });
|
|
@@ -440,10 +440,10 @@ class ServicesDeviceTabGuard {
|
|
|
440
440
|
.childAdditionsList({ id }, { query: `type eq ${SERVICE_FRAGMENT}`, pageSize: 1 })
|
|
441
441
|
.then(result => !!result?.data?.length);
|
|
442
442
|
}
|
|
443
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
444
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
443
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabGuard, deps: [{ token: i1$2.InventoryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
444
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabGuard, providedIn: 'root' }); }
|
|
445
445
|
}
|
|
446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabGuard, decorators: [{
|
|
447
447
|
type: Injectable,
|
|
448
448
|
args: [{ providedIn: 'root' }]
|
|
449
449
|
}], ctorParameters: () => [{ type: i1$2.InventoryService }] });
|
|
@@ -491,20 +491,20 @@ class ServicesBreadcrumbFactory {
|
|
|
491
491
|
return breadcrumb;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
495
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
494
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesBreadcrumbFactory, deps: [{ token: i1$2.InventoryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
495
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesBreadcrumbFactory }); }
|
|
496
496
|
}
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesBreadcrumbFactory, decorators: [{
|
|
498
498
|
type: Injectable
|
|
499
499
|
}], ctorParameters: () => [{ type: i1$2.InventoryService }] });
|
|
500
500
|
|
|
501
501
|
class ServicesDeviceTabModule {
|
|
502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
503
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
503
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabModule, imports: [ServicesDeviceTabComponent,
|
|
504
504
|
LastUpdatedDateCellRendererComponent,
|
|
505
505
|
ServicesNameCellRendererComponent,
|
|
506
506
|
ServicesStatusCellRendererComponent] }); }
|
|
507
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
507
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabModule, providers: [
|
|
508
508
|
ServicesBreadcrumbFactory,
|
|
509
509
|
hookRoute({
|
|
510
510
|
context: ViewContext.Device,
|
|
@@ -518,7 +518,7 @@ class ServicesDeviceTabModule {
|
|
|
518
518
|
hookBreadcrumb(ServicesBreadcrumbFactory)
|
|
519
519
|
], imports: [ServicesDeviceTabComponent] }); }
|
|
520
520
|
}
|
|
521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesDeviceTabModule, decorators: [{
|
|
522
522
|
type: NgModule,
|
|
523
523
|
args: [{
|
|
524
524
|
imports: [
|
|
@@ -544,11 +544,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
544
544
|
}] });
|
|
545
545
|
|
|
546
546
|
class ServicesModule {
|
|
547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
548
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
549
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
547
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
548
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: ServicesModule, imports: [CoreModule, ServicesDeviceTabModule] }); }
|
|
549
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesModule, providers: [serviceCommandTabFeatureProvider], imports: [CoreModule, ServicesDeviceTabModule] }); }
|
|
550
550
|
}
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ServicesModule, decorators: [{
|
|
552
552
|
type: NgModule,
|
|
553
553
|
args: [{
|
|
554
554
|
providers: [serviceCommandTabFeatureProvider],
|
|
@@ -188,10 +188,10 @@ class SigfoxProviderService {
|
|
|
188
188
|
error.message = gettext('No contracts found. New contracts must be created via the Sigfox platform.');
|
|
189
189
|
throw error;
|
|
190
190
|
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
192
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxProviderService, deps: [{ token: i1.FetchClient }, { token: i1.InventoryService }, { token: i1.TenantOptionsService }, { token: i2.TranslateService }, { token: i3.AppStateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxProviderService, providedIn: 'root' }); }
|
|
193
193
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxProviderService, decorators: [{
|
|
195
195
|
type: Injectable,
|
|
196
196
|
args: [{
|
|
197
197
|
providedIn: 'root'
|
|
@@ -391,10 +391,10 @@ class SigfoxDeviceRegistrationComponent {
|
|
|
391
391
|
this.unsubscribe$.next();
|
|
392
392
|
this.unsubscribe$.complete();
|
|
393
393
|
}
|
|
394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
395
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationComponent, deps: [{ token: i1$1.BsModalRef }, { token: SigfoxProviderService }, { token: i2.TranslateService }, { token: i3.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SigfoxDeviceRegistrationComponent, isStandalone: true, selector: "c8y-sigfox-device-registration", ngImport: i0, template: "<c8y-modal\n [title]=\"'Sigfox registration' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'c8y-device-connect'\"></span>\n </ng-container>\n <ng-container *ngIf=\"state === 'loadPending'; else registrationForm\">\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-container>\n\n <ng-template #registrationForm>\n <c8y-stepper\n [hideStepProgress]=\"true\"\n linear\n c8y-modal-body\n *ngIf=\"(errorMessages$ | async).length === 0; else errorMessagesPresent\"\n >\n <cdk-step [stepControl]=\"form\">\n <div class=\"p-b-16\">\n <p class=\"modal-subtitle sticky-top\">\n {{ 'Register a single Sigfox device' | translate }}\n </p>\n <formly-form\n class=\"d-block p-l-24 p-r-24 p-t-16\"\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n ></formly-form>\n </div>\n <c8y-stepper-buttons\n class=\"modal-footer d-block sticky-bottom separator-top bg-component\"\n [labels]=\"registrationStepLabels\"\n (onNext)=\"create($event)\"\n (onCancel)=\"bsModalRef.hide()\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [pending]=\"state === 'registrationPending'\"\n [disabled]=\"!form.valid\"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step state=\"final\">\n <div\n class=\"p-16 text-center\"\n *ngIf=\"state === 'registrationPending'\"\n >\n <c8y-loading></c8y-loading>\n </div>\n <div class=\"m-24\">\n <c8y-operation-result\n class=\"lead m-b-0\"\n type=\"success\"\n *ngIf=\"state === 'registrationSuccess'\"\n text=\"{{ 'Device registered' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n ></c8y-operation-result>\n </div>\n\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-component\"\n (onCustom)=\"bsModalRef.hide()\"\n [showButtons]=\"{ custom: true }\"\n [labels]=\"finalStepLabels\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n </ng-template>\n\n <ng-template #errorMessagesPresent>\n <div class=\"m-24\">\n <c8y-operation-result\n class=\"lead\"\n type=\"error\"\n *ngIf=\"state === 'registrationError'\"\n text=\"{{ 'Failed to register' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n ></c8y-operation-result>\n <div\n class=\"m-b-8\"\n *ngFor=\"let msg of errorMessages$ | async\"\n data-cy=\"sigfox-device-registration.component--registration-error\"\n [ngClass]=\"{\n 'text-center': state === 'registrationError',\n 'alert alert-danger': state === 'loadError'\n }\"\n >\n <span [innerHTML]=\"msg | translate\"></span>\n </div>\n </div>\n\n <div class=\"modal-footer\">\n <button\n class=\"btn btn-default\"\n title=\"{{ 'Close' | translate }}\"\n type=\"button\"\n (click)=\"bsModalRef.hide()\"\n >\n {{ 'Close' | translate }}\n </button>\n </div>\n </ng-template>\n</c8y-modal>\n", dependencies: [{ kind: "component", type: ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i5.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "component", type: C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "component", type: OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
396
396
|
}
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationComponent, decorators: [{
|
|
398
398
|
type: Component,
|
|
399
399
|
args: [{ selector: 'c8y-sigfox-device-registration', imports: [
|
|
400
400
|
ModalComponent,
|
|
@@ -425,10 +425,10 @@ class SigfoxDeviceRegistrationButtonComponent {
|
|
|
425
425
|
ignoreBackdropClick: true
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
428
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationButtonComponent, deps: [{ token: i1$1.BsModalService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
429
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: SigfoxDeviceRegistrationButtonComponent, isStandalone: true, selector: "c8y-sigfox-registration", ngImport: i0, template: "<button title=\"{{ 'Sigfox' | translate }}\" type=\"button\" (click)=\"open()\">\n <i c8yIcon=\"c8y-device-connect\"></i>\n {{ 'Sigfox' | translate }}\n</button>\n", dependencies: [{ kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
|
|
430
430
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationButtonComponent, decorators: [{
|
|
432
432
|
type: Component,
|
|
433
433
|
args: [{ selector: 'c8y-sigfox-registration', imports: [IconDirective, C8yTranslatePipe], template: "<button title=\"{{ 'Sigfox' | translate }}\" type=\"button\" (click)=\"open()\">\n <i c8yIcon=\"c8y-device-connect\"></i>\n {{ 'Sigfox' | translate }}\n</button>\n" }]
|
|
434
434
|
}], ctorParameters: () => [{ type: i1$1.BsModalService }] });
|
|
@@ -448,10 +448,10 @@ class SigfoxDeviceRegistrationFactory {
|
|
|
448
448
|
}
|
|
449
449
|
return items;
|
|
450
450
|
}
|
|
451
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
452
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
451
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationFactory, deps: [{ token: i3.TenantUiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
452
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationFactory, providedIn: 'root' }); }
|
|
453
453
|
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationFactory, decorators: [{
|
|
455
455
|
type: Injectable,
|
|
456
456
|
args: [{
|
|
457
457
|
providedIn: 'root'
|
|
@@ -459,16 +459,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
459
459
|
}], ctorParameters: () => [{ type: i3.TenantUiService }] });
|
|
460
460
|
|
|
461
461
|
class SigfoxDeviceRegistrationModule {
|
|
462
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
463
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
462
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
463
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationModule, imports: [CoreModule,
|
|
464
464
|
CommonModule,
|
|
465
465
|
SigfoxDeviceRegistrationButtonComponent,
|
|
466
466
|
SigfoxDeviceRegistrationComponent] }); }
|
|
467
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
467
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationModule, providers: [hookDeviceRegistration(SigfoxDeviceRegistrationFactory), SigfoxProviderService], imports: [CoreModule,
|
|
468
468
|
CommonModule,
|
|
469
469
|
SigfoxDeviceRegistrationComponent] }); }
|
|
470
470
|
}
|
|
471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SigfoxDeviceRegistrationModule, decorators: [{
|
|
472
472
|
type: NgModule,
|
|
473
473
|
args: [{
|
|
474
474
|
imports: [
|
|
@@ -113,17 +113,17 @@ class SmsGatewayGuard {
|
|
|
113
113
|
}
|
|
114
114
|
return this.showSMSProvider;
|
|
115
115
|
}
|
|
116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
117
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayGuard, deps: [{ token: i1.Permissions }, { token: i1.AppStateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
117
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayGuard }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayGuard, decorators: [{
|
|
120
120
|
type: Injectable
|
|
121
121
|
}], ctorParameters: () => [{ type: i1.Permissions }, { type: i1.AppStateService }] });
|
|
122
122
|
|
|
123
123
|
class SmsGatewayModule {
|
|
124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
125
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
126
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
125
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayModule, imports: [i1.ProviderConfigurationModule] }); }
|
|
126
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayModule, providers: [SmsGatewayGuard, hookPatternMessages(MESSAGES_SMS_GATEWAY)], imports: [ProviderConfigurationModule.config([
|
|
127
127
|
{
|
|
128
128
|
navigation: {
|
|
129
129
|
label: gettext('SMS provider'),
|
|
@@ -163,7 +163,7 @@ class SmsGatewayModule {
|
|
|
163
163
|
}
|
|
164
164
|
])] }); }
|
|
165
165
|
}
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SmsGatewayModule, decorators: [{
|
|
167
167
|
type: NgModule,
|
|
168
168
|
args: [{
|
|
169
169
|
imports: [
|
|
@@ -156,7 +156,7 @@ class StaticAssetsService {
|
|
|
156
156
|
return this.getContentJSONFromPath(path);
|
|
157
157
|
}
|
|
158
158
|
async getContentJSONFromPath(path) {
|
|
159
|
-
const response = await this.fetchClient.fetch(path);
|
|
159
|
+
const response = await this.fetchClient.fetch(path, { cache: 'no-cache' });
|
|
160
160
|
if (response.status !== 200) {
|
|
161
161
|
throw Error(`Failed to retrieve ${path}`);
|
|
162
162
|
}
|
|
@@ -171,8 +171,7 @@ class StaticAssetsService {
|
|
|
171
171
|
async ensureFileIsPresent(file) {
|
|
172
172
|
for (let i = 0; i < 12; i++) {
|
|
173
173
|
try {
|
|
174
|
-
const
|
|
175
|
-
const response = await this.fetchClient.fetch(`${file.path}?nocache=${currentDate.getTime()}`);
|
|
174
|
+
const response = await this.fetchClient.fetch(`${file.path}`, { cache: 'no-cache' });
|
|
176
175
|
if (response.status !== 200) {
|
|
177
176
|
await this.sleep(5_000);
|
|
178
177
|
continue;
|
|
@@ -206,9 +205,8 @@ class StaticAssetsService {
|
|
|
206
205
|
return await this.createEmptyApp(type);
|
|
207
206
|
}
|
|
208
207
|
getPathForContent(type, appendTenantId) {
|
|
209
|
-
const currentDate = new Date();
|
|
210
208
|
const contextPath = this.getContextPath(type, appendTenantId);
|
|
211
|
-
return `/apps/public/${contextPath}/${this.fileNames.contents}
|
|
209
|
+
return `/apps/public/${contextPath}/${this.fileNames.contents}`;
|
|
212
210
|
}
|
|
213
211
|
getContextPath(type, appendTenantId) {
|
|
214
212
|
let contextPath = type + '-assets';
|
|
@@ -249,10 +247,10 @@ class StaticAssetsService {
|
|
|
249
247
|
await this.appService.update({ id: app.id, activeVersionId: appBinary.id });
|
|
250
248
|
return [];
|
|
251
249
|
}
|
|
252
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
253
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsService, deps: [{ token: i1.AppStateService }, { token: i2.ApplicationService }, { token: i2.FetchClient }, { token: i1.FilesService }, { token: i1.ZipService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
251
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsService, providedIn: 'root' }); }
|
|
254
252
|
}
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsService, decorators: [{
|
|
256
254
|
type: Injectable,
|
|
257
255
|
args: [{ providedIn: 'root' }]
|
|
258
256
|
}], ctorParameters: () => [{ type: i1.AppStateService }, { type: i2.ApplicationService }, { type: i2.FetchClient }, { type: i1.FilesService }, { type: i1.ZipService }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-static-assets-data.mjs","sources":["../../static-assets/data/static-assets.service.ts","../../static-assets/data/c8y-ngx-components-static-assets-data.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n ApplicationAvailability,\n ApplicationService,\n ApplicationType,\n FetchClient,\n IApplication\n} from '@c8y/client';\nimport { AppStateService, DroppedFile, FilesService, ZipService } from '@c8y/ngx-components';\nimport { StaticAsset, StaticAssetType } from './static-assets.model';\n\n@Injectable({ providedIn: 'root' })\nexport class StaticAssetsService {\n readonly fileNames = {\n contents: 'contents.json',\n manifest: 'cumulocity.json',\n exportZipName: 'static-assets.zip'\n } as const;\n private listFilesCachePromises: Record<string, Promise<StaticAsset[]>> = {};\n\n constructor(\n private appstate: AppStateService,\n private appService: ApplicationService,\n private fetchClient: FetchClient,\n private fileService: FilesService,\n private zip: ZipService\n ) {}\n\n /**\n * Lists all files of the given type.\n * Forces a cache renewal.\n */\n async listFiles<T extends string = StaticAssetType>(type: T): Promise<StaticAsset[]> {\n return this.listFilesCached(type, true);\n }\n\n /**\n * Lists all files of the given type.\n * Uses a cache.\n */\n async listFilesCached<T extends string = StaticAssetType>(\n type: T,\n forceCacheRenewal = false\n ): Promise<StaticAsset[]> {\n if (!this.listFilesCachePromises[type] || forceCacheRenewal) {\n this.listFilesCachePromises[type] = this._listFiles(type);\n }\n\n return await this.listFilesCachePromises[type];\n }\n\n /**\n * Clones all assets of the given type from parent tenants into the current tenant.\n */\n async cloneAssetsIntoTenant<T extends string = StaticAssetType>(type: T) {\n const { data: apps } = await this.appService.list({\n availability: ApplicationAvailability.SHARED,\n type: ApplicationType.HOSTED,\n pageSize: 2000\n });\n\n const tenantIdsFromOtherAssetApps = apps\n .filter(app => {\n const result =\n app.owner?.tenant?.id &&\n app.owner?.tenant?.id !== this.appstate.currentTenant.value?.name &&\n app.contextPath === this.getContextPath(type, app.owner?.tenant?.id);\n return result;\n })\n .map(app => app.owner?.tenant?.id);\n\n let filesOfCurrentTenant = await this._listFiles(type);\n\n let filesToUpload = new Array<File>();\n\n const oldAssets = new Array<StaticAsset>();\n\n for (const tenantId of tenantIdsFromOtherAssetApps) {\n try {\n const filesOfApp = await this.getContentJSONForType(type, tenantId);\n oldAssets.push(...filesOfApp);\n for (const file of filesOfApp) {\n try {\n const response = await this.fetchClient.fetch(file.path);\n if (response.status !== 200) {\n console.warn(`Failed to get file \"${file.fileName}\" from path ${file.path}`);\n continue;\n }\n const fileContent = await response.blob();\n\n // remove existing file with same name\n filesOfCurrentTenant = filesOfCurrentTenant.filter(\n existingFile => existingFile.fileName !== file.fileName\n );\n filesToUpload = filesToUpload.filter(\n existingFile => existingFile.name !== file.fileName\n );\n\n filesToUpload.push(new File([fileContent], file.fileName, { type: file.type }));\n } catch (e) {\n console.warn(`Failed to add file \"${file.fileName}\" from tenant ${tenantId}`, e);\n }\n }\n } catch (e) {\n console.warn(`Failed to get asset files from tenant ${tenantId}`);\n }\n }\n\n if (!filesToUpload.length) {\n return;\n }\n\n const newAssets = await this.addFilesToStaticAssets(type, filesToUpload, filesOfCurrentTenant);\n\n return { oldAssets, newAssets };\n }\n\n /**\n * Adds the given files to the static assets of the given type.\n */\n async addFilesToStaticAssets<T extends string = StaticAssetType>(\n type: T,\n files: DroppedFile[] | File[],\n existingFiles: StaticAsset[],\n throwErrorOnExistingFiles = true\n ) {\n const app = await this.getAppForTenant(type);\n const filesToAddToContents = new Array<StaticAsset>();\n const addedAt = new Date().toISOString();\n const filesToUpload: {\n path: string;\n contents: Blob;\n }[] = [];\n for (const droppedFile of files) {\n const file = droppedFile instanceof File ? droppedFile : droppedFile.file;\n const fileName = file.name.toLowerCase().replace(/[^a-zA-Z0-9\\-\\_\\.]/g, '');\n const newFile = new File([file], fileName, {\n type: file.type,\n lastModified: file.lastModified\n });\n if (existingFiles.find(existingFile => existingFile.fileName === fileName)) {\n if (throwErrorOnExistingFiles) {\n throw Error(`File with name \"${fileName}\" is already existing.`);\n }\n existingFiles = existingFiles.filter(existingFile => existingFile.fileName !== fileName);\n }\n const fileExtension = file.name.split('.').pop();\n filesToAddToContents.push({\n addedAt,\n lastModified: file.lastModified,\n extension: fileExtension,\n fileName: fileName,\n originalFileName: file.name,\n path: `/apps/public/${app.contextPath}/${fileName}`,\n size: newFile.size,\n type: newFile.type,\n hashSum: await this.fileService.getHashSumOfFile(newFile)\n });\n filesToUpload.push({\n contents: newFile,\n path: fileName\n });\n }\n\n const newFiles: StaticAsset[] = [...existingFiles, ...filesToAddToContents];\n filesToUpload.push({\n contents: new File([JSON.stringify(newFiles)], this.fileNames.contents, {\n type: 'application/json'\n }),\n path: this.fileNames.contents\n });\n await this.appService.binary(app).updateFiles(filesToUpload);\n await this.ensureAddedFilesArePresent(filesToAddToContents);\n return newFiles;\n }\n\n /**\n * Gets the static assets app for the given type.\n */\n async getAppForTenant<T extends string = StaticAssetType>(type: T): Promise<IApplication> {\n const contextPath = this.getContextPath(type);\n\n const { data: manifest } = await this.appService.getManifestOfContextPath(contextPath);\n if (!manifest.id) {\n throw Error(`No app with path ${contextPath} found.`);\n }\n const { data: app } = await this.appService.detail(manifest.id);\n if (app.owner?.tenant.id !== this.appstate.currentTenant.value?.name) {\n throw Error(`No app with path ${contextPath} found that is owned by the current tenant.`);\n }\n return app;\n }\n\n private getContentJSONForType<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ) {\n const path = this.getPathForContent(type, appendTenantId);\n return this.getContentJSONFromPath(path);\n }\n\n private async getContentJSONFromPath(path: string): Promise<StaticAsset[]> {\n const response = await this.fetchClient.fetch(path);\n if (response.status !== 200) {\n throw Error(`Failed to retrieve ${path}`);\n }\n\n const content = await response.json();\n return content;\n }\n\n private async ensureAddedFilesArePresent(files: StaticAsset[]) {\n for (const file of files) {\n await this.ensureFileIsPresent(file);\n }\n }\n\n private async ensureFileIsPresent(file: StaticAsset) {\n for (let i = 0; i < 12; i++) {\n try {\n const currentDate = new Date();\n const response = await this.fetchClient.fetch(\n `${file.path}?nocache=${currentDate.getTime()}`\n );\n if (response.status !== 200) {\n await this.sleep(5_000);\n continue;\n }\n\n const blob = await response.blob();\n const hashSum = await this.fileService.getHashSumOfFile(blob);\n if (hashSum !== file.hashSum) {\n await this.sleep(5_000);\n continue;\n }\n return;\n } catch (e) {\n console.warn(e);\n continue;\n }\n }\n throw Error(`Unable to retrieve file from ${file.path}`);\n }\n\n private sleep(duration: number): Promise<void> {\n return new Promise<void>(resolve => setTimeout(() => resolve(), duration));\n }\n\n private async _listFiles<T extends string = StaticAssetType>(type: T) {\n try {\n const files = await this.getContentJSONForType(type);\n return files;\n } catch (e) {\n console.warn(e);\n }\n\n return await this.createEmptyApp(type);\n }\n\n private getPathForContent<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ): string {\n const currentDate = new Date();\n const contextPath = this.getContextPath(type, appendTenantId);\n return `/apps/public/${contextPath}/${\n this.fileNames.contents\n }?nocache=${currentDate.getTime()}`;\n }\n\n private getContextPath<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | false | undefined\n ) {\n let contextPath: string = type + '-assets';\n const tenantId =\n appendTenantId === undefined ? this.appstate.currentTenant.value?.name : appendTenantId;\n if (tenantId) {\n contextPath = `${contextPath}-${tenantId}`;\n }\n return contextPath;\n }\n\n private async createEmptyApp<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ): Promise<StaticAsset[]> {\n const name = this.getContextPath(type, false);\n const contextPath = this.getContextPath(type, appendTenantId);\n const key = `${contextPath}-key`;\n const manifest: IApplication = {\n name,\n contextPath,\n key,\n description: `Application containing static assets used for ${type}.`,\n noAppSwitcher: true,\n type: ApplicationType.HOSTED,\n availability: ApplicationAvailability.MARKET\n };\n\n const content = [];\n const zipFile = await this.zip.createZip([\n {\n fileName: `${this.fileNames.manifest}`,\n blob: new Blob([JSON.stringify(manifest)])\n },\n {\n fileName: `${this.fileNames.contents}`,\n blob: new Blob([JSON.stringify(content)])\n }\n ]);\n const { data: app } = await this.appService.create(manifest);\n const { data: appBinary } = await this.appService\n .binary(app)\n .upload(zipFile, `empty-${name}.zip`);\n await this.appService.update({ id: app.id, activeVersionId: appBinary.id as string });\n return [];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAYa,mBAAmB,CAAA;IAQ9B,WAAA,CACU,QAAyB,EACzB,UAA8B,EAC9B,WAAwB,EACxB,WAAyB,EACzB,GAAe,EAAA;QAJf,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,GAAG,GAAH,GAAG;AAZJ,QAAA,IAAA,CAAA,SAAS,GAAG;AACnB,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,QAAQ,EAAE,iBAAiB;AAC3B,YAAA,aAAa,EAAE;SACP;QACF,IAAA,CAAA,sBAAsB,GAA2C,EAAE;IAQxE;AAEH;;;AAGG;IACH,MAAM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,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,CAAC,EAAY,EAAE,CAAC;AACrF,QAAA,OAAO,EAAE;IACX;+GAjTW,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA,CAAA;;4FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACXlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-static-assets-data.mjs","sources":["../../static-assets/data/static-assets.service.ts","../../static-assets/data/c8y-ngx-components-static-assets-data.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n ApplicationAvailability,\n ApplicationService,\n ApplicationType,\n FetchClient,\n IApplication\n} from '@c8y/client';\nimport { AppStateService, DroppedFile, FilesService, ZipService } from '@c8y/ngx-components';\nimport { StaticAsset, StaticAssetType } from './static-assets.model';\n\n@Injectable({ providedIn: 'root' })\nexport class StaticAssetsService {\n readonly fileNames = {\n contents: 'contents.json',\n manifest: 'cumulocity.json',\n exportZipName: 'static-assets.zip'\n } as const;\n private listFilesCachePromises: Record<string, Promise<StaticAsset[]>> = {};\n\n constructor(\n private appstate: AppStateService,\n private appService: ApplicationService,\n private fetchClient: FetchClient,\n private fileService: FilesService,\n private zip: ZipService\n ) {}\n\n /**\n * Lists all files of the given type.\n * Forces a cache renewal.\n */\n async listFiles<T extends string = StaticAssetType>(type: T): Promise<StaticAsset[]> {\n return this.listFilesCached(type, true);\n }\n\n /**\n * Lists all files of the given type.\n * Uses a cache.\n */\n async listFilesCached<T extends string = StaticAssetType>(\n type: T,\n forceCacheRenewal = false\n ): Promise<StaticAsset[]> {\n if (!this.listFilesCachePromises[type] || forceCacheRenewal) {\n this.listFilesCachePromises[type] = this._listFiles(type);\n }\n\n return await this.listFilesCachePromises[type];\n }\n\n /**\n * Clones all assets of the given type from parent tenants into the current tenant.\n */\n async cloneAssetsIntoTenant<T extends string = StaticAssetType>(type: T) {\n const { data: apps } = await this.appService.list({\n availability: ApplicationAvailability.SHARED,\n type: ApplicationType.HOSTED,\n pageSize: 2000\n });\n\n const tenantIdsFromOtherAssetApps = apps\n .filter(app => {\n const result =\n app.owner?.tenant?.id &&\n app.owner?.tenant?.id !== this.appstate.currentTenant.value?.name &&\n app.contextPath === this.getContextPath(type, app.owner?.tenant?.id);\n return result;\n })\n .map(app => app.owner?.tenant?.id);\n\n let filesOfCurrentTenant = await this._listFiles(type);\n\n let filesToUpload = new Array<File>();\n\n const oldAssets = new Array<StaticAsset>();\n\n for (const tenantId of tenantIdsFromOtherAssetApps) {\n try {\n const filesOfApp = await this.getContentJSONForType(type, tenantId);\n oldAssets.push(...filesOfApp);\n for (const file of filesOfApp) {\n try {\n const response = await this.fetchClient.fetch(file.path);\n if (response.status !== 200) {\n console.warn(`Failed to get file \"${file.fileName}\" from path ${file.path}`);\n continue;\n }\n const fileContent = await response.blob();\n\n // remove existing file with same name\n filesOfCurrentTenant = filesOfCurrentTenant.filter(\n existingFile => existingFile.fileName !== file.fileName\n );\n filesToUpload = filesToUpload.filter(\n existingFile => existingFile.name !== file.fileName\n );\n\n filesToUpload.push(new File([fileContent], file.fileName, { type: file.type }));\n } catch (e) {\n console.warn(`Failed to add file \"${file.fileName}\" from tenant ${tenantId}`, e);\n }\n }\n } catch (e) {\n console.warn(`Failed to get asset files from tenant ${tenantId}`);\n }\n }\n\n if (!filesToUpload.length) {\n return;\n }\n\n const newAssets = await this.addFilesToStaticAssets(type, filesToUpload, filesOfCurrentTenant);\n\n return { oldAssets, newAssets };\n }\n\n /**\n * Adds the given files to the static assets of the given type.\n */\n async addFilesToStaticAssets<T extends string = StaticAssetType>(\n type: T,\n files: DroppedFile[] | File[],\n existingFiles: StaticAsset[],\n throwErrorOnExistingFiles = true\n ) {\n const app = await this.getAppForTenant(type);\n const filesToAddToContents = new Array<StaticAsset>();\n const addedAt = new Date().toISOString();\n const filesToUpload: {\n path: string;\n contents: Blob;\n }[] = [];\n for (const droppedFile of files) {\n const file = droppedFile instanceof File ? droppedFile : droppedFile.file;\n const fileName = file.name.toLowerCase().replace(/[^a-zA-Z0-9\\-\\_\\.]/g, '');\n const newFile = new File([file], fileName, {\n type: file.type,\n lastModified: file.lastModified\n });\n if (existingFiles.find(existingFile => existingFile.fileName === fileName)) {\n if (throwErrorOnExistingFiles) {\n throw Error(`File with name \"${fileName}\" is already existing.`);\n }\n existingFiles = existingFiles.filter(existingFile => existingFile.fileName !== fileName);\n }\n const fileExtension = file.name.split('.').pop();\n filesToAddToContents.push({\n addedAt,\n lastModified: file.lastModified,\n extension: fileExtension,\n fileName: fileName,\n originalFileName: file.name,\n path: `/apps/public/${app.contextPath}/${fileName}`,\n size: newFile.size,\n type: newFile.type,\n hashSum: await this.fileService.getHashSumOfFile(newFile)\n });\n filesToUpload.push({\n contents: newFile,\n path: fileName\n });\n }\n\n const newFiles: StaticAsset[] = [...existingFiles, ...filesToAddToContents];\n filesToUpload.push({\n contents: new File([JSON.stringify(newFiles)], this.fileNames.contents, {\n type: 'application/json'\n }),\n path: this.fileNames.contents\n });\n await this.appService.binary(app).updateFiles(filesToUpload);\n await this.ensureAddedFilesArePresent(filesToAddToContents);\n return newFiles;\n }\n\n /**\n * Gets the static assets app for the given type.\n */\n async getAppForTenant<T extends string = StaticAssetType>(type: T): Promise<IApplication> {\n const contextPath = this.getContextPath(type);\n\n const { data: manifest } = await this.appService.getManifestOfContextPath(contextPath);\n if (!manifest.id) {\n throw Error(`No app with path ${contextPath} found.`);\n }\n const { data: app } = await this.appService.detail(manifest.id);\n if (app.owner?.tenant.id !== this.appstate.currentTenant.value?.name) {\n throw Error(`No app with path ${contextPath} found that is owned by the current tenant.`);\n }\n return app;\n }\n\n private getContentJSONForType<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ) {\n const path = this.getPathForContent(type, appendTenantId);\n return this.getContentJSONFromPath(path);\n }\n\n private async getContentJSONFromPath(path: string): Promise<StaticAsset[]> {\n const response = await this.fetchClient.fetch(path, { cache: 'no-cache' });\n if (response.status !== 200) {\n throw Error(`Failed to retrieve ${path}`);\n }\n\n const content = await response.json();\n return content;\n }\n\n private async ensureAddedFilesArePresent(files: StaticAsset[]) {\n for (const file of files) {\n await this.ensureFileIsPresent(file);\n }\n }\n\n private async ensureFileIsPresent(file: StaticAsset) {\n for (let i = 0; i < 12; i++) {\n try {\n const response = await this.fetchClient.fetch(`${file.path}`, { cache: 'no-cache' });\n if (response.status !== 200) {\n await this.sleep(5_000);\n continue;\n }\n\n const blob = await response.blob();\n const hashSum = await this.fileService.getHashSumOfFile(blob);\n if (hashSum !== file.hashSum) {\n await this.sleep(5_000);\n continue;\n }\n return;\n } catch (e) {\n console.warn(e);\n continue;\n }\n }\n throw Error(`Unable to retrieve file from ${file.path}`);\n }\n\n private sleep(duration: number): Promise<void> {\n return new Promise<void>(resolve => setTimeout(() => resolve(), duration));\n }\n\n private async _listFiles<T extends string = StaticAssetType>(type: T) {\n try {\n const files = await this.getContentJSONForType(type);\n return files;\n } catch (e) {\n console.warn(e);\n }\n\n return await this.createEmptyApp(type);\n }\n\n private getPathForContent<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ): string {\n const contextPath = this.getContextPath(type, appendTenantId);\n return `/apps/public/${contextPath}/${this.fileNames.contents}`;\n }\n\n private getContextPath<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | false | undefined\n ) {\n let contextPath: string = type + '-assets';\n const tenantId =\n appendTenantId === undefined ? this.appstate.currentTenant.value?.name : appendTenantId;\n if (tenantId) {\n contextPath = `${contextPath}-${tenantId}`;\n }\n return contextPath;\n }\n\n private async createEmptyApp<T extends string = StaticAssetType>(\n type: T,\n appendTenantId?: string | null | undefined\n ): Promise<StaticAsset[]> {\n const name = this.getContextPath(type, false);\n const contextPath = this.getContextPath(type, appendTenantId);\n const key = `${contextPath}-key`;\n const manifest: IApplication = {\n name,\n contextPath,\n key,\n description: `Application containing static assets used for ${type}.`,\n noAppSwitcher: true,\n type: ApplicationType.HOSTED,\n availability: ApplicationAvailability.MARKET\n };\n\n const content = [];\n const zipFile = await this.zip.createZip([\n {\n fileName: `${this.fileNames.manifest}`,\n blob: new Blob([JSON.stringify(manifest)])\n },\n {\n fileName: `${this.fileNames.contents}`,\n blob: new Blob([JSON.stringify(content)])\n }\n ]);\n const { data: app } = await this.appService.create(manifest);\n const { data: appBinary } = await this.appService\n .binary(app)\n .upload(zipFile, `empty-${name}.zip`);\n await this.appService.update({ id: app.id, activeVersionId: appBinary.id as string });\n return [];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAYa,mBAAmB,CAAA;IAQ9B,WAAA,CACU,QAAyB,EACzB,UAA8B,EAC9B,WAAwB,EACxB,WAAyB,EACzB,GAAe,EAAA;QAJf,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,GAAG,GAAH,GAAG;AAZJ,Q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,MAAM,CAAC,OAAO,EAAE,SAAS,IAAI,CAAA,IAAA,CAAM,CAAC;QACvC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,CAAC,EAAY,EAAE,CAAC;AACrF,QAAA,OAAO,EAAE;IACX;+GA3SW,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA,CAAA;;4FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACXlC;;AAEG;;;;"}
|
|
@@ -27,10 +27,10 @@ class StaticAssetMainTypePipe {
|
|
|
27
27
|
}
|
|
28
28
|
return 'unknown';
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
31
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetMainTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
31
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetMainTypePipe, isStandalone: true, name: "staticAssetMainType" }); }
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetMainTypePipe, decorators: [{
|
|
34
34
|
type: Pipe,
|
|
35
35
|
args: [{
|
|
36
36
|
name: 'staticAssetMainType',
|
|
@@ -107,10 +107,10 @@ class StaticAssetsFileListComponent {
|
|
|
107
107
|
removeStyleTag() {
|
|
108
108
|
document.getElementById(this.styleTagId)?.remove();
|
|
109
109
|
}
|
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.19", type: StaticAssetsFileListComponent, isStandalone: true, selector: "c8y-static-assets-file-list", inputs: { inModalView: { classPropertyName: "inModalView", publicName: "inModalView", isSignal: true, isRequired: false, transformFunction: null }, assetType: { classPropertyName: "assetType", publicName: "assetType", isSignal: true, isRequired: false, transformFunction: null }, supportedFileExtensions: { classPropertyName: "supportedFileExtensions", publicName: "supportedFileExtensions", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelected: "itemSelected" }, viewQueries: [{ propertyName: "dropArea", first: true, predicate: DropAreaComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngIf=\"files$ | async as assets; else loading\">\n <div\n class=\"text-center sticky-top separator-bottom bg-component\"\n style=\"z-index: 1001\"\n >\n <p\n class=\"m-0 p-16\"\n *ngIf=\"assets.length\"\n >\n {{ 'Select from the list below or`first part, followed by upload a new asset`' | translate }}\n <button\n class=\"btn-link\"\n aria-controls=\"collapseUpload\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ 'upload a new asset' | translate }}\n </button>\n </p>\n <div\n class=\"collapse\"\n id=\"collapseUpload\"\n [isAnimated]=\"true\"\n [collapse]=\"!isExpanded\"\n >\n <div class=\"p-t-24 p-l-24 p-r-24 bg-level-1 separator-top-bottom p-b-32\">\n <c8y-drop-area\n class=\"drop-area-sm m-b-8\"\n [icon]=\"'upload'\"\n [accept]=\"accept$ | async\"\n (dropped)=\"addFiles($event)\"\n ></c8y-drop-area>\n <c8y-messages\n [helpMessage]=\"\n 'After uploading, the asset will be visible in the list below.' | translate\n \"\n ></c8y-messages>\n </div>\n </div>\n </div>\n <div *ngIf=\"assets.length\">\n <c8y-list-group\n class=\"m-b-0\"\n *ngIf=\"layout() != 'grid'\"\n >\n <c8y-list-item *ngFor=\"let asset of assets\">\n <c8y-list-item-icon icon=\"file\"></c8y-list-item-icon>\n\n <c8y-list-item-body>\n <div class=\"row\">\n <div class=\"col-md-3 col-xs-12 d-flex a-i-center\">\n <div\n class=\"text-truncate\"\n title=\"{{ asset.fileName }}\"\n >\n {{ asset.fileName }}\n </div>\n <button\n class=\"btn-dot m-l-4\"\n [title]=\"'Preview' | translate\"\n [popover]=\"preview\"\n placement=\"end\"\n triggers=\"focus\"\n container=\"body\"\n [adaptivePosition]=\"false\"\n >\n <i [c8yIcon]=\"'eye'\"></i>\n </button>\n <ng-template #preview>\n <div class=\"bg-checkered\">\n <img\n class=\"fit-w\"\n [alt]=\"asset.fileName\"\n [src]=\"asset.path\"\n />\n </div>\n </ng-template>\n </div>\n <div class=\"col-md-3 col-xs-12 text-muted\">\n <code class=\"text-10\">{{ asset.type }}</code>\n </div>\n <div class=\"col-md-2 col-xs-12 text-muted\">\n <span class=\"small\">{{ asset.size | bytes }}</span>\n </div>\n <div\n class=\"col-md-2 col-xs-12 text-muted\"\n [title]=\"asset.addedAt | c8yDate\"\n >\n <div class=\"icon-flex small\">\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n <span>{{ asset.addedAt | c8yDate }}</span>\n </div>\n </div>\n <div class=\"col-md-2 col-xs-12 d-flex\">\n <button\n class=\"btn btn-default btn-sm m-l-auto showOnHover\"\n (click)=\"select(asset)\"\n translate\n >\n Select\n </button>\n </div>\n </div>\n </c8y-list-item-body>\n </c8y-list-item>\n </c8y-list-group>\n <div\n class=\"card-group-block interact-grid\"\n *ngIf=\"layout() === 'grid'\"\n >\n <button\n class=\"card btn-clean interact pointer\"\n [ngClass]=\"{\n 'col-md-3 col-sm-4 col-xs-12': inModalView(),\n 'col-md-1 col-sm-3 col-xs-12': !inModalView()\n }\"\n *ngFor=\"let asset of assets\"\n (click)=\"select(asset)\"\n >\n <div class=\"card-block\">\n <ng-container [ngSwitch]=\"asset | staticAssetMainType\">\n <div\n class=\"bg-checkered\"\n *ngSwitchCase=\"'image'\"\n >\n <img\n class=\"img-responsive m-auto img-square\"\n [alt]=\"asset.fileName\"\n [src]=\"asset.path\"\n />\n </div>\n <div\n class=\"bg-checkered\"\n *ngSwitchCase=\"'font'\"\n >\n <div\n class=\"img-responsive m-auto img-square\"\n [ngStyle]=\"{ 'font-family': asset.hashSum }\"\n >\n <p class=\"fit-h text-balance text-truncate-wrap\">\n <!-- intentionally not translated -->\n The quick brown fox jumps over the lazy dog.\n </p>\n </div>\n </div>\n <div\n class=\"bg-checkered\"\n *ngSwitchDefault\n >\n <div class=\"img-responsive m-auto img-square d-flex a-i-center j-c-center\">\n <i\n class=\"icon-2x\"\n [c8yIcon]=\"'file'\"\n ></i>\n </div>\n </div>\n </ng-container>\n <p\n class=\"text-medium text-truncate-wrap m-t-8\"\n [title]=\"asset.fileName\"\n >\n <a\n [href]=\"asset.path\"\n download\n (click)=\"$event.stopPropagation()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ asset.fileName }}\n </a>\n </p>\n <p class=\"m-b-4\">\n <code class=\"text-10\">{{ asset.type }}</code>\n </p>\n <p class=\"small text-muted d-flex flex-wrap a-i-center\">\n {{ asset.size | bytes }}\n <span class=\"m-l-auto\">\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n <span>{{ asset.addedAt | c8yDate }}</span>\n </span>\n </p>\n </div>\n </button>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"p-24\">\n <c8y-loading></c8y-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: 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: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i1.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: BytesPipe, name: "bytes" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: StaticAssetMainTypePipe, name: "staticAssetMainType" }] }); }
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsFileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: StaticAssetsFileListComponent, isStandalone: true, selector: "c8y-static-assets-file-list", inputs: { inModalView: { classPropertyName: "inModalView", publicName: "inModalView", isSignal: true, isRequired: false, transformFunction: null }, assetType: { classPropertyName: "assetType", publicName: "assetType", isSignal: true, isRequired: false, transformFunction: null }, supportedFileExtensions: { classPropertyName: "supportedFileExtensions", publicName: "supportedFileExtensions", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelected: "itemSelected" }, viewQueries: [{ propertyName: "dropArea", first: true, predicate: DropAreaComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngIf=\"files$ | async as assets; else loading\">\n <div\n class=\"text-center sticky-top separator-bottom bg-component\"\n style=\"z-index: 1001\"\n >\n <p\n class=\"m-0 p-16\"\n *ngIf=\"assets.length\"\n >\n {{ 'Select from the list below or`first part, followed by upload a new asset`' | translate }}\n <button\n class=\"btn-link\"\n aria-controls=\"collapseUpload\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ 'upload a new asset' | translate }}\n </button>\n </p>\n <div\n class=\"collapse\"\n id=\"collapseUpload\"\n [isAnimated]=\"true\"\n [collapse]=\"!isExpanded\"\n >\n <div class=\"p-t-24 p-l-24 p-r-24 bg-level-1 separator-top-bottom p-b-32\">\n <c8y-drop-area\n class=\"drop-area-sm m-b-8\"\n [icon]=\"'upload'\"\n [accept]=\"accept$ | async\"\n (dropped)=\"addFiles($event)\"\n ></c8y-drop-area>\n <c8y-messages\n [helpMessage]=\"\n 'After uploading, the asset will be visible in the list below.' | translate\n \"\n ></c8y-messages>\n </div>\n </div>\n </div>\n <div *ngIf=\"assets.length\">\n <c8y-list-group\n class=\"m-b-0\"\n *ngIf=\"layout() != 'grid'\"\n >\n <c8y-list-item *ngFor=\"let asset of assets\">\n <c8y-list-item-icon icon=\"file\"></c8y-list-item-icon>\n\n <c8y-list-item-body>\n <div class=\"row\">\n <div class=\"col-md-3 col-xs-12 d-flex a-i-center\">\n <div\n class=\"text-truncate\"\n title=\"{{ asset.fileName }}\"\n >\n {{ asset.fileName }}\n </div>\n <button\n class=\"btn-dot m-l-4\"\n [title]=\"'Preview' | translate\"\n [popover]=\"preview\"\n placement=\"end\"\n triggers=\"focus\"\n container=\"body\"\n [adaptivePosition]=\"false\"\n >\n <i [c8yIcon]=\"'eye'\"></i>\n </button>\n <ng-template #preview>\n <div class=\"bg-checkered\">\n <img\n class=\"fit-w\"\n [alt]=\"asset.fileName\"\n [src]=\"asset.path\"\n />\n </div>\n </ng-template>\n </div>\n <div class=\"col-md-3 col-xs-12 text-muted\">\n <code class=\"text-10\">{{ asset.type }}</code>\n </div>\n <div class=\"col-md-2 col-xs-12 text-muted\">\n <span class=\"small\">{{ asset.size | bytes }}</span>\n </div>\n <div\n class=\"col-md-2 col-xs-12 text-muted\"\n [title]=\"asset.addedAt | c8yDate\"\n >\n <div class=\"icon-flex small\">\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n <span>{{ asset.addedAt | c8yDate }}</span>\n </div>\n </div>\n <div class=\"col-md-2 col-xs-12 d-flex\">\n <button\n class=\"btn btn-default btn-sm m-l-auto showOnHover\"\n (click)=\"select(asset)\"\n translate\n >\n Select\n </button>\n </div>\n </div>\n </c8y-list-item-body>\n </c8y-list-item>\n </c8y-list-group>\n <div\n class=\"card-group-block interact-grid\"\n *ngIf=\"layout() === 'grid'\"\n >\n <button\n class=\"card btn-clean interact pointer\"\n [ngClass]=\"{\n 'col-md-3 col-sm-4 col-xs-12': inModalView(),\n 'col-md-1 col-sm-3 col-xs-12': !inModalView()\n }\"\n *ngFor=\"let asset of assets\"\n (click)=\"select(asset)\"\n >\n <div class=\"card-block\">\n <ng-container [ngSwitch]=\"asset | staticAssetMainType\">\n <div\n class=\"bg-checkered\"\n *ngSwitchCase=\"'image'\"\n >\n <img\n class=\"img-responsive m-auto img-square\"\n [alt]=\"asset.fileName\"\n [src]=\"asset.path\"\n />\n </div>\n <div\n class=\"bg-checkered\"\n *ngSwitchCase=\"'font'\"\n >\n <div\n class=\"img-responsive m-auto img-square\"\n [ngStyle]=\"{ 'font-family': asset.hashSum }\"\n >\n <p class=\"fit-h text-balance text-truncate-wrap\">\n <!-- intentionally not translated -->\n The quick brown fox jumps over the lazy dog.\n </p>\n </div>\n </div>\n <div\n class=\"bg-checkered\"\n *ngSwitchDefault\n >\n <div class=\"img-responsive m-auto img-square d-flex a-i-center j-c-center\">\n <i\n class=\"icon-2x\"\n [c8yIcon]=\"'file'\"\n ></i>\n </div>\n </div>\n </ng-container>\n <p\n class=\"text-medium text-truncate-wrap m-t-8\"\n [title]=\"asset.fileName\"\n >\n <a\n [href]=\"asset.path\"\n download\n (click)=\"$event.stopPropagation()\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ asset.fileName }}\n </a>\n </p>\n <p class=\"m-b-4\">\n <code class=\"text-10\">{{ asset.type }}</code>\n </p>\n <p class=\"small text-muted d-flex flex-wrap a-i-center\">\n {{ asset.size | bytes }}\n <span class=\"m-l-auto\">\n <i\n class=\"m-r-4\"\n [c8yIcon]=\"'calendar'\"\n ></i>\n <span>{{ asset.addedAt | c8yDate }}</span>\n </span>\n </p>\n </div>\n </button>\n </div>\n </div>\n</ng-container>\n\n<ng-template #loading>\n <div class=\"p-24\">\n <c8y-loading></c8y-loading>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "component", type: 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: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "directive", type: PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: CollapseModule }, { kind: "directive", type: i1.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }, { kind: "pipe", type: BytesPipe, name: "bytes" }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: StaticAssetMainTypePipe, name: "staticAssetMainType" }] }); }
|
|
112
112
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsFileListComponent, decorators: [{
|
|
114
114
|
type: Component,
|
|
115
115
|
args: [{ selector: 'c8y-static-assets-file-list', standalone: true, imports: [
|
|
116
116
|
NgForOf,
|
|
@@ -159,10 +159,10 @@ class StaticAssetsModalComponent {
|
|
|
159
159
|
this.modalRef.hide();
|
|
160
160
|
this.reject();
|
|
161
161
|
}
|
|
162
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
163
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsModalComponent, deps: [{ token: i1$1.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: StaticAssetsModalComponent, isStandalone: true, selector: "c8y-static-assets-modal", inputs: { assetType: "assetType", supportedFileExtensions: "supportedFileExtensions", modalTitle: "modalTitle", layout: "layout" }, ngImport: i0, template: "<c8y-modal\n [title]=\"modalTitle\"\n (onDismiss)=\"cancel()\"\n [headerClasses]=\"'dialog-header'\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'select-all'\"></span>\n </ng-container>\n <c8y-static-assets-file-list\n (itemSelected)=\"select($event)\"\n [assetType]=\"assetType\"\n [supportedFileExtensions]=\"supportedFileExtensions\"\n [layout]=\"layout\"\n [inModalView]=\"true\"\n ></c8y-static-assets-file-list>\n</c8y-modal>\n", dependencies: [{ kind: "component", type: StaticAssetsFileListComponent, selector: "c8y-static-assets-file-list", inputs: ["inModalView", "assetType", "supportedFileExtensions", "layout"], outputs: ["itemSelected"] }, { kind: "component", type: ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }] }); }
|
|
164
164
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: StaticAssetsModalComponent, decorators: [{
|
|
166
166
|
type: Component,
|
|
167
167
|
args: [{ selector: 'c8y-static-assets-modal', imports: [StaticAssetsFileListComponent, ModalComponent, IconDirective], standalone: true, template: "<c8y-modal\n [title]=\"modalTitle\"\n (onDismiss)=\"cancel()\"\n [headerClasses]=\"'dialog-header'\"\n [labels]=\"{ cancel: 'Cancel' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'select-all'\"></span>\n </ng-container>\n <c8y-static-assets-file-list\n (itemSelected)=\"select($event)\"\n [assetType]=\"assetType\"\n [supportedFileExtensions]=\"supportedFileExtensions\"\n [layout]=\"layout\"\n [inModalView]=\"true\"\n ></c8y-static-assets-file-list>\n</c8y-modal>\n" }]
|
|
168
168
|
}], ctorParameters: () => [{ type: i1$1.BsModalRef }], propDecorators: { assetType: [{
|