{"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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