UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

1 lines 4.52 kB
{"version":3,"file":"c8y-ngx-components-widgets-definitions-datapoints-table.mjs","sources":["../../widgets/definitions/datapoints-table/index.ts","../../widgets/definitions/datapoints-table/c8y-ngx-components-widgets-definitions-datapoints-table.ts"],"sourcesContent":["import { gettext } from '@c8y/ngx-components/gettext';\nimport {\n DynamicComponentErrorStrategy,\n DynamicDatapointsResolver,\n DynamicWidgetDefinition,\n hookWidget\n} from '@c8y/ngx-components';\nimport {\n GlobalContextSectionComponent,\n hookWidgetConfig\n} from '@c8y/ngx-components/context-dashboard';\nimport { defaultWidgetIds } from '@c8y/ngx-components/widgets/definitions';\nimport {\n exportConfigWithTargets,\n importConfigWithTargets\n} from '@c8y/ngx-components/widgets/import-export-config';\nimport { type WidgetControlsPresetConfig } from '@c8y/ngx-components/global-context';\n\nconst datapointsTableWidgetControls: WidgetControlsPresetConfig = {\n presets: ['defaultWithAggregation']\n};\n\nexport const dataPointsTableWidgetDefinition = {\n id: defaultWidgetIds.DATA_POINTS_TABLE,\n label: gettext('Data points table'),\n description: gettext(`A table display of a collection of data points`),\n loadComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableViewWidgetComponent\n ),\n loadConfigComponent: () =>\n import('@c8y/ngx-components/widgets/implementations/datapoints-table').then(\n m => m.DatapointsTableWidgetConfigComponent\n ),\n previewImage: 'c8y-style-assets/data-points-table-widget.png',\n resolve: {\n datapoints: DynamicDatapointsResolver\n },\n errorStrategy: DynamicComponentErrorStrategy.OVERLAY_ERROR,\n data: {\n schema: () =>\n import(\n 'c8y-schema-loader?interfaceName=DatapointsTableConfig!@c8y/ngx-components/widgets/implementations/datapoints-table'\n ),\n export: exportConfigWithTargets,\n import: importConfigWithTargets,\n widgetControls: datapointsTableWidgetControls,\n settings: {\n noNewWidgets: false,\n widgetDefaults: {\n _width: 8,\n _height: 4\n },\n ng1: {\n options: {\n noDeviceTarget: true,\n minCol: 6,\n datapointAttributes: ['datapoints']\n }\n }\n },\n displaySettings: {\n globalAutoRefreshContext: true,\n globalTimeContext: true,\n globalRealtimeContext: false,\n globalAggregationContext: true\n }\n }\n} satisfies DynamicWidgetDefinition;\n\nexport const dataPointsTableWidgetProviders = [\n hookWidget(dataPointsTableWidgetDefinition),\n hookWidgetConfig<GlobalContextSectionComponent>({\n widgetId: defaultWidgetIds.DATA_POINTS_TABLE,\n priority: 10,\n label: gettext('Time context'),\n initialState: {\n widgetControls: datapointsTableWidgetControls\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":";;;;;;AAkBA,MAAM,6BAA6B,GAA+B;IAChE,OAAO,EAAE,CAAC,wBAAwB;CACnC;AAEM,MAAM,+BAA+B,GAAG;IAC7C,EAAE,EAAE,gBAAgB,CAAC,iBAAiB;AACtC,IAAA,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC;AACnC,IAAA,WAAW,EAAE,OAAO,CAAC,CAAA,8CAAA,CAAgD,CAAC;AACtE,IAAA,aAAa,EAAE,MACb,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,kCAAkC,CAC1C;AACH,IAAA,mBAAmB,EAAE,MACnB,OAAO,8DAA8D,CAAC,CAAC,IAAI,CACzE,CAAC,IAAI,CAAC,CAAC,oCAAoC,CAC5C;AACH,IAAA,YAAY,EAAE,+CAA+C;AAC7D,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;AAC/B,QAAA,cAAc,EAA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