@c8y/ngx-components 1023.75.1 → 1023.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-Cek3_qZQ.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DVEnCRzW.mjs} +2 -2
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DVEnCRzW.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
- package/fesm2022/c8y-ngx-components-global-context.mjs +40 -18
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-alarm-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-all-critical-alarms.mjs +4 -5
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-all-critical-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-recent-alarms.mjs +4 -5
- package/fesm2022/c8y-ngx-components-widgets-definitions-alarms-recent-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-notes.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-notes.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-device-control-message.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-device-control-message.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-info-gauge.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-linear-gauge.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-linear-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-map.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-radial-gauge.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-radial-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-silo.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-silo.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-three-d-rotation.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +66 -59
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +132 -144
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/global-context/index.d.ts +87 -1
- package/global-context/index.d.ts.map +1 -1
- package/index.d.ts +10 -4
- package/index.d.ts.map +1 -1
- package/locales/de.po +3 -0
- package/locales/es.po +3 -0
- package/locales/fr.po +3 -0
- package/locales/ja_JP.po +3 -0
- package/locales/ko.po +3 -0
- package/locales/locales.pot +3 -0
- package/locales/nl.po +3 -0
- package/locales/pl.po +3 -0
- package/locales/pt_BR.po +3 -0
- package/locales/zh_CN.po +3 -0
- package/locales/zh_TW.po +3 -0
- package/package.json +1 -1
- package/widgets/definitions/alarms/all-critical-alarms/index.d.ts +1 -2
- package/widgets/definitions/alarms/all-critical-alarms/index.d.ts.map +1 -1
- package/widgets/definitions/alarms/recent-alarms/index.d.ts +1 -2
- package/widgets/definitions/alarms/recent-alarms/index.d.ts.map +1 -1
- package/widgets/implementations/alarms/index.d.ts +6 -1
- package/widgets/implementations/alarms/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-Cek3_qZQ.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-kpi.mjs","sources":["../../widgets/definitions/kpi/kpi.constants.ts","../../widgets/definitions/kpi/index.ts","../../widgets/definitions/kpi/c8y-ngx-components-widgets-definitions-kpi.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const KPI_FORM_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true\n};\n","import { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n DynamicWidgetDefinition,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport {\n GlobalContextSectionComponent,\n hookWidgetConfig\n} from '@c8y/ngx-components/context-dashboard';\nimport { PRESET_NAME } from '@c8y/ngx-components/global-context';\nimport { KPI_FORM_OPTIONS } from './kpi.constants';\n\nexport const kpiWidgetDefinition = {\n id: defaultWidgetIds.KPI,\n label: gettext('KPI'),\n description: gettext('Displays the last measurement value of a device.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/kpi').then(m => m.KpiWidgetViewComponent),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/kpi').then(m => m.KpiWidgetConfigComponent),\n previewImage: 'c8y-style-assets/kpi-widget.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=KpiWidgetConfig!@c8y/ngx-components/widgets/implementations/kpi'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n controls: PRESET_NAME.KPI_CONFIG,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 2\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const kpiWidgetProviders = [\n hookWidget(kpiWidgetDefinition),\n hookWidgetConfig<GlobalContextSectionComponent>({\n widgetId: defaultWidgetIds.KPI,\n priority: 10,\n label: gettext('Time context'),\n initialState: {\n controls: PRESET_NAME.KPI_CONFIG\n },\n loadComponent: () =>\n import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent)\n }),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.KPI,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: KPI_FORM_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,gBAAgB,GAA2C;AACtE,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE;CAClB;;ACcM,MAAM,mBAAmB,GAAG;IACjC,EAAE,EAAE,gBAAgB,CAAC,GAAG;AACxB,IAAA,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC;AACrB,IAAA,WAAW,EAAE,OAAO,CAAC,kDAAkD,CAAC;AACxE,IAAA,aAAa,EAAE,MACb,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,sBAAsB,CAAC;AAC/F,IAAA,mBAAmB,EAAE,MACnB,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,wBAAwB,CAAC;AACjG,IAAA,YAAY,EAAE,iCAAiC;AAC/C,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-kpi.mjs","sources":["../../widgets/definitions/kpi/kpi.constants.ts","../../widgets/definitions/kpi/index.ts","../../widgets/definitions/kpi/c8y-ngx-components-widgets-definitions-kpi.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const KPI_FORM_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true\n};\n","import { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n DynamicWidgetDefinition,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport {\n GlobalContextSectionComponent,\n hookWidgetConfig\n} from '@c8y/ngx-components/context-dashboard';\nimport { PRESET_NAME } from '@c8y/ngx-components/global-context';\nimport { KPI_FORM_OPTIONS } from './kpi.constants';\n\nexport const kpiWidgetDefinition = {\n id: defaultWidgetIds.KPI,\n label: gettext('KPI'),\n description: gettext('Displays the last measurement value of a device.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/kpi').then(m => m.KpiWidgetViewComponent),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/kpi').then(m => m.KpiWidgetConfigComponent),\n previewImage: 'c8y-style-assets/kpi-widget.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=KpiWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/kpi'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n controls: PRESET_NAME.KPI_CONFIG,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 2\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const kpiWidgetProviders = [\n hookWidget(kpiWidgetDefinition),\n hookWidgetConfig<GlobalContextSectionComponent>({\n widgetId: defaultWidgetIds.KPI,\n priority: 10,\n label: gettext('Time context'),\n initialState: {\n controls: PRESET_NAME.KPI_CONFIG\n },\n loadComponent: () =>\n import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent)\n }),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.KPI,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: KPI_FORM_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,gBAAgB,GAA2C;AACtE,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE;CAClB;;ACcM,MAAM,mBAAmB,GAAG;IACjC,EAAE,EAAE,gBAAgB,CAAC,GAAG;AACxB,IAAA,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC;AACrB,IAAA,WAAW,EAAE,OAAO,CAAC,kDAAkD,CAAC;AACxE,IAAA,aAAa,EAAE,MACb,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,sBAAsB,CAAC;AAC/F,IAAA,mBAAmB,EAAE,MACnB,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,wBAAwB,CAAC;AACjG,IAAA,YAAY,EAAE,iCAAiC;AAC/C,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,oHAAoH,CACrH;AACH,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,MAAM,EAAE,uBAAuB;QAC/B,QAAQ,EAAE,WAAW,CAAC,UAAU;AAChC,QAAA,QAAQ,EAAE;AACR,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,OAAO,EAAE;AACV,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAAE,IAAI;AACpB,oBAAA,gBAAgB,EAAE;AACnB;AACF;AACF;AACF;;AAGI,MAAM,kBAAkB,GAAG;IAChC,UAAU,CAAC,mBAAmB,CAAC;AAC/B,IAAA,gBAAgB,CAAgC;QAC9C,QAAQ,EAAE,gBAAgB,CAAC,GAAG;AAC9B,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC;AAC9B,QAAA,YAAY,EAAE;YACZ,QAAQ,EAAE,WAAW,CAAC;AACvB,SAAA;AACD,QAAA,aAAa,EAAE,MACb,OAAO,uCAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,6BAA6B;KAC5F,CAAC;AACF,IAAA,gBAAgB,CAAC;QACf,QAAQ,EAAE,gBAAgB,CAAC,GAAG;AAC9B,QAAA,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC;AACtC,QAAA,aAAa,EAAE,MACb,OAAO,wCAAwC,CAAC,CAAC,IAAI,CACnD,CAAC,IAAI,CAAC,CAAC,iCAAiC,CACzC;AACH,QAAA,YAAY,EAAE;AACZ,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,kBAAkB,EAAE;AACrB,SAAA;AACD,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,QAAQ,EAAE;KACX;;;AClFH;;AAEG;;;;"}
|
|
@@ -23,7 +23,7 @@ const linearGaugeWidgetDefinition = {
|
|
|
23
23
|
},
|
|
24
24
|
errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,
|
|
25
25
|
data: {
|
|
26
|
-
schema: () => import('c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/linear-gauge'),
|
|
26
|
+
schema: () => import('c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/linear-gauge'),
|
|
27
27
|
export: exportConfigWithTargets,
|
|
28
28
|
import: importConfigWithTargets,
|
|
29
29
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-linear-gauge.mjs","sources":["../../widgets/definitions/linear-gauge/linear-gauge.constants.ts","../../widgets/definitions/linear-gauge/index.ts","../../widgets/definitions/linear-gauge/c8y-ngx-components-widgets-definitions-linear-gauge.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const LINEAR_GAUGE_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { LINEAR_GAUGE_OPTIONS } from './linear-gauge.constants';\n\nexport const linearGaugeWidgetDefinition = {\n id: defaultWidgetIds.LINEAR_GAUGE,\n label: gettext('Linear Gauge'),\n description: gettext('A linear gauge graph displaying current values for selected measurements'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/linear-gauge-widget-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/linear-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 3\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const linearGaugeWidgetProviders = [\n hookWidget(linearGaugeWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.LINEAR_GAUGE,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: LINEAR_GAUGE_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAA2C;AAC1E,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,UAAU,EAAE;CACb;;ACQM,MAAM,2BAA2B,GAAG;IACzC,EAAE,EAAE,gBAAgB,CAAC,YAAY;AACjC,IAAA,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC;AAC9B,IAAA,WAAW,EAAE,OAAO,CAAC,0EAA0E,CAAC;AAChG,IAAA,aAAa,EAAE,MACb,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,8BAA8B,CACtC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,gCAAgC,CACxC;AACH,IAAA,YAAY,EAAE,6CAA6C;AAC3D,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-linear-gauge.mjs","sources":["../../widgets/definitions/linear-gauge/linear-gauge.constants.ts","../../widgets/definitions/linear-gauge/index.ts","../../widgets/definitions/linear-gauge/c8y-ngx-components-widgets-definitions-linear-gauge.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const LINEAR_GAUGE_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { LINEAR_GAUGE_OPTIONS } from './linear-gauge.constants';\n\nexport const linearGaugeWidgetDefinition = {\n id: defaultWidgetIds.LINEAR_GAUGE,\n label: gettext('Linear Gauge'),\n description: gettext('A linear gauge graph displaying current values for selected measurements'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/linear-gauge-widget-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/linear-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 3\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const linearGaugeWidgetProviders = [\n hookWidget(linearGaugeWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.LINEAR_GAUGE,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: LINEAR_GAUGE_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAA2C;AAC1E,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,UAAU,EAAE;CACb;;ACQM,MAAM,2BAA2B,GAAG;IACzC,EAAE,EAAE,gBAAgB,CAAC,YAAY;AACjC,IAAA,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC;AAC9B,IAAA,WAAW,EAAE,OAAO,CAAC,0EAA0E,CAAC;AAChG,IAAA,aAAa,EAAE,MACb,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,8BAA8B,CACtC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,gCAAgC,CACxC;AACH,IAAA,YAAY,EAAE,6CAA6C;AAC3D,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,qIAAqI,CACtI;AACH,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,QAAQ,EAAE;AACR,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,OAAO,EAAE;AACV,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAAE,IAAI;AACpB,oBAAA,gBAAgB,EAAE;AACnB;AACF;AACF;AACF;;AAGI,MAAM,0BAA0B,GAAG;IACxC,UAAU,CAAC,2BAA2B,CAAC;AACvC,IAAA,gBAAgB,CAAC;QACf,QAAQ,EAAE,gBAAgB,CAAC,YAAY;AACvC,QAAA,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC;AACtC,QAAA,aAAa,EAAE,MACb,OAAO,wCAAwC,CAAC,CAAC,IAAI,CACnD,CAAC,IAAI,CAAC,CAAC,iCAAiC,CACzC;AACH,QAAA,YAAY,EAAE;AACZ,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,kBAAkB,EAAE;AACrB,SAAA;AACD,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,QAAQ,EAAE;KACX;;;ACvEH;;AAEG;;;;"}
|
|
@@ -136,7 +136,7 @@ const mapWidgetDefinition = {
|
|
|
136
136
|
previewImage: 'c8y-style-assets/map-widget-pr.png',
|
|
137
137
|
errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,
|
|
138
138
|
data: {
|
|
139
|
-
schema: () => import('c8y-schema-loader?interfaceName=MapWidgetConfig!@c8y/ngx-components/widgets/implementations/map'),
|
|
139
|
+
schema: () => import('c8y-schema-loader?interfaceName=MapWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/map'),
|
|
140
140
|
export: exportConfigWithDevice,
|
|
141
141
|
import: importConfigWithDevice,
|
|
142
142
|
widgetControls: mapWidgetControls,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-map.mjs","sources":["../../widgets/definitions/map/map-widget-controls-definitions.ts","../../widgets/definitions/map/index.ts","../../widgets/definitions/map/c8y-ngx-components-widgets-definitions-map.ts"],"sourcesContent":["import {\n defineWidgetControls,\n GLOBAL_CONTEXT_DISPLAY_MODE,\n REFRESH_OPTION\n} from '@c8y/ngx-components/global-context';\n\nexport const mapWidgetControls = defineWidgetControls({\n name: 'map-widget',\n supports: ['liveRefresh', 'displayMode', 'refreshInterval', 'refreshOption'],\n supportedModes: [REFRESH_OPTION.LIVE],\n settings: {\n dashboard: {\n live: {\n inline: {\n showAutoRefresh: true\n }\n },\n history: {\n inline: {\n showRefresh: true\n }\n }\n },\n config: {\n live: {\n inline: {\n showAutoRefresh: false,\n showRefresh: true,\n showRefreshInterval: false\n },\n configuration: {\n showAutoRefresh: true,\n showRefreshInterval: true,\n showTimeContext: false\n }\n },\n history: {\n inline: {\n showTimeContext: true\n },\n configuration: {\n showTimeContext: true\n }\n }\n },\n viewAndConfig: {\n live: {\n inline: {\n showAutoRefresh: true,\n showRefreshInterval: false,\n showTimeContext: false\n },\n configuration: {\n showAutoRefresh: true,\n showRefreshInterval: true,\n showTimeContext: false\n }\n },\n history: {\n inline: {\n showRefresh: true\n },\n configuration: {}\n }\n },\n defaultLinks: {\n config: {},\n dashboard: {\n live: {\n isAutoRefreshEnabled: true\n },\n history: {}\n },\n viewAndConfig: {}\n }\n },\n handlers: {\n startFollow: {\n handler: () => ({\n inlineControlSettings: { showAutoRefresh: false },\n dashboardControlSettings: { showAutoRefresh: false },\n links: {},\n options: undefined\n })\n },\n stopFollow: {\n handler: state => {\n const { config } = state;\n const displayMode = config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n const refreshOption = config.refreshOption || REFRESH_OPTION.LIVE;\n const isDashboardMode = displayMode === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n\n if (isDashboardMode) {\n return {\n inlineControlSettings:\n refreshOption === REFRESH_OPTION.LIVE\n ? { showAutoRefresh: false }\n : { showAutoRefresh: true },\n dashboardControlSettings: { showAutoRefresh: false },\n links:\n refreshOption === REFRESH_OPTION.LIVE\n ? { isAutoRefreshEnabled: true }\n : { isAutoRefreshEnabled: false },\n options: undefined\n };\n }\n\n return {\n inlineControlSettings: {},\n dashboardControlSettings: {},\n links: {},\n options: undefined\n };\n }\n },\n disableCounter: {\n handler: () => ({\n inlineControlSettings: {},\n dashboardControlSettings: {},\n links: {},\n options: { noAutoRefreshCounter: true }\n })\n }\n }\n});\n","import { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicManagedObjectResolver,\n DynamicComponentErrorStrategy,\n hookWidget\n} from '@c8y/ngx-components';\nimport type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport {\n hookWidgetConfig,\n GlobalContextSectionComponent\n} from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n importConfigWithDevice,\n exportConfigWithDevice\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { mapWidgetControls } from './map-widget-controls-definitions';\n\nexport const mapWidgetDefinition = {\n id: defaultWidgetIds.MAP,\n label: gettext('Map'),\n description: gettext('Shows the position of a device or all devices in a group.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/map').then(m => m.MapWidgetComponent),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/map').then(m => m.MapWidgetConfigComponent),\n /*providers: [\n\n ],*/\n resolve: {\n device: DynamicManagedObjectResolver\n },\n previewImage: 'c8y-style-assets/map-widget-pr.png',\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=MapWidgetConfig!@c8y/ngx-components/widgets/implementations/map'\n ),\n export: exportConfigWithDevice,\n import: importConfigWithDevice,\n widgetControls: mapWidgetControls,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: false,\n groupsSelectable: true,\n deviceTargetNotRequired: true\n }\n }\n },\n displaySettings: {\n globalTimeContext: false,\n globalAutoRefreshContext: true,\n globalRealtimeContext: true\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const mapWidgetProviders = [\n hookWidget(mapWidgetDefinition),\n hookWidgetConfig<GlobalContextSectionComponent>({\n widgetId: defaultWidgetIds.MAP,\n priority: 10,\n label: gettext('Time context'),\n initialState: {\n widgetControls: mapWidgetControls\n },\n loadComponent: () =>\n import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent)\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMO,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AACpD,IAAA,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC;AAC5E,IAAA,cAAc,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC;AACrC,IAAA,QAAQ,EAAE;AACR,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE;AACJ,gBAAA,MAAM,EAAE;AACN,oBAAA,eAAe,EAAE;AAClB;AACF,aAAA;AACD,YAAA,OAAO,EAAE;AACP,gBAAA,MAAM,EAAE;AACN,oBAAA,WAAW,EAAE;AACd;AACF;AACF,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE;AACJ,gBAAA,MAAM,EAAE;AACN,oBAAA,eAAe,EAAE,KAAK;AACtB,oBAAA,WAAW,EAAE,IAAI;AACjB,oBAAA,mBAAmB,EAAE;AACtB,iBAAA;AACD,gB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EAAE,MACb,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC;AAC3F,IAAA,mBAAmB,EAAE,MACnB,OAAO,iDAAiD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,wBAAwB,CAAC;AACjG;;AAEI;AACJ,IAAA,OAAO,EAAE;AACP,QAAA,MAAM,EAAE;AACT,KAAA;AACD,IAAA,YAAY,EAAE,oCAAoC;IAClD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-map.mjs","sources":["../../widgets/definitions/map/map-widget-controls-definitions.ts","../../widgets/definitions/map/index.ts","../../widgets/definitions/map/c8y-ngx-components-widgets-definitions-map.ts"],"sourcesContent":["import {\n defineWidgetControls,\n GLOBAL_CONTEXT_DISPLAY_MODE,\n REFRESH_OPTION\n} from '@c8y/ngx-components/global-context';\n\nexport const mapWidgetControls = defineWidgetControls({\n name: 'map-widget',\n supports: ['liveRefresh', 'displayMode', 'refreshInterval', 'refreshOption'],\n supportedModes: [REFRESH_OPTION.LIVE],\n settings: {\n dashboard: {\n live: {\n inline: {\n showAutoRefresh: true\n }\n },\n history: {\n inline: {\n showRefresh: true\n }\n }\n },\n config: {\n live: {\n inline: {\n showAutoRefresh: false,\n showRefresh: true,\n showRefreshInterval: false\n },\n configuration: {\n showAutoRefresh: true,\n showRefreshInterval: true,\n showTimeContext: false\n }\n },\n history: {\n inline: {\n showTimeContext: true\n },\n configuration: {\n showTimeContext: true\n }\n }\n },\n viewAndConfig: {\n live: {\n inline: {\n showAutoRefresh: true,\n showRefreshInterval: false,\n showTimeContext: false\n },\n configuration: {\n showAutoRefresh: true,\n showRefreshInterval: true,\n showTimeContext: false\n }\n },\n history: {\n inline: {\n showRefresh: true\n },\n configuration: {}\n }\n },\n defaultLinks: {\n config: {},\n dashboard: {\n live: {\n isAutoRefreshEnabled: true\n },\n history: {}\n },\n viewAndConfig: {}\n }\n },\n handlers: {\n startFollow: {\n handler: () => ({\n inlineControlSettings: { showAutoRefresh: false },\n dashboardControlSettings: { showAutoRefresh: false },\n links: {},\n options: undefined\n })\n },\n stopFollow: {\n handler: state => {\n const { config } = state;\n const displayMode = config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n const refreshOption = config.refreshOption || REFRESH_OPTION.LIVE;\n const isDashboardMode = displayMode === GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;\n\n if (isDashboardMode) {\n return {\n inlineControlSettings:\n refreshOption === REFRESH_OPTION.LIVE\n ? { showAutoRefresh: false }\n : { showAutoRefresh: true },\n dashboardControlSettings: { showAutoRefresh: false },\n links:\n refreshOption === REFRESH_OPTION.LIVE\n ? { isAutoRefreshEnabled: true }\n : { isAutoRefreshEnabled: false },\n options: undefined\n };\n }\n\n return {\n inlineControlSettings: {},\n dashboardControlSettings: {},\n links: {},\n options: undefined\n };\n }\n },\n disableCounter: {\n handler: () => ({\n inlineControlSettings: {},\n dashboardControlSettings: {},\n links: {},\n options: { noAutoRefreshCounter: true }\n })\n }\n }\n});\n","import { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicManagedObjectResolver,\n DynamicComponentErrorStrategy,\n hookWidget\n} from '@c8y/ngx-components';\nimport type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport {\n hookWidgetConfig,\n GlobalContextSectionComponent\n} from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n importConfigWithDevice,\n exportConfigWithDevice\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { mapWidgetControls } from './map-widget-controls-definitions';\n\nexport const mapWidgetDefinition = {\n id: defaultWidgetIds.MAP,\n label: gettext('Map'),\n description: gettext('Shows the position of a device or all devices in a group.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/map').then(m => m.MapWidgetComponent),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/map').then(m => m.MapWidgetConfigComponent),\n /*providers: [\n\n ],*/\n resolve: {\n device: DynamicManagedObjectResolver\n },\n previewImage: 'c8y-style-assets/map-widget-pr.png',\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=MapWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/map'\n ),\n export: exportConfigWithDevice,\n import: importConfigWithDevice,\n widgetControls: mapWidgetControls,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: false,\n groupsSelectable: true,\n deviceTargetNotRequired: true\n }\n }\n },\n displaySettings: {\n globalTimeContext: false,\n globalAutoRefreshContext: true,\n globalRealtimeContext: true\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const mapWidgetProviders = [\n hookWidget(mapWidgetDefinition),\n hookWidgetConfig<GlobalContextSectionComponent>({\n widgetId: defaultWidgetIds.MAP,\n priority: 10,\n label: gettext('Time context'),\n initialState: {\n widgetControls: mapWidgetControls\n },\n loadComponent: () =>\n import('@c8y/ngx-components/context-dashboard').then(m => m.GlobalContextSectionComponent)\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMO,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AACpD,IAAA,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC;AAC5E,IAAA,cAAc,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC;AACrC,IAAA,QAAQ,EAAE;AACR,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE;AACJ,gBAAA,MAAM,EAAE;AACN,oBAAA,eAAe,EAAE;AAClB;AAC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M,kBAAkB,GAAG;IAChC,UAAU,CAAC,mBAAmB,CAAC;AAC/B,IAAA,gBAAgB,CAAgC;QAC9C,QAAQ,EAAE,gBAAgB,CAAC,GAAG;AAC9B,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC;AAC9B,QAAA,YAAY,EAAE;AACZ,YAAA,cAAc,EAAE;AACjB,SAAA;AACD,QAAA,aAAa,EAAE,MACb,OAAO,uCAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,6BAA6B;KAC5F;;;AC3EH;;AAEG;;;;"}
|
|
@@ -11,7 +11,7 @@ const markdownWidgetDefinition = {
|
|
|
11
11
|
loadConfigComponent: () => import('@c8y/ngx-components/widgets/implementations/markdown').then(m => m.MarkdownWidgetConfigComponent),
|
|
12
12
|
previewImage: 'c8y-style-assets/markdown-widget.png',
|
|
13
13
|
data: {
|
|
14
|
-
schema: () => import('c8y-schema-loader?interfaceName=MarkdownWidgetConfig!@c8y/ngx-components/widgets/implementations/markdown'),
|
|
14
|
+
schema: () => import('c8y-schema-loader?interfaceName=MarkdownWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/markdown'),
|
|
15
15
|
export: exportMarkdownWidgetConfig,
|
|
16
16
|
import: importMarkdownWidgetConfig,
|
|
17
17
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-markdown.mjs","sources":["../../widgets/definitions/markdown/index.ts","../../widgets/definitions/markdown/c8y-ngx-components-widgets-definitions-markdown.ts"],"sourcesContent":["import type {\n DynamicWidgetDefinition,\n WidgetImportExportInjectorOptions\n} from '@c8y/ngx-components';\nimport { hookWidget } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { inject, Injector } from '@angular/core';\nimport type { MarkdownWidgetConfig } from '@c8y/ngx-components/widgets/implementations/markdown';\nimport type { DashboardMetadata } from '@c8y/ngx-components/context-dashboard';\n\nexport interface ExportedMarkdownWidgetConfig extends MarkdownWidgetConfig {\n markdownDetails?: { file: { name: string; type: string }; text: string };\n}\n\nexport const markdownWidgetDefinition = {\n id: defaultWidgetIds.MARKDOWN,\n label: gettext('Markdown widget'),\n description: gettext(\n 'Display content provided as Markdown. You can write Markdown text directly, upload a file, or provide a file path.'\n ),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/markdown').then(\n m => m.MarkdownWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/markdown').then(\n m => m.MarkdownWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/markdown-widget.png',\n\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=MarkdownWidgetConfig!@c8y/ngx-components/widgets/implementations/markdown'\n ),\n export: exportMarkdownWidgetConfig,\n import: importMarkdownWidgetConfig,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const markdownWidgetProviders = [hookWidget(markdownWidgetDefinition)];\n\nasync function exportMarkdownWidgetConfig(\n config: MarkdownWidgetConfig,\n _dashboardData: DashboardMetadata,\n _options: WidgetImportExportInjectorOptions\n): Promise<ExportedMarkdownWidgetConfig> {\n const { MarkdownWidgetService } = await import(\n '@c8y/ngx-components/widgets/implementations/markdown'\n );\n const injector = inject(Injector);\n if (config.contentUrl && !config.markdownBinaryId) {\n return config;\n }\n const markdownWidgetService = injector.get(MarkdownWidgetService);\n const file = await markdownWidgetService.getFile(config.markdownBinaryId);\n const content = await file.text();\n\n return {\n ...config,\n markdownDetails: {\n text: content,\n file: {\n name: file.name,\n type: file.type\n }\n }\n };\n}\n\nasync function importMarkdownWidgetConfig(\n config: ExportedMarkdownWidgetConfig,\n _dashboardData: DashboardMetadata,\n _options: WidgetImportExportInjectorOptions\n): Promise<MarkdownWidgetConfig> {\n const { MarkdownWidgetService } = await import(\n '@c8y/ngx-components/widgets/implementations/markdown'\n );\n if (!config.markdownDetails) {\n return config;\n }\n const injector = inject(Injector);\n const markdownService = injector.get(MarkdownWidgetService);\n const fileToUpload = new File([config.markdownDetails.text], config.markdownDetails.file.name, {\n type: config.markdownDetails.file.type\n });\n const markdownBinaryId = await markdownService.uploadFile(fileToUpload);\n\n return {\n contentUrl: config.contentUrl,\n markdownBinaryId,\n markdownContent: null\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAeO,MAAM,wBAAwB,GAAG;IACtC,EAAE,EAAE,gBAAgB,CAAC,QAAQ;AAC7B,IAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,IAAA,WAAW,EAAE,OAAO,CAClB,oHAAoH,CACrH;AACD,IAAA,aAAa,EAAE,MACb,OAAO,sDAAsD,CAAC,CAAC,IAAI,CACjE,CAAC,IAAI,CAAC,CAAC,2BAA2B,CACnC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,sDAAsD,CAAC,CAAC,IAAI,CACjE,CAAC,IAAI,CAAC,CAAC,6BAA6B,CACrC;AACH,IAAA,YAAY,EAAE,sCAAsC;AAEpD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-markdown.mjs","sources":["../../widgets/definitions/markdown/index.ts","../../widgets/definitions/markdown/c8y-ngx-components-widgets-definitions-markdown.ts"],"sourcesContent":["import type {\n DynamicWidgetDefinition,\n WidgetImportExportInjectorOptions\n} from '@c8y/ngx-components';\nimport { hookWidget } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { inject, Injector } from '@angular/core';\nimport type { MarkdownWidgetConfig } from '@c8y/ngx-components/widgets/implementations/markdown';\nimport type { DashboardMetadata } from '@c8y/ngx-components/context-dashboard';\n\nexport interface ExportedMarkdownWidgetConfig extends MarkdownWidgetConfig {\n markdownDetails?: { file: { name: string; type: string }; text: string };\n}\n\nexport const markdownWidgetDefinition = {\n id: defaultWidgetIds.MARKDOWN,\n label: gettext('Markdown widget'),\n description: gettext(\n 'Display content provided as Markdown. You can write Markdown text directly, upload a file, or provide a file path.'\n ),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/markdown').then(\n m => m.MarkdownWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/markdown').then(\n m => m.MarkdownWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/markdown-widget.png',\n\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=MarkdownWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/markdown'\n ),\n export: exportMarkdownWidgetConfig,\n import: importMarkdownWidgetConfig,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const markdownWidgetProviders = [hookWidget(markdownWidgetDefinition)];\n\nasync function exportMarkdownWidgetConfig(\n config: MarkdownWidgetConfig,\n _dashboardData: DashboardMetadata,\n _options: WidgetImportExportInjectorOptions\n): Promise<ExportedMarkdownWidgetConfig> {\n const { MarkdownWidgetService } = await import(\n '@c8y/ngx-components/widgets/implementations/markdown'\n );\n const injector = inject(Injector);\n if (config.contentUrl && !config.markdownBinaryId) {\n return config;\n }\n const markdownWidgetService = injector.get(MarkdownWidgetService);\n const file = await markdownWidgetService.getFile(config.markdownBinaryId);\n const content = await file.text();\n\n return {\n ...config,\n markdownDetails: {\n text: content,\n file: {\n name: file.name,\n type: file.type\n }\n }\n };\n}\n\nasync function importMarkdownWidgetConfig(\n config: ExportedMarkdownWidgetConfig,\n _dashboardData: DashboardMetadata,\n _options: WidgetImportExportInjectorOptions\n): Promise<MarkdownWidgetConfig> {\n const { MarkdownWidgetService } = await import(\n '@c8y/ngx-components/widgets/implementations/markdown'\n );\n if (!config.markdownDetails) {\n return config;\n }\n const injector = inject(Injector);\n const markdownService = injector.get(MarkdownWidgetService);\n const fileToUpload = new File([config.markdownDetails.text], config.markdownDetails.file.name, {\n type: config.markdownDetails.file.type\n });\n const markdownBinaryId = await markdownService.uploadFile(fileToUpload);\n\n return {\n contentUrl: config.contentUrl,\n markdownBinaryId,\n markdownContent: null\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAeO,MAAM,wBAAwB,GAAG;IACtC,EAAE,EAAE,gBAAgB,CAAC,QAAQ;AAC7B,IAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,IAAA,WAAW,EAAE,OAAO,CAClB,oHAAoH,CACrH;AACD,IAAA,aAAa,EAAE,MACb,OAAO,sDAAsD,CAAC,CAAC,IAAI,CACjE,CAAC,IAAI,CAAC,CAAC,2BAA2B,CACnC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,sDAAsD,CAAC,CAAC,IAAI,CACjE,CAAC,IAAI,CAAC,CAAC,6BAA6B,CACrC;AACH,IAAA,YAAY,EAAE,sCAAsC;AAEpD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,8HAA8H,CAC/H;AACH,QAAA,MAAM,EAAE,0BAA0B;AAClC,QAAA,MAAM,EAAE,0BAA0B;AAClC,QAAA,QAAQ,EAAE;AACR,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,OAAO,EAAE;AACV,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAA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AAM,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;AAC7F,QAAA,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnC,KAAA,CAAC;IACF,MAAM,gBAAgB,GAAG,MAAM,eAAe,CAAC,UAAU,CAAC,YAAY,CAAC;IAEvE,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,gBAAgB;AAChB,QAAA,eAAe,EAAE;KAClB;AACH;;AC3GA;;AAEG;;;;"}
|
|
@@ -24,7 +24,7 @@ const radialGaugeWidgetDefinition = {
|
|
|
24
24
|
datapoints: DynamicDatapointsResolver
|
|
25
25
|
},
|
|
26
26
|
data: {
|
|
27
|
-
schema: () => import('c8y-schema-loader?interfaceName=InfoGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/info-gauge'),
|
|
27
|
+
schema: () => import('c8y-schema-loader?interfaceName=InfoGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/info-gauge'),
|
|
28
28
|
export: exportConfigWithTargets,
|
|
29
29
|
import: importConfigWithTargets,
|
|
30
30
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-radial-gauge.mjs","sources":["../../widgets/definitions/radial-gauge/radial-gauge.constants.ts","../../widgets/definitions/radial-gauge/index.ts","../../widgets/definitions/radial-gauge/c8y-ngx-components-widgets-definitions-radial-gauge.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const RADIAL_GAUGE_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n selectableChartRenderTypes: []\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { DynamicDatapointsResolver, hookWidget } from '@c8y/ngx-components';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { RADIAL_GAUGE_OPTIONS } from './radial-gauge.constants';\n\nexport const radialGaugeWidgetDefinition = {\n id: defaultWidgetIds.RADIAL_GAUGE,\n label: gettext('Radial gauge'),\n // Info gauge config and view components are used for the radial gauge. Eventually both will be merged into one component.\n description: gettext('Shows the device measurements in a radial gauge.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/info-gauge').then(\n m => m.InfoGaugeWidgetViewComponent\n ),\n // Gauge type is determined in the component\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/info-gauge').then(\n m => m.InfoGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/radial-gauge-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=InfoGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/info-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const radialGaugeWidgetProviders = [\n hookWidget(radialGaugeWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.RADIAL_GAUGE,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: RADIAL_GAUGE_OPTIONS,\n controlName: 'datapointsGauge'\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAA2C;AAC1E,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,0BAA0B,EAAE;CAC7B;;ACIM,MAAM,2BAA2B,GAAG;IACzC,EAAE,EAAE,gBAAgB,CAAC,YAAY;AACjC,IAAA,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC;;AAE9B,IAAA,WAAW,EAAE,OAAO,CAAC,kDAAkD,CAAC;AACxE,IAAA,aAAa,EAAE,MACb,OAAO,wDAAwD,CAAC,CAAC,IAAI,CACnE,CAAC,IAAI,CAAC,CAAC,4BAA4B,CACpC;;AAEH,IAAA,mBAAmB,EAAE,MACnB,OAAO,wDAAwD,CAAC,CAAC,IAAI,CACnE,CAAC,IAAI,CAAC,CAAC,8BAA8B,CACtC;AACH,IAAA,YAAY,EAAE,sCAAsC;AACpD,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;AACD,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-radial-gauge.mjs","sources":["../../widgets/definitions/radial-gauge/radial-gauge.constants.ts","../../widgets/definitions/radial-gauge/index.ts","../../widgets/definitions/radial-gauge/c8y-ngx-components-widgets-definitions-radial-gauge.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const RADIAL_GAUGE_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n selectableChartRenderTypes: []\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { DynamicDatapointsResolver, hookWidget } from '@c8y/ngx-components';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { RADIAL_GAUGE_OPTIONS } from './radial-gauge.constants';\n\nexport const radialGaugeWidgetDefinition = {\n id: defaultWidgetIds.RADIAL_GAUGE,\n label: gettext('Radial gauge'),\n // Info gauge config and view components are used for the radial gauge. Eventually both will be merged into one component.\n description: gettext('Shows the device measurements in a radial gauge.'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/info-gauge').then(\n m => m.InfoGaugeWidgetViewComponent\n ),\n // Gauge type is determined in the component\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/info-gauge').then(\n m => m.InfoGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/radial-gauge-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=InfoGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/info-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const radialGaugeWidgetProviders = [\n hookWidget(radialGaugeWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.RADIAL_GAUGE,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: RADIAL_GAUGE_OPTIONS,\n controlName: 'datapointsGauge'\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAA2C;AAC1E,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,E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;AACH,QAAA,YAAY,EAAE;AACZ,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,cAAc,EAAE,CAAC;AACjB,YAAA,kBAAkB,EAAE,oBAAoB;AACxC,YAAA,WAAW,EAAE;AACd,SAAA;AACD,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,QAAQ,EAAE;KACX;;;ACrEH;;AAEG;;;;"}
|
|
@@ -23,7 +23,7 @@ const siloWidgetDefinition = {
|
|
|
23
23
|
},
|
|
24
24
|
errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,
|
|
25
25
|
data: {
|
|
26
|
-
schema: () => import('c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/linear-gauge'),
|
|
26
|
+
schema: () => import('c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/linear-gauge'),
|
|
27
27
|
export: exportConfigWithTargets,
|
|
28
28
|
import: importConfigWithTargets,
|
|
29
29
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-silo.mjs","sources":["../../widgets/definitions/silo/silo.constants.ts","../../widgets/definitions/silo/index.ts","../../widgets/definitions/silo/c8y-ngx-components-widgets-definitions-silo.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const SILO_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { SILO_OPTIONS } from './silo.constants';\n\nexport const siloWidgetDefinition = {\n id: defaultWidgetIds.SILO,\n label: gettext('Silo'),\n description: gettext('A silo displaying current values for selected measurements'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/silo-widget-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig!@c8y/ngx-components/widgets/implementations/linear-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const siloWidgetProviders = [\n hookWidget(siloWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.SILO,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: SILO_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,YAAY,GAA2C;AAClE,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,UAAU,EAAE;CACb;;ACQM,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,gBAAgB,CAAC,IAAI;AACzB,IAAA,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC;AACtB,IAAA,WAAW,EAAE,OAAO,CAAC,4DAA4D,CAAC;AAClF,IAAA,aAAa,EAAE,MACb,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,8BAA8B,CACtC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,0DAA0D,CAAC,CAAC,IAAI,CACrE,CAAC,IAAI,CAAC,CAAC,gCAAgC,CACxC;AACH,IAAA,YAAY,EAAE,qCAAqC;AACnD,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACb,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-silo.mjs","sources":["../../widgets/definitions/silo/silo.constants.ts","../../widgets/definitions/silo/index.ts","../../widgets/definitions/silo/c8y-ngx-components-widgets-definitions-silo.ts"],"sourcesContent":["import { DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector';\n\nexport const SILO_OPTIONS: Partial<DatapointAttributesFormConfig> = {\n showRedRange: true,\n showYellowRange: true,\n showRange: true,\n showTarget: true\n};\n","import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n hookWidget\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { hookWidgetConfig } from '@c8y/ngx-components/context-dashboard';\nimport { SILO_OPTIONS } from './silo.constants';\n\nexport const siloWidgetDefinition = {\n id: defaultWidgetIds.SILO,\n label: gettext('Silo'),\n description: gettext('A silo displaying current values for selected measurements'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/linear-gauge').then(\n m => m.LinearGaugeWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/silo-widget-pr.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=LinearGaugeWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/linear-gauge'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 4,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const siloWidgetProviders = [\n hookWidget(siloWidgetDefinition),\n hookWidgetConfig({\n widgetId: defaultWidgetIds.SILO,\n label: gettext('Data point selection'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-selector').then(\n m => m.WidgetDatapointsSelectorComponent\n ),\n initialState: {\n minActiveCount: 1,\n maxActiveCount: 1,\n defaultFormOptions: SILO_OPTIONS\n },\n expanded: true,\n priority: 100\n })\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,YAAY,GAA2C;AAClE,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,UAAU,EAAE;CACb;;ACQM,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,gBAAgB,CAAC,IAAI;AACzB,IAAA,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC;AACtB,IAAA,WAAW,EAAE,OAAO,CAAC,4DAA4D,CAAC;AAClF,IAAA,aAAa,EAAE,MACb,OAAO,0D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idgetDefinition = {
|
|
|
15
15
|
},
|
|
16
16
|
errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,
|
|
17
17
|
data: {
|
|
18
|
-
schema: () => import('c8y-schema-loader?interfaceName=ThreeDRotationWidgetConfig!@c8y/ngx-components/widgets/implementations/three-d-rotation'),
|
|
18
|
+
schema: () => import('c8y-schema-loader?interfaceName=ThreeDRotationWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/three-d-rotation'),
|
|
19
19
|
export: exportConfigWithDevice,
|
|
20
20
|
import: importConfigWithDevice,
|
|
21
21
|
settings: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-widgets-definitions-three-d-rotation.mjs","sources":["../../widgets/definitions/three-d-rotation/index.ts","../../widgets/definitions/three-d-rotation/c8y-ngx-components-widgets-definitions-three-d-rotation.ts"],"sourcesContent":["import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n hookWidget,\n DynamicComponentErrorStrategy,\n DynamicManagedObjectResolver\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n importConfigWithDevice,\n exportConfigWithDevice\n} from '@c8y/ngx-components/widgets/import-export-config';\n\nexport const threeDRotationWidgetDefinition = {\n id: defaultWidgetIds.THREE_D_ROTATION,\n label: gettext('Rotation widget'),\n description: gettext('Displays current device orientation'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/three-d-rotation').then(\n m => m.ThreeDRotationWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/three-d-rotation').then(\n m => m.ThreeDRotationWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/rotation-widget-pr.png',\n resolve: {\n device: DynamicManagedObjectResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=ThreeDRotationWidgetConfig!@c8y/ngx-components/widgets/implementations/three-d-rotation'\n ),\n export: exportConfigWithDevice,\n import: importConfigWithDevice,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: false,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const threeDRotationWidgetProviders = [hookWidget(threeDRotationWidgetDefinition)];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAaO,MAAM,8BAA8B,GAAG;IAC5C,EAAE,EAAE,gBAAgB,CAAC,gBAAgB;AACrC,IAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,IAAA,WAAW,EAAE,OAAO,CAAC,qCAAqC,CAAC;AAC3D,IAAA,aAAa,EAAE,MACb,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,iCAAiC,CACzC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,mCAAmC,CAC3C;AACH,IAAA,YAAY,EAAE,yCAAyC;AACvD,IAAA,OAAO,EAAE;AACP,QAAA,MAAM,EAAE;AACT,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-widgets-definitions-three-d-rotation.mjs","sources":["../../widgets/definitions/three-d-rotation/index.ts","../../widgets/definitions/three-d-rotation/c8y-ngx-components-widgets-definitions-three-d-rotation.ts"],"sourcesContent":["import type { DynamicWidgetDefinition } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n hookWidget,\n DynamicComponentErrorStrategy,\n DynamicManagedObjectResolver\n} from '@c8y/ngx-components';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n importConfigWithDevice,\n exportConfigWithDevice\n} from '@c8y/ngx-components/widgets/import-export-config';\n\nexport const threeDRotationWidgetDefinition = {\n id: defaultWidgetIds.THREE_D_ROTATION,\n label: gettext('Rotation widget'),\n description: gettext('Displays current device orientation'),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/three-d-rotation').then(\n m => m.ThreeDRotationWidgetViewComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/three-d-rotation').then(\n m => m.ThreeDRotationWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/rotation-widget-pr.png',\n resolve: {\n device: DynamicManagedObjectResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=ThreeDRotationWidgetConfig&type=widget-config!@c8y/ngx-components/widgets/implementations/three-d-rotation'\n ),\n export: exportConfigWithDevice,\n import: importConfigWithDevice,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: false,\n groupsSelectable: false\n }\n }\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const threeDRotationWidgetProviders = [hookWidget(threeDRotationWidgetDefinition)];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAaO,MAAM,8BAA8B,GAAG;IAC5C,EAAE,EAAE,gBAAgB,CAAC,gBAAgB;AACrC,IAAA,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC;AACjC,IAAA,WAAW,EAAE,OAAO,CAAC,qCAAqC,CAAC;AAC3D,IAAA,aAAa,EAAE,MACb,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,iCAAiC,CACzC;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,mCAAmC,CAC3C;AACH,IAAA,YAAY,EAAE,yCAAyC;AACvD,IAAA,OAAO,EAAE;AACP,QAAA,MAAM,EAAE;AACT,KAAA;IACD,aAAa,EAAE,6BAA6B,CAAC,aAAa;AAC1D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MACN,OACE,4IAA4I,CAC7I;AACH,QAAA,MAAM,EAAE,sBAAsB;AAC9B,QAAA,MAAM,EAAE,sBAAsB;AAC9B,QAAA,QAAQ,EAAE;AACR,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,cAAc,EAAE;AACd,gBAAA,MAAM,EAAE,CAAC;AACT,gBAAA,OAAO,EAAE;AACV,aAAA;AACD,YAAA,GAAG,EAAE;AACH,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAAE,KAAK;AACrB,oBAAA,gBAAgB,EAAE;AACnB;AACF;AACF;AACF;;AAGI,MAAM,6BAA6B,GAAG,CAAC,UAAU,CAAC,8BAA8B,CAAC;;ACrDxF;;AAEG;;;;"}
|
|
@@ -10,11 +10,11 @@ import { FormGroupComponent, RequiredInputPlaceholderDirective, IconDirective, M
|
|
|
10
10
|
import * as i1 from '@c8y/ngx-components/alarms';
|
|
11
11
|
import { ALARM_STATUS_ICON, DEFAULT_SEVERITY_VALUES, DEFAULT_STATUS_VALUES, AlarmsDateFilterComponent, AlarmsListComponent, AlarmsModule } from '@c8y/ngx-components/alarms';
|
|
12
12
|
import * as i6 from '@c8y/ngx-components/context-dashboard';
|
|
13
|
-
import { PRESET_NAME,
|
|
13
|
+
import { PRESET_NAME, REFRESH_OPTION, DateTimeContextUtil, LocalControlsComponent, WidgetConfigMigrationService, GLOBAL_CONTEXT_DISPLAY_MODE, CONTEXT_FEATURE, GlobalContextConnectorComponent, GlobalContextConfigComponent, GlobalContextInlineComponent, ConfigContextSelectorComponent, GlobalContextWidgetWrapperComponent } from '@c8y/ngx-components/global-context';
|
|
14
14
|
import { merge, isEmpty, isMatch } from 'lodash-es';
|
|
15
15
|
import { PopoverDirective, PopoverModule } from 'ngx-bootstrap/popover';
|
|
16
16
|
import { BehaviorSubject, Subject, EMPTY, from } from 'rxjs';
|
|
17
|
-
import { filter, tap, takeUntil, shareReplay, switchMap } from 'rxjs/operators';
|
|
17
|
+
import { filter, tap, takeUntil, shareReplay, map, switchMap } from 'rxjs/operators';
|
|
18
18
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
19
19
|
import { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';
|
|
20
20
|
import { RouterModule } from '@angular/router';
|
|
@@ -485,7 +485,7 @@ class AlarmListWidgetConfigComponent {
|
|
|
485
485
|
*/
|
|
486
486
|
this.statusList = [AlarmStatus.ACTIVE, AlarmStatus.ACKNOWLEDGED, AlarmStatus.CLEARED];
|
|
487
487
|
this.destroy$ = new Subject();
|
|
488
|
-
this.config$ = this.widgetConfigService.currentConfig$.pipe(filter(config => !!config), filter(c => c.dateTimeContext), tap(config => {
|
|
488
|
+
this.config$ = this.widgetConfigService.currentConfig$.pipe(filter(config => !!config), filter(c => !!c.dateTimeContext), tap(config => {
|
|
489
489
|
if (!this.formGroup) {
|
|
490
490
|
this.initializeForm();
|
|
491
491
|
}
|
|
@@ -498,12 +498,14 @@ class AlarmListWidgetConfigComponent {
|
|
|
498
498
|
}
|
|
499
499
|
ngOnInit() {
|
|
500
500
|
this.config$
|
|
501
|
-
.pipe(takeUntil(this.destroy$), filter(config => {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
501
|
+
.pipe(takeUntil(this.destroy$), filter(config => config?.isGlobalContextReady === true), map(config => {
|
|
502
|
+
if (config.refreshOption !== REFRESH_OPTION.HISTORY && config.dateTimeContext) {
|
|
503
|
+
return {
|
|
504
|
+
...config,
|
|
505
|
+
dateTimeContext: DateTimeContextUtil.normalizeForLive(config.dateTimeContext)
|
|
506
|
+
};
|
|
505
507
|
}
|
|
506
|
-
return
|
|
508
|
+
return config;
|
|
507
509
|
}), switchMap(config => {
|
|
508
510
|
if ((config?.severities && this.alarmListWidgetService.allValuesFalse(config.severities)) ||
|
|
509
511
|
(config?.status && this.alarmListWidgetService.allValuesFalse(config.status))) {
|
|
@@ -669,58 +671,12 @@ class AlarmListWidgetComponent {
|
|
|
669
671
|
this.unsubscribe$ = new Subject();
|
|
670
672
|
this.hasPermissions = true;
|
|
671
673
|
}
|
|
672
|
-
|
|
674
|
+
ngOnInit() {
|
|
673
675
|
this.alerts.setAlertGroupDismissStrategy('warning', DismissAlertStrategy.TEMPORARY_OR_PERMANENT);
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
isEmpty(this.config) ||
|
|
679
|
-
(isMatch(this.config, { displaySettings: { globalAutoRefreshContext: true } }) &&
|
|
680
|
-
!this.config['options']?.device &&
|
|
681
|
-
!this.config.types &&
|
|
682
|
-
!this.config.status &&
|
|
683
|
-
!this.config.severities);
|
|
684
|
-
if (isLegacyWidgetWithoutConfiguration) {
|
|
685
|
-
let updatedId = alarmsWidgetId;
|
|
686
|
-
const assetAlarms = this.dashboardChild['data']?.title === 'Active, critical alarms' && 'Asset alarms';
|
|
687
|
-
const recentAlarms = this.dashboardChild['data']?.title === 'Recent alarms' && 'Recent alarms';
|
|
688
|
-
if (assetAlarms) {
|
|
689
|
-
updatedId = ASSET_ALARMS_WIDGET_ID;
|
|
690
|
-
}
|
|
691
|
-
if (recentAlarms) {
|
|
692
|
-
updatedId = RECENT_ALARMS_WIDGET_ID;
|
|
693
|
-
}
|
|
694
|
-
this.setLegacyRecentOrCriticalAlarmWidgetConfig(updatedId);
|
|
695
|
-
this.config.widgetId = updatedId;
|
|
696
|
-
}
|
|
697
|
-
else if (this.alarmWidgetService.isOldAlarmConfigStructure(this.config)) {
|
|
698
|
-
const mappedConfig = this.alarmWidgetService.mapToNewConfigStructure(this.config);
|
|
699
|
-
Object.assign(this.config, mappedConfig);
|
|
700
|
-
}
|
|
701
|
-
if (this.config?.widgetId === RECENT_ALARMS_WIDGET_ID ||
|
|
702
|
-
this.config?.widgetId === ASSET_ALARMS_WIDGET_ID) {
|
|
703
|
-
this.widgetControls.set(PRESET_NAME.ALARM_LIST_LEGACY);
|
|
704
|
-
}
|
|
705
|
-
const migratedConfig = this.widgetConfigMigrationService.migrateWidgetConfig(this.config);
|
|
706
|
-
this.config = merge(this.config, migratedConfig);
|
|
707
|
-
const resolvedWidgetId = this.config?.widgetId ?? alarmsWidgetId ?? defaultWidgetIds.ALARM_LIST;
|
|
708
|
-
this.config.widgetId = resolvedWidgetId;
|
|
709
|
-
const displayMode = this.config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
|
|
710
|
-
this.displayMode.set(displayMode);
|
|
711
|
-
const initialContextConfig = {
|
|
712
|
-
dateTimeContext: this.config.dateTimeContext,
|
|
713
|
-
aggregation: this.config.aggregation,
|
|
714
|
-
isAutoRefreshEnabled: this.config.isAutoRefreshEnabled,
|
|
715
|
-
refreshInterval: this.config.refreshInterval,
|
|
716
|
-
refreshOption: this.config.refreshOption
|
|
717
|
-
};
|
|
718
|
-
this.contextConfig.set(initialContextConfig);
|
|
719
|
-
// In dashboard mode, wait for GlobalContextConnector to emit the first state
|
|
720
|
-
// In config modes, fetch immediately with widget config
|
|
721
|
-
if (displayMode !== GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD) {
|
|
722
|
-
await this.fetchAlarms();
|
|
723
|
-
}
|
|
676
|
+
this.migrateConfig();
|
|
677
|
+
this.resolveDisplayMode();
|
|
678
|
+
this.initContextConfig();
|
|
679
|
+
// First fetch is triggered by controls/connector emitting initial configChange.
|
|
724
680
|
}
|
|
725
681
|
ngOnDestroy() {
|
|
726
682
|
if (this.config?.isRealtime) {
|
|
@@ -752,6 +708,57 @@ class AlarmListWidgetComponent {
|
|
|
752
708
|
this.contextConfig.set({ ...current, isAutoRefreshEnabled: !isScrolling });
|
|
753
709
|
this.isLinkedToGlobal.set(!isScrolling);
|
|
754
710
|
}
|
|
711
|
+
migrateConfig() {
|
|
712
|
+
const alarmsWidgetId = this.dashboardChild['data']?.componentId ?? this.dashboardChild['data']?.name;
|
|
713
|
+
if (this.isLegacyWidgetWithoutConfig(alarmsWidgetId)) {
|
|
714
|
+
const updatedId = this.resolveLegacyWidgetId(alarmsWidgetId);
|
|
715
|
+
this.setLegacyRecentOrCriticalAlarmWidgetConfig(updatedId);
|
|
716
|
+
this.config.widgetId = updatedId;
|
|
717
|
+
}
|
|
718
|
+
else if (this.alarmWidgetService.isOldAlarmConfigStructure(this.config)) {
|
|
719
|
+
const mappedConfig = this.alarmWidgetService.mapToNewConfigStructure(this.config);
|
|
720
|
+
Object.assign(this.config, mappedConfig);
|
|
721
|
+
}
|
|
722
|
+
if (this.config?.widgetId === RECENT_ALARMS_WIDGET_ID ||
|
|
723
|
+
this.config?.widgetId === ASSET_ALARMS_WIDGET_ID) {
|
|
724
|
+
this.widgetControls.set(PRESET_NAME.ALARM_LIST_LEGACY);
|
|
725
|
+
}
|
|
726
|
+
const migratedConfig = this.widgetConfigMigrationService.migrateWidgetConfig(this.config);
|
|
727
|
+
this.config = merge(this.config, migratedConfig);
|
|
728
|
+
this.config.widgetId = this.config?.widgetId ?? alarmsWidgetId ?? defaultWidgetIds.ALARM_LIST;
|
|
729
|
+
}
|
|
730
|
+
isLegacyWidgetWithoutConfig(alarmsWidgetId) {
|
|
731
|
+
const effectiveId = this.config?.widgetId ?? alarmsWidgetId;
|
|
732
|
+
return (effectiveId === defaultWidgetIds.ALL_CRITICAL_ALARMS ||
|
|
733
|
+
effectiveId === defaultWidgetIds.RECENT_ALARMS ||
|
|
734
|
+
isEmpty(this.config) ||
|
|
735
|
+
(isMatch(this.config, { displaySettings: { globalAutoRefreshContext: true } }) &&
|
|
736
|
+
!this.config['options']?.device &&
|
|
737
|
+
!this.config.types &&
|
|
738
|
+
!this.config.status &&
|
|
739
|
+
!this.config.severities));
|
|
740
|
+
}
|
|
741
|
+
resolveLegacyWidgetId(fallbackId) {
|
|
742
|
+
const title = this.dashboardChild['data']?.title;
|
|
743
|
+
if (title === 'Active, critical alarms')
|
|
744
|
+
return ASSET_ALARMS_WIDGET_ID;
|
|
745
|
+
if (title === 'Recent alarms')
|
|
746
|
+
return RECENT_ALARMS_WIDGET_ID;
|
|
747
|
+
return fallbackId;
|
|
748
|
+
}
|
|
749
|
+
resolveDisplayMode() {
|
|
750
|
+
const displayMode = this.config.displayMode || GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD;
|
|
751
|
+
this.displayMode.set(displayMode);
|
|
752
|
+
}
|
|
753
|
+
initContextConfig() {
|
|
754
|
+
this.contextConfig.set({
|
|
755
|
+
dateTimeContext: this.config.dateTimeContext,
|
|
756
|
+
aggregation: this.config.aggregation,
|
|
757
|
+
isAutoRefreshEnabled: this.config.isAutoRefreshEnabled,
|
|
758
|
+
refreshInterval: this.config.refreshInterval,
|
|
759
|
+
refreshOption: this.config.refreshOption
|
|
760
|
+
});
|
|
761
|
+
}
|
|
755
762
|
async fetchAlarms() {
|
|
756
763
|
const alarms = await this.getAlarms();
|
|
757
764
|
this.alarms$.next(alarms);
|