UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

1 lines 4.3 kB
{"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,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,qIAAqI,CACtI;AACH,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,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