{"version":3,"file":"c8y-ngx-components-widgets-definitions-kpi.mjs","sources":["../../widgets/definitions/kpi/index.ts","../../widgets/definitions/kpi/c8y-ngx-components-widgets-definitions-kpi.ts"],"sourcesContent":["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';\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    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 = [hookWidget(kpiWidgetDefinition)];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAaO,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,iGAAiG,CAClG;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,kBAAkB,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC;;ACjDlE;;AAEG;;;;"}