@nova-ui/dashboards 11.12.0-3165 → 12.0.0-3323

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.
Files changed (619) hide show
  1. package/README.md +3 -3
  2. package/bundles/nova-ui-dashboards.umd.js +10310 -9636
  3. package/bundles/nova-ui-dashboards.umd.js.map +1 -1
  4. package/esm2015/lib/common/common.module.js +31 -19
  5. package/esm2015/lib/common/components/preview-overlay/preview-overlay.component.js +12 -8
  6. package/esm2015/lib/common/components/widget-error/widget-error.component.js +24 -19
  7. package/esm2015/lib/common/pipes/dashboard-unit-conversion-pipe.js +9 -8
  8. package/esm2015/lib/components/dashboard/dashboard.component.js +56 -31
  9. package/esm2015/lib/components/dashboard/public-api.js +2 -1
  10. package/esm2015/lib/components/dashboard/types.js +2 -0
  11. package/esm2015/lib/components/embedded-content/embedded-content.component.js +30 -21
  12. package/esm2015/lib/components/kpi-widget/kpi.component.js +41 -25
  13. package/esm2015/lib/components/layouts/base-layout.js +11 -13
  14. package/esm2015/lib/components/layouts/stack/stack.component.js +25 -19
  15. package/esm2015/lib/components/layouts/tiles/tiles.component.js +27 -24
  16. package/esm2015/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.js +30 -24
  17. package/esm2015/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.js +33 -24
  18. package/esm2015/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.js +22 -18
  19. package/esm2015/lib/components/list-widget/list-widget.component.js +28 -21
  20. package/esm2015/lib/components/loading/loading.component.js +28 -22
  21. package/esm2015/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.js +25 -21
  22. package/esm2015/lib/components/proportional-widget/proportional-widget.component.js +45 -29
  23. package/esm2015/lib/components/proportional-widget/types.js +1 -1
  24. package/esm2015/lib/components/providers/data-source-adapter.js +17 -10
  25. package/esm2015/lib/components/providers/drilldown-data-source-adapter.js +10 -9
  26. package/esm2015/lib/components/providers/event-bus-debugger.js +11 -8
  27. package/esm2015/lib/components/providers/interaction/interaction-handler.js +11 -8
  28. package/esm2015/lib/components/providers/interaction/url-interaction-handler.js +15 -11
  29. package/esm2015/lib/components/providers/kpi-color-prioritizer.js +14 -10
  30. package/esm2015/lib/components/providers/kpi-data-source-adapter.js +12 -10
  31. package/esm2015/lib/components/providers/kpi-scale-sync-broker.js +12 -9
  32. package/esm2015/lib/components/providers/kpi-status-content-fallback-adapter.js +12 -9
  33. package/esm2015/lib/components/providers/loading-adapter.js +12 -9
  34. package/esm2015/lib/components/providers/pizzagna-broadcaster.service.js +8 -8
  35. package/esm2015/lib/components/providers/refresher-settings.service.js +9 -7
  36. package/esm2015/lib/components/providers/refresher.js +12 -10
  37. package/esm2015/lib/components/providers/status-content-fallback-adapter.js +12 -9
  38. package/esm2015/lib/components/providers/table-data-source-adapter.js +12 -10
  39. package/esm2015/lib/components/providers/timeseries-data-source-adapter.js +10 -9
  40. package/esm2015/lib/components/table-widget/addons/search-feature-addon.service.js +7 -4
  41. package/esm2015/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.js +7 -4
  42. package/esm2015/lib/components/table-widget/delayed-mouse-presence-detection.directive.js +26 -14
  43. package/esm2015/lib/components/table-widget/table-widget.component.js +76 -48
  44. package/esm2015/lib/components/table-widget/types.js +1 -1
  45. package/esm2015/lib/components/template-load-error/template-load-error.component.js +13 -7
  46. package/esm2015/lib/components/time-frame-selection/timeframe-selection.component.js +35 -26
  47. package/esm2015/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +24 -16
  48. package/esm2015/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js +14 -14
  49. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js +24 -15
  50. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js +24 -15
  51. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js +24 -15
  52. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js +24 -15
  53. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js +18 -12
  54. package/esm2015/lib/components/timeseries-widget/timeseries-chart-preset.service.js +9 -9
  55. package/esm2015/lib/components/timeseries-widget/timeseries-scales.service.js +8 -8
  56. package/esm2015/lib/components/timeseries-widget/timeseries-widget.component.js +25 -17
  57. package/esm2015/lib/components/timeseries-widget/types.js +1 -1
  58. package/esm2015/lib/components/types.js +1 -7
  59. package/esm2015/lib/components/widget/public-api.js +2 -1
  60. package/esm2015/lib/components/widget/types.js +2 -0
  61. package/esm2015/lib/components/widget/widget-body/widget-body.component.js +32 -22
  62. package/esm2015/lib/components/widget/widget-body-content/widget-body-content.component.js +29 -21
  63. package/esm2015/lib/components/widget/widget-header/widget-header.component.js +70 -39
  64. package/esm2015/lib/components/widget/widget.component.js +25 -21
  65. package/esm2015/lib/components/widget-search/widget-search.component.js +28 -19
  66. package/esm2015/lib/configurator/components/color-picker/color-picker.component.js +51 -34
  67. package/esm2015/lib/configurator/components/color-picker/color.service.js +7 -4
  68. package/esm2015/lib/configurator/components/configurator/configurator.component.js +38 -25
  69. package/esm2015/lib/configurator/components/drop-area/drop-area.component.js +12 -8
  70. package/esm2015/lib/configurator/components/form-stack/form-stack.component.js +36 -25
  71. package/esm2015/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.js +15 -14
  72. package/esm2015/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.js +23 -16
  73. package/esm2015/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.js +28 -16
  74. package/esm2015/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.js +12 -13
  75. package/esm2015/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.js +22 -15
  76. package/esm2015/lib/configurator/components/formatters/link-formatter/link-formatter.component.js +18 -14
  77. package/esm2015/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.js +14 -7
  78. package/esm2015/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.js +19 -15
  79. package/esm2015/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.js +25 -15
  80. package/esm2015/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.js +35 -14
  81. package/esm2015/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.js +15 -15
  82. package/esm2015/lib/configurator/components/heading/configurator-heading.component.js +20 -18
  83. package/esm2015/lib/configurator/components/items-dynamic/items-dynamic.component.js +36 -25
  84. package/esm2015/lib/configurator/components/preview-placeholder/preview-placeholder.component.js +12 -8
  85. package/esm2015/lib/configurator/components/types.js +1 -1
  86. package/esm2015/lib/configurator/components/widget-cloner/widget-cloner.component.js +27 -21
  87. package/esm2015/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.js +7 -4
  88. package/esm2015/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.js +33 -26
  89. package/esm2015/lib/configurator/components/widget-editor/widget-editor.component.js +28 -21
  90. package/esm2015/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.js +21 -19
  91. package/esm2015/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.js +29 -20
  92. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.js +36 -26
  93. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.js +36 -26
  94. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.js +18 -16
  95. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.js +14 -12
  96. package/esm2015/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.js +29 -20
  97. package/esm2015/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.js +22 -18
  98. package/esm2015/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.js +34 -23
  99. package/esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.js +42 -29
  100. package/esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.js +37 -26
  101. package/esm2015/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.js +29 -23
  102. package/esm2015/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js +39 -26
  103. package/esm2015/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js +32 -24
  104. package/esm2015/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.js +24 -19
  105. package/esm2015/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.js +28 -21
  106. package/esm2015/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.js +28 -21
  107. package/esm2015/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.js +24 -20
  108. package/esm2015/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.js +20 -18
  109. package/esm2015/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js +40 -26
  110. package/esm2015/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.js +33 -24
  111. package/esm2015/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.js +34 -23
  112. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.js +31 -22
  113. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.js +20 -18
  114. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.js +15 -14
  115. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.js +15 -14
  116. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js +41 -26
  117. package/esm2015/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.js +32 -24
  118. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.js +46 -30
  119. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js +62 -37
  120. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.js +41 -28
  121. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js +37 -27
  122. package/esm2015/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.js +24 -20
  123. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js +33 -23
  124. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.js +25 -19
  125. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.js +34 -24
  126. package/esm2015/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.js +74 -25
  127. package/esm2015/lib/configurator/components/wizard/dashwiz/dashwiz.component.js +51 -33
  128. package/esm2015/lib/configurator/components/wizard/dashwiz/dashwiz.service.js +9 -9
  129. package/esm2015/lib/configurator/components/wizard/dashwiz/model.js +2 -0
  130. package/esm2015/lib/configurator/components/wizard/dashwiz/public-api.js +2 -1
  131. package/esm2015/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.js +37 -23
  132. package/esm2015/lib/configurator/configurator.module.js +252 -57
  133. package/esm2015/lib/configurator/pipe/add-data.pipe.js +8 -4
  134. package/esm2015/lib/configurator/pipe/pizzagna-root.pipe.js +12 -11
  135. package/esm2015/lib/configurator/pipe/widget-configurator-section-header.pipe.js +10 -6
  136. package/esm2015/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.js +11 -7
  137. package/esm2015/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.js +11 -7
  138. package/esm2015/lib/configurator/services/configurator-data-source-manager.service.js +12 -9
  139. package/esm2015/lib/configurator/services/configurator-heading.service.js +7 -4
  140. package/esm2015/lib/configurator/services/configurator.service.js +12 -14
  141. package/esm2015/lib/configurator/services/converters/base-converter.js +13 -10
  142. package/esm2015/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.js +13 -10
  143. package/esm2015/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.js +13 -10
  144. package/esm2015/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js +14 -11
  145. package/esm2015/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.js +13 -10
  146. package/esm2015/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.js +13 -10
  147. package/esm2015/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.js +13 -10
  148. package/esm2015/lib/configurator/services/converters/table/table-columns-converter.service.js +13 -10
  149. package/esm2015/lib/configurator/services/converters/table/table-filters-converter.service.js +13 -10
  150. package/esm2015/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.js +13 -11
  151. package/esm2015/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.js +13 -10
  152. package/esm2015/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.js +13 -10
  153. package/esm2015/lib/configurator/services/kpi-widget-color.service.js +7 -4
  154. package/esm2015/lib/configurator/services/preview.service.js +7 -4
  155. package/esm2015/lib/configurator/services/timeframe-serialization.service.js +9 -7
  156. package/esm2015/lib/configurator/services/types.js +1 -1
  157. package/esm2015/lib/configurator/services/widget-cloner.service.js +9 -9
  158. package/esm2015/lib/configurator/services/widget-editor.service.js +9 -9
  159. package/esm2015/lib/constants/default-palette.js +3 -5
  160. package/esm2015/lib/dashboards.module.js +155 -46
  161. package/esm2015/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js +17 -13
  162. package/esm2015/lib/directives/widget-editor/widget-editor.directive.js +21 -16
  163. package/esm2015/lib/functions/parse-string-with-data.js +0 -2
  164. package/esm2015/lib/functions/proportional-aggregators/percentage-aggregator.js +1 -1
  165. package/esm2015/lib/pizzagna/components/pizzagna/pizzagna.component.js +44 -28
  166. package/esm2015/lib/pizzagna/directives/component-portal/component-portal.directive.js +26 -23
  167. package/esm2015/lib/pizzagna/pizzagna.module.js +30 -18
  168. package/esm2015/lib/pizzagna/services/component-portal.service.js +9 -12
  169. package/esm2015/lib/pizzagna/services/component-registry.service.js +9 -11
  170. package/esm2015/lib/pizzagna/services/dynamic-component-creator.service.js +7 -4
  171. package/esm2015/lib/pizzagna/services/pizzagna.service.js +12 -9
  172. package/esm2015/lib/services/category-chart-util.service.js +7 -4
  173. package/esm2015/lib/services/event-registry.service.js +9 -7
  174. package/esm2015/lib/services/kpi-color-comparators-registry.service.js +12 -14
  175. package/esm2015/lib/services/proportional-content-aggregators-registry.service.js +7 -9
  176. package/esm2015/lib/services/provider-registry.service.js +7 -9
  177. package/esm2015/lib/services/registry-service.js +8 -9
  178. package/esm2015/lib/services/table-formatter-registry.service.js +25 -33
  179. package/esm2015/lib/services/widget-configuration.service.js +7 -4
  180. package/esm2015/lib/services/widget-removal.service.js +7 -9
  181. package/esm2015/lib/services/widget-to-dashboard-event-proxy.service.js +21 -12
  182. package/esm2015/lib/services/widget-types.service.js +7 -6
  183. package/esm2015/lib/types.js +1 -1
  184. package/esm2015/lib/widget-types/common/widget/components.js +1 -1
  185. package/esm2015/lib/widget-types/common/widget/legend.js +7 -0
  186. package/esm2015/lib/widget-types/common/widget/public-api.js +2 -1
  187. package/esm2015/lib/widget-types/drilldown/drilldown.js +1 -1
  188. package/esm2015/lib/widget-types/embedded-content/embedded-content.js +1 -1
  189. package/esm2015/lib/widget-types/kpi/kpi.js +1 -1
  190. package/esm2015/lib/widget-types/preview-placeholder.js +1 -1
  191. package/esm2015/lib/widget-types/proportional/donut-content-configurator-slice.js +6 -2
  192. package/esm2015/lib/widget-types/proportional/proportional-configurator.js +2 -2
  193. package/esm2015/lib/widget-types/proportional/proportional.js +1 -1
  194. package/esm2015/lib/widget-types/table/default-table-formatters.js +30 -0
  195. package/esm2015/lib/widget-types/table/table-configurator.js +3 -30
  196. package/esm2015/lib/widget-types/table/table-widget.js +2 -2
  197. package/esm2015/lib/widget-types/table/table.js +1 -1
  198. package/esm2015/lib/widget-types/timeseries/timeseries-configurator.js +2 -2
  199. package/esm2015/lib/widget-types/timeseries/timeseries.js +1 -1
  200. package/esm2015/nova-ui-dashboards.js +1 -12
  201. package/fesm2015/nova-ui-dashboards.js +10396 -9724
  202. package/fesm2015/nova-ui-dashboards.js.map +1 -1
  203. package/lib/common/common.module.d.ts +9 -0
  204. package/lib/common/components/preview-overlay/preview-overlay.component.d.ts +3 -0
  205. package/lib/common/components/widget-error/widget-error.component.d.ts +5 -1
  206. package/lib/common/pipes/dashboard-unit-conversion-pipe.d.ts +3 -0
  207. package/lib/components/dashboard/dashboard.component.d.ts +5 -1
  208. package/lib/components/dashboard/public-api.d.ts +1 -0
  209. package/lib/components/dashboard/types.d.ts +17 -0
  210. package/lib/components/embedded-content/embedded-content.component.d.ts +3 -0
  211. package/lib/components/kpi-widget/kpi.component.d.ts +3 -0
  212. package/lib/components/layouts/base-layout.d.ts +3 -0
  213. package/lib/components/layouts/stack/stack.component.d.ts +3 -0
  214. package/lib/components/layouts/tiles/tiles.component.d.ts +3 -0
  215. package/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.d.ts +3 -0
  216. package/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.d.ts +3 -0
  217. package/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.d.ts +3 -0
  218. package/lib/components/list-widget/list-widget.component.d.ts +3 -0
  219. package/lib/components/loading/loading.component.d.ts +3 -0
  220. package/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.d.ts +3 -0
  221. package/lib/components/proportional-widget/proportional-widget.component.d.ts +3 -0
  222. package/lib/components/proportional-widget/types.d.ts +2 -2
  223. package/lib/components/providers/data-source-adapter.d.ts +3 -0
  224. package/lib/components/providers/event-bus-debugger.d.ts +3 -0
  225. package/lib/components/providers/interaction/interaction-handler.d.ts +3 -0
  226. package/lib/components/providers/interaction/url-interaction-handler.d.ts +3 -0
  227. package/lib/components/providers/kpi-color-prioritizer.d.ts +3 -0
  228. package/lib/components/providers/kpi-scale-sync-broker.d.ts +3 -0
  229. package/lib/components/providers/kpi-status-content-fallback-adapter.d.ts +3 -0
  230. package/lib/components/providers/loading-adapter.d.ts +3 -0
  231. package/lib/components/providers/pizzagna-broadcaster.service.d.ts +3 -0
  232. package/lib/components/providers/refresher-settings.service.d.ts +3 -0
  233. package/lib/components/providers/refresher.d.ts +3 -0
  234. package/lib/components/providers/status-content-fallback-adapter.d.ts +3 -0
  235. package/lib/components/table-widget/addons/search-feature-addon.service.d.ts +3 -0
  236. package/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.d.ts +3 -0
  237. package/lib/components/table-widget/delayed-mouse-presence-detection.directive.d.ts +3 -0
  238. package/lib/components/table-widget/table-widget.component.d.ts +3 -0
  239. package/lib/components/table-widget/types.d.ts +1 -1
  240. package/lib/components/template-load-error/template-load-error.component.d.ts +3 -0
  241. package/lib/components/time-frame-selection/timeframe-selection.component.d.ts +3 -0
  242. package/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.d.ts +3 -0
  243. package/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.d.ts +3 -0
  244. package/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.d.ts +3 -0
  245. package/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.d.ts +3 -0
  246. package/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.d.ts +3 -0
  247. package/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.d.ts +3 -0
  248. package/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.d.ts +3 -0
  249. package/lib/components/timeseries-widget/timeseries-chart-preset.service.d.ts +3 -0
  250. package/lib/components/timeseries-widget/timeseries-scales.service.d.ts +3 -0
  251. package/lib/components/timeseries-widget/timeseries-widget.component.d.ts +3 -0
  252. package/lib/components/timeseries-widget/types.d.ts +1 -1
  253. package/lib/components/types.d.ts +0 -5
  254. package/lib/components/widget/public-api.d.ts +1 -0
  255. package/lib/components/widget/types.d.ts +37 -0
  256. package/lib/components/widget/widget-body/widget-body.component.d.ts +3 -0
  257. package/lib/components/widget/widget-body-content/widget-body-content.component.d.ts +3 -0
  258. package/lib/components/widget/widget-header/widget-header.component.d.ts +3 -0
  259. package/lib/components/widget/widget.component.d.ts +5 -1
  260. package/lib/components/widget-search/widget-search.component.d.ts +3 -0
  261. package/lib/configurator/components/color-picker/color-picker.component.d.ts +3 -0
  262. package/lib/configurator/components/color-picker/color.service.d.ts +3 -0
  263. package/lib/configurator/components/configurator/configurator.component.d.ts +5 -1
  264. package/lib/configurator/components/drop-area/drop-area.component.d.ts +3 -0
  265. package/lib/configurator/components/form-stack/form-stack.component.d.ts +3 -0
  266. package/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.d.ts +3 -0
  267. package/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.d.ts +3 -0
  268. package/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.d.ts +3 -0
  269. package/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.d.ts +3 -0
  270. package/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.d.ts +3 -0
  271. package/lib/configurator/components/formatters/link-formatter/link-formatter.component.d.ts +3 -0
  272. package/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.d.ts +3 -0
  273. package/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.d.ts +3 -0
  274. package/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.d.ts +3 -0
  275. package/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.d.ts +3 -0
  276. package/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.d.ts +3 -0
  277. package/lib/configurator/components/heading/configurator-heading.component.d.ts +3 -0
  278. package/lib/configurator/components/items-dynamic/items-dynamic.component.d.ts +3 -0
  279. package/lib/configurator/components/preview-placeholder/preview-placeholder.component.d.ts +3 -0
  280. package/lib/configurator/components/types.d.ts +1 -1
  281. package/lib/configurator/components/widget-cloner/widget-cloner.component.d.ts +5 -1
  282. package/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.d.ts +3 -0
  283. package/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.d.ts +3 -0
  284. package/lib/configurator/components/widget-editor/widget-editor.component.d.ts +3 -0
  285. package/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.d.ts +3 -0
  286. package/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.d.ts +3 -0
  287. package/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.d.ts +3 -0
  288. package/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.d.ts +3 -0
  289. package/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.d.ts +3 -0
  290. package/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.d.ts +3 -0
  291. package/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.d.ts +3 -0
  292. package/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.d.ts +3 -0
  293. package/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.d.ts +3 -0
  294. package/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.d.ts +3 -0
  295. package/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.d.ts +3 -0
  296. package/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.d.ts +3 -0
  297. package/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.d.ts +4 -1
  298. package/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.d.ts +3 -0
  299. package/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.d.ts +3 -0
  300. package/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.d.ts +3 -0
  301. package/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.d.ts +3 -0
  302. package/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.d.ts +3 -0
  303. package/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.d.ts +3 -0
  304. package/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.d.ts +5 -1
  305. package/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.d.ts +5 -1
  306. package/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.d.ts +3 -0
  307. package/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.d.ts +3 -0
  308. package/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.d.ts +3 -0
  309. package/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.d.ts +3 -0
  310. package/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.d.ts +3 -0
  311. package/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.d.ts +3 -0
  312. package/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.d.ts +3 -0
  313. package/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.d.ts +3 -0
  314. package/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.d.ts +3 -0
  315. package/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.d.ts +3 -0
  316. package/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.d.ts +3 -0
  317. package/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.d.ts +3 -0
  318. package/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.d.ts +3 -0
  319. package/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.d.ts +3 -0
  320. package/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.d.ts +3 -0
  321. package/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.d.ts +3 -0
  322. package/lib/configurator/components/wizard/dashwiz/dashwiz.component.d.ts +5 -1
  323. package/lib/configurator/components/wizard/dashwiz/dashwiz.service.d.ts +5 -2
  324. package/lib/configurator/components/wizard/dashwiz/model.d.ts +81 -0
  325. package/lib/configurator/components/wizard/dashwiz/public-api.d.ts +1 -0
  326. package/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.d.ts +3 -0
  327. package/lib/configurator/configurator.module.d.ts +75 -0
  328. package/lib/configurator/pipe/add-data.pipe.d.ts +3 -0
  329. package/lib/configurator/pipe/pizzagna-root.pipe.d.ts +4 -1
  330. package/lib/configurator/pipe/widget-configurator-section-header.pipe.d.ts +3 -0
  331. package/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.d.ts +3 -0
  332. package/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.d.ts +3 -0
  333. package/lib/configurator/services/configurator-data-source-manager.service.d.ts +3 -0
  334. package/lib/configurator/services/configurator-heading.service.d.ts +3 -0
  335. package/lib/configurator/services/configurator.service.d.ts +5 -1
  336. package/lib/configurator/services/converters/base-converter.d.ts +3 -0
  337. package/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.d.ts +3 -0
  338. package/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.d.ts +3 -0
  339. package/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.d.ts +3 -0
  340. package/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.d.ts +3 -0
  341. package/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.d.ts +3 -0
  342. package/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.d.ts +3 -0
  343. package/lib/configurator/services/converters/table/table-columns-converter.service.d.ts +3 -0
  344. package/lib/configurator/services/converters/table/table-filters-converter.service.d.ts +3 -0
  345. package/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.d.ts +3 -0
  346. package/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.d.ts +3 -0
  347. package/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.d.ts +3 -0
  348. package/lib/configurator/services/kpi-widget-color.service.d.ts +3 -0
  349. package/lib/configurator/services/preview.service.d.ts +3 -0
  350. package/lib/configurator/services/timeframe-serialization.service.d.ts +3 -0
  351. package/lib/configurator/services/types.d.ts +5 -1
  352. package/lib/configurator/services/widget-cloner.service.d.ts +3 -0
  353. package/lib/configurator/services/widget-editor.service.d.ts +3 -0
  354. package/lib/dashboards.module.d.ts +41 -0
  355. package/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.d.ts +3 -0
  356. package/lib/directives/widget-editor/widget-editor.directive.d.ts +4 -1
  357. package/lib/pizzagna/components/pizzagna/pizzagna.component.d.ts +3 -0
  358. package/lib/pizzagna/directives/component-portal/component-portal.directive.d.ts +3 -0
  359. package/lib/pizzagna/pizzagna.module.d.ts +8 -0
  360. package/lib/pizzagna/services/component-portal.service.d.ts +3 -0
  361. package/lib/pizzagna/services/component-registry.service.d.ts +3 -0
  362. package/lib/pizzagna/services/dynamic-component-creator.service.d.ts +3 -0
  363. package/lib/pizzagna/services/pizzagna.service.d.ts +3 -0
  364. package/lib/services/category-chart-util.service.d.ts +3 -0
  365. package/lib/services/event-registry.service.d.ts +3 -0
  366. package/lib/services/kpi-color-comparators-registry.service.d.ts +3 -0
  367. package/lib/services/proportional-content-aggregators-registry.service.d.ts +3 -0
  368. package/lib/services/provider-registry.service.d.ts +3 -0
  369. package/lib/services/registry-service.d.ts +3 -0
  370. package/lib/services/table-formatter-registry.service.d.ts +9 -0
  371. package/lib/services/widget-configuration.service.d.ts +4 -1
  372. package/lib/services/widget-removal.service.d.ts +4 -1
  373. package/lib/services/widget-to-dashboard-event-proxy.service.d.ts +3 -0
  374. package/lib/services/widget-types.service.d.ts +4 -1
  375. package/lib/types.d.ts +0 -60
  376. package/lib/widget-types/common/widget/legend.d.ts +9 -0
  377. package/lib/widget-types/common/widget/public-api.d.ts +1 -0
  378. package/lib/widget-types/drilldown/drilldown-configurator.d.ts +1 -1
  379. package/lib/widget-types/drilldown/drilldown.d.ts +1 -1
  380. package/lib/widget-types/embedded-content/embedded-content-configurator.d.ts +1 -1
  381. package/lib/widget-types/embedded-content/embedded-content-widget.d.ts +0 -1
  382. package/lib/widget-types/embedded-content/embedded-content.d.ts +1 -1
  383. package/lib/widget-types/kpi/kpi-configurator.d.ts +1 -1
  384. package/lib/widget-types/kpi/kpi-widget.d.ts +1 -1
  385. package/lib/widget-types/kpi/kpi.d.ts +1 -1
  386. package/lib/widget-types/preview-placeholder.d.ts +1 -1
  387. package/lib/widget-types/proportional/donut-content-configurator-slice.d.ts +1 -1
  388. package/lib/widget-types/proportional/proportional-configurator.d.ts +2 -1
  389. package/lib/widget-types/proportional/proportional-widget.d.ts +0 -1
  390. package/lib/widget-types/proportional/proportional.d.ts +1 -1
  391. package/lib/widget-types/table/default-table-formatters.d.ts +2 -0
  392. package/lib/widget-types/table/table-configurator.d.ts +0 -2
  393. package/lib/widget-types/table/table.d.ts +1 -1
  394. package/lib/widget-types/timeseries/timeseries-widget.d.ts +1 -1
  395. package/lib/widget-types/timeseries/timeseries.d.ts +1 -1
  396. package/nova-ui-dashboards.d.ts +1 -11
  397. package/package.json +10 -11
  398. package/sdk/atoms/spec/configurator/configurator-section.atom.js.map +1 -1
  399. package/sdk/atoms/spec/configurator/configurator.atom.js.map +1 -1
  400. package/sdk/atoms/spec/dashboard.atom.js.map +1 -1
  401. package/sdk/atoms/spec/test.po.js.map +1 -1
  402. package/sdk/atoms/spec/virtual-dashboards/drilldown-widget-test/drilldown-widget-test.component.js.map +1 -1
  403. package/sdk/atoms/src/lib/common/components/widget-error/widget-error.component.d.ts +2 -1
  404. package/sdk/atoms/src/lib/common/components/widget-error/widget-error.component.js.map +1 -1
  405. package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.js.map +1 -1
  406. package/sdk/atoms/src/lib/components/dashboard/dashboard.component.d.ts +2 -1
  407. package/sdk/atoms/src/lib/components/dashboard/dashboard.component.js +2 -1
  408. package/sdk/atoms/src/lib/components/dashboard/dashboard.component.js.map +1 -1
  409. package/sdk/atoms/src/lib/components/dashboard/public-api.d.ts +1 -0
  410. package/sdk/atoms/src/lib/components/dashboard/public-api.js +1 -0
  411. package/sdk/atoms/src/lib/components/dashboard/public-api.js.map +1 -1
  412. package/sdk/atoms/src/lib/components/dashboard/types.d.ts +17 -0
  413. package/sdk/atoms/src/lib/components/dashboard/types.js +3 -0
  414. package/sdk/atoms/src/lib/components/dashboard/types.js.map +1 -0
  415. package/sdk/atoms/src/lib/components/embedded-content/embedded-content.component.js.map +1 -1
  416. package/sdk/atoms/src/lib/components/kpi-widget/kpi.component.js +4 -2
  417. package/sdk/atoms/src/lib/components/kpi-widget/kpi.component.js.map +1 -1
  418. package/sdk/atoms/src/lib/components/layouts/base-layout.js.map +1 -1
  419. package/sdk/atoms/src/lib/components/layouts/tiles/tiles.component.js +1 -2
  420. package/sdk/atoms/src/lib/components/layouts/tiles/tiles.component.js.map +1 -1
  421. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.js.map +1 -1
  422. package/sdk/atoms/src/lib/components/list-widget/list-widget.component.js.map +1 -1
  423. package/sdk/atoms/src/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.js.map +1 -1
  424. package/sdk/atoms/src/lib/components/proportional-widget/proportional-widget.component.js +15 -13
  425. package/sdk/atoms/src/lib/components/proportional-widget/proportional-widget.component.js.map +1 -1
  426. package/sdk/atoms/src/lib/components/proportional-widget/types.d.ts +2 -2
  427. package/sdk/atoms/src/lib/components/providers/data-source-adapter.js +2 -1
  428. package/sdk/atoms/src/lib/components/providers/data-source-adapter.js.map +1 -1
  429. package/sdk/atoms/src/lib/components/providers/drilldown-data-source-adapter.js.map +1 -1
  430. package/sdk/atoms/src/lib/components/providers/interaction/interaction-handler.js.map +1 -1
  431. package/sdk/atoms/src/lib/components/providers/interaction/url-interaction-handler.js +1 -1
  432. package/sdk/atoms/src/lib/components/providers/interaction/url-interaction-handler.js.map +1 -1
  433. package/sdk/atoms/src/lib/components/providers/kpi-color-prioritizer.js +2 -1
  434. package/sdk/atoms/src/lib/components/providers/kpi-color-prioritizer.js.map +1 -1
  435. package/sdk/atoms/src/lib/components/providers/kpi-data-source-adapter.js +2 -1
  436. package/sdk/atoms/src/lib/components/providers/kpi-data-source-adapter.js.map +1 -1
  437. package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.js.map +1 -1
  438. package/sdk/atoms/src/lib/components/providers/kpi-status-content-fallback-adapter.js.map +1 -1
  439. package/sdk/atoms/src/lib/components/providers/pizzagna-broadcaster.service.js.map +1 -1
  440. package/sdk/atoms/src/lib/components/providers/refresher.js.map +1 -1
  441. package/sdk/atoms/src/lib/components/providers/status-content-fallback-adapter.js.map +1 -1
  442. package/sdk/atoms/src/lib/components/providers/table-data-source-adapter.js.map +1 -1
  443. package/sdk/atoms/src/lib/components/providers/timeseries-data-source-adapter.js.map +1 -1
  444. package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.js.map +1 -1
  445. package/sdk/atoms/src/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.js.map +1 -1
  446. package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js +6 -4
  447. package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js.map +1 -1
  448. package/sdk/atoms/src/lib/components/table-widget/types.d.ts +1 -1
  449. package/sdk/atoms/src/lib/components/time-frame-selection/timeframe-selection.component.js +2 -1
  450. package/sdk/atoms/src/lib/components/time-frame-selection/timeframe-selection.component.js.map +1 -1
  451. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +2 -1
  452. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js.map +1 -1
  453. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js +2 -1
  454. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js.map +1 -1
  455. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js +2 -1
  456. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js.map +1 -1
  457. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js +2 -1
  458. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js.map +1 -1
  459. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js +2 -1
  460. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js.map +1 -1
  461. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js +2 -1
  462. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js.map +1 -1
  463. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js +16 -15
  464. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js.map +1 -1
  465. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-scales.service.js.map +1 -1
  466. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.js.map +1 -1
  467. package/sdk/atoms/src/lib/components/timeseries-widget/types.d.ts +1 -1
  468. package/sdk/atoms/src/lib/components/types.d.ts +0 -5
  469. package/sdk/atoms/src/lib/components/types.js +1 -7
  470. package/sdk/atoms/src/lib/components/types.js.map +1 -1
  471. package/sdk/atoms/src/lib/components/widget/public-api.d.ts +1 -0
  472. package/sdk/atoms/src/lib/components/widget/public-api.js +1 -0
  473. package/sdk/atoms/src/lib/components/widget/public-api.js.map +1 -1
  474. package/sdk/atoms/src/lib/components/widget/types.d.ts +37 -0
  475. package/sdk/atoms/src/lib/components/widget/types.js +3 -0
  476. package/sdk/atoms/src/lib/components/widget/types.js.map +1 -0
  477. package/sdk/atoms/src/lib/components/widget/widget-header/widget-header.component.js +2 -1
  478. package/sdk/atoms/src/lib/components/widget/widget-header/widget-header.component.js.map +1 -1
  479. package/sdk/atoms/src/lib/components/widget/widget.component.d.ts +2 -1
  480. package/sdk/atoms/src/lib/components/widget/widget.component.js.map +1 -1
  481. package/sdk/atoms/src/lib/components/widget-search/widget-search.component.js +2 -1
  482. package/sdk/atoms/src/lib/components/widget-search/widget-search.component.js.map +1 -1
  483. package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js.map +1 -1
  484. package/sdk/atoms/src/lib/configurator/components/configurator/configurator.component.d.ts +2 -1
  485. package/sdk/atoms/src/lib/configurator/components/configurator/configurator.component.js.map +1 -1
  486. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.js.map +1 -1
  487. package/sdk/atoms/src/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.js.map +1 -1
  488. package/sdk/atoms/src/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.js.map +1 -1
  489. package/sdk/atoms/src/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.js.map +1 -1
  490. package/sdk/atoms/src/lib/configurator/components/items-dynamic/items-dynamic.component.js.map +1 -1
  491. package/sdk/atoms/src/lib/configurator/components/types.d.ts +1 -1
  492. package/sdk/atoms/src/lib/configurator/components/widget-cloner/widget-cloner.component.d.ts +2 -1
  493. package/sdk/atoms/src/lib/configurator/components/widget-cloner/widget-cloner.component.js.map +1 -1
  494. package/sdk/atoms/src/lib/configurator/components/widget-editor/widget-editor.component.js.map +1 -1
  495. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.js.map +1 -1
  496. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.js.map +1 -1
  497. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.js.map +1 -1
  498. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.js.map +1 -1
  499. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.js.map +1 -1
  500. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.js.map +1 -1
  501. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.js.map +1 -1
  502. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.js.map +1 -1
  503. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.js.map +1 -1
  504. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.d.ts +1 -1
  505. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js +6 -6
  506. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js.map +1 -1
  507. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js +1 -1
  508. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js.map +1 -1
  509. package/sdk/atoms/src/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.js.map +1 -1
  510. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.js.map +1 -1
  511. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.js.map +1 -1
  512. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.d.ts +2 -1
  513. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js +3 -2
  514. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js.map +1 -1
  515. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.d.ts +2 -1
  516. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.js.map +1 -1
  517. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.js.map +1 -1
  518. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.js.map +1 -1
  519. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.js.map +1 -1
  520. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js +2 -1
  521. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js.map +1 -1
  522. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.js.map +1 -1
  523. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.js.map +1 -1
  524. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js +4 -3
  525. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js.map +1 -1
  526. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.js.map +1 -1
  527. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js +1 -1
  528. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js.map +1 -1
  529. package/sdk/atoms/src/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.js.map +1 -1
  530. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js +2 -1
  531. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js.map +1 -1
  532. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.component.d.ts +2 -1
  533. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.component.js.map +1 -1
  534. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.service.d.ts +2 -2
  535. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/model.d.ts +81 -0
  536. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/model.js +3 -0
  537. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/model.js.map +1 -0
  538. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/public-api.d.ts +1 -0
  539. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/public-api.js +1 -0
  540. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/public-api.js.map +1 -1
  541. package/sdk/atoms/src/lib/configurator/pipe/pizzagna-root.pipe.d.ts +1 -1
  542. package/sdk/atoms/src/lib/configurator/pipe/pizzagna-root.pipe.js.map +1 -1
  543. package/sdk/atoms/src/lib/configurator/services/configurator-data-source-manager.service.js.map +1 -1
  544. package/sdk/atoms/src/lib/configurator/services/configurator.service.d.ts +2 -1
  545. package/sdk/atoms/src/lib/configurator/services/configurator.service.js.map +1 -1
  546. package/sdk/atoms/src/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.js.map +1 -1
  547. package/sdk/atoms/src/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js +5 -5
  548. package/sdk/atoms/src/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js.map +1 -1
  549. package/sdk/atoms/src/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.js.map +1 -1
  550. package/sdk/atoms/src/lib/configurator/services/converters/table/table-columns-converter.service.js.map +1 -1
  551. package/sdk/atoms/src/lib/configurator/services/converters/table/table-filters-converter.service.js.map +1 -1
  552. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.js.map +1 -1
  553. package/sdk/atoms/src/lib/configurator/services/types.d.ts +5 -1
  554. package/sdk/atoms/src/lib/configurator/services/widget-editor.service.js.map +1 -1
  555. package/sdk/atoms/src/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js +2 -1
  556. package/sdk/atoms/src/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js.map +1 -1
  557. package/sdk/atoms/src/lib/directives/widget-editor/widget-editor.directive.d.ts +1 -1
  558. package/sdk/atoms/src/lib/directives/widget-editor/widget-editor.directive.js +2 -1
  559. package/sdk/atoms/src/lib/directives/widget-editor/widget-editor.directive.js.map +1 -1
  560. package/sdk/atoms/src/lib/functions/proportional-aggregators/percentage-aggregator.js.map +1 -1
  561. package/sdk/atoms/src/lib/pizzagna/services/pizzagna.service.js.map +1 -1
  562. package/sdk/atoms/src/lib/services/category-chart-util.service.js.map +1 -1
  563. package/sdk/atoms/src/lib/services/widget-configuration.service.d.ts +1 -1
  564. package/sdk/atoms/src/lib/services/widget-removal.service.d.ts +1 -1
  565. package/sdk/atoms/src/lib/services/widget-to-dashboard-event-proxy.service.js +2 -1
  566. package/sdk/atoms/src/lib/services/widget-to-dashboard-event-proxy.service.js.map +1 -1
  567. package/sdk/atoms/src/lib/services/widget-types.service.d.ts +1 -1
  568. package/sdk/atoms/src/lib/services/widget-types.service.js.map +1 -1
  569. package/sdk/atoms/src/lib/types.d.ts +0 -60
  570. package/sdk/atoms/src/lib/types.js.map +1 -1
  571. package/sdk/atoms/src/lib/widget-types/common/widget/components.js.map +1 -1
  572. package/sdk/atoms/src/lib/widget-types/common/widget/legend.d.ts +9 -0
  573. package/sdk/atoms/src/lib/widget-types/common/widget/legend.js +10 -0
  574. package/sdk/atoms/src/lib/widget-types/common/widget/legend.js.map +1 -0
  575. package/sdk/atoms/src/lib/widget-types/common/widget/public-api.d.ts +1 -0
  576. package/sdk/atoms/src/lib/widget-types/common/widget/public-api.js +1 -0
  577. package/sdk/atoms/src/lib/widget-types/common/widget/public-api.js.map +1 -1
  578. package/sdk/atoms/src/lib/widget-types/drilldown/drilldown-configurator.d.ts +1 -1
  579. package/sdk/atoms/src/lib/widget-types/drilldown/drilldown.d.ts +1 -1
  580. package/sdk/atoms/src/lib/widget-types/drilldown/drilldown.js.map +1 -1
  581. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content-configurator.d.ts +1 -1
  582. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content-widget.d.ts +0 -1
  583. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content.d.ts +1 -1
  584. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content.js.map +1 -1
  585. package/sdk/atoms/src/lib/widget-types/kpi/kpi-configurator.d.ts +1 -1
  586. package/sdk/atoms/src/lib/widget-types/kpi/kpi-widget.d.ts +1 -1
  587. package/sdk/atoms/src/lib/widget-types/kpi/kpi.d.ts +1 -1
  588. package/sdk/atoms/src/lib/widget-types/kpi/kpi.js.map +1 -1
  589. package/sdk/atoms/src/lib/widget-types/preview-placeholder.d.ts +1 -1
  590. package/sdk/atoms/src/lib/widget-types/preview-placeholder.js.map +1 -1
  591. package/sdk/atoms/src/lib/widget-types/proportional/donut-content-configurator-slice.d.ts +1 -1
  592. package/sdk/atoms/src/lib/widget-types/proportional/donut-content-configurator-slice.js +16 -12
  593. package/sdk/atoms/src/lib/widget-types/proportional/donut-content-configurator-slice.js.map +1 -1
  594. package/sdk/atoms/src/lib/widget-types/proportional/proportional-configurator.d.ts +2 -1
  595. package/sdk/atoms/src/lib/widget-types/proportional/proportional-configurator.js +19 -19
  596. package/sdk/atoms/src/lib/widget-types/proportional/proportional-configurator.js.map +1 -1
  597. package/sdk/atoms/src/lib/widget-types/proportional/proportional-widget.d.ts +0 -1
  598. package/sdk/atoms/src/lib/widget-types/proportional/proportional.d.ts +1 -1
  599. package/sdk/atoms/src/lib/widget-types/proportional/proportional.js.map +1 -1
  600. package/sdk/atoms/src/lib/widget-types/table/default-table-formatters.d.ts +2 -0
  601. package/sdk/atoms/src/lib/widget-types/table/default-table-formatters.js +33 -0
  602. package/sdk/atoms/src/lib/widget-types/table/default-table-formatters.js.map +1 -0
  603. package/sdk/atoms/src/lib/widget-types/table/table-configurator.d.ts +0 -2
  604. package/sdk/atoms/src/lib/widget-types/table/table-configurator.js +4 -31
  605. package/sdk/atoms/src/lib/widget-types/table/table-configurator.js.map +1 -1
  606. package/sdk/atoms/src/lib/widget-types/table/table-widget.js +1 -1
  607. package/sdk/atoms/src/lib/widget-types/table/table-widget.js.map +1 -1
  608. package/sdk/atoms/src/lib/widget-types/table/table.d.ts +1 -1
  609. package/sdk/atoms/src/lib/widget-types/table/table.js.map +1 -1
  610. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries-configurator.js +21 -21
  611. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries-configurator.js.map +1 -1
  612. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries-widget.d.ts +1 -1
  613. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries.d.ts +1 -1
  614. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries.js.map +1 -1
  615. package/sdk/locale/messages.en.xlf +2102 -641
  616. package/sdk/schematics/ng-add/schema.json +5 -0
  617. package/bundles/nova-ui-dashboards.umd.min.js +0 -2
  618. package/bundles/nova-ui-dashboards.umd.min.js.map +0 -1
  619. package/nova-ui-dashboards.metadata.json +0 -1
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@nova-ui/bits"),require("@angular/cdk/scrolling"),require("@angular/forms"),require("@nova-ui/charts"),require("angular-gridster2"),require("lodash/defaultsDeep"),require("rxjs"),require("@angular/platform-browser"),require("lodash/isNil"),require("lodash/isArray"),require("lodash/omit"),require("lodash/some"),require("lodash/union"),require("resize-observer-polyfill"),require("rxjs/operators"),require("@angular/animations"),require("lodash/isUndefined"),require("lodash/template"),require("lodash/isEmpty"),require("lodash/uniq"),require("lodash/get"),require("lodash/clone"),require("lodash/pick"),require("lodash/difference"),require("lodash/keyBy"),require("lodash/isEqual"),require("lodash/set"),require("moment/moment"),require("@angular/cdk/drag-drop"),require("@angular/cdk/portal"),require("lodash/values"),require("lodash/xor"),require("@angular/cdk/overlay"),require("lodash/sumBy"),require("lodash/toNumber"),require("lodash/toString"),require("lodash/cloneDeep"),require("lodash/zipObject"),require("rxjs/internal/Subject"),require("lodash/includes"),require("lodash/capitalize"),require("lodash/find"),require("lodash/findIndex"),require("@angular/router"),require("lodash/isFunction"),require("lodash/sum")):"function"==typeof define&&define.amd?define("@nova-ui/dashboards",["exports","@angular/common","@angular/core","@nova-ui/bits","@angular/cdk/scrolling","@angular/forms","@nova-ui/charts","angular-gridster2","lodash/defaultsDeep","rxjs","@angular/platform-browser","lodash/isNil","lodash/isArray","lodash/omit","lodash/some","lodash/union","resize-observer-polyfill","rxjs/operators","@angular/animations","lodash/isUndefined","lodash/template","lodash/isEmpty","lodash/uniq","lodash/get","lodash/clone","lodash/pick","lodash/difference","lodash/keyBy","lodash/isEqual","lodash/set","moment/moment","@angular/cdk/drag-drop","@angular/cdk/portal","lodash/values","lodash/xor","@angular/cdk/overlay","lodash/sumBy","lodash/toNumber","lodash/toString","lodash/cloneDeep","lodash/zipObject","rxjs/internal/Subject","lodash/includes","lodash/capitalize","lodash/find","lodash/findIndex","@angular/router","lodash/isFunction","lodash/sum"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["nova-ui"]=e["nova-ui"]||{},e["nova-ui"].dashboards={}),e.ng.common,e.ng.core,e.nui.bits,e.ng.cdk.scrolling,e.ng.forms,e.charts,e["angular-gridster2"],e._.defaultsDeep,e.rxjs,e.ng.platformBrowser,e._.isNil,e._.isArray,e._.omit,e._.some,e._.union,e.ResizeObserver,e.rxjs.operators,e.ng.animations,e._.isUndefined,e.template,e._.isEmpty,e.uniq,e._.get,e._.clone,e._.pick,e._difference,e._.keyBy,e._.isEqual,e._.set,e.moment,e.ng.cdk.dragDrop,e.ng.cdk.portal,e._.values,e.xor,e.ng.cdk.overlay,e.sumBy,e.toNumber,e._.toString,e._.cloneDeep,e.zipObject,e.rxjs["internal/Subject"],e._.includes,e._.capitalize,e._.find,e._.findIndex,e.ng.router,e._.isFunction,e.sum)}(this,(function(e,t,n,o,i,r,a,s,l,d,c,u,p,h,g,m,f,v,y,b,C,S,w,I,P,T,x,D,_,z,O,E,k,R,A,F,V,L,B,N,$,j,K,W,M,U,H,G,q){"use strict";function Z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function Y(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var X=Y(n),J=Y(o),Q=Z(l),ee=Z(u),te=Z(p),ne=Z(h),oe=Z(g),ie=Z(m),re=Z(f),ae=Z(b),se=Z(C),le=Z(S),de=Z(w),ce=Z(I),ue=Z(P),pe=Z(T),he=Z(x),ge=Z(D),me=Z(_),fe=Z(z),ve=Z(O),ye=Z(R),be=Z(A),Ce=Z(V),Se=Z(L),we=Z(B),Ie=Z(N),Pe=Z($),Te=Z(K),xe=Z(W),De=Z(M),_e=Z(U),ze=Z(G),Oe=Z(q),Ee=function(e,t){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ee(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function Re(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ae(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function Fe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ae(arguments[t]));return e}function Ve(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;var Le=function(){};Le.lateLoadKey="PreviewOverlayComponent",Le.decorators=[{type:n.Component,args:[{selector:"nui-preview-overlay",template:'<div class="nui-text-label content" i18n>This is a non-interactive widget preview</div>',styles:[":host{opacity:0;transition-property:opacity;transition-duration:.5s;position:absolute;z-index:1060;background-color:var(--nui-color-bg-content_popover,#fff);height:100%;width:100%}:host:hover{opacity:.96}:host .content{padding:10px;display:flex;justify-content:center;align-items:center;position:absolute;top:0;right:2px;bottom:2px;left:2px;cursor:not-allowed}"]}]}];var Be=function(){function e(e){this.changeDetector=e,this.defaultClasses="d-flex flex-column justify-content-center w-100 p-3",this.elementClass=""}return e.prototype.ngOnInit=function(){this.classNames=this.defaultClasses+" "+this.elementClass},e}();Be.lateLoadKey="WidgetErrorComponent",Be.decorators=[{type:n.Component,args:[{selector:"nui-widget-error",template:'<nui-image [image]="image"></nui-image>\n<div class="widget-error__title">\n <strong>{{ title }}</strong>\n</div>\n<div class="d-flex justify-content-center text-center">{{ description }}</div>\n',styles:[".widget-error__title{display:flex;justify-content:center;text-align:center;margin-top:20px;margin-bottom:10px}"]}]}],Be.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Be.propDecorators={image:[{type:n.Input}],title:[{type:n.Input}],description:[{type:n.Input}],elementClass:[{type:n.Input}],classNames:[{type:n.HostBinding,args:["class"]}]};var Ne=1e6,$e=function(e){var t=this;this.unitConversionService=e,this.transform=function(e){var n="string"==typeof e?parseFloat(e):e;if(void 0===n||isNaN(n)||n<Ne)return(null==e?void 0:e.toString())||"";var i=t.unitConversionService.convert(n,o.UnitBase.Standard,1);return t.unitConversionService.getFullDisplay(i,"generic")}};$e.decorators=[{type:n.Pipe,args:[{name:"nuiDashboardUnitConversion"}]}],$e.ctorParameters=function(){return[{type:o.UnitConversionService}]};var je=[Le,Be],Ke=function(){};Ke.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,o.NuiImageModule],declarations:Fe([$e],je),exports:Fe([t.CommonModule,$e],je),entryComponents:je}]}];var We,Me,Ue,He,Ge,qe,Ze="/",Ye=new o.EventDefinition("REFRESH"),Xe=new o.EventDefinition("SCROLL_NEXT_PAGE"),Je=new o.EventDefinition("WIDGET_REMOVE"),Qe=new o.EventDefinition("WIDGET_EDIT"),et=new o.EventDefinition("WIDGET_CREATE"),tt=new o.EventDefinition("WIDGET_READY"),nt=new o.EventDefinition("WIDGET_RESIZE"),ot=new o.EventDefinition("WIDGET_POSITION_CHANGE"),it=new o.EventDefinition("WIDGET_SEARCH",(function(){return new d.BehaviorSubject({payload:""})})),rt=new o.EventDefinition("SET_PROPERTY_VALUE"),at=new o.EventDefinition("SET_TIMEFRAME"),st=new o.EventDefinition("PREVIEW_EVENT"),lt=new o.EventDefinition("DATA_SOURCE_BUSY"),dt=new o.EventDefinition("DASHBOARD_EDIT_MODE",(function(){return new d.ReplaySubject(1)})),ct=new o.EventDefinition("INTERACTION"),ut=new o.EventDefinition("DATA_SOURCE_INVOKED"),pt=new o.EventDefinition("DRILLDOWN"),ht="NOVA_DATASOURCE_INTERVAL_REFRESHER",gt="NOVA_DATASOURCE_ADAPTER",mt="NOVA_TIMESERIES_DATASOURCE_ADAPTER",ft="NOVA_KPI_DATASOURCE_ADAPTER",vt="NOVA_DRILLDOWN_DATASOURCE_ADAPTER",yt="NOVA_KPI_COLOR_PRIORITIZER",bt="NOVA_TITLE_AND_DESCRIPTION_CONVERTER",Ct="NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER",St="NOVA_KPI_TILES_CONVERTER",wt="NOVA_TIMESERIES_METADATA_CONVERTER",It="NOVA_TIMESERIES_SERIES_CONVERTER",Pt="NOVA_DASHBOARD_EVENT_PROXY",Tt="NOVA_TABLE_COLUMNS_CONVERTER",xt="NOVA_TABLE_FILTERS_CONVERTER",Dt="NOVA_TABLE_DATASOURCE_ADAPTER",_t="NOVA_GENERIC_CONVERTER",zt="NOVA_GENERIC_ARRAY_CONVERTER",Ot="NOVA_KPI_SECTION_CONVERTER",Et="NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER",kt="NOVA_LOADING_ADAPTER",Rt="NOVA_STATUS_CONTENT_FALLBACK_ADAPTER",At="NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER",Ft="NOVA_KPI_SCALE_SYNC_BROKER",Vt="NOVA_URL_INTERACTION_HANDLER",Lt="NOVA_EVENT_BUS_DEBUGGER",Bt="NOVA_PIZZAGNA_BROADCASTER",Nt="NOVA_VIRTUAL_VIEWPORT_MANAGER",$t="NOVA_TABLE_FORMATTERS_REGISTRY",jt="NOVA_KPI_FORMATTERS_REGISTRY",Kt="NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY",Wt="NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER",Mt=new n.InjectionToken("PIZZAGNA_EVENT_BUS"),Ut=new n.InjectionToken("DASHBOARD_EVENT_BUS"),Ht=new n.InjectionToken("DATA_SOURCE"),Gt=new n.InjectionToken("FORMATTERS_REGISTRY"),qt=new n.InjectionToken("TEST_REGISTRY"),Zt=new n.InjectionToken("HEADER_LINK_PROVIDER");e.WellKnownProviders=void 0,(We=e.WellKnownProviders||(e.WellKnownProviders={})).DataSource="dataSource",We.Adapter="adapter",We.Converter="converter",We.Broadcaster="broadcaster",We.Refresher="refresher",We.EventProxy="eventProxy",We.LoadingAdapter="loadingAdapter",We.ContentFallbackAdapter="contentFallbackAdapter",We.InteractionHandler="interactionHandler",We.EventBusDebugger="eventBusDebugger",We.KpiColorPrioritizer="kpiColorPrioritizer",We.FormattersRegistry="formattersRegistry",We.DataSourceManager="dataSourceManager",e.WellKnownPathKey=void 0,(Me=e.WellKnownPathKey||(e.WellKnownPathKey={})).Root="root",Me.DataSourceConfigComponentType="dataSourceConfigComponentType",Me.TileDescriptionConfigComponentType="tileDescriptionConfigComponentType",Me.DataSourceProviders="dataSourceProviders",Me.Formatters="formatters",Me.TileDescriptionBackgroundColors="tileDescriptionBackgroundColors",Me.TileBackgroundColorRulesBackgroundColors="tileBackgroundColorRulesBackgroundColors",e.WellKnownDataSourceFeatures=void 0,(Ue=e.WellKnownDataSourceFeatures||(e.WellKnownDataSourceFeatures={})).Interactivity="interactivity",Ue.DisableTableColumnGeneration="disableTableColumnGeneration",e.PizzagnaLayer=void 0,(He=e.PizzagnaLayer||(e.PizzagnaLayer={})).Structure="structure",He.Configuration="configuration",He.Data="data",e.AccordionState=void 0,(Ge=e.AccordionState||(e.AccordionState={})).CRITICAL="critical",Ge.WARNING="warning",Ge.DEFAULT="default",e.HttpStatusCode=void 0,(qe=e.HttpStatusCode||(e.HttpStatusCode={})).Unknown="0",qe.Ok="200",qe.Forbidden="403",qe.NotFound="404";var Yt,Xt,Jt={displayGrid:s.DisplayGrid.None,gridType:s.GridType.VerticalFixed,compactType:s.CompactType.CompactUp,margin:15,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,mobileBreakpoint:640,minCols:12,maxCols:12,minRows:12,fixedRowHeight:44,minItemArea:1,defaultItemCols:6,defaultItemRows:6,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,scrollSensitivity:10,scrollSpeed:20,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{enabled:!1,ignoreContent:!0,dragHandleClass:"nui-dashboard__widget--drag-handle"},resizable:{enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0}},swap:!1,pushItems:!0,pushResizeItems:!0,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1},Qt=function(){function e(e){var t=this;this.eventBus=e,this.editMode=!1,this.gridsterConfigChange=new n.EventEmitter,this.dashboardChange=new n.EventEmitter,this.gridsterItemsVisibilityMap={},this.orderWidgets=function(e,n){var o=t.dashboard.positions[e.key],i=t.dashboard.positions[n.key];return o.y-i.y||o.x-i.x},this.trackByFn=function(e,t){return t.key},this.updateWidgetPosition=function(e,n){var i=n.widgetId,r=o.immutableSet(t.dashboard,"positions."+i,e);t.dashboardChange.emit(r),t.eventBus.getStream(ot).next({widgetId:i,payload:e})},this.emitWidgetResize=function(e,n){var o=n.widgetId;t.eventBus.getStream(nt).next({widgetId:o,payload:{widgetId:o,height:n.height,width:n.width}})}}return Object.defineProperty(e.prototype,"dashboard",{get:function(){return this.dashboardBuffer||this._dashboard},set:function(e){this._dashboard=e,this.dashboardBuffer=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostClass",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){return e.calculateWidgetsVisibility()}))},e.prototype.onGridsterScroll=function(){this.calculateWidgetsVisibility()},e.prototype.ngOnChanges=function(e){var t,n,o;if(e.gridsterConfig){if(e.gridsterConfig.isFirstChange()){var i=Q.default(this.gridsterConfig||{},Jt);this.hookEvent(i,"itemChangeCallback",this.updateWidgetPosition),this.hookEvent(i,"itemResizeCallback",this.emitWidgetResize),this.gridsterConfigChange.emit(i)}(null===(t=this.gridsterConfig)||void 0===t?void 0:t.api)&&(null===(o=(n=this.gridsterConfig.api).optionsChanged)||void 0===o||o.call(n))}if(e.editMode){if(!this.gridsterConfig.resizable)throw new Error("Gridster's resizable prop is undefined");if(this.gridsterConfig.resizable.enabled=this.editMode,!this.gridsterConfig.draggable)throw new Error("Gridster's draggable prop is undefined");this.gridsterConfig.draggable.enabled=this.editMode,this.gridsterConfigChange.emit(Object.assign({},this.gridsterConfig)),this.eventBus.getStream(dt).next({payload:this.editMode})}},e.prototype.onWidgetChange=function(e){this.dashboard.widgets[e.id]&&this.updateWidget(e)},e.prototype.updateWidget=function(e){var t,n,i,r,a,s=this.dashboard;if(!this.dashboard.positions[e.id]&&(null===(t=this.gridsterConfig)||void 0===t?void 0:t.api)){var l=null===(i=(n=this.gridsterConfig.api).getFirstPossiblePosition)||void 0===i?void 0:i.call(n,{x:0,y:0,rows:null===(r=this.gridsterConfig)||void 0===r?void 0:r.defaultItemRows,cols:null===(a=this.gridsterConfig)||void 0===a?void 0:a.defaultItemCols});s=o.immutableSet(s,"positions."+e.id,l)}s=o.immutableSet(s,"widgets."+e.id,e),this.dashboardBuffer=s,this.dashboardChange.emit(s)},e.prototype.removeWidget=function(e,t){void 0===t&&(t=!0);var n=this.dashboard;if(n.widgets[e]){var i=Object.assign({},n.widgets);if(delete i[e],n=o.immutableSet(n,"widgets",i),t){var r=Object.assign({},n.positions);delete r[e],n=o.immutableSet(n,"positions",r)}this.dashboardChange.emit(n)}},e.prototype.shouldWidgetRender=function(e){var t;return!(null===(t=this.belowFoldLazyLoadingConfig)||void 0===t?void 0:t.enabled)||this.gridsterItemsVisibilityMap[e]},e.prototype.hookEvent=function(e,t,n){var o=e[t];e[t]=function(e,t){n(e,t),o&&o(e,t)}},e.prototype.calculateWidgetsVisibility=function(){var e,t=this;if(null===(e=this.belowFoldLazyLoadingConfig)||void 0===e?void 0:e.enabled){var n=this.gridster.el.getBoundingClientRect();this.gridsterItemsVisibilityMap=this.gridsterItems.reduce((function(e,o){var i,r=o.el,a=o.widgetId;if(!(null===(i=t.belowFoldLazyLoadingConfig.configuration)||void 0===i?void 0:i.reloadWidgetsOnScroll)&&e[a])return e;var s=r.getBoundingClientRect(),l=(s.top>n.top&&s.top<n.bottom||s.bottom>n.top&&s.bottom<n.bottom)&&(s.left>n.left&&s.left<n.right||s.right>n.left&&s.right<n.right);return e[a]=l,e}),this.gridsterItemsVisibilityMap)}},e}();Qt.decorators=[{type:n.Component,args:[{selector:"nui-dashboard",template:'<gridster class="nui-dashboard__gridster" [options]="gridsterConfig" (scroll)="onGridsterScroll()">\n <gridster-item *ngFor="let widget of dashboard.widgets | keyvalue: orderWidgets; trackBy: trackByFn"\n [item]="dashboard.positions[widget.key]"\n class="nui-dashboard__gridster-item"\n [nuiGridsterItemWidgetId]="widget.key">\n <nui-widget *ngIf="shouldWidgetRender(widget.key) else emptyWidgetTpl"\n [widget]="widget.value"\n (widgetChange)="onWidgetChange($event)"\n [attr.widget-id]="widget.key"\n [attr.widget-type]="widget.value.type"\n class="w-100 h-100 d-block">\n </nui-widget>\n </gridster-item>\n</gridster>\n\n<ng-template #emptyWidgetTpl>\n <div class="w-100 h-100 d-block"><nui-loading [active]="true"></nui-loading></div>\n</ng-template>\n',encapsulation:n.ViewEncapsulation.None,providers:[{provide:Ut,useClass:o.EventBus}],styles:['.nui-dashboard__gridster{background-color:var(--nui-color-bg-workspace,#f0f0f0)}.nui-dashboard__gridster .gridster-preview{border:4px solid var(--nui-color-selected-contrast,#00c4d2);background-color:var(--nui-color-selected,rgba(0,196,210,.1))}.nui-dashboard__gridster .gridster-preview:before{background-color:var(--nui-color-selected-contrast,#00c4d2);border-radius:50%;content:"";display:block;height:40px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:40px;z-index:1}.nui-dashboard__gridster .gridster-preview:after{color:var(--nui-color-icon-light,#fff);content:"+";display:block;font-size:19px;font-weight:700;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.nui-dashboard__gridster-item{box-shadow:0 0 5px #999;box-shadow:0 0 var(--nui-space-xs,5px) var(--nui-color-line-dark,#999);background-color:var(--nui-color-bg-light,#fff)}.nui-dashboard__gridster-item:hover .gridster-item-resizable-handler{border-bottom-color:#00c4d2;border-bottom-color:var(--nui-color-selected-contrast,#00c4d2);margin:0;z-index:2000}.nui-dashboard__gridster-item:hover .gridster-item-resizable-handler.handle-se{border-bottom-color:var(--nui-color-selected-contrast,#00c4d2);right:2px;bottom:2px}.mobile .nui-dashboard__gridster-item.nui-dashboard__gridster-item{height:auto!important}']}]}],Qt.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Ut]}]}]},Qt.propDecorators={gridsterConfig:[{type:n.Input}],dashboard:[{type:n.Input}],editMode:[{type:n.Input}],belowFoldLazyLoadingConfig:[{type:n.Input}],gridsterConfigChange:[{type:n.Output}],dashboardChange:[{type:n.Output}],hostClass:[{type:n.HostBinding,args:["class.nui-dashboard"]}],gridster:[{type:n.ViewChild,args:[s.GridsterComponent]}],gridsterItems:[{type:n.ViewChildren,args:[s.GridsterItemComponent]}]},e.LegendPlacement=void 0,(Yt=e.LegendPlacement||(e.LegendPlacement={})).None="None",Yt.Right="Right",Yt.Bottom="Bottom",e.EmbeddedContentMode=void 0,(Xt=e.EmbeddedContentMode||(e.EmbeddedContentMode={}))[Xt.URL=0]="URL",Xt[Xt.HTML=1]="HTML";var en=function(){function t(e,t,n){this.changeDetector=e,this.document=t,this.domSanitizer=n,this.sanitized=!0,this.elementClass=""}return t.prototype.ngOnInit=function(){this.validateAndApplyEmbeddedContent()},t.prototype.ngOnChanges=function(e){e.customEmbeddedContent&&!e.customEmbeddedContent.firstChange&&this.validateAndApplyEmbeddedContent()},t.prototype.validateAndApplyEmbeddedContent=function(){var t=this.sanitized&&this.sanitizeContext(this.mode===e.EmbeddedContentMode.URL?n.SecurityContext.URL:n.SecurityContext.HTML);if(this.anchor.nativeElement.innerHTML="",this.mode===e.EmbeddedContentMode.URL){var o=this.document.createElement("iframe");o.src=this.sanitized?t:this.customEmbeddedContent,o.width="100%",o.height="100%",this.anchor.nativeElement.appendChild(o)}else this.anchor.nativeElement.innerHTML=this.sanitized?t:this.customEmbeddedContent},t.prototype.sanitizeContext=function(e){var t;return this.domSanitizer.sanitize(e,null===(t=this.customEmbeddedContent)||void 0===t?void 0:t.trim())},t}();function tn(e,t){var n=(e.properties||{}).dataFieldIds;return n?Object.keys(n).reduce((function(e,o){var i=n[o];return e[o]=t[i],e}),{}):{value:t.value}}en.lateLoadKey="EmbeddedContentComponent",en.decorators=[{type:n.Component,args:[{selector:"nui-embedded-content",template:'<div style="width: 100%; height: 100%" #anchor></div>',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],en.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Document,decorators:[{type:n.Inject,args:[t.DOCUMENT]}]},{type:c.DomSanitizer}]},en.propDecorators={mode:[{type:n.Input}],customEmbeddedContent:[{type:n.Input}],sanitized:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}],anchor:[{type:n.ViewChild,args:["anchor",{static:!0}]}]};var nn=function(){function t(e,t,n){this.changeDetector=e,this.dataSource=t,this.eventBus=n,this.busy=!1,this.elementClass="",this.defaultColor="var(--nui-color-bg-secondary)"}return Object.defineProperty(t.prototype,"interactive",{get:function(){var t,n,o,i,r;return((null===(t=this.configuration)||void 0===t?void 0:t.interactive)||(null===(i=null===(o=null===(n=this.dataSource)||void 0===n?void 0:n.features)||void 0===o?void 0:o.getFeatureConfig(e.WellKnownDataSourceFeatures.Interactivity))||void 0===i?void 0:i.enabled))&&!ee.default(null===(r=this.widgetData)||void 0===r?void 0:r.value)||!1},enumerable:!1,configurable:!0}),t.prototype.onInteraction=function(){this.interactive&&this.eventBus.getStream(ct).next({payload:{data:this.widgetData}})},t.prototype.getScaleBroker=function(e){if(this.syncValuesBroker)return this.syncValuesBroker.find((function(t){return t.id===e}))},t.prototype.ngOnChanges=function(e){var t;if(e.configuration){var n=e.configuration.currentValue.formatters;n&&(this.formattersProperties=this.getFormatterProperties(n))}e.widgetData&&(null===(t=this.configuration)||void 0===t?void 0:t.formatters)&&(this.formattersProperties=this.getFormatterProperties(this.configuration.formatters))},t.prototype.getFormatterProperties=function(e){var t=this;return Object.keys(e).reduce((function(n,o){var i,r=null===(i=e[o])||void 0===i?void 0:i.formatter;return r&&(n[o]={data:tn(r,t.widgetData)}),n}),{})},t}();function on(t){return t.providerKey?Fe([t.pizzagnaKey||e.PizzagnaLayer.Data,t.componentId,"providers",t.providerKey,"properties"],t.propertyPath).join("."):Fe([t.pizzagnaKey||e.PizzagnaLayer.Data,t.componentId,"properties"],t.propertyPath).join(".")}nn.lateLoadKey="KpiComponent",nn.decorators=[{type:n.Component,args:[{selector:"nui-kpi",template:'<div class="w-100 h-100" nui-busy [busy]="busy">\n <ng-container *ngIf="widgetData?.link">\n <a class="nui-kpi-indicator" [href]="widgetData.link">\n <ng-container [ngTemplateOutlet]="kpiContent"></ng-container>\n </a>\n </ng-container>\n\n <ng-container *ngIf="!widgetData?.link">\n <div class="nui-kpi-indicator" (click)="onInteraction()">\n <ng-container [ngTemplateOutlet]="kpiContent"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #kpiContent>\n <div class="nui-kpi-indicator__background"\n [class.nui-kpi-indicator--interactive]="interactive"\n [ngStyle]="{\'background-color\': backgroundColor || widgetData?.backgroundColor}">\n </div>\n <div class="nui-kpi-indicator__text"\n [ngStyle]="{\'color\': widgetData?.textColor || backgroundColor || widgetData?.backgroundColor || defaultColor}">\n <div class="nui-kpi-indicator__zoom-container">\n <div class="nui-kpi-indicator__description"\n [title]="widgetData?.label">\n <span nuiZoomContent\n [useZoom]="false"\n [minScale]="0.5"\n [scaleIN$]="getScaleBroker(\'label\')?.out$"\n [scaleOUT$]="getScaleBroker(\'label\')?.in$"\n >{{widgetData?.label}}</span>\n </div>\n\n <ng-container *ngIf="configuration?.formatters?.Value; else kpiValueRaw"\n nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n componentId="KpiValueFormatter"\n [componentType]="configuration?.formatters?.Value?.formatter?.componentType"\n [properties]="formattersProperties.Value">\n <div class="nui-kpi-indicator__value">\n <span nuiZoomContent\n [ngClass]="configuration?.formatters?.Value?.formatter?.componentType === \'IconFormatterComponent\' ? \'without-filter\' : \'\'"\n [useZoom]="false"\n [scaleIN$]="getScaleBroker(\'value\')?.out$"\n [scaleOUT$]="getScaleBroker(\'value\')?.in$">\n <ng-template\n [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </span>\n </div>\n </ng-container>\n\n <div class="nui-kpi-indicator__units"\n [title]="widgetData?.units">\n <span nuiZoomContent\n [useZoom]="false"\n [scaleIN$]="getScaleBroker(\'units\')?.out$"\n [scaleOUT$]="getScaleBroker(\'units\')?.in$"\n [minScale]="0.5">{{widgetData?.units}}</span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #kpiValueRaw>\n <div class="nui-kpi-indicator__value"\n [style.font-size]="widgetData?.fontSize"\n [title]="widgetData?.value">\n <span nuiZoomContent\n [useZoom]="false"\n [scaleIN$]="getScaleBroker(\'value\')?.out$"\n [scaleOUT$]="getScaleBroker(\'value\')?.in$">\n {{widgetData?.value}}</span>\n </div>\n</ng-template>\n',encapsulation:n.ViewEncapsulation.Emulated,changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".nui-kpi-indicator{position:relative;display:block;height:100%;width:100%}.nui-kpi-indicator__background{height:100%;width:100%;background-color:var(--nui-color-bg-secondary,#fafafa);color:var(--nui-color-text-default,#111)}.nui-kpi-indicator__text{position:absolute;width:100%;height:100%;top:0;pointer-events:none}.nui-kpi-indicator__text *>span{filter:invert(1) grayscale(1) contrast(100)}.nui-kpi-indicator__value{font-size:54px;font-weight:600;margin:auto 0;min-width:100%;white-space:nowrap;display:flex;align-items:center;justify-content:center;height:100%;min-height:5px;max-height:200px}.nui-kpi-indicator__value>span.without-filter{filter:unset}.nui-kpi-indicator__units{font-size:16px;font-weight:600;min-width:0;margin-bottom:auto;display:flex;align-items:center;justify-content:center;height:100%;min-height:10px;max-height:45px}.nui-kpi-indicator__units>span{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-kpi-indicator__description{font-size:16px;font-weight:600;min-width:0;margin-top:auto;display:flex;align-items:center;justify-content:center;height:100%;min-height:10px;max-height:45px}.nui-kpi-indicator__description>span{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-kpi-indicator__zoom-container{display:grid;grid-template-columns:1fr;grid-template-rows:30% 40% 30%;width:100%;height:100%}.nui-kpi-indicator--interactive{cursor:pointer}.nui-kpi-indicator--interactive:hover{filter:brightness(90%)}"]}]}],nn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},nn.propDecorators={widgetData:[{type:n.Input}],backgroundColor:[{type:n.Input}],syncValuesBroker:[{type:n.Input}],configuration:[{type:n.Input}],busy:[{type:n.Input}],elementClass:[{type:n.HostBinding,args:["class"]}]};var rn=function(){function t(){}return t.prototype.getPizzagnaUpdatedWithComponents=function(t,n,o){var i,r=null===(i=t[e.PizzagnaLayer.Structure][n].properties)||void 0===i?void 0:i.template;return this.getPizzagnaWithChildren(t,o,r,n)},t.prototype.getPizzagnaWithChildren=function(e,t,n,o){var i=this,r=t.map((function(e){return{id:e,componentType:"WidgetConfiguratorSectionComponent"}})).reduce((function(e,t){return i.updateChildPizzagna(e,n,t)}),e);return r=this.getPizzagnaWithNodesSet(r,o,t)},t.prototype.updateChildPizzagna=function(t,n,i){var r=o.immutableSet(t,e.PizzagnaLayer.Structure+"."+i.id,i),a=n.map((function(e){return Object.assign(Object.assign({},e),{id:i.id+"/"+e.id})}));r=a.reduce((function(t,n){return o.immutableSet(t,e.PizzagnaLayer.Structure+"."+n.id,n)}),r);var s=a.map((function(e){return e.id}));return r=this.getPizzagnaWithNodesSet(r,i.id,s)},t.prototype.getPizzagnaWithNodesSet=function(t,n,i){var r=e.PizzagnaLayer.Structure+"."+n+".properties.nodes";return o.immutableSet(t,r,i)},t}();rn.decorators=[{type:n.Injectable}];var an=function(){function t(e,t){this.eventBus=e,this.dynamicComponentCreator=t,this.pizzaChanged=new d.ReplaySubject(1)}return t.prototype.updatePizzagna=function(e){this.pizzagna=e},t.prototype.updateComponents=function(e){this.components=e,this.pizzaChanged.next(e)},t.prototype.getComponent=function(e){var t=this.components[e];if(!t)throw new Error("Component '"+e+"' is not defined!");return t},t.prototype.setProperty=function(e,t){var n="string"==typeof e?e:on(e);this.eventBus.getStream(rt).next({payload:{path:n,value:t}})},t.prototype.createComponentsFromTemplateWithProperties=function(t,n){var i,r,a,s,l=n.map((function(e){return e.id})),d=this.dynamicComponentCreator.getPizzagnaUpdatedWithComponents(this.pizzagna,t,l);try{for(var c=Re(n),u=c.next();!u.done;u=c.next()){var p=u.value;try{for(var h=(a=void 0,Re(Object.keys(p.children))),g=h.next();!g.done;g=h.next()){var m=g.value;d=o.immutableSet(d,e.PizzagnaLayer.Data+"."+m+".properties",p.children[m])}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(i)throw i.error}}this.updatePizzagna(d),this.eventBus.getStream(rt).next({payload:{path:"",value:d}})},t.prototype.createComponentsFromTemplate=function(e,t){var n=this.dynamicComponentCreator.getPizzagnaUpdatedWithComponents(this.pizzagna,e,t);this.updatePizzagna(n),this.eventBus.getStream(rt).next({payload:{path:"",value:n}})},t.prototype.removeComponents=function(e){var t=this;te.default(e)?e.forEach((function(e){return t.removeComponent(e)})):this.removeComponent(e)},t.prototype.removeComponent=function(t){var n,o,i,r,a,s=Object.assign({},this.pizzagna),l=Fe([t],null===(a=this.pizzagna[e.PizzagnaLayer.Structure][t].properties)||void 0===a?void 0:a.nodes),d=[e.PizzagnaLayer.Structure,e.PizzagnaLayer.Configuration,e.PizzagnaLayer.Data];try{for(var c=Re(d),u=c.next();!u.done;u=c.next()){var p=u.value;if(s[p])try{for(var h=(i=void 0,Re(l)),g=h.next();!g.done;g=h.next()){var m=g.value;s[p]=ne.default(s[p],m)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}this.eventBus.getStream(rt).next({payload:{path:"",value:s}}),this.updatePizzagna(s)},t}();function sn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=t.filter((function(e){return void 0!==e.previousValue||void 0!==e.currentValue}));if(!oe.default(o,(function(e){return e.currentValue!==e.previousValue})))return e;if(1===o.length)return o[0].currentValue;var i=dn(o);if(!["object","object[]"].includes(i))return ln(o);var r=ie.default.apply(void 0,Fe(o.map((function(e){return"object"==typeof e.currentValue?Object.keys(e.currentValue||{}):[]})))),a="object[]"===i?[]:{};return r.reduce((function(t,n){var i=null==e||void 0===e[n]?void 0:e[n],r=o.map((function(e){return{previousValue:void 0===e.previousValue||null==e.previousValue?void 0:e.previousValue[n],currentValue:void 0===e.currentValue||null==e.currentValue?void 0:e.currentValue[n]}}));return t[n]=sn.apply(void 0,Fe([i],r)),t}),a)}function ln(e){for(var t=e.length-1;t>=0;t--){var n=e[t].currentValue;if(void 0!==n)return n}}function dn(e){var t,n;try{for(var o=Re(e),i=o.next();!i.done;i=o.next()){var r=i.value,a=typeof r.currentValue;if("undefined"!==a&&null!=r.currentValue)return te.default(r.currentValue)?"object"===typeof r.currentValue[0]?"object[]":"array":r.currentValue.constructor!==Object?"advanced":a}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return"undefined"}an.decorators=[{type:n.Injectable}],an.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:rn}]};var cn=function(){function e(e,t,n){this.changeDetector=e,this.pizzagnaService=t,this.logger=n,this.destroyed$=new d.Subject}return e.prototype.ngOnChanges=function(e){(e.nodes||e.template)&&this.updateNodeConfigs({changesNodes:e.nodes,changesTemplate:e.template})},e.prototype.ngDoCheck=function(){this.checkNodeConfigs()&&(this.updateNodeConfigs(),this.changeDetector.detectChanges())},e.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},e.prototype.trackByFn=function(e,t){return t.id},e.prototype.checkNodeConfigs=function(){var e=this.getNodes();if(!this.nodeComponentsConfigs||e.length!==this.nodeComponentsConfigs.length)return!0;for(var t=0;t<e.length;t++)if(this.pizzagnaService.getComponent(e[t])!==this.nodeComponentsConfigs[t])return!0;return!1},e.prototype.updateNodeComponentConfigs=function(){var e=this,t=this.getNodes();this.nodeComponentsConfigs=t&&t.map((function(t){var n=e.pizzagnaService.getComponent(t);if(void 0===n)throw new Error("No component with id '"+t+"' was defined in the configuration.");return n}))},e.prototype.updateNodeConfigs=function(e){this.nodeConfigs=sn(this.nodeConfigs,this.getTemplateChangeForNodes(e),this.getNodeComponentsConfigs())},e.prototype.getNodeComponentsConfigs=function(){var e={currentValue:void 0,previousValue:this.nodeComponentsConfigs?Fe(this.nodeComponentsConfigs):void 0};return this.updateNodeComponentConfigs(),e.currentValue=this.nodeComponentsConfigs,e},e.prototype.getTemplateChangeForNodes=function(e){var t=this,n=e||{},o=n.changesNodes,i=n.changesTemplate,r=function(e){var n;return e&&(null===(n=t.getNodes())||void 0===n?void 0:n.map((function(){return e})))};return{currentValue:r(i?i.currentValue:this.template),previousValue:o?this.template:r(i?i.previousValue:this.template)}},e}();cn.decorators=[{type:n.Injectable}],cn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService}]},cn.propDecorators={template:[{type:n.Input}]};var un=function(e){function t(t,n,o){var i=e.call(this,t,n,o)||this;return i.nodes=[],i.direction="column",i.elementClass="",i.defaultClassNames="h-100 w-100 d-flex",i}return ke(t,e),t.prototype.ngOnInit=function(){this.classNames=this.defaultClassNames+" flex-"+this.direction+" "+this.elementClass},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t.prototype.getNodes=function(){return this.nodes},t}(cn);un.lateLoadKey="StackComponent",un.decorators=[{type:n.Component,args:[{selector:"nui-stack",template:'<ng-container *ngFor="let node of nodeConfigs; trackBy: trackByFn">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="node.id"\n [componentType]="node.componentType"\n [providers]="node.providers"\n [properties]="node.properties">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</ng-container>\n'}]}],un.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService}]},un.propDecorators={nodes:[{type:n.Input}],direction:[{type:n.Input}],elementClass:[{type:n.Input}],classNames:[{type:n.HostBinding,args:["class"]}]};var pn=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o)||this;return r.ngZone=i,r.nodes=[],r.direction="column",r.prioritizeGridRows=!1,r}return ke(t,e),t.prototype.ngAfterViewInit=function(){this.handleGridFlowOnResize()},t.prototype.ngOnDestroy=function(){var t;null===(t=this.tilesResizeObserver)||void 0===t||t.disconnect(),e.prototype.ngOnDestroy.call(this)},t.prototype.getNodes=function(){return this.nodes},t.prototype.handleGridFlowOnResize=function(){var e=this;this.tilesResizeObserver=new re.default((function(){return e.onResize()})),this.ngZone.runOutsideAngular((function(){e.tilesResizeObserver.observe(e.gridItemsContainer.nativeElement)}))},t.prototype.onResize=function(){var e;if(!((null===(e=this.nodes)||void 0===e?void 0:e.length)<2)){var t=this.gridItemsContainer.nativeElement.getBoundingClientRect(),n=t.height/t.width,o=hn(this.nodes.length);return n-.05>o&&!this.prioritizeGridRows?(this.prioritizeGridRows=!0,void this.changeDetector.detectChanges()):n+.05<o&&this.prioritizeGridRows?(this.prioritizeGridRows=!1,void this.changeDetector.detectChanges()):void 0}},t}(cn);pn.lateLoadKey="TilesComponent",pn.decorators=[{type:n.Component,args:[{selector:"nui-tiles",template:'<div #gridItemsContainer\n class="nui-grid-layout"\n [ngClass]="{ \'prioritize-rows\': prioritizeGridRows }"\n >\n <ng-container *ngFor="let node of nodeConfigs; trackBy: trackByFn" >\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="node.id"\n [componentType]="node.componentType"\n [properties]="node.properties"\n [providers]="node.providers">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </ng-container>\n</div>\n',styles:[".nui-grid-layout{display:grid;height:100%;gap:10px;grid-template-columns:repeat(auto-fit,minmax(calc(54px * 1.2 + 2 * 15px),1fr));grid-template-rows:repeat(auto-fit,minmax(15px,1fr));line-height:1.2}.nui-grid-layout.prioritize-rows{grid-auto-flow:column;grid-template-columns:minmax(1px,1fr)}:host-context(.mobile){min-height:160px}"]}]}],pn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService},{type:n.NgZone}]},pn.propDecorators={nodes:[{type:n.Input}],direction:[{type:n.Input}],elementClass:[{type:n.HostBinding,args:["class"]}],gridItemsContainer:[{type:n.ViewChild,args:["gridItemsContainer",{static:!0}]}]};var hn=function(e){return.25*e+.7},gn=function(){function e(e){this.changeDetector=e,this.navigated=new n.EventEmitter}return Object.defineProperty(e.prototype,"widgetWidth",{set:function(e){this.isMedium=e<=600&&e>480,this.isSmall=e<=480},enumerable:!1,configurable:!0}),e.prototype.onButtonClick=function(){this.canNavigate&&this.navigated.emit(this)},e}();gn.lateLoadKey="ListGroupItemComponent",gn.decorators=[{type:n.Component,args:[{selector:"nui-list-group-item",template:'<div class="list-group-item" [ngClass]="{\'widget-medium\': isMedium, \'widget-small\': isSmall}" (click)="onButtonClick()">\n <div class="list-group-item__label" [title]="label">{{ label }}</div>\n <div class="list-group-item__statuses">\n <div class="statuses">\n <div class="status-column"\n *ngFor="let status of statuses">\n <nui-icon [icon]="status.key" class="mr-2"></nui-icon>\n <span class="status-column__label" [title]="status.value">{{status.value}}</span>\n </div>\n </div>\n <nui-icon *ngIf="canNavigate" icon="caret-right"></nui-icon>\n </div>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,host:{class:"w-100"},styles:[".list-group-item{width:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap}.list-group-item__label{width:25%;max-width:100%;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.list-group-item__statuses{width:75%;display:flex;align-items:center}.list-group-item .status-column{display:flex;width:75px;min-width:75px;max-width:100%;justify-content:flex-start;align-items:center;padding-right:10px}.list-group-item .status-column__label{margin-left:5px;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.list-group-item .statuses{display:flex;flex-grow:1;justify-content:flex-end}.widget-medium{justify-content:flex-end}.widget-medium .list-group-item__label,.widget-medium .list-group-item__statuses{width:100%!important}.widget-small{justify-content:flex-end}.widget-small .list-group-item__label,.widget-small .list-group-item__statuses{width:100%!important}.widget-small .statuses{justify-content:space-between}"]}]}],gn.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},gn.propDecorators={id:[{type:n.Input}],label:[{type:n.Input}],statuses:[{type:n.Input}],canNavigate:[{type:n.Input}],widgetWidth:[{type:n.Input}],navigated:[{type:n.Output}]};var mn=function(){function e(e,t){this.changeDetector=e,this.eventBus=t,this.navigated=new n.EventEmitter,this.searchTerm="",this.destroy$=new d.Subject}return e.prototype.onButtonClick=function(){this.canNavigate&&this.navigated.emit(this)},e.prototype.ngOnInit=function(){var e=this;this.eventBus.getStream(it).pipe(v.takeUntil(this.destroy$)).subscribe((function(t){e.searchTerm=t.payload,e.changeDetector.markForCheck()}))},e}();mn.lateLoadKey="ListLeafItemComponent",mn.decorators=[{type:n.Component,args:[{selector:"nui-list-leaf-item",template:'<div class="nui-list-leaf-item" (click)="onButtonClick()">\n <div class="nui-list-leaf-item__info-container">\n <div class="nui-list-leaf-item__icon-container">\n <nui-icon *ngIf="icon; else statusTpl" [icon]="icon" [status]="status" class="mr-1"></nui-icon>\n </div>\n <div class="nui-list-leaf-item__description">\n <a class="nui-text-ellipsis" \n [ngClass]="url ? \'\' : \'not-active\'"\n [attr.target]="url ? \'_blank\' : null" \n [attr.href]="url || null" \n [innerHTML]="label | nuiHighlight: searchTerm"></a>\n <div class="nui-text-secondary nui-text-ellipsis"[innerHTML]="detailedUrl | nuiHighlight: searchTerm "></div>\n </div>\n\n <ng-template #statusTpl>{{ status }}</ng-template>\n </div>\n <nui-icon *ngIf="canNavigate" icon="caret-right"></nui-icon>\n</div>',changeDetection:n.ChangeDetectionStrategy.OnPush,host:{class:"w-100"},styles:[".nui-list-leaf-item{width:100%;display:flex;justify-content:space-between;align-items:center;padding:5px 0}.nui-list-leaf-item__info-container{display:flex;height:40px}.nui-list-leaf-item__icon-container{display:flex;justify-content:center;align-items:center;min-width:30px}.nui-list-leaf-item__description{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr;max-width:100%}a.not-active{text-decoration:none;color:#111}"]}]}],mn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},mn.propDecorators={icon:[{type:n.Input}],status:[{type:n.Input}],detailedUrl:[{type:n.Input}],label:[{type:n.Input}],canNavigate:[{type:n.Input}],url:[{type:n.Input}],navigated:[{type:n.Output}]};var fn=function(){function e(e,t){this.changeDetector=e,this.eventBus=t,this.navigated=new n.EventEmitter}return e.prototype.onBack=function(){var e,t,n;this.navBarConfig&&this.eventBus.getStream(pt).next({payload:{back:null===(n=null===(t=null===(e=this.navBarConfig)||void 0===e?void 0:e.buttons)||void 0===t?void 0:t.back)||void 0===n?void 0:n.disabled}})},e.prototype.onHome=function(){this.eventBus.getStream(pt).next({payload:{reset:!0}})},e}();fn.lateLoadKey="ListNavigationBarComponent",fn.decorators=[{type:n.Component,args:[{selector:"nui-navigation-bar",template:'<div class="list-nav-bar" *ngIf="navBarConfig && !navBarConfig?.isRoot">\n <button nui-button\n type="button"\n [isRepeat]="true"\n displayStyle="action"\n icon="arrow-left"\n [disabled]="!navBarConfig?.buttons?.back?.disabled"\n (click)="onBack()"></button>\n\n <button nui-button\n type="button"\n [isRepeat]="true"\n displayStyle="action"\n icon="overview"\n (click)="onHome()"></button>\n <div class="list-nav-bar__label">{{navBarConfig?.label}}</div>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".list-nav-bar{width:100%;margin:2px 0;padding:0 15px;display:flex;align-items:center}.list-nav-bar__label{padding-left:5px;color:rgba(17,17,17,.6)}"]}]}],fn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},fn.propDecorators={navBarConfig:[{type:n.Input}],navigated:[{type:n.Output}]};var vn=function(){function e(e,t,n,o){this.changeDetector=e,this.zone=t,this.host=n,this.eventBus=o,this.itemFormatterProps=new Map,this.destroy$=new d.Subject}return e.prototype.ngOnInit=function(){this.initResizeObserver()},e.prototype.ngOnChanges=function(e){var t,n=this;(null===(t=e.data)||void 0===t?void 0:t.currentValue)&&e.data.currentValue.forEach((function(e){return n.itemFormatterProps.set(e,n.calcItemProps(e))}))},e.prototype.onListItemEvent=function(e){this.eventBus.getStream(pt).next({payload:e})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.itemFormatterProps.clear()},e.prototype.getPropsFor=function(e){return Object.assign(Object.assign({},this.itemFormatterProps.get(e)),{widgetWidth:this.widgetWidth})},e.prototype.calcItemProps=function(e){return this.configuration?Object.assign(Object.assign({},tn(this.configuration,e)),this.configuration.itemProperties):e},e.prototype.initResizeObserver=function(){var e=this,t=new o.ResizeObserverDirective(this.host,this.zone);t.debounceTime=10,t.ngAfterViewInit(),t.containerResize.pipe(v.takeUntil(this.destroy$)).subscribe((function(){e.widgetWidth=e.host.nativeElement.offsetWidth}))},e}();vn.lateLoadKey="ListWidgetComponent",vn.decorators=[{type:n.Component,args:[{selector:"nui-list-widget",template:'<nui-repeat [itemsSource]="data"\n [repeatItemTemplateRef]="repeatItemTemplate">\n</nui-repeat>\n\n<ng-template #repeatItemTemplate let-item="item">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="configuration.componentType"\n [componentType]="configuration.componentType"\n [properties]="getPropsFor(item)"\n [outputs]="[\'navigated\']"\n (output)="onListItemEvent(item)"\n >\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</ng-template>\n\n',host:{style:"overflow: scroll"},styles:[""]}]}],vn.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:n.NgZone},{type:n.ElementRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},vn.propDecorators={data:[{type:n.Input}],configuration:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}]};var yn=function(e){this.changeDetector=e,this.active=!1};yn.lateLoadKey="LoadingComponent",yn.decorators=[{type:n.Component,args:[{selector:"nui-loading",template:'<nui-progress [@animate]="active"\n (@animate.start)="$event.element.style.display = \'block\'"\n (@animate.done)="$event.element.style.display = ($event.toState ? \'block\' : \'none\')"\n [show]="true"\n compactMode="true">\n</nui-progress>\n',animations:[y.trigger("animate",[y.state("true",y.style({opacity:1})),y.state("false",y.style({opacity:0})),y.transition("false <=> true",y.animate(500))])],styles:[":host{height:5px;flex-shrink:0}"]}]}],yn.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},yn.propDecorators={active:[{type:n.Input}]};var bn=function(){function e(e,t){var n=this;this.logger=e,this.className=t,this.state$=new d.BehaviorSubject({}),this.stateChanged$=this.state$.asObservable().pipe(v.map((function(){return n.getItems()}))),this._isEmpty=!0}return Object.defineProperty(e.prototype,"stateVersion",{get:function(){return this._stateVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this._isEmpty},enumerable:!1,configurable:!0}),e.prototype.addItems=function(e,t){var n=this;void 0===t&&(t={overrideExisting:!0});var o=this.state$.value;e.forEach((function(e){!o[n.getItemKey(e)]||t.overrideExisting?o[n.getItemKey(e)]=Object.assign({},e):n.logger.warn("Logger - "+n.className+": item with "+n.getItemKey(e)+"\n is already registered. Skipping.")})),this.state$.next(o),e.length>0&&this.updateStateFlags(!1)},e.prototype.getItem=function(e){return this.state$.value[e]},e.prototype.getItems=function(){return Object.values(this.state$.value)},e.prototype.reset=function(){this.state$.next({}),this.updateStateFlags(!0)},e.prototype.ngOnDestroy=function(){this.state$.complete()},e.prototype.updateStateFlags=function(e){this._isEmpty=e,this._stateVersion=o.uuid()},e}();bn.decorators=[{type:n.Directive}],bn.ctorParameters=function(){return[{type:o.LoggerService},{type:String}]};var Cn=function(e){function t(t){return e.call(this,t,"ProportionalContentAggregatorsRegistryService")||this}return ke(t,e),t.prototype.getItemKey=function(e){return e.aggregatorType},t}(bn);Cn.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Cn(X.ɵɵinject(J.LoggerService))},token:Cn,providedIn:"root"}),Cn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Cn.ctorParameters=function(){return[{type:o.LoggerService}]};var Sn=new o.EventDefinition("DATA_SOURCE_OUTPUT",(function(){return new d.ReplaySubject(1)})),wn=new o.EventDefinition("DATA_SOURCE_DESTROYED"),In=new o.EventDefinition("DATA_SOURCE_CHANGE"),Pn=new o.EventDefinition("DATA_SOURCE_CREATED",(function(){return new d.BehaviorSubject({payload:void 0})})),Tn=function(){function t(e,t,n){var o=this;this.eventBus=e,this.dataSource=t,this.pizzagnaService=n,this.destroy$=new d.Subject,this.dataSource&&(this.setupRefreshListener(),this.dataSource.outputsSubject.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){return o.handleDataSourceUpdate(e)})),this.dataSource.busy&&this.dataSource.busy.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){o.eventBus.getStream(lt).next({payload:{componentId:o.componentId,busy:e}})})))}return t.prototype.setupRefreshListener=function(){var e=this;this.eventBus.getStream(Ye).pipe(v.takeUntil(this.destroy$)).subscribe((function(){return e.handleRefresh()}))},t.prototype.handleRefresh=function(){this.eventBus.getStream(ut).next(),this.dataSource.applyFilters()},t.prototype.handleDataSourceUpdate=function(e){this.lastValue=ae.default(null==e?void 0:e.result)?e:null==e?void 0:e.result,this.updateOutput(this.lastValue),this.eventBus.getStream(Sn).next({payload:Object.assign({componentId:this.componentId},e)})},t.prototype.ngOnDestroy=function(){this.updateOutput(void 0);var e={payload:{componentId:this.componentId}};this.eventBus.getStream(wn).next(e);var t={payload:{componentId:this.componentId,busy:!1}};this.eventBus.getStream(lt).next(t),this.destroy$.next(),this.destroy$.complete()},t.prototype.updateConfiguration=function(e){e.componentId&&(this.componentId=e.componentId),this.updateAdapterProperties(e),this.updateDataSourceProperties(e),void 0!==this.lastValue&&this.updateOutput(this.lastValue)},t.prototype.updateAdapterProperties=function(e){this.propertyPath=e.propertyPath},t.prototype.updateDataSourceProperties=function(e){var t,n,o=this,i=null===(t=null==e?void 0:e.dataSource)||void 0===t?void 0:t.properties;if(this.dataSourceConfiguration!==i){this.dataSourceConfiguration=i;var r=this.dataSource;(null==r?void 0:r.updateConfiguration)&&r.updateConfiguration(null===(n=e.dataSource)||void 0===n?void 0:n.properties),this.eventBus.getStream(Ye).next()}void 0===this.dataSourceConfiguration&&void 0===i&&setTimeout((function(){return o.eventBus.getStream(Ye).next()}))},t.prototype.updateOutput=function(t){this.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Data,componentId:this.componentId,propertyPath:[this.propertyPath]},this.processOutput(t))},t.prototype.processOutput=function(e){return e},t}();Tn.decorators=[{type:n.Injectable}],Tn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:an}]};var xn=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.dataSource=n,i.drillstate=[],i.eventBus.getStream(pt).pipe(v.takeUntil(i.destroy$)).subscribe((function(e){var t;(null===(t=i.dataSource.busy)||void 0===t?void 0:t.value)||i.onDrilldown(e)})),i.registerFilters(),i}return ke(n,t),n.prototype.updateAdapterProperties=function(e){this.dataPath=e.dataPath,this.drillstate=e.drillstate||this.drillstate,this.groupBy=e.groupBy,this.componentsConfig=e.componentsConfig,this.navigationBarId=e.navigationBarId},n.prototype.updateOutput=function(t){var n=this.getWidgetInput(t,this.drillstate.length!==this.groupBy.length),o=e.PizzagnaLayer.Data+"."+this.componentId+".properties";if(this.pizzagnaService.setProperty(o,n),this.navigationBarId){var i=e.PizzagnaLayer.Data+"."+this.navigationBarId+".properties.navBarConfig.label",r=e.PizzagnaLayer.Data+"."+this.navigationBarId+".properties.navBarConfig.isRoot",a=e.PizzagnaLayer.Data+"."+this.navigationBarId+".properties.navBarConfig.buttons.back.disabled";this.pizzagnaService.setProperty(i,this.drillstate[this.drillstate.length-1]),this.pizzagnaService.setProperty(a,!!this.drillstate.length),this.pizzagnaService.setProperty(r,!this.drillstate.length)}},n.prototype.getWidgetInput=function(e,t){var n,o=this.componentsConfig[t?"group":"leaf"];return(n={})[this.dataPath]=e,n.configuration=o,n},n.prototype.onDrilldown=function(e){var t=e.payload;return t.reset?(this.drillstate=[],void this.eventBus.next(Ye)):t.back?(this.drillstate.length=this.drillstate.length-1,void this.eventBus.next(Ye)):(this.drillstate.push(t.id),void this.eventBus.next(Ye))},n.prototype.registerFilters=function(){var e=this;this.dataSource.registerComponent({group:{componentInstance:{getFilters:function(){return{value:e.groupBy}}}},drillstate:{componentInstance:{getFilters:function(){return{value:e.drillstate}}}}})},n}(Tn);xn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Inject,args:[Ht]}]},{type:an}]};var Dn=function(){function e(e){var t=this;this.eventBus=e,this.destroy$=new d.Subject,e.streamAdded.pipe(v.takeUntil(this.destroy$)).subscribe((function(n){e.getStream({id:n}).pipe(v.takeUntil(t.destroy$)).subscribe((function(e){console.log(e.id+": ",e.payload)}))}))}return e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e}();Dn.decorators=[{type:n.Injectable}],Dn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]};var _n=function(){function e(e){this.eventBus=e,this.initializeSubscriptions()}return e.prototype.updateConfiguration=function(e){this.properties=e},e.prototype.initializeSubscriptions=function(){var e=this;this.eventBus.getStream(ct).subscribe((function(t){var n,o,i;(null===(n=e.properties)||void 0===n?void 0:n.interactionType)&&(null===(o=e.properties)||void 0===o?void 0:o.interactionType)!==(null===(i=t.payload)||void 0===i?void 0:i.interactionType)||e.handleInteraction(t.payload)}))},e}();_n.decorators=[{type:n.Injectable}],_n.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]};var zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t}(Window),On=function(e){function t(t,n,o){var i=e.call(this,t)||this;return i.window=n,i.logger=o,i.templateOptions={evaluate:null},i}return ke(t,e),t.prototype.handleInteraction=function(e){var t;if(null===(t=this.properties)||void 0===t?void 0:t.url){var n=se.default(this.properties.url,this.templateOptions)({data:e.data});n&&(this.properties.newWindow?this.window.open(n):this.window.location.href=n)}else this.logger.warn("The target url has not been defined.")},t}(_n);On.decorators=[{type:n.Injectable}],On.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:zn,decorators:[{type:n.Inject,args:["windowObject"]}]},{type:o.LoggerService}]};var En=function(e,t){return e<t},kn=function(e,t){return e>=t},Rn=function(e,t){return e<=t},An=function(e,t){return e==t},Fn={">":{comparatorFn:function(e,t){return e>t},label:"Value is greater than"},"<":{comparatorFn:En,label:"Value is less than"},">=":{comparatorFn:kn,label:"Value is greater, or equal to"},"<=":{comparatorFn:Rn,label:"Value is less than, or equal to"},"==":{comparatorFn:An,label:"Value is exactly"}},Vn=function(){function e(){this.comparators=Object.assign({},Fn)}return e.prototype.registerComparators=function(e){this.comparators=Object.assign(Object.assign({},this.comparators),e)},e.prototype.clearComparators=function(){this.comparators={}},e.prototype.getComparators=function(){return this.comparators},e}();Vn.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Vn},token:Vn,providedIn:"root"}),Vn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Vn.ctorParameters=function(){return[]};var Ln,Bn,Nn=function(){function e(e,t,n){this.dataSource=e,this.pizzagnaService=t,this.destroy$=new d.Subject,this.propertyPath="backgroundColor",this.comparators=n.getComparators()}return e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.updateConfiguration=function(e){(null==e?void 0:e.rules)&&(this.rules=null==e?void 0:e.rules,this.subscribeToDataChanges(),this.checkColorConditions())},e.prototype.setComponent=function(e,t){this.subscribeToDataChanges(),this.componentId=t},e.prototype.subscribeToDataChanges=function(){var e,t=this;this.dataSource&&(null===(e=this.dsSubscription$)||void 0===e||e.unsubscribe(),this.dsSubscription$=this.dataSource.outputsSubject.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n;t.latestValueFromDS=(null===(n=e.result)||void 0===n?void 0:n.value)||t.latestValueFromDS,t.checkColorConditions()})))},e.prototype.checkColorConditions=function(){var e,t,n,o;if(this.rules){if(0===this.rules.length)return this.setColor(void 0),void(null===(n=this.dsSubscription$)||void 0===n||n.unsubscribe());var i,r=this.rules&&Fe(this.rules).reverse();try{for(var a=Re(r),s=a.next();!s.done;s=a.next()){var l=s.value;if(null===(o=this.comparators[l.comparisonType])||void 0===o?void 0:o.comparatorFn(this.latestValueFromDS,l.value)){i=l.color;break}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}this.setColor(i)}},e.prototype.setColor=function(e){this.pizzagnaService.setProperty({componentId:this.componentId,propertyPath:[this.propertyPath]},e)},e}();Nn.decorators=[{type:n.Injectable}],Nn.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:an},{type:Vn}]},e.KpiWidgetThresholdColors=void 0,(Ln=e.KpiWidgetThresholdColors||(e.KpiWidgetThresholdColors={})).Warning="var(--nui-color-semantic-warning)",Ln.Critical="var(--nui-color-semantic-critical)",e.KpiWidgetFontSizes=void 0,(Bn=e.KpiWidgetFontSizes||(e.KpiWidgetFontSizes={})).Small="24px",Bn.Medium="48px",Bn.Large="72px",Bn.ExtraLarge="120px";var $n=function(t){function n(e,n,o,i){var r=t.call(this,e,n,o)||this;return r.numberPipe=i,r}return ke(n,t),n.prototype.updateConfiguration=function(e){this.thresholds=e.thresholds,t.prototype.updateConfiguration.call(this,e)},n.prototype.processOutput=function(e){var t=this.processThresholds(e);return this.processNumberFormat(t)},n.prototype.setComponent=function(e,t){t&&(this.componentId=t)},n.prototype.getThresholdColor=function(t,n,o){var i=this.getThresholdChecks(t,n,t.reversedThresholds);return i.warningCheck?e.KpiWidgetThresholdColors.Warning:i.criticalCheck?e.KpiWidgetThresholdColors.Critical:o},n.prototype.getThresholdChecks=function(e,t,n){var o=e.warningThresholdValue,i=e.criticalThresholdValue,r=!ee.default(o)&&t.value<=o&&t.value>i,a=t.value<=i,s=!ee.default(o)&&t.value>=o&&t.value<i,l=t.value>=i;return{warningCheck:n?r:s,criticalCheck:n?a:l}},n.prototype.processThresholds=function(e){var t;if(!e||!(null===(t=this.thresholds)||void 0===t?void 0:t.showThresholds)||"number"!=typeof e.value)return e;var n=this.getThresholdColor(this.thresholds,e,e.backgroundColor);return Object.assign(Object.assign({},e),{backgroundColor:n})},n.prototype.processNumberFormat=function(e){if("number"!=typeof(null==e?void 0:e.value)||!(null==e?void 0:e.numberFormat))return e;var t=this.numberPipe.transform(e.value,e.numberFormat);return Object.assign(Object.assign({},e),{value:t})},n}(Tn);$n.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:an},{type:t.DecimalPipe}]};var jn=function(){function t(e,t){this.eventBus=e,this.pizzagnaService=t,this.brokers=[],this.builder=new Kn(this.brokers),this.destroySubscriptions$=new d.Subject,this.getMin=function(e){return Math.min.apply(Math,Fe(e))},this.getMax=function(e){return Math.max.apply(Math,Fe(e))},this.valuesObject=this.builder.valuesObject}return t.prototype.updateConfiguration=function(e){this.properties=e,this.componentId&&this.createPropertiesAndSubscribeToBrokers()},t.prototype.configure=function(){return this.builder},t.prototype.getBrokers=function(){return this.brokers},t.prototype.subscribeToBrokers=function(){var e=this;this.destroy(),this.brokers.forEach((function(t){t.in$.pipe(v.filter((function(e){return!!t.in$.observers.length})),v.distinctUntilChanged(),v.tap((function(t){return e.configureValueModel(t)})),v.tap((function(n){return e.processAndEmitSyncedValue(n,t)})),v.takeUntil(e.destroySubscriptions$)).subscribe()}))},t.prototype.setComponent=function(e,t){this.componentId=t,this.updateConfiguration(this.properties)},t.prototype.destroy=function(){this.destroySubscriptions$.next(),this.destroySubscriptions$.complete()},t.prototype.processAndEmitSyncedValue=function(e,t){var n=this.getMin;(null==t?void 0:t.type)&&(n="min"===t.type?this.getMin:this.getMax);var o=this.valuesObject[t.id].filter((function(e){return e.targetID&&e.targetValue})).map((function(e){return e.targetValue}));t.out$.next(Object.assign(Object.assign({},e),{targetValue:n(Fe(o))}))},t.prototype.configureValueModel=function(e){var t=this.valuesObject[e.id].filter((function(t){return t.targetID===e.targetID}));t.length?t[0].targetValue=e.targetValue:this.valuesObject[e.id].push({targetID:e.targetID,targetValue:e.targetValue})},t.prototype.createPropertiesAndSubscribeToBrokers=function(){var t,n,o=this;this.tileNodes=null===(t=this.pizzagnaService.getComponent(this.componentId).properties)||void 0===t?void 0:t.nodes;var i=this.properties.scaleSyncConfig;(null===(n=this.tileNodes)||void 0===n?void 0:n.length)&&(this.tileNodes.forEach((function(t,n){var i={componentId:t,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["syncValuesBroker"]};o.pizzagnaService.setProperty(i,o.getBrokers())})),i&&te.default(i)&&(i.forEach((function(e){return o.configure().addBroker({id:e.id,type:null==e?void 0:e.type})})),this.subscribeToBrokers()))},t}();jn.decorators=[{type:n.Injectable}],jn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:an}]};var Kn=function(){function e(e){this.brokers=e,this.valuesObject={}}return e.prototype.addBroker=function(e){var t={id:e.id,targetID:"",targetValue:1};return this.valuesObject[e.id]=new Array,this.brokers.push(Object.assign(Object.assign({},e),this.getDefaultBrokerObject(t,t))),this},e.prototype.getDefaultBrokerObject=function(e,t){return{in$:new d.BehaviorSubject(e),out$:new d.BehaviorSubject(t)}},e}(),Wn=function(){function t(e,t){var n=this;this.eventBus=e,this.pizzagnaService=t,this.destroy$=new d.Subject,this.eventBus.getStream(Sn).pipe(v.takeUntil(this.destroy$)).subscribe((function(e){n.handleDataSourceOutput(e)}))}return t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.setComponent=function(e,t){this.componentId=t},t.prototype.handleDataSourceOutput=function(t){var n,o,i,r;this.pizzagnaService.setProperty({componentId:this.componentId,propertyPath:["fallbackKey"],pizzagnaKey:e.PizzagnaLayer.Data},void 0!==(null===(o=null===(n=t.payload)||void 0===n?void 0:n.error)||void 0===o?void 0:o.type)?null===(r=null===(i=t.payload)||void 0===i?void 0:i.error)||void 0===r?void 0:r.type.toString():void 0)},t}();Wn.decorators=[{type:n.Injectable}],Wn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:an}]};var Mn=function(t){function n(n,o){var i=t.call(this,n,o)||this;return i.multipleErrorFallbackKey=e.HttpStatusCode.Unknown,i.errorMap={},i.eventBus.getStream(wn).pipe(v.takeUntil(i.destroy$)).subscribe((function(e){i.handleDataSourceDestroyed(e)})),i}return ke(n,t),n.prototype.updateConfiguration=function(e){e.multipleErrorFallbackKey&&(this.multipleErrorFallbackKey=e.multipleErrorFallbackKey)},n.prototype.handleDataSourceOutput=function(e){this.errorMap=this.updateErrorMap(e),this.setFallbackKeyProperty()},n.prototype.handleDataSourceDestroyed=function(e){var t;(null===(t=e.payload)||void 0===t?void 0:t.componentId)&&delete this.errorMap[e.payload.componentId],this.setFallbackKeyProperty()},n.prototype.setFallbackKeyProperty=function(){this.pizzagnaService.setProperty({componentId:this.componentId,propertyPath:["fallbackKey"],pizzagnaKey:e.PizzagnaLayer.Data},this.getFallbackKey())},n.prototype.getFallbackKey=function(){if(!le.default(this.errorMap)){var e=de.default(Object.values(this.errorMap));return 1===e.length?e[0]:this.multipleErrorFallbackKey}},n.prototype.updateErrorMap=function(e){var t,n,o,i,r=this.errorMap,a=void 0!==(null===(n=null===(t=e.payload)||void 0===t?void 0:t.error)||void 0===n?void 0:n.type)?null===(i=null===(o=e.payload)||void 0===o?void 0:o.error)||void 0===i?void 0:i.type.toString():void 0;return a?a&&(r[e.payload.componentId]=a):delete r[e.payload.componentId],r},n}(Wn);Mn.decorators=[{type:n.Injectable}],Mn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:an}]};var Un=function(){function t(t,n){var o=this;this.eventBus=t,this.pizzagnaService=n,this.loadingMap={},this.destroy$=new d.Subject,this.eventBus.getStream(lt).pipe(v.takeUntil(this.destroy$)).subscribe((function(t){var n=t.payload;(null==n?void 0:n.componentId)&&((null==n?void 0:n.busy)?o.loadingMap[n.componentId]=!0:delete o.loadingMap[n.componentId]),o.pizzagnaService.setProperty({componentId:o.componentId,propertyPath:["active"],pizzagnaKey:e.PizzagnaLayer.Data},!le.default(o.loadingMap))}))}return t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.setComponent=function(e,t){this.componentId=t},t}();Un.decorators=[{type:n.Injectable}],Un.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:an}]};var Hn=/\{.*?\}/g,Gn=/\{|\}/g;function qn(e,t){var n,o,i=e.match(Hn);if(!i)return e;var r=e;try{for(var a=Re(i),s=a.next();!s.done;s=a.next()){var l=s.value,d=Zn(l);t[d]?r=r.replace(l,t[d]):console.warn("There's no "+l+" key found in the data: "+t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return r}var Zn=function(e){return e.replace(Gn,"")},Yn=function(){function e(e){this.pizzagnaService=e,this.defaultTrackOn="pizzagna",this.subscriptions=[]}return e.prototype.setComponent=function(e,t){var n,o;this.component=e,this.componentId=t,this.parentComponentId=(null==(o=(n=t).split("/"))?void 0:o.length)>1?o[o.length-2]:n,this.initChangeSubscriptions()},e.prototype.updateConfiguration=function(e){this.configs=null==e?void 0:e.configs},e.prototype.initChangeSubscriptions=function(){var e,t,n=this,o=function(e){var t=i.getObservableFor(e);if(!t)return console.warn("no observable found on 'PizzagnaBroadcasterService', for part: ",e),{value:void 0};var o=t.subscribe((function(t){var o,i;try{for(var r=(o=void 0,Re(e.paths)),a=r.next();!a.done;a=r.next()){var s=qn(a.value,n);n.pizzagnaService.setProperty(s,t)}}catch(e){o={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}}));i.subscriptions.push(o)},i=this;try{for(var r=Re(this.configs),a=r.next();!a.done;a=r.next()){var s=o(a.value);if("object"==typeof s)return s.value}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},e.prototype.getObservableFor=function(e){return"component"===(e.trackOn||this.defaultTrackOn)?this.getComponentObservableFor(e):this.getPizzagnaObservableFor(e)},e.prototype.getPizzagnaObservableFor=function(e){return this.pizzagnaService.pizzaChanged.pipe(v.map((function(t){return ce.default(t,e.key)})),v.distinctUntilChanged())},e.prototype.getComponentObservableFor=function(e){var t=ce.default(this.component,e.key);return null==t?void 0:t.pipe(v.distinctUntilChanged())},e.prototype.ngOnDestroy=function(){var e,t;try{for(var n=Re(this.subscriptions),o=n.next();!o.done;o=n.next()){o.value.unsubscribe()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e}();Yn.decorators=[{type:n.Injectable}],Yn.ctorParameters=function(){return[{type:an}]};var Xn=300,Jn=function(){function e(){this._refreshRateSeconds=Xn,this.refreshRateSeconds$=new d.BehaviorSubject(this.refreshRateSeconds)}return Object.defineProperty(e.prototype,"refreshRateSeconds",{get:function(){return this._refreshRateSeconds},set:function(e){this._refreshRateSeconds=e,this.refreshRateSeconds$.next(this._refreshRateSeconds)},enumerable:!1,configurable:!0}),e}();Jn.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Jn},token:Jn,providedIn:"root"}),Jn.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}];var Qn=function(){function e(e,t,n){var o=this;this.eventBus=e,this.ngZone=t,this.refresherSettings=n,this.enabled=!0,this.overrideDefaultSettings=!0,this.interval=Xn,this.eventDef=Ye,this.destroy$=new d.Subject,this.refresherSettings.refreshRateSeconds$.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){o.overrideDefaultSettings||o.initializeInterval()}))}return e.prototype.updateConfiguration=function(e){var t,n,o,i;this.interval=null!==(t=e.interval)&&void 0!==t?t:Xn,this.enabled=null===(n=e.enabled)||void 0===n||n,this.overrideDefaultSettings=null===(o=e.overrideDefaultSettings)||void 0===o||o,this.eventDef=null!==(i=e.event)&&void 0!==i?i:Ye,this.initializeInterval()},e.prototype.ngOnDestroy=function(){this.clearInterval(),this.destroy$.next(),this.destroy$.complete()},e.prototype.initializeInterval=function(){var e=this;this.clearInterval(),void 0===this.interval||this.getInterval()<=0||!1===this.enabled||this.ngZone.runOutsideAngular((function(){e.intervalRef=setInterval((function(){e.ngZone.run((function(){e.performAction()}))}),1e3*e.getInterval())}))},e.prototype.performAction=function(){this.eventBus.getStream(this.eventDef).next()},e.prototype.getInterval=function(){return this.overrideDefaultSettings?this.interval:this.refresherSettings.refreshRateSeconds},e.prototype.clearInterval=function(){void 0!==this.intervalRef&&(clearInterval(this.intervalRef),this.intervalRef=void 0)},e}();Qn.decorators=[{type:n.Injectable}],Qn.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:n.NgZone},{type:Jn}]};var eo=function(t){function n(e,n,o,i){var r=t.call(this,e,n,o)||this;return r.virtualViewport=i,r}return ke(n,t),n.prototype.setupRefreshListener=function(){var e=this,t=d.zip(this.eventBus.getStream(tt),this.eventBus.getStream(Ye)).pipe(v.switchMap((function(){return e.eventBus.getStream(Ye).pipe(v.startWith(void 0))})),v.tap((function(){return e.virtualViewport.reset({emitFirstPage:!1})})));d.merge(t,this.eventBus.getStream(Xe)).pipe(v.debounceTime(10),v.tap((function(){return e.handleRefresh()})),v.takeUntil(this.destroy$)).subscribe()},n.prototype.updateAdapterProperties=function(e){this.dataPath=e.dataPath,this.dataFieldsPath=e.dataFieldsPath,this.totalItemsPath=e.totalItemsPath},n.prototype.updateOutput=function(t){var n,o,i=null===(n=null==t?void 0:t.paginator)||void 0===n?void 0:n.total,r=null===(o=null==t?void 0:t.repeat)||void 0===o?void 0:o.itemsSource,a=null==t?void 0:t.dataFields;this.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Data,componentId:this.componentId,propertyPath:[this.totalItemsPath]},i),this.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Data,componentId:this.componentId,propertyPath:[this.dataPath]},r),this.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Data,componentId:this.componentId,propertyPath:[this.dataFieldsPath]},a)},n}(Tn);eo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Inject,args:[Ht]}]},{type:an},{type:o.VirtualViewportManager,decorators:[{type:n.Optional}]}]};var to=function(e){function t(t,n,o){var i=e.call(this,t,n,o)||this;return i.seriesIndex=[],i}return ke(t,e),t.prototype.updateConfiguration=function(t){this.seriesIndex=ue.default(t.series),e.prototype.updateConfiguration.call(this,t)},t.prototype.processOutput=function(e){return e?Object.assign(Object.assign({},e),{series:this.buildSeriesSet(null==e?void 0:e.series)}):e},t.prototype.buildSeriesSet=function(e){var t=this;return e?e.filter((function(e){return t.seriesIndex.find((function(t){return t.selectedSeriesId===e.id}))})).map((function(e){var n;return{id:e.id,data:e.data,link:e.link,secondaryLink:e.secondaryLink,legendDescriptionPrimary:null===(n=t.seriesIndex.find((function(t){return t.selectedSeriesId===e.id})))||void 0===n?void 0:n.label,legendDescriptionSecondary:e.description}})):[]},t}(Tn);to.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Inject,args:[Ht]}]},{type:an}]};var no=function(){};no.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new no},token:no,providedIn:"root"}),no.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],no.ctorParameters=function(){return[]};var oo=function(){function e(e,t){var n=this;this.eventBus=e,this.dashwizService=t,this.onDestroy$=new d.Subject,this.dataSourceCreated$=new d.Subject,this.error$=new d.Subject,this.busy$=new d.BehaviorSubject(!1),this.dataSourceFields$=new d.BehaviorSubject([]),this.eventBus.subscribeUntil(Pn,this.onDestroy$,(function(e){e.payload&&n.onDataSourceCreated(e.payload)})),this.eventBus.subscribeUntil(Sn,this.onDestroy$,(function(e){var t;if(null===(t=e.payload)||void 0===t?void 0:t.error)n.error$.next(e.payload.error);else{n.error$.next(void 0);var o=ae.default(e.payload.result)?e.payload:e.payload.result||{};(null==o?void 0:o.dataFields)&&n.dataSourceFields$.next(o.dataFields)}}))}return e.prototype.onDataSourceCreated=function(e){var t,n=this;this.dataSource=e,this.dataSourceCreated$.next(),null===(t=this.dataSource.busy)||void 0===t||t.pipe(v.takeUntil(this.dataSourceCreated$)).subscribe((function(e){var t,o;null===(o=null===(t=n.dashwizService)||void 0===t?void 0:t.component)||void 0===o||o.navigationControl.next({busyState:{busy:e},allowStepChange:!e}),n.busy$.next(e)}))},e.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},e}();oo.decorators=[{type:n.Injectable}],oo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:no}]};var io=function(){function e(){this.previewChanged=new d.Subject}return Object.defineProperty(e.prototype,"preview",{get:function(){return this._preview},set:function(e){this._preview=e,this.previewChanged.next(e)},enumerable:!1,configurable:!0}),e}();io.decorators=[{type:n.Injectable}];var ro=function(){function e(e,t,n){this.eventBus=e,this.previewService=t,this.pizzagnaService=n,this.destroy$=new d.Subject}return e.prototype.ngAfterViewInit=function(){this.buildForm(),this.toPreview(this.component.form)},e.prototype.setComponent=function(e,t){this.component=e,this.componentId=t},e.prototype.getPreview=function(){return this.previewService.preview},e.prototype.updatePreview=function(e){this.previewService.preview=e},e.prototype.updateFormPizzagna=function(e){this.pizzagnaService.updatePizzagna(e),this.eventBus.getStream(rt).next({payload:{path:"",value:e}})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e}();ro.decorators=[{type:n.Injectable}],ro.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var ao=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return ke(n,t),Object.defineProperty(n.prototype,"previewComponentId",{get:function(){return this.componentId.split("/")[0]},enumerable:!1,configurable:!0}),n.prototype.updateConfiguration=function(e){e&&e.formParts&&(this.formParts=e.formParts)},n.prototype.buildForm=function(){var t=this,n=this.getPreview(),i=this.formParts.reduce((function(i,r){var a,s,l=t.previewComponentId+"."+r.previewPath,d=ce.default(n,l);if(d)try{for(var c=Re(r.keys),u=c.next();!u.done;u=c.next()){var p=u.value;void 0!==d[p]&&(i=o.immutableSet(i,e.PizzagnaLayer.Data+"."+t.componentId+".properties."+p,d[p]))}}catch(e){a={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(a)throw a.error}}return i}),this.pizzagnaService.pizzagna);this.updateFormPizzagna(i)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=t.formParts.reduce((function(n,i){var r=i.previewOutputPath||i.previewPath;r=t.previewComponentId+"."+r;var a=ce.default(n,r),s=pe.default(e,i.keys),l=Object.assign(Object.assign({},a),s);return o.immutableSet(n,""+r,l)}),t.getPreview());t.updatePreview(n)}))},n}(ro);ao.decorators=[{type:n.Injectable}],ao.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var so=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.shouldReadForm=!1,i}return ke(n,t),n.prototype.ngAfterViewInit=function(){t.prototype.ngAfterViewInit.call(this)},n.prototype.buildForm=function(){var t,n,i,r=this,a=this.getPreview(),s=(null===(i=null===(n=null===(t=null==a?void 0:a.tiles)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.nodes)||void 0===i?void 0:i.map((function(e){return{id:e,componentType:a[e].componentType}})))||[],l=null==s?void 0:s.map((function(e){return e.id}));this.pizzagnaService.createComponentsFromTemplate("tiles",l);var d=this.pizzagnaService.pizzagna;d=o.immutableSet(d,e.PizzagnaLayer.Data+".tiles.properties.tiles",s),setTimeout((function(){return r.shouldReadForm=!0})),this.updateFormPizzagna(d)},n.prototype.toPreview=function(e){var t,n=this;null===(t=e.get("tiles"))||void 0===t||t.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var t,i,r,a;if(n.shouldReadForm){var s=n.getPreview(),l=(e||[]).map((function(e){return e.id})),d=he.default(null===(a=null===(r=null==s?void 0:s.tiles)||void 0===r?void 0:r.properties)||void 0===a?void 0:a.nodes,l);d.length&&(s=ne.default(s,d));var c=ge.default(e,(function(e){return e.id}));s=o.immutableSet(s,"tiles.properties.nodes",l);try{for(var u=Re(l),p=u.next();!p.done;p=u.next()){var h=c[p.value];if(h&&!s[h.id]){var g=n.getTileConfiguration(h.id,h.componentType);s=o.immutableSet(s,h.id,g)}}}catch(e){t={error:e}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}n.updatePreview(s)}}))},n.prototype.getTileConfiguration=function(e,t){return{id:e,providers:{dataSource:{providerId:void 0}}}},n}(ro);so.decorators=[{type:n.Injectable}],so.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var lo=function(t){function n(n,o,i){var r=t.call(this,n,o,i)||this;return r.PROPERTIES_PATH=e.PizzagnaLayer.Configuration+".chartOptionsEditor.properties",r}return ke(n,t),n.prototype.ngAfterViewInit=function(){t.prototype.ngAfterViewInit.call(this)},n.prototype.buildForm=function(){var t,n,i,r,a,s,l,d,c,u,p,h=null===(i=null===(n=null===(t=this.getPreview().chart)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.configuration)||void 0===i?void 0:i.chartOptions,g=this.pizzagnaService.pizzagna;g=o.immutableSet(g,this.PROPERTIES_PATH+".chartType",null!==(r=null==h?void 0:h.type)&&void 0!==r?r:void 0),g=o.immutableSet(g,this.PROPERTIES_PATH+".legendPlacement",null!==(a=null==h?void 0:h.legendPlacement)&&void 0!==a?a:e.LegendPlacement.None),g=o.immutableSet(g,this.PROPERTIES_PATH+".legendFormatterComponentType",null!==(l=null===(s=null==h?void 0:h.legendFormatter)||void 0===s?void 0:s.componentType)&&void 0!==l?l:""),g=o.immutableSet(g,this.PROPERTIES_PATH+".contentFormatterComponentType",null!==(c=null===(d=null==h?void 0:h.contentFormatter)||void 0===d?void 0:d.componentType)&&void 0!==c?c:"DonutContentRawFormatterComponent"),g=o.immutableSet(g,this.PROPERTIES_PATH+".contentFormatterProperties",null!==(p=null===(u=null==h?void 0:h.contentFormatter)||void 0===u?void 0:u.properties)&&void 0!==p?p:""),this.updateFormPizzagna(g)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=o.immutableSet(t.getPreview(),"chart.properties.configuration.chartOptions",e);t.updatePreview(n)}))},n}(ro);lo.decorators=[{type:n.Injectable}],lo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var co=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return ke(n,t),Object.defineProperty(n.prototype,"previewComponentId",{get:function(){return this.componentId.split("/")[0]},enumerable:!1,configurable:!0}),n.prototype.updateConfiguration=function(e){e&&e.formParts&&(this.formParts=e.formParts)},n.prototype.buildForm=function(){var t=this,n=this.getPreview(),i=this.formParts.reduce((function(i,r){var a=ce.default(n,r.previewPath),s=null==a?void 0:a.find((function(e){return e.id===t.previewComponentId})),l=pe.default(s,r.keys);return i=o.immutableSet(i,e.PizzagnaLayer.Data+"."+t.componentId+".properties",l)}),this.pizzagnaService.pizzagna);this.updateFormPizzagna(i)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=t.formParts.reduce((function(n,i){var r=i.previewOutputPath||i.previewPath,a=ce.default(n,r),s=a.findIndex((function(e){return e.id===t.previewComponentId})),l=a[s],d=pe.default(e,i.keys),c=Object.assign(Object.assign({},l),d);return o.immutableSet(n,r+"["+s+"]",c)}),t.getPreview());t.updatePreview(n)}))},n}(ro);co.decorators=[{type:n.Injectable}],co.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var uo=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return ke(n,t),n.prototype.updateConfiguration=function(e){e&&e.formParts&&(this.formParts=e.formParts)},n.prototype.buildForm=function(){var t=this,n=this.getPreview(),i=this.formParts.reduce((function(i,r){var a,s,l=ce.default(n,r.previewPath);if(l)try{for(var d=Re(r.keys),c=d.next();!c.done;c=d.next()){var u=c.value;void 0!==l[u]&&(i=o.immutableSet(i,e.PizzagnaLayer.Data+"."+t.componentId+".properties."+u,l[u]))}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}return i}),this.pizzagnaService.pizzagna);this.updateFormPizzagna(i)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=t.formParts.reduce((function(t,n){var i=n.previewOutputPath||n.previewPath,r=ce.default(t,i),a=pe.default(e,n.keys),s=Object.assign(Object.assign({},r),a);return o.immutableSet(t,i,s)}),t.getPreview());t.updatePreview(n)}))},n}(ro);uo.decorators=[{type:n.Injectable}],uo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var po=function(e){function t(t,n,o){return e.call(this,t,n,o)||this}return ke(t,e),t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this)},t.prototype.buildForm=function(){var e,n,i=this.pizzagnaService.pizzagna,r=null===(n=null===(e=this.getPreview())||void 0===e?void 0:e.header)||void 0===n?void 0:n.properties;i=o.immutableSet(i,t.PROPERTIES_PATH+".title",null==r?void 0:r.title),i=o.immutableSet(i,t.PROPERTIES_PATH+".subtitle",null==r?void 0:r.subtitle),i=o.immutableSet(i,t.PROPERTIES_PATH+".url",null==r?void 0:r.url),i=o.immutableSet(i,t.PROPERTIES_PATH+".description",null==r?void 0:r.description),i=o.immutableSet(i,t.PROPERTIES_PATH+".collapsible",null==r?void 0:r.collapsible),this.updateFormPizzagna(i)},t.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=o.immutableSet(t.getPreview(),"header.properties",e);t.updatePreview(n)}))},t}(ro);po.PROPERTIES_PATH=e.PizzagnaLayer.Configuration+".titleAndDescription.properties",po.decorators=[{type:n.Injectable}],po.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var ho=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return ke(n,t),n.prototype.ngAfterViewInit=function(){t.prototype.ngAfterViewInit.call(this)},n.prototype.buildForm=function(){var t,n,i,r,a=null===(t=this.getPreview())||void 0===t?void 0:t.table,s=null===(n=null==a?void 0:a.properties)||void 0===n?void 0:n.dataFields,l=null===(r=null===(i=null==a?void 0:a.properties)||void 0===i?void 0:i.configuration)||void 0===r?void 0:r.columns,d=this.pizzagnaService.pizzagna;d=o.immutableSet(d,e.PizzagnaLayer.Data+".columns.properties.columns",null!=l?l:[]),d=o.immutableSet(d,e.PizzagnaLayer.Data+".columns.properties.dataFields",s),this.updateFormPizzagna(d)},n.prototype.toPreview=function(t){var n=this,i=t.contains("columnsOutput")?t.get("columnsOutput"):t.get("columns");if(!i)throw new Error("FormControl is not defined!");i.valueChanges.pipe(v.takeUntil(this.destroy$),v.distinctUntilChanged(me.default)).subscribe((function(t){setTimeout((function(){var e=n.getPreview();n.updatePreview(o.immutableSet(e,"table.properties.configuration.columns",t))}));var i=n.pizzagnaService.pizzagna;setTimeout((function(){var r,a,s,l;i=o.immutableSet(i,e.PizzagnaLayer.Structure+".columns.properties.template",null===(r=n.pizzagnaService.pizzagna[e.PizzagnaLayer.Structure].columns.properties)||void 0===r?void 0:r.template),i=o.immutableSet(i,e.PizzagnaLayer.Data+".filters.properties.columns",t),i=o.immutableSet(i,e.PizzagnaLayer.Structure+".presentation.properties.nodes",Fe(null===(l=null===(s=null===(a=null==i?void 0:i.structure)||void 0===a?void 0:a.presentation)||void 0===s?void 0:s.properties)||void 0===l?void 0:l.nodes)),n.updateFormPizzagna(i)}))})),this.subscribeToColumnsValueChange()},n.prototype.subscribeToColumnsValueChange=function(){var e,t=this;null===(e=this.component.form.get("columnsOutput"))||void 0===e||e.valueChanges.pipe(v.startWith(this.component.form.get("columnsOutput").value),v.filter((function(e){return e.length>0})),v.tap((function(){return t.handleWidthValidation()})),v.map((function(e){return t.filterColumnsWithoutSpecifiedWidth(e)})),v.map((function(e){return t.handleColumnsWithoutSpecifiedWidth(e)})),v.distinctUntilKeyChanged("id"),v.pluck("id"),v.takeUntil(this.destroy$)).subscribe((function(e){return t.setWidthMessages(e)}))},n.prototype.filterColumnsWithoutSpecifiedWidth=function(e){return e.filter((function(e){return e.isActive&&!e.width}))},n.prototype.handleColumnsWithoutSpecifiedWidth=function(e){switch(e.length){case 0:var t=this.component.form.get("columns").controls.filter((function(e){return ce.default(e,"value.properties["+e.value.id+"/description].isActive")}));if(le.default(t))return{id:void 0,label:void 0};var n=t[t.length-1];return console.warn('Cannot set width for all columns. Resetting "'+n.value.label+'" width.'),n.patchValue({width:null},{emitEvent:!1}),n.value;case 1:return e[0];default:return{id:void 0,label:void 0}}},n.prototype.handleWidthValidation=function(){this.component.form.get("columns").controls.forEach((function(e){var t,n="properties."+e.value.id+"/description",o=e.get(n);if(o){var i=null===(t=o.get("isActive"))||void 0===t?void 0:t.value,a=o.get("width");i?(null==a||a.setValidators([r.Validators.min(62)]),null==a||a.markAllAsTouched(),null==a||a.updateValueAndValidity({emitEvent:!1})):(null==a||a.clearValidators(),null==a||a.updateValueAndValidity({emitEvent:!1}))}}))},n.prototype.setWidthMessages=function(t){var n,o=this;if(this.pizzagnaService.pizzagna){var i="isWidthMessageDisplayed";(null===(n=this.pizzagnaService.pizzagna.data.columns.properties)||void 0===n?void 0:n.columns).forEach((function(t){return o.pizzagnaService.setProperty(e.PizzagnaLayer.Data+"."+t.id+"/description.properties."+i,!1)})),t&&this.pizzagnaService.setProperty(e.PizzagnaLayer.Data+"."+t+"/description.properties."+i,!0)}},n}(ro);ho.decorators=[{type:n.Injectable}],ho.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var go=function(t){function n(e,n,o){return t.call(this,e,n,o)||this}return ke(n,t),n.prototype.ngAfterViewInit=function(){t.prototype.ngAfterViewInit.call(this)},n.prototype.buildForm=function(){var t,n,i,r,a,s=this.pizzagnaService.pizzagna,l=null===(t=this.getPreview())||void 0===t?void 0:t.table,d=null===(i=null===(n=null==l?void 0:l.properties)||void 0===n?void 0:n.configuration)||void 0===i?void 0:i.columns,c=null===(a=null===(r=null==l?void 0:l.properties)||void 0===r?void 0:r.configuration)||void 0===a?void 0:a.sorterConfiguration;s=o.immutableSet(s,e.PizzagnaLayer.Data+".filters.properties.columns",d),s=o.immutableSet(s,e.PizzagnaLayer.Data+".filters.properties.sorterConfiguration",c),this.updateFormPizzagna(s)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=t.getPreview();n=o.immutableSet(n,"table.properties.configuration.sorterConfiguration",e.sorterConfiguration),t.updatePreview(n),t.buildForm()}))},n}(ro);go.decorators=[{type:n.Injectable}],go.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var mo=function(t){function n(e,n,o,i){var r=t.call(this,e,n,o)||this;return r.timeframeService=i,r}return ke(n,t),n.prototype.ngAfterViewInit=function(){t.prototype.ngAfterViewInit.call(this)},n.prototype.buildForm=function(){var t=this,n=this.pizzagnaService.pizzagna,i=this.getPreview(),r=Object.keys(this.timeframeService.currentPresets).map((function(e){return{id:e,name:t.timeframeService.currentPresets[e].name}})),a=e.PizzagnaLayer.Data+".timeseriesMetadata.properties";n=o.immutableSet(n,a+".timeSpans",r);var s=ce.default(i,"timeframeSelection.properties.timeframe.selectedPresetId","last7Days"),l=r.find((function(e){return e.id===s}));l&&(n=o.immutableSet(n,a+".startingTimespan",l));var d=ce.default(i,"chart.properties.configuration");d&&(n=o.immutableSet(n,a+".legendPlacement",d.legendPlacement),n=o.immutableSet(n,a+".leftAxisLabel",d.leftAxisLabel),n=o.immutableSet(n,a+".preset",d.preset)),this.updateFormPizzagna(n)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=t.getPreview(),i=ce.default(e,"startingTimespan.id");i&&(n=o.immutableSet(n,"timeframeSelection.properties.timeframe.selectedPresetId",i));var r="chart.properties.configuration";n=o.immutableSet(n,r+".legendPlacement",ce.default(e,"legendPlacement","")),n=o.immutableSet(n,r+".leftAxisLabel",ce.default(e,"leftAxisLabel","")),n=o.immutableSet(n,r+".preset",ce.default(e,"preset","")),t.updatePreview(n)}))},n}(ro);mo.decorators=[{type:n.Injectable}],mo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an},{type:o.TimeframeService}]};var fo=function(t){function n(n,i,r){var a=t.call(this,n,i,r)||this;return a.indicatorDataKey="indicatorData",a.previewSeriesPath="providers."+e.WellKnownProviders.Adapter+".properties.series",a.formSeriesComponentPath=e.PizzagnaLayer.Data+".series.properties",a.dataSourceSeries$=new d.Subject,a.selectedSeriesIds$=new d.Subject,a.shouldReadForm=!1,a.subscribeToAvailableDataFieldsChange(),a.eventBus.subscribeUntil(In,a.destroy$,(function(t){var n=e.PizzagnaLayer.Structure+".series.properties.nodes",i=ce.default(a.pizzagnaService.pizzagna,n);a.pizzagnaService.removeComponents(i);var r=a.pizzagnaService.pizzagna;r=o.immutableSet(r,n,[]),r=o.immutableSet(r,a.formSeriesComponentPath+".series",[]),a.updateFormPizzagna(r)})),a.eventBus.subscribeUntil(Sn,a.destroy$,(function(t){var n,i=(ae.default(t.payload.result)?t.payload:t.payload.result||{}).series;if(i){a.dataSourceSeries$.next(i);var r=a.pizzagnaService.pizzagna;r=o.immutableSet(r,a.formSeriesComponentPath+".allSeries",i);var s=(null===(n=a.pizzagnaService.pizzagna[e.PizzagnaLayer.Structure][a.component.componentId].properties)||void 0===n?void 0:n.template).findIndex((function(e){return e.id===a.indicatorDataKey})),l=e.PizzagnaLayer.Structure+".series.properties.template["+s+"].properties.allSeries";r=o.immutableSet(r,l,i),r=ce.default(a.getPreview(),"chart."+a.previewSeriesPath,[]).reduce((function(t,n){return o.immutableSet(t,e.PizzagnaLayer.Data+"."+n.id+"/"+a.indicatorDataKey+".properties.allSeries",i)}),r),a.updateFormPizzagna(r);var d=a.formSeriesComponentPath+".series",c=ce.default(a.pizzagnaService.pizzagna,d);if(le.default(c)){a.shouldReadForm=!1;var u=i.map((function(e){return{id:e.id,selectedSeriesId:e.id,label:e.name}})),p=o.immutableSet(a.getPreview(),"chart."+a.previewSeriesPath,u);a.updatePreview(p),a.buildForm(),setTimeout((function(){a.updateAvailableSeries([]),a.shouldReadForm=!0}))}}})),a}return ke(n,t),n.prototype.buildForm=function(){var e=this,t=this.getPreview(),n=ce.default(t,"chart."+this.previewSeriesPath,[]),i=n.map((function(e){return{id:e.id,selectedSeriesId:e.selectedSeriesId}})),r=n.map((function(e){return e.id}));this.pizzagnaService.createComponentsFromTemplate("series",r);var a=this.pizzagnaService.pizzagna,s=o.immutableSet(a,this.formSeriesComponentPath+".series",i);this.updateFormPizzagna(s),this.selectedSeriesIds$.next(i.map((function(e){return e.selectedSeriesId}))),setTimeout((function(){return e.shouldReadForm=!0}))},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){if(t.shouldReadForm){var n=t.getPreview(),i=n.chart,r=ce.default(i,t.previewSeriesPath,[]),a=e.map((function(e){return Object.assign({id:e.id,selectedSeriesId:e.selectedSeriesId},r.find((function(t){return t.id===e.id})))})),s=o.immutableSet(n,"chart."+t.previewSeriesPath,a);t.updatePreview(s);var l=e.map((function(e){return ce.default(e,"properties["+e.id+"/indicatorData].id")})).filter((function(e){return!le.default(e)}));t.selectedSeriesIds$.next(l)}}))},n.prototype.ngOnDestroy=function(){this.dataSourceSeries$.complete(),this.selectedSeriesIds$.complete(),t.prototype.ngOnDestroy.call(this)},n.prototype.updateAvailableSeries=function(t){var n,i=this;if(this.pizzagnaService.pizzagna){var r=this.pizzagnaService.pizzagna;r=o.immutableSet(r,this.formSeriesComponentPath+".availableSeries",t);var a=(null===(n=this.pizzagnaService.pizzagna[e.PizzagnaLayer.Structure][this.component.componentId].properties)||void 0===n?void 0:n.template).findIndex((function(e){return e.id===i.indicatorDataKey})),s=e.PizzagnaLayer.Structure+".series.properties.template["+a+"].properties.availableSeries";r=o.immutableSet(r,s,t),r=ce.default(this.pizzagnaService.pizzagna,e.PizzagnaLayer.Structure+".series.properties.nodes").reduce((function(n,r){return o.immutableSet(n,e.PizzagnaLayer.Data+"."+r+"/"+i.indicatorDataKey+".properties.availableSeries",t)}),r),this.updateFormPizzagna(r)}},n.prototype.subscribeToAvailableDataFieldsChange=function(){d.combineLatest([this.dataSourceSeries$,this.selectedSeriesIds$]).pipe(v.takeUntil(this.destroy$),v.map((function(e){var t=Ae(e,2),n=t[0],o=t[1];return n.filter((function(e){return!o.find((function(t){return t===e.id}))}))})),v.distinctUntilChanged(me.default)).subscribe(this.updateAvailableSeries.bind(this))},n}(ro);fo.decorators=[{type:n.Injectable}],fo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var vo=function(t){function n(n,o,i){var r=t.call(this,n,o,i)||this;return r.previewSeriesPath="chart.providers."+e.WellKnownProviders.Adapter+".properties.series",r}return ke(n,t),Object.defineProperty(n.prototype,"previewComponentId",{get:function(){return this.componentId.split("/")[0]},enumerable:!1,configurable:!0}),n.prototype.buildForm=function(){var t=this,n=ce.default(this.getPreview(),this.previewSeriesPath,[]).find((function(e){return e.id===t.previewComponentId})),i=n&&n.selectedSeriesId,r=o.immutableSet(this.pizzagnaService.pizzagna,e.PizzagnaLayer.Data+"."+this.componentId+".properties",{selectedSeriesId:i});this.updateFormPizzagna(r)},n.prototype.toPreview=function(e){var t=this;e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var n=e.id,i=t.getPreview(),r=ce.default(i,t.previewSeriesPath,[]),a=r.findIndex((function(e){return e.id===t.previewComponentId}));if(a>-1){var s=Fe(r);s[a]=Object.assign(Object.assign({},s[a]),{selectedSeriesId:n});var l=o.immutableSet(i,""+t.previewSeriesPath,s);t.updatePreview(l)}}))},n}(ro);vo.decorators=[{type:n.Injectable}],vo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:io},{type:an}]};var yo=new n.InjectionToken("CONFIGURATOR_CONVERTER"),bo=function(){function e(){this.events={}}return e.prototype.registerEvent=function(e){this.events[e.id]=e},e.prototype.getEvent=function(e){var t=this.events[e];if(!t)throw new Error("Event with id '"+e+"' is not registered. Registered events are: "+JSON.stringify(Object.keys(this.events)));return t},e}();bo.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new bo},token:bo,providedIn:"root"}),bo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}];var Co=function(e){function t(){var t=e.apply(this,Fe(arguments))||this;return t.formattersStateChanged$=t.stateChanged$,t}return ke(t,e),t.prototype.addFormatters=function(t,n){void 0===n&&(n={overrideExisting:!0}),e.prototype.addItems.call(this,t,n)},t.prototype.getFormatters=function(){return e.prototype.getItems.call(this)},t.prototype.getItemKey=function(e){return e.componentType},t}(bn),So=function(e){function t(t){return e.call(this,t,"TableFormatterRegistryService")||this}return ke(t,e),t}(Co);So.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new So(X.ɵɵinject(J.LoggerService))},token:So,providedIn:"root"}),So.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],So.ctorParameters=function(){return[{type:o.LoggerService}]};var wo=function(e){function t(t){return e.call(this,t,"KpiFormattersRegistryService")||this}return ke(t,e),t}(Co);wo.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new wo(X.ɵɵinject(J.LoggerService))},token:wo,providedIn:"root"}),wo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],wo.ctorParameters=function(){return[{type:o.LoggerService}]};var Io=function(e){function t(t){return e.call(this,t,"ProportionalDonutContentFormattersRegistryService")||this}return ke(t,e),t}(Co);Io.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Io(X.ɵɵinject(J.LoggerService))},token:Io,providedIn:"root"}),Io.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Io.ctorParameters=function(){return[{type:o.LoggerService}]};var Po=function(e){function t(t){return e.call(this,t,"ProportionalLegendFormattersRegistryService")||this}return ke(t,e),t}(Co);Po.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Po(X.ɵɵinject(J.LoggerService))},token:Po,providedIn:"root"}),Po.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Po.ctorParameters=function(){return[{type:o.LoggerService}]};var To=function(){function e(){}return e.prototype.updateWidget=function(e){this.widget=e},e.prototype.getWidget=function(){return this.widget},e}();To.decorators=[{type:n.Injectable}];var xo=function(){function t(e,t,n,o,i){this.pizzagnaBus=e,this.dashboardBus=t,this.widgetConfigurationService=n,this.eventRegistry=o,this.pizzagnaService=i,this.upstreamSubscriptions={},this.downstreamSubscriptions={},this.destroy$=new d.Subject}return t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.setComponent=function(e){this.component=e},t.prototype.updateConfiguration=function(e){this.providerKey=e.providerKey,this.upstreams=e.upstreams,this.downstreams=e.downstreams,this.upstreams&&this.registerUpstreamSubscriptions.apply(this,Fe(this.upstreams)),this.downstreams&&this.registerDownstreamSubscriptions.apply(this,Fe(this.downstreams))},t.prototype.addUpstream=function(e){this.addStream(e,"upstreams")},t.prototype.addDownstream=function(e){this.addStream(e,"downstreams")},t.prototype.addStream=function(t,n){var o=de.default((this[n]||[]).concat(t.id));this[n]=o,this.component&&this.pizzagnaService.setProperty({componentId:this.component.componentId,pizzagnaKey:e.PizzagnaLayer.Data,providerKey:this.providerKey,propertyPath:[n]},o)},t.prototype.registerUpstreamSubscriptions=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.dashboardBus&&this.registerSubscriptions(t,this.upstreamSubscriptions,this.pizzagnaBus,(function(t,n){var o=e.widgetConfigurationService.getWidget().id;e.dashboardBus.getStream(t).next(Object.assign({},n,{widgetId:o}))}))},t.prototype.registerDownstreamSubscriptions=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.dashboardBus&&this.registerSubscriptions(t,this.downstreamSubscriptions,this.dashboardBus,(function(t,n){var o=e.widgetConfigurationService.getWidget().id;void 0!==n.widgetId&&o!==n.widgetId||e.pizzagnaBus.getStream(t).next(n)}))},t.prototype.registerSubscriptions=function(e,t,n,o){var i,r,a,s;void 0===e&&(e=[]);var l=e?ge.default(e,(function(e){return e})):null;try{for(var d=Re(Object.keys(t)),c=d.next();!c.done;c=d.next()){var u=c.value;l&&l[u]||(t[u].unsubscribe(),delete t[u])}}catch(e){i={error:e}}finally{try{c&&!c.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}var p=function(e){var i=h.eventRegistry.getEvent(e);t[e]=n.getStream(i).pipe(v.takeUntil(h.destroy$)).subscribe((function(e){o(i,e)}))},h=this;try{for(var g=Re(Object.keys(null!=l?l:{}).filter((function(e){return!t[e]}))),m=g.next();!m.done;m=g.next()){p(u=m.value)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}},t}();xo.decorators=[{type:n.Injectable}],xo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:o.EventBus,decorators:[{type:n.Optional},{type:n.Inject,args:[Ut]}]},{type:To,decorators:[{type:n.Optional}]},{type:bo},{type:an}]};var Do=function(){function e(e){var i;this.logger=e,this.staticProviders={},this.setProviders(((i={}).NOVA_DATASOURCE_INTERVAL_REFRESHER={provide:Qn,deps:[Mt,n.NgZone,Jn]},i.NOVA_DASHBOARD_EVENT_PROXY={provide:xo,deps:[Mt,[new n.Optional,Ut],[new n.Optional,To],bo,an]},i.NOVA_DATASOURCE_ADAPTER={provide:Tn,deps:[Mt,[new n.Optional,Ht],an]},i.NOVA_TABLE_DATASOURCE_ADAPTER={provide:eo,deps:[Mt,[new n.Optional,Ht],an,o.VirtualViewportManager]},i.NOVA_TIMESERIES_DATASOURCE_ADAPTER={provide:to,deps:[Mt,[new n.Optional,Ht],an]},i.NOVA_KPI_DATASOURCE_ADAPTER={provide:$n,deps:[Mt,[new n.Optional,Ht],an,t.DecimalPipe]},i.NOVA_DRILLDOWN_DATASOURCE_ADAPTER={provide:xn,deps:[Mt,[new n.Optional,Ht],an]},i.NOVA_KPI_COLOR_PRIORITIZER={provide:Nn,deps:[[new n.Optional,Ht],an,Vn]},i.NOVA_TITLE_AND_DESCRIPTION_CONVERTER={provide:yo,useClass:po,deps:[Mt,io,an]},i.NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER={provide:yo,useClass:lo,deps:[Mt,io,an]},i.NOVA_KPI_TILES_CONVERTER={provide:yo,useClass:so,deps:[Mt,io,an]},i.NOVA_KPI_SECTION_CONVERTER={provide:yo,useClass:ao,deps:[Mt,io,an]},i.NOVA_GENERIC_CONVERTER={provide:yo,useClass:uo,deps:[Mt,io,an]},i.NOVA_GENERIC_ARRAY_CONVERTER={provide:yo,useClass:co,deps:[Mt,io,an]},i.NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER={provide:yo,useClass:vo,deps:[Mt,io,an,o.TimeframeService]},i.NOVA_TIMESERIES_METADATA_CONVERTER={provide:yo,useClass:mo,deps:[Mt,io,an,o.TimeframeService]},i.NOVA_TIMESERIES_SERIES_CONVERTER={provide:yo,useClass:fo,deps:[Mt,io,an]},i.NOVA_TABLE_COLUMNS_CONVERTER={provide:yo,useClass:ho,deps:[Mt,io,an]},i.NOVA_TABLE_FILTERS_CONVERTER={provide:yo,useClass:go,deps:[Mt,io,an]},i.NOVA_LOADING_ADAPTER={provide:Un,deps:[Mt,an]},i.NOVA_STATUS_CONTENT_FALLBACK_ADAPTER={provide:Wn,deps:[Mt,an]},i.NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER={provide:Mn,deps:[Mt,an]},i.NOVA_KPI_SCALE_SYNC_BROKER={provide:jn,deps:[Mt,an]},i.NOVA_URL_INTERACTION_HANDLER={provide:On,deps:[Mt,"windowObject",o.LoggerService]},i.NOVA_EVENT_BUS_DEBUGGER={provide:Dn,deps:[Mt]},i.NOVA_VIRTUAL_VIEWPORT_MANAGER={provide:o.VirtualViewportManager,deps:[]},i.NOVA_PIZZAGNA_BROADCASTER={provide:Yn,deps:[an]},i.NOVA_TABLE_FORMATTERS_REGISTRY={provide:Gt,useExisting:So,deps:[an]},i.NOVA_KPI_FORMATTERS_REGISTRY={provide:Gt,useExisting:wo,deps:[an]},i.NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY={provide:Gt,useExisting:Io,deps:[an]},i.NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER={provide:oo,deps:[Mt,[new n.Optional,no]]},i))}return e.prototype.setProviders=function(e){this.staticProviders=Object.assign({},this.staticProviders,e)},e.prototype.getProvider=function(e){var t=this.staticProviders[e];return t||(this.logger.warn("No provider registered for id",e),this.logger.warn("Known providers:",Object.keys(this.staticProviders).join(", "))),t},e.prototype.getProviderInstance=function(e,t){return n.Injector.create({providers:[e],parent:t}).get(Ht)},e}();Do.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Do(X.ɵɵinject(J.LoggerService))},token:Do,providedIn:"root"}),Do.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Do.ctorParameters=function(){return[{type:o.LoggerService}]};var _o=function(){function t(){this.widgetTypes={}}return t.prototype.registerWidgetType=function(e,t,n){var o=this.widgetTypes[e];o||(o=[],this.widgetTypes[e]=o),o.length<t&&(o.length=t),o[t-1]=n},t.prototype.getWidgetType=function(e,t){var n=this.widgetTypes[e];if(!n||0===n.length)throw new Error("Type '"+e+"' not found in the registry. Available types: "+Object.keys(this.widgetTypes).join(", "));if(void 0!==t&&(t<=0||n.length<t))throw new Error("Version "+t+" for widget type '"+e+"' not registered. Max available version is "+n.length);return n[(void 0===t?n.length:t)-1]},t.prototype.mergeWithWidgetType=function(e){var t=this.getWidgetType(e.type,e.version);return Object.assign(Object.assign({},e),{pizzagna:Q.default(e.pizzagna,t.widget)})},t.prototype.setNode=function(t,n,o,i){var r,a,s=n+"."+e.PizzagnaLayer.Structure+"."+(""+((null===(a=null===(r=t.paths)||void 0===r?void 0:r[n])||void 0===a?void 0:a[o])||o));fe.default(t,s,i)},t}();_o.decorators=[{type:n.Injectable}],_o.ctorParameters=function(){return[]};var zo,Oo=function(){function e(e,t,n,o){this.aggregatorRegistry=e,this.formatterRegistry=t,this.changeDetector=n,this.logger=o,this.destroy$=new d.Subject}return e.prototype.ngOnChanges=function(e){if(e.donutConfig){var t=e.donutConfig.currentValue,n=t.formatter,o=t.aggregator;(null==o?void 0:o.aggregatorType)&&(this.updateAggregatorDefinition(o),this.updateAggregatedValue()),(null==n?void 0:n.componentType)&&(this.contentFormatter=n,this.updateFormatterDefinition(n),this.updateFormatterProperties())}e.widgetData&&(this.updateAggregatedValue(),this.updateFormatterProperties()),e.chartAssist&&this.subscribeToChartAssist()},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.getFormatterProperties=function(e){var t;if(e)return Object.assign(Object.assign({},null===(t=this.contentFormatterDefinition)||void 0===t?void 0:t.properties),{data:tn(e,{value:this.aggregatedValue})})},e.prototype.updateAggregatorDefinition=function(e){var t=this.aggregatorRegistry.getItem(e.aggregatorType);t?this.contentAggregatorDefinition=t:this.logger.warn("No aggregator with key "+e.aggregatorType+" found in registry.")},e.prototype.updateFormatterDefinition=function(e){var t=this.formatterRegistry.getItem(e.componentType);t?this.contentFormatterDefinition=t:this.logger.warn("No aggregator with key "+e.componentType+" found in registry.")},e.prototype.updateAggregatedValue=function(){var e;if(this.widgetData&&this.contentAggregatorDefinition){var t=this.getAggregatorProperties();this.aggregatedValue=this.contentAggregatorDefinition.fn(this.widgetData,Object.assign(Object.assign({},t),{activeMetricId:this.emphasizedSeriesId||t.activeMetricId})).toString()}else this.logger.warn("Can't aggregate value. Aggregator key: "+(null===(e=this.contentAggregatorDefinition)||void 0===e?void 0:e.aggregatorType)+". Data: "+this.widgetData)},e.prototype.updateFormatterProperties=function(){this.contentFormatterProperties=this.getFormatterProperties(this.contentFormatter)},e.prototype.getAggregatorProperties=function(){var e,t,n;return Object.assign(Object.assign({},null===(e=this.contentAggregatorDefinition)||void 0===e?void 0:e.properties),null===(n=null===(t=this.donutConfig)||void 0===t?void 0:t.aggregator)||void 0===n?void 0:n.properties)},e.prototype.subscribeToChartAssist=function(){var e,t,n,o=this;null===(e=this.chartAssistSubscription)||void 0===e||e.unsubscribe(),this.chartAssistSubscription=null===(n=null===(t=this.chartAssist)||void 0===t?void 0:t.chartAssistSubject)||void 0===n?void 0:n.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var t;o.emphasizedSeriesId=null===(t=e.payload)||void 0===t?void 0:t.seriesId,o.updateAggregatedValue(),o.updateFormatterProperties(),o.changeDetector.detectChanges()}))},e}();Oo.lateLoadKey="ProportionalDonutContentComponent",Oo.decorators=[{type:n.Component,args:[{selector:"nui-proportional-donut-content",template:'<ng-container\n *ngIf="contentFormatter?.componentType"\n nuiComponentPortal\n [componentType]="contentFormatter?.componentType"\n [properties]="contentFormatterProperties"\n #componentPortal="nuiComponentPortal">\n<ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n</ng-container>\n\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Oo.ctorParameters=function(){return[{type:Cn},{type:Io},{type:n.ChangeDetectorRef},{type:o.LoggerService}]},Oo.propDecorators={widgetData:[{type:n.Input}],donutConfig:[{type:n.Input}],chartAssist:[{type:n.Input}]},e.ProportionalWidgetChartTypes=void 0,(zo=e.ProportionalWidgetChartTypes||(e.ProportionalWidgetChartTypes={})).DonutChart="DonutChart",zo.PieChart="PieChart",zo.VerticalBarChart="VerticalBarChart",zo.HorizontalBarChart="HorizontalBarChart";var Eo=function(){function t(){}return t.buildChartSeries=function(e,t,n,o){return(e||[]).map((function(e){return Object.assign(Object.assign({},e),{accessors:t,renderer:n,scales:o})}))},t.getChartAttributes=function(e,n,o){var i=t.getChartTools(e),r={grid:i.gridFunction(),accessors:i.accessorFunction(n,o),renderer:i.rendererFunction(),scales:i.scaleFunction()};return i.preprocessor&&(r.preprocessor=i.preprocessor),r},t.getChartTools=function(t){var n,o=function(e){var t=new a.RadialAccessors(e);return t.series.color=function(t,n){var o;return null!==(o=n.color)&&void 0!==o?o:e.get(t)},t};function i(e,t){var n=a.barAccessors(this.config,e,t);return n.series.color=function(t,n){var o;return null!==(o=n.color)&&void 0!==o?o:null==e?void 0:e.get(t)},n.data.value=function(e){return Number.isFinite(e)?e:e.value},n}return((n={})[e.ProportionalWidgetChartTypes.DonutChart]={preprocessor:a.radial,gridFunction:a.radialGrid,rendererFunction:function(){return new a.RadialRenderer},accessorFunction:o,scaleFunction:a.radialScales},n[e.ProportionalWidgetChartTypes.PieChart]={preprocessor:a.radial,gridFunction:a.radialGrid,rendererFunction:function(){return new a.PieRenderer},accessorFunction:o,scaleFunction:a.radialScales},n[e.ProportionalWidgetChartTypes.HorizontalBarChart]={config:{horizontal:!0},gridFunction:function(){return a.barGrid(this.config)},rendererFunction:function(){return new a.BarRenderer({highlightStrategy:new a.BarSeriesHighlightStrategy("y")})},accessorFunction:i,scaleFunction:function(){return a.barScales(this.config)}},n[e.ProportionalWidgetChartTypes.VerticalBarChart]={config:{horizontal:!1},gridFunction:function(){return a.barGrid(this.config)},rendererFunction:function(){return new a.BarRenderer({highlightStrategy:new a.BarSeriesHighlightStrategy("x")})},accessorFunction:i,scaleFunction:function(){return a.barScales(this.config)}},n)[t]},t}();Eo.decorators=[{type:n.Injectable}];var ko=function(){function t(e,t,n,o,i,r,s){this.changeDetector=e,this.ngZone=t,this.kvDiffers=n,this.eventBus=o,this.dataSource=i,this.logger=r,this.prioritizedGridRows={right:!1,bottom:!1},this.chartPalette=new a.ChartPalette(a.defaultColorProvider()),this.differ=this.kvDiffers.find(this.prioritizedGridRows).create(),this.unitConversionPipe=new $e(s)}return Object.defineProperty(t.prototype,"interactive",{get:function(){var t,n,o,i;return(null===(t=this.configuration)||void 0===t?void 0:t.interactive)||(null===(i=null===(o=null===(n=this.dataSource)||void 0===n?void 0:n.features)||void 0===o?void 0:o.getFeatureConfig(e.WellKnownDataSourceFeatures.Interactivity))||void 0===i?void 0:i.enabled)||!1},enumerable:!1,configurable:!0}),t.prototype.computeLegendTileValue=function(e){var t,n;return null===(n=null===(t=this.accessors.data)||void 0===t?void 0:t.value)||void 0===n?void 0:n.call(t,e,0,null,null)},t.prototype.ngOnChanges=function(e){var t,n,o,i,r=null===(n=null===(t=e.configuration)||void 0===t?void 0:t.currentValue)||void 0===n?void 0:n.chartColors,a=null===(i=null===(o=e.configuration)||void 0===o?void 0:o.previousValue)||void 0===i?void 0:i.chartColors;if(!e.widgetData&&me.default(r,a)||this.updateChartColors(),e.configuration){var s=e.configuration.currentValue.chartOptions.type,l=e.configuration.previousValue&&e.configuration.previousValue.chartOptions.type;s&&s!==l&&(this.buildChart(s),this.widgetData&&this.updateChart()),this.legendFormatter=this.configuration.chartOptions.legendFormatter,this.contentFormatter=this.configuration.chartOptions.contentFormatter,this.chartFormatterComponentType=this.configuration.chartOptions.chartFormatterComponentType,this.getContentFormatterProperties(),this.changeDetector.markForCheck()}e.widgetData&&this.chartAssist&&(this.updateChart(),this.getContentFormatterProperties(),this.changeDetector.markForCheck())},t.prototype.ngAfterViewInit=function(){this.handleGridFlowOnResize()},t.prototype.ngOnDestroy=function(){var e,t;null===(e=this.proportionalWidgetResizeObserver)||void 0===e||e.disconnect(),null===(t=this.chartTypeSubscription$)||void 0===t||t.unsubscribe()},t.prototype.getContentFormatterProperties=function(){var e;this.contentFormatterProperties={data:this.widgetData,config:this.configuration,chartAssist:this.chartAssist,properties:null===(e=this.contentFormatter)||void 0===e?void 0:e.properties}},t.prototype.isDonutChart=function(){return this.configuration.chartOptions.type===e.ProportionalWidgetChartTypes.DonutChart},t.prototype.isRadialChart=function(){return-1!==[e.ProportionalWidgetChartTypes.DonutChart,e.ProportionalWidgetChartTypes.PieChart].indexOf(this.configuration.chartOptions.type)},t.prototype.hasLegend=function(){return this.configuration.chartOptions.legendPlacement!==e.LegendPlacement.None},t.prototype.legendShouldBeAlignedRight=function(){return this.configuration.chartOptions.legendPlacement===e.LegendPlacement.Right},t.prototype.onInteraction=function(e){this.interactive&&this.eventBus.getStream(ct).next({payload:{data:e}})},t.prototype.buildChart=function(t){var n,o,i=this;this.donutContentPlugin=null;var r=Eo.getChartAttributes(t,null===(n=this.chartPalette)||void 0===n?void 0:n.standardColors),s=r.grid,l=r.accessors,d=r.renderer,c=r.scales,u=r.preprocessor;this.chartAssist=new a.ChartAssist(new a.Chart(s),u,this.chartPalette),this.renderer=d,this.accessors=l,this.scales=c,this.isDonutChart()&&(this.donutContentPlugin=new a.ChartDonutContentPlugin,this.chartAssist.chart.addPlugin(this.donutContentPlugin)),this.configuration.chartOptions.type===e.ProportionalWidgetChartTypes.HorizontalBarChart?(this.scales.x.formatters.tick=this.unitConversionPipe.transform,this.applyTickLabelMaxWidths()):this.configuration.chartOptions.type===e.ProportionalWidgetChartTypes.VerticalBarChart&&(this.scales.y.formatters.tick=this.unitConversionPipe.transform),null===(o=this.chartTypeSubscription$)||void 0===o||o.unsubscribe(),this.chartTypeSubscription$=this.chartAssist.chart.getEventBus().getStream(a.SELECT_DATA_POINT_EVENT).subscribe((function(e){var t=i.widgetData.find((function(t){return t.id===e.data.seriesId}));i.onInteraction(t)}))},t.prototype.handleGridFlowOnResize=function(){var e=this;this.proportionalWidgetResizeObserver=new re.default((function(){return e.onResize()})),this.ngZone.runOutsideAngular((function(){e.proportionalWidgetResizeObserver.observe(e.gridContainer.nativeElement)}))},t.prototype.applyTickLabelMaxWidths=function(){var e,n,o,i,r,a,s=this.chartAssist.chart.getGrid().config().axis;s.left.tickLabel.maxWidth=null!==(o=null===(n=null===(e=this.configuration.chartOptions.horizontalBarTickLabelConfig)||void 0===e?void 0:e.maxWidth)||void 0===n?void 0:n.left)&&void 0!==o?o:t.TICK_LABEL_MAX_WIDTH,s.right.tickLabel.maxWidth=null!==(a=null===(r=null===(i=this.configuration.chartOptions.horizontalBarTickLabelConfig)||void 0===i?void 0:i.maxWidth)||void 0===r?void 0:r.right)&&void 0!==a?a:t.TICK_LABEL_MAX_WIDTH},t.prototype.onResize=function(){if(!this.isContainerInNoSwitchLayoutInterval()){switch(this.configuration.chartOptions.legendPlacement){case e.LegendPlacement.Bottom:this.prioritizedGridRows.bottom=this.containerHasRowLayoutWidth();break;case e.LegendPlacement.Right:this.prioritizedGridRows.right=this.containerHasRowLayoutWidth()}this.differ.diff(this.prioritizedGridRows)&&this.changeDetector.detectChanges()}},t.prototype.isContainerInNoSwitchLayoutInterval=function(){var e=this.gridContainer.nativeElement.getBoundingClientRect().width;return e>t.MAX_ROW_LAYOUT_SIZE-t.NO_SWITCH_LAYOUT_INTERVAL_SIZE/2&&e<t.MAX_ROW_LAYOUT_SIZE+t.NO_SWITCH_LAYOUT_INTERVAL_SIZE/2},t.prototype.containerHasRowLayoutWidth=function(){return this.gridContainer.nativeElement.getBoundingClientRect().width<t.MAX_ROW_LAYOUT_SIZE},t.prototype.updateChart=function(){this.chartAssist.update(Eo.buildChartSeries(this.widgetData,this.accessors,this.renderer,this.scales))},t.prototype.updateChartColors=function(){var e,t,n,o=null===(e=this.widgetData)||void 0===e?void 0:e.map((function(e){return e.color})),i=this.configuration.chartColors;n=!this.configuration.prioritizeWidgetColors&&oe.default(o)?this.getDataDriverColorProvider(this.widgetData):i?this.getConfigurationColorProvider(i):a.defaultColorProvider(),this.chartPalette=new a.ChartPalette(n),this.buildChart(null===(t=this.configuration)||void 0===t?void 0:t.chartOptions.type),this.chartAssist&&(this.chartAssist.palette=this.chartPalette,this.updateChart())},t.prototype.getDataDriverColorProvider=function(e){var t;if((null==e?void 0:e.map((function(e){return e.color})).filter((function(e){return!!e}))).length===e.length){var n=e.reduce((function(e,t){return e[t.id]=t.color,e}),{});t=new a.MappedValueProvider(n)}else{var o=e.filter((function(e){return e.color}));this.logger.warn("Not all series have colors set, setting default pallette. Current series color config: "+JSON.stringify(o)),t=a.defaultColorProvider()}return t},t.prototype.getConfigurationColorProvider=function(e){var t,n;(this.configuration.prioritizeWidgetColors&&this.widgetData&&(this.widgetData=this.widgetData.map((function(e){var t=Object.assign({},e);return t.color&&delete t.color,t}))),Array.isArray(e))?n=new a.SequentialColorProvider(e):Object.keys(e).length===(null===(t=this.widgetData)||void 0===t?void 0:t.length)?n=new a.MappedValueProvider(e):(this.logger.warn("Not all series have colors set, setting default pallette. Current series color config: "+JSON.stringify(e)),n=a.defaultColorProvider());return n},t}();ko.lateLoadKey="ProportionalWidgetComponent",ko.NO_SWITCH_LAYOUT_INTERVAL_SIZE=20,ko.MAX_ROW_LAYOUT_SIZE=360,ko.TICK_LABEL_MAX_WIDTH=75,ko.decorators=[{type:n.Component,args:[{selector:"nui-proportional-widget",template:'<div #gridContainer\n class="w-100 nui-chart-layout flex-grow-1 p-3"\n [ngClass]="{\n \'prioritize-rows__right\': prioritizedGridRows.right,\n \'prioritize-rows__bottom\': prioritizedGridRows.bottom,\n \'empty-grid\': !(widgetData && widgetData.length > 0 && chartAssist)\n }"\n >\n <div class="d-flex chart has-overlay"\n *ngIf="widgetData && widgetData.length > 0 && chartAssist">\n <nui-chart class="w-100" [chart]="chartAssist.chart"></nui-chart>\n <nui-chart-donut-content *ngIf="donutContentPlugin"\n class="nui-proportional-widget__chart-donut-content"\n [plugin]="donutContentPlugin">\n <div class="h-100 w-100 d-flex justify-content-center align-items-center text-center">\n <div class="d-inline-block" nuiZoomContent [useZoom]="false">\n\n \x3c!-- OLD CONFIG HERE --\x3e\n <ng-container *ngIf="!configuration?.chartOptions?.donutContentConfig">\n <ng-container nuiComponentPortal\n [componentType]="contentFormatter?.componentType || \'DonutContentRawFormatterComponent\'"\n [properties]="contentFormatterProperties"\n #componentPortal2="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal2.portal"\n (attached)="componentPortal2.attached($event)"></ng-template>\n </ng-container>\n </ng-container>\n\n \x3c!-- NEW CONFIG HERE --\x3e\n <ng-container *ngIf="configuration?.chartOptions?.donutContentConfig">\n <nui-proportional-donut-content\n [widgetData]="widgetData"\n [donutConfig]="configuration?.chartOptions?.donutContentConfig"\n [chartAssist]="chartAssist"\n ></nui-proportional-donut-content>\n </ng-container>\n </div>\n </div>\n </nui-chart-donut-content>\n </div>\n <div class="w-100 d-flex legend" [ngClass]="[legendShouldBeAlignedRight() ? \'scrollable\' : \'legend-bottom\']" *ngIf="hasLegend() && chartAssist">\n <nui-legend class="w-100 m-auto"\n [interactive]="false"\n (mouseleave)="chartAssist.resetVisibleSeries()"\n [orientation]="legendShouldBeAlignedRight() ? \'vertical\' : \'horizontal\'">\n\n <nui-legend-series class="proportional-chart__legend-series"\n *ngFor="let legendSeries of chartAssist.legendSeriesSet; trackBy: chartAssist.seriesTrackByFn; let i = index"\n [ngClass]="(prioritizedGridRows.right || prioritizedGridRows.bottom) && \'description-min-width--unset\'"\n [isSelected]="!chartAssist.isSeriesHidden(legendSeries.id)"\n (isSelectedChange)="chartAssist.toggleSeries(legendSeries.id, $event)"\n [seriesRenderState]="chartAssist.renderStatesIndex[legendSeries.id]?.state"\n (mouseenter)="chartAssist.emphasizeSeries(legendSeries.id)"\n (click)="onInteraction(legendSeries)"\n [class.nui-proportional-widget__legend--interactive]="interactive">\n\n <div *ngIf="legendFormatter && legendFormatter.componentType; else legendDefaultTile">\n <div description>\n <ng-container nuiComponentPortal\n [componentType]="legendFormatter.componentType"\n [properties]="{ data: widgetData[i] }"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </div>\n </div>\n <ng-template #legendDefaultTile>\n <nui-rich-legend-tile [value]="computeLegendTileValue(legendSeries.data[0]) | nuiDashboardUnitConversion"\n [unitLabel]="legendUnitLabel"\n [color]="chartAssist.palette.textColors.get(legendSeries.id)"\n [backgroundColor]="chartAssist.palette.standardColors.get(legendSeries.id)">\n </nui-rich-legend-tile>\n\n <nui-icon legendTransclusion *ngIf="seriesToIconMap && seriesToIconMap[legendSeries.id]"\n class="align-items-center" [icon]="seriesToIconMap[legendSeries.id]"></nui-icon>\n \n <div description class="description-container d-flex flex-column nui-text-small justify-content-center">\n <div *ngIf="!legendSeries.link"\n class="description description-primary"\n [ngClass]="{\'nui-text-link-small link\': interactive}">\n {{legendSeries.name}}\n </div>\n <a class="description description-primary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.link"\n [href]="legendSeries.link"\n rel="noopener noreferrer"\n [title]="legendSeries.name">\n {{legendSeries.name}}\n </a>\n </div>\n </ng-template>\n </nui-legend-series>\n </nui-legend>\n </div>\n <div *ngIf="!widgetData || widgetData.length === 0 || !chartAssist"\n class="mb-3 mt-3 d-flex align-items-center justify-content-center" >\n <nui-image image="no-data-to-show"></nui-image>\n </div>\n</div>\n',encapsulation:n.ViewEncapsulation.Emulated,styles:['.nui-proportional-widget__chart-donut-content{position:absolute}.nui-proportional-widget__legend--interactive{cursor:pointer!important}.has-overlay{overflow:auto}.nui-chart-layout{grid-template:"axis-label-left axis-label-right ." 0fr "chart chart legend" minmax(60%,auto) "axis-label-bottom axis-label-bottom ." 0fr "legend-bottom legend-bottom ." minmax(auto,-webkit-min-content)/1fr 1fr auto;grid-template:"axis-label-left axis-label-right ." 0fr "chart chart legend" minmax(60%,auto) "axis-label-bottom axis-label-bottom ." 0fr "legend-bottom legend-bottom ." minmax(auto,min-content)/1fr 1fr auto}.nui-chart-layout .legend-bottom{overflow:auto;align-self:auto;padding-left:0}.prioritize-rows__bottom .nui-legend-series,.prioritize-rows__right .nui-legend-series{max-width:unset;width:100%}.prioritize-rows .legend{justify-self:start}.prioritize-rows__right{grid-template:"chart chart ." 60% "legend legend ." 40%}.prioritize-rows__bottom{grid-template:"chart chart ." 60% "legend-bottom legend-bottom ." 40%}.empty-grid{grid-template-columns:1fr;grid-template-rows:1fr}.proportional-chart__legend-series .link.description-primary{color:var(--nui-color-text-link,#0079aa)}']}]}],ko.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:n.NgZone},{type:n.KeyValueDiffers},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Inject,args:[Ht]}]},{type:o.LoggerService},{type:o.UnitConversionService}]},ko.propDecorators={widgetData:[{type:n.Input}],configuration:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}],seriesToIconMap:[{type:n.Input}],gridContainer:[{type:n.ViewChild,args:["gridContainer",{static:!0}]}]};var Ro=function(){function e(){this.enabled=!0,this.delay=500}return e.prototype.onHostMouseenter=function(){var e=this;this.enabled&&(this.timeout=setTimeout((function(){e.mousePresentSubject.next(!0)}),this.delay))},e.prototype.onHostClick=function(){this.enabled&&this.mousePresentSubject.next(!0)},e.prototype.onHostMouseleave=function(){this.enabled&&(clearTimeout(this.timeout),this.mousePresentSubject.next(!1))},e}();Ro.decorators=[{type:n.Directive,args:[{selector:"[nuiDelayedMousePresenceDetection]"}]}],Ro.propDecorators={enabled:[{type:n.Input,args:["nuiDelayedMousePresenceDetection"]}],mousePresentSubject:[{type:n.Input}],delay:[{type:n.Input}],onHostMouseenter:[{type:n.HostListener,args:["mouseenter"]}],onHostClick:[{type:n.HostListener,args:["click"]}],onHostMouseleave:[{type:n.HostListener,args:["mouseleave"]}]};var Ao=function(){function t(){this.searchDebounceTime=500}return t.prototype.initWidget=function(e){this.widget=e,this.initSearch()},t.prototype.initSearch=function(){var e,t,n=this;this.defineSearch();var o=null===(t=null===(e=this.widget.dataSource)||void 0===e?void 0:e.features)||void 0===t?void 0:t.featuresChanged;o&&o.pipe(v.takeUntil(this.widget.onDestroy$)).subscribe((function(){n.defineSearch()}))},t.prototype.registerSearch=function(){var e=this;this.widget.dataSource&&this.widget.dataSource.registerComponent({search:{componentInstance:{getFilters:function(){return{type:"search",value:e.widget.searchValue}}}}})},t.prototype.deregisterSearch=function(){var e,t;this.widget.dataSource&&(null===(t=(e=this.widget.dataSource).deregisterComponent)||void 0===t||t.call(e,"search"))},t.prototype.defineSearch=function(){var e,t,n=null===(e=this.widget.configuration)||void 0===e?void 0:e.searchConfiguration,o=null===(t=this.widget.dataSource.features)||void 0===t?void 0:t.getFeatureConfig("search");this.widget.isSearchEnabled=!(!(null==n?void 0:n.enabled)||!(null==o?void 0:o.enabled)),this.widget.isSearchEnabled?(this.widget.searchValue=(null==n?void 0:n.searchTerm)||"",this.registerSearch(),this.searchDebounceTime=ee.default(null==n?void 0:n.searchDebounce)?this.searchDebounceTime:null==n?void 0:n.searchDebounce,this.watchSearchTerm()):this.deregisterSearch()},t.prototype.watchSearchTerm=function(){var t=this;this.widget.searchTerm$.pipe(v.debounceTime(this.searchDebounceTime),v.takeUntil(this.widget.onDestroy$)).subscribe((function(){t.widget.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Configuration,componentId:t.widget.componentId,propertyPath:["configuration.searchConfiguration.searchTerm"]},t.widget.searchValue),t.widget.eventBus.getStream(Ye).next()}))},t}();Ao.decorators=[{type:n.Injectable}];var Fo=function(){function e(){this.visibleItems=[]}return e.prototype.initWidget=function(e){this.widget=e},e.prototype.initVirtualScroll=function(){this.widget.hasVirtualScroll?this.registerVirtualScroll():this.deregisterVirtualScroll()},e.prototype.registerVirtualScroll=function(){var e;this.widget.dataSource&&this.widget.dataSource.registerComponent(((e={})[o.nameof("virtualScroll")]={componentInstance:this.widget.viewportManager},e))},e.prototype.deregisterVirtualScroll=function(){var e,t;this.widget.dataSource&&(null===(t=(e=this.widget.dataSource).deregisterComponent)||void 0===t||t.call(e,o.nameof("virtualScroll")))},e.prototype.subscribeToVirtualScroll=function(){var e=this;this.widget.vscrollViewport&&(d.merge(this.widget.vscrollViewport.renderedRangeStream,this.widget.tableUpdate$.pipe(v.map((function(){var t;return null===(t=e.widget.vscrollViewport)||void 0===t?void 0:t.getRenderedRange()})))).pipe(v.tap((function(t){e.visibleItems=e.widget.tableData.slice(null==t?void 0:t.start,null==t?void 0:t.end),e.widget.changeDetector.detectChanges()})),v.takeUntil(this.widget.onDestroy$)).subscribe(),this.widget.viewportManager.setViewport(this.widget.vscrollViewport).observeNextPage$({pageSize:this.widget.range,emitFirstPage:!0}).pipe(v.filter((function(t){var n,o;return t.end>=(null!==(o=null===(n=e.widget.vscrollViewport)||void 0===n?void 0:n.getDataLength())&&void 0!==o?o:0)})),v.tap((function(t){return e.widget.zone.run((function(){e.widget.dataSource.page=t.end/(t.end-t.start),e.widget.eventBus.getStream(Xe).next(),e.widget.changeDetector.detectChanges()}))})),v.takeUntil(this.widget.onDestroy$)).subscribe())},e}();Fo.decorators=[{type:n.Injectable}];var Vo=function(){function t(e,t,n,o,i,r,a,s,l,c,u,p){this.eventBus=e,this.dataSource=t,this.widgetConfigurationService=n,this.changeDetector=o,this.pizzagnaService=i,this.viewportManager=r,this.zone=a,this.el=s,this.logger=l,this.searchAddon=c,this.virtualScrollAddon=u,this.formattersRegistryService=p,this.indentFromTop=70,this.sortable=!0,this.delayedMousePresenceDetectionEnabled=!0,this.tableData=[],this.columns=[],this.columnsWidthMap=new Map,this.hasVirtualScroll=!0,this.isSearchEnabled=!1,this.searchTerm$=new d.Subject,this.onDestroy$=new d.Subject,this.tableUpdate$=new d.Subject,this.mousePresent$=new d.BehaviorSubject(!1),this.rowHeight=24,this._scrollBuffer=0,this.totalPages=0,this.lastPageFetched=0,this.sortableSet={},this.defaultColumnAlignment="left",this.idle=!1,this.isBusy=this.lastPageFetched!==this.totalPages}return Object.defineProperty(t.prototype,"range",{get:function(){return this.getTableScrollRange()},set:function(e){this._range=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headerTooltipsEnabled",{get:function(){var e;return null===(e=this.configuration.headerTooltipsEnabled)||void 0===e||e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollBuffer",{set:function(e){if(e>100||e<0)throw new Error("Invalid scroll buffer provided. Required range 1..100");this._scrollBuffer=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interactive",{get:function(){var t,n,o,i;return(null===(t=this.configuration)||void 0===t?void 0:t.interactive)||(null===(i=null===(o=null===(n=this.dataSource)||void 0===n?void 0:n.features)||void 0===o?void 0:o.getFeatureConfig(e.WellKnownDataSourceFeatures.Interactivity))||void 0===i?void 0:i.enabled)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(e){var t,n,i,r;if(e.dataFields&&(null===(t=this.dataFields)||void 0===t?void 0:t.length)&&this.setSortableSet(),(e.widgetData||e.configuration||e.dataFields)&&(this.updateTable(),null===(n=this.vscrollViewport)||void 0===n||n.checkViewportSize()),e.configuration){if(this.isSortByUpdated(e.configuration)&&(null===(i=e.configuration.currentValue.sortable)||void 0===i||i)){var a={direction:e.configuration.currentValue.sorterConfiguration.descendantSorting?o.SorterDirection.descending:o.SorterDirection.ascending,sortBy:e.configuration.currentValue.sorterConfiguration.sortBy};this.onSortOrderChanged(a)}var s=ce.default(e,"configuration.currentValue.hasVirtualScroll",!0);this.hasVirtualScroll!==s&&(this.hasVirtualScroll=s,this.virtualScrollAddon.initVirtualScroll())}e.totalItems&&(this.totalPages=Math.floor((null!==(r=this.totalItems)&&void 0!==r?r:0)/this.range))},t.prototype.ngOnInit=function(){this.dataSource&&(this.setSortFilter(),this.registerSorter(),this.virtualScrollAddon.initWidget(this))},t.prototype.ngAfterViewInit=function(){var e,t=this;if(this.dataSource){null===(e=this.dataSource.busy)||void 0===e||e.pipe(v.tap((function(e){return t.isBusy=e})),v.takeUntil(this.onDestroy$)).subscribe(),this.virtualScrollAddon.initVirtualScroll(),this.searchAddon.initWidget(this);var n=this.eventBus.getStream(nt).pipe(v.filter((function(e){return e.payload.widgetId===t.widgetConfigurationService.getWidget().id})),v.map((function(e){return e.payload.height})));n.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(e){var n;t.tableContainerHeight=e-t.indentFromTop,null===(n=t.vscrollViewport)||void 0===n||n.checkViewportSize(),t.changeDetector.detectChanges()})),setTimeout((function(){d.merge(d.of(t.range*t.rowHeight),n,d.of(t.el.nativeElement.getBoundingClientRect().height)).pipe(v.filter((function(e){return!!e})),v.take(1),v.tap((function(e){t.tableWidgetHeight=e,t.virtualScrollAddon.subscribeToVirtualScroll(),t.eventBus.getStream(tt).next()}))).subscribe()}))}},t.prototype.ngOnDestroy=function(){var t;this.onDestroy$.next(),this.onDestroy$.complete(),this.tableUpdate$.complete(),null===(t=this.searchTerm$)||void 0===t||t.complete(),this.pizzagnaService.setProperty({componentId:"bodyContent",propertyPath:["fallbackKey"],pizzagnaKey:e.PizzagnaLayer.Data},void 0)},t.prototype.shouldDisplayTable=function(){var e,t=this.columns.length>0,n=(null===(e=this.tableData)||void 0===e?void 0:e.length)>0;return this.isSearchEnabled||this.hasVirtualScroll&&(this.isBusy||this.idle)?t:t&&n},t.prototype.dataTrackBy=function(e,t){return t?t.id:e},t.prototype.columnTrackBy=function(e,t){return t.id},t.prototype.updateColumns=function(e){var t=this;this.headers=e.columns.filter((function(e){return e.isActive})).map((function(e){return e.id}));var n=e.columns.every((function(e){return Boolean(e.width)})),o=e.columns.map((function(e,o,i){var r,a,s,l;if(t.columnsWidthMap.set(e.id,e.width),n){var d=i[i.length-1];t.columnsWidthMap.set(d.id,void 0)}return Object.assign(Object.assign({},e),{sortable:null===(l=t.sortableSet[null===(s=null===(a=null===(r=null==e?void 0:e.formatter)||void 0===r?void 0:r.properties)||void 0===a?void 0:a.dataFieldIds)||void 0===s?void 0:s.value])||void 0===l||l})}));o.length>0&&n&&this.logger.warn("Cannot set width for all columns. Resetting last column width."),this.columns.length!==o.length?this.columns=Fe(o):this.columns.forEach((function(e,t){Object.assign(e,o[t],{})}))},t.prototype.mapTableData=function(e,t,n){return n&&0!==n.length?e.map((function(e){var n=t.reduce((function(t,n){var o,i,r=null===(i=null===(o=n.formatter)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.dataFieldIds;if(!r)return t;var a=Object.keys(r).reduce((function(t,n){return t[n]=e[r[n]],t}),{});return t[n.id]=Object.assign({data:a},ne.default(n.formatter.properties,"dataFieldIds")),t}),{});return n.__record=e,n})):(this.logger.warn("There are no data fields defined, so table data cannot be displayed."),[])},t.prototype.onSortOrderChanged=function(e){var t,n;this.sortedColumn=e;var o=this.columns.find((function(t){return t.id===e.sortBy}));if(o){var i=null===(n=null===(t=o.formatter)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.dataFieldIds,r=null==i?void 0:i.value;if(r){var a={sortBy:r,direction:e.direction};me.default(a,this.sortFilter)||(this.sortFilter=a,this.flushTableData(),this.eventBus.getStream(Ye).next())}}},t.prototype.onInteraction=function(e,t){if(this.interactive){var n=this.configuration.interactionIgnoredSelectors||o.DEFAULT_INTERACTIVE_ELEMENTS;t.target.closest(n.join(","))||this.eventBus.getStream(ct).next({payload:{data:e.__record}})}},t.prototype.onSearchInputChanged=function(e){this.searchValue=e,this.searchTerm$.next()},t.prototype.getColumnAlignment=function(e){var t,n,o;return!(null===(t=null==e?void 0:e.formatter)||void 0===t?void 0:t.componentType)||this.formattersRegistryService.isEmpty?this.defaultColumnAlignment:((null===(n=this.formatters)||void 0===n?void 0:n.version)!==this.formattersRegistryService.stateVersion&&(this.formatters={items:this.formattersRegistryService.getItems().reduce((function(e,t){var n;return Object.assign(Object.assign({},e),((n={})[t.componentType]=t,n))}),{}),version:this.formattersRegistryService.stateVersion}),(null===(o=this.formatters.items[e.formatter.componentType])||void 0===o?void 0:o.alignment)||this.defaultColumnAlignment)},t.prototype.setSortFilter=function(){var e,t,n,i,r,a,s;if(this.configuration){var l=null===(e=this.configuration.sorterConfiguration)||void 0===e?void 0:e.sortBy,d=null===(a=null===(r=null===(i=null===(n=null===(t=this.configuration.columns)||void 0===t?void 0:t.find((function(e){return e.id===l})))||void 0===n?void 0:n.formatter)||void 0===i?void 0:i.properties)||void 0===r?void 0:r.dataFieldIds)||void 0===a?void 0:a.value;this.sortFilter={direction:(null===(s=this.configuration.sorterConfiguration)||void 0===s?void 0:s.descendantSorting)?o.SorterDirection.descending:o.SorterDirection.ascending,sortBy:d}}},t.prototype.isSortByUpdated=function(e){var t,n=null===(t=e.previousValue)||void 0===t?void 0:t.sorterConfiguration,o=e.currentValue.sorterConfiguration,i=null==n?void 0:n.sortBy,r=null==o?void 0:o.sortBy;return r?!(i===r&&o.descendantSorting===n.descendantSorting):Boolean(i)},t.prototype.updateTable=function(){this.widgetData&&this.dataFields&&this.configuration.columns&&(this.updateColumns(this.configuration),this.idle=!1,this.tableData=this.mapTableData(this.widgetData,this.configuration.columns,this.dataFields),this.tableUpdate$.next(),this.changeDetector.detectChanges())},t.prototype.registerSorter=function(){var e=this;this.dataSource.registerComponent({sorter:{componentInstance:{getFilters:function(){return{type:"sorter",value:e.sortFilter}}}}})},t.prototype.setSortableSet=function(){var e=this;this.sortableSet={},this.dataFields.forEach((function(t){var n;e.sortableSet[t.id]=null===(n=t.sortable)||void 0===n||n}))},t.prototype.flushTableData=function(){this.idle=!0,this.tableData=[]},t.prototype.getTableScrollRange=function(){var e,t=(null!==(e=this._scrollBuffer)&&void 0!==e?e:0)/100+1;return this._range?Math.floor(this._range*t):Math.floor(this.tableWidgetHeight/this.rowHeight*2*t)},t}();Vo.lateLoadKey="TableWidgetComponent",Vo.decorators=[{type:n.Component,args:[{selector:"nui-table-widget",template:'<div class="h-100 d-flex justify-content-center align-items-center" *ngIf="!shouldDisplayTable()">\n <nui-image image="no-data-to-show"></nui-image>\n</div>\n\x3c!-- h-100 gets added only when there\'s data to show to prevent an extra scrollbar when the table is empty --\x3e\n\x3c!-- Using invisible class instead of *ngIf as an non-virtual-scroll breakable way to hide the content. --\x3e\n<div class="nui-table-widget d-flex flex-column" [ngClass]="shouldDisplayTable() ? \'h-100\': \'invisible\'">\n <div class="mr-2 mb-2 flex-row" *ngIf="isSearchEnabled">\n <nui-search class="unlimited-width d-flex justify-content-end flex-grow-1"\n [value]="searchValue"\n (inputChange)="onSearchInputChanged($event)"\n (cancel)="onSearchInputChanged($event)">\n </nui-search>\n </div>\n <div class="flex-row h-100 nui-table-widget-container"\n [nuiDelayedMousePresenceDetection]="delayedMousePresenceDetectionEnabled"\n [delay]="configuration.scrollActivationDelayMs"\n [mousePresentSubject]="mousePresent$">\n \x3c!-- Note: Using inline style to let tableStickyHeader pick the actual height and update it with header height when it is detached --\x3e\n <cdk-virtual-scroll-viewport class="calc-height"\n style="height: calc(100% - 2px)"\n tableStickyHeader\n [itemSize]="rowHeight"\n [ngClass]="{ \'virtual-scroll-disabled\': (mousePresent$ | async) === false && delayedMousePresenceDetectionEnabled }">\n <table class="nui-table-widget__main"\n nui-table\n [reorderable]="configuration?.reorderable"\n [sortable]="sortable"\n [totalItems]="totalItems"\n [dataSource]="virtualScrollAddon.visibleItems"\n [sortedColumn]="sortedColumn"\n (sortOrderChanged)="onSortOrderChanged($event)"\n [trackBy]="dataTrackBy"\n #widgetTable>\n <ng-container nuiColumnDef="{{column.id}}" *ngFor="let column of columns; trackBy: columnTrackBy ">\n <th nui-header-cell\n [isColumnSortingDisabled]="!column.sortable"\n *nuiHeaderCellDef\n [style.width.px]="columnsWidthMap.get(column.id)"\n [style.max-width.px]="columnsWidthMap.get(column.id)"\n [style.min-width.px]="columnsWidthMap.get(column.id)"\n [title]="column.label"\n [tooltipText]="headerTooltipsEnabled ? column.label : undefined"\n [alignment]="getColumnAlignment(column)">\n {{column.label}}</th>\n <ng-container>\n <td nui-cell\n *nuiCellDef="let element"\n [style.width.px]="columnsWidthMap.get(column.id)"\n [style.max-width.px]="columnsWidthMap.get(column.id)"\n [style.min-width.px]="columnsWidthMap.get(column.id)"\n [alignment]="getColumnAlignment(column)">\n <ng-container nuiComponentPortal\n componentId="formatter"\n *ngIf="element[column.id] && column.formatter"\n [componentType]="column.formatter?.componentType"\n [properties]="element[column.id]"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n <tr nui-header-row *nuiHeaderRowDef="headers"></tr>\n <ng-template nuiRowDef cdkVirtualFor\n let-row\n [nuiRowDefColumns]="headers"\n [cdkVirtualForOf]="tableData"\n [cdkVirtualForTrackBy]="dataTrackBy">\n <tr nui-row (click)="onInteraction(row, $event)" [attr.role]="interactive ? \'button\' : \'\'" density="tiny"></tr>\n </ng-template>\n </table>\n </cdk-virtual-scroll-viewport>\n </div>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,providers:[Ao,Fo],host:{"[class.table-widget-fullwidth]":"true"},styles:[".nui-table-widget{overflow:auto;width:100%}.nui-table-widget .display-contents{display:contents}.nui-table-widget__main{flex:1 1 auto}.nui-table-widget__paginator{margin-top:10px}.nui-table-widget__overflow{overflow-y:auto}.nui-table-widget .nui-table-widget-container .virtual-scroll-disabled.cdk-virtual-scroll-viewport{overflow:hidden!important}:host-context(.mobile) .calc-height{min-height:200px}:host.table-widget-fullwidth{width:calc(100% - 10px)}.invisible{height:0}@-moz-document url-prefix(){.nui-table-widget-container{margin-right:10px}}"]}]}],Vo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:To,decorators:[{type:n.Optional}]},{type:n.ChangeDetectorRef},{type:an},{type:o.VirtualViewportManager},{type:n.NgZone},{type:n.ElementRef},{type:o.LoggerService},{type:Ao},{type:Fo},{type:So}]},Vo.propDecorators={widgetData:[{type:n.Input}],componentId:[{type:n.Input}],configuration:[{type:n.Input}],dataFields:[{type:n.Input}],totalItems:[{type:n.Input}],indentFromTop:[{type:n.Input}],sortable:[{type:n.Input}],delayedMousePresenceDetectionEnabled:[{type:n.Input}],range:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}],table:[{type:n.ViewChild,args:["widgetTable"]}],vscrollViewport:[{type:n.ViewChild,args:[i.CdkVirtualScrollViewport]}],tableRows:[{type:n.ViewChildren,args:[o.TableRowComponent,{read:n.ElementRef}]}]};var Lo=function(){};Lo.lateLoadKey="TemplateLoadErrorComponent",Lo.decorators=[{type:n.Component,args:[{template:"<code>\n <pre>Template load error!</pre>\n </code>"}]}];var Bo=function(){function e(){}return e.prototype.convertToSerializable=function(e){return{startDatetime:e.startDatetime.format(),endDatetime:e.endDatetime.format(),selectedPresetId:e.selectedPresetId,title:e.title}},e.prototype.convertFromSerializable=function(e){return{startDatetime:ve.default(e.startDatetime,ve.default.defaultFormat),endDatetime:ve.default(e.endDatetime,ve.default.defaultFormat),selectedPresetId:e.selectedPresetId,title:e.title}},e}();Bo.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Bo},token:Bo,providedIn:"root"}),Bo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}];var No,$o,jo,Ko=function(){function t(e,t,n,o,i,r,a){this.pizzagnaService=e,this.timeframeService=t,this.tfSerialization=n,this.history=o,this.dataSource=i,this.eventBus=r,this.changeDetector=a,this.currentTimeframe=this.timeframeService.getTimeframeByPresetId("last7Days")}return t.prototype.ngOnChanges=function(e){if(e.timeframe){var t=this.tfSerialization.convertFromSerializable(this.timeframe);(t=this.timeframeService.reconcileTimeframe(t)).selectedPresetId&&(t=this.timeframeService.getTimeframeByPresetId(t.selectedPresetId)),this.currentTimeframe=t,e.timeframe.isFirstChange()||this.eventBus.getStream(Ye).next()}e.minDate&&(this.minDateAsMoment=ve.default(this.minDate,ve.default.defaultFormat)),e.maxDate&&(this.maxDateAsMoment=ve.default(this.maxDate,ve.default.defaultFormat))},t.prototype.ngOnInit=function(){var e=this;this.history.restart(this.currentTimeframe),this.eventBus.getStream(at).subscribe((function(t){if(!t.payload)throw new Error("Unable to set timeframe. Event payload is undefined");e.onTimeframeChange(e.history.save(e.tfSerialization.convertFromSerializable(t.payload)))})),this.dataSource&&this.dataSource.registerComponent({timeframe:{componentInstance:{getFilters:function(){return{type:"timeframe",value:e.timeframeService.reconcileTimeframe(e.currentTimeframe)}}}}})},t.prototype.onTimeframeChange=function(t){var n=this.timeframeService.reconcileTimeframe(t);n.selectedPresetId=n.selectedPresetId||"",this.timeframeService.isEqual(n,this.currentTimeframe)||this.pizzagnaService.setProperty({pizzagnaKey:e.PizzagnaLayer.Data,componentId:this.componentId,propertyPath:["timeframe"]},this.tfSerialization.convertToSerializable(n))},t}();Ko.lateLoadKey="TimeframeSelectionComponent",Ko.decorators=[{type:n.Component,args:[{selector:"nui-timeframe-selection",template:'<nui-time-frame-bar [minDate]="minDateAsMoment"\n [maxDate]="maxDateAsMoment"\n [timeFrame]="currentTimeframe"\n (timeFrameChange)="onTimeframeChange(history.restart($event))"\n [historyIndex]="history.index"\n (undo)="onTimeframeChange(history.undo())"\n (clear)="onTimeframeChange(history.restart())">\n\n \x3c!-- content for default projection slot --\x3e\n <nui-icon icon="calendar" class="pr-3"></nui-icon>\n {{currentTimeframe | timeFrame}}\n\n \x3c!-- content for time frame selection projection slot --\x3e\n <nui-quick-picker [presets]="timeframeService.currentPresets" timeFrameSelection>\n <nui-time-frame-picker></nui-time-frame-picker>\n </nui-quick-picker>\n\n</nui-time-frame-bar>\n',providers:[o.HistoryStorage],styles:[":host{border-top:1px solid;border-top-color:var(--nui-color-line-default,#d9d9d9);border-bottom:1px solid;border-bottom-color:var(--nui-color-line-default,#d9d9d9)}"]}]}],Ko.ctorParameters=function(){return[{type:an},{type:o.TimeframeService},{type:Bo},{type:o.HistoryStorage},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:n.ChangeDetectorRef}]},Ko.propDecorators={componentId:[{type:n.Input}],minDate:[{type:n.Input}],maxDate:[{type:n.Input}],timeframe:[{type:n.Input}],elementClass:[{type:n.HostBinding,args:["class"]}]},e.TimeseriesInteractionType=void 0,(No=e.TimeseriesInteractionType||(e.TimeseriesInteractionType={})).DataPoints="dataPoints",No.Series="series",No.Values="values",e.TimeseriesScaleType=void 0,($o=e.TimeseriesScaleType||(e.TimeseriesScaleType={})).Time="time",$o.TimeInterval="timeInterval",$o.Linear="linear",e.TimeseriesChartPreset=void 0,(jo=e.TimeseriesChartPreset||(e.TimeseriesChartPreset={})).Line="line",jo.StackedArea="stackedArea",jo.StackedPercentageArea="stackedPercentageArea",jo.StackedBar="stackedBar",jo.StatusBar="statusBar";var Wo=function(){function t(e){this.unitConversionService=e,this.unitConversionPipe=new $e(this.unitConversionService)}return t.prototype.getScale=function(t){var n;switch(t.type){case e.TimeseriesScaleType.Time:n=new a.TimeScale;break;case e.TimeseriesScaleType.Linear:(n=new a.LinearScale).formatters.tick=this.unitConversionPipe.transform;break;case e.TimeseriesScaleType.TimeInterval:n=new a.TimeIntervalScale(O.duration(1,"hour"))}return this.updateConfiguration(n,t),n},t.prototype.updateConfiguration=function(t,n){var o;if(n.type===e.TimeseriesScaleType.TimeInterval&&t instanceof a.TimeIntervalScale){var i=null===(o=n.properties)||void 0===o?void 0:o.interval;if("number"==typeof i){if(i<=0)throw new Error("Interval value must be greater than zero.");t.interval(O.duration(i,"seconds"))}}},t}();Wo.decorators=[{type:n.Injectable}],Wo.ctorParameters=function(){return[{type:o.UnitConversionService}]};var Mo=function(){function t(e,t){var n=this;this.timeseriesScalesService=e,this.dataSource=t,this.widgetData={},this.configuration={},this.scales={},this.destroy$=new d.Subject,this.buildChart$=new d.Subject,this.resetChart=!1,this.chartBuilt=!1,this.buildChart$.pipe(v.takeUntil(this.destroy$)).subscribe((function(){n.chartBuilt=!0}))}return Object.defineProperty(t.prototype,"seriesInteractive",{get:function(){var t,n,o,i;return"series"===(null===(t=this.configuration)||void 0===t?void 0:t.interaction)||(null===(i=null===(o=null===(n=this.dataSource)||void 0===n?void 0:n.features)||void 0===o?void 0:o.getFeatureConfig(e.WellKnownDataSourceFeatures.Interactivity))||void 0===i?void 0:i.enabled)||!1},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(e){var t,n,o,i,r,a,s,l,d=!1,c=!1;if(e.configuration){var u=e.configuration.currentValue,p=e.configuration.previousValue;if((null==u?void 0:u.preset)!==(null==p?void 0:p.preset)&&(c=!0),(null==u?void 0:u.scales)!==(null==p?void 0:p.scales))try{for(var h=Re(Object.keys(null==u?void 0:u.scales)),g=h.next();!g.done;g=h.next()){var m=g.value,f=null===(o=null==u?void 0:u.scales)||void 0===o?void 0:o[m],v=null===(i=null==p?void 0:p.scales)||void 0===i?void 0:i[m];(null==f?void 0:f.type)===(null==v?void 0:v.type)&&this.scales[m]?(null==f?void 0:f.properties)!==(null==v?void 0:v.properties)&&(this.timeseriesScalesService.updateConfiguration(this.scales[m],f),d=!0):(this.scales[m]=this.timeseriesScalesService.getScale(f),d=!0)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}}!c&&this.chartBuilt||this.buildChart(),e.widgetData&&!e.widgetData.isFirstChange()&&(0===(null===(a=null===(r=this.widgetData)||void 0===r?void 0:r.series)||void 0===a?void 0:a.length)&&(this.resetChart=!0),this.widgetData&&this.widgetData.series&&(this.resetChart&&(null===(l=null===(s=this.widgetData)||void 0===s?void 0:s.series)||void 0===l?void 0:l.length)>0&&(this.resetChart=!1,this.buildChart()),d=!0)),d&&this.updateChartData()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.buildChart$.complete()},t}();Mo.decorators=[{type:n.Directive}],Mo.ctorParameters=function(){return[{type:Wo},{type:void 0}]},Mo.propDecorators={widgetData:[{type:n.Input}],configuration:[{type:n.Input}]};var Uo=function(e){function t(t,n,i,r,a){var s=e.call(this,i,n)||this;return s.iconService=t,s.timeseriesScalesService=i,s.changeDetector=r,s.eventBus=a,s.collectionId=o.uuid("timeseries-status-charts"),s.chartUpdate$=new d.Subject,s}return ke(t,e),t.prototype.ngOnInit=function(){},t.prototype.getDataPointData=function(e,t){var n,o=null===(n=this.chartAssist.highlightedDataPoints[e.id])||void 0===n?void 0:n.data;return o?o[t]:e.data.length>0?e.data[e.data.length-1][t]:void 0},t.prototype.buildChart=function(){var e=this;this.buildChart$.next(),this.chartAssist=new a.SparkChartAssist,this.accessors=a.statusAccessors(this.chartAssist.palette.standardColors),this.accessors.data.color=function(e,t,n,o){return void 0===e.color?"var(--nui-color-semantic-unknown)":e.color},this.accessors.data.thickness=function(e){return void 0===e.thick||e.thick?a.BarRenderer.THICK:a.BarRenderer.THIN};this.accessors.data.marker=function(t){return t.icon?e.iconService.getIconResized(e.iconService.getIconData(t.icon).code,8):void 0},this.renderer=new a.BarRenderer({highlightStrategy:new a.BarHighlightStrategy("x"),pointerEvents:!1}),this.scales.y=new a.BandScale,this.scales.y.fixDomain(a.StatusAccessors.STATUS_DOMAIN)},t.prototype.updateChartData=function(){var e,t,n=this;this.chartUpdate$.next();var o=this.widgetData.series.map((function(e){return Object.assign(Object.assign({},e),{data:n.transformData(e.data,n.scales.x instanceof a.TimeIntervalScale),accessors:n.accessors,renderer:n.renderer,scales:n.scales})}));this.chartAssist.update(o),this.configuration.enableZoom&&(this.chartAssist.sparks.forEach((function(e){var t,n;(null===(t=null==e?void 0:e.chart)||void 0===t?void 0:t.hasPlugin(a.ZoomPlugin))||null===(n=null==e?void 0:e.chart)||void 0===n||n.addPlugin(new a.ZoomPlugin({enableExternalEvents:!0}))})),null===(e=this.chartAssist.sparks[0].chart)||void 0===e||e.getEventBus().getStream(a.SET_DOMAIN_EVENT).pipe(v.takeUntil(d.merge(this.chartUpdate$,null===(t=this.chartAssist.sparks[0].chart)||void 0===t?void 0:t.eventBus.getStream(a.DESTROY_EVENT),this.buildChart$))).subscribe((function(e){var t=e.data,o=t[Object.keys(t)[0]];n.eventBus.getStream(at).next({payload:{startDatetime:o[0],endDatetime:o[1],selectedPresetId:null}})})))},t.prototype.transformData=function(e,t){var n=[];return e.forEach((function(o,i){(t||e.length-1!==i)&&n.push({start:o.x,end:t?o.x:e[i+1].x,status:o.y,color:o.color,thick:o.thick,icon:o.icon})})),n},t}(Mo);Uo.lateLoadKey="StatusChartComponent",Uo.decorators=[{type:n.Component,args:[{selector:"nui-status-bar-chart",template:'<div *ngIf="chartAssist" class="p-3 status-bar-chart">\n <div class="d-flex" *ngFor="let spark of chartAssist.sparks; trackBy: chartAssist.trackByFn">\n <nui-chart class="d-flex flex-grow-1" [chart]="spark.chart"\n [nuiChartCollectionId]="collectionId"></nui-chart>\n <div class="d-flex flex-column pl-2"\n *ngIf="spark.chartSeriesSet?.length > 0 && spark.chartSeriesSet[0]; let series">\n <nui-legend class="status-bar-chart__legend" [active]="chartAssist.isLegendActive">\n <nui-legend-series [descriptionPrimary]="series.legendDescriptionPrimary"\n [descriptionSecondary]="series.legendDescriptionSecondary">\n <div class="status-bar-chart__legend__tile d-flex justify-content-center align-items-center">\n <div class="w-100 h-100 status-bar-chart__legend__tile__background"\n [style.background-color]="getDataPointData(series,\'color\')">\n </div>\n <nui-icon *ngIf="getDataPointData(series,\'icon\'); let icon;" class="status-bar-chart__legend__tile__icon" [icon]="icon"></nui-icon>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n </div>\n</div>\n',styles:[".status-bar-chart__legend__tile{width:60px;position:relative}.status-bar-chart__legend__tile__background{position:absolute;opacity:.4}.status-bar-chart__legend__tile__icon{position:absolute}"]}]}],Uo.ctorParameters=function(){return[{type:o.IconService},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]};var Ho=function(t){function n(e,n,o,i){var r=t.call(this,o,n)||this;return r.eventBus=e,r.timeseriesScalesService=o,r.changeDetector=i,r.valueAccessorKey="y",r}return ke(n,t),n.prototype.mapSeriesSet=function(e,t){var n=this;return e.map((function(e){return Object.assign(Object.assign({},e),{scales:t,renderer:n.renderer,accessors:n.accessors})}))},n.prototype.hasLegend=function(){return this.configuration.legendPlacement&&this.configuration.legendPlacement!==e.LegendPlacement.None},n.prototype.legendShouldBeAlignedRight=function(){return this.configuration.legendPlacement===e.LegendPlacement.Right},n.prototype.onPrimaryDescClick=function(t,n){this.seriesInteractive&&(t.stopPropagation(),this.eventBus.getStream(ct).next({payload:{data:n,interactionType:e.TimeseriesInteractionType.Series}}))},n.prototype.updateChartData=function(){this.chartAssist.update(this.mapSeriesSet(this.widgetData.series,this.scales))},n.prototype.buildChart=function(){var e,t=this;this.buildChart$.next();var n=this.configuration.chartColors&&(null===(e=this.configuration.chartColors)||void 0===e?void 0:e.length)>0?new a.SequentialColorProvider(this.configuration.chartColors):a.defaultColorProvider(),o=new a.ChartPalette(n);this.accessors=this.createAccessors(o.standardColors),this.chartAssist=this.createChartAssist(o);var i=this.chartAssist.chart;this.configuration.enableZoom&&i.addPlugin(new a.ZoomPlugin),i.getEventBus().getStream(a.SET_DOMAIN_EVENT).pipe(v.takeUntil(d.merge(this.destroy$,this.buildChart$))).subscribe((function(e){var n=e.data,o=n[Object.keys(n)[0]];t.eventBus.getStream(at).next({payload:{startDatetime:o[0],endDatetime:o[1],selectedPresetId:null}})})),this.setupInteraction()},n.prototype.setupInteraction=function(){var t=this;this.chartAssist.chart.getEventBus().getStream(a.INTERACTION_DATA_POINTS_EVENT).pipe(v.takeUntil(d.merge(this.destroy$,this.buildChart$))).subscribe((function(n){var o=n.data;o.interactionType===a.InteractionType.Click&&t.eventBus.getStream(ct).next({payload:{data:o.dataPoints,interactionType:e.TimeseriesInteractionType.DataPoints}})})),this.chartAssist.chart.getEventBus().getStream(a.INTERACTION_VALUES_EVENT).pipe(v.takeUntil(d.merge(this.destroy$,this.buildChart$))).subscribe((function(n){var o=n.data;o.interactionType===a.InteractionType.Click&&t.eventBus.getStream(ct).next({payload:{data:o.values,interactionType:e.TimeseriesInteractionType.Values}})}))},n}(Mo);Ho.decorators=[{type:n.Injectable}],Ho.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef}]};var Go=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o,i)||this;return r.renderer=new a.LineRenderer,r}return ke(t,e),t.prototype.createAccessors=function(e){return new a.LineAccessors(e)},t.prototype.createChartAssist=function(e){var t=new a.XYGridConfig;t.axis.left.fit=!0;var n=new a.Chart(new a.XYGrid(t));return new a.ChartAssist(n,null,e)},t}(Ho);Go.lateLoadKey="LineChartComponent",Go.decorators=[{type:n.Component,args:[{selector:"nui-line-chart",template:'<div class="nui-chart-layout h-100 px-3 py-3">\n <div class="axis-label-left nui-text-small"><strong>{{configuration.leftAxisLabel}}</strong></div>\n <div class="chart">\n <nui-chart class="w-100" [chart]="chartAssist.chart"></nui-chart>\n </div>\n <div class="d-flex" *ngIf="hasLegend()"\n [ngClass]="[legendShouldBeAlignedRight() ? \'legend scrollable\' : \'legend-bottom\']">\n <nui-legend class="m-auto"\n [active]="chartAssist.isLegendActive"\n [interactive]="true"\n [orientation]="legendShouldBeAlignedRight() ? \'vertical\' : \'horizontal\'">\n <nui-legend-series\n class="xy-chart__legend-series"\n [ngClass]="\'xy-chart__legend-series--state-\' + chartAssist.renderStatesIndex[legendSeries.id]?.state"\n *ngFor="let legendSeries of chartAssist.legendSeriesSet; trackBy: chartAssist.seriesTrackByFn"\n [isSelected]="!chartAssist.isSeriesHidden(legendSeries.id)"\n (isSelectedChange)="chartAssist.toggleSeries(legendSeries.id, $event)"\n (mouseenter)="chartAssist.emphasizeSeries(legendSeries.id)"\n (mouseleave)="chartAssist.resetVisibleSeries()"\n [seriesRenderState]="chartAssist.renderStatesIndex[legendSeries.id]?.state">\n <nui-rich-legend-tile [value]="chartAssist.getHighlightedValue(legendSeries, \'y\', \'tick\', valueAccessorKey)"\n [backgroundColor]="chartAssist.palette.standardColors.get(legendSeries.id)"\n [color]="chartAssist.palette.textColors.get(legendSeries.id)">\n <nui-chart-marker rightEdge\n [marker]="chartAssist.markers.get(legendSeries.id)"\n [color]="chartAssist.palette.standardColors.get(legendSeries.id)">\n </nui-chart-marker>\n </nui-rich-legend-tile>\n <div description class="description-container d-flex flex-column nui-text-small justify-content-center">\n <div *ngIf="!legendSeries.link"\n class="description description-primary"\n [ngClass]="{\'nui-text-link-small link\': seriesInteractive}"\n (click)="onPrimaryDescClick($event, legendSeries)">\n {{legendSeries.legendDescriptionPrimary}}\n </div>\n <a class="description description-primary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.link"\n [href]="legendSeries.link"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionPrimary">\n {{legendSeries.legendDescriptionPrimary}}\n </a>\n <div class="description description-secondary"\n *ngIf="!legendSeries.secondaryLink"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </div>\n <a class="description description-secondary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.secondaryLink"\n [href]="legendSeries.secondaryLink"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </a>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n</div>\n',styles:[".xy-chart__legend-series .link.description-primary,.xy-chart__legend-series .link.description-secondary{color:var(--nui-color-text-link,#0079aa)}.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-primary,.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-secondary{color:var(--nui-color-text-default,#111)}"]}]}],Go.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef}]};var qo=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o,i)||this;return r.renderer=new a.AreaRenderer,r.valueAccessorKey="y1",r}return ke(t,e),t.prototype.createAccessors=function(e){return a.stackedAreaAccessors(e)},t.prototype.createChartAssist=function(e){var t=a.areaGrid();t.config().axis.left.fit=!0;var n=new a.Chart(t);return new a.ChartAssist(n,a.stackedArea,e)},t}(Ho);qo.lateLoadKey="StackedAreaChartComponent",qo.decorators=[{type:n.Component,args:[{selector:"nui-stacked-area-chart",template:'<div class="nui-chart-layout h-100 px-3 py-3">\n <div class="axis-label-left nui-text-small"><strong>{{configuration.leftAxisLabel}}</strong></div>\n <div class="chart">\n <nui-chart class="w-100" [chart]="chartAssist.chart"></nui-chart>\n </div>\n <div class="d-flex" *ngIf="hasLegend()"\n [ngClass]="[legendShouldBeAlignedRight() ? \'legend scrollable\' : \'legend-bottom\']">\n <nui-legend class="m-auto"\n [active]="chartAssist.isLegendActive"\n [interactive]="true"\n [orientation]="legendShouldBeAlignedRight() ? \'vertical\' : \'horizontal\'">\n <nui-legend-series\n class="xy-chart__legend-series"\n [ngClass]="\'xy-chart__legend-series--state-\' + chartAssist.renderStatesIndex[legendSeries.id]?.state"\n *ngFor="let legendSeries of chartAssist.legendSeriesSet; trackBy: chartAssist.seriesTrackByFn"\n [isSelected]="!chartAssist.isSeriesHidden(legendSeries.id)"\n (isSelectedChange)="chartAssist.toggleSeries(legendSeries.id, $event)"\n (mouseenter)="chartAssist.emphasizeSeries(legendSeries.id)"\n (mouseleave)="chartAssist.resetVisibleSeries()"\n [seriesRenderState]="chartAssist.renderStatesIndex[legendSeries.id]?.state">\n <nui-rich-legend-tile [value]="chartAssist.getHighlightedValue(legendSeries, \'y\', \'tick\', valueAccessorKey)"\n [backgroundColor]="chartAssist.palette.standardColors.get(legendSeries.id)"\n [color]="chartAssist.palette.textColors.get(legendSeries.id)">\n <nui-chart-marker rightEdge\n [marker]="chartAssist.markers.get(legendSeries.id)"\n [color]="chartAssist.palette.standardColors.get(legendSeries.id)">\n </nui-chart-marker>\n </nui-rich-legend-tile>\n <div description class="description-container d-flex flex-column nui-text-small justify-content-center">\n <div *ngIf="!legendSeries.link"\n class="description description-primary"\n [ngClass]="{\'nui-text-link-small link\': seriesInteractive}"\n (click)="onPrimaryDescClick($event, legendSeries)">\n {{legendSeries.legendDescriptionPrimary}}\n </div>\n <a class="description description-primary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.link"\n [href]="legendSeries.link"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionPrimary">\n {{legendSeries.legendDescriptionPrimary}}\n </a>\n <div class="description description-secondary"\n *ngIf="!legendSeries.secondaryLink"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </div>\n <a class="description description-secondary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.secondaryLink"\n [href]="legendSeries.secondaryLink"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </a>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n</div>\n',styles:[".xy-chart__legend-series .link.description-primary,.xy-chart__legend-series .link.description-secondary{color:var(--nui-color-text-link,#0079aa)}.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-primary,.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-secondary{color:var(--nui-color-text-default,#111)}"]}]}],qo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef}]};var Zo=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o,i)||this;return r.valueAccessorKey="value",r.renderer=new a.BarRenderer({highlightStrategy:new a.BarHighlightStrategy("x"),pointerEvents:!1}),r}return ke(t,e),t.prototype.mapSeriesSet=function(t,n){return n.x instanceof a.TimeIntervalScale?this.accessors.data.thickness=void 0:this.accessors.data.thickness=function(){return 5},e.prototype.mapSeriesSet.call(this,t,n)},t.prototype.createAccessors=function(e){var t=a.barAccessors({horizontal:!1},e);return t.data.category=function(e){return e.x},t.data.value=function(e){return e.y},t},t.prototype.createChartAssist=function(e){var t=new a.Chart(a.barGrid());return t.addPlugin(new a.InteractionLabelPlugin),new a.ChartAssist(t,a.stack,e)},t}(Ho);Zo.lateLoadKey="StackedBarChartComponent",Zo.decorators=[{type:n.Component,args:[{selector:"nui-stacked-bar-chart",template:'<div class="nui-chart-layout h-100 px-3 py-3">\n <div class="axis-label-left nui-text-small"><strong>{{configuration.leftAxisLabel}}</strong></div>\n <div class="chart">\n <nui-chart class="w-100" [chart]="chartAssist.chart"></nui-chart>\n </div>\n <div class="d-flex" *ngIf="hasLegend()"\n [ngClass]="[legendShouldBeAlignedRight() ? \'legend scrollable\' : \'legend-bottom\']">\n <nui-legend class="m-auto"\n [active]="chartAssist.isLegendActive"\n [interactive]="true"\n [orientation]="legendShouldBeAlignedRight() ? \'vertical\' : \'horizontal\'">\n <nui-legend-series\n class="xy-chart__legend-series"\n [ngClass]="\'xy-chart__legend-series--state-\' + chartAssist.renderStatesIndex[legendSeries.id]?.state"\n *ngFor="let legendSeries of chartAssist.legendSeriesSet; trackBy: chartAssist.seriesTrackByFn"\n [isSelected]="!chartAssist.isSeriesHidden(legendSeries.id)"\n (isSelectedChange)="chartAssist.toggleSeries(legendSeries.id, $event)"\n (mouseenter)="chartAssist.emphasizeSeries(legendSeries.id)"\n (mouseleave)="chartAssist.resetVisibleSeries()"\n [seriesRenderState]="chartAssist.renderStatesIndex[legendSeries.id]?.state">\n <nui-rich-legend-tile [value]="chartAssist.getHighlightedValue(legendSeries, \'y\', \'tick\', valueAccessorKey)"\n [backgroundColor]="chartAssist.palette.standardColors.get(legendSeries.id)"\n [color]="chartAssist.palette.textColors.get(legendSeries.id)">\n <nui-chart-marker rightEdge\n [marker]="chartAssist.markers.get(legendSeries.id)"\n [color]="chartAssist.palette.standardColors.get(legendSeries.id)">\n </nui-chart-marker>\n </nui-rich-legend-tile>\n <div description class="description-container d-flex flex-column nui-text-small justify-content-center">\n <div *ngIf="!legendSeries.link"\n class="description description-primary"\n [ngClass]="{\'nui-text-link-small link\': seriesInteractive}"\n (click)="onPrimaryDescClick($event, legendSeries)">\n {{legendSeries.legendDescriptionPrimary}}\n </div>\n <a class="description description-primary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.link"\n [href]="legendSeries.link"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionPrimary">\n {{legendSeries.legendDescriptionPrimary}}\n </a>\n <div class="description description-secondary"\n *ngIf="!legendSeries.secondaryLink"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </div>\n <a class="description description-secondary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.secondaryLink"\n [href]="legendSeries.secondaryLink"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </a>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n</div>\n',styles:[".xy-chart__legend-series .link.description-primary,.xy-chart__legend-series .link.description-secondary{color:var(--nui-color-text-link,#0079aa)}.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-primary,.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-secondary{color:var(--nui-color-text-default,#111)}"]}]}],Zo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef}]};var Yo=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o,i)||this;return r.renderer=new a.AreaRenderer,r.valueAccessorKey="y1",r}return ke(t,e),t.prototype.createAccessors=function(e){return a.stackedAreaAccessors(e)},t.prototype.createChartAssist=function(e){var t=a.areaGrid();t.config().axis.left.fit=!0;var n=new a.Chart(t);return new a.ChartAssist(n,a.stackedPercentageArea,e)},t}(Ho);Yo.lateLoadKey="StackedPercentageAreaChartComponent",Yo.decorators=[{type:n.Component,args:[{selector:"nui-stacked-percentage-area-chart",template:'<div class="nui-chart-layout h-100 px-3 py-3">\n <div class="axis-label-left nui-text-small"><strong>{{configuration.leftAxisLabel}}</strong></div>\n <div class="chart">\n <nui-chart class="w-100" [chart]="chartAssist.chart"></nui-chart>\n </div>\n <div class="d-flex" *ngIf="hasLegend()"\n [ngClass]="[legendShouldBeAlignedRight() ? \'legend scrollable\' : \'legend-bottom\']">\n <nui-legend class="m-auto"\n [active]="chartAssist.isLegendActive"\n [interactive]="true"\n [orientation]="legendShouldBeAlignedRight() ? \'vertical\' : \'horizontal\'">\n <nui-legend-series\n class="xy-chart__legend-series"\n [ngClass]="\'xy-chart__legend-series--state-\' + chartAssist.renderStatesIndex[legendSeries.id]?.state"\n *ngFor="let legendSeries of chartAssist.legendSeriesSet; trackBy: chartAssist.seriesTrackByFn"\n [isSelected]="!chartAssist.isSeriesHidden(legendSeries.id)"\n (isSelectedChange)="chartAssist.toggleSeries(legendSeries.id, $event)"\n (mouseenter)="chartAssist.emphasizeSeries(legendSeries.id)"\n (mouseleave)="chartAssist.resetVisibleSeries()"\n [seriesRenderState]="chartAssist.renderStatesIndex[legendSeries.id]?.state">\n <nui-rich-legend-tile [value]="chartAssist.getHighlightedValue(legendSeries, \'y\', \'tick\', valueAccessorKey)"\n [backgroundColor]="chartAssist.palette.standardColors.get(legendSeries.id)"\n [color]="chartAssist.palette.textColors.get(legendSeries.id)">\n <nui-chart-marker rightEdge\n [marker]="chartAssist.markers.get(legendSeries.id)"\n [color]="chartAssist.palette.standardColors.get(legendSeries.id)">\n </nui-chart-marker>\n </nui-rich-legend-tile>\n <div description class="description-container d-flex flex-column nui-text-small justify-content-center">\n <div *ngIf="!legendSeries.link"\n class="description description-primary"\n [ngClass]="{\'nui-text-link-small link\': seriesInteractive}"\n (click)="onPrimaryDescClick($event, legendSeries)">\n {{legendSeries.legendDescriptionPrimary}}\n </div>\n <a class="description description-primary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.link"\n [href]="legendSeries.link"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionPrimary">\n {{legendSeries.legendDescriptionPrimary}}\n </a>\n <div class="description description-secondary"\n *ngIf="!legendSeries.secondaryLink"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </div>\n <a class="description description-secondary nui-text-link-small link"\n (click)="$event.stopPropagation()"\n *ngIf="legendSeries.secondaryLink"\n [href]="legendSeries.secondaryLink"\n rel="noopener noreferrer"\n [title]="legendSeries.legendDescriptionSecondary">\n {{legendSeries.legendDescriptionSecondary}}\n </a>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n</div>\n',styles:[".xy-chart__legend-series .link.description-primary,.xy-chart__legend-series .link.description-secondary{color:var(--nui-color-text-link,#0079aa)}.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-primary,.xy-chart__legend-series:not(:hover).xy-chart__legend-series--state-hidden .link.description-secondary{color:var(--nui-color-text-default,#111)}"]}]}],Yo.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:Wo},{type:n.ChangeDetectorRef}]};var Xo=function(){var t;this.presets=((t={})[e.TimeseriesChartPreset.Line]={componentType:Go.lateLoadKey},t[e.TimeseriesChartPreset.StackedArea]={componentType:qo.lateLoadKey},t[e.TimeseriesChartPreset.StackedPercentageArea]={componentType:Yo.lateLoadKey},t[e.TimeseriesChartPreset.StackedBar]={componentType:Zo.lateLoadKey},t[e.TimeseriesChartPreset.StatusBar]={componentType:Uo.lateLoadKey},t)};Xo.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new Xo},token:Xo,providedIn:"root"}),Xo.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],Xo.ctorParameters=function(){return[]};var Jo=function(){function t(e,t){this.timeseriesChartPresetService=e,this.changeDetector=t,this.widgetData={},this.configuration={},this.elementClass=""}return t.prototype.ngOnChanges=function(t){var n,o;if(t.configuration){var i=t.configuration.currentValue,r=t.configuration.previousValue;(null==i?void 0:i.preset)!==(null==r?void 0:r.preset)&&(this.chartPreset=this.timeseriesChartPresetService.presets[null!==(o=null===(n=this.configuration)||void 0===n?void 0:n.preset)&&void 0!==o?o:e.TimeseriesChartPreset.Line])}},t.prototype.shouldShowChart=function(){var e,t;return(null===(t=null===(e=this.widgetData)||void 0===e?void 0:e.series)||void 0===t?void 0:t.length)>0},t}();Jo.lateLoadKey="TimeseriesWidgetComponent",Jo.decorators=[{type:n.Component,args:[{selector:"nui-timeseries-widget",template:'<div class="h-100" *ngIf="shouldShowChart()">\n <ng-container nuiComponentPortal\n componentId="timeseriesWidgetChart"\n [componentType]="chartPreset.componentType"\n [properties]="{ widgetData: widgetData, configuration: configuration }"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)">\n </ng-template>\n </ng-container>\n</div>\n<div *ngIf="!shouldShowChart()">\n <nui-image image="no-data-to-show"></nui-image>\n</div>\n'}]}],Jo.ctorParameters=function(){return[{type:Xo},{type:n.ChangeDetectorRef}]},Jo.propDecorators={widgetData:[{type:n.Input}],configuration:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}]};var Qo,ei=function(){function e(e,t){this.dataSource=e,this.eventBus=t,this.enabled=!1,this.searchTerm$=new d.Subject,this.onDestroy$=new d.Subject}return e.prototype.ngOnInit=function(){var e,t,n,o;(null===(n=null===(t=null===(e=this.dataSource.features)||void 0===e?void 0:e.getSupportedFeatures())||void 0===t?void 0:t.search)||void 0===n?void 0:n.enabled)&&(this.enabled=!0),this.registerFilters(),this.handleSearchTermSubscription(null===(o=this.configuration)||void 0===o?void 0:o.searchOnKeyUp)},e.prototype.ngOnChanges=function(e){if(e.configuration){var t=e.configuration.currentValue;this.handleSearchTermSubscription(t.searchOnKeyUp)}},e.prototype.onSearchInputChanged=function(e){var t,n;(null===(n=null===(t=this.configuration)||void 0===t?void 0:t.searchOnKeyUp)||void 0===n?void 0:n.enabled)&&(this.searchValue=e,this.searchTerm$.next(e))},e.prototype.onSearch=function(e){this.searchValue=e,this.searchTerm$.next(e)},e.prototype.ngOnDestroy=function(){this.eventBus.getStream(it).next({payload:""}),this.onDestroy$.next(),this.onDestroy$.complete()},e.prototype.registerFilters=function(){var e,t=this;null===(e=this.dataSource)||void 0===e||e.registerComponent({search:{componentInstance:{getFilters:function(){return{value:t.searchValue}}}}})},e.prototype.handleSearchTermSubscription=function(t){var n,o=this;null===(n=this.searchTermSubscription)||void 0===n||n.unsubscribe(),this.searchTermSubscription=this.searchTerm$.pipe(v.takeUntil(this.onDestroy$),v.debounceTime((null==t?void 0:t.debounceTime)||e.defaultSearchDebounce)).subscribe((function(e){o.eventBus.getStream(Ye).next(),o.eventBus.getStream(it).next({payload:e})}))},e}();ei.lateLoadKey="WidgetSearchComponent",ei.defaultSearchDebounce=500,ei.decorators=[{type:n.Component,args:[{selector:"nui-widget-search",template:'<nui-search class="unlimited-width"\n *ngIf="enabled"\n [value]="searchValue"\n (inputChange)="onSearchInputChanged($event)"\n (cancel)="onSearch($event)"\n (search)="onSearch($event)"\n></nui-search>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,host:{"[class.default]":"enabled","[class.invisible]":"!enabled"},styles:[":host.default{padding:5px 10px}:host.invisible{height:0}"]}]}],ei.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[Ht]}]},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},ei.propDecorators={configuration:[{type:n.Input}],searchValue:[{type:n.Input}]},e.ErrorNodeKey=void 0,(Qo=e.ErrorNodeKey||(e.ErrorNodeKey={})).ErrorUnknown="errorUnknown",Qo.ErrorForbidden="errorForbidden",Qo.ErrorNotFound="errorNotFound";var ti=function(t){function n(e,n,o){var i=t.call(this,e,n,o)||this;return i.elementClass="",i.defaultClasses="w-100",i}return ke(n,t),n.prototype.ngOnInit=function(){this.classNames=this.defaultClasses+" "+this.elementClass},n.prototype.ngOnDestroy=function(){t.prototype.ngOnDestroy.call(this)},n.prototype.getNodes=function(){if(this.fallbackKey){var t=this.fallbackMap&&this.fallbackMap[this.fallbackKey]||e.ErrorNodeKey.ErrorUnknown;return[this.primaryContent,t]}return[this.primaryContent]},n}(cn);ti.lateLoadKey="WidgetBodyContentComponent",ti.decorators=[{type:n.Component,args:[{selector:"nui-widget-body-content",template:'<div class="h-100"\n [ngClass]="{ \'d-none\': fallbackKey,\n \'d-flex\': !fallbackKey }">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="nodeConfigs[0].id"\n [componentType]="nodeConfigs[0].componentType"\n [providers]="nodeConfigs[0].providers"\n [properties]="nodeConfigs[0].properties">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</div>\n<div class="d-flex h-100" *ngIf="fallbackKey">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="nodeConfigs[1].id"\n [componentType]="nodeConfigs[1].componentType"\n [providers]="nodeConfigs[1].providers"\n [properties]="nodeConfigs[1].properties">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</div>\n'}]}],ti.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService}]},ti.propDecorators={componentId:[{type:n.Input}],primaryContent:[{type:n.Input}],fallbackKey:[{type:n.Input}],fallbackMap:[{type:n.Input}],elementClass:[{type:n.Input}],classNames:[{type:n.HostBinding,args:["class"]}]};var ni=function(t){function n(e,n,o,i){var r=t.call(this,n,o,i)||this;return r.eventBus=e,r.editMode=!1,r.elementClass="",r.defaultClasses="d-flex h-100 w-100",r.getNodes=function(){return[r.content]},r}return ke(n,t),n.prototype.ngOnInit=function(){var t=this;this.classNames=this.defaultClasses+" "+this.elementClass,this.eventBus.getStream(dt).pipe(v.takeUntil(this.destroyed$)).subscribe((function(n){t.pizzagnaService.setProperty({componentId:t.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["editMode"]},!!n.payload)}))},n.prototype.ngOnDestroy=function(){t.prototype.ngOnDestroy.call(this)},n}(cn);ni.lateLoadKey="WidgetBodyComponent",ni.decorators=[{type:n.Component,args:[{selector:"nui-widget-body",template:'<nui-preview-overlay *ngIf="editMode"></nui-preview-overlay>\n<ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="nodeConfigs[0].id"\n [componentType]="nodeConfigs[0].componentType"\n [providers]="nodeConfigs[0].providers"\n [properties]="nodeConfigs[0].properties">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n</ng-container>\n',styles:[":host{position:relative}"]}]}],ni.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService}]},ni.propDecorators={componentId:[{type:n.Input}],editMode:[{type:n.Input}],content:[{type:n.Input}],elementClass:[{type:n.Input}],classNames:[{type:n.HostBinding,args:["class"]}]};var oi,ii=function(){function t(e,t,n,o,i){this.eventBus=e,this.pizzagnaService=t,this.changeDetector=n,this.eventProxy=o,this.linkProvider=i,this.editMode=!0,this.editable=!0,this.removable=!0,this.collapsible=!1,this.reloadable=!0,this.hideMenu=!1,this.collapsed=!1,this.onDestroy$=new d.Subject,this.linkTooltip=$localize(oi||(oi=Ve(["Explore this data"],["Explore this data"])))}return Object.defineProperty(t.prototype,"hostClass",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this.collapsed&&this.collapsible?"collapsed":"expanded"},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.collapsible&&this.pizzagnaService.setProperty({componentId:this.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["isCollapsed"]},!0),this.eventProxy&&(this.eventProxy.addUpstream(Qe),this.eventProxy.addUpstream(Je),this.eventProxy.addDownstream(dt)),this.eventBus.getStream(dt).pipe(v.takeUntil(this.onDestroy$)).subscribe((function(n){t.pizzagnaService.setProperty({componentId:t.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["collapsed"]},!n.payload),t.pizzagnaService.setProperty({componentId:t.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["editMode"]},!!n.payload)}))},t.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){e.withCustomElement=0!==e.widgetHeaderCustomElement.nativeElement.childNodes.length}))},t.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},t.prototype.removeWidget=function(){this.eventBus.getStream(Je).next()},t.prototype.toggleCollapsed=function(){this.pizzagnaService.setProperty({componentId:this.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["collapsed"]},!this.collapsed)},t.prototype.onEditWidget=function(){this.eventBus.getStream(Qe).next()},t.prototype.onReloadData=function(){if(!this.reloadable)throw new Error("The widget is not reloadable, so it can't be reloaded manually.");this.eventBus.getStream(Ye).next()},t.prototype.prepareLink=function(e){var t=e.target;if(t&&this.linkProvider){var n=this.linkProvider.getLink(this.url);return n&&t.setAttribute("href",n),!0}return!1},t}();ii.lateLoadKey="WidgetHeaderComponent",ii.decorators=[{type:n.Component,args:[{selector:"nui-widget-header",template:'<div class="nui-widget__header">\n <div class="nui-widget__header__container"\n [class.nui-widget__header__container--collapsible]="collapsible"\n [class.nui-widget__header__container--collapsed]="collapsible && collapsed"\n [class.nui-widget__header__container--expanded]="collapsible && !collapsed"\n [@expandedState]="state">\n <div *ngIf="collapsed && collapsible"\n class="collapse-container"\n (click)="toggleCollapsed()">\n <span class="collapse-container__line"></span>\n </div>\n <div class="nui-widget__header__content">\n <div *ngIf="editMode"\n class="nui-widget__header__content-drag-icon nui-dashboard__widget--drag-handle">\n <nui-icon icon="drag" iconColor="gray"></nui-icon>\n </div>\n <div #widgetHeaderCustomElement\n class="nui-widget__header__content-custom-element">\n <ng-content></ng-content>\n </div>\n <div class="nui-widget__header__content-title-container nui-dashboard__widget--drag-handle"\n [class.nui-widget__header__content-title-with-additional-content]="withCustomElement || editMode">\n \x3c!-- text only header with no url defined --\x3e\n <div class="nui-text-widget nui-widget__header__content-title" [title]="title" *ngIf="!url || editMode">\n {{title}}\n </div>\n\n \x3c!-- link version of the header --\x3e\n <div *ngIf="url && !editMode">\n <a [href]="url" (click)="prepareLink($event)"\n (mouseenter)="prepareLink($event)"\n (mousedown)="$event.stopPropagation(); $event.preventDefault()"\n class="nui-text-widget nui-widget__header__content-title"\n [nuiTooltip]="linkTooltip">{{title}}</a>\n </div>\n\n <div *ngIf="subtitle"\n class="nui-text-hint nui-widget__header__content-help-hint" [title]="subtitle">\n {{subtitle}}\n </div>\n </div>\n <div class="nui-widget__header__content-actions">\n <a *ngIf="url && !editMode" nui-button\n displayStyle="action"\n [href]="url"\n (click)="prepareLink($event)"\n (mouseenter)="prepareLink($event)"\n icon="external-link"\n [nuiTooltip]="linkTooltip"\n (mousedown)="$event.stopPropagation(); $event.preventDefault()">\n </a>\n <button *ngIf="editable && editMode"\n class="nui-widget-header__action-edit"\n nui-button\n type="button"\n displayStyle="action"\n icon="edit"\n nuiTooltip="Edit widget"\n i18n-nuiTooltip\n (click)="onEditWidget()"></button>\n <button *ngIf="collapsible && !editMode"\n class="nui-widget-header__action-toggle-collapsed"\n nui-button\n type="button"\n displayStyle="action"\n nuiTooltip="Collapse header"\n icon="double-caret-up"\n (click)="toggleCollapsed()"></button>\n <nui-menu *ngIf="!hideMenu && !editMode"\n class="nui-widget__header__content-actions__menu"\n icon="menu"\n displayStyle="action"\n [appendToBody]="true">\n <nui-menu-action *ngIf="reloadable" (actionDone)="onReloadData()">\n <nui-icon icon="reload"></nui-icon>\n <span i18n>Reload data</span>\n </nui-menu-action>\n </nui-menu>\n \x3c!--TODO: After NUI-3431 should be changed to regular menu instead of popup--\x3e\n <nui-popup class="nui-widget-header__action-remove" [appendToBody]="true" *ngIf="removable && editMode">\n <span nuiTooltip="Remove widget" i18n-nuiTooltip>\n <button nui-button\n nuiPopupToggle\n type="button"\n icon="remove"\n iconColor="red"\n displayStyle="action"\n i18n>\n </button>\n </span>\n <div popupAreaContent class="nui-menu">\n <nui-menu-action type="destructive" (actionDone)="removeWidget()" i18n>Remove Widget</nui-menu-action>\n </div>\n </nui-popup>\n </div>\n </div>\n </div>\n <div *ngIf="collapsible" class="collapse-spacer"></div>\n</div>\n',animations:[y.trigger("expandedState",[y.state("expanded",y.style({height:"*"})),y.state("collapsed",y.style({height:"11px"})),y.transition("expanded <=> collapsed",[y.animate("350ms ease-in-out")])])],styles:[".nui-widget__header{display:flex;position:relative}.nui-widget__header .collapse-spacer{margin-bottom:15px}.nui-widget__header__container{z-index:500;width:100%}.nui-widget__header__container--collapsible{width:100%}.nui-widget__header__container--collapsed .nui-widget__header__content{opacity:0;visibility:hidden}.nui-widget__header__container .collapse-container{width:100%;display:flex;justify-content:center;cursor:pointer}.nui-widget__header__container .collapse-container__line{width:16px;height:1px;background:var(--nui-color-line-active,#0079aa);margin:5px 0;cursor:pointer}.nui-widget__header__container .nui-widget__header__content{align-items:flex-start;display:flex;opacity:1}.nui-widget__header__container .nui-widget__header__content-drag-icon{align-items:center;cursor:move;display:flex;height:30px;justify-content:center;margin:5px;width:30px}.nui-widget__header__container .nui-widget__header__content-title{display:block;max-width:100%;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-widget__header__container .nui-widget__header__content-title-container{flex:1;min-width:0;padding:10px 0 5px 10px}.nui-widget__header__container .nui-widget__header__content-title-with-additional-content{padding-left:0}.nui-widget__header__container .nui-widget__header__content-help-hint{max-width:100%;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-widget__header__container .nui-widget__header__content-actions{display:flex;padding:5px 10px 0 5px}"]}]}],ii.ctorParameters=function(){return[{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:an},{type:n.ChangeDetectorRef},{type:xo,decorators:[{type:n.Optional}]},{type:void 0,decorators:[{type:n.Inject,args:[Zt]},{type:n.Optional}]}]},ii.propDecorators={componentId:[{type:n.Input}],editMode:[{type:n.Input}],editable:[{type:n.Input}],removable:[{type:n.Input}],collapsible:[{type:n.Input}],reloadable:[{type:n.Input}],title:[{type:n.Input}],subtitle:[{type:n.Input}],hideMenu:[{type:n.Input}],url:[{type:n.Input}],collapsed:[{type:n.Input}],hostClass:[{type:n.HostBinding,args:["class.nui-widget-header"]}],widgetHeaderCustomElement:[{type:n.ViewChild,args:["widgetHeaderCustomElement"]}]};var ri=function(){function e(e,t){this.widgetConfigurationService=e,this.widgetTypesService=t,this.widgetChange=new n.EventEmitter,this.rootNode=Ze}return e.prototype.ngOnChanges=function(e){var t,n;if(e.widget){var o=this.widget.type;if((e.widget.previousValue&&e.widget.previousValue.type)!==o){var i=this.widgetTypesService.getWidgetType(o,this.widget.version);this.rootNode=(null===(n=null===(t=null==i?void 0:i.paths)||void 0===t?void 0:t.widget)||void 0===n?void 0:n.root)||Ze}this.widgetConfigurationService.updateWidget(this.widget)}},e.prototype.onPizzagnaChange=function(e){this.widgetChange.emit(Object.assign(Object.assign({},this.widget),{pizzagna:e}))},e}();ri.decorators=[{type:n.Component,args:[{selector:"nui-widget",template:'<nui-pizzagna [rootNode]="rootNode" [pizzagna]="widget.pizzagna" (pizzagnaChange)="onPizzagnaChange($event)"></nui-pizzagna>\n',providers:[To],host:{class:"nui-widget"},styles:[""]}]}],ri.ctorParameters=function(){return[{type:To},{type:_o}]},ri.propDecorators={widget:[{type:n.Input}],widgetChange:[{type:n.Output}]};var ai=function(){function t(e,t,i){var r=this;this.pizzagnaService=e,this.logger=t,this.eventBus=i,this.rootNode=Ze,this.pizzagnaChange=new n.EventEmitter,this.output=new n.EventEmitter,i.getStream(rt).subscribe((function(e){var t=o.immutableSet(r.pizzagna,e.payload.path,e.payload.value);r._pizzagnaBuffer=t,r.pizzagnaChange.emit(t)}))}return Object.defineProperty(t.prototype,"pizzagna",{get:function(){return this._pizzagnaBuffer||this._pizzagna},set:function(e){this._pizzagna=e,this._pizzagnaBuffer=null},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(e){if(e.pizzagna){var t=e.pizzagna.previousValue;this.pizzagnaService.updatePizzagna(this.pizzagna),this.pizza=this.mergePizzagnaIntoPizza(this.pizza,t,this.pizzagna),this.pizza&&!this.pizza[this.rootNode]&&this.logger.warn("Pizzagna doesn't contain root node '"+this.rootNode+"'. Pizzagna = ",this.pizzagna),this.pizzagnaService.updateComponents(this.pizza)}},t.prototype.onOutput=function(e){this.output.emit(e)},t.prototype.mergePizzagnaIntoPizza=function(t,n,o){return sn(t,this.getLayerChanges(n,o,e.PizzagnaLayer.Structure),this.getLayerChanges(n,o,e.PizzagnaLayer.Configuration),this.getLayerChanges(n,o,e.PizzagnaLayer.Data))},t.prototype.getLayerChanges=function(e,t,n){return{previousValue:this.getLayerSafe(e,n),currentValue:this.getLayerSafe(t,n)}},t.prototype.getLayerSafe=function(e,t){return e&&e[t]},t}();ai.decorators=[{type:n.Component,args:[{selector:"nui-pizzagna",template:'<ng-container *ngIf="pizza && pizza[rootNode]">\n <ng-container nuiComponentPortal\n [componentId]="rootNode"\n [componentType]="pizza[rootNode]?.componentType"\n [properties]="pizza[rootNode]?.properties"\n [providers]="pizza[rootNode]?.providers"\n [outputs]="outputs"\n (output)="onOutput($event)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</ng-container>\n',providers:[an,rn,{provide:Mt,useClass:o.EventBus}]}]}],ai.ctorParameters=function(){return[{type:an},{type:o.LoggerService},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},ai.propDecorators={rootNode:[{type:n.Input}],pizzagna:[{type:n.Input}],outputs:[{type:n.Input}],pizzagnaChange:[{type:n.Output}],output:[{type:n.Output}]};var si=function(){function e(e){this.logger=e,this.components={}}return e.prototype.registerByLateLoadKey=function(e){this.registerComponentType(e.lateLoadKey,e)},e.prototype.registerComponentType=function(e,t){this.components[e]=t},e.prototype.getComponentType=function(e){var t=this.components[e];return t||this.logger.warn("Component '"+e+"' not defined. Available components: "+JSON.stringify(Object.keys(this.components))),t},e}();si.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new si(X.ɵɵinject(J.LoggerService))},token:si,providedIn:"root"}),si.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],si.ctorParameters=function(){return[{type:o.LoggerService}]};var li=function(){function e(e,t){this.componentRegistry=e,this.logger=t}return e.prototype.createComponentPortal=function(e,t){var n;return(n="string"==typeof e?this.componentRegistry.getComponentType(e):e)||(this.logger.error("Cannot Find Component Type "+e),n=Lo),new k.ComponentPortal(n,null,t)},e.prototype.createInjector=function(e){var t=e.providers||[];return n.Injector.create({providers:t,parent:e.injector,name:"Component Injector"})},e}();li.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new li(X.ɵɵinject(si),X.ɵɵinject(J.LoggerService))},token:li,providedIn:"root"}),li.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],li.ctorParameters=function(){return[{type:si},{type:o.LoggerService}]};var di=function(){function e(e,t,o,i,r){this.injector=e,this.logger=t,this.portalService=o,this.renderer=i,this.providerRegistry=r,this.output=new n.EventEmitter,this.propertiesChanges=new d.ReplaySubject,this.providerInstances={},this.destroy$=new d.Subject}return e.prototype.ngOnInit=function(){this.logger.debug("Portal created:",this.componentId),this.recreatePortal()},e.prototype.ngAfterViewInit=function(){var e=this;Object.keys(this.providerInstances).forEach((function(t){var n=e.providerInstances[t];n.ngAfterViewInit&&n.ngAfterViewInit()}))},e.prototype.ngOnChanges=function(e){var t=!1,n=e.providers;n&&!n.isFirstChange()&&(this.checkForProviderChanges(n)?(this.logger.debug("Portal recreated (provider change):",this.componentId),this.recreatePortal(),t=!0):this.updateProviderConfigurations(n)),!e.componentType||e.componentType.isFirstChange()||t||(this.logger.debug("Portal recreated (component change):",this.componentId),this.recreatePortal()),e.properties&&this.propertiesChanges.next(e.properties)},e.prototype.ngOnDestroy=function(){this.logger.debug("Portal destroyed:",this.componentId),this.destroyProviders(),this.destroy$.next(),this.destroy$.complete()},e.prototype.attached=function(e){var t,n,o=this;this.component=e.instance,this.renderer.listen(e.location.nativeElement,"click",(function(e){(e.ctrlKey||e.metaKey)&&e.shiftKey&&0===e.button&&(console.log("==================== PIZZAGNA DUMP ========================="),console.log("componentId:",o.componentId),console.log("component:",o.component),console.log("componentType:",o.componentType),console.log("properties:",o.properties),console.log("providers:",o.providers),console.log("providerInstances:",o.providerInstances),console.log("============================================================"))}));try{for(var i=Re(Object.keys(this.providerInstances)),r=i.next();!r.done;r=i.next()){var a=r.value,s=this.providerInstances[a];s.setComponent&&s.setComponent(this.component,this.componentId),s.setProviders&&s.setProviders(this.providerInstances,this.componentId)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.subscribeToOutputs(),this.changesSubscription=this.propertiesChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){return o.applyPropertiesChange(e)}))},e.prototype.recreatePortal=function(){var e,t;this.changesSubscription&&(this.changesSubscription.unsubscribe(),this.changesSubscription=void 0,this.propertiesChanges=new d.ReplaySubject);var o=this.injector;if(this.destroyProviders(),this.providers&&(o=this.updateProviders(o)),this.portal=this.portalService.createComponentPortal(this.componentType,o),this.properties)try{for(var i=Re(Object.keys(this.properties)),r=i.next();!r.done;r=i.next()){r.value;this.propertiesChanges.next(new n.SimpleChange(void 0,this.properties,!0))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.updateProviders=function(e){var t,n,o=this,i=Object.keys(this.providers),r=i.reduce((function(e,t){return o.providers[t].providerId&&(e[t]=o.providerRegistry.getProvider(o.providers[t].providerId)),e}),{}),a=this.portalService.createInjector({injector:e,providers:ye.default(r)});this.providerInstances=i.reduce((function(e,t){var n=r[t],i=o.providers[t];if(n){var s=a.get(n.provide,null,null),l=te.default(s)?s.find((function(e){return e instanceof n.useClass})):s;if(!l)throw new Error("Provider '"+t+"' does not exist.");l.updateConfiguration&&i.properties&&l.updateConfiguration(Object.assign({providerKey:t},i.properties||{})),l.providerKey=t,e[t]=l}else i.providerId&&o.logger.error("There's no registered provider for id",t);return e}),this.providerInstances);try{for(var s=Re(Object.keys(this.providerInstances)),l=s.next();!l.done;l=s.next()){var d=l.value,c=this.providerInstances[d];c.ngOnInit&&c.ngOnInit()}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},e.prototype.updateProviderConfigurations=function(e){var t,n;try{for(var o=Re(Object.keys(this.providers)),i=o.next();!i.done;i=o.next()){var r=i.value;if(!this.providers[r].providerId)return;var a=this.providerInstances[r];if(!a)throw new Error("Provider '"+r+"' does not exist.");var s=e.previousValue[r],l=e.currentValue[r],d=s&&s.properties,c=l&&l.properties;d!==c&&a.updateConfiguration&&a.updateConfiguration(Object.assign({providerKey:r},c))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.subscribeToOutputs=function(){var e,t,o=this;if(this.outputs){var i=function(e){r.component[e].pipe(v.takeUntil(r.destroy$)).subscribe((function(t){o.output.emit({id:e,payload:t})}))},r=this;try{for(var a=Re(this.outputs.filter((function(e){return o.component[e]instanceof n.EventEmitter}))),s=a.next();!s.done;s=a.next()){i(s.value)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}}},e.prototype.checkForProviderChanges=function(e){var t=e.previousValue?Object.keys(e.previousValue):[],n=e.currentValue?Object.keys(e.currentValue):[];if(t.length!==n.length||be.default(t,n).length>0)return!0;var o=Object.keys(e.previousValue).map((function(t){return e.previousValue[t].providerId})),i=Object.keys(e.currentValue).map((function(t){return e.currentValue[t].providerId}));return be.default(o,i).length>0},e.prototype.destroyProviders=function(){var e,t;if(this.providerInstances)try{for(var n=Re(Object.keys(this.providerInstances)),o=n.next();!o.done;o=n.next()){var i=o.value,r=this.providerInstances[i];r.ngOnDestroy&&r.ngOnDestroy(),delete this.providerInstances[i]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.applyPropertiesChange=function(e){var t,o,i=e.currentValue;if(i){i=Object.assign(Object.assign({},i),{componentId:this.componentId});var r={},a=!1;try{for(var s=Re(Object.keys(i)),l=s.next();!l.done;l=s.next()){var d=l.value,c=this.component[d];i[d]!==c&&(a=!0,this.component[d]=i[d],this.component.ngOnChanges&&(r[d]=new n.SimpleChange(c,i[d],e.isFirstChange())))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}if(a){this.component.ngOnChanges&&this.component.ngOnChanges(r);var u=this.component.changeDetector;u?u.markForCheck():this.logger.warn("Property 'changeDetector' is missing on component '"+this.componentType+"', so dynamic refresh of given component might not work.")}}},e}();di.decorators=[{type:n.Directive,args:[{selector:"[nuiComponentPortal]",exportAs:"nuiComponentPortal"}]}],di.ctorParameters=function(){return[{type:n.Injector},{type:o.LoggerService},{type:li},{type:n.Renderer2},{type:Do}]},di.propDecorators={componentId:[{type:n.Input}],componentType:[{type:n.Input}],properties:[{type:n.Input}],providers:[{type:n.Input}],outputs:[{type:n.Input}],output:[{type:n.Output}]};var ci=function(){};ci.decorators=[{type:n.NgModule,args:[{imports:[k.PortalModule,Ke],declarations:[ai,di],exports:[k.PortalModule,ai,di]}]}];var ui=new Map([["aliceblue","#f0f8ff"],["antiquewhite","#faebd7"],["aqua","#00ffff"],["aquamarine","#7fffd4"],["azure","#f0ffff"],["beige","#f5f5dc"],["bisque","#ffe4c4"],["black","#000000"],["blanchedalmond","#ffebcd"],["blue","#0000ff"],["blueviolet","#8a2be2"],["brown","#a52a2a"],["burlywood","#deb887"],["cadetblue","#5f9ea0"],["chartreuse","#7fff00"],["chocolate","#d2691e"],["coral","#ff7f50"],["cornflowerblue","#6495ed"],["cornsilk","#fff8dc"],["crimson","#dc143c"],["cyan","#00ffff"],["darkblue","#00008b"],["darkcyan","#008b8b"],["darkgoldenrod","#b8860b"],["darkgray","#a9a9a9"],["darkgreen","#006400"],["darkkhaki","#bdb76b"],["darkmagenta","#8b008b"],["darkolivegreen","#556b2f"],["darkorange","#ff8c00"],["darkorchid","#9932cc"],["darkred","#8b0000"],["darksalmon","#e9967a"],["darkseagreen","#8fbc8f"],["darkslateblue","#483d8b"],["darkslategray","#2f4f4f"],["darkturquoise","#00ced1"],["darkviolet","#9400d3"],["deeppink","#ff1493"],["deepskyblue","#00bfff"],["dimgray","#696969"],["dodgerblue","#1e90ff"],["firebrick","#b22222"],["floralwhite","#fffaf0"],["forestgreen","#228b22"],["fuchsia","#ff00ff"],["gainsboro","#dcdcdc"],["ghostwhite","#f8f8ff"],["gold","#ffd700"],["goldenrod","#daa520"],["gray","#808080"],["green","#008000"],["greenyellow","#adff2f"],["honeydew","#f0fff0"],["hotpink","#ff69b4"],["indianred ","#cd5c5c"],["indigo","#4b0082"],["ivory","#fffff0"],["khaki","#f0e68c"],["lavender","#e6e6fa"],["lavenderblush","#fff0f5"],["lawngreen","#7cfc00"],["lemonchiffon","#fffacd"],["lightblue","#add8e6"],["lightcoral","#f08080"],["lightcyan","#e0ffff"],["lightgoldenrodyellow","#fafad2"],["lightgrey","#d3d3d3"],["lightgreen","#90ee90"],["lightpink","#ffb6c1"],["lightsalmon","#ffa07a"],["lightseagreen","#20b2aa"],["lightskyblue","#87cefa"],["lightslategray","#778899"],["lightsteelblue","#b0c4de"],["lightyellow","#ffffe0"],["lime","#00ff00"],["limegreen","#32cd32"],["linen","#faf0e6"],["magenta","#ff00ff"],["maroon","#800000"],["mediumaquamarine","#66cdaa"],["mediumblue","#0000cd"],["mediumorchid","#ba55d3"],["mediumpurple","#9370d8"],["mediumseagreen","#3cb371"],["mediumslateblue","#7b68ee"],["mediumspringgreen","#00fa9a"],["mediumturquoise","#48d1cc"],["mediumvioletred","#c71585"],["midnightblue","#191970"],["mintcream","#f5fffa"],["mistyrose","#ffe4e1"],["moccasin","#ffe4b5"],["navajowhite","#ffdead"],["navy","#000080"],["oldlace","#fdf5e6"],["olive","#808000"],["olivedrab","#6b8e23"],["orange","#ffa500"],["orangered","#ff4500"],["orchid","#da70d6"],["palegoldenrod","#eee8aa"],["palegreen","#98fb98"],["paleturquoise","#afeeee"],["palevioletred","#d87093"],["papayawhip","#ffefd5"],["peachpuff","#ffdab9"],["peru","#cd853f"],["pink","#ffc0cb"],["plum","#dda0dd"],["powderblue","#b0e0e6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#ff0000"],["rosybrown","#bc8f8f"],["royalblue","#4169e1"],["saddlebrown","#8b4513"],["salmon","#fa8072"],["sandybrown","#f4a460"],["seagreen","#2e8b57"],["seashell","#fff5ee"],["sienna","#a0522d"],["silver","#c0c0c0"],["skyblue","#87ceeb"],["slateblue","#6a5acd"],["slategray","#708090"],["snow","#fffafa"],["springgreen","#00ff7f"],["steelblue","#4682b4"],["tan","#d2b48c"],["teal","#008080"],["thistle","#d8bfd8"],["tomato","#ff6347"],["turquoise","#40e0d0"],["violet","#ee82ee"],["wheat","#f5deb3"],["white","#ffffff"],["whitesmoke","#f5f5f5"],["yellow","#ffff00"],["yellowgreen","#9acd32"]]),pi=function(){function e(){}return e.prototype.RGBToHexRGBToHex=function(e){var t=e.indexOf(",")>-1?",":" ",n=e.substr(4).split(")")[0].split(t),o=(+n[0]).toString(16),i=(+n[1]).toString(16),r=(+n[2]).toString(16);return 1===o.length&&(o="0"+o),1===i.length&&(i="0"+i),1===r.length&&(r="0"+r),"#"+o+i+r},e.prototype.isHEX=function(e){return/^#[0-9A-F]{6}$/i.test(e)||/^#([0-9A-F]{3}){1,2}$/i.test(e)},e.prototype.colorKeywordsToHex=function(e){var t=ui.get(e);return ee.default(t)?"":t},e}();pi.decorators=[{type:n.Injectable}];var hi=function(){function e(e,t,n){var i=this;this.changeDetection=e,this.colorService=t,this.cdkOverlay=n,this.defaultColor="var(--nui-color-bg-secondary)",this.overlayUtilities=new o.OverlayUtilitiesService,this.destroy$=new d.Subject,this.setStyles=function(e){return{"background-color":e||i.defaultColor}}}return e.prototype.ngOnChanges=function(e){e.colors&&(this.colors=e.colors.currentValue),e.colorPalette&&(this.colorPalette=e.colorPalette.currentValue)},e.prototype.ngAfterViewInit=function(){var e,t=this;this.value&&(null===(e=this.select)||void 0===e||e.writeValue(this.value),this.isBlackTick=this.determineBlackTick(this.value.toString())),this.palette=this.colorPalette||this.colors.map((function(e){return{color:e}})),this.initOverlayUtilities(),this.select.valueSelected.pipe(v.tap((function(e){return t.writeValue(e)})),v.tap((function(e){return t.onChange(e)})),v.takeUntil(this.destroy$)).subscribe((function(e){e&&(t.isBlackTick=t.determineBlackTick(e.toString()))}));var n=o.getOverlayPositions(),i=this.cdkOverlay.position().flexibleConnectedTo(this.select.elRef.nativeElement).withPush(!1).withViewportMargin(0).withPositions([n["bottom-right"],n["bottom-left"],n["top-right"],n["top-left"]]);this.overlayConfig={maxWidth:this.cols?30*this.cols+20+"px":"260px",positionStrategy:i}},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.onChange=function(e){},e.prototype._onTouched=function(){},e.prototype.writeValue=function(e){var t;this.value=e,null===(t=this.select)||void 0===t||t.writeValue(e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.determineBlackTick=function(e){var t="#fff";return t=this.colorService.isHEX(e)?e:a.getColorValueByName(e)||this.colorService.RGBToHexRGBToHex(e)||this.colorService.colorKeywordsToHex(e),"#fff"===this.getContrastOnBgColor(t)},e.prototype.initOverlayUtilities=function(){var e=this,t=this.select.dropdown;this.selectResizeObserver=this.overlayUtilities.setPopupComponent(this.select.dropdown).getResizeObserver({updateSize:!1}),t.show$.pipe(v.takeUntil(this.destroy$)).subscribe((function(){e.overlayUtilities.syncWidth(),e.selectResizeObserver.observe(e.select.elRef.nativeElement)})),t.hide$.pipe(v.takeUntil(this.destroy$)).subscribe((function(){e.selectResizeObserver.unobserve(e.select.elRef.nativeElement)}))},e.prototype.getContrastOnBgColor=function(e){return e?parseInt(e.replace("#",""),16)>8388607.5?"#fff":"#000":""},e}();hi.decorators=[{type:n.Component,args:[{selector:"nui-color-picker",template:'<nui-select-v2 class="color-picker-select"\n [overlayConfig]="overlayConfig"\n [syncWidth]=\'false\'\n [displayValueTemplate]="colorSelectTemplate">\n <div class="color-picker-container">\n <div class="d-inline-flex flex-wrap box" *ngFor="let item of palette">\n <nui-select-v2-option [value]="item?.color"\n [displayValueContext]="item"\n class="w-100 h-100 reset-box-sizes"\n #option>\n <div class="color-picker-option" [attr.title]="item?.label" [class.color-picker-option--selected]="option?.selected">\n <div class="color-picker-option__color-box" [ngStyle]="setStyles(item?.color)">\n <div class="color-picker-option__glyph"\n [class.black-tick]="isBlackTick || item?.color === defaultColor"\n *ngIf="option?.selected"\n ></div>\n </div>\n </div>\n </nui-select-v2-option>\n </div>\n </div>\n</nui-select-v2>\n\n<ng-template #colorSelectTemplate let-item let-open="open">\n <div class="color-picker-input">\n <div class="color-picker-input__box" [attr.title]="item?.label">\n <div class="color-picker-input__color-box" [ngStyle]="setStyles(item?.color)"></div>\n </div>\n <div class="color-picker-input__toggle">\n <nui-icon [style.transform]="open ? \'rotate(180deg)\' : \'\'" icon="caret-down"></nui-icon>\n </div>\n </div>\n</ng-template>',changeDetection:n.ChangeDetectionStrategy.OnPush,providers:[{provide:o.NuiFormFieldControl,useExisting:n.forwardRef((function(){return hi})),multi:!0},{provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return hi})),multi:!0},pi],styles:['.box{width:30px;height:30px}.color-picker-container{padding:5px 10px}.color-picker-select{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:unset;cursor:pointer}.color-picker-input{display:flex}.color-picker-input__box{display:flex;align-items:center;flex-grow:1}.color-picker-input__color-box{width:16px;height:16px;border-radius:3px;border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9);width:17px;height:17px;flex-grow:1;margin:0 10px}.color-picker-input__toggle{border-left:1px solid;border-left-color:var(--nui-color-line-default,#d9d9d9);width:30px;height:30px}.color-picker-input__toggle,.color-picker-option{display:flex;justify-content:center;align-items:center}.color-picker-option{height:100%}.color-picker-option__color-box{width:16px;height:16px;border-radius:3px;border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9);padding:1px 0 0 1px}.color-picker-option--selected{background-color:var(--nui-color-selected,rgba(0,196,210,.1))}.color-picker-option--selected:focus{outline:none}.color-picker-option__glyph{width:100%;height:100%;background-size:12px;background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjAgMjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjAgMjA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS54dWktY2hlY2tib3gtZ2x5cGh7ZmlsbDpub25lO3N0cm9rZTojRkZGRkZGO3N0cm9rZS13aWR0aDozO3N0cm9rZS1taXRlcmxpbWl0OjEwO3N0cm9rZS1saW5lY2FwOnJvdW5kO30KPC9zdHlsZT4KPHBvbHlsaW5lIGNsYXNzPSJ4dWktY2hlY2tib3gtZ2x5cGgiIHBvaW50cz0iMTcsNCA4LDE1IDMsOSAiLz4KPC9zdmc+");background-repeat:no-repeat}.color-picker-option__glyph.black-tick{filter:invert(1) grayscale(1) contrast(100)}']}]}],hi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:pi},{type:F.Overlay}]},hi.propDecorators={colors:[{type:n.Input}],colorPalette:[{type:n.Input}],cols:[{type:n.Input}],select:[{type:n.ViewChild,args:[n.forwardRef((function(){return o.SelectV2Component}))]}]};var gi=function(){function e(e,t){this.widgetTypesService=e,this.changeDetector=t,this.result=new n.EventEmitter,this.formPortalAttached=new n.EventEmitter,this.submitError=new d.Subject,this.destroy$=new d.Subject}return e.prototype.ngOnInit=function(){this.previewWidget||(this.previewWidget={id:null,type:"previewPlaceholder",pizzagna:this.widgetTypesService.getWidgetType("previewPlaceholder").widget})},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.handleSubmitError=function(){this.submitError.next()},e.prototype.onFormPortalAttached=function(e){this.formPortalAttached.emit(e)},e.prototype.updateWidget=function(e){this.previewWidget=e,this.changeDetector.markForCheck()},e.prototype.formCancel=function(){this.result.next(null)},e.prototype.formSubmit=function(){this.result.next(this.previewWidget)},e.prototype.onPizzagnaChange=function(e){this.previewWidget&&(this.previewWidget.pizzagna=e)},e}();gi.lateLoadKey="ConfiguratorComponent",gi.decorators=[{type:n.Component,args:[{selector:"nui-configurator",template:'<div class="nui-configurator__backdrop"></div>\n<div class="nui-configurator__content">\n <nui-panel orientation="right"\n paneSize="30vw"\n paneMinSize="20vw"\n paneMaxSize="80vw"\n isResizable="true"\n class="h-100"\n [headerPadding]="false"\n [sidePaneBodyPadding]="false">\n <div class="nui-configurator__preview d-flex align-items-center justify-content-center">\n <div class="nui-configurator__preview-area">\n <nui-preview-overlay></nui-preview-overlay>\n <nui-pizzagna *ngIf="previewWidget?.pizzagna"\n #previewPizzagnaComponent\n class="flex-grow-1 w-100"\n [rootNode]="previewWidget | nuiPizzagnaRoot:\'widget\'"\n [pizzagna]="previewWidget?.pizzagna"\n (pizzagnaChange)="onPizzagnaChange($event)">\n </nui-pizzagna>\n </div>\n </div>\n <div nuiPanelEmbeddedBody class="nui-configurator__body">\n <ng-container [cdkPortalOutlet]="formPortal" (attached)="onFormPortalAttached($event)"></ng-container>\n </div>\n </nui-panel>\n</div>\n',providers:[io,{provide:o.OVERLAY_CONTAINER,useValue:".nui-dashwiz-step--active .configurator-scrollable"}],host:{class:"nui-configurator"},styles:[".nui-configurator__backdrop{background-color:var(--nui-color-overlay-modal,rgba(17,17,17,.5));opacity:.5;filter:alpha(opacity=50)}.nui-configurator__backdrop,.nui-configurator__content{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040}.nui-configurator__heading{width:100%;display:flex;justify-content:space-between;align-items:center;padding:15px;border-bottom:1px solid #d9d9d9}.nui-configurator__body{overflow-anchor:none;height:100vh}.nui-configurator__preview{height:100vh}.nui-configurator__preview-area{display:flex;width:80%;position:relative;background-color:var(--nui-color-bg-content_popover,#fff);border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9);margin:auto;min-height:40vh;max-height:80vh;overflow:hidden}"]}]}],gi.ctorParameters=function(){return[{type:_o},{type:n.ChangeDetectorRef}]},gi.propDecorators={formPortal:[{type:n.Input}],previewWidget:[{type:n.Input}],result:[{type:n.Output}],formPortalAttached:[{type:n.Output}],previewPizzagnaComponent:[{type:n.ViewChild,args:["previewPizzagnaComponent",{static:!0}]}]};var mi=function(){};mi.decorators=[{type:n.Component,args:[{selector:"nui-drop-area",template:"",styles:[":host{display:flex;align-items:center;justify-content:center;border:3px solid;border-color:var(--nui-color-selected-contrast,#00c4d2);background-color:var(--nui-color-busy-default,rgba(0,196,210,.2))}"]}]}];var fi=function(e){function t(t,n,o,i,r){var a=e.call(this,t,n,o)||this;return a.formDirective=i,a.eventBus=r,a.elementClass="",a}return ke(t,e),t.prototype.ngOnInit=function(){this.form=this.formDirective.form},t.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t)},t.prototype.onEvent=function(e,t){"formReady"===t.id&&this.addFormGroup(e,t.payload)},t.prototype.addFormGroup=function(e,t){this.form.addControl(e,t)},t.prototype.getNodes=function(){return this.nodes},t}(cn);fi.lateLoadKey="FormStackComponent",fi.decorators=[{type:n.Component,args:[{selector:"nui-form-stack",template:'<ng-container *ngFor="let node of nodeConfigs; trackBy: trackByFn">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="node.id"\n [componentType]="node.componentType"\n [providers]="node.providers"\n [properties]="node.properties"\n [outputs]="[\'formReady\']"\n (output)="onEvent(node.id, $event)">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n</ng-container>\n',viewProviders:[{provide:r.ControlContainer,useExisting:r.FormGroupDirective}]}]}],fi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService},{type:r.FormGroupDirective},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},fi.propDecorators={nodes:[{type:n.Input}],elementClass:[{type:n.HostBinding,args:["class"]}]};var vi=function(){function e(e,t,o){this.changeDetector=e,this.formBuilder=t,this.logger=o,this.formReady=new n.EventEmitter}return e.prototype.ngOnChanges=function(e){var t,n,o=this;this.form||this.initForm(),this.contentFormatterProperties?Object.keys(this.contentFormatterProperties).forEach((function(e){var t,n;null===(n=null===(t=o.form)||void 0===t?void 0:t.get(e))||void 0===n||n.setValue(o.contentFormatterProperties[e])})):null===(n=null===(t=this.form)||void 0===t?void 0:t.get("currentMetric"))||void 0===n||n.patchValue(this.properMetric)},e.prototype.ngOnInit=function(){this.initForm()},e.prototype.initForm=function(){this.form=this.formBuilder.group({currentMetric:[this.properMetric,r.Validators.required]}),this.addCustomFormControls(this.form),this.formReady.emit(this.form)},Object.defineProperty(e.prototype,"currentMetric",{get:function(){return this.form.get("currentMetric")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properMetric",{get:function(){var e,t,n,o,i=null===(e=this.contentFormatterProperties)||void 0===e?void 0:e.currentMetric;return(null===(t=this.dsOutput)||void 0===t?void 0:t.result.find((function(e){return e.id===i})))?i:null===(o=null===(n=this.dsOutput)||void 0===n?void 0:n.result[0])||void 0===o?void 0:o.id},enumerable:!1,configurable:!0}),e.prototype.addCustomFormControls=function(e){},e}();vi.decorators=[{type:n.Injectable}],vi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService}]},vi.propDecorators={contentFormatterProperties:[{type:n.Input}],dsOutput:[{type:n.Input}],formReady:[{type:n.Output}]};var yi=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o)||this;return r.pizzagnaService=i,r}return ke(t,e),t}(vi);yi.lateLoadKey="DonutContentPercentageConfigurationComponent",yi.decorators=[{type:n.Component,args:[{selector:"nui-donut-content-configurator",template:'\n<div [formGroup]="form">\n <div class="mt-4">\n <nui-form-field caption="Metrics"\n i18n-caption\n class="mb-3"\n [control]="currentMetric">\n <nui-select-v2 formControlName="currentMetric">\n <nui-select-v2-option *ngFor="let itemValue of dsOutput?.result"\n [value]="itemValue?.id">\n {{itemValue?.name}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n</div>\n'}]}],yi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService},{type:an}]};var bi=function(){function e(e){this.changeDetector=e,this.destroy$=new d.Subject}return e.prototype.ngOnChanges=function(e){var t,n=this;e.data&&(this.sum=Ce.default(this.data,(function(e){return e.data[0]}))),e.properties&&(this.currentMetricData=(null===(t=this.data.find((function(e){var t;return e.id===(null===(t=n.properties)||void 0===t?void 0:t.currentMetric)})))||void 0===t?void 0:t.data[0])||this.data[0].data[0]),this.getProperContentValue()},e.prototype.ngOnInit=function(){var e=this;this.chartAssist.chartAssistSubject.pipe(v.tap((function(t){return e.emphasizedSeriesData=e.data.find((function(e){return e.id===t.payload.seriesId}))})),v.tap((function(){return e.getProperContentValue()})),v.takeUntil(this.destroy$)).subscribe()},e.prototype.getProperSeriesData=function(){var e;return this.emphasizedSeriesData?null===(e=this.emphasizedSeriesData)||void 0===e?void 0:e.data[0]:this.currentMetricData},e.prototype.getProperContentValue=function(){this.chartContent=(this.getProperSeriesData()/this.sum*100).toFixed(2)+"%"},e}();bi.lateLoadKey="DonutContentPercentageFormatterComponent",bi.decorators=[{type:n.Component,args:[{template:'<ng-container>\n <div class="nui-text-page">\n <div class="nui-text-page">\n {{ chartContent }}\n </div>\n </div>\n </ng-container>'}]}],bi.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},bi.propDecorators={data:[{type:n.Input}],chartAssist:[{type:n.Input}],properties:[{type:n.Input}]};var Ci=function(){function e(e,t){this.changeDetector=e,this.conversionThreshold=Ne,this.unitConversionPipe=new $e(t)}return e.prototype.ngOnChanges=function(){this.sum=Ce.default(this.data,(function(e){return e.data[0]})),this.convertedValue=this.unitConversionPipe.transform(this.sum)},e}();Ci.lateLoadKey="DonutContentRawFormatterComponent",Ci.decorators=[{type:n.Component,args:[{template:'<ng-container>\n <nui-icon *ngIf="config?.chartDonutContentIcon"\n [icon]="config?.chartDonutContentIcon"\n iconSize="medium"></nui-icon>\n <div class="nui-text-page">\n <span *ngIf="sum < conversionThreshold; else convertedValueDisplay">{{sum | number:\'1.0-3\'}}</span>\n <ng-template #convertedValueDisplay>{{convertedValue}}</ng-template>\n </div>\n <div *ngIf="config?.chartDonutContentLabel" class="nui-text-secondary">\n {{config?.chartDonutContentLabel}}\n </div>\n </ng-container>'}]}],Ci.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:o.UnitConversionService}]},Ci.propDecorators={data:[{type:n.Input}],config:[{type:n.Input}]};var Si=function(){function e(e){this.changeDetector=e}return e.prototype.ngOnChanges=function(){this.sum=Ce.default(this.data,(function(e){return e.data[0]}))},e}();Si.lateLoadKey="DonutContentSumFormatterComponent",Si.decorators=[{type:n.Component,args:[{template:'<ng-container><div class="nui-text-page">{{ this.sum }}</div></ng-container>'}]}],Si.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Si.propDecorators={data:[{type:n.Input}]};var wi=function(){function e(e,t){this.changeDetector=e,this.iconService=t,this.isValid=!1,this.iconFound=!0}return e.prototype.ngOnChanges=function(){var e,t;this.isValid=!!(null===(e=this.data)||void 0===e?void 0:e.value),this.iconFound=!!this.iconService.getIconData(null===(t=this.data)||void 0===t?void 0:t.value)},e}();wi.lateLoadKey="IconFormatterComponent",wi.decorators=[{type:n.Component,args:[{template:'\n <div *ngIf="isValid" class="d-flex align-items-center justify-content-center">\n <nui-icon *ngIf="iconFound; else iconNotFound" [icon]="data?.value"></nui-icon>\n </div>\n <ng-template #iconNotFound>\n <nui-icon title="Unknown icon" i18n-title iconColor="disabled-gray" icon="help"></nui-icon>\n </ng-template>\n '}]}],wi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:o.IconService}]},wi.propDecorators={data:[{type:n.Input}]};var Ii=function(){function e(e){this.changeDetector=e,this.isValid=!1}return e.prototype.ngOnChanges=function(e){this.isValid=Boolean(this.data&&this.data.value&&this.data.link)},e}();Ii.lateLoadKey="LinkFormatterComponent",Ii.decorators=[{type:n.Component,args:[{template:'<div class="link-formatter-container">\n <a *ngIf="isValid" class="nui-text-ellipsis" [href]="data?.link" target="_blank">\n {{data?.value}}\n </a>\n </div>',styles:[".link-formatter-container {display: grid; grid-template-columns: 1fr;}"]}]}],Ii.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Ii.propDecorators={data:[{type:n.Input}]};var Pi=function(e){this.changeDetector=e};Pi.lateLoadKey="RawFormatterComponent",Pi.decorators=[{type:n.Component,args:[{template:"\n <ng-container>{{data?.value}}</ng-container>"}]}],Pi.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Pi.propDecorators={data:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}]};var Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ke(t,e),t}(Pi);Ti.lateLoadKey="PercentageFormatterComponent",Ti.decorators=[{type:n.Component,args:[{template:"\n <ng-container>\n {{data?.value}}%\n </ng-container>"}]}];var xi=[{power:1,prefix:"",label:""},{power:3,prefix:"k",label:"kilo"},{power:6,prefix:"M",label:"mega"},{power:9,prefix:"G",label:"giga"},{power:12,prefix:"T",label:"tera"},{power:15,prefix:"P",label:"peta"},{power:18,prefix:"E",label:"exa"},{power:21,prefix:"Z",label:"zetta"},{power:24,prefix:"Y",label:"yotta"}],Di=[{power:-24,prefix:"y",label:"yocto"},{power:-21,prefix:"z",label:"zepto"},{power:-18,prefix:"a",label:"atto"},{power:-15,prefix:"f",label:"femto"},{power:-12,prefix:"p",label:"pico"},{power:-9,prefix:"n",label:"nano"},{power:-6,prefix:"µ",label:"micro"},{power:-3,prefix:"m",label:"milli"},{power:1,prefix:"",label:""}],_i=function(){function e(e){this.changeDetector=e,this.value="0"}return e.prototype.ngOnChanges=function(e){if(e.data){var t=e.data.currentValue.value;t&&this.processSiUnitsValue(we.default(t))}},e.prototype.processSiUnitsValue=function(e){var t=this.getTransformPrefix(Se.default(e));this.value=this.getTransformedValue(e,t),this.modifier=null==t?void 0:t.prefix},e.prototype.getTransformedValue=function(e,t){if(!t)return e;var n=1!==t.power?+e*Math.pow(10,-t.power):+e;return(Math.round(10*n)/10).toString()},e.prototype.getTransformPrefix=function(t){var n,o=Math.abs(t);if(!Number.isNaN(o)){var i=(null===(n=this.data)||void 0===n?void 0:n.shiftPoint)||e.SHIFT_POINT_DEFAULT;if(o>=1){var r=Math.round(o).toString().length;return Fe(xi).reverse().find((function(e){return r>=e.power+1+i}))}var a=zi(o);return Fe(Di).reverse().find((function(e){return a<=Math.abs(e.power)+1+i}))}},e}();function zi(e,t){void 0===t&&(t=1);var n=Math.abs(e);if(n>=1)return 1;var o=t+1;return n*Math.pow(10,o)>1?o:zi(n,o)}_i.lateLoadKey="SiUnitsFormatterComponent",_i.SHIFT_POINT_DEFAULT=0,_i.decorators=[{type:n.Component,args:[{template:'\n <ng-container>\n <div class="d-flex flex-nowrap">\n <span>{{ value }}</span>\n <span> {{ modifier }}</span>\n </div>\n </ng-container>\n '}]}],_i.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},_i.propDecorators={data:[{type:n.Input}],elementClass:[{type:n.Input},{type:n.HostBinding,args:["class"]}]};var Oi=function(){function e(e){this.changeDetector=e,this.isValid=!1}return e.prototype.ngOnChanges=function(){this.isValid=!!(this.data&&this.data.icon&&this.data.name&&this.data.data)},e}();Oi.lateLoadKey="StatusWithIconFormatterComponent",Oi.decorators=[{type:n.Component,args:[{template:'\n <ng-container *ngIf="isValid">\n <div class="nui-text-label align-items-center status-icon-formatter">\n \n <span class="nui-text-ellipsis text-right pl-3">{{ data.data }}</span>\n <nui-icon [icon]="data.icon" class="nui-icon nui-icon-line-height mx-2"></nui-icon>\n <div *ngIf="data?.link; else noLink">\n <a class="nui-text-link-small nui-text-ellipsis link"\n (click)="$event.stopPropagation()"\n [href]="data?.link"\n rel="noopener noreferrer"\n [title]="data.name">\n {{ data.name }}\n </a>\n </div>\n <ng-template #noLink>\n <span class="nui-text-ellipsis" [style.font-size.px]="11">{{data.name}}</span>\n </ng-template>\n </div>\n </ng-container>\n ',styles:[".status-icon-formatter {display: grid; grid-template-columns: 50px auto minmax(114px, 1fr);} "]}]}],Oi.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Oi.propDecorators={data:[{type:n.Input}]};var Ei=function(){this.height$=new d.BehaviorSubject(0)};Ei.decorators=[{type:n.Injectable}];var ki=function(){function e(e,t){this.el=e,this.heading=t,this.disableCloseButton=!1,this.close=new n.EventEmitter}return e.prototype.ngOnChanges=function(){this.heading.height$.next(+getComputedStyle(this.el.nativeElement).height.slice(0,-2))},e}();ki.decorators=[{type:n.Component,args:[{selector:"nui-configurator-heading",template:'<div class="configurator-heading d-flex justify-content-between align-items-center p-4">\n <span class="nui-text-panel nui-text-ellipsis" [title]="configuratorTitle">\n {{configuratorTitle}}\n </span>\n <button nui-button\n type="button"\n displayStyle="action"\n icon="close"\n [disabled]="disableCloseButton"\n (click)="this.close.emit()">\n </button>\n</div>\n',styles:[":host{z-index:1080;background-color:var(--nui-color-bg-content,#fff)}:host .configurator-heading{border-bottom:1px solid;border-bottom-color:var(--nui-color-line-default,#d9d9d9)}"]}]}],ki.ctorParameters=function(){return[{type:n.ElementRef},{type:Ei}]},ki.propDecorators={configuratorTitle:[{type:n.Input}],disableCloseButton:[{type:n.Input}],close:[{type:n.Output}]};var Ri=function(e){function t(t,o,i,r){var a=e.call(this,t,o,i)||this;return a.formBuilder=r,a.items=[],a.moveButtons=!0,a.formReady=new n.EventEmitter,a.itemsChange=new n.EventEmitter,a.headerMap=new Map,a}return ke(t,e),t.prototype.getItemForNode=function(e){return this.items.find((function(t){return t.id===e.id}))},t.prototype.getNodes=function(){return this.nodes},t.prototype.ngOnInit=function(){this.form=this.formBuilder.array([],r.Validators.required),this.formReady.emit(this.form)},t.prototype.onEvent=function(e,t){var n=this.items.find((function(t){return t.id===e})),o=this.items.findIndex((function(t){return t.id===e}));"formReady"===t.id&&n&&this.onFormReady(n,t.payload,o),"formDestroy"===t.id&&this.onFormDestroy(t.payload)},t.prototype.onFormReady=function(e,t,n){var o=this,i=this.formBuilder.group({id:[e.id],componentType:[e.componentType],properties:t});this.form.setControl(n,i),setTimeout((function(){var n,i=null===(n=t.get(e.id+"/description"))||void 0===n?void 0:n.get("label");null==i||i.valueChanges.pipe(v.startWith(i.value),v.takeUntil(o.destroyed$)).subscribe((function(t){o.headerMap.set(e.id,t||""),o.changeDetector.markForCheck()}))}))},t.prototype.onFormDestroy=function(e){var t=this;setTimeout((function(){for(var n=0;n<t.form.length&&t.form.at(n).get("properties")!==e;n++);t.form.removeAt(n),t.form.patchValue(t.form.value,{emitEvent:!0})}))},t.prototype.trackBy=function(e,t){return t.id},t.prototype.removeItem=function(e,t){if(!e)throw new Error("Unable to remove undefined item from pizzagna");this.itemsChange.emit(this.items.filter((function(t){return t!==e}))),this.items.splice(t,1),this.nodes.splice(t,1),this.pizzagnaService.removeComponents(e.id)},t.prototype.moveItem=function(e,t){var n=this,o=Fe(this.items),i=o.splice(e,1);o.splice.apply(o,Fe([t,0],i));var r=Fe(this.nodes),a=r.splice(e,1);r.splice.apply(r,Fe([t,0],a)),this.nodes=Fe(r),this.moveFormValues(e,t),this.itemsChange.emit(o),setTimeout((function(){n.form.setValue(n.form.value,{emitEvent:!0})}))},t.prototype.drop=function(e){this.moveItem(e.previousIndex,e.currentIndex)},t.prototype.cdkDragStarted=function(e){this.height=e.source.element.nativeElement.offsetHeight},t.prototype.moveFormValues=function(e,t){var n=this.form.at(e);this.form.removeAt(e),this.form.insert(t,n)},t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t}(cn);Ri.lateLoadKey="ItemsDynamicComponent",Ri.decorators=[{type:n.Component,args:[{selector:"nui-items-dynamic",template:'<div class="nui-items-dynamic" cdkDropList (cdkDropListDropped)="drop($event)" [formGroup]="form">\n <div cdkDrag class="nui-items-dynamic__node-item"\n (cdkDragStarted)="cdkDragStarted($event)"\n *ngFor="let node of nodeConfigs; let i = index; trackBy: trackBy">\n\n <nui-drop-area class="nui-items-dynamic__drop-area" *cdkDragPlaceholder [style.height.px]="height"></nui-drop-area>\n\n <ng-template #headerText>\n <ng-container *ngIf="moveButtons">\n <div class="nui-items-dynamic__drag-handler" cdkDragHandle>\n <nui-icon icon="drag"></nui-icon>\n </div>\n </ng-container>\n <span [title]="headerMap.get(node.id) | nuiWidgetConfiguratorSectionHeader : i : headerPrefix"\n class="nui-items-dynamic__header-text">\n {{ headerMap.get(node.id) | nuiWidgetConfiguratorSectionHeader : i : headerPrefix }}\n </span>\n </ng-template>\n\n <ng-template #headerButtons>\n <div class="d-flex">\n \x3c!-- TODO: remove "kpi" prefix in v11 - NUI-5833 --\x3e\n <button id="kpi-widget-remove-btn-{{i}}"\n nui-button\n type="button"\n icon="delete"\n displayStyle="action"\n (click)="removeItem(getItemForNode(node), i)"></button>\n </div>\n </ng-template>\n\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="node.id"\n [componentType]="node.componentType"\n [providers]="node.providers"\n [properties]="node.properties | nuiAddData:headerText:\'headerTextTemplate\' | nuiAddData:headerButtons:\'headerButtonsTemplate\'"\n [outputs]="[\'formReady\', \'formDestroy\']"\n (output)="onEvent(node.id, $event)">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)">\n </ng-template>\n </ng-container>\n </div>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,encapsulation:n.ViewEncapsulation.None,styles:[".nui-items-dynamic__header-text{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-items-dynamic__drag-handler{cursor:move;display:flex}.nui-items-dynamic__node-item{background-color:var(--nui-color-bg-light,#fff);margin:15px}.nui-items-dynamic__node-item .widget-configurator-section{margin:0}.nui-items-dynamic__drop-area{margin:15px}.kpi-indicators-configuration__color-preview{width:16px;height:16px;margin-right:15px;border-radius:3px}.cdk-drag-preview{z-index:2000!important;opacity:.9;box-shadow:0 0 5px 0 var(--nui-shadow-color,rgba(17,17,17,.3))}"]}]}],Ri.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService},{type:r.FormBuilder}]},Ri.propDecorators={items:[{type:n.Input}],moveButtons:[{type:n.Input}],nodes:[{type:n.Input}],headerPrefix:[{type:n.Input}],formReady:[{type:n.Output}],itemsChange:[{type:n.Output}]};var Ai=function(){};Ai.lateLoadKey="PreviewPlaceholderComponent",Ai.decorators=[{type:n.Component,args:[{selector:"nui-preview-placeholder",template:"<div><b i18n>This is a preview of your widget</b>.</div>\n<div i18n>\n As you make configuration changes, this area will update to match.\n To get started, select a widget type on the configuration panel.\n</div>\n",styles:[":host{max-width:300px;padding:0 10px;margin:auto}"]}]}];var Fi=function(){function t(e,t,n,o,i){this.changeDetector=e,this.configurator=t,this.previewService=n,this.formBuilder=o,this.widgetTypesService=i,this.navigationControl=new d.BehaviorSubject({busyState:{busy:!1},allowStepChange:!0}),this.destroy$=new d.Subject,this.resetForm$=new d.Subject,this.busy=!1,this.isFormDisplayed=!1,this.resetForm()}return t.prototype.ngOnInit=function(){var e=this;this.previewService.previewChanged.pipe(v.takeUntil(this.destroy$)).subscribe((function(t){e.onPreviewPizzagnaUpdate(t)})),this.configurator.submitError.pipe(v.takeUntil(this.destroy$)).subscribe((function(){e.toggleBusy()}))},t.prototype.ngAfterViewInit=function(){this.changeDetector.markForCheck()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.resetForm$.complete()},t.prototype.onPreviewPizzagnaUpdate=function(t){var n,o;if(this.isFormDisplayed){var i=Object.assign(Object.assign({},this.configurator.previewWidget),{pizzagna:Object.assign(Object.assign({},null===(o=this.configurator.previewWidget)||void 0===o?void 0:o.pizzagna),(n={},n[e.PizzagnaLayer.Configuration]=t,n))});this.configurator.updateWidget(i)}},t.prototype.canFinish=function(){var e,t,n,o;return!!(null===(t=null===(e=this.widgetTemplate)||void 0===e?void 0:e.pizzagna)||void 0===t?void 0:t.configuration)&&!(null===(o=null===(n=this.widgetTemplate)||void 0===n?void 0:n.metadata)||void 0===o?void 0:o.needsConfiguration)},t.prototype.onFinish=function(){if(this.form.invalid)return this.form.markAllAsTouched(),this.form.patchValue(this.form.value),void this.form.updateValueAndValidity({onlySelf:!1});this.toggleBusy(),this.configurator.formSubmit()},t.prototype.onCancel=function(){this.configurator.formCancel()},t.prototype.onStepNavigated=function(t){this.isFormDisplayed=1===t.currentStepIndex,0===t.currentStepIndex&&1===t.previousStepIndex?(this.formPizzagna=void 0,this.resetForm(),this.onSelect(this.widgetTemplate)):1===t.currentStepIndex&&(this.formPizzagna=this.widgetTypesService.getWidgetType(this.widgetTemplate.type,this.widgetTemplate.version).configurator,this.previewService.preview=this.widgetTemplate.pizzagna[e.PizzagnaLayer.Configuration])},t.prototype.onSelect=function(e){var t,n=this;this.widgetTemplate=e;var o=Object.assign(Object.assign({},e),{id:(null===(t=this.configurator.previewWidget)||void 0===t?void 0:t.id)||null});this.configurator.updateWidget(null),setTimeout((function(){n.configurator.updateWidget(Ie.default(o))}))},t.prototype.toggleBusy=function(){this.busy=!this.busy,this.navigationControl.next({busyState:{busy:this.busy},allowStepChange:!this.busy})},t.prototype.resetForm=function(){var e=this;this.resetForm$.next(),this.form=this.formBuilder.group({}),this.form.statusChanges.pipe(v.takeUntil(this.resetForm$),v.takeUntil(this.destroy$)).subscribe((function(){e.changeDetector.markForCheck()}))},t}();Fi.lateLoadKey="WidgetClonerComponent",Fi.decorators=[{type:n.Component,args:[{selector:"nui-widget-cloner",template:'<nui-configurator-heading configuratorTitle="Creating Widget" i18n-configuratorTitle\n (close)="onCancel()"\n [disableCloseButton]="busy"></nui-configurator-heading>\n<nui-dashwiz [hideHeader]="true"\n [canProceed]="!!widgetTemplate"\n [canFinish]="canFinish()"\n finishText="Create Widget" i18n-finishText\n [navigationControl]="navigationControl"\n (finish)="onFinish()"\n (cancel)="onCancel()"\n (stepNavigated)="onStepNavigated($event)">\n <nui-dashwiz-step [stepTemplate]="step1"\n nextText="Customize" i18n-nextText>\n </nui-dashwiz-step>\n <nui-dashwiz-step [stepTemplate]="step2"></nui-dashwiz-step>\n</nui-dashwiz>\n\n<ng-template #step1>\n <div class="p-4 h-100">\n <ng-container nuiComponentPortal\n [componentType]="cloneSelectionComponentType"\n [outputs]="[\'widgetSelected\']"\n (output)="onSelect($event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #step2>\n <div [formGroup]="form">\n <nui-pizzagna #formPizzagnaComponent [(pizzagna)]="formPizzagna"></nui-pizzagna>\n </div>\n</ng-template>\n',host:{class:"d-flex flex-column h-100"},changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Fi.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:gi},{type:io},{type:r.FormBuilder},{type:_o}]},Fi.propDecorators={formPizzagna:[{type:n.Input}],cloneSelectionComponentType:[{type:n.Input}]};var Vi=function(){function e(){this.accordions=[]}return e.prototype.registerAccordion=function(e){var t=this;this.accordions.push({instance:e,openSubscription:e.openSubject.subscribe((function(){t.closeAllAccordions(),e.open=!0})),destroySubscription:e.destroySubject.pipe(v.take(1)).subscribe((function(){t.removeAccordion(e)}))})},e.prototype.closeAllAccordions=function(){this.accordions.forEach((function(e){e.instance.closeAccordion()}))},e.prototype.removeAccordion=function(e){var t=this.accordions.findIndex((function(t){return t.instance===e}));this.accordions[t].openSubscription.unsubscribe(),this.accordions.splice(t,1)},e}();Vi.decorators=[{type:n.Injectable}];var Li=function(e){function t(t,o,i,r){var a=e.call(this,t,o,i)||this;return a.formBuilder=r,a.nodes=[],a.headerText="",a.formReady=new n.EventEmitter,a.formDestroy=new n.EventEmitter,a}return ke(t,e),t.prototype.getNodes=function(){return this.nodes},t.prototype.ngOnInit=function(){this.form=this.formBuilder.group({})},t.prototype.onEvent=function(e,t){"formReady"===t.id&&this.addFormGroup(e,t.payload),Object.keys(this.form.controls).length===this.getNodes().length&&this.formReady.emit(this.form)},t.prototype.addFormGroup=function(e,t){this.form.addControl(e,t)},t.prototype.ngOnDestroy=function(){this.formDestroy.emit(this.form),e.prototype.ngOnDestroy.call(this)},t}(cn);Li.lateLoadKey="WidgetConfiguratorSectionComponent",Li.decorators=[{type:n.Component,args:[{selector:"nui-widget-configurator-section",template:'<div class="widget-configurator-section">\n <div class="widget-configurator-section__header d-flex justify-content-between align-items-center">\n <ng-container *ngTemplateOutlet="headerTextTemplate"></ng-container>\n <ng-container *ngTemplateOutlet="headerButtonsTemplate"></ng-container>\n\n \x3c!-- TODO: REMOVE THOSE AFTER ALL WIDGETS ARE USING nui-items-dynamic --\x3e\n <div headerText\n *ngIf="headerText"\n class="widget-configurator-section__header-text"\n [title]="headerText">\n {{headerText}}\n </div>\n <ng-content select="[headerText]"></ng-content>\n <ng-content select="[headerButtons]"></ng-content>\n </div>\n <ng-container *ngFor="let node of nodeConfigs; trackBy: trackByFn">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentId]="node.id"\n [componentType]="node.componentType"\n [providers]="node.providers"\n [properties]="node.properties"\n [outputs]="[\'formReady\']"\n (output)="onEvent(node.id, $event)">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </ng-container>\n <ng-content></ng-content>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,encapsulation:n.ViewEncapsulation.None,host:{class:"nui-widget-configurator-section"},styles:[".widget-configurator-section{margin:15px;border-radius:3px;border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9)}.widget-configurator-section__header{padding:15px 5px 15px 15px;height:40px;font-size:16px;font-weight:600;background-color:var(--nui-color-bg-table_header,#f0f0f0);color:var(--nui-color-text-secondary,rgba(17,17,17,.6))}.widget-configurator-section__header-text{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}"]}]}],Li.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:an},{type:o.LoggerService},{type:r.FormBuilder}]},Li.propDecorators={headerTextTemplate:[{type:n.Input}],headerButtonsTemplate:[{type:n.Input}],nodes:[{type:n.Input}],headerText:[{type:n.Input}],formReady:[{type:n.Output}],formDestroy:[{type:n.Output}]};var Bi=function(){function t(t,n){this.accordionCoordinator=t,this.cd=n,this.showOpenStateIcon=!0,this.state=e.AccordionState.DEFAULT,this.open=!1,this.openSubject=new d.Subject,this.destroySubject=new d.Subject}return t.prototype.ngOnInit=function(){this.accordionCoordinator.registerAccordion(this)},t.prototype.openChange=function(e){e?this.openSubject.next():this.closeAccordion()},t.prototype.closeAccordion=function(){this.cd.markForCheck(),this.open=!1},t.prototype.ngOnDestroy=function(){this.destroySubject.next(),this.destroySubject.complete()},t}();Bi.decorators=[{type:n.Component,args:[{selector:"nui-widget-editor-accordion",template:'<div class="nui-widget-editor-accordion">\n <nui-expander [open]="open" (openChange)="openChange($event)">\n <div nuiExpanderHeader\n class="d-flex align-items-start"\n [class.error-state]="state === \'critical\'"\n [class.warning-state]="state === \'warning\'">\n <ng-content select="[accordionHeader]"></ng-content>\n <nui-icon *ngIf="showOpenStateIcon" class="nui-widget-editor-accordion__edit-icon" [icon]="open ? \'triangle-down\' : \'triangle-left\'"></nui-icon>\n </div>\n <ng-content></ng-content>\n </nui-expander>\n</div>\n',encapsulation:n.ViewEncapsulation.None,changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".nui-widget-editor-accordion nui-form-field:last-child .nui-form-field{margin-bottom:0}.nui-widget-editor-accordion__edit-icon{padding:10px;margin-left:auto;margin-right:5px}.nui-widget-editor-accordion .nui-expander--expanded{padding-bottom:0}.nui-widget-editor-accordion .nui-expander__header-icon{display:none}.nui-widget-editor-accordion .nui-expander__header .error-state{background-color:var(--nui-color-semantic-critical-bg,#fceae6)}.nui-widget-editor-accordion .nui-expander__header .warning-state{background-color:var(--nui-color-semantic-warning-bg,#fff9e6)}.nui-widget-editor-accordion .nui-expander__header [nuiexpanderheader]{border-top:1px solid;border-top-color:var(--nui-color-line-default,#d9d9d9);min-height:50px}.nui-widget-editor-accordion .nui-expander__header [nuiexpanderheader] [accordionheader]{overflow:hidden}.nui-widget-editor-accordion .nui-expander__header [nuiexpanderheader] [accordionheader]>div{overflow-x:hidden}.nui-widget-editor-accordion .nui-expander__header [nuiexpanderheader] [accordionheader]>div .nui-text-secondary{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-widget-editor-accordion .nui-expander__body{margin:0;padding:0;border-left:none}"]}]}],Bi.ctorParameters=function(){return[{type:Vi},{type:n.ChangeDetectorRef}]},Bi.propDecorators={showOpenStateIcon:[{type:n.Input}],state:[{type:n.Input}]};var Ni,$i=function(){function t(e,t,n,o){this.changeDetector=e,this.formBuilder=t,this.previewService=n,this.configurator=o,this.navigationControl=new d.BehaviorSubject({busyState:{busy:!1},allowStepChange:!0}),this.busy=!1,this.destroy$=new d.Subject,this.form=this.formBuilder.group({})}return Object.defineProperty(t.prototype,"formPizzagnaComponent",{set:function(e){var t,n=this;null===(t=null==e?void 0:e.eventBus)||void 0===t||t.getStream(st).pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var t,o,i,r=e.payload;null===(i=null===(o=null===(t=n.configurator)||void 0===t?void 0:t.previewPizzagnaComponent)||void 0===o?void 0:o.eventBus)||void 0===i||i.getStream(r.id).next(r.payload)})),this._formPizzagnaComponent=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t,n=this;this.previewService.preview=null===(t=this.configurator.previewWidget)||void 0===t?void 0:t.pizzagna[e.PizzagnaLayer.Configuration],this.previewService.previewChanged.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){n.onPreviewPizzagnaUpdate(e),n.changeDetector.detectChanges()})),this.configurator.submitError.pipe(v.takeUntil(this.destroy$)).subscribe((function(){n.toggleBusy()})),this.changeDetector.detectChanges()},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.onPreviewPizzagnaUpdate=function(n){var o,i,r=Object.assign(Object.assign({},this.configurator.previewWidget),{pizzagna:Object.assign(Object.assign({},null===(i=this.configurator.previewWidget)||void 0===i?void 0:i.pizzagna),(o={},o[e.PizzagnaLayer.Configuration]=n,o))});this.configurator.updateWidget(r);var a=ce.default(n,t.TITLE_PATH,"");this.configuratorTitle=$localize(Ni||(Ni=Ve(["Editing ",""],["Editing ",""])),a)},t.prototype.onFinish=function(){if(this.form.invalid)return this.form.markAllAsTouched(),this.form.patchValue(this.form.value),void this.form.updateValueAndValidity({onlySelf:!1,emitEvent:!0});this.toggleBusy(),this.configurator.formSubmit()},t.prototype.onCancel=function(){this.configurator.formCancel()},t.prototype.toggleBusy=function(){this.busy=!this.busy,this.navigationControl.next({busyState:{busy:this.busy},allowStepChange:!this.busy})},t}();$i.lateLoadKey="WidgetEditorComponent",$i.TITLE_PATH="header.properties.title",$i.decorators=[{type:n.Component,args:[{selector:"nui-widget-editor",template:'<nui-configurator-heading [configuratorTitle]="configuratorTitle"\n (close)="onCancel()"\n [disableCloseButton]="busy"></nui-configurator-heading>\n<nui-dashwiz [hideHeader]="true"\n finishText="Save Changes" i18n-finishText\n [navigationControl]="navigationControl"\n (finish)="onFinish()"\n (cancel)="onCancel()">\n <nui-dashwiz-step [stepTemplate]="step1"></nui-dashwiz-step>\n</nui-dashwiz>\n\n<ng-template #step1>\n <div [formGroup]="form">\n <nui-pizzagna *ngIf="formPizzagna"\n #formPizzagnaComponent\n [rootNode]="formRoot"\n [(pizzagna)]="formPizzagna">\n </nui-pizzagna>\n </div>\n</ng-template>\n',host:{class:"d-flex flex-column h-100"},changeDetection:n.ChangeDetectionStrategy.OnPush}]}],$i.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:io},{type:gi}]},$i.propDecorators={formPizzagna:[{type:n.Input}],formRoot:[{type:n.Input}],formPizzagnaComponent:[{type:n.ViewChild,args:["formPizzagnaComponent",{static:!1}]}]};var ji,Ki,Wi,Mi,Ui,Hi,Gi,qi,Zi,Yi,Xi,Ji,Qi,er,tr,nr,or,ir,rr,ar,sr,lr,dr,cr,ur,pr,hr,gr,mr,fr,vr,yr,br,Cr,Sr,wr,Ir,Pr,Tr,xr,Dr,_r,zr,Or,Er,kr=[$localize(ji||(ji=Ve(["Blue"],["Blue"]))),$localize(Ki||(Ki=Ve(["Blue Light"],["Blue Light"]))),$localize(Wi||(Wi=Ve(["Blue Dark"],["Blue Dark"]))),$localize(Mi||(Mi=Ve(["Pink"],["Pink"]))),$localize(Ui||(Ui=Ve(["Pink Light"],["Pink Light"]))),$localize(Hi||(Hi=Ve(["Pink Dark"],["Pink Dark"]))),$localize(Gi||(Gi=Ve(["Sea Green"],["Sea Green"]))),$localize(qi||(qi=Ve(["Sea Green Light"],["Sea Green Light"]))),$localize(Zi||(Zi=Ve(["Sea Green Dark"],["Sea Green Dark"]))),$localize(Yi||(Yi=Ve(["Violet"],["Violet"]))),$localize(Xi||(Xi=Ve(["Violet Light"],["Violet Light"]))),$localize(Ji||(Ji=Ve(["Violet Dark"],["Violet Dark"]))),$localize(Qi||(Qi=Ve(["Lime Green"],["Lime Green"]))),$localize(er||(er=Ve(["Lime Green Light"],["Lime Green Light"]))),$localize(tr||(tr=Ve(["Lime Green Dark"],["Lime Green Dark"]))),$localize(nr||(nr=Ve(["Orange"],["Orange"]))),$localize(or||(or=Ve(["Orange Light"],["Orange Light"]))),$localize(ir||(ir=Ve(["Orange Dark"],["Orange Dark"]))),$localize(rr||(rr=Ve(["Ultramarine"],["Ultramarine"]))),$localize(ar||(ar=Ve(["Ultramarine Light"],["Ultramarine Light"]))),$localize(sr||(sr=Ve(["Ultramarine Dark"],["Ultramarine Dark"]))),$localize(lr||(lr=Ve(["Bordeaux"],["Bordeaux"]))),$localize(dr||(dr=Ve(["Bordeaux Light"],["Bordeaux Light"]))),$localize(cr||(cr=Ve(["Bordeaux Dark"],["Bordeaux Dark"]))),$localize(ur||(ur=Ve(["Ochroid"],["Ochroid"]))),$localize(pr||(pr=Ve(["Ochroid Light"],["Ochroid Light"]))),$localize(hr||(hr=Ve(["Ochroid Dark"],["Ochroid Dark"]))),$localize(gr||(gr=Ve(["Anthracite"],["Anthracite"]))),$localize(mr||(mr=Ve(["Anthracite Light"],["Anthracite Light"]))),$localize(fr||(fr=Ve(["Anthracite Dark"],["Anthracite Dark"])))],Rr=[$localize(vr||(vr=Ve(["Down"],["Down"]))),$localize(yr||(yr=Ve(["Down Light"],["Down Light"]))),$localize(br||(br=Ve(["Critical"],["Critical"]))),$localize(Cr||(Cr=Ve(["Critical Light"],["Critical Light"]))),$localize(Sr||(Sr=Ve(["Warning"],["Warning"]))),$localize(wr||(wr=Ve(["Warning Light"],["Warning Light"]))),$localize(Ir||(Ir=Ve(["Unknown"],["Unknown"]))),$localize(Pr||(Pr=Ve(["Unknown Light"],["Unknown Light"]))),$localize(Tr||(Tr=Ve(["Ok"],["Ok"]))),$localize(xr||(xr=Ve(["Ok Light"],["Ok Light"]))),$localize(Dr||(Dr=Ve(["Info"],["Info"]))),$localize(_r||(_r=Ve(["Info Light"],["Info Light"])))],Ar=Pe.default(Fe(a.CHART_PALETTE_CS3,a.CHART_PALETTE_CS_S_EXTENDED),Fe(kr,Rr)),Fr="var(--nui-color-bg-secondary)",Vr=Fe(a.CHART_PALETTE_CS3,a.CHART_PALETTE_CS_S_EXTENDED).map((function(e){return{color:e,label:Ar[e]}})),Lr=function(){function e(e,t,o){this.changeDetector=e,this.formBuilder=t,this.formReady=new n.EventEmitter,this.destroy$=new d.Subject,this.availableComparators=o.getComparators()}return e.prototype.ngOnInit=function(){var e,t=this;this.palette=[{color:Fr,label:$localize(zr||(zr=Ve(["Default color"],["Default color"])))}].concat(this.backgroundColors),this.formLocal=this.initDefaultRulesGroup(),this.form=this.formBuilder.group({rules:[[]]}),null===(e=this.formLocal.get("rules"))||void 0===e||e.value.valueChanges.pipe(v.tap((function(e){var n;return null===(n=t.form.get("rules"))||void 0===n?void 0:n.patchValue(Fe(e))})),v.takeUntil(this.destroy$)).subscribe(),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o=this;e.rules&&((null===(n=null===(t=this.formLocal)||void 0===t?void 0:t.get("rules"))||void 0===n?void 0:n.value).setValue([]),this.rules&&te.default(this.rules)&&this.rules.forEach((function(e){var t;(null===(t=o.formLocal.get("rules"))||void 0===t?void 0:t.value).push(o.formBuilder.group({comparisonType:[e.comparisonType,[r.Validators.required]],value:[e.value,[r.Validators.required]],color:[e.color]}))})))},e.prototype.getColorRulesSubtitle=function(){var e,t,n,o;return 0===(null===(t=null===(e=this.formLocal)||void 0===e?void 0:e.get("rules"))||void 0===t?void 0:t.value).controls.length?$localize(Or||(Or=Ve(["No color rules"],["No color rules"]))):$localize(Er||(Er=Ve([""," color rules"],[""," color rules"])),(null===(o=null===(n=this.formLocal)||void 0===n?void 0:n.get("rules"))||void 0===o?void 0:o.value).controls.length)},e.prototype.getLabel=function(e){var t;return(null===(t=this.availableComparators[e])||void 0===t?void 0:t.label)||"Custom Comparator"},e.prototype.removeRule=function(e){var t,n;(null===(n=null===(t=this.formLocal)||void 0===t?void 0:t.get("rules"))||void 0===n?void 0:n.value).removeAt(e)},e.prototype.addRule=function(){var e,t;(null===(t=null===(e=this.formLocal)||void 0===e?void 0:e.get("rules"))||void 0===t?void 0:t.value).push(this.formBuilder.group({comparisonType:[">",[r.Validators.required]],value:[0,[r.Validators.required]],color:[Fr]}))},e.prototype.drop=function(e){this.move(e.currentIndex,e.previousIndex)},e.prototype.cdkDragStarted=function(e){this.height=e.source.element.nativeElement.offsetHeight},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.initDefaultRulesGroup=function(){return this.formBuilder.group({rules:[this.formBuilder.array([],r.Validators.required)]})},e.prototype.move=function(e,t){var n,o,i=null===(o=null===(n=this.formLocal)||void 0===n?void 0:n.get("rules"))||void 0===o?void 0:o.value,r=e>t?1:-1;if(i){for(var a=i.at(t),s=t;s*r<e*r;s+=r){var l=i.at(s+r);i.setControl(s,l)}i.setControl(e,a)}},e}();Lr.lateLoadKey="BackgroundColorRulesConfigurationComponent",Lr.decorators=[{type:n.Component,args:[{selector:"nui-background-color-rules-configuration",template:'<nui-widget-editor-accordion [formGroup]="formLocal"\n [state]="formLocal | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="formLocal | nuiFormHeaderIconPipe:\'color\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Background color rules</span>\n <div class="nui-text-secondary"\n [title]="getColorRulesSubtitle()">\n\n {{ getColorRulesSubtitle() }}\n </div>\n </div>\n </div>\n <div class="kpi-color-rules-configuration__accordion-content">\n <div class="mb-4">\n <p class="mb-3">We can automatically change the background color when the value meets certain conditions.</p>\n <div cdkDropList (cdkDropListDropped)="drop($event)">\n <ng-container *ngFor="let rule of formLocal.get(\'rules\')?.value.controls; index as i">\n <div class="kpi-color-rule d-flex pt-3" [formGroup]="rule" cdkDrag (cdkDragStarted)="cdkDragStarted($event)">\n <div class="kpi-color-rule__control justify-content-center d-flex">\n <nui-icon icon="drag" class="kpi-color-rule__drag align-items-center" cdkDragHandle></nui-icon>\n </div>\n <div class="d-flex flex-grow-1 flex-wrap">\n <nui-form-field class="mr-3 mb-3 flex-grow-1" [control]="rule.get(\'comparisonType\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n style="min-width: 220px;"\n [formControl]="rule.get(\'comparisonType\')">\n <nui-select-v2-option *ngFor="let item of availableComparators | keyvalue" [value]="item.key">\n {{ getLabel(item.key) }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n\n <nui-form-field class="mr-3 mb-3" [control]="rule.get(\'value\')" style="max-width: 100px;">\n <nui-textbox formControlName="value"></nui-textbox>\n </nui-form-field>\n\n <nui-form-field class="mr-3 mb-3" [control]="rule.get(\'color\')">\n <nui-color-picker formControlName="color" [colorPalette]="palette"></nui-color-picker>\n </nui-form-field>\n </div>\n <button nui-button\n icon="delete"\n displayStyle="action"\n type="button"\n class="kpi-color-rule__control"\n (click)="removeRule(i)">\n </button>\n <nui-drop-area *cdkDragPlaceholder [style.height.px]="height"></nui-drop-area>\n </div>\n </ng-container>\n </div>\n <button nui-button\n icon="add"\n displayStyle="action"\n type="button"\n (click)="addRule()"\n i18n>Add new rule\n </button>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".kpi-color-rules-configuration__accordion-content{padding:15px 15px 15px 46px}.kpi-color-rules-configuration__color-select{display:flex;align-items:center}.kpi-color-rules-configuration__color-preview{width:100%;height:20px;border-radius:3px}.kpi-color-rules-configuration__color-preview.with-arrow{width:calc(100% - 30px - 10px);margin-left:10px}.kpi-color-rules-configuration__selector-arrow{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-left:1px solid;border-left-color:var(--nui-color-line-default,#d9d9d9);margin-left:10px}.kpi-color-rule{background-color:var(--nui-color-bg-content,#fff)}.kpi-color-rule__drag{cursor:move}.kpi-color-rule__control{min-width:30px;height:30px}"]}]}],Lr.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:Vn}]},Lr.propDecorators={rules:[{type:n.Input}],backgroundColors:[{type:n.Input}],formReady:[{type:n.Output}]};var Br=function(){function e(e){this.changeDetector=e,this.errorState=new n.EventEmitter,this.onDestroy$=new d.Subject,this.dataSourceClear$=new d.Subject}return e.prototype.ngOnChanges=function(e){e.dataSource&&this.onDataSourceChanged()},e.prototype.onDataSourceChanged=function(){var e,t,n,o=this;this.dataSourceClear$.next(),null===(t=null===(e=this.dataSource)||void 0===e?void 0:e.busy)||void 0===t||t.pipe(v.takeUntil(this.dataSourceClear$)).subscribe((function(e){o.busy=e,o.changeDetector.markForCheck()})),null===(n=this.dataSource)||void 0===n||n.outputsSubject.pipe(v.takeUntil(this.dataSourceClear$)).subscribe((function(e){o.data=ae.default(null==e?void 0:e.result)?e:null==e?void 0:e.result,o.dataSourceError=null==e?void 0:e.error,o.errorState.emit(!!o.dataSourceError),o.changeDetector.markForCheck()}))},e.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete(),this.dataSourceClear$.next(),this.dataSourceClear$.complete()},e}();Br.lateLoadKey="DataSourceErrorComponent",Br.decorators=[{type:n.Component,args:[{selector:"nui-data-source-error",template:'<div>\n <nui-message class="mt-4 d-block" *ngIf="!dataSource" type="info"\n [allowDismiss]="false">\n <b i18n>Select a data source</b>\n </nui-message>\n <nui-message class="mt-4 d-block" *ngIf="dataSourceError" type="critical"\n [allowDismiss]="false">\n <b i18n>Something went wrong with the data source: </b> {{dataSourceError.message || dataSourceError.type}}\n </nui-message>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Br.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Br.propDecorators={dataSource:[{type:n.Input}],errorState:[{type:n.Output}]};var Nr=function(){function e(e,t,o,i,r,a,s){this.changeDetector=e,this.configuratorHeading=t,this.formBuilder=o,this.providerRegistryService=i,this.eventBus=r,this.injector=a,this.logger=s,this.dataSourceProviders=[],this.errorComponent=Br.lateLoadKey,this.formReady=new n.EventEmitter,this.hasDataSourceError=!1,this.dataFieldIds=new j.Subject}return e.prototype.ngOnInit=function(){var e,t=this;this.form=this.formBuilder.group({providerId:[this.providerId||"",[r.Validators.required]],properties:[this.properties||{}],dataSource:[null,[r.Validators.required]]}),this.form.setValidators([function(){return t.hasDataSourceError?{dataSourceError:!0}:null}]),null===(e=this.form.get("dataSource"))||void 0===e||e.valueChanges.subscribe((function(e){var n,o;null===(n=t.form.get("providerId"))||void 0===n||n.setValue(null==e?void 0:e.providerId),(null==e?void 0:e.properties)&&(null===(o=t.form.get("properties"))||void 0===o||o.setValue(null==e?void 0:e.properties))})),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o,i,r,a,s,l,d,c=this;if(e.providerId&&!e.providerId.isFirstChange()||e.properties&&!e.properties.isFirstChange()){var u=null===(t=e.providerId)||void 0===t?void 0:t.previousValue,p=null===(n=e.properties)||void 0===n?void 0:n.previousValue;if(u!==this.providerId||p!==this.properties)(h=this.dataSourceProviders.find((function(e){var t,n;return e.providerId===c.providerId&&me.default(null!==(t=e.properties)&&void 0!==t?t:{},null!==(n=c.properties)&&void 0!==n?n:{})})))?(null===(l=null===(s=this.form)||void 0===s?void 0:s.get("dataSource"))||void 0===l||l.setValue(h),this.invokeDataSource(h)):(null===(i=null===(o=this.form)||void 0===o?void 0:o.get("providerId"))||void 0===i||i.setValue(this.providerId),null===(a=null===(r=this.form)||void 0===r?void 0:r.get("properties"))||void 0===a||a.setValue(this.properties),this.invokeDataSource({properties:this.properties,providerId:this.providerId}))}if(e.dataSourceProviders&&!e.dataSourceProviders.isFirstChange()&&1===this.dataSourceProviders.length){var h=this.dataSourceProviders[0];null===(d=this.form.get("dataSource"))||void 0===d||d.setValue(h),this.invokeDataSource(h)}},e.prototype.ngAfterViewInit=function(){var e;if(this.dataSourceProviders&&1===this.dataSourceProviders.length){var t=this.dataSourceProviders[0];null===(e=this.form.get("dataSource"))||void 0===e||e.setValue(t),this.invokeDataSource(t)}},e.prototype.onDataSourceSelected=function(e){this.eventBus.next(In,{}),this.invokeDataSource(e)},e.prototype.invokeDataSource=function(e){var t,n=this;if(e.providerId){var o=this.providerRegistryService.getProvider(e.providerId);if(o){this.dataSource=this.providerRegistryService.getProviderInstance(o,this.injector),this.eventBus.next(Pn,{payload:this.dataSource}),this.dataSource.outputsSubject.pipe(v.take(1)).subscribe((function(e){n.eventBus.next(Sn,{payload:e}),n.dataFieldIds.next(Object.keys(e.result||e))}));var i=this.dataSource;(null==i?void 0:i.updateConfiguration)&&i.updateConfiguration(null!==(t=e.properties)&&void 0!==t?t:{}),setTimeout((function(){n.dataSource.applyFilters()}))}else this.logger.warn("No provider found for id:",e.providerId)}},e.prototype.onErrorState=function(e){this.hasDataSourceError=e,this.form.markAsTouched({onlySelf:!0}),this.form.updateValueAndValidity({emitEvent:!1}),this.changeDetector.detectChanges()},e}();Nr.lateLoadKey="DataSourceConfigurationV2Component",Nr.decorators=[{type:n.Component,args:[{selector:"nui-data-source-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center pl-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'database\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt1">\n <span class="nui-text-label" i18n>Data Source</span>\n <div class="nui-text-secondary" [title]="form.get(\'dataSource\')?.value?.label">\n {{form.get(\'dataSource\')?.value?.label}}\n </div>\n </div>\n </div>\n <div class="datasource-configuration__accordion-content">\n <nui-form-field [control]="form.get(\'dataSource\')">\n <nui-select-v2 placeholder="Select data source" i18n-placeholder\n [title]="form.get(\'dataSource\')?.value?.label"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="dataSource"\n (valueSelected)="onDataSourceSelected($event)"\n class="datasource-configuration__accordion-content__datasource-input">\n <nui-select-v2-option *ngFor="let dataSourceProvider of dataSourceProviders" [title]="dataSourceProvider?.label" [value]="dataSourceProvider">\n {{dataSourceProvider.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <ng-container nuiComponentPortal\n [componentId]="errorComponent"\n [componentType]="errorComponent"\n [outputs]="[\'errorState\']"\n [properties]="{ dataSource: dataSource }"\n (output)="onErrorState($event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)">\n </ng-template>\n </ng-container>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".datasource-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Nr.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:Do},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:n.Injector},{type:o.LoggerService}]},Nr.propDecorators={dataSourceProviders:[{type:n.Input}],properties:[{type:n.Input}],providerId:[{type:n.Input}],errorComponent:[{type:n.Input}],formReady:[{type:n.Output}]};var $r=function(){function e(e,t,o,i,r,a,s){this.changeDetector=e,this.configuratorHeading=t,this.formBuilder=o,this.providerRegistryService=i,this.eventBus=r,this.injector=a,this.logger=s,this.dataSourceProviders=[],this.errorComponent=Br.lateLoadKey,this.formReady=new n.EventEmitter,this.hasDataSourceError=!1,this.dsOutput=new d.Subject,this.dataFieldIds=new d.Subject}return e.prototype.ngOnInit=function(){var e=this;this.form=this.formBuilder.group({providerId:[this.providerId||"",[r.Validators.required]],properties:this.formBuilder.group(this.properties||{})}),this.form.setValidators([function(){return e.hasDataSourceError?{dataSourceError:!0}:null}]),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t;e.providerId&&!e.providerId.isFirstChange()&&(e.providerId.previousValue!==this.providerId&&(null===(t=this.form.get("providerId"))||void 0===t||t.setValue(this.providerId),this.invokeDataSource(this.providerId)))},e.prototype.onDataSourceChange=function(e){this.eventBus.next(In,{}),this.invokeDataSource(e)},e.prototype.invokeDataSource=function(e){var t=this;if(e){var n=this.providerRegistryService.getProvider(e);n?(this.dataSource=this.providerRegistryService.getProviderInstance(n,this.injector),this.eventBus.next(Pn,{payload:this.dataSource}),this.dataSource.outputsSubject.pipe(v.take(1)).subscribe((function(e){t.eventBus.next(Sn,{payload:e}),t.dsOutput.next(e);var n=(null==e?void 0:e.result)||e;n&&t.dataFieldIds.next(Object.keys(n))})),setTimeout((function(){t.dataSource.applyFilters()}))):this.logger.warn("No provider found for id:",e)}},e.prototype.onErrorState=function(e){this.hasDataSourceError=e,this.form.markAsTouched({onlySelf:!0}),this.form.updateValueAndValidity({emitEvent:!1}),this.changeDetector.detectChanges()},e}();$r.lateLoadKey="DataSourceConfigurationComponent",$r.decorators=[{type:n.Component,args:[{selector:"nui-data-source-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center pl-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'database\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt1">\n <span class="nui-text-label" i18n>Data Source</span>\n <div class="nui-text-secondary" [title]="form.get(\'providerId\')?.value">\n {{form.get(\'providerId\')?.value}}\n </div>\n </div>\n </div>\n <div class="datasource-configuration__accordion-content">\n <nui-form-field caption="Select Data Source" i18n-caption [control]="form.get(\'providerId\')">\n <nui-select-v2 placeholder="Data Sources" i18n-placeholder\n [title]="form.get(\'providerId\')?.value"\n formControlName="providerId"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n (valueSelected)="onDataSourceChange($event)"\n class="datasource-configuration__accordion-content__datasource-input">\n <nui-select-v2-option *ngFor="let dataSourceProvider of dataSourceProviders" [title]="dataSourceProvider" [value]="dataSourceProvider">\n {{dataSourceProvider}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <ng-container nuiComponentPortal\n [componentId]="errorComponent"\n [componentType]="errorComponent"\n [outputs]="[\'errorState\']"\n [properties]="{ dataSource: dataSource }"\n (output)="onErrorState($event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)">\n </ng-template>\n </ng-container>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".datasource-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],$r.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:Do},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:n.Injector},{type:o.LoggerService}]},$r.propDecorators={dataSourceProviders:[{type:n.Input}],errorComponent:[{type:n.Input}],properties:[{type:n.Input}],providerId:[{type:n.Input}],formReady:[{type:n.Output}]};var jr,Kr,Wr=function(){function t(t,o){this.changeDetector=t,this.formBuilder=o,this.mode=e.EmbeddedContentMode.URL,this.formReady=new n.EventEmitter,this.destroyed$=new d.Subject,this.form=this.formBuilder.group({mode:[this.mode],urlCustomContent:[""],htmlCustomContent:[""],customEmbeddedContent:[""]}),this.modes=[{value:e.EmbeddedContentMode.URL,displayValue:$localize(jr||(jr=Ve(["Show the contents of a specific URL"],["Show the contents of a specific URL"])))},{value:e.EmbeddedContentMode.HTML,displayValue:$localize(Kr||(Kr=Ve(["Show the exact HTML I supply below"],["Show the exact HTML I supply below"])))}]}return Object.defineProperty(t.prototype,"urlCustomContent",{get:function(){return this.form.get("urlCustomContent")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlCustomContent",{get:function(){return this.form.get("htmlCustomContent")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"modeValue",{get:function(){return this.form.get("mode")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customEmbeddedContentValue",{get:function(){return this.form.get("customEmbeddedContent")},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.initializeForm(),this.formReady.emit(this.form)},t.prototype.ngOnChanges=function(t){var n,o,i;t.customEmbeddedContent&&(this.mode===e.EmbeddedContentMode.URL?null===(n=this.urlCustomContent)||void 0===n||n.setValue(this.customEmbeddedContent):this.mode===e.EmbeddedContentMode.HTML&&(null===(o=this.htmlCustomContent)||void 0===o||o.setValue(this.customEmbeddedContent))),t.mode&&(null===(i=this.modeValue)||void 0===i||i.setValue(t.mode.currentValue))},t.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},t.prototype.initializeForm=function(){var t,n,o,i=this;null===(t=this.modeValue)||void 0===t||t.valueChanges.pipe(v.takeUntil(this.destroyed$)).subscribe((function(t){var n,o,r,a,s,l,d,c;t===e.EmbeddedContentMode.URL?(null===(n=i.customEmbeddedContentValue)||void 0===n||n.setValue(null===(o=i.form.get("urlCustomContent"))||void 0===o?void 0:o.value),null===(r=i.htmlCustomContent)||void 0===r||r.disable(),null===(a=i.urlCustomContent)||void 0===a||a.enable()):t===e.EmbeddedContentMode.HTML&&(null===(s=i.customEmbeddedContentValue)||void 0===s||s.setValue(null===(l=i.form.get("htmlCustomContent"))||void 0===l?void 0:l.value),null===(d=i.urlCustomContent)||void 0===d||d.disable(),null===(c=i.htmlCustomContent)||void 0===c||c.enable())})),null===(n=this.urlCustomContent)||void 0===n||n.valueChanges.pipe(v.takeUntil(this.destroyed$)).subscribe((function(e){var t;null===(t=i.customEmbeddedContentValue)||void 0===t||t.setValue(e)})),null===(o=this.htmlCustomContent)||void 0===o||o.valueChanges.pipe(v.takeUntil(this.destroyed$)).subscribe((function(e){var t;null===(t=i.customEmbeddedContentValue)||void 0===t||t.setValue(e)}))},t}();Wr.lateLoadKey="EmbeddedContentConfigurationComponent",Wr.decorators=[{type:n.Component,args:[{selector:"nui-embedded-content-configuration",template:'<nui-widget-editor-accordion [formGroup]="form" [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader class="d-flex align-items-center pl-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'tag\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt1">\n <span class="nui-text-label" i18n>Embedded Content</span>\n <div class="nui-text-secondary">\n Show the specific HTML I supply\n </div>\n </div>\n </div>\n <div class="embedded-configurator-section__accordion-content">\n <ng-container nuiComponentPortal\n #componentPortal="nuiComponentPortal"\n [componentType]="messageComponent.componentType"\n [properties]="messageComponent.properties">\n <ng-template [cdkPortalOutlet]="componentPortal.portal" (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n <nui-form-field [control]="form.get(\'mode\')"\n caption="What do you want to show in the widget?"\n i18n-caption>\n <nui-radio-group formControlName="mode"\n [(value)]="mode"\n name="mode"\n required>\n <nui-radio [value]="modes[0].value">\n {{modes[0].displayValue}}\n </nui-radio>\n <nui-form-field [control]="form.get(\'urlCustomContent\')">\n <nui-textbox formControlName="urlCustomContent">\n </nui-textbox>\n </nui-form-field>\n <nui-radio [value]="modes[1].value">\n {{modes[1].displayValue}}\n </nui-radio>\n <nui-form-field [control]="form.get(\'htmlCustomContent\')">\n <nui-textbox class="textarea-scrollable"\n formControlName="htmlCustomContent"\n rows="7">\n </nui-textbox>\n </nui-form-field> \n </nui-radio-group>\n </nui-form-field>\n </div>\n</nui-widget-editor-accordion>',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".embedded-configurator-section__accordion-content{padding:15px 15px 15px 46px}"]}]}],Wr.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder}]},Wr.propDecorators={mode:[{type:n.Input}],messageComponent:[{type:n.Input}],customEmbeddedContent:[{type:n.Input}],formReady:[{type:n.Output}]};var Mr=function(e){this.changeDetector=e};Mr.lateLoadKey="InfoMessageConfigurationComponent",Mr.decorators=[{type:n.Component,args:[{selector:"nui-info-message-configuration",template:'<nui-message type="info" [allowDismiss]="allowDismiss" i18n>\n <b> {{ emphasizeText }} </b> {{ generalText }}\n <a *ngIf="link" [href]="link.href" [target]="link.target">{{ link.text }}</a>\n</nui-message>',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Mr.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},Mr.propDecorators={emphasizeText:[{type:n.Input}],generalText:[{type:n.Input}],link:[{type:n.Input}],allowDismiss:[{type:n.Input}]};var Ur,Hr,Gr,qr,Zr,Yr,Xr,Jr=function(){function e(e,t){this.changeDetector=e,this.formBuilder=t,this.defaultColor={label:$localize(Ur||(Ur=Ve(["Default color"],["Default color"]))),color:Fr},this.label="",this.backgroundColor=this.defaultColor.color,this.units="",this.formReady=new n.EventEmitter}return e.prototype.ngOnInit=function(){this.backgroundColors=Fe(this.backgroundColors),this.backgroundColors.unshift(this.defaultColor),this.form=this.formBuilder.group({label:[this.label,[r.Validators.required]],backgroundColor:[this.backgroundColor,[r.Validators.required]]}),this.configurableUnits&&this.form.addControl("units",this.formBuilder.control(this.units));var e=this.form.get("label"),t=null==e?void 0:e.valueChanges.pipe(v.startWith(e.value)),n=this.form.get("backgroundColor"),o=null==n?void 0:n.valueChanges.pipe(v.startWith(null==n?void 0:n.value));this.subtitle$=d.combineLatest([null==t?void 0:t.pipe(v.map((function(e){return e||$localize(Hr||(Hr=Ve(["no label"],["no label"])))}))),null==o?void 0:o.pipe(v.map((function(e){return Ar[e]||$localize(Gr||(Gr=Ve(["Default Color"],["Default Color"])))})))]).pipe(v.map((function(e){return e.join(", ")}))),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o;e.label&&(null===(t=this.form)||void 0===t||t.patchValue({label:e.label.currentValue})),e.backgroundColor&&(null===(n=this.form)||void 0===n||n.patchValue({backgroundColor:e.backgroundColor.currentValue})),e.units&&(null===(o=this.form)||void 0===o||o.patchValue({units:e.units.currentValue}))},e}();Jr.lateLoadKey="KpiDescriptionConfigurationComponent",Jr.decorators=[{type:n.Component,args:[{selector:"nui-kpi-description-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'widget_list\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Description</span>\n <div class="nui-text-secondary" [title]="subtitle$ | async">\n {{subtitle$ | async}}\n </div>\n </div>\n </div>\n <div class="kpi-description-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Label" i18n-caption [control]="form.get(\'label\')" class="form-group">\n <nui-textbox formControlName="label" placeholder="Set label" i18n-placeholder></nui-textbox>\n </nui-form-field>\n </div>\n\n <nui-form-field caption="Background Color" i18n-caption [control]="form.get(\'backgroundColor\')" class="form-group">\n <nui-color-picker class="kpi-description-configuration__accordion-content__color-picker"\n formControlName="backgroundColor"\n [colorPalette]="backgroundColors">\n </nui-color-picker>\n </nui-form-field>\n\n <div class="mt-4" *ngIf="configurableUnits">\n <nui-form-field caption="Units" i18n-caption [control]="form.get(\'units\')" class="form-group">\n <nui-textbox formControlName="units" placeholder="Units" i18n-placeholder></nui-textbox>\n </nui-form-field>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".kpi-description-configuration__accordion-content{padding:15px 15px 15px 46px}.kpi-description-configuration__color-select{display:flex;align-items:center}.kpi-description-configuration__color-preview{width:100%;height:20px;border-radius:3px}.kpi-description-configuration__color-preview.with-arrow{width:calc(100% - 30px - 10px);margin-left:10px}.kpi-description-configuration__selector-arrow{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-left:1px solid;border-left-color:var(--nui-color-line-default,#d9d9d9);margin-left:10px}"]}]}],Jr.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder}]},Jr.propDecorators={componentId:[{type:n.Input}],configurableUnits:[{type:n.Input}],label:[{type:n.Input}],backgroundColor:[{type:n.Input}],units:[{type:n.Input}],backgroundColors:[{type:n.Input}],formReady:[{type:n.Output}]},function(e){e.Second="second",e.Minute="minute",e.Hour="hour"}(Xr||(Xr={}));var Qr,ea,ta,na,oa,ia,ra=((qr={})[Xr.Second]=1e3,qr[Xr.Minute]=6e4,qr[Xr.Hour]=36e5,qr),aa=((Zr={})[Xr.Hour]=$localize(Qr||(Qr=Ve([":hours unit (long):hours"],[":hours unit (long):hours"]))),Zr[Xr.Minute]=$localize(ea||(ea=Ve([":minutes unit (long):minutes"],[":minutes unit (long):minutes"]))),Zr[Xr.Second]=$localize(ta||(ta=Ve([":seconds unit (long):seconds"],[":seconds unit (long):seconds"]))),Zr),sa=((Yr={})[Xr.Hour]=$localize(na||(na=Ve([":hours unit (short):h"],[":hours unit (short):h"]))),Yr[Xr.Minute]=$localize(oa||(oa=Ve([":minutes unit (short):min"],[":minutes unit (short):min"]))),Yr[Xr.Second]=$localize(ia||(ia=Ve([":seconds unit (short):sec"],[":seconds unit (short):sec"]))),Yr);function la(e,t){return ra[e]/ra[t]}var da,ca,ua,pa,ha,ga,ma,fa=function(){function e(e,t){this.fb=e,this.cd=t,this.possibleUnits=[Xr.Second,Xr.Minute,Xr.Hour],this.unitItems=[],this.displayedUnitItems=[],this.currentUnit=null,this.valueChangeFix=d.noop,this.destroy$$=new d.Subject}return e.prototype.ngOnInit=function(){this.generateUnitItems(),this.filterUnitItems(),this.createForm()},e.prototype.ngOnDestroy=function(){this.destroy$$.next(),this.destroy$$.complete()},e.prototype.getNumberMin=function(){if(this.unitControl.value&&null!=this.minSeconds){var e=la(Xr.Second,this.unitControl.value.id);return Math.ceil(this.minSeconds*e)}},e.prototype.getNumberMax=function(){if(this.unitControl.value&&null!=this.maxSeconds){var e=la(Xr.Second,this.unitControl.value.id);return Math.floor(this.maxSeconds*e)}},e.prototype.writeValue=function(e){if(isFinite(e)&&this.isRangeValid()&&this.unitControl.value){var t=e*la(Xr.Second,this.unitControl.value.id);this.numberControl.setValue(t)}else this.numberControl.setValue(null);this.cd.markForCheck()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){e?(this.numberControl.disable({emitEvent:!1}),this.unitControl.disable({emitEvent:!1})):(this.numberControl.enable({emitEvent:!1}),this.unitControl.enable({emitEvent:!1})),this.cd.markForCheck()},e.prototype.resetUnits=function(){this.unitControl.setValue(this.displayedUnitItems[0])},e.prototype.generateUnitItems=function(){var e=this;this.possibleUnits.forEach((function(t,n){e.unitItems[n]={id:t,label:aa[t]}}))},e.prototype.filterUnitItems=function(){var e=this;this.displayedUnitItems=this.unitItems.filter((function(t){var n=!1;if(null!=e.maxSeconds){var o=la(Xr.Second,t.id);n=Math.floor(e.maxSeconds*o)<=0}return!n}))},e.prototype.createForm=function(){var e=this;this.form=this.fb.group({number:[1,[r.Validators.required]],unit:this.displayedUnitItems[0]}),this.numberControl=this.form.get("number"),this.unitControl=this.form.get("unit"),this.unitControl.value&&(this.currentUnit=this.unitControl.value.id),this.form.valueChanges.pipe(v.takeUntil(this.destroy$$)).subscribe((function(){e.updateError(),e.emitValueChange()}))},e.prototype.updateError=function(){this.isNumberValid()?this.numberControl.setErrors(null):this.numberControl.setErrors({invalidNumber:!0})},e.prototype.emitValueChange=function(){var e=this.numberControl.value,t=this.unitControl.value;if(null!=e&&null!=t){var n=e*la(t.id,Xr.Second);this.onChange&&this.onChange(n)}else this.onChange&&this.onChange(null)},e.prototype.isRangeValid=function(){return this.minSeconds<=this.maxSeconds||null==this.maxSeconds},e.prototype.isNumberValid=function(){var e=this.numberControl.value,t=this.unitControl.value;return!(e<this.minSeconds)&&(e%1==0&&(!(e*la(t.id,Xr.Second)>this.maxSeconds)&&this.isRangeValid()))},e.prototype.getNumberValidationMessage=function(){var e={min:this.getNumberMin(),max:this.getNumberMax(),whole:!0};return this.getLocalizedNumberValidationMessage(e)},e.prototype.getLocalizedNumberValidationMessage=function(e){var t,n=e.min,o=e.max;return t=e.whole?$localize(da||(da=Ve(["a whole number"],["a whole number"]))):$localize(ca||(ca=Ve(["a number"],["a number"]))),null!=n&&null!=o?n===o?$localize(ua||(ua=Ve(["Must be "," equal to ",""],["Must be "," equal to ",""])),t,n):$localize(pa||(pa=Ve(["Must be "," between "," and ",""],["Must be "," between "," and ",""])),t,n,o):null==n&&null!=o?$localize(ha||(ha=Ve(["Must be "," not larger than ",""],["Must be "," not larger than ",""])),t,o):null!=n&&null==o?$localize(ga||(ga=Ve(["Must be "," not smaller than ",""],["Must be "," not smaller than ",""])),t,n):$localize(ma||(ma=Ve(["Must be ",""],["Must be ",""])),t)},e.prototype.validate=function(){var e;return(null===(e=this.form.get("number"))||void 0===e?void 0:e.errors)||null},e}();fa.decorators=[{type:n.Component,args:[{selector:"nui-refresh-rate-configurator",template:'<form [formGroup]="form" class="d-flex flex-column">\n <div class="d-flex flex-row">\n <nui-textbox-number formControlName="number"\n customBoxWidth="90px"\n [minValue]="minSeconds"\n [maxValue]="maxSeconds"\n (valueChange)="valueChangeFix()"></nui-textbox-number>\n\n <nui-select-v2 formControlName="unit" class="ml-3">\n <nui-select-v2-option *ngFor="let item of displayedUnitItems" [value]="item">\n {{item.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </div>\n <nui-form-field [control]="form.get(\'number\')">\n <nui-validation-message for="invalidNumber">\n {{ getNumberValidationMessage() }}\n </nui-validation-message>\n </nui-form-field>\n</form>\n',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return fa})),multi:!0},{provide:r.NG_VALIDATORS,useExisting:n.forwardRef((function(){return fa})),multi:!0}],changeDetection:n.ChangeDetectionStrategy.OnPush}]}],fa.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef}]},fa.propDecorators={minSeconds:[{type:n.Input}],maxSeconds:[{type:n.Input}]};var va,ya,ba,Ca,Sa=function(){function e(e,t,o,i,r){var a=this;this.changeDetector=e,this.formBuilder=t,this.logger=o,this.refresherSettings=i,this.cd=r,this.minSeconds=1,this.maxSeconds=86400,this.overrideDefaultSettingsCaption=$localize(va||(va=Ve(["Custom refresh rate"],["Custom refresh rate"]))),this.overrideDefaultSettings=!0,this.formReady=new n.EventEmitter,this.destroyed$=new d.Subject,this.resetInterval=function(){var e;a.refreshRateComp.resetUnits(),null===(e=a.form.get("interval"))||void 0===e||e.setValue(a.interval||a.minSeconds)}}return e.prototype.ngOnInit=function(){var e,t=this;this.form=this.formBuilder.group({enabled:[!0,[r.Validators.required]],overrideDefaultSettings:[this.overrideDefaultSettings,[r.Validators.required]],interval:[null!==(e=this.interval)&&void 0!==e?e:0,[r.Validators.required]]}),this.form.statusChanges.pipe(v.takeUntil(this.destroyed$)).subscribe((function(){t.form.markAllAsTouched(),t.cd.detectChanges()})),d.combineLatest([this.form.controls.enabled.valueChanges,this.form.controls.overrideDefaultSettings.valueChanges]).pipe(v.filter((function(e){return e.some((function(e){return!e}))})),v.tap(this.resetInterval),v.takeUntil(this.destroyed$)).subscribe(),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o,i,r,a;e.enabled&&(null===(n=null===(t=this.form)||void 0===t?void 0:t.get("enabled"))||void 0===n||n.patchValue(this.enabled)),e.interval&&(null===(i=null===(o=this.form)||void 0===o?void 0:o.get("interval"))||void 0===i||i.patchValue(this.interval)),e.overrideDefaultSettings&&(null===(a=null===(r=this.form)||void 0===r?void 0:r.get("overrideDefaultSettings"))||void 0===a||a.patchValue(this.overrideDefaultSettings))},e.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},e.prototype.getHeaderSubtitle=function(){var e,t,n,o="";return(null===(e=this.form.get("enabled"))||void 0===e?void 0:e.value)?(o+=$localize(ya||(ya=Ve(["Enabled"],["Enabled"]))),o+=", ",(null===(t=this.form.get("overrideDefaultSettings"))||void 0===t?void 0:t.value)?o+=this.getDurationLabel(null===(n=this.form.get("interval"))||void 0===n?void 0:n.value):o+=$localize(ba||(ba=Ve(["Use default value"],["Use default value"])))+" ("+this.getDurationLabel(this.refresherSettings.refreshRateSeconds)+")"):o+=$localize(Ca||(Ca=Ve(["Disabled"],["Disabled"]))),o},e.prototype.getDurationLabel=function(e){var t=e,n="",o=Math.floor(t/3600);t%=3600;var i=Math.floor(t/60),r=t%60;return o>0&&(n+=o+" "+sa[Xr.Hour]+" "),i>0&&(n+=i+" "+sa[Xr.Minute]+" "),r>0&&(n+=r+" "+sa[Xr.Second]+" "),""===(n=n.trim())?"0 "+sa[Xr.Second]:n},e}();Sa.lateLoadKey="RefresherConfigurationComponent",Sa.decorators=[{type:n.Component,args:[{selector:"nui-refresher-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2"\n iconColor="gray"\n [icon]="form | nuiFormHeaderIconPipe:\'reset\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Refresh</span>\n <div class="nui-text-secondary" [title]="getHeaderSubtitle()">{{getHeaderSubtitle()}}</div>\n </div>\n </div>\n <div class="d-flex flex-column nui-refresher-configuration__accordion-content">\n <div>\n <nui-form-field [control]="form.get(\'enabled\')">\n <nui-switch formControlName="enabled" i18n>Refresh widget periodically</nui-switch>\n </nui-form-field>\n </div>\n <div [class.hidden]="!form.get(\'enabled\')?.value">\n <div class="mt-4">\n <nui-form-field [control]="form.get(\'overrideDefaultSettings\')">\n <nui-switch formControlName="overrideDefaultSettings">{{overrideDefaultSettingsCaption}}\n <div class="nui-help-hint" *ngIf="!form.get(\'overrideDefaultSettings\')?.value" i18n>\n By default, the widget will refresh\n every {{getDurationLabel(refresherSettings.refreshRateSeconds)}}.\n </div>\n </nui-switch>\n </nui-form-field>\n </div>\n <div [class.hidden]="!form.get(\'overrideDefaultSettings\')?.value" class="mt-4">\n <nui-form-field [control]="form.get(\'interval\')">\n <nui-refresh-rate-configurator [minSeconds]="minSeconds" [maxSeconds]="maxSeconds"\n formControlName="interval"></nui-refresh-rate-configurator>\n </nui-form-field>\n </div>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',styles:[".nui-refresher-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Sa.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService},{type:Jn},{type:n.ChangeDetectorRef}]},Sa.propDecorators={enabled:[{type:n.Input}],interval:[{type:n.Input}],minSeconds:[{type:n.Input}],maxSeconds:[{type:n.Input}],overrideDefaultSettingsCaption:[{type:n.Input}],overrideDefaultSettings:[{type:n.Input}],formReady:[{type:n.Output}],refreshRateComp:[{type:n.ViewChild,args:[fa]}]};var wa,Ia,Pa,Ta,xa=function(e){var t=e.get("criticalThresholdValue"),n=e.get("warningThresholdValue"),i=e.get("reversedThresholds"),r=e.get("showThresholds");if(!t)throw new Error("criticalThresholdValue formControl is not defined");if(o.removeErrors(t,"min","max"),!n)throw new Error("warningThresholdValue formControl is not defined");if(o.removeErrors(n,"min","max"),null==r?void 0:r.value){if(ee.default(n.value))return null;if(null==i?void 0:i.value){if(t.value>=n.value)return n.setErrors({min:!0}),t.setErrors({max:!0}),{thresholds:!0}}else if(t.value<=n.value)return n.setErrors({max:!0}),t.setErrors({min:!0}),{thresholds:!0}}return null},Da=function(){function e(e,t,o,i){this.changeDetector=e,this.formBuilder=t,this.logger=o,this.cd=i,this.formReady=new n.EventEmitter,this.thresholdOptions=[{value:!1,displayValue:$localize(wa||(wa=Ve(["Never show critical or warning states for this KPI"],["Never show critical or warning states for this KPI"])))},{value:!0,displayValue:$localize(Ia||(Ia=Ve(["Set custom thresholds for this widget"],["Set custom thresholds for this widget"])))}],this.destroyed$=new d.Subject}return e.prototype.ngOnInit=function(){var e=this;this.validateRadioButtonsGroupValue(),this.form=this.formBuilder.group({criticalThresholdValue:[this.criticalThresholdValue||0,[r.Validators.required]],warningThresholdValue:[this.warningThresholdValue||0],showThresholds:[this.showThresholds||!1,[r.Validators.required]],reversedThresholds:[this.reversedThresholds||!1]},{validators:xa}),this.handleWarningThreshold(this.warningThresholdValue),this.form.statusChanges.pipe(v.takeUntil(this.destroyed$)).subscribe((function(t){e.form.markAllAsTouched(),e.cd.detectChanges()})),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o,i,r=this,a=["criticalThresholdValue","warningThresholdValue","showThresholds","reversedThresholds"];if(e){try{for(var s=Re(Object.keys(e)),l=s.next();!l.done;l=s.next()){var d=l.value;if(Te.default(a,d)){var c=e[d].currentValue;c&&(null===(i=this.form)||void 0===i||i.patchValue(((o={})[d]=c,o)))}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}e.showThresholds&&setTimeout((function(){return r.validateRadioButtonsGroupValue()}))}e.warningThresholdValue&&this.handleWarningThreshold(e.warningThresholdValue.currentValue)},e.prototype.getThresholdsSubtitle=function(e){return e?$localize(Pa||(Pa=Ve(["Custom thresholds"],["Custom thresholds"]))):$localize(Ta||(Ta=Ve(["No thresholds"],["No thresholds"])))},e.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},e.prototype.validateRadioButtonsGroupValue=function(){this.radioButtonGroupValue=this.showThresholds},e.prototype.handleWarningThreshold=function(e){var t,n=null===(t=this.form)||void 0===t?void 0:t.get("warningThresholdValue");ee.default(e)&&(null==n||n.setValue(null))},e}();Da.lateLoadKey="ThresholdsConfigurationComponent",Da.decorators=[{type:n.Component,args:[{selector:"nui-thresholds-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'thresholds\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Thresholds</span>\n <div class="nui-text-secondary" [title]="getThresholdsSubtitle(form.get(\'showThresholds\')?.value)">{{getThresholdsSubtitle(form.get(\'showThresholds\')?.value)}}</div>\n </div>\n </div>\n <div class="kpi-thresholds-configuration__accordion-content">\n <nui-form-field [control]="form.get(\'showThresholds\')"\n caption="How do you want to set warning/critical thresholds?"\n i18n-caption>\n <nui-radio-group formControlName="showThresholds"\n [value]="radioButtonGroupValue"\n name="showThresholds"\n required>\n <nui-radio *ngFor="let thresholdOption of thresholdOptions"\n [value]="thresholdOption.value">\n {{thresholdOption.displayValue}}\n </nui-radio>\n </nui-radio-group>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n\n <div class="mt-4" *ngIf="form.get(\'showThresholds\')?.value">\n <div class="mb-4">\n <nui-form-field caption="Warning value" i18n-caption [control]="form.get(\'warningThresholdValue\')">\n <nui-textbox-number formControlName="warningThresholdValue"\n placeholder="Never show the warning state"\n i18n-placeholder></nui-textbox-number>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n <nui-validation-message for="min" i18n>\n Warning threshold should be greater than critical threshold\n </nui-validation-message>\n <nui-validation-message for="max" i18n>\n Warning threshold should be lower than critical threshold\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Critical value" i18n-caption [control]="form.get(\'criticalThresholdValue\')">\n <nui-textbox-number formControlName="criticalThresholdValue"\n placeholder="Set critical value"\n i18n-placeholder></nui-textbox-number>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n <nui-validation-message for="min" i18n>\n Critical threshold should be greater than warning threshold\n </nui-validation-message>\n <nui-validation-message for="max" i18n>\n Critical threshold should be lower than warning threshold\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <nui-form-field caption="Warning and critical when below threshold values" i18n-caption\n [control]="form.get(\'reversedThresholds\')"\n [showOptionalText]="false">\n <nui-checkbox formControlName="reversedThresholds" required></nui-checkbox>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".kpi-thresholds-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Da.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService},{type:n.ChangeDetectorRef}]},Da.propDecorators={criticalThresholdValue:[{type:n.Input}],warningThresholdValue:[{type:n.Input}],showThresholds:[{type:n.Input}],reversedThresholds:[{type:n.Input}],formReady:[{type:n.Output}]};var _a,za,Oa,Ea,ka,Ra,Aa,Fa,Va=function(){function t(t,o,i,a){this.changeDetector=t,this.configuratorHeading=o,this.formBuilder=i,this.eventBus=a,this.legendPlacements=[],this.timeSpans=[],this.availableChartTypes=[{label:$localize(_a||(_a=Ve(["Line"],["Line"]))),value:e.TimeseriesChartPreset.Line},{label:$localize(za||(za=Ve(["Stacked area"],["Stacked area"]))),value:e.TimeseriesChartPreset.StackedArea},{label:$localize(Oa||(Oa=Ve(["Stacked % area"],["Stacked % area"]))),value:e.TimeseriesChartPreset.StackedPercentageArea},{label:$localize(Ea||(Ea=Ve(["Bar"],["Bar"]))),value:e.TimeseriesChartPreset.StackedBar},{label:$localize(ka||(ka=Ve(["Status"],["Status"]))),value:e.TimeseriesChartPreset.StatusBar}],this.formReady=new n.EventEmitter,this.destroy$=new d.Subject,this.form=this.formBuilder.group({leftAxisLabel:[""],startingTimespan:[null,r.Validators.required],legendPlacement:[e.LegendPlacement.None,[r.Validators.required]],preset:[e.TimeseriesChartPreset.Line,[r.Validators.required]]})}return t.prototype.ngOnInit=function(){var e,t=this;null===(e=this.form.get("startingTimespan"))||void 0===e||e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){setTimeout((function(){t.eventBus.next(st,{payload:{id:Ye}})}))})),this.formReady.emit(this.form)},t.prototype.ngOnChanges=function(e){var t,n,o,i,r=this.form.get("startingTimespan");e.leftAxisLabel&&(null===(t=this.form.get("leftAxisLabel"))||void 0===t||t.setValue(this.leftAxisLabel,{emitEvent:!1})),e.startingTimespan&&(null==r||r.setValue(this.startingTimespan,{emitEvent:!1})),e.legendPlacement&&(null===(n=this.form.get("legendPlacement"))||void 0===n||n.setValue(this.legendPlacement,{emitEvent:!1})),e.preset&&(null===(o=this.form.get("preset"))||void 0===o||o.setValue(this.preset,{emitEvent:!1})),e.timeSpans&&!(null==r?void 0:r.value)&&(null===(i=this.timeSpans)||void 0===i?void 0:i.length)>0&&(null==r||r.setValue(this.timeSpans[0]))},t.prototype.getSecondaryText=function(){var e=this.form.controls.startingTimespan.value;return(e&&e.name||$localize(Ra||(Ra=Ve(["No timespan"],["No timespan"]))))+", "+(this.form.controls.legendPlacement.value||$localize(Aa||(Aa=Ve(["No legend"],["No legend"]))))+", "+(this.form.controls.leftAxisLabel.value||$localize(Fa||(Fa=Ve(["No y-axis label"],["No y-axis label"]))))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t}();Va.lateLoadKey="TimeseriesMetadataConfigurationComponent",Va.decorators=[{type:n.Component,args:[{selector:"nui-timeseries-metadata-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon [icon]="form | nuiFormHeaderIconPipe:\'edit\' | async"\n [iconColor]="form | nuiFormHeaderIconPipe:\'gray\':\'\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4">\n <span class="nui-text-label" i18n>Timeseries metadata</span>\n <div class="nui-text-secondary" [title]="getSecondaryText()">{{getSecondaryText()}}</div>\n </div>\n </div>\n <div class="timeseries-metadata-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Starting timespan"\n i18n-caption\n [control]="form.controls[\'startingTimespan\']">\n <nui-select-v2 placeholder="Starting Timespan" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="startingTimespan">\n <nui-select-v2-option *ngFor="let timeSpan of timeSpans" [value]="timeSpan">\n {{timeSpan.name}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Chart legend"\n i18n-caption\n [control]="form.controls[\'legendPlacement\']">\n <nui-select-v2 placeholder="Select Legend Orientation" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="legendPlacement">\n <nui-select-v2-option *ngFor="let legendPlacement of legendPlacements" [value]="legendPlacement.id">\n {{legendPlacement.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Chart y-axis label" i18n-caption [control]="form.controls[\'leftAxisLabel\']">\n\n <nui-textbox formControlName="leftAxisLabel"\n placeholder="Set chart y-axis label"\n i18n-placeholder></nui-textbox>\n\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <nui-form-field caption="Chart type" i18n-caption [control]="form.controls[\'preset\']">\n\n <nui-select-v2 placeholder="Chart type" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="preset">\n <nui-select-v2-option *ngFor="let option of availableChartTypes"\n [value]="option.value">{{option.label}}</nui-select-v2-option>\n </nui-select-v2>\n\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n</nui-widget-editor-accordion>\n',styles:[".timeseries-metadata-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Va.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Va.propDecorators={legendPlacements:[{type:n.Input}],timeSpans:[{type:n.Input}],startingTimespan:[{type:n.Input}],legendPlacement:[{type:n.Input}],leftAxisLabel:[{type:n.Input}],preset:[{type:n.Input}],availableChartTypes:[{type:n.Input}],formReady:[{type:n.Output}]};var La,Ba,Na=function(){function e(e,t,o){this.changeDetector=e,this.formBuilder=t,this.logger=o,this.formReady=new n.EventEmitter,this.form=this.formBuilder.group({title:["",r.Validators.required],subtitle:[""],url:[""],description:[""],collapsible:[!1],collapsed:[!0]})}return e.prototype.ngOnInit=function(){this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o,i,r;e.title&&(null===(t=this.form.get("title"))||void 0===t||t.setValue(this.title)),e.url&&(null===(n=this.form.get("url"))||void 0===n||n.setValue(this.url)),e.subtitle&&(null===(o=this.form.get("subtitle"))||void 0===o||o.setValue(this.subtitle)),e.description&&(null===(i=this.form.get("description"))||void 0===i||i.setValue(this.description)),e.collapsible&&(null===(r=this.form.get("collapsible"))||void 0===r||r.setValue(this.collapsible))},e.prototype.getSecondaryText=function(){return(this.form.controls.title.value||$localize(La||(La=Ve(["No title"],["No title"]))))+", "+(this.form.controls.subtitle.value||$localize(Ba||(Ba=Ve(["no subtitle"],["no subtitle"]))))},e}();Na.lateLoadKey="TitleAndDescriptionConfigurationComponent",Na.decorators=[{type:n.Component,args:[{selector:"nui-title-and-description-configuration",template:'<nui-widget-editor-accordion [formGroup]="form" [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'widget_list\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Title and Description</span>\n <div [title]="getSecondaryText()" class="nui-text-secondary">{{getSecondaryText()}}</div>\n </div>\n </div>\n <div class="title-and-description-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Widget title" i18n-caption [control]="form.get(\'title\')">\n \x3c!-- TODO: remove "kpi" prefix in v11 - NUI-5833--\x3e\n <nui-textbox id="kpi-widget-title" formControlName="title" placeholder="Set widget title" i18n-placeholder></nui-textbox>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Widget subtitle" i18n-caption [control]="form.get(\'subtitle\')">\n \x3c!-- TODO: remove "kpi" prefix in v11 - NUI-5833 --\x3e\n <nui-textbox id="kpi-widget-subtitle" formControlName="subtitle" placeholder="Do not show a subtitle" i18n-placeholder></nui-textbox>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Widget link URL" i18n-caption [control]="form.get(\'url\')">\n \x3c!-- TODO: remove "kpi" prefix in v11 - NUI-5833--\x3e\n <nui-textbox id="kpi-widget-url" formControlName="url" placeholder="Do not link to another page" i18n-placeholder></nui-textbox>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Widget description" i18n-caption\n [control]="form.get(\'description\')"\n hint="This won\'t be shown on the widget, but can be helpful for\n other users who want to re-use this widget on their own dashboards" i18n-hint>\n <nui-textbox formControlName="description" placeholder="No description" i18n-placeholder></nui-textbox>\n </nui-form-field>\n </div>\n <div>\n <nui-form-field caption="Hide widget header" [showOptionalText]="false" i18n-caption [control]="form.get(\'collapsible\')">\n <nui-checkbox formControlName="collapsible" i18n>Collapsible</nui-checkbox>\n </nui-form-field>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".title-and-description-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Na.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService}]},Na.propDecorators={title:[{type:n.Input}],url:[{type:n.Input}],subtitle:[{type:n.Input}],description:[{type:n.Input}],collapsible:[{type:n.Input}],formReady:[{type:n.Output}]};var $a=function(){function e(e,t){this.changeDetector=e,this.formBuilder=t,this.formReady=new n.EventEmitter,this.form=this.formBuilder.group({dataFieldIds:this.formBuilder.group({icon:"",status:"",detailedUrl:"",label:"",url:""})})}return e.prototype.ngOnInit=function(){this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){e.dataFieldIds&&this.getFieldMappingsControl.setValue(e.dataFieldIds.currentValue)},Object.defineProperty(e.prototype,"getFieldMappingsControl",{get:function(){return this.form.get("dataFieldIds")},enumerable:!1,configurable:!0}),e}();$a.lateLoadKey="EntityFormattingComponent",$a.decorators=[{type:n.Component,args:[{selector:"nui-entity-formatting-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="\'tag\'" iconColor="gray"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Entity formatting</span>\n <div class="nui-text-secondary"\n title="Show status icon">\n Show status icon\n </div>\n </div>\n </div>\n <div class="entity-formatting__accordion-content" formGroupName="dataFieldIds">\n <div class="mb-3">\n <label class="nui-text-label" i18n>Icon</label>\n <div class="d-flex flex-grow-1">\n <nui-form-field class="d-flex flex-grow-1" [control]="getFieldMappingsControl.get(\'icon\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n formControlName="icon">\n <nui-select-v2-option *ngFor="let item of mappingKeys" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n </div>\n <div class="mb-3">\n <label class="nui-text-label" i18n>Status</label>\n <div class="d-flex flex-grow-1">\n <nui-form-field class="d-flex flex-grow-1" [control]="getFieldMappingsControl.get(\'status\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n formControlName="status">\n <nui-select-v2-option *ngFor="let item of mappingKeys" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n </div>\n <div class="mb-3">\n <label class="nui-text-label" i18n>Details URL</label>\n <div class="d-flex flex-grow-1">\n <nui-form-field class="d-flex flex-grow-1" [control]="getFieldMappingsControl.get(\'detailedUrl\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n formControlName="detailedUrl">\n <nui-select-v2-option *ngFor="let item of mappingKeys" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n </div>\n <div class="mb-3">\n <label class="nui-text-label" i18n>Label</label>\n <div class="d-flex flex-grow-1">\n <nui-form-field class="d-flex flex-grow-1" [control]="getFieldMappingsControl.get(\'label\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n formControlName="label">\n <nui-select-v2-option *ngFor="let item of mappingKeys" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n </div>\n <div class="mb-3">\n <label class="nui-text-label" i18n>Label URL</label>\n <div class="d-flex flex-grow-1">\n <nui-form-field class="d-flex flex-grow-1" [control]="getFieldMappingsControl.get(\'url\')">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n formControlName="url">\n <nui-select-v2-option *ngFor="let item of mappingKeys" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n </div>\n </div>\n</nui-widget-editor-accordion>\n',styles:["\n .entity-formatting__accordion-content {\n padding: 15px 15px 15px 46px;\n }\n "]}]}],$a.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder}]},$a.propDecorators={mappingKeys:[{type:n.Input}],dataFieldIds:[{type:n.Input}],formReady:[{type:n.Output}]};var ja,Ka,Wa=function(){function e(e,t,o){this.changeDetector=e,this.formBuilder=t,this.eventBus=o,this.formReady=new n.EventEmitter,this.form=this.formBuilder.group({groups:[],groupBy:this.formBuilder.array([]),drillstate:[void 0]}),this.destroy$=new d.Subject}return Object.defineProperty(e.prototype,"getGroupByControl",{get:function(){return this.form.get("groupBy")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getDrillStateControl",{get:function(){return this.form.get("drillstate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getGroupsControl",{get:function(){return this.form.get("groups")},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.eventBus.getStream(Pn).pipe(v.takeUntil(this.destroy$)).subscribe((function(t){return e.onDataSourceCreated(t)})),this.getGroupByControl.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(){return e.fillGroupsOptions()})),this.fillGroupsOptions(),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t=this;e.groups&&this.getGroupsControl.setValue(e.groups.currentValue),e.groupBy&&!e.groupBy.firstChange&&(this.getGroupByControl.clear(),this.groupBy.forEach((function(e){return t.getGroupByControl.push(t.createControl(e))})),this.fillGroupsOptions())},e.prototype.createControl=function(e){return this.formBuilder.control(e||"",r.Validators.required)},e.prototype.addGrouping=function(){var e=this.createControl();this.getGroupByControl.push(e),this.fillGroupsOptions();var t=this.getGroupByControl.controls.length-1;e.setValue(this.selectData[t][0])},e.prototype.removeRule=function(e){this.getGroupByControl.removeAt(e),this.fillGroupsOptions()},e.prototype.isAddRestricted=function(){return this.selectData.some((function(e){return 1===e.length}))},e.prototype.getSubtitle=function(){var e,t=this.getGroupByControl.controls.map((function(e,t){return(0===t?"By":"then")+" "+e.value})).join(", ");return 0===(null===(e=this.getGroupByControl)||void 0===e?void 0:e.value.length)?$localize(ja||(ja=Ve(["No groups"],["No groups"]))):$localize(Ka||(Ka=Ve(["",""],["",""])),t)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.onDataSourceCreated=function(e){var t,n,o,i=this;null===(o=null===(n=null===(t=null==e?void 0:e.payload)||void 0===t?void 0:t.dataFieldsConfig)||void 0===n?void 0:n.dataFields$)||void 0===o||o.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var t;if(e){var n=e.map((function(e){return e.id}));!he.default(i.groups,n).length&&(null===(t=i.groups)||void 0===t?void 0:t.length)||(i.groups=n,i.getGroupsControl.setValue(n),i.getGroupByControl.clear(),i.getDrillStateControl.setValue([]),i.fillGroupsOptions())}}))},e.prototype.fillGroupsOptions=function(){var e=this;this.selectData=[];var t=this.getGroupByControl.value;this.getGroupByControl.controls.forEach((function(n,o){e.selectData[o]=[];var i=he.default(e.groups,t);t[o]&&e.selectData[o].push(t[o]),e.selectData[o]=Fe(e.selectData[o],i)}))},e}();Wa.lateLoadKey="DrilldownConfiguratorComponent",Wa.decorators=[{type:n.Component,args:[{selector:"nui-grouping-configuration",template:'<nui-widget-editor-accordion [formGroup]="form"\n [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="\'tag\'" iconColor="gray"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Grouping</span>\n <div class="nui-text-secondary"\n [title]="getSubtitle()">\n {{ getSubtitle() }}\n </div>\n </div>\n </div>\n <div class="grouping-configuration__accordion-content" formArrayName="groupBy">\n <ng-container *ngFor="let group of getGroupByControl.controls; index as i;">\n <label *ngIf="i !== 0" class="d-flex nui-text-secondary mb-1" i18n>Then</label>\n <label *ngIf="i === 0" class="d-flex nui-text-panel mb-2" i18n>Group by</label>\n <div class="d-flex flex-row flex-grow-1 mb-4">\n <nui-form-field [control]="group" class="d-flex flex-grow-1">\n <nui-select-v2 placeholder="Select Item"\n i18n-placeholder\n [formControlName]="i">\n <nui-select-v2-option *ngFor="let item of selectData[i]" [value]="item">\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <div class="justify-content-center">\n <button nui-button\n icon="delete"\n displayStyle="action"\n type="button"\n (click)="removeRule(i)">\n </button>\n </div>\n </div>\n </ng-container>\n <button nui-button\n icon="add"\n displayStyle="action"\n type="button"\n i18n\n *ngIf="!this.isAddRestricted()"\n (click)="addGrouping()">\n Add another level\n </button>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:["\n .grouping-configuration__accordion-content {\n padding: 15px 15px 15px 46px;\n }\n "]}]}],Wa.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Wa.propDecorators={groups:[{type:n.Input}],groupBy:[{type:n.Input}],formReady:[{type:n.Output}]};var Ma=function(){function t(e,t,o,i){this.pizzagnaService=e,this.changeDetector=t,this.formBuilder=o,this.eventBus=i,this.tiles=[],this.formReady=new n.EventEmitter}return t.prototype.ngOnChanges=function(e){},t.prototype.onFormReady=function(e){this.form=this.formBuilder.group({tiles:e}),this.emptyItems$=this.form.valueChanges.pipe(v.map((function(e){return 0===e.tiles.length}))),this.formReady.emit(this.form)},t.prototype.onItemsChange=function(t){var n=t.map((function(e){return e.id}));this.pizzagnaService.createComponentsFromTemplate("tiles",n);var o={componentId:this.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["tiles"]};this.pizzagnaService.setProperty(o,t)},t.prototype.addTile=function(){this.onItemsChange(Fe(this.tiles,[{id:o.uuid("kpi"),componentType:nn.lateLoadKey}]))},t}();Ma.lateLoadKey="KpiTilesConfigurationComponent",Ma.decorators=[{type:n.Component,args:[{selector:"nui-kpi-tiles-configuration-component",template:'<nui-items-dynamic\n [items]="tiles"\n [nodes]="nodes"\n (itemsChange)="onItemsChange($event)"\n (formReady)="onFormReady($event)"\n></nui-items-dynamic>\n\n<div class="pl-4 pr-4" *ngIf="(emptyItems$ | async) && form.touched">\n <nui-message type="critical" [allowDismiss]="false" i18n>\n <b>At least one value must be added.</b>\n </nui-message>\n</div>\n\n<button nui-button\n icon="add"\n displayStyle="action"\n id="kpi-widget-add-indicator-btn"\n type="button"\n class="ml-4 mb-4"\n (click)="addTile()"\n i18n>Add new value\n</button>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ma.ctorParameters=function(){return[{type:an},{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Ma.propDecorators={componentId:[{type:n.Input}],tiles:[{type:n.Input}],nodes:[{type:n.Input}],formReady:[{type:n.Output}]};var Ua=function(){function e(e,t,o){this.changeDetector=e,this.formBuilder=t,this.logger=o,this.formReady=new n.EventEmitter,this.form=this.formBuilder.group({activeMetricId:[]})}return e.prototype.ngOnInit=function(){this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t;e.activeMetricId&&(null===(t=this.form.get("activeMetricId"))||void 0===t||t.setValue(e.activeMetricId.currentValue),this.metrics.find((function(t){return t.id===e.activeMetricId.currentValue}))||this.logger.warn("AggregatorMetricSelectorConfigurationComponent: No metric found for id: "+e.activeMetricId.currentValue))},e.prototype.unsetMetric=function(){this.form.controls.activeMetricId.reset(),this.meticsSelect.hideDropdown()},e}();Ua.lateLoadKey="AggregatorMetricSelectorConfigurationComponent",Ua.decorators=[{type:n.Component,args:[{selector:"nui-aggregator-configurator",template:'<div *ngIf="form" [formGroup]="form">\n <div>\n <nui-form-field caption="Default Metric"\n i18n-caption\n class="mb-3"\n [control]="form.controls[\'activeMetricId\']">\n <nui-select-v2\n #metricsSelect\n formControlName="activeMetricId"\n placeholder="Select Value"\n i18n-placeholder>\n <nui-overlay-item (click)="unsetMetric()" class="nui-combobox-v2__popup-box" style="cursor: pointer;">Unset</nui-overlay-item>\n <nui-select-v2-option *ngFor="let metric of metrics"\n [displayValueContext]="metric.label"\n [value]="metric.id">\n {{metric.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ua.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService}]},Ua.propDecorators={metrics:[{type:n.Input}],activeMetricId:[{type:n.Input}],formReady:[{type:n.Output}],meticsSelect:[{type:n.ViewChild,args:["metricsSelect"]}]};var Ha={id:"data[0]",label:"data",dataType:null},Ga=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o)||this;return r.eventBus=i,r.chartSeriesDataFields=[Ha],r.form=r.formBuilder.group({activeMetricId:[],chartSeriesDataFieldId:[]}),r.destroy$=new d.Subject,r.eventBus.getStream(Pn).pipe(v.takeUntil(r.destroy$)).subscribe((function(e){var t,n,o=e.payload;o&&(null===(n=null===(t=o.dataFieldsConfig)||void 0===t?void 0:t.chartSeriesDataFields$)||void 0===n||n.pipe(v.takeUntil(r.destroy$)).subscribe((function(e){return r.chartSeriesDataFields=e})))})),r}return ke(t,e),t.prototype.ngOnChanges=function(t){var n;e.prototype.ngOnChanges.call(this,t),t.chartSeriesDataFieldId&&(null===(n=this.form.get("chartSeriesDataFieldId"))||void 0===n||n.setValue(t.chartSeriesDataFieldId.currentValue))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t}(Ua);Ga.lateLoadKey="FieldMapperAggregatorConfiguratorComponent",Ga.decorators=[{type:n.Component,args:[{selector:"nui-field-mapper-aggregator-configurator",template:'<div *ngIf="form" [formGroup]="form">\n\n <div class="mb-4">\n <nui-form-field caption="Default Metric"\n i18n-caption\n class="mb-4"\n [control]="form.controls[\'activeMetricId\']">\n <nui-select-v2 formControlName="activeMetricId"\n #metricsSelect\n placeholder="Select Value"\n i18n-placeholder>\n <nui-overlay-item (click)="unsetMetric()" class="nui-combobox-v2__popup-box" style="cursor: pointer;">Unset</nui-overlay-item>\n <nui-select-v2-option *ngFor="let metric of metrics"\n [displayValueContext]="metric.label"\n [value]="metric.id">\n {{metric.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Chart Series Data Field"\n i18n-caption\n class="mb-4"\n [control]="form.controls[\'chartSeriesDataFieldId\']">\n <nui-select-v2 formControlName="chartSeriesDataFieldId"\n placeholder="Select Value" i18n-placeholder>\n <nui-select-v2-option *ngFor="let chartSeriesDataField of chartSeriesDataFields"\n [displayValueContext]="chartSeriesDataField.label"\n [value]="chartSeriesDataField.id">\n {{chartSeriesDataField.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ga.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:r.FormBuilder},{type:o.LoggerService},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Ga.propDecorators={chartSeriesDataFieldId:[{type:n.Input}]};var qa,Za=function(){function e(e,t,o,i){var a=this;this.changeDetector=e,this.configuratorHeading=t,this.formBuilder=o,this.formReady=new n.EventEmitter,this.form=this.formBuilder.group({type:[void 0,r.Validators.required],legendPlacement:[void 0],legendFormatter:this.formBuilder.group({componentType:[void 0]})}),this.chartTypeChanged$=new d.Subject,this.destroy$=new d.Subject,this.legendFormatters=i.getItems(),this.form.controls.type.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){return a.chartTypeChanged$.next(e)}))}return e.prototype.ngOnInit=function(){this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t;e.type&&this.form.controls.type.setValue(e.type.currentValue),e.legendPlacement&&this.form.controls.legendPlacement.setValue(e.legendPlacement.currentValue),e.legendFormatter&&(null===(t=this.form.get("legendFormatter.componentType"))||void 0===t||t.setValue(e.legendFormatter.currentValue.componentType))},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.chartTypeChanged$.complete()},Object.defineProperty(e.prototype,"chartTitle",{get:function(){var e,t=null===(e=this.form.get("type"))||void 0===e?void 0:e.value,n=this.chartTypes.find((function(e){return e.id===t}));return null==n?void 0:n.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"legendFormatterControl",{get:function(){return this.form.get("legendFormatter.componentType")},enumerable:!1,configurable:!0}),e}();Za.lateLoadKey="ProportionalChartOptionsEditorV2Component",Za.decorators=[{type:n.Component,args:[{selector:"nui-proportional-chart-options-editor-v2-component",template:'<nui-widget-editor-accordion [formGroup]="form" [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'widget_pie-chart\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Chart Options</span>\n <div class="nui-text-secondary" [title]="chartTitle">\n {{ chartTitle }}\n </div>\n </div>\n </div>\n <div class="proportional-widget-chart-options-configuration__accordion-content">\n\n \x3c!-- chart type --\x3e\n <div class="mb-4">\n <nui-form-field caption="Chart Type" i18n-caption\n [control]="form.controls[\'type\']"\n >\n <nui-select-v2 placeholder="Select chart type"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="type"\n i18n-placeholder>\n <nui-select-v2-option *ngFor="let chartType of chartTypes"\n [displayValueContext]="chartType.label"\n [value]="chartType.id">\n {{chartType.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n \x3c!-- legend placement --\x3e\n <div class="mb-4">\n <nui-form-field caption="Legend" i18n-caption\n [showOptionalText]="false"\n [control]="form.controls[\'legendPlacement\']">\n <nui-select-v2 formControlName="legendPlacement" [popupViewportMargin]="configuratorHeading.height$ | async">\n <nui-select-v2-option *ngFor="let option of legendPlacementOptions" [value]="option.id">\n {{option.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n \x3c!-- legend formatter --\x3e\n <div class="mb-4">\n <ng-container formGroupName="legendFormatter">\n <nui-form-field caption="Legend format" i18n-caption\n [showOptionalText]="false"\n [control]="legendFormatterControl">\n <nui-select-v2 formControlName="componentType" [popupViewportMargin]="configuratorHeading.height$ | async">\n <nui-select-v2-option *ngFor="let legendFormatter of legendFormatters"\n [value]="legendFormatter.componentType">\n {{legendFormatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </ng-container>\n </div>\n </div>\n</nui-widget-editor-accordion>\n\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".proportional-widget-chart-options-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Za.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:Po}]},Za.propDecorators={type:[{type:n.Input}],legendPlacement:[{type:n.Input}],legendFormatter:[{type:n.Input}],chartTypes:[{type:n.Input}],legendPlacementOptions:[{type:n.Input}],formReady:[{type:n.Output}]};var Ya,Xa,Ja,Qa,es,ts=((qa={})[e.ProportionalWidgetChartTypes.DonutChart]=$localize(Ya||(Ya=Ve(["Donut"],["Donut"]))),qa[e.ProportionalWidgetChartTypes.PieChart]=$localize(Xa||(Xa=Ve(["Pie"],["Pie"]))),qa[e.ProportionalWidgetChartTypes.VerticalBarChart]=$localize(Ja||(Ja=Ve(["Vertical Bar"],["Vertical Bar"]))),qa[e.ProportionalWidgetChartTypes.HorizontalBarChart]=$localize(Qa||(Qa=Ve(["Horizontal Bar"],["Horizontal Bar"]))),qa),ns=function(){function t(t,o,i){this.changeDetector=t,this.configuratorHeading=o,this.formBuilder=i,this.legendPlacement=e.LegendPlacement.None,this.formReady=new n.EventEmitter,this.chartTypeNamesMap=ts,this.legendFormatters=[],this.contentFormatters=[],this.formatterHasConfigurationComponent=!1,this.currentConfigurationComponent="",this.chartFormatters=[],this.cachedChartOptionsViewModels=[],this.rawFormatter={componentType:"",label:$localize(es||(es=Ve(["Raw"],["Raw"]))),dataTypes:{value:null}}}return Object.defineProperty(t.prototype,"chartTypeSelectViewModels",{get:function(){var e,t,n,o=this;return this.cachedChartOptionsViewModels&&this.cachedChartOptionsViewModels.length===(null===(t=null===(e=this.chartOptions)||void 0===e?void 0:e.chartTypes)||void 0===t?void 0:t.length)||(this.cachedChartOptionsViewModels=((null===(n=this.chartOptions)||void 0===n?void 0:n.chartTypes)||[]).map((function(e){return{label:o.chartTypeNamesMap[e],value:e}}))),this.cachedChartOptionsViewModels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chartTitle",{get:function(){return this.chartTypeNamesMap[this.form.controls.type.value]},enumerable:!1,configurable:!0}),t.prototype.getConfigurationComponent=function(){var e;return(null===(e=this.getCurrentFormatterDefinition())||void 0===e?void 0:e.configurationComponent)||""},t.prototype.getConfigurationComponentProperties=function(){this.configurationComponentProperties={contentFormatterProperties:this.contentFormatterProperties,contentFormatterDefinition:this.getCurrentFormatterDefinition(),dsOutput:this.dsOutput}},t.prototype.getCurrentFormatterDefinition=function(){var e,t=null===(e=this.form.get("contentFormatter.componentType"))||void 0===e?void 0:e.value;return this.contentFormatters.find((function(e){return e.componentType===t}))},t.prototype.ngOnInit=function(){this.form=this.formBuilder.group({type:[this.chartType||"",r.Validators.required],legendPlacement:this.legendPlacement,legendFormatter:this.formBuilder.group({componentType:this.legendFormatterComponentType||this.rawFormatter.componentType}),contentFormatter:this.formBuilder.group({componentType:this.contentFormatterComponentType})}),this.legendFormatters=Fe([this.rawFormatter],this.chartOptions.legendFormatters||[]),this.contentFormatters=Fe(this.chartOptions.contentFormatters||[]),this.formReady.emit(this.form)},t.prototype.ngOnChanges=function(e){var t,n,o,i;e.chartType&&!e.chartType.isFirstChange()&&(null===(t=this.form.get("type"))||void 0===t||t.setValue(e.chartType.currentValue)),e.legendPlacement&&!e.legendPlacement.isFirstChange()&&(null===(n=this.form.get("legendPlacement"))||void 0===n||n.setValue(e.legendPlacement.currentValue)),e.legendFormatterComponentType&&!e.legendFormatterComponentType.isFirstChange()&&(null===(o=this.form.get("legendFormatter").get("componentType"))||void 0===o||o.setValue(this.legendFormatterComponentType)),e.contentFormatterComponentType&&!e.contentFormatterComponentType.isFirstChange()&&(null===(i=this.form.get("contentFormatter").get("componentType"))||void 0===i||i.setValue(this.contentFormatterComponentType)),this.form&&this.getConfigurationComponentProperties()},t.prototype.onFormReady=function(e){this.form.get("contentFormatter").setControl("properties",e)},t}();ns.lateLoadKey="ProportionalChartOptionsEditorComponent",ns.decorators=[{type:n.Component,args:[{selector:"nui-proportional-chart-options-editor-component",template:'<nui-widget-editor-accordion [formGroup]="form" [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'widget_pie-chart\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Chart Options</span>\n <div class="nui-text-secondary" [title]="chartTitle">\n {{ chartTitle }}\n </div>\n </div>\n </div>\n <div class="proportional-widget-chart-options-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Chart Type" i18n-caption\n [control]="form.controls[\'type\']">\n <nui-select-v2 formControlName="type"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n placeholder="Select chart type"\n i18n-placeholder>\n <nui-select-v2-option *ngFor="let chartTypeSelectViewModel of chartTypeSelectViewModels"\n [value]="chartTypeSelectViewModel.value">\n {{chartTypeSelectViewModel.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n \x3c!-- Donut chart content formatter --\x3e\n <div class="mb-4">\n <ng-container formGroupName="contentFormatter" *ngIf="form.get(\'type\')?.value === \'DonutChart\'">\n <nui-form-field caption="Content format" i18n-caption\n class="mb-4"\n [showOptionalText]="false"\n [control]="form.controls[\'componentType\']">\n <nui-select-v2 formControlName="componentType" [popupViewportMargin]="configuratorHeading.height$ | async">\n <nui-select-v2-option *ngFor="let contentFormatter of contentFormatters"\n [value]="contentFormatter.componentType">\n {{contentFormatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n\n \x3c!-- Donut formatter configurator\'s portal goes here. Make form working in scope of NUI-5014 --\x3e\n <ng-container *ngIf="!!this.getConfigurationComponent()"\n nuiComponentPortal\n [componentId]="this.getConfigurationComponent()"\n [componentType]="this.getConfigurationComponent()"\n [properties]="configurationComponentProperties"\n #componentPortal="nuiComponentPortal"\n [outputs]="[\'formReady\']"\n (output)="onFormReady($event.payload)">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </ng-container>\n </div>\n\n <div class="mb-4">\n <nui-form-field caption="Legend" i18n-caption\n [showOptionalText]="false"\n [control]="form.controls[\'legendPlacement\']">\n <nui-select-v2 formControlName="legendPlacement" [popupViewportMargin]="configuratorHeading.height$ | async">\n <nui-select-v2-option *ngFor="let option of chartOptions.legendPlacementOptions" [value]="option.id">\n {{option.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n <ng-container formGroupName="legendFormatter">\n <nui-form-field caption="Legend format" i18n-caption\n [showOptionalText]="false"\n [control]="form.controls[\'componentType\']">\n <nui-select-v2 formControlName="componentType" [popupViewportMargin]="configuratorHeading.height$ | async">\n <nui-select-v2-option *ngFor="let legendFormatter of legendFormatters"\n [value]="legendFormatter.componentType">\n {{legendFormatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </ng-container>\n </div>\n</nui-widget-editor-accordion>\n\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".proportional-widget-chart-options-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],ns.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder}]},ns.propDecorators={chartOptions:[{type:n.Input}],chartType:[{type:n.Input}],legendPlacement:[{type:n.Input}],legendFormatterComponentType:[{type:n.Input}],contentFormatterComponentType:[{type:n.Input}],contentFormatterProperties:[{type:n.Input}],dsOutput:[{type:n.Input}],formReady:[{type:n.Output}]};var os=function(){function t(e,t,o,i,r){this.formBuilder=e,this.changeDetector=t,this.eventBus=o,this.contentFormattersRegistry=i,this.aggregatorRegistry=r,this.formReady=new n.EventEmitter,this.shown=!0,this.form=this.formBuilder.group({formatter:this.formBuilder.group({componentType:[void 0],properties:[]}),aggregator:this.formBuilder.group({aggregatorType:[void 0],properties:[]})}),this.dataFields=[],this.destroy$=new d.Subject}return t.prototype.ngOnInit=function(){var e=this;this.watchFormChanges(),this.setFromRegistry(),this.eventBus.getStream(Pn).pipe(v.takeUntil(this.destroy$)).subscribe((function(t){var n,o=t.payload;o&&(null===(n=o.dataFieldsConfig)||void 0===n||n.dataFields$.pipe(v.takeUntil(e.destroy$)).subscribe((function(t){e.dataFields=t,e.updateAggregatorConfiguratorProps()})))})),this.formReady.emit(this.form)},t.prototype.ngOnChanges=function(t){var n,o;if(t.formatter&&(null===(n=this.form.get("formatter"))||void 0===n||n.patchValue(Object.assign({},t.formatter.currentValue))),t.aggregator&&(null===(o=this.form.get("aggregator"))||void 0===o||o.patchValue(Object.assign({},t.aggregator.currentValue))),t.chartType){var i=t.chartType.currentValue;this.shown=i===e.ProportionalWidgetChartTypes.DonutChart}},t.prototype.ngOnDestroy=function(){this.destroy$.complete()},t.prototype.onFormReady=function(e,t){this.form.get(e).setControl("properties",t)},Object.defineProperty(t.prototype,"subtitleText",{get:function(){var e,t;return(null===(e=this.currentAggregatorDefinition)||void 0===e?void 0:e.label)+", "+(null===(t=this.currentFormatterDefinition)||void 0===t?void 0:t.label)},enumerable:!1,configurable:!0}),t.prototype.setFromRegistry=function(){var e,t,n=this;this.formatters=this.contentFormattersRegistry.getItems(),this.aggregators=this.aggregatorRegistry.getItems();var o=this.formatters.find((function(e){var t;return e.componentType===(null===(t=n.formatter)||void 0===t?void 0:t.componentType)}));o||(o=this.formatters[0]),null===(e=this.form.get("formatter.componentType"))||void 0===e||e.setValue(o.componentType);var i=this.aggregators.find((function(e){var t;return e.aggregatorType===(null===(t=n.aggregator)||void 0===t?void 0:t.aggregatorType)}));i||(i=this.aggregators[0]),null===(t=this.form.get("aggregator.aggregatorType"))||void 0===t||t.setValue(i.aggregatorType)},t.prototype.watchFormChanges=function(){var e,t,n=this;null===(e=this.form.get("aggregator.aggregatorType"))||void 0===e||e.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){n.currentAggregatorDefinition=n.aggregators.find((function(t){return t.aggregatorType===e})),n.updateAggregatorConfiguratorProps()})),null===(t=this.form.get("formatter.componentType"))||void 0===t||t.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){n.currentFormatterDefinition=n.formatters.find((function(t){return t.componentType===e})),n.updateAggregatorConfiguratorProps()}))},t.prototype.updateAggregatorConfiguratorProps=function(){var e,t;this.aggregatorConfiguratorProps=Object.assign(Object.assign(Object.assign({},null===(e=this.currentAggregatorDefinition)||void 0===e?void 0:e.properties),null===(t=this.aggregator)||void 0===t?void 0:t.properties),{metrics:this.dataFields})},t}();function is(e,t){var n=e.markAsTouched;e.markAsTouched=function(){n.apply(e,arguments),t()}}os.lateLoadKey="DonutContentConfigurationComponent",os.decorators=[{type:n.Component,args:[{selector:"nui-donut-content-configuration",template:'<ng-container\n *ngIf="shown"\n [formGroup]="form">\n <nui-widget-editor-accordion [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'customize\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Donut Content Configuration</span>\n <div class="nui-text-secondary" [title]="subtitleText">\n {{subtitleText}}\n </div>\n </div>\n </div>\n\n <div class="donut-content-configuration__accordion-content">\n\n \x3c!-- aggregator --\x3e\n <div class="mb-4" formGroupName="aggregator">\n <nui-form-field caption="Aggregate" i18n-caption\n [control]="form.get(\'aggregator.aggregatorType\')">\n <nui-select-v2 placeholder="Select Format" i18n-placeholder\n formControlName="aggregatorType">\n <nui-select-v2-option *ngFor="let aggregator of aggregators"\n [displayValueContext]="aggregator.label"\n [value]="aggregator.aggregatorType">\n {{aggregator.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n\n \x3c!-- formatter --\x3e\n <div class="mb-4" formGroupName="formatter">\n <nui-form-field caption="Format" i18n-caption\n [control]="form.get(\'formatter.componentType\')">\n <nui-select-v2 placeholder="Select Format" i18n-placeholder\n formControlName="componentType">\n <nui-select-v2-option *ngFor="let formatter of formatters"\n [displayValueContext]="formatter.label"\n [value]="formatter.componentType">\n {{formatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n\n \x3c!-- aggregator configuration component --\x3e\n <ng-container *ngIf="currentAggregatorDefinition?.configurationComponent"\n nuiComponentPortal\n componentId="formatterConfigurator"\n [componentType]="currentAggregatorDefinition?.configurationComponent"\n [properties]="aggregatorConfiguratorProps"\n [outputs]="[\'formReady\']"\n (output)="onFormReady(\'aggregator\', $event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n\n \x3c!-- formatter configuration component --\x3e\n <ng-container *ngIf="currentFormatterDefinition?.configurationComponent"\n nuiComponentPortal\n componentId="formatterConfigurator"\n [componentType]="currentFormatterDefinition?.configurationComponent"\n [properties]="formatterConfiguratorProps"\n [outputs]="[\'formReady\']"\n (output)="onFormReady(\'formatter\', $event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n\n\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".donut-content-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],os.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:Io},{type:Cn}]},os.propDecorators={chartType:[{type:n.Input}],formatter:[{type:n.Input}],aggregator:[{type:n.Input}],formReady:[{type:n.Output}]};var rs=function(){function e(e,t){var n=this;this.formBuilder=e,this.changeDetector=t,this.isWidthMessageDisplayed=!1,this.destroy$=new d.Subject,this.form=this.formBuilder.group({label:["",[r.Validators.required]],isActive:!0,width:void 0}),this.form.valueChanges.pipe(v.takeUntil(this.destroy$)).subscribe((function(e){var t;null===(t=n.changeFn)||void 0===t||t.call(n,e)}))}return e.prototype.registerOnChange=function(e){this.changeFn=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){e?this.form.disable():this.form.enable()},e.prototype.validate=function(e){return this.form.valid?null:{nestedForm:!0}},e.prototype.writeValue=function(e){this.form.patchValue({label:e.label,isActive:e.isActive,width:e.width},{emitEvent:!1}),this.changeDetector.markForCheck()},e.prototype.ngOnInit=function(){var e=this;is(this.formControl,(function(){e.form.markAllAsTouched()}))},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.stub=function(){},e.prototype.isWidthMessageDisplayedForThisColumn=function(){var e=this.form.controls.width.value;return this.isWidthMessageDisplayed&&"number"!=typeof e},e}();rs.lateLoadKey="DescriptionConfigurationV2Component",rs.decorators=[{type:n.Component,args:[{selector:"nui-description-configuration-v2",template:'<ng-container [formGroup]="form">\n <nui-widget-editor-accordion [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2"\n [icon]="form | nuiFormHeaderIconPipe:\'widget_list\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 w-100 overflow-hidden pt-1">\n <span class="nui-text-label" i18n>Description</span>\n <div class="nui-text-secondary nui-text-ellipsis" [title]="form.controls[\'label\'].value">\n {{ form.controls["label"].value }}\n </div>\n </div>\n </div>\n <div class="description-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Label" i18n-caption\n class="mb-3"\n [control]="form.controls[\'label\']">\n <nui-textbox formControlName="label"></nui-textbox>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <nui-form-field [control]="form.controls[\'isActive\']">\n <nui-checkbox formControlName="isActive" i18n>Show this column</nui-checkbox>\n </nui-form-field>\n\n <ng-container *ngIf="form.get(\'isActive\')?.value">\n <ng-container *ngIf="!isWidthMessageDisplayedForThisColumn()">\n <div class="mt-4">\n <nui-form-field caption="Column width (px)" i18n-caption\n class="mb-3"\n [control]="form.controls[\'width\']">\n \x3c!-- TODO: Remove this valueChange stub after NUI-3442 is finished--\x3e\n <nui-textbox-number class="description-configuration__accordion-content__width-input"\n (valueChange)="stub()"\n placeholder="Auto width"\n i18n-placeholder\n formControlName="width"></nui-textbox-number>\n <nui-validation-message [show]="form.controls[\'width\'].invalid" for="min" i18n>\n Minimum width of the column is 62px\n </nui-validation-message>\n </nui-form-field>\n </div>\n </ng-container>\n <div *ngIf="isWidthMessageDisplayedForThisColumn()" class="mt-4">\n <nui-message type="info" [allowDismiss]="false" i18n>\n <b>All columns cannot have fixed width.</b>\n </nui-message>\n </div>\n </ng-container>\n </div>\n\n </nui-widget-editor-accordion>\n</ng-container>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return rs})),multi:!0},{provide:r.NG_VALIDATORS,useExisting:n.forwardRef((function(){return rs})),multi:!0}],styles:[".description-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],rs.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef}]},rs.propDecorators={formControl:[{type:n.Input}],isWidthMessageDisplayed:[{type:n.Input}]};var as,ss,ls,ds,cs=function(){function t(t,o,i,r,a,s,l){var c=this;this.formBuilder=t,this.changeDetector=o,this.dialogService=i,this.pizzagnaService=r,this.dataSourceManager=a,this.tableFormatterRegistry=s,this.eventBus=l,this.columns=[],this.formReady=new n.EventEmitter,this.dataSourceFields=[],this.isWidthMessageDisplayed=!1,this.columnLabel=$localize(as||(as=Ve(["Column"],["Column"]))),this.onDestroy$=new d.Subject,this.form=this.formBuilder.group({columns:this.formBuilder.array([])}),this.form.controls.columns.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(e){c.isWidthMessageDisplayed=c.getWidthMessageDisplayed(e),c.changeDetector.markForCheck()})),this.eventBus.subscribeUntil(Pn,this.onDestroy$,(function(e){e.payload&&(c.dataSource=e.payload,c.changeDetector.markForCheck())})),this.eventBus.subscribeUntil(Sn,this.onDestroy$,(function(t){var n,o,i,r;if(!(null===(n=t.payload)||void 0===n?void 0:n.error)){var a=(ae.default(t.payload.result)?t.payload:t.payload.result||{}).dataFields;c.dataSourceFields=a;var s=null===(r=null===(i=null===(o=c.dataSource)||void 0===o?void 0:o.features)||void 0===i?void 0:i.getFeatureConfig(e.WellKnownDataSourceFeatures.DisableTableColumnGeneration))||void 0===r?void 0:r.enabled,l=c.mergeColumns(c.dataSourceFields,c.getColumns());(null==l?void 0:l.length)||s?c.updateColumns(l):s||c.resetColumns(!1),c.changeDetector.markForCheck()}})),a.error$.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(e){c.dataSourceError=e,c.changeDetector.markForCheck()}))}return Object.defineProperty(t.prototype,"columnForms",{get:function(){return this.form.controls.columns.controls},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var e,t,n;if(this.formReady.emit(this.form),this.template&&!(null===(e=this.tableFormatterRegistry.getItems())||void 0===e?void 0:e.length)){var o=null===(n=null===(t=this.template)||void 0===t?void 0:t[1].properties)||void 0===n?void 0:n.formatters;this.tableFormatterRegistry.addItems(o)}},t.prototype.ngOnChanges=function(e){e.columns&&this.updateColumns(this.columns,!1)},t.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},t.prototype.getColumns=function(){return this.form.controls.columns.value},t.prototype.updateColumns=function(e,t){void 0===t&&(t=!0);var n=this.form.controls.columns;n.controls=e.map((function(e){var t=new r.FormControl(e);t.setParent(n);var o=n.controls.find((function(t){return t.value.id===e.id}));return o&&(t.markAsTouched=o.markAsTouched),t})),n.updateValueAndValidity({emitEvent:t}),this.changeDetector.markForCheck()},t.prototype.trackBy=function(e,t){var n;return null===(n=null==t?void 0:t.value)||void 0===n?void 0:n.id},t.prototype.addColumn=function(){this.form.controls.columns.push(new r.FormControl({id:o.uuid("column"),label:"",isActive:!0,formatter:{}}))},t.prototype.onResetColumns=function(){var e;this.resetColumns(!!(null===(e=this.getColumns())||void 0===e?void 0:e.length))},t.prototype.resetColumns=function(e){var t=this,n=function(){var e,n=null===(e=t.dataSourceFields)||void 0===e?void 0:e.map((function(e){return{id:o.uuid("column"),formatter:{componentType:"RawFormatterComponent",properties:{dataFieldIds:{value:e.id}}},isActive:!0,label:e.label,width:void 0,sortable:e.sortable}}));t.updateColumns(n)};e?this.dialogService.confirm({title:$localize(ss||(ss=Ve(["Are you sure?"],["Are you sure?"]))),message:$localize(ls||(ls=Ve(["Resetting the columns will revert them to their default configurations. Do you wish to proceed?"],["Resetting the columns will revert them to their default configurations. Do you wish to proceed?"]))),confirmText:$localize(ds||(ds=Ve(["Reset Columns"],["Reset Columns"])))}).result.then((function(e){e&&n()}),(function(){})):n()},t.prototype.mergeColumns=function(e,t){var n=e.map((function(e){return e.id}));return t.filter((function(e){var t,o,i,r;return!!(null===(o=null===(t=e.formatter)||void 0===t?void 0:t.properties)||void 0===o?void 0:o.dataFieldIds)&&ye.default(null===(r=null===(i=e.formatter)||void 0===i?void 0:i.properties)||void 0===r?void 0:r.dataFieldIds).some((function(e){return n.includes(e)}))}))},t.prototype.getWidthMessageDisplayed=function(e){var t,n,o=0;try{for(var i=Re(e),r=i.next();!r.done;r=i.next()){if("number"!=typeof r.value.width&&o++,o>1)return!1}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0},t.prototype.moveItem=function(e,t){var n=this.form.controls.columns,o=n.at(e);n.removeAt(e),n.insert(t,o),this.changeDetector.detectChanges()},t.prototype.removeItem=function(e){this.form.controls.columns.removeAt(e),this.changeDetector.detectChanges()},t.prototype.drop=function(e){this.moveItem(e.previousIndex,e.currentIndex)},t.prototype.cdkDragStarted=function(e){this.draggedItemHeight=e.source.element.nativeElement.offsetHeight},t}();cs.lateLoadKey="TableColumnsConfigurationV2Component",cs.decorators=[{type:n.Component,args:[{selector:"nui-table-columns-configuration",template:'<div class="nui-table-columns-configuration">\n <div *ngIf="!dataSourceError && dataSourceFields.length" cdkDropList (cdkDropListDropped)="drop($event)"\n [formGroup]="form">\n <div formArrayName="columns">\n <div cdkDrag\n (cdkDragStarted)="cdkDragStarted($event)"\n class="nui-table-columns-configuration__node-item"\n *ngFor="let columnForm of columnForms; index as i; trackBy: trackBy">\n\n <nui-drop-area class="nui-table-columns-configuration__drop-area" *cdkDragPlaceholder [style.height.px]="draggedItemHeight"></nui-drop-area>\n\n <ng-template #headerText>\n <ng-container>\n <div class="nui-table-columns-configuration__drag-handler" cdkDragHandle>\n <nui-icon icon="drag"></nui-icon>\n </div>\n </ng-container>\n <span class="nui-table-columns-configuration__header-text"\n [title]="columnForm?.value.label | nuiWidgetConfiguratorSectionHeader : i : columnLabel">\n {{ columnForm?.value.label | nuiWidgetConfiguratorSectionHeader : i : columnLabel }}\n </span>\n </ng-template>\n\n <ng-template #headerButtons>\n <div class="d-flex">\n <button id="table-widget-remove-column-btn-{{i}}"\n nui-button\n type="button"\n icon="delete"\n displayStyle="action"\n (click)="removeItem(i)"></button>\n </div>\n </ng-template>\n\n <nui-widget-configurator-section class="no-margin"\n [headerTextTemplate]="headerText"\n [headerButtonsTemplate]="headerButtons">\n <nui-table-column-configuration [formControl]="columnForm"\n [isWidthMessageDisplayed]="isWidthMessageDisplayed"></nui-table-column-configuration>\n </nui-widget-configurator-section>\n </div>\n\n <div class="pl-4 pr-4" *ngIf="(emptyColumns$ | async) && form.touched">\n <nui-message type="critical" [allowDismiss]="false">\n <b i18n>At least one column must be added.</b>\n </nui-message>\n </div>\n\n <button nui-button\n icon="add"\n displayStyle="action"\n id="table-widget-add-indicator-btn"\n type="button"\n class="ml-4 mb-4"\n (click)="addColumn()"\n i18n>Add new column\n </button>\n\n <button nui-button\n icon="reset"\n displayStyle="action"\n id="table-widget-reset-indicator-btn"\n type="button"\n class="ml-4 mb-4"\n (click)="onResetColumns()"\n i18n>Reset columns\n </button>\n </div>\n </div>\n</div>\n\n',changeDetection:n.ChangeDetectionStrategy.OnPush,encapsulation:n.ViewEncapsulation.None,styles:[".nui-table-columns-configuration__header-text{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis}.nui-table-columns-configuration__drag-handler{cursor:move;display:flex}.nui-table-columns-configuration__node-item{background-color:var(--nui-color-bg-light,#fff);margin:15px}.nui-table-columns-configuration__node-item .widget-configurator-section{margin:0}.nui-table-columns-configuration__drop-area{margin:15px}.cdk-drag-preview{z-index:2000!important;opacity:.9;box-shadow:0 0 5px 0 var(--nui-shadow-color,rgba(17,17,17,.3))}"]}]}],cs.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef},{type:o.DialogService},{type:an},{type:oo},{type:So},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},cs.propDecorators={columns:[{type:n.Input}],componentId:[{type:n.Input}],template:[{type:n.Input}],formReady:[{type:n.Output}]};var us,ps,hs,gs,ms=function(){function e(e,t,o){this.formBuilder=e,this.configuratorHeading=t,this.changeDetector=o,this.columns=[],this.formReady=new n.EventEmitter,this.sortableColumns=[],this.onDestroy$=new d.Subject}return e.prototype.ngOnInit=function(){var e=this;this.form=this.formBuilder.group({sorterConfiguration:this.formBuilder.group({sortBy:ce.default(this.sorterConfiguration,"sortBy",""),descendantSorting:ce.default(this.sorterConfiguration,"descendantSorting",!1)})}),this.form.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(t){e.setAccordionSubtitleValues(t)})),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o,i,r=this,a=null===(t=this.form.get("sorterConfiguration"))||void 0===t?void 0:t.get("sortBy"),s=null===(n=this.form.get("sorterConfiguration"))||void 0===n?void 0:n.get("descendantSorting");if(e.sorterConfiguration){var l=this.sortableColumns.find((function(e){var t;return e.id===(null===(t=r.sorterConfiguration)||void 0===t?void 0:t.sortBy)}));null==a||a.setValue(null==l?void 0:l.id,{emitEvent:!1}),null==s||s.setValue(null===(o=this.sorterConfiguration)||void 0===o?void 0:o.descendantSorting,{emitEvent:!1})}if(e.columns){this.sortableColumns=this.columns.filter((function(e){var t;return!!e.formatter&&(null===(t=e.sortable)||void 0===t||t)}));l=this.sortableColumns.find((function(e){var t;return e.id===(null===(t=r.sorterConfiguration)||void 0===t?void 0:t.sortBy)}));null==a||a.setValue(null==l?void 0:l.id,{emitEvent:!1}),null==s||s.setValue(null===(i=this.sorterConfiguration)||void 0===i?void 0:i.descendantSorting,{emitEvent:!1}),0===this.sortableColumns.length?(null==a||a.disable(),null==s||s.disable()):(null==a||a.enable(),null==s||s.enable())}this.changeDetector.detectChanges()},e.prototype.setAccordionSubtitleValues=function(e){var t,n;if(e.sorterConfiguration){var o=null===(t=this.columns)||void 0===t?void 0:t.find((function(t){return t.id===e.sorterConfiguration.sortBy}));if(!o)return this.selectedSortByValue=$localize(us||(us=Ve(["No sorting"],["No sorting"]))),this.selectedSortOrderValue="",void(null===(n=this.form.get("sorterConfiguration"))||void 0===n||n.patchValue({sortBy:"",descendantSorting:""},{emitEvent:!1}));var i=e.sorterConfiguration.descendantSorting?$localize(ps||(ps=Ve(["Descending"],["Descending"]))):$localize(hs||(hs=Ve(["Ascending"],["Ascending"])));this.selectedSortByValue=o.label,this.selectedSortOrderValue=", "+i,this.changeDetector.detectChanges()}},e.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},e}();ms.lateLoadKey="TableFiltersEditorComponent",ms.decorators=[{type:n.Component,args:[{selector:"nui-table-filters-editor-component",template:'<nui-widget-editor-accordion [formGroup]="form">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" icon="widget_pie-chart"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Sorting</span>\n <div class="nui-text-secondary" [title]="selectedSortByValue + selectedSortOrderValue">\n {{ selectedSortByValue }}{{ selectedSortOrderValue }}\n </div>\n </div>\n </div>\n <div class="table-filters-configuration__accordion-content">\n <div formGroupName="sorterConfiguration" class="d-flex align-items-end">\n <nui-form-field caption="Sort by" i18n-caption\n [control]="form.controls[\'sortBy\']"\n class="w-50">\n <nui-select-v2 placeholder="Select column" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="sortBy"\n class="table-filters-configuration__accordion-content__sort-by-input">\n <nui-select-v2-option *ngFor="let column of sortableColumns" [value]="column.id">\n {{column.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <div class="ml-2">\n <nui-form-field [control]="form.controls[\'descendantSorting\']">\n <nui-checkbox formControlName="descendantSorting" i18n>\n Descending\n </nui-checkbox>\n </nui-form-field>\n </div>\n </div>\n </div>\n <div class="p-5">\n <nui-message *ngIf="!sortableColumns.length" type="info" [allowDismiss]="false" i18n>\n <b>No columns are sortable.</b>\n </nui-message>\n </div>\n</nui-widget-editor-accordion>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".table-filters-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],ms.ctorParameters=function(){return[{type:r.FormBuilder},{type:Ei},{type:n.ChangeDetectorRef}]},ms.propDecorators={sorterConfiguration:[{type:n.Input}],columns:[{type:n.Input}],formReady:[{type:n.Output}]};var fs,vs,ys,bs,Cs,Ss,ws,Is={id:"refresher",componentType:Sa.lateLoadKey,providers:(gs={},gs[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"/.providers.refresher.properties",keys:["enabled","interval","overrideDefaultSettings"]}]}},gs),properties:{overrideDefaultSettings:!1}},Ps=function(e){function t(t){var n=e.call(this,t)||this;return n.changeDetector=t,n}return ke(t,e),t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t}(Br);Ps.lateLoadKey="TableDataSourceErrorComponent",Ps.decorators=[{type:n.Component,args:[{selector:"nui-table-data-source-error",template:'<div>\n <nui-message\n *ngIf="dataSource &&\n !data?.dataFields.length &&\n !dataSourceError &&\n !busy"\n class="mt-4 d-block"\n type="info"\n [allowDismiss]="false">\n <b i18n>Data source needs to be configured</b>\n </nui-message>\n <nui-message class="mt-4 d-block" *ngIf="!dataSource" type="info"\n [allowDismiss]="false">\n <b i18n>Select a data source</b>\n </nui-message>\n <nui-message class="mt-4 d-block" *ngIf="dataSourceError" type="critical"\n [allowDismiss]="false">\n <b i18n>Something went wrong with the data source: </b> {{dataSourceError.message || dataSourceError.type}}\n </nui-message>\n</div>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ps.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]};var Ts,xs,Ds,_s,zs,Os=[{componentType:Pi.lateLoadKey,label:$localize(Ts||(Ts=Ve(["No Formatter"],["No Formatter"]))),dataTypes:{value:null}},{componentType:Ii.lateLoadKey,label:$localize(xs||(xs=Ve(["Link"],["Link"]))),configurationComponent:"LinkConfiguratorComponent",dataTypes:{value:"label",link:"link"}},{componentType:wi.lateLoadKey,label:$localize(Ds||(Ds=Ve(["Icon"],["Icon"]))),dataTypes:{value:"string"}}],Es=((fs={})[e.PizzagnaLayer.Structure]=((vs={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","dataAndCalculations","columns"]},providers:(ys={},ys[e.WellKnownProviders.FormattersRegistry]={providerId:$t},ys[e.WellKnownProviders.DataSourceManager]={providerId:Wt},ys)},vs.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:$localize(_s||(_s=Ve(["Presentation"],["Presentation"]))),nodes:["titleAndDescription","filters"]}},vs.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:(bs={},bs[e.WellKnownProviders.Converter]={providerId:bt},bs)},vs.filters={id:"filters",componentType:ms.lateLoadKey,providers:(Cs={},Cs[e.WellKnownProviders.Converter]={providerId:xt},Cs)},vs.refresher=Is,vs.dataAndCalculations={id:"dataAndCalculations",componentType:Li.lateLoadKey,properties:{headerText:$localize(zs||(zs=Ve(["Data and Calculations"],["Data and Calculations"]))),nodes:["dataSource"]}},vs.dataSource={id:"dataSource",componentType:$r.lateLoadKey,properties:{dataSourceProviders:[],errorComponent:Ps.lateLoadKey},providers:(Ss={},Ss[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"table.providers.dataSource",keys:["providerId","properties"]},{previewPath:"table.providers.adapter.properties.dataSource",keys:["properties"]}]}},Ss)},vs.columns={id:"columns",componentType:cs.lateLoadKey,properties:{template:[{},{properties:{formatters:Os}}]},providers:(ws={},ws[e.WellKnownProviders.Converter]={providerId:Tt},ws)},vs),fs),ks=function(){function e(e,t,n,o,i,a){var s,l,c,u=this;this.formBuilder=e,this.changeDetector=t,this.configuratorHeading=n,this.eventBus=o,this.formattersRegistryCommon=i,this.tableFormattersRegistryService=a,this._dataFields=[],this.onDestroy$=new d.Subject,this.providedFormatters=[],this._formatters=[],this.propertiesFormReady=new d.Subject,this.subscribeToFormattersRegistry(),this.form=this.formBuilder.group({componentType:this.formBuilder.control(null===(l=null===(s=this.providedFormatters)||void 0===s?void 0:s[0])||void 0===l?void 0:l.componentType,r.Validators.required),properties:this.formBuilder.control({},(function(){var e;return(null===(e=u.propertiesForm)||void 0===e?void 0:e.invalid)?{properties:!0}:null}))}),null===(c=this.form.get("componentType"))||void 0===c||c.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(){return u.createFormatterConfigurator()})),this.form.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(){u.updateSubtitle(),u.onValueChange(),u.changeDetector.detectChanges()})),this.eventBus.subscribeUntil(Sn,this.onDestroy$,(function(e){var t=(ae.default(e.payload.result)?e.payload:e.payload.result||{}).dataFields;u.dataFields=t}))}return Object.defineProperty(e.prototype,"formatters",{get:function(){return this._formatters},set:function(e){this.tableFormattersRegistryService.isEmpty&&this.handleFormattersUpdate(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataFields",{get:function(){return this._dataFields},set:function(e){this._dataFields=e,this.updateAvailableFormatters()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"formatter",{get:function(){var e;return null===(e=this.form)||void 0===e?void 0:e.value},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;is(this.formControl,(function(){e.form.markAllAsTouched(),e.propertiesForm.markAllAsTouched()}))},e.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},e.prototype.ngOnChanges=function(e){},e.prototype.registerOnChange=function(e){this.changeFn=e},e.prototype.registerOnTouched=function(e){this.touchFn=e},e.prototype.setDisabledState=function(e){},e.prototype.writeValue=function(e){this.input=e,this.form.patchValue(e,{emitEvent:!1}),this.createFormatterConfigurator(),this.changeDetector.markForCheck()},e.prototype.validate=function(e){return!this.form.valid||this.propertiesForm&&!this.propertiesForm.valid?{error:"error"}:null},e.prototype.getSelectedFormatterDefinition=function(){var e,t;if(this.providedFormatters.length>0){var n=null===(e=this.form.get("componentType"))||void 0===e?void 0:e.value;return null!==(t=this.providedFormatters.find((function(e){return e.componentType===n})))&&void 0!==t?t:null}return null},e.prototype.getSelectedDataField=function(){var e,t,n=this.form.controls.properties;if(n&&this.dataFields&&this.dataFields.length>0){var o=null===(e=n.value.dataFieldIds)||void 0===e?void 0:e.value;return null!==(t=this.dataFields.find((function(e){return e.id===o})))&&void 0!==t?t:null}return null},e.prototype.ngDoCheck=function(){if(this.form&&this.propertiesForm){var e=this.form.controls.properties;this.propertiesForm.touched&&e.untouched&&(e.markAsTouched(),this.changeDetector.markForCheck()),this.propertiesForm.untouched&&e.touched&&(e.markAsUntouched(),this.changeDetector.markForCheck())}},e.prototype.onFormReady=function(e){var t=this;this.propertiesFormReady.next(),this.propertiesForm=e;var n=this.form.controls.properties;n.markAsPristine(),this.propertiesForm.valueChanges.pipe(v.takeUntil(this.propertiesFormReady)).subscribe((function(){n.setValue(t.propertiesForm.value),t.onValueChange()})),this.propertiesForm.patchValue(this.formatter.properties)},e.prototype.onValueChange=function(){var e;null===(e=this.changeFn)||void 0===e||e.call(this,this.form.value)},e.prototype.updateSubtitle=function(){var e,t;this.subtitleText=""+(null===(e=this.getSelectedFormatterDefinition())||void 0===e?void 0:e.label),this.getSelectedDataField()&&(this.subtitleText=this.subtitleText.concat(", "+(null===(t=this.getSelectedDataField())||void 0===t?void 0:t.label)))},e.prototype.createFormatterConfigurator=function(){var e,t,n,o,i=this,r=this.providedFormatters.find((function(e){var t;return e.componentType===(null===(t=i.form.get("componentType"))||void 0===t?void 0:t.value)}));this.formatterConfigurator=r?null!==(e=r.configurationComponent)&&void 0!==e?e:"ValueSelectorComponent":null,(null==r?void 0:r.componentType)!==(null===(t=this.formatter)||void 0===t?void 0:t.componentType)&&(null===(o=null===(n=this.formatter)||void 0===n?void 0:n.properties)||void 0===o?void 0:o.dataFieldIds)&&(this.formatter.properties.dataFieldIds={value:null}),this.formatterConfiguratorProps={dataFields:this.dataFields,formatter:this.formatter,formatterDefinition:r}},e.prototype.updateAvailableFormatters=function(){var e;if((null===(e=this._dataFields)||void 0===e?void 0:e.length)&&this.providedFormatters.length){var t={null:!0};this._dataFields.forEach((function(e){return t[e.dataType]=!0})),this._formatters=this.providedFormatters.filter((function(e){return(e.dataTypes.value instanceof Array?e.dataTypes.value:[e.dataTypes.value]).some((function(e){return t[e]}))})),this.form&&this.createFormatterConfigurator()}},e.prototype.subscribeToFormattersRegistry=function(){var e=this;this.handleFormattersUpdate(this.formattersRegistry.getItems()),this.formattersRegistry.stateChanged$.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(t){e.handleFormattersUpdate(t)}))},e.prototype.handleFormattersUpdate=function(e){e!==this.providedFormatters&&(this.providedFormatters=(null==e?void 0:e.length)>0?e:Os,this.updateAvailableFormatters())},Object.defineProperty(e.prototype,"formattersRegistry",{get:function(){return this.formattersRegistryCommon||this.tableFormattersRegistryService},enumerable:!1,configurable:!0}),e}();ks.lateLoadKey="PresentationConfigurationV2Component",ks.decorators=[{type:n.Component,args:[{selector:"nui-presentation-configuration-v2",template:'<ng-container [formGroup]="form">\n <nui-widget-editor-accordion [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'customize\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Property and formatting</span>\n <div class="nui-text-secondary" [title]="subtitleText">\n {{subtitleText}}\n </div>\n </div>\n </div>\n <div class="presentation-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Format" i18n-caption\n [control]="form.controls[\'componentType\']">\n <nui-select-v2 placeholder="Select Format" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="componentType">\n <nui-select-v2-option *ngFor="let formatter of formatters"\n [displayValueContext]="formatter.label"\n [value]="formatter.componentType">\n {{formatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n <ng-container *ngIf="formatterConfigurator"\n nuiComponentPortal\n componentId="formatterConfigurator"\n [componentType]="formatterConfigurator"\n [properties]="formatterConfiguratorProps"\n [outputs]="[\'formReady\']"\n (output)="onFormReady($event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n',viewProviders:[{provide:r.ControlContainer,useExisting:r.FormGroupDirective}],changeDetection:n.ChangeDetectionStrategy.OnPush,providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return ks})),multi:!0},{provide:r.NG_VALIDATORS,useExisting:n.forwardRef((function(){return ks})),multi:!0}],styles:[".presentation-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],ks.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef},{type:Ei},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]},{type:Co,decorators:[{type:n.Optional},{type:n.Inject,args:[Gt]}]},{type:So}]},ks.propDecorators={formatters:[{type:n.Input}],dataFieldIds:[{type:n.Input}],formControl:[{type:n.Input}]};var Rs=function(){function e(e,t){var n=this;this.formBuilder=e,this.changeDetector=t,this.onDestroy$=new d.Subject,this.isWidthMessageDisplayed=!1,this.form=this.formBuilder.group({description:this.formBuilder.control({}),presentation:this.formBuilder.control({})}),this.form.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(e){var t,o=Object.assign(Object.assign({id:null===(t=n.input)||void 0===t?void 0:t.id},e.description),{formatter:e.presentation});n.changeFn(o)}))}return e.prototype.ngOnInit=function(){var e=this;is(this.formControl,(function(){e.form.markAllAsTouched()}))},e.prototype.registerOnChange=function(e){this.changeFn=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){},e.prototype.validate=function(e){return this.form.valid?null:{error:"error"}},e.prototype.writeValue=function(e){this.input=e,this.form.setValue({presentation:(null==e?void 0:e.formatter)||{},description:e},{emitEvent:!1}),this.changeDetector.markForCheck()},e.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},e}();Rs.lateLoadKey="TableColumnConfigurationComponent",Rs.decorators=[{type:n.Component,args:[{selector:"nui-table-column-configuration",template:'<div [formGroup]="form">\n <nui-description-configuration-v2 [formControl]="form.controls[\'description\']"\n [isWidthMessageDisplayed]="isWidthMessageDisplayed">\n </nui-description-configuration-v2>\n\n <nui-presentation-configuration-v2 [formControl]="form.controls[\'presentation\']">\n </nui-presentation-configuration-v2>\n</div>\n',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return Rs})),multi:!0},{provide:r.NG_VALIDATORS,useExisting:n.forwardRef((function(){return Rs})),multi:!0}]}]}],Rs.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef}]},Rs.propDecorators={formControl:[{type:n.Input}],isWidthMessageDisplayed:[{type:n.Input}]};var As=function(){function e(e,t){this.formBuilder=e,this.changeDetector=t,this.formReady=new n.EventEmitter,this.formDestroy=new n.EventEmitter}return e.prototype.ngOnInit=function(){var e;this.form=this.formBuilder.group({label:[this.label||null,[r.Validators.required]],isActive:null===(e=this.isActive)||void 0===e||e,width:this.width||void 0}),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){var t,n,o;e.label&&(null===(t=this.form)||void 0===t||t.patchValue({label:e.label.currentValue})),e.isActive&&(null===(n=this.form)||void 0===n||n.patchValue({isActive:e.isActive.currentValue})),e.width&&(null===(o=this.form)||void 0===o||o.patchValue({width:e.width.currentValue}))},e.prototype.stub=function(){},e.prototype.ngOnDestroy=function(){this.formDestroy.emit(this.form)},e}();As.lateLoadKey="DescriptionConfigurationComponent",As.decorators=[{type:n.Component,args:[{selector:"nui-table-column-description-configuration",template:'<ng-container [formGroup]="form">\n <nui-widget-editor-accordion [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2"\n [icon]="form | nuiFormHeaderIconPipe:\'widget_list\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 w-100 overflow-hidden pt-1">\n <span class="nui-text-label" i18n>Description</span>\n <div class="nui-text-secondary nui-text-ellipsis" [title]="form.controls[\'label\'].value">\n {{ form.controls["label"].value }}\n </div>\n </div>\n </div>\n <div class="description-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Label" i18n-caption\n class="mb-3"\n [control]="form.controls[\'label\']">\n <nui-textbox formControlName="label"></nui-textbox>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <nui-form-field [control]="form.controls[\'isActive\']">\n <nui-checkbox formControlName="isActive" i18n>Show this column</nui-checkbox>\n </nui-form-field>\n\n <ng-container *ngIf="form.get(\'isActive\')?.value">\n <ng-container *ngIf="!isWidthMessageDisplayed">\n <div class="mt-4">\n <nui-form-field caption="Column width (px)" i18n-caption\n class="mb-3"\n [control]="form.controls[\'width\']">\n \x3c!-- TODO: Remove this valueChange stub after NUI-3442 is finished--\x3e\n <nui-textbox-number class="description-configuration__accordion-content__width-input"\n (valueChange)="stub()"\n placeholder="Auto width"\n i18n-placeholder\n formControlName="width"></nui-textbox-number>\n <nui-validation-message [show]="form.controls[\'width\'].invalid" for="min" i18n>\n Minimum width of the column is 62px\n </nui-validation-message>\n </nui-form-field>\n </div>\n </ng-container>\n <nui-message *ngIf="isWidthMessageDisplayed" type="info" [allowDismiss]="false" i18n>\n <b>All columns can not have fixed width.</b>\n </nui-message>\n </ng-container>\n </div>\n\n </nui-widget-editor-accordion>\n</ng-container>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".description-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],As.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef}]},As.propDecorators={label:[{type:n.Input}],isActive:[{type:n.Input}],width:[{type:n.Input}],isWidthMessageDisplayed:[{type:n.Input}],formReady:[{type:n.Output}],formDestroy:[{type:n.Output}]};var Fs=function(){function e(e,t,o,i){this.changeDetector=e,this.configuratorHeading=t,this.formBuilder=o,this.logger=i,this.formReady=new n.EventEmitter,this.dropdownItems={}}return e.prototype.ngOnChanges=function(e){e.formatterDefinition&&(this.mapDropdownItems(),this.initForm()),e.dataFields&&this.mapDropdownItems(),e.formatter&&this.updateForm()},e.prototype.mapDropdownItems=function(){var e=this;this.dataFields?this.dropdownItems=Object.keys(this.formatterDefinition.dataTypes).reduce((function(t,n){var o=e.formatterDefinition.dataTypes[n];return t[n]=o?e.dataFields.filter((function(e){return"string"==typeof o?e.dataType===o:o.includes(e.dataType)})):e.dataFields,t}),{}):this.logger.error("There are no dataFields defined for formatter:",this.formatterDefinition)},Object.defineProperty(e.prototype,"dataFieldIds",{get:function(){return this.form.get("dataFieldIds")},enumerable:!1,configurable:!0}),e.prototype.initForm=function(){var e=this,t=this.formatterDefinition.dataTypes||{},n=Object.keys(t).reduce((function(t,n){var o,i,a,s;return t[n]=[null!==(s=null===(a=null===(i=null===(o=e.formatter)||void 0===o?void 0:o.properties)||void 0===i?void 0:i.dataFieldIds)||void 0===a?void 0:a[n])&&void 0!==s?s:null,r.Validators.required],t}),{});this.form=this.formBuilder.group({dataFieldIds:this.formBuilder.group(n)}),this.addCustomFormControls(this.form),this.formReady.emit(this.form)},e.prototype.updateForm=function(){var e;this.form.patchValue(null!==(e=this.formatter.properties)&&void 0!==e?e:{},{onlySelf:!1,emitEvent:!1})},e.prototype.addCustomFormControls=function(e){},e}();Fs.decorators=[{type:n.Injectable}],Fs.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:o.LoggerService}]},Fs.propDecorators={formatter:[{type:n.Input}],formatterDefinition:[{type:n.Input}],dataFields:[{type:n.Input}],formArrayName:[{type:n.Input}],formReady:[{type:n.Output}]};var Vs=function(e){function t(t,n,o,i){return e.call(this,t,n,o,i)||this}return ke(t,e),t}(Fs);Vs.lateLoadKey="LinkConfiguratorComponent",Vs.decorators=[{type:n.Component,args:[{selector:"nui-link-configurator",template:'<div [formGroup]="form">\n <div formGroupName="dataFieldIds">\n <div class="mb-4">\n <nui-form-field caption="Label"\n i18n-caption\n class="mb-3"\n [control]="dataFieldIds.controls[\'value\']">\n <nui-select-v2 formControlName="value">\n <nui-select-v2-option *ngFor="let itemValue of dropdownItems.value" [value]="itemValue.id">\n {{itemValue.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n <div>\n <nui-form-field caption="URL"\n i18n-caption\n class="mb-3"\n [control]="dataFieldIds.controls[\'link\']">\n <nui-select-v2 formControlName="link">\n <nui-select-v2-option *ngFor="let itemLink of dropdownItems.link" [value]="itemLink.id">\n {{itemLink.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n </div>\n</div>\n'}]}],Vs.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:o.LoggerService}]};var Ls=function(e){function t(t,n,o,i){return e.call(this,t,n,o,i)||this}return ke(t,e),t}(Fs);Ls.lateLoadKey="ValueSelectorComponent",Ls.decorators=[{type:n.Component,args:[{selector:"nui-value-selector",template:'<div *ngIf="form" [formGroup]="form">\n <div formGroupName="dataFieldIds">\n <nui-form-field caption="Value"\n i18n-caption\n class="mb-3"\n [control]="dataFieldIds.controls[\'value\']">\n <nui-select-v2 formControlName="value"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n placeholder="Select Value" i18n-placeholder>\n <nui-select-v2-option *ngFor="let itemValue of dropdownItems.value"\n [displayValueContext]="itemValue.label"\n [value]="itemValue.id">\n {{itemValue.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n</div>\n'}]}],Ls.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:o.LoggerService}]};var Bs=function(){function e(e,t,o,i,r){this.formBuilder=e,this.changeDetector=t,this.configuratorHeading=o,this.formattersRegistryCommon=i,this.tableFormattersRegistryService=r,this._providedFormatters=[],this._formatters=[],this._dataFields=[],this.formReady=new n.EventEmitter,this.formDestroy=new n.EventEmitter,this.formatterForm=this.formBuilder.group({}),this.formatterFormGroupName="formatter",this.onDestroy$=new d.Subject,this.subscribeToFormattersRegistry()}return Object.defineProperty(e.prototype,"formatters",{get:function(){return this._formatters},set:function(e){this.tableFormattersRegistryService.isEmpty&&this.handleFormattersUpdate(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataFields",{get:function(){return this._dataFields},set:function(e){this._dataFields=e,this.updateAvailableFormatters()},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e,t,n=this;this.formatterForm=this.formBuilder.group({componentType:[this.formatter&&this.formatter.componentType||this._providedFormatters&&this._providedFormatters.length>0&&this._providedFormatters[0].componentType,[r.Validators.required]]}),this.form=this.formBuilder.group(((e={})[this.formatterFormGroupName]=this.formatterForm,e)),null===(t=this.formatterForm.get("componentType"))||void 0===t||t.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(){return n.createFormatterConfigurator()})),this.createFormatterConfigurator(),this.formReady.emit(this.form),this.formatterForm.valueChanges.pipe(v.takeUntil(this.onDestroy$)).subscribe((function(){n.updateSubtitle(),n.changeDetector.detectChanges()}))},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnChanges=function(e){var t,n;if(e.dataFieldIds){var o=e.dataFieldIds,i=o.currentValue,r=o.previousValue;if(i&&i!==r){var a=i.map((function(e){return{id:e,label:xe.default(e)}}));this.dataFields=a,this.updateSubtitle()}}e.formatter&&(null===(n=this.form)||void 0===n||n.patchValue(((t={})[this.formatterFormGroupName]=e.formatter.currentValue,t),{emitEvent:!1}),this.updateSubtitle()),e.dataFields&&0===e.dataFields.previousValue.length&&this.formatterForm&&this.updateSubtitle()},e.prototype.getSelectedFormatterDefinition=function(){var e,t;if(this._providedFormatters.length>0){var n=null===(e=this.formatterForm.get("componentType"))||void 0===e?void 0:e.value;return null!==(t=this._providedFormatters.find((function(e){return e.componentType===n})))&&void 0!==t?t:null}return null},e.prototype.getSelectedDataField=function(){var e,t,n=this.formatterForm.controls.properties;if(n&&this.dataFields&&this.dataFields.length>0){var o=null===(e=n.get("dataFieldIds"))||void 0===e?void 0:e.value.value;return null!==(t=this.dataFields.find((function(e){return e.id===o})))&&void 0!==t?t:null}return null},e.prototype.onFormReady=function(e){this.form.get(this.formatterFormGroupName).setControl("properties",e)},e.prototype.updateSubtitle=function(){var e,t;this.subtitleText=""+(null===(e=this.getSelectedFormatterDefinition())||void 0===e?void 0:e.label),this.getSelectedDataField()&&(this.subtitleText=this.subtitleText.concat(", "+(null===(t=this.getSelectedDataField())||void 0===t?void 0:t.label)))},e.prototype.createFormatterConfigurator=function(){var e,t,n,o,i=this,r=this._providedFormatters.find((function(e){var t;return e.componentType===(null===(t=i.formatterForm.get("componentType"))||void 0===t?void 0:t.value)}));this.formatterConfigurator=r?null!==(e=r.configurationComponent)&&void 0!==e?e:"ValueSelectorComponent":null,(null==r?void 0:r.componentType)!==(null===(t=this.formatter)||void 0===t?void 0:t.componentType)&&(null===(o=null===(n=this.formatter)||void 0===n?void 0:n.properties)||void 0===o?void 0:o.dataFieldIds)&&(this.formatter.properties.dataFieldIds={value:null}),this.formatterConfiguratorProps={dataFields:this.dataFields,formatter:this.formatter,formatterDefinition:r}},e.prototype.updateAvailableFormatters=function(){if(this._dataFields.length&&this._providedFormatters.length){var e={null:!0};this._dataFields.forEach((function(t){return e[t.dataType]=!0})),this._formatters=this._providedFormatters.filter((function(t){return(t.dataTypes.value instanceof Array?t.dataTypes.value:[t.dataTypes.value]).some((function(t){return e[t]}))})),this.formatterForm&&this.createFormatterConfigurator()}},e.prototype.subscribeToFormattersRegistry=function(){this.handleFormattersUpdate(this.formattersRegistry.getItems()),this.formattersRegistry.stateChanged$.pipe(v.tap(this.handleFormattersUpdate.bind(this)),v.takeUntil(this.onDestroy$)).subscribe()},e.prototype.handleFormattersUpdate=function(e){e!==this._providedFormatters&&(this._providedFormatters=e,this.updateAvailableFormatters())},Object.defineProperty(e.prototype,"formattersRegistry",{get:function(){return this.formattersRegistryCommon||this.tableFormattersRegistryService},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.formDestroy.emit(this.form),this.onDestroy$.next(),this.onDestroy$.complete()},e}();Bs.lateLoadKey="PresentationConfigurationComponent",Bs.decorators=[{type:n.Component,args:[{selector:"nui-table-column-presentation-configuration",template:'<ng-container [formGroup]="formatterForm">\n <nui-widget-editor-accordion [state]="form | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form | nuiFormHeaderIconPipe:\'customize\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Property and formatting</span>\n <div class="nui-text-secondary" [title]="subtitleText">\n {{subtitleText}}\n </div>\n </div>\n </div>\n <div class="presentation-configuration__accordion-content">\n <div class="mb-4">\n <nui-form-field caption="Format" i18n-caption\n [control]="formatterForm.controls[\'componentType\']">\n <nui-select-v2 placeholder="Select Format" i18n-placeholder\n [popupViewportMargin]="configuratorHeading.height$ | async"\n formControlName="componentType">\n <nui-select-v2-option *ngFor="let formatter of formatters"\n [displayValueContext]="formatter.label"\n [value]="formatter.componentType">\n {{formatter.label}}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n <ng-container *ngIf="formatterConfigurator"\n nuiComponentPortal\n componentId="formatterConfigurator"\n [componentType]="formatterConfigurator"\n [properties]="formatterConfiguratorProps"\n [outputs]="[\'formReady\']"\n (output)="onFormReady($event.payload)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n',viewProviders:[{provide:r.ControlContainer,useExisting:r.FormGroupDirective}],changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".presentation-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Bs.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef},{type:Ei},{type:Co,decorators:[{type:n.Optional},{type:n.Inject,args:[Gt]}]},{type:So}]},Bs.propDecorators={formatter:[{type:n.Input}],formatters:[{type:n.Input}],dataFieldIds:[{type:n.Input}],dataFields:[{type:n.Input}],formReady:[{type:n.Output}],formDestroy:[{type:n.Output}]};var Ns,$s,js,Ks=function(){function t(t,i,r,a,s){var l=this;this.formBuilder=t,this.changeDetector=i,this.dialogService=r,this.pizzagnaService=a,this.eventBus=s,this.columns=[],this.formatters=[],this.dataFields=[],this.formReady=new n.EventEmitter,this.onDestroy$=new d.Subject,this.lastValidDataFields=[],this.eventBus.subscribeUntil(Pn,this.onDestroy$,(function(e){e.payload&&(l.dataSource=e.payload)})),this.eventBus.subscribeUntil(Sn,this.onDestroy$,(function(t){var n,i=(ae.default(t.payload.result)?t.payload:t.payload.result||{}).dataFields;if(i){var r=l.pizzagnaService.pizzagna;r=o.immutableSet(r,e.PizzagnaLayer.Data+".columns.properties.dataFields",i);var a=(null===(n=l.pizzagnaService.pizzagna[e.PizzagnaLayer.Structure].columns.properties)||void 0===n?void 0:n.template).findIndex((function(e){return"presentation"===e.id})),s=e.PizzagnaLayer.Structure+".columns.properties.template["+a+"].properties.dataFields";r=o.immutableSet(r,s,i),r=ce.default(l.pizzagnaService.pizzagna,e.PizzagnaLayer.Data+".columns.properties.columns").map((function(e){return e.id})).reduce((function(t,n){return o.immutableSet(t,e.PizzagnaLayer.Data+"."+n+"/presentation.properties.dataFields",i)}),r),l.pizzagnaService.updatePizzagna(r),l.eventBus.getStream(rt).next({payload:{path:"",value:r}})}}))}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){var n,o,i,r=this;if(t.dataFields&&t.dataFields.currentValue){this.lastValidDataFields=t.dataFields.currentValue;var a=null===(i=null===(o=null===(n=this.dataSource)||void 0===n?void 0:n.features)||void 0===o?void 0:o.getFeatureConfig(e.WellKnownDataSourceFeatures.DisableTableColumnGeneration))||void 0===i?void 0:i.enabled,s=this.mergeColumns(t.dataFields.currentValue,this.columns);(null==s?void 0:s.length)||a?this.onItemsChange(s):a||this.resetColumns(!1),setTimeout((function(){return r.changeDetector.markForCheck()}))}if(t.columns){var l=this.columns.map((function(e){var t;return{id:e.id,children:(t={},t[e.id+"/description"]=Object.assign({},e),t[e.id+"/presentation"]=Object.assign({},e),t)}}));this.pizzagnaService.createComponentsFromTemplateWithProperties("columns",l),setTimeout((function(){var e,t;null===(e=r.form.get("columns"))||void 0===e||e.setValue(Fe(null===(t=r.form.get("columns"))||void 0===t?void 0:t.value))}))}},t.prototype.onFormReady=function(e){var t,n=this;this.form=this.formBuilder.group({columns:e,columnsOutput:{}}),this.emptyColumns$=this.form.valueChanges.pipe(v.map((function(e){return 0===e.columns.length}))),this.formReady.emit(this.form),null===(t=this.form.get("columns"))||void 0===t||t.valueChanges.subscribe((function(e){var t,o=e.map((function(e){var t,o,i,r,a={id:e.id};try{for(var s=Re(Object.keys(e.properties)),l=s.next();!l.done;l=s.next()){var d=l.value;a=Object.assign(Object.assign({},a),e.properties[d])}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return a.sortable=null===(r=null===(i=n.lastValidDataFields)||void 0===i?void 0:i.find((function(e){var t,n,o;return e.id===(null===(o=null===(n=null===(t=a.formatter)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.dataFieldIds)||void 0===o?void 0:o.value)})))||void 0===r?void 0:r.sortable,a}));null===(t=n.form.get("columnsOutput"))||void 0===t||t.setValue(o)}))},t.prototype.onItemsChange=function(t){var n=t.map((function(e){return e.id}));this.pizzagnaService.createComponentsFromTemplate("columns",n);var o={componentId:this.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["columns"]};this.pizzagnaService.setProperty(o,t)},t.prototype.addColumn=function(){this.onItemsChange(Fe(this.columns,[{id:o.uuid("column"),label:"",formatter:void 0}]))},t.prototype.onResetColumns=function(){var e;this.resetColumns(!!(null===(e=this.columns)||void 0===e?void 0:e.length))},t.prototype.resetColumns=function(e){var t=this,n=function(){var e=t.lastValidDataFields.map((function(e){return{id:o.uuid("column"),formatter:{componentType:"RawFormatterComponent",properties:{dataFieldIds:{value:e.id}}},isActive:!0,label:e.label,width:void 0,sortable:e.sortable}}));t.onItemsChange(e)};e?this.dialogService.confirm({title:$localize(Ns||(Ns=Ve(["Are you sure?"],["Are you sure?"]))),message:$localize($s||($s=Ve(["Resetting the columns will revert them to their default configurations. Do you wish to proceed?"],["Resetting the columns will revert them to their default configurations. Do you wish to proceed?"]))),confirmText:$localize(js||(js=Ve(["Reset Columns"],["Reset Columns"])))}).result.then((function(e){e&&n()}),(function(){})):n()},t.prototype.mergeColumns=function(e,t){var n=e.map((function(e){return e.id}));return t.filter((function(e){var t,o,i,r;return!!(null===(o=null===(t=e.formatter)||void 0===t?void 0:t.properties)||void 0===o?void 0:o.dataFieldIds)&&ye.default(null===(r=null===(i=e.formatter)||void 0===i?void 0:i.properties)||void 0===r?void 0:r.dataFieldIds).some((function(e){return n.includes(e)}))}))},t.prototype.ngOnDestroy=function(){this.onDestroy$.next(),this.onDestroy$.complete()},t}();Ks.lateLoadKey="TableColumnsConfigurationComponent",Ks.decorators=[{type:n.Component,args:[{selector:"nui-table-columns-configuration",template:'<nui-items-dynamic\n [items]="columns"\n [nodes]="nodes"\n headerPrefix="Column"\n i18n-headerPrefix\n (itemsChange)="onItemsChange($event)"\n (formReady)="onFormReady($event)"\n></nui-items-dynamic>\n\n<div class="pl-4 pr-4" *ngIf="(emptyColumns$ | async) && form.touched">\n <nui-message type="critical" [allowDismiss]="false" i18n>\n <b>At least one column must be added.</b>\n </nui-message>\n</div>\n\n<button nui-button\n icon="add"\n displayStyle="action"\n id="table-widget-add-indicator-btn"\n type="button"\n class="ml-4 mb-4"\n (click)="addColumn()"\n i18n>Add new column\n</button>\n\n<button nui-button\n icon="reset"\n displayStyle="action"\n id="table-widget-reset-indicator-btn"\n type="button"\n class="ml-4 mb-4"\n (click)="onResetColumns()"\n i18n>Reset columns\n</button>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ks.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef},{type:o.DialogService},{type:an},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Ks.propDecorators={columns:[{type:n.Input}],formatters:[{type:n.Input}],componentId:[{type:n.Input}],dataFields:[{type:n.Input}],nodes:[{type:n.Input}],formReady:[{type:n.Output}]};var Ws=function(){function t(e,t,o){this.pizzagnaService=e,this.changeDetector=t,this.eventBus=o,this.series=[],this.formReady=new n.EventEmitter,this.destroy$=new d.Subject}return t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.ngOnChanges=function(e){var t=this;e.allSeries&&!e.allSeries.isFirstChange()&&(this.createSeriesConfigComponents(this.series),setTimeout((function(){return t.changeDetector.markForCheck()})))},t.prototype.onFormReady=function(e){this.form=e,this.formReady.emit(e),this.emptySeries$=this.form.valueChanges.pipe(v.map((function(e){return 0===e.length})))},t.prototype.onItemsChange=function(t){this.createSeriesConfigComponents(t);var n={componentId:this.componentId,pizzagnaKey:e.PizzagnaLayer.Data,propertyPath:["series"]};this.pizzagnaService.setProperty(n,t)},t.prototype.isPossibleToAddSeries=function(){return(this.allSeries&&this.allSeries.length)>(this.series&&this.series.length)},t.prototype.addSeries=function(){this.onItemsChange(Fe(this.series,[{id:o.uuid("series"),selectedSeriesId:null}]))},t.prototype.createSeriesConfigComponents=function(e){var t=e.map((function(e){return e.id}));this.pizzagnaService.createComponentsFromTemplate("series",t)},t}();Ws.lateLoadKey="TimeseriesSeriesCollectionConfigurationComponent",Ws.decorators=[{type:n.Component,args:[{selector:"nui-timeseries-series-collection-configuration",template:'<nui-items-dynamic\n [items]="series"\n [nodes]="nodes"\n (itemsChange)="onItemsChange($event)"\n [moveButtons]="false"\n (formReady)="onFormReady($event)"\n></nui-items-dynamic>\n\n<div class="pl-4 pr-4" *ngIf="(emptySeries$ | async) && form.touched">\n <nui-message type="critical" [allowDismiss]="false" i18n>\n <b>At least one series must be added.</b>\n </nui-message>\n</div>\n\n<button nui-button\n *ngIf="isPossibleToAddSeries()"\n icon="add"\n displayStyle="action"\n type="button"\n class="ml-4 mb-4"\n (click)="addSeries()"\n i18n>Add new series\n</button>\n',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],Ws.ctorParameters=function(){return[{type:an},{type:n.ChangeDetectorRef},{type:o.EventBus,decorators:[{type:n.Inject,args:[Mt]}]}]},Ws.propDecorators={nodes:[{type:n.Input}],componentId:[{type:n.Input}],series:[{type:n.Input}],availableSeries:[{type:n.Input}],allSeries:[{type:n.Input}],formReady:[{type:n.Output}]};var Ms=function(){function e(e,t){this.formBuilder=e,this.changeDetector=t,this.formReady=new n.EventEmitter,this.formDestroy=new n.EventEmitter}return e.prototype.ngOnInit=function(){this.form=this.formBuilder.group({label:[this.label,r.Validators.required]}),this.formReady.emit(this.form)},e.prototype.ngOnChanges=function(e){if(e.label){var t=e.label.currentValue;t&&this.form.patchValue({label:t})}},e.prototype.ngOnDestroy=function(){this.formDestroy.emit(this.form)},e}();Ms.lateLoadKey="TimeseriesTileDescriptionConfigurationComponent",Ms.decorators=[{type:n.Component,args:[{selector:"nui-table-column-description-configuration",template:'<ng-container [formGroup]="form">\n <nui-widget-editor-accordion [state]="form.get(\'label\') | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2"\n [icon]="form.get(\'label\') | nuiFormHeaderIconPipe:\'edit\' | async"\n [iconColor]="form.get(\'label\') | nuiFormHeaderIconPipe:\'gray\':\'\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Description</span>\n <div class="nui-text-secondary" [title]="form.get(\'label\')?.value">\n {{form.get(\'label\')?.value}}\n </div>\n </div>\n </div>\n <div class="timeseries-tile-description-configuration__accordion-content">\n <nui-form-field caption="Label" i18n-caption [control]="form.get(\'label\')">\n <nui-textbox formControlName="label" placeholder="Set label" i18n-placeholder></nui-textbox>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".timeseries-tile-description-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Ms.ctorParameters=function(){return[{type:r.FormBuilder},{type:n.ChangeDetectorRef}]},Ms.propDecorators={label:[{type:n.Input}],formReady:[{type:n.Output}],formDestroy:[{type:n.Output}]};var Us=function(){function t(e,t,o,i){this.changeDetector=e,this.configuratorHeading=t,this.formBuilder=o,this.pizzagnaService=i,this.formReady=new n.EventEmitter,this.formDestroy=new n.EventEmitter,this.destroy$=new d.Subject}return Object.defineProperty(t.prototype,"selectedSeries",{get:function(){return this._selectedSeries},set:function(e){this._selectedSeries=e,e&&this.form.patchValue({id:e.id})},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.form=this.formBuilder.group({id:[this.selectedSeriesId||null,[r.Validators.required]]}),this.formReady.emit(this.form)},t.prototype.ngOnChanges=function(e){var t=this;if(e.allSeries&&(this.selectedSeries=this.allSeries.find((function(e){return t.selectedSeriesId===e.id}))),e.selectedSeriesId){if(!this.allSeries)return;this.selectedSeries=this.allSeries.find((function(e){return t.selectedSeriesId===e.id}))}},t.prototype.onSelect=function(t){var n=this;this.selectedSeriesId=t.id,this.selectedSeries=t,this.form.patchValue({id:t.id}),setTimeout((function(){n.pizzagnaService.setProperty(e.PizzagnaLayer.Data+"."+n.componentId+".properties.selectedSeriesId",t.id),n.changeDetector.markForCheck()}))},t.prototype.ngOnDestroy=function(){this.formDestroy.emit(this.form),this.destroy$.next(),this.destroy$.complete()},t}();Us.lateLoadKey="TimeseriesTileIndicatorDataConfigurationComponent",Us.decorators=[{type:n.Component,args:[{selector:"nui-timeseries-tile-indicator-data-configuration",template:'<ng-container [formGroup]="form">\n <nui-widget-editor-accordion [state]="form.get(\'id\') | nuiWidgetEditorAccordionFormState | async">\n <div accordionHeader\n class="d-flex align-items-center px-4 py-2">\n <nui-icon class="align-self-start pt-2" [icon]="form.get(\'id\') | nuiFormHeaderIconPipe:\'database\' | async"></nui-icon>\n <div class="d-flex flex-column ml-4 pt-1">\n <span class="nui-text-label" i18n>Indicator data</span>\n <div class="nui-text-secondary" [title]="selectedSeries?.description">\n {{selectedSeries?.description}}\n </div>\n </div>\n </div>\n <div class="timeseries-tile-data-configuration__accordion-content">\n <nui-form-field caption="Series data" i18n-caption [control]="form.get(\'id\')">\n <nui-select-v2 placeholder="Series data" i18n-placeholder\n [value]="selectedSeries"\n [popupViewportMargin]="configuratorHeading.height$ | async"\n (valueSelected)="onSelect($event)">\n <nui-select-v2-option *ngFor="let series of availableSeries | nuiAddData:selectedSeries" [value]="series">\n {{series.description}}\n </nui-select-v2-option>\n </nui-select-v2>\n <nui-validation-message for="required" i18n>\n This field is required\n </nui-validation-message>\n </nui-form-field>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n',changeDetection:n.ChangeDetectionStrategy.OnPush,styles:[".timeseries-tile-data-configuration__accordion-content{padding:15px 15px 15px 46px}"]}]}],Us.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:Ei},{type:r.FormBuilder},{type:an}]},Us.propDecorators={componentId:[{type:n.Input}],selectedSeriesId:[{type:n.Input}],allSeries:[{type:n.Input}],availableSeries:[{type:n.Input}],formReady:[{type:n.Output}],formDestroy:[{type:n.Output}]};var Hs,Gs=function(){function e(){var e=this;this.hidden=!1,this.spinnerSize=o.SpinnerSize.Large,this.enter=new n.EventEmitter,this.valid=new n.EventEmitter,this.exit=new n.EventEmitter,this.next=new n.EventEmitter,this.busyConfig={busy:!1},this.visited=!1,this.active=!1,this.complete=!1,this.icon="step",this.iconColor="",this.enterStep=function(t){e.enter.emit(t)},this.exitStep=function(t){e.exit.emit(t)},this.nextStep=function(t){e.next.emit(t)},this.applyEnteringStep=function(){e.active=!0,e.icon="step-active",e.iconColor="black"},this.applyExitingStep=function(){e.active=!1,e.visited=!0,e.icon="step-complete",e.iconColor=""}}return e.prototype.ngOnInit=function(){this.nextText=this.nextText||$localize(Hs||(Hs=Ve(["Next"],["Next"])))},e.prototype.ngOnChanges=function(e){e.stepControl&&this.valid.emit(this.stepControl)},e}();Gs.decorators=[{type:n.Component,args:[{selector:"nui-dashwiz-step",template:'<div class="nui-dashwiz-step animated h-100" [ngClass]="{ \'nui-dashwiz-step--active\': active }"\n nui-busy\n [busy]="busyConfig.busy">\n <div cdkScrollable class="h-100 overflow-auto nui-scroll-shadows configurator-scrollable">\n <ng-container *ngTemplateOutlet="stepTemplate"></ng-container>\n </div>\n <nui-spinner [percent]="busyConfig.percent"\n [allowCancel]="busyConfig.allowCancel"\n [message]="busyConfig.message"\n [size]="spinnerSize">\n </nui-spinner>\n</div>\n',styles:[".nui-dashwiz-step{display:none}.nui-dashwiz-step--active{display:block}"]}]}],Gs.ctorParameters=function(){return[]},Gs.propDecorators={stepTemplate:[{type:n.Input}],stepControl:[{type:n.Input}],title:[{type:n.Input}],nextText:[{type:n.Input}],hidden:[{type:n.Input}],disabled:[{type:n.Input}],spinnerSize:[{type:n.Input}],enter:[{type:n.Output}],valid:[{type:n.Output}],exit:[{type:n.Output}],next:[{type:n.Output}]};var qs=function(){function e(e){this.changeDetector=e,this.busy=!1,this.canFinish=!1,this.canProceed=!1,this.isFirstStepActive=!1,this.isLastStepActive=!1,this.cancel=new n.EventEmitter,this.next=new n.EventEmitter,this.back=new n.EventEmitter,this.finish=new n.EventEmitter}return e.prototype.onCancel=function(){this.cancel.emit()},e.prototype.onNext=function(){this.next.emit()},e.prototype.onBack=function(){this.back.emit()},e.prototype.onFinish=function(){this.finish.emit()},e}();qs.lateLoadKey="DashwizButtonsComponent",qs.decorators=[{type:n.Component,args:[{selector:"nui-dashwiz-buttons",template:'\n <div class="d-flex justify-content-end p-4">\n <button nui-button\n class="nui-dashwiz-buttons__cancel-button"\n type="button"\n [disabled]="busy"\n (click)="onCancel()">\n <span i18n>Cancel</span>\n </button>\n <button *ngIf="!isFirstStepActive"\n class="ml-3 nui-dashwiz-buttons__back-button"\n nui-button\n icon="caret-left"\n type="button"\n [disabled]="busy"\n (click)="onBack()">\n <span i18n>Back</span>\n </button>\n <button *ngIf="!isLastStepActive && canProceed"\n class="ml-3 nui-dashwiz-buttons__next-button"\n nui-button\n type="button"\n [displayStyle]="canFinish ? \'default\' : \'primary\'"\n [disabled]="busy"\n (click)="onNext()">\n <span>{{nextText}}</span>\n </button>\n <button *ngIf="canFinish || isLastStepActive"\n class="ml-3 nui-dashwiz-buttons__finish-button"\n nui-button\n type="button"\n displayStyle="primary"\n [isBusy]="busy"\n [disabled]="busy"\n (click)="onFinish()">\n <span>{{finishText}}</span>\n </button>\n </div>\n '}]}],qs.ctorParameters=function(){return[{type:n.ChangeDetectorRef}]},qs.propDecorators={busy:[{type:n.Input}],canFinish:[{type:n.Input}],canProceed:[{type:n.Input}],isFirstStepActive:[{type:n.Input}],isLastStepActive:[{type:n.Input}],nextText:[{type:n.Input}],finishText:[{type:n.Input}],cancel:[{type:n.Output}],next:[{type:n.Output}],back:[{type:n.Output}],finish:[{type:n.Output}]};var Zs=function(){function e(t,o,i,r){var a=this;this.changeDetector=t,this.componentFactoryResolver=o,this.logger=i,this.dashwizService=r,this.hideHeader=!1,this.canProceed=!1,this.canFinish=!1,this.finishText=e.placeholderFinishText,this.stretchStepLines=!1,this.stepNavigated=new n.EventEmitter,this.cancel=new n.EventEmitter,this.finish=new n.EventEmitter,this.next=new n.EventEmitter,this.back=new n.EventEmitter,this.navigationControl=new d.BehaviorSubject({busyState:{busy:!1},allowStepChange:!0}),this.stepLineWidth=65,this.previousStepIndex=0,this.onBack=function(){if(!ae.default(a.stepIndex)){var e=a.arraySteps[a.stepIndex-1];(e.hidden||e.disabled)&&(e=De.default(a.arraySteps.slice(0).reverse(),(function(e){return!e.hidden}),_e.default(a.arraySteps.slice(0).reverse(),a.arraySteps[a.stepIndex])+1)),a.selectStep(e),a.back.emit()}},this.onNext=function(){var e=a.arraySteps[a.stepIndex+1];a.handleStepControl(a.currentStep),a.currentStep.nextStep({currentStepIndex:a.stepIndex,currentStep:a.currentStep,previousStep:a.currentStep,previousStepIndex:a.stepIndex}),(e.hidden||e.disabled&&!ae.default(e.stepControl))&&(e=De.default(a.arraySteps,(function(e){return!e.hidden}),a.stepIndex+1)),(ae.default(a.currentStep.stepControl)||a.currentStep.stepControl)&&(a.currentStep.complete=!0),e.disabled&&!e.visited&&(a.currentStep.complete=!1),a.selectStep(e),a.next.emit()},this.onFinish=function(){a.finish.emit()},this.onCancel=function(){a.cancel.emit(0!==a.steps.toArray().filter((function(e){return e.complete})).length)},this.buttonPortalActionMap={cancel:this.onCancel,next:this.onNext,back:this.onBack,finish:this.onFinish},r&&(r.component=this)}return e.prototype.ngOnInit=function(){this.buttonComponentTypes=this.buttonComponentTypes||[qs.lateLoadKey],this.finishText===e.placeholderFinishText&&this.logger.warn('DashwizComponent input "finishText" is using placeholder text\n"'+e.placeholderFinishText+'". A value should be specified.')},e.prototype.ngDoCheck=function(){this.currentStep&&(this.buttonProperties={busy:this.currentStep.busyConfig.busy,canProceed:this.canProceed,canFinish:this.canFinish,isLastStepActive:this.steps.last.active,isFirstStepActive:this.steps.first.active,nextText:this.currentStep.nextText,finishText:this.finishText})},e.prototype.ngAfterContentInit=function(){var e=this,t=this.steps.filter((function(e){return e.active}));this.arraySteps=this.steps.toArray(),0===t.length&&(this.currentStep=this.steps.first,this.selectStep(this.currentStep),this.changeDetector.detectChanges()),this.steps.toArray().forEach((function(t){t.valid.subscribe((function(n){ae.default(n)||e.handleStepControl(t)}))})),this.navigationControl.subscribe((function(t){e.currentStep.busyConfig=t.busyState,t.allowStepChange&&!ae.default(e.futureStep)&&e.currentStep!==e.futureStep&&(e.enterAnotherStep(),e.futureStep=void 0)}))},e.prototype.ngAfterViewChecked=function(){this.stretchStepLines&&(this.stepLineWidth=Math.round(this.getLargestLabelWidth()/2),this.changeDetector.detectChanges())},e.prototype.ngOnDestroy=function(){this.steps.toArray().forEach((function(e){return e.valid.unsubscribe()})),this.navigationControl.unsubscribe(),this.dashwizService.component=void 0},e.prototype.addStepDynamic=function(e,t){var n=this.componentFactoryResolver.resolveComponentFactory(Gs),o=this.dynamicStep.createComponent(n);return o.instance.stepTemplate=e.stepTemplate,this.arraySteps.splice(t,0,o.instance),this.steps.reset(this.arraySteps),o.instance},e.prototype.disableStep=function(e){var t=this.arraySteps.indexOf(e);this.arraySteps[t].disabled=!0,this.changeDetector.detectChanges()},e.prototype.enableStep=function(e){var t=this.arraySteps.indexOf(e);this.arraySteps[t].disabled=!1,this.changeDetector.detectChanges()},e.prototype.hideStep=function(e){var t=this.arraySteps.indexOf(e);this.arraySteps[t].hidden=!0},e.prototype.showStep=function(e){var t=this.arraySteps.indexOf(e);this.arraySteps[t].hidden=!1},e.prototype.goToStep=function(e){this.selectStep(this.arraySteps[e])},e.prototype.selectStep=function(e){e.disabled||(this.futureStep=e,this.currentStep.exitStep({currentStepIndex:this.arraySteps.indexOf(this.futureStep),currentStep:this.futureStep,previousStep:this.arraySteps[this.stepIndex],previousStepIndex:this.stepIndex}),this.navigationControl.value.allowStepChange&&this.enterAnotherStep())},e.prototype.enterAnotherStep=function(){var e;this.currentStep.applyExitingStep(),null===(e=this.futureStep)||void 0===e||e.enterStep(),this.futureStep&&(this.currentStep=this.futureStep),this.currentStep.applyEnteringStep(),this.stepIndex=this.arraySteps.indexOf(this.currentStep),this.stepNavigatedEvent={currentStepIndex:this.stepIndex,currentStep:this.currentStep,previousStep:this.arraySteps[this.previousStepIndex],previousStepIndex:this.previousStepIndex},this.stepNavigated.emit(this.stepNavigatedEvent),this.previousStepIndex=this.stepIndex},e.prototype.onButtonPortalOutput=function(e){var t,n;null===(n=(t=this.buttonPortalActionMap)[e.id])||void 0===n||n.call(t)},e.prototype.disableFollowingSteps=function(){this.arraySteps.slice(this.stepIndex+1).map((function(e){e.disabled=!0}))},e.prototype.enableFollowingSteps=function(){this.arraySteps.slice(this.stepIndex+1).map((function(e){e.disabled=!1}))},e.prototype.handleStepControl=function(e){ae.default(e.stepControl)||(e.stepControl?this.enableFollowingSteps():this.disableFollowingSteps())},e.prototype.getLargestLabelWidth=function(){var e=this.stepTitles.map((function(e){return e.nativeElement.offsetWidth}));return Math.round(Math.max.apply(Math,Fe(e)))},e}();Zs.placeholderFinishText="Action",Zs.decorators=[{type:n.Component,args:[{selector:"nui-dashwiz",template:'<div class="nui-dashwiz d-flex flex-column h-100">\n <div class="nui-dashwiz__header" *ngIf="!hideHeader" [class.nui-dashwiz__header--lines-stretched]="stretchStepLines">\n <ul class="nui-dashwiz__header-steps" *ngIf="steps">\n <li *ngFor="let step of steps;let first = first; let last = last" (click)="selectStep(step)"\n [ngClass]="{\n \'nui-dashwiz__header-step--first\': first,\n \'nui-dashwiz__header-step--last\': last,\n \'nui-dashwiz__header-step--visited\': step.visited,\n \'nui-dashwiz__header-step--disabled\': step.disabled || !step.visited || currentStep.busyConfig.busy,\n \'nui-dashwiz__header-step--active\': step.active,\n \'nui-dashwiz__header-step--complete\': step.complete\n }"\n class="nui-dashwiz__header-step">\n <div class="nui-dashwiz__header-step-container" *ngIf="!step.hidden">\n <div class="nui-dashwiz__header-step-row">\n <div class="nui-dashwiz__header-step-col">\n <div class="nui-dashwiz__header-step-content">\n <span class="nui-dashwiz__header-step-link">\n <span class="nui-dashwiz__header-step-title" #stepTitle>\n {{step.title}}</span>\n <div class="nui-dashwiz__header-step-link-container">\n <div class="nui-dashwiz__header-step-col nui-dashwiz__header-step-col-right">\n <div class="nui-dashwiz__header-step-line" [ngStyle]="{\'min-width.px\': stepLineWidth}"></div>\n </div>\n <nui-icon [icon]="step.icon" [iconColor]="step.iconColor"></nui-icon>\n <div class="nui-dashwiz__header-step-col nui-dashwiz__header-step-col-left">\n <div class="nui-dashwiz__header-step-line" [ngStyle]="{\'min-width.px\': stepLineWidth}"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n </div>\n\n <div class="nui-scroll-shadows flex-grow-1 overflow-auto">\n <ng-content></ng-content>\n <ng-template #container></ng-template>\n </div>\n\n <div class="nui-dashwiz__footer">\n <ng-container nuiComponentPortal\n componentId="dashwizButtons"\n [componentType]="buttonComponentTypes.length === 1 ? buttonComponentTypes[0] : buttonComponentTypes[stepIndex]"\n [properties]="buttonProperties"\n [outputs]="[\'cancel\',\'next\',\'back\',\'finish\']"\n (output)="onButtonPortalOutput($event)"\n #componentPortal="nuiComponentPortal">\n <ng-template [cdkPortalOutlet]="componentPortal.portal"\n (attached)="componentPortal.attached($event)"></ng-template>\n </ng-container>\n </div>\n</div>\n',host:{class:"flex-grow-1 overflow-auto"},styles:[".nui-dashwiz__header{padding:10px 15px;background-color:var(--nui-color-bg-secondary,#fafafa);border-bottom:1px solid #d9d9d9;border-bottom:1px solid var(--nui-color-line-default,#d9d9d9);overflow:hidden;text-align:center;display:flex;justify-content:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.nui-dashwiz__header-steps{margin-bottom:0;white-space:nowrap;display:inline-flex}.nui-dashwiz__header-step{line-height:normal;display:inline-flex;cursor:pointer}.nui-dashwiz__header-step--disabled{pointer-events:none;cursor:default}.nui-dashwiz__header-step--visited .nui-dashwiz__header-step-link{color:var(--nui-color-text-link,#0079aa)}.nui-dashwiz__header-step--visited .nui-dashwiz__header-step-link:hover{text-decoration:underline}.nui-dashwiz__header-step--visited .nui-dashwiz__header-step-col-right>.nui-dashwiz__header-step-line{border-color:var(--nui-color-line-active,#0079aa)}.nui-dashwiz__header-step--first .nui-dashwiz__header-step-col-right,.nui-dashwiz__header-step--last .nui-dashwiz__header-step-col-left{border-color:transparent;opacity:0}.nui-dashwiz__header-step--active{cursor:default}.nui-dashwiz__header-step--active .nui-dashwiz__header-step-link{color:var(--nui-color-bg-dark,#111)}.nui-dashwiz__header-step--active .nui-dashwiz__header-step-link:hover .nui-dashwiz__header-step-title{text-decoration:none}.nui-dashwiz__header-step--active .nui-dashwiz__header-step-link .nui-dashwiz__header-step-col-right>.nui-dashwiz__header-step-line,.nui-dashwiz__header-step--complete .nui-dashwiz__header-step-link .nui-dashwiz__header-step-col-left>.nui-dashwiz__header-step-line,.nui-dashwiz__header-step--complete .nui-dashwiz__header-step-link .nui-dashwiz__header-step-col-right>.nui-dashwiz__header-step-line{border-color:var(--nui-color-line-active,#0079aa)}.nui-dashwiz__header-step-container{display:inline-table;width:100%}.nui-dashwiz__header-step-container-bottom{display:none}.nui-dashwiz__header-step-container-bottom .nui-dashwiz__header-step-title{width:100%;max-width:100%;margin:0}.nui-dashwiz__header-step-row{display:table-row}.nui-dashwiz__header-step-col{display:table-cell;vertical-align:middle}.nui-dashwiz__header-step-col .nui-dashwiz__header-step-line{border-color:var(--nui-color-line-default,#d9d9d9)}.nui-dashwiz__header-step-col-right .nui-dashwiz__header-step-line{margin-right:-1px}.nui-dashwiz__header-step-line{border-bottom:2px solid;height:2px}.nui-dashwiz__header-step-link{color:var(--nui-color-text-secondary,rgba(17,17,17,.6));transition:color .3s}.nui-dashwiz__header-step-link-container{display:flex;align-content:baseline;justify-content:center;align-items:center}.nui-dashwiz__header-step-title{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;vertical-align:middle;display:inline-block;max-width:140px;margin:0 0 5px;text-decoration:inherit}.nui-dashwiz__header.nui-dashwiz__header--lines-stretched .nui-dashwiz__header-step-title{max-width:unset}.nui-dashwiz__footer{z-index:1080;background-color:var(--nui-color-bg-content,#fff);border-top:1px solid var(--nui-color-line-default,#d9d9d9)}"]}]}],Zs.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:n.ComponentFactoryResolver},{type:o.LoggerService},{type:no}]},Zs.propDecorators={steps:[{type:n.ContentChildren,args:[Gs]}],stepTitles:[{type:n.ViewChildren,args:["stepTitle"]}],dynamicStep:[{type:n.ViewChild,args:["container",{read:n.ViewContainerRef}]}],hideHeader:[{type:n.Input}],canProceed:[{type:n.Input}],canFinish:[{type:n.Input}],finishText:[{type:n.Input}],stretchStepLines:[{type:n.Input}],buttonComponentTypes:[{type:n.Input}],stepNavigated:[{type:n.Output}],cancel:[{type:n.Output}],finish:[{type:n.Output}],next:[{type:n.Output}],back:[{type:n.Output}],navigationControl:[{type:n.Input}]};var Ys=function(){function e(){}return e.prototype.transform=function(e,t,n){var o;if(!ee.default(e)){if(te.default(e)){if(!t)return e;var i=Fe(e);return i.push(t),i}var r=void 0===n?"undefined":n;return Object.assign({},e,((o={})[r]=t,o))}},e}();Ys.decorators=[{type:n.Pipe,args:[{name:"nuiAddData"}]}];var Xs=function(){function e(e){this.widgetTypesService=e}return e.prototype.transform=function(e,t){var n,o;return void 0===t&&(t="widget"),(null==e?void 0:e.type)?null===(o=null===(n=this.widgetTypesService.getWidgetType(e.type,e.version).paths)||void 0===n?void 0:n[t])||void 0===o?void 0:o.root:null},e}();Xs.decorators=[{type:n.Pipe,args:[{name:"nuiPizzagnaRoot",pure:!0}]}],Xs.ctorParameters=function(){return[{type:_o}]};var Js,Qs=function(){function e(){this.defaultHeaderPrefix=$localize(Js||(Js=Ve(["Value"],["Value"])))}return e.prototype.transform=function(e,t,n){return void 0===n&&(n=this.defaultHeaderPrefix),n+" "+(t+1)+(e?" - ":"")+(e||"")},e}();function el(e){var t,n;if(e.valid||e.untouched)return!1;if(e instanceof r.FormGroup)try{for(var o=Re(Object.keys(e.controls)),i=o.next();!i.done;i=o.next()){var a=i.value;if(el(e.controls[a]))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(e instanceof r.FormArray)for(var s=0;s<e.length;s++){if(el(e.at(s)))return!0}return(e.touched||e.dirty)&&!!e.errors}Qs.decorators=[{type:n.Pipe,args:[{name:"nuiWidgetConfiguratorSectionHeader"}]}];var tl=function(){function t(){}return t.prototype.transform=function(t){if(!t)throw new Error("Provided form is undefined");return d.combineLatest([t.statusChanges,t.valueChanges]).pipe(v.startWith(null),v.map((function(){return el(t)?e.AccordionState.CRITICAL:e.AccordionState.DEFAULT})),v.distinct())},t}();tl.decorators=[{type:n.Pipe,args:[{name:"nuiWidgetEditorAccordionFormState",pure:!1}]}];var nl=function(){function e(){}return e.prototype.transform=function(t,n,o){if(void 0===o&&(o=e.ERROR_ICON_DEFAULT),!t)throw new Error("Provided form is undefined");return d.combineLatest([t.statusChanges,t.valueChanges]).pipe(v.startWith(null),v.map((function(){return el(t)?o:n})))},e}();nl.ERROR_ICON_DEFAULT="status_critical",nl.decorators=[{type:n.Pipe,args:[{name:"nuiFormHeaderIconPipe",pure:!1}]}];var ol=function(){function e(e,t,n,i,r,a,s){var l=this;this.componentFactoryResolver=e,this.widgetTypesService=t,this.injector=n,this.appRef=i,this.logger=r,this.router=s,this.close$=new d.Subject,this.handleSubmit=function(e,t){return function(n){return n.pipe(l.trySubmit(t,e),l.updateDashboard(e.dashboardComponent))}},this.trySubmit=function(e,t){return function(n){return n.pipe(v.switchMap((function(n){return n&&ze.default(e)?e(n,t).pipe(v.catchError((function(e){return l.logger.error(e),l.componentRef.instance.handleSubmitError(),d.EMPTY}))):d.of(n)})))}},this.updateDashboard=function(e){return function(t){return new d.Observable((function(n){return t.subscribe((function(t){if(t){var i;t.id=t.id||o.uuid();var r=e.dashboard.widgets[t.id];i=r?Object.assign(Object.assign({},t),{pizzagna:Object.assign(Object.assign({},l.widgetTypesService.getWidgetType(t.type,t.version).widget),{configuration:t.pizzagna.configuration})}):t,e.removeWidget(i.id,!1),setTimeout((function(){e.updateWidget(i)}))}l.close(),n.next()}))}))}},this.renderer=a.createRenderer(null,null)}return e.prototype.open=function(e){var t,n={dashboardComponent:e.dashboardComponent,widget:Ie.default(e.widget)};this.componentRef=this.appendComponentToBody();var o=this.componentRef.instance;return o.formPortal=e.portalBundle.portal,o.previewWidget=Ie.default(e.widget),(null===(t=e.portalBundle)||void 0===t?void 0:t.attached)&&o.formPortalAttached.pipe(v.takeUntil(this.close$)).subscribe(e.portalBundle.attached),o.changeDetector.detectChanges(),o.result.asObservable().pipe(this.handleSubmit(n,e.trySubmit))},e.prototype.close=function(){this.renderer&&(this.close$.next(),this.renderer.removeChild(document.body,this.componentRef.hostView.rootNodes[0]),this.appRef.detachView(this.componentRef.hostView),this.componentRef.destroy(),this.renderer.removeStyle(document.body,"overflow"))},e.prototype.appendComponentToBody=function(){var e=this,t=this.componentFactoryResolver.resolveComponentFactory(gi).create(this.injector);return this.appRef.attachView(t.hostView),this.renderer.appendChild(document.body,t.hostView.rootNodes[0]),this.renderer.setStyle(document.body,"overflow","hidden"),this.router&&this.router.events.pipe(v.filter((function(e){return e instanceof H.NavigationEnd})),v.takeUntil(this.close$)).subscribe((function(){return e.close()})),t},e}();ol.decorators=[{type:n.Injectable}],ol.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:_o},{type:n.Injector},{type:n.ApplicationRef},{type:o.LoggerService},{type:n.RendererFactory2},{type:H.Router,decorators:[{type:n.Optional}]}]};var il=function(){function e(){}return e.getTextColor=function(e){return new a.TextColorProvider(new a.SequentialColorProvider([e]),{light:"white",dark:"black"}).get(e)},e}();il.decorators=[{type:n.Injectable}];var rl=function(){function e(e,t){this.configuratorService=e,this.componentPortalService=t}return e.prototype.open=function(e){if(!e.portalBundle){var t={portal:this.componentPortalService.createComponentPortal(Fi,null),attached:function(t){t.instance.cloneSelectionComponentType=e.widgetSelectionComponentType}};e.portalBundle=t}return this.configuratorService.open(e)},e}();rl.decorators=[{type:n.Injectable}],rl.ctorParameters=function(){return[{type:ol},{type:li}]};var al=function(){function t(e,t){this.configuratorService=e,this.componentPortalService=t}return t.prototype.open=function(t){if(!t.portalBundle){var n={portal:this.componentPortalService.createComponentPortal($i,null),attached:function(e){var n,o=e.instance;o.formPizzagna=t.formPizzagna,o.formRoot=null===(n=t.paths)||void 0===n?void 0:n.root,o.changeDetector.markForCheck()}};t.portalBundle=n}var o=Ie.default(t.widget);return delete o.pizzagna[e.PizzagnaLayer.Data],t.widget=o,this.configuratorService.open(t)},t}();al.decorators=[{type:n.Injectable}],al.ctorParameters=function(){return[{type:ol},{type:li}]};var sl=[gi,fi,qs,$r,Nr,Br,Ma,Wr,Mr,ns,Za,ms,Va,Ws,Ks,cs,Rs,Ps,bi,yi,Si,Ci,wi,_i,Vs,Ls,Ii,Ai,Oi,Pi,Ti,Jr,Da,Na,Li,$i,Fi,As,rs,Bs,ks,Ms,Us,Sa,Lr,Wa,$a,os,Ua,Ga],ll=Fe(sl,[Zs,Gs,Bi,Ri,hi,ki,fa,Ys,Xs,tl,Qs,nl,mi]),dl=function(e){var t,n;try{for(var o=Re(sl.filter((function(e){return e.lateLoadKey}))),i=o.next();!i.done;i=o.next()){var r=i.value;e.registerByLateLoadKey(r)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}};dl.decorators=[{type:n.NgModule,args:[{imports:[i.ScrollingModule,Ke,r.ReactiveFormsModule,s.GridsterModule,E.DragDropModule,k.PortalModule,o.NuiBusyModule,ci,o.NuiIconModule,o.NuiMenuModule,o.NuiPopupModule,o.NuiDialogModule,o.NuiSpinnerModule,o.NuiTextboxModule,o.NuiFormFieldModule,o.NuiButtonModule,o.NuiOverlayAdditionsModule,o.NuiSelectV2Module,o.NuiRadioModule,o.NuiCheckboxModule,o.NuiValidationMessageModule,o.NuiExpanderModule,o.NuiPanelModule,o.NuiDividerModule,o.NuiSwitchModule,o.NuiMessageModule,o.NuiWizardModule,o.NuiSorterModule,o.NuiSearchModule,o.NuiRepeatModule,o.NuiImageModule],declarations:Fe(ll),providers:[ol,Ei,Vi,al,rl,il,Xo,Wo],exports:ll,entryComponents:sl}]}],dl.ctorParameters=function(){return[{type:si}]};var cl=function(){function e(e){this.gridsterItem=e}return e.prototype.ngOnChanges=function(e){e.nuiGridsterItemWidgetId&&(this.gridsterItem.widgetId=this.nuiGridsterItemWidgetId)},e}();cl.decorators=[{type:n.Directive,args:[{selector:"[nuiGridsterItemWidgetId]"}]}],cl.ctorParameters=function(){return[{type:s.GridsterItemComponent,decorators:[{type:n.Host},{type:n.Self}]}]},cl.propDecorators={nuiGridsterItemWidgetId:[{type:n.Input}]};var ul=function(){function e(e){this.logger=e,this.updateDashboard=function(e){return function(t){return new d.Observable((function(n){return t.subscribe((function(t){t&&e.removeWidget(t),n.next()}))}))}}}return e.prototype.handleRemove=function(e,t,n,o){return this.tryRemove(o,t,n).pipe(this.updateDashboard(e))},e.prototype.tryRemove=function(e,t,n){var o=this;return ze.default(e)?e(t,n).pipe(v.catchError((function(e){return o.logger.error(e),d.EMPTY}))):d.of(t)},e}();ul.ɵprov=X.ɵɵdefineInjectable({factory:function(){return new ul(X.ɵɵinject(J.LoggerService))},token:ul,providedIn:"root"}),ul.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],ul.ctorParameters=function(){return[{type:o.LoggerService}]};var pl,hl,gl,ml,fl,vl=function(){function e(e,t,n,o){this.dashboardComponent=e,this.widgetEditorService=t,this.widgetRemovalService=n,this.widgetTypesService=o,this.destroy$=new d.Subject}return e.prototype.ngOnInit=function(){var e=this;this.dashboardComponent.eventBus.getStream(Qe).pipe(v.switchMap((function(t){var n=e.dashboardComponent.dashboard.widgets[t.widgetId],o=e.widgetTypesService.getWidgetType(n.type,n.version),i={dashboardComponent:e.dashboardComponent,formPizzagna:o.configurator,paths:o.paths.configurator,widget:n,trySubmit:e.dashboardPersistenceHandler&&e.dashboardPersistenceHandler.trySubmit};return e.widgetEditorService.open(i)})),v.takeUntil(this.destroy$)).subscribe(),this.dashboardComponent.eventBus.getStream(Je).pipe(v.switchMap((function(t){var n=t.widgetId,o=e.dashboardPersistenceHandler&&e.dashboardPersistenceHandler.tryRemove,i={dashboardComponent:e.dashboardComponent,widget:Ie.default(e.dashboardComponent.dashboard.widgets[n])};return e.widgetRemovalService.handleRemove(e.dashboardComponent,n,i,o)})),v.takeUntil(this.destroy$)).subscribe()},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e}();vl.decorators=[{type:n.Directive,args:[{selector:"[nuiWidgetEditor]"}]}],vl.ctorParameters=function(){return[{type:Qt,decorators:[{type:n.Host},{type:n.Self}]},{type:al},{type:ul},{type:_o}]},vl.propDecorators={dashboardPersistenceHandler:[{type:n.Input,args:["nuiWidgetEditor"]}]};var yl,bl,Cl,Sl,wl,Il,Pl,Tl,xl,Dl,_l,zl=((pl={})[e.PizzagnaLayer.Structure]=((hl={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","dataAndCalculations"]}},hl.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:$localize(yl||(yl=Ve(["Presentation"],["Presentation"]))),nodes:["titleAndDescription"]}},hl.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:{converter:{providerId:bt}}},hl.dataAndCalculations={id:"dataAndCalculations",componentType:Li.lateLoadKey,properties:{headerText:$localize(bl||(bl=Ve(["Data and calculations"],["Data and calculations"]))),nodes:["dataSource","grouping","entityFormatting"]}},hl.dataSource={id:"dataSource",componentType:$r.lateLoadKey,properties:{dataSourceProviders:[]},providers:(gl={},gl[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"/.providers.dataSource",keys:["providerId"]}]}},gl)},hl.grouping={id:"grouping",componentType:Wa.lateLoadKey,properties:{groups:[],groupBy:[]},providers:(ml={},ml[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"listWidget.providers."+e.WellKnownProviders.Adapter+".properties",keys:["groupBy","drillstate","groups"]}]}},ml)},hl.entityFormatting={id:"entityFormatting",componentType:$a.lateLoadKey,properties:{mappingKeys:["icon_status","capital","name","icon","url"],dataFieldIds:{icon:"icon",status:"icon_status",detailedUrl:"capital",label:"name",url:"url"}},providers:(fl={},fl[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"listWidget.providers."+e.WellKnownProviders.Adapter+".properties.componentsConfig.leaf.properties",keys:["dataFieldIds"]}]}},fl)},hl),pl),Ol={id:"header",componentType:ii.lateLoadKey,properties:{editMode:!1}},El={id:"loading",componentType:yn.lateLoadKey,providers:(Cl={},Cl[e.WellKnownProviders.LoadingAdapter]={providerId:kt},Cl)},kl={id:"body",componentType:ni.lateLoadKey,properties:{content:"bodyContent"}},Rl=((Sl={})[e.HttpStatusCode.Unknown]=e.ErrorNodeKey.ErrorUnknown,Sl[e.HttpStatusCode.Forbidden]=e.ErrorNodeKey.ErrorForbidden,Sl[e.HttpStatusCode.NotFound]=e.ErrorNodeKey.ErrorNotFound,Sl),Al=((wl={})[e.ErrorNodeKey.ErrorUnknown]={id:e.ErrorNodeKey.ErrorUnknown,componentType:Be.lateLoadKey,properties:{image:"no-data-to-show",title:$localize(Il||(Il=Ve(["Whoops, something went wrong"],["Whoops, something went wrong"]))),description:$localize(Pl||(Pl=Ve(["There was an unexpected error."],["There was an unexpected error."])))}},wl[e.ErrorNodeKey.ErrorForbidden]={id:e.ErrorNodeKey.ErrorForbidden,componentType:Be.lateLoadKey,properties:{image:"no-data-to-show",title:$localize(Tl||(Tl=Ve(["403 - Forbidden"],["403 - Forbidden"]))),description:$localize(xl||(xl=Ve(["The requested action was forbidden."],["The requested action was forbidden."])))}},wl[e.ErrorNodeKey.ErrorNotFound]={id:e.ErrorNodeKey.ErrorNotFound,componentType:Be.lateLoadKey,properties:{image:"no-data-to-show",title:$localize(Dl||(Dl=Ve(["404 - Not Found"],["404 - Not Found"]))),description:$localize(_l||(_l=Ve(["The requested resource could not be found."],["The requested resource could not be found."])))}},wl);function Fl(t,n,o,i){var r;return void 0===n&&(n=Rt),void 0===o&&(o=Rl),void 0===i&&(i=Al),Object.assign({bodyContent:{id:"bodyContent",componentType:ti.lateLoadKey,properties:{primaryContent:t,fallbackMap:o},providers:(r={},r[e.WellKnownProviders.ContentFallbackAdapter]={providerId:n},r)}},i)}var Vl,Ll,Bl,Nl,$l={providerId:Pt};function jl(e,t){return void 0===e&&(e=!1),void 0===t&&(t=0),{providerId:ht,properties:{enabled:e,interval:t}}}var Kl,Wl,Ml,Ul,Hl,Gl,ql,Zl,Yl,Xl,Jl,Ql,ed,td,nd,od,id,rd,ad,sd,ld,dd,cd,ud,pd,hd,gd,md,fd,vd,yd,bd,Cd,Sd,wd,Id,Pd,Td,xd,Dd,_d,zd=((Vl={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(Object.assign(Object.assign(((Ll={})["/"]={id:Ze,componentType:un.lateLoadKey,properties:{nodes:["header","loading","search","body"]},providers:(Bl={},Bl[e.WellKnownProviders.EventProxy]=$l,Bl)},Ll.header=Ol,Ll.loading=El,Ll.body=Object.assign(Object.assign({},kl),{properties:Object.assign(Object.assign({},kl.properties),{elementClass:"overflow-auto"})}),Ll),Fl("listWidget")),{search:{id:"search",componentType:ei.lateLoadKey}}),Fl("mainContent")),{mainContent:{id:"mainContent",componentType:un.lateLoadKey,properties:{nodes:["navigationBar","listWidget"]}},navigationBar:{id:"navigationBar",componentType:fn.lateLoadKey},listWidget:{id:"listWidget",componentType:vn.lateLoadKey,providers:{},properties:{elementClass:"w-100 p-3"}}}),Vl[e.PizzagnaLayer.Configuration]=((Nl={})["/"]={id:Ze},Nl.header={properties:{title:$localize(Kl||(Kl=Ve(["Empty Custom Widget"],["Empty Custom Widget"])))}},Nl),Vl),Od={paths:{widget:(Wl={},Wl[e.WellKnownPathKey.Root]=Ze,Wl),configurator:(Ml={},Ml[e.WellKnownPathKey.Root]=Ze,Ml[e.WellKnownPathKey.DataSourceProviders]="dataSource.properties.dataSourceProviders",Ml)},widget:zd,configurator:zl},Ed=((Ul={})[e.PizzagnaLayer.Structure]=((Hl={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","customConfig"]}},Hl.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:$localize(ql||(ql=Ve(["Presentation"],["Presentation"]))),nodes:["titleAndDescription"]}},Hl.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:{converter:{providerId:bt}}},Hl.customConfig={id:"customConfig",componentType:Li.lateLoadKey,properties:{headerText:$localize(Zl||(Zl=Ve(["Custom Widget Configuration"],["Custom Widget Configuration"]))),nodes:["embeddedContentSelection"]}},Hl.embeddedContentSelection={id:"embeddedContentSelection",componentType:Wr.lateLoadKey,properties:{messageComponent:{componentType:Mr.lateLoadKey,properties:{emphasizeText:"Some content may not work as expected.",generalText:"Web pages embedded in a widget may not be able to open popup windows or may experience formatting problems.\n If you supply your own HTML, dangerous content like scripts will be removed.",link:{href:"https://www.solarwinds.com/",target:"_blank",text:"Learn more about best practices for the HTML widget"},allowDismiss:!0}}},providers:(Gl={},Gl[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"mainContent.properties",keys:["customEmbeddedContent","mode","messageComponent","sanitized"]}]}},Gl)},Hl),Ul),kd=((Yl={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(((Xl={})["/"]={id:Ze,componentType:un.lateLoadKey,providers:(Jl={},Jl[e.WellKnownProviders.Refresher]=jl(),Jl[e.WellKnownProviders.EventProxy]=$l,Jl),properties:{nodes:["header","loading","body"]}},Xl.header=Ol,Xl.loading=El,Xl.body=kl,Xl),Fl("mainContent")),{mainContent:{id:"mainContent",componentType:en.lateLoadKey,properties:{elementClass:"d-flex w-100 justify-content-center"}}}),Yl[e.PizzagnaLayer.Configuration]={header:{properties:{title:$localize(Ql||(Ql=Ve(["Empty Embedded Content Widget"],["Empty Embedded Content Widget"])))}}},Yl),Rd={paths:{widget:(ed={},ed[e.WellKnownPathKey.Root]=Ze,ed),configurator:(td={},td[e.WellKnownPathKey.Root]=Ze,td)},widget:kd,configurator:Ed},Ad=[{componentType:Pi.lateLoadKey,label:$localize(ud||(ud=Ve(["Raw Formatter"],["Raw Formatter"]))),dataTypes:{value:null}},{componentType:_i.lateLoadKey,label:$localize(pd||(pd=Ve(["Si Units Formatter"],["Si Units Formatter"]))),dataTypes:{value:null}},{componentType:wi.lateLoadKey,label:$localize(hd||(hd=Ve(["Icon"],["Icon"]))),dataTypes:{value:null}}],Fd=((nd={})[e.PizzagnaLayer.Structure]=((od={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","tiles"]},providers:(id={},id[e.WellKnownProviders.FormattersRegistry]={providerId:jt},id)},od.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:$localize(gd||(gd=Ve(["Presentation"],["Presentation"]))),nodes:["titleAndDescription","refresher"]}},od.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:{converter:{providerId:bt}}},od.refresher=Is,od.tiles={id:"tiles",componentType:Ma.lateLoadKey,properties:{template:[{id:"description",componentType:Jr.lateLoadKey,properties:{configurableUnits:!0,backgroundColors:Fe(Vr)},providers:(rd={},rd[e.WellKnownProviders.Converter]={providerId:Ot,properties:{formParts:[{previewPath:"properties.widgetData",keys:["label","backgroundColor","units"]}]}},rd)},{id:"dataSource",componentType:$r.lateLoadKey,properties:{dataSourceProviders:[],errorComponent:Br.lateLoadKey},providers:(ad={},ad[e.WellKnownProviders.Converter]={providerId:Ot,properties:{formParts:[{previewPath:"providers.dataSource",keys:["providerId","properties"]},{previewPath:"providers.adapter.properties.dataSource",keys:["properties"]}]}},ad[e.WellKnownProviders.Broadcaster]={providerId:Bt,properties:{configs:[{trackOn:"component",key:"dataFieldIds",paths:["data.{parentComponentId}/formatting.properties.dataFieldIds"]}]}},ad)},{id:"thresholds",componentType:Da.lateLoadKey,providers:(sd={},sd[e.WellKnownProviders.Converter]={providerId:Ot,properties:{formParts:[{previewPath:"providers.adapter.properties.thresholds",keys:["criticalThresholdValue","warningThresholdValue","showThresholds","reversedThresholds"]}]}},sd)},{id:"backgroundColorRules",componentType:Lr.lateLoadKey,properties:{backgroundColors:Fe(Vr)},providers:(ld={},ld[e.WellKnownProviders.Converter]={providerId:Ot,properties:{formParts:[{previewPath:"providers.kpiColorPrioritizer.properties",keys:["rules"]}]}},ld)},{id:"formatting",componentType:Bs.lateLoadKey,providers:(dd={},dd[e.WellKnownProviders.Converter]={providerId:Ot,properties:{formParts:[{previewPath:"properties.configuration.formatters.Value",keys:["formatter"]}]}},dd),properties:{formatter:{componentType:Pi.lateLoadKey,properties:{dataFieldIds:{value:"value"}}}}}]},providers:(cd={},cd[e.WellKnownProviders.Converter]={providerId:St},cd)},od),nd),Vd=((md={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(((fd={})["/"]={id:Ze,componentType:un.lateLoadKey,providers:(vd={},vd[e.WellKnownProviders.Refresher]=jl(),vd[e.WellKnownProviders.EventProxy]=$l,vd),properties:{nodes:["header","loading","body"]}},fd.header=Ol,fd.loading=El,fd.body=Object.assign(Object.assign({},kl),{properties:Object.assign(Object.assign({},kl.properties),{elementClass:"overflow-hidden"})}),fd),Fl("tiles",At)),{tiles:{id:"tiles",componentType:pn.lateLoadKey,properties:{elementClass:"flex-grow-1 pt-2 px-3 pb-3 w-100",template:{componentType:nn.lateLoadKey,providers:(yd={},yd[e.WellKnownProviders.KpiColorPrioritizer]={providerId:yt,properties:{}},yd[e.WellKnownProviders.Adapter]={providerId:ft,properties:{propertyPath:"widgetData"}},yd),properties:{elementClass:"flex-grow-1"}}}}}),md[e.PizzagnaLayer.Configuration]=((bd={})["/"]={id:Ze,providers:(Cd={},Cd[e.WellKnownProviders.Refresher]=jl(!1,60),Cd)},bd.header={properties:{title:$localize(Sd||(Sd=Ve(["Empty KPI Widget"],["Empty KPI Widget"])))}},bd),md),Ld={paths:{widget:(wd={},wd[e.WellKnownPathKey.Root]=Ze,wd),configurator:(Id={},Id[e.WellKnownPathKey.Root]=Ze,Id[e.WellKnownPathKey.DataSourceConfigComponentType]="tiles.properties.template[1].componentType",Id[e.WellKnownPathKey.TileDescriptionConfigComponentType]="tiles.properties.template[0].componentType",Id[e.WellKnownPathKey.DataSourceProviders]="tiles.properties.template[1].properties.dataSourceProviders",Id[e.WellKnownPathKey.TileDescriptionBackgroundColors]="tiles.properties.template[0].properties.backgroundColors",Id[e.WellKnownPathKey.TileBackgroundColorRulesBackgroundColors]="tiles.properties.template[3].properties.backgroundColors",Id)},widget:Vd,configurator:Fd},Bd={paths:{widget:(Pd={},Pd[e.WellKnownPathKey.Root]=Ze,Pd),configurator:(Td={},Td[e.WellKnownPathKey.Root]=Ze,Td)},widget:(xd={},xd[e.PizzagnaLayer.Structure]=(Dd={},Dd["/"]={id:Ze,componentType:un.lateLoadKey,properties:{nodes:["header","body"]}},Dd.header=Ol,Dd.body=kl,Dd.bodyContent={id:"bodyContent",componentType:Ai.lateLoadKey},Dd),xd[e.PizzagnaLayer.Configuration]={header:{properties:{title:$localize(_d||(_d=Ve(["New Widget"],["New Widget"])))}}},xd)},Nd=function(e,t){var n=(null==t?void 0:t.chartSeriesDataFieldId)||"data[0]",o=e[0];return(null==t?void 0:t.activeMetricId)&&((o=e.find((function(e){return e.id===(null==t?void 0:t.activeMetricId)})))||console.warn("No metric with id: "+(null==t?void 0:t.activeMetricId)+" found. Taking first available.")),ce.default(o,n)};Nd.aggregatorType="fieldMapper";var $d=function(e,t){var n,o=e.map((function(e){return e.data[0]})),i=t||{},r=i.activeMetricId,a=i.base100,s=Oe.default(o),l=o[0];r&&((l=null===(n=e.find((function(e){return e.id===r})))||void 0===n?void 0:n.data[0])||console.warn("No metric with id: "+r+" found. Taking first available."));var d=l/s,c=a?100*d:d;return(c=Math.round(100*c)/100).toString()};$d.aggregatorType="percentageAggregator";var jd,Kd,Wd,Md,Ud,Hd,Gd=function(e,t){var n=(t||{}).activeMetricId;if(n){var o=e.find((function(e){return e.id===n}));if(o)return o.data[0]}return Oe.default(e.map((function(e){return e.data[0]}))).toString()};Gd.aggregatorType="sumAggregator";var qd,Zd,Yd,Xd,Jd,Qd,ec,tc,nc,oc,ic,rc,ac,sc,lc,dc,cc,uc,pc,hc,gc,mc,fc,vc,yc,bc,Cc,Sc,wc,Ic,Pc,Tc,xc,Dc,_c,zc,Oc,Ec,kc,Rc,Ac,Fc,Vc,Lc,Bc,Nc,$c,jc,Kc,Wc,Mc,Uc,Hc,Gc,qc,Zc,Yc,Xc=[{componentType:"",label:$localize(qd||(qd=Ve(["Raw Formatter"],["Raw Formatter"]))),dataTypes:{value:null}},{componentType:Oi.lateLoadKey,label:$localize(Zd||(Zd=Ve(["Status With Icon"],["Status With Icon"]))),dataTypes:{value:null}},{componentType:Ii.lateLoadKey,label:$localize(Yd||(Yd=Ve(["Link"],["Link"]))),dataTypes:{value:null}}],Jc=[{componentType:Pi.lateLoadKey,label:$localize(Xd||(Xd=Ve(["Raw Formatter"],["Raw Formatter"]))),dataTypes:{value:null},properties:{elementClass:"nui-text-page"}},{componentType:_i.lateLoadKey,label:$localize(Jd||(Jd=Ve(["Si Units Formatter"],["Si Units Formatter"]))),dataTypes:{value:null},properties:{elementClass:"nui-text-page"}},{componentType:Ti.lateLoadKey,label:$localize(Qd||(Qd=Ve(["Percentage Formatter"],["Percentage Formatter"]))),dataTypes:{value:null},properties:{elementClass:"nui-text-page"}}],Qc=[{aggregatorType:Gd.aggregatorType,label:"Sum Aggregator",fn:Gd,configurationComponent:Ua.lateLoadKey},{aggregatorType:$d.aggregatorType,label:"Percentage Aggregator",fn:$d,properties:{base100:!0},configurationComponent:Ua.lateLoadKey},{aggregatorType:Nd.aggregatorType,label:"Field Mapper Aggregator",fn:Nd,configurationComponent:Ga.lateLoadKey}],eu=((jd={})[e.PizzagnaLayer.Structure]=((Kd={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","dataAndCalculations"]},providers:(Wd={},Wd[e.WellKnownProviders.FormattersRegistry]={providerId:Kt},Wd)},Kd.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:"Presentation",nodes:["titleAndDescription","chartOptionsEditor"]}},Kd.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:(Md={},Md[e.WellKnownProviders.Converter]={providerId:bt},Md)},Kd.chartOptionsEditor={id:"chartOptionsEditor",componentType:ns.lateLoadKey,properties:{chartOptions:{chartTypes:["PieChart","DonutChart","VerticalBarChart","HorizontalBarChart"],legendPlacementOptions:[{id:e.LegendPlacement.None,label:$localize(ec||(ec=Ve(["None"],["None"])))},{id:e.LegendPlacement.Right,label:$localize(tc||(tc=Ve(["Right"],["Right"])))},{id:e.LegendPlacement.Bottom,label:$localize(nc||(nc=Ve(["Bottom"],["Bottom"])))}],contentFormatters:[{componentType:Ci.lateLoadKey,label:$localize(oc||(oc=Ve(["Raw"],["Raw"])))},{componentType:Si.lateLoadKey,label:$localize(ic||(ic=Ve(["Sum"],["Sum"])))},{componentType:bi.lateLoadKey,label:$localize(rc||(rc=Ve(["Percentage"],["Percentage"]))),configurationComponent:"DonutContentPercentageConfigurationComponent"}],legendFormatters:[{componentType:Oi.lateLoadKey,label:$localize(ac||(ac=Ve(["Status With Icon"],["Status With Icon"])))},{componentType:Ii.lateLoadKey,label:$localize(sc||(sc=Ve(["Link"],["Link"])))}]}},providers:(Ud={},Ud[e.WellKnownProviders.Converter]={providerId:Ct},Ud)},Kd.refresher=Is,Kd.dataAndCalculations={id:"dataAndCalculations",componentType:Li.lateLoadKey,properties:{headerText:$localize(lc||(lc=Ve(["Data and Calculations"],["Data and Calculations"]))),nodes:["dataSource"]}},Kd.dataSource={id:"dataSource",componentType:$r.lateLoadKey,properties:{dataSourceProviders:[],errorComponent:Br.lateLoadKey},providers:(Hd={},Hd[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"chart.providers.dataSource",keys:["providerId","properties"]},{previewPath:"chart.providers.adapter.properties.dataSource",keys:["properties"]}]}},Hd[e.WellKnownProviders.Broadcaster]={providerId:Bt,properties:{configs:[{trackOn:"component",key:"dsOutput",paths:["data.chartOptionsEditor.properties.dsOutput"]}]}},Hd)},Kd),jd),tu=((dc={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(((cc={})["/"]={id:Ze,componentType:un.lateLoadKey,properties:{nodes:["header","loading","body"]},providers:(uc={},uc[e.WellKnownProviders.Refresher]=jl(),uc[e.WellKnownProviders.EventProxy]=$l,uc)},cc.header=Ol,cc.loading=El,cc.body=Object.assign(Object.assign({},kl),{properties:Object.assign(Object.assign({},kl.properties),{elementClass:"overflow-auto"})}),cc),Fl("chart")),{chart:{id:"chart",componentType:ko.lateLoadKey,providers:(pc={},pc[e.WellKnownProviders.Adapter]={providerId:gt,properties:{componentId:"chart",propertyPath:"widgetData"}},pc),properties:{elementClass:"d-flex flex-grow-1 justify-content-center overflow-auto"}}}),dc[e.PizzagnaLayer.Configuration]=((hc={})["/"]={id:Ze,providers:(gc={},gc[e.WellKnownProviders.Refresher]=jl(!1,60),gc)},hc.header={properties:{title:$localize(mc||(mc=Ve(["Empty Proportional Widget"],["Empty Proportional Widget"])))}},hc),dc),nu={paths:{widget:(fc={},fc[e.WellKnownPathKey.Root]=Ze,fc),configurator:(vc={},vc[e.WellKnownPathKey.Root]=Ze,vc[e.WellKnownPathKey.DataSourceConfigComponentType]="dataSource.componentType",vc[e.WellKnownPathKey.DataSourceProviders]="dataSource.properties.dataSourceProviders",vc[e.WellKnownPathKey.Formatters]="chartOptionsEditor.properties.chartOptions.contentFormatters",vc)},widget:tu,configurator:eu},ou=((yc={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(((bc={})["/"]={id:Ze,componentType:un.lateLoadKey,providers:(Cc={},Cc[e.WellKnownProviders.Refresher]=jl(),Cc[e.WellKnownProviders.EventProxy]={providerId:Pt,properties:{downstreams:[nt.id]}},Cc),properties:{nodes:["header","loading","body"]}},bc.header=Ol,bc.loading=El,bc.body=Object.assign(Object.assign({},kl),{properties:Object.assign(Object.assign({},kl.properties),{elementClass:"overflow-auto"})}),bc),Fl("table")),{table:{id:"table",componentType:Vo.lateLoadKey,providers:(Sc={},Sc[e.WellKnownProviders.Adapter]={providerId:Dt,properties:{componentId:"table",dataPath:"widgetData",dataFieldsPath:"dataFields",totalItemsPath:"totalItems"}},Sc.virtualViewportManager={providerId:Nt},Sc),properties:{elementClass:"flex-grow-1 mx-3 mb-3 mt-2",delayedMousePresenceDetectionEnabled:!0,configuration:{columns:[],scrollActivationDelayMs:500,headerTooltipsEnabled:!0}}}}),yc[e.PizzagnaLayer.Configuration]=((wc={})["/"]={id:Ze,providers:(Ic={},Ic[e.WellKnownProviders.Refresher]=jl(!1,60),Ic)},wc.header={properties:{title:$localize(Pc||(Pc=Ve(["Empty Table Widget"],["Empty Table Widget"])))}},wc),yc),iu={paths:{widget:(Tc={},Tc[e.WellKnownPathKey.Root]=Ze,Tc),configurator:(xc={},xc[e.WellKnownPathKey.Root]=Ze,xc[e.WellKnownPathKey.DataSourceConfigComponentType]="dataSource.componentType",xc[e.WellKnownPathKey.DataSourceProviders]="dataSource.properties.dataSourceProviders",xc[e.WellKnownPathKey.Formatters]="columns.properties.template[1].properties.formatters",xc)},widget:ou,configurator:Es},ru=((Dc={})[e.PizzagnaLayer.Structure]=((_c={})["/"]={id:Ze,componentType:fi.lateLoadKey,properties:{elementClass:"flex-grow-1 overflow-auto nui-scroll-shadows",nodes:["presentation","dataAndCalculations","series"]}},_c.presentation={id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:$localize(Fc||(Fc=Ve(["Presentation"],["Presentation"]))),nodes:["titleAndDescription","timeseriesMetadata"]}},_c.titleAndDescription={id:"titleAndDescription",componentType:Na.lateLoadKey,providers:(zc={},zc[e.WellKnownProviders.Converter]={providerId:bt},zc)},_c.timeseriesMetadata={id:"timeseriesMetadata",componentType:Va.lateLoadKey,properties:{legendPlacements:[{id:e.LegendPlacement.None,label:$localize(Vc||(Vc=Ve(["None"],["None"])))},{id:e.LegendPlacement.Right,label:$localize(Lc||(Lc=Ve(["Right"],["Right"])))},{id:e.LegendPlacement.Bottom,label:$localize(Bc||(Bc=Ve(["Bottom"],["Bottom"])))}]},providers:(Oc={},Oc[e.WellKnownProviders.Converter]={providerId:wt},Oc)},_c.refresher=Is,_c.dataAndCalculations={id:"dataAndCalculations",componentType:Li.lateLoadKey,properties:{headerText:$localize(Nc||(Nc=Ve(["Data and Calculations"],["Data and Calculations"]))),nodes:["dataSource"]}},_c.dataSource={id:"dataSource",componentType:$r.lateLoadKey,properties:{dataSourceProviders:[],errorComponent:Br.lateLoadKey},providers:(Ec={},Ec[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"/.providers.dataSource",keys:["providerId","properties"]},{previewPath:"chart.providers.adapter.properties.dataSource",keys:["properties"]}]}},Ec)},_c.series={id:"series",componentType:Ws.lateLoadKey,providers:(kc={},kc[e.WellKnownProviders.Converter]={providerId:It},kc),properties:{template:[{id:"description",componentType:Ms.lateLoadKey,providers:(Rc={},Rc[e.WellKnownProviders.Converter]={providerId:zt,properties:{formParts:[{previewPath:"chart.providers.adapter.properties.series",keys:["label"]}]}},Rc)},{id:"indicatorData",componentType:Us.lateLoadKey,providers:(Ac={},Ac[e.WellKnownProviders.Converter]={providerId:Et},Ac)}]}},_c),Dc),au=(($c={})[e.PizzagnaLayer.Structure]=Object.assign(Object.assign(((jc={})["/"]={id:Ze,componentType:un.lateLoadKey,providers:(Kc={},Kc[e.WellKnownProviders.Refresher]=jl(),Kc[e.WellKnownProviders.EventProxy]=$l,Kc),properties:{nodes:["header","loading","body"]}},jc.header=Ol,jc.loading=El,jc.body=Object.assign(Object.assign({},kl),{properties:Object.assign(Object.assign({},kl.properties),{elementClass:"overflow-auto"})}),jc),Fl("mainContent")),{mainContent:{id:"mainContent",componentType:un.lateLoadKey,properties:{nodes:["timeframeSelection","chart"]}},timeframeSelection:{id:"timeframeSelection",componentType:Ko.lateLoadKey},chart:{id:"chart",componentType:Jo.lateLoadKey,properties:{elementClass:"d-flex flex-column justify-content-center h-100 overflow-auto",configuration:{preset:e.TimeseriesChartPreset.Line,scales:{y:{type:e.TimeseriesScaleType.Linear},x:{type:e.TimeseriesScaleType.Time}}}},providers:(Wc={},Wc[e.WellKnownProviders.Adapter]={providerId:mt,properties:{componentId:"chart",propertyPath:"widgetData",series:[]}},Wc)}}),$c[e.PizzagnaLayer.Configuration]=((Mc={})["/"]={id:Ze,providers:(Uc={},Uc[e.WellKnownProviders.Refresher]=jl(!1,60),Uc)},Mc.header={properties:{title:$localize(Hc||(Hc=Ve(["Empty Timeseries Widget"],["Empty Timeseries Widget"])))}},Mc),$c),su={paths:{widget:(Gc={},Gc[e.WellKnownPathKey.Root]=Ze,Gc),configurator:(qc={},qc[e.WellKnownPathKey.Root]=Ze,qc[e.WellKnownPathKey.DataSourceConfigComponentType]="dataSource.componentType",qc[e.WellKnownPathKey.DataSourceProviders]="dataSource.properties.dataSourceProviders",qc)},widget:au,configurator:ru},lu=[Qt,en,cl,nn,Go,yn,ko,un,qo,Zo,Yo,Uo,Vo,Ro,Lo,pn,Ko,Jo,ni,ti,ri,vl,ii,vn,mn,gn,fn,ei,Oo],du=[en,nn,Go,yn,ko,un,qo,Zo,Yo,Uo,Vo,Lo,pn,Ko,Jo,ni,ti,ii,Be,vn,mn,gn,fn,ei,Oo],cu=function(e,t,n,o){var i,r;e.registerWidgetType("kpi",1,Ld),e.registerWidgetType("table",1,iu),e.registerWidgetType("proportional",1,nu),e.registerWidgetType("timeseries",1,su),e.registerWidgetType("previewPlaceholder",1,Bd),e.registerWidgetType("embedded-content",1,Rd),e.registerWidgetType("drilldown",1,Od);try{for(var a=Re(du.filter((function(e){return e.lateLoadKey}))),s=a.next();!s.done;s=a.next()){var l=s.value;t.registerByLateLoadKey(l)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}n.registerEvent(Ye),n.registerEvent(Je),n.registerEvent(tt),n.registerEvent(Qe),n.registerEvent(et),n.registerEvent(nt),n.registerEvent(ot),n.registerEvent(rt),n.registerEvent(at),n.registerEvent(st),n.registerEvent(dt),n.registerEvent(Sn),n.registerEvent(lt),o.addItems(Ad)};cu.decorators=[{type:n.NgModule,args:[{imports:[Ke,s.GridsterModule,o.NuiBusyModule,o.NuiButtonModule,a.NuiChartsModule,dl,o.NuiIconModule,o.NuiImageModule,o.NuiMenuModule,ci,o.NuiPopupModule,o.NuiProgressModule,o.NuiTableModule,o.NuiTimeFrameBarModule,i.ScrollingModule,o.NuiTimeFramePickerModule,r.ReactiveFormsModule,o.NuiSpinnerModule,o.NuiTooltipModule,o.NuiSearchModule,o.NuiCommonModule,o.NuiRepeatModule,o.NuiSelectModule],declarations:lu,providers:[li,_o,t.DecimalPipe,Jn],exports:lu,entryComponents:du}]}],cu.ctorParameters=function(){return[{type:_o},{type:si},{type:bo},{type:wo}]},e.KpiFormatterTypes=void 0,(e.KpiFormatterTypes||(e.KpiFormatterTypes={})).Value="Value";var uu,pu,hu,gu,mu,fu,vu,yu={presentation:{id:"presentation",componentType:Li.lateLoadKey,properties:{headerText:"Presentation",nodes:["titleAndDescription","chartOptionsEditor","donutContentConfiguration"]}},chartOptionsEditor:{id:"chartOptionsEditor",componentType:Za.lateLoadKey,properties:{chartTypes:[{id:"PieChart",label:$localize(uu||(uu=Ve(["Pie"],["Pie"])))},{id:"DonutChart",label:$localize(pu||(pu=Ve(["Donut"],["Donut"])))},{id:"VerticalBarChart",label:$localize(hu||(hu=Ve(["Vertical Bar"],["Vertical Bar"])))},{id:"HorizontalBarChart",label:$localize(gu||(gu=Ve(["Horizontal Bar"],["Horizontal Bar"])))}],legendPlacementOptions:[{id:e.LegendPlacement.None,label:$localize(mu||(mu=Ve(["None"],["None"])))},{id:e.LegendPlacement.Right,label:$localize(fu||(fu=Ve(["Right"],["Right"])))},{id:e.LegendPlacement.Bottom,label:$localize(vu||(vu=Ve(["Bottom"],["Bottom"])))}]},providers:(Zc={},Zc[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"chart.properties.configuration.chartOptions",keys:["type","legendPlacement","legendFormatter"]}]}},Zc[e.WellKnownProviders.Broadcaster]={providerId:Bt,properties:{configs:[{trackOn:"component",key:"chartTypeChanged$",paths:["data.donutContentConfiguration.properties.chartType"]}]}},Zc)},donutContentConfiguration:{id:"donutContentConfiguration",componentType:os.lateLoadKey,providers:(Yc={},Yc[e.WellKnownProviders.Converter]={providerId:_t,properties:{formParts:[{previewPath:"chart.properties.configuration.chartOptions.donutContentConfig",keys:["formatter","aggregator"]}]}},Yc)}};e.AddDataPipe=Ys,e.AggregatorMetricSelectorConfigurationComponent=Ua,e.BackgroundColorRulesConfigurationComponent=Lr,e.BaseLayout=cn,e.CHART_PALETTE_CS3_ALTERNATIVE_NAMES=kr,e.CHART_PALETTE_CS_S_EXTENDED_ALTERNATIVE_NAMES=Rr,e.CONFIGURATOR_CONVERTER=yo,e.ColorPickerComponent=hi,e.ComponentPortalDirective=di,e.ComponentPortalService=li,e.ComponentRegistryService=si,e.ConfiguratorComponent=gi,e.ConfiguratorHeadingComponent=ki,e.ConfiguratorHeadingService=Ei,e.ConfiguratorService=ol,e.DASHBOARD_EDIT_MODE=dt,e.DASHBOARD_EVENT_BUS=Ut,e.DATA_SOURCE=Ht,e.DATA_SOURCE_BUSY=lt,e.DATA_SOURCE_CHANGE=In,e.DATA_SOURCE_CREATED=Pn,e.DATA_SOURCE_DESTROYED=wn,e.DATA_SOURCE_INVOKED=ut,e.DATA_SOURCE_OUTPUT=Sn,e.DEFAULT_COMPARATORS=Fn,e.DEFAULT_KPI_BACKGROUND_COLORS=Vr,e.DEFAULT_KPI_FORMATTERS=Ad,e.DEFAULT_KPI_TILE_COLOR=Fr,e.DEFAULT_LEGEND_FORMATTERS=Xc,e.DEFAULT_PIZZAGNA_ROOT=Ze,e.DEFAULT_PROPORTIONAL_CONTENT_AGGREGATORS=Qc,e.DEFAULT_PROPORTIONAL_CONTENT_FORMATTERS=Jc,e.DEFAULT_REFRESH_INTERVAL=Xn,e.DEFAULT_UNIT_CONVERSION_THRESHOLD=Ne,e.DONUT_CONTENT_CONFIGURATION_SLICE=yu,e.DRILLDOWN=pt,e.DashboardComponent=Qt,e.DashboardUnitConversionPipe=$e,e.DashwizButtonsComponent=qs,e.DashwizComponent=Zs,e.DashwizStepComponent=Gs,e.DataSourceAdapter=Tn,e.DataSourceConfigurationComponent=$r,e.DataSourceConfigurationV2Component=Nr,e.DataSourceErrorComponent=Br,e.DelayedMousePresenceDetectionDirective=Ro,e.DescriptionConfigurationComponent=As,e.DescriptionConfigurationV2Component=rs,e.DonutChartFormatterConfiguratorComponent=vi,e.DonutContentConfigurationComponent=os,e.DonutContentPercentageConfigurationComponent=yi,e.DonutContentPercentageFormatterComponent=bi,e.DonutContentRawFormatterComponent=Ci,e.DonutContentSumFormatterComponent=Si,e.DropAreaComponent=mi,e.DynamicComponentCreator=rn,e.ERROR_FALLBACK_MAP=Rl,e.ERROR_NODES=Al,e.EVENT_PROXY=$l,e.EmbeddedContentComponent=en,e.EmbeddedContentConfigurationComponent=Wr,e.EntityFormattingConfigurationComponent=$a,e.EventRegistryService=bo,e.FORMATTERS_REGISTRY=Gt,e.FieldMapperAggregatorConfiguratorComponent=Ga,e.FormHeaderIconPipePipe=nl,e.FormStackComponent=fi,e.FormatterConfiguratorComponent=Fs,e.FormatterRegistryService=Co,e.GridsterItemWidgetIdDirective=cl,e.GroupingConfigurationComponent=Wa,e.HEADER_LINK_PROVIDER=Zt,e.INTERACTION=ct,e.IconFormatterComponent=wi,e.InfoMessageConfigurationComponent=Mr,e.InteractionHandler=_n,e.ItemsDynamicComponent=Ri,e.KpiColorComparatorsRegistryService=Vn,e.KpiComponent=nn,e.KpiDescriptionConfigurationComponent=Jr,e.KpiFormattersRegistryService=wo,e.KpiTilesConfigurationComponent=Ma,e.KpiTilesConverterService=so,e.KpiWidgetColorService=il,e.LineChartComponent=Go,e.LinkConfiguratorComponent=Vs,e.LinkFormatterComponent=Ii,e.ListGroupItemComponent=gn,e.ListLeafItemComponent=mn,e.ListNavigationBarComponent=fn,e.ListWidgetComponent=vn,e.LoadingComponent=yn,e.NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER=Wt,e.NOVA_DASHBOARD_EVENT_PROXY=Pt,e.NOVA_DATASOURCE_ADAPTER=gt,e.NOVA_DATASOURCE_INTERVAL_REFRESHER=ht,e.NOVA_DRILLDOWN_DATASOURCE_ADAPTER=vt,e.NOVA_EVENT_BUS_DEBUGGER=Lt,e.NOVA_GENERIC_ARRAY_CONVERTER=zt,e.NOVA_GENERIC_CONVERTER=_t,e.NOVA_KPI_COLOR_PRIORITIZER=yt,e.NOVA_KPI_DATASOURCE_ADAPTER=ft,e.NOVA_KPI_FORMATTERS_REGISTRY=jt,e.NOVA_KPI_SCALE_SYNC_BROKER=Ft,e.NOVA_KPI_SECTION_CONVERTER=Ot,e.NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER=At,e.NOVA_KPI_TILES_CONVERTER=St,e.NOVA_LOADING_ADAPTER=kt,e.NOVA_PIZZAGNA_BROADCASTER=Bt,e.NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY=Kt,e.NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER=Ct,e.NOVA_STATUS_CONTENT_FALLBACK_ADAPTER=Rt,e.NOVA_TABLE_COLUMNS_CONVERTER=Tt,e.NOVA_TABLE_DATASOURCE_ADAPTER=Dt,e.NOVA_TABLE_FILTERS_CONVERTER=xt,e.NOVA_TABLE_FORMATTERS_REGISTRY=$t,e.NOVA_TEST_REGISTRY="NOVA_TEST_REGISTRY",e.NOVA_TIMESERIES_DATASOURCE_ADAPTER=mt,e.NOVA_TIMESERIES_METADATA_CONVERTER=wt,e.NOVA_TIMESERIES_SERIES_CONVERTER=It,e.NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER=Et,e.NOVA_TITLE_AND_DESCRIPTION_CONVERTER=bt,e.NOVA_URL_INTERACTION_HANDLER=Vt,e.NOVA_VIRTUAL_VIEWPORT_MANAGER=Nt,e.NuiDashboardConfiguratorModule=dl,e.NuiDashboardsCommonModule=Ke,e.NuiDashboardsModule=cu,e.NuiPizzagnaModule=ci,e.PIZZAGNA_EVENT_BUS=Mt,e.PREVIEW_EVENT=st,e.PercentageFormatterComponent=Ti,e.PizzagnaComponent=ai,e.PizzagnaRootPipe=Xs,e.PizzagnaService=an,e.PresentationConfigurationComponent=Bs,e.PresentationConfigurationV2Component=ks,e.PreviewOverlayComponent=Le,e.PreviewPlaceholderComponent=Ai,e.PreviewService=io,e.ProportionalChartOptionsEditorComponent=ns,e.ProportionalChartOptionsEditorV2Component=Za,e.ProportionalContentAggregatorsRegistryService=Cn,e.ProportionalDonutContentComponent=Oo,e.ProportionalDonutContentFormattersRegistryService=Io,e.ProportionalLegendFormattersRegistryService=Po,e.ProportionalWidgetChartOptionsConverterService=lo,e.ProportionalWidgetComponent=ko,e.ProviderRegistryService=Do,e.REFRESH=Ye,e.REFRESHER_CONFIGURATOR=Is,e.RawFormatterComponent=Pi,e.RefreshRateConfiguratorComponent=fa,e.Refresher=Qn,e.RefresherConfigurationComponent=Sa,e.RefresherSettingsService=Jn,e.SCROLL_NEXT_PAGE=Xe,e.SET_PROPERTY_VALUE=rt,e.SET_TIMEFRAME=at,e.SiUnitsFormatterComponent=_i,e.StackComponent=un,e.StackedAreaChartComponent=qo,e.StackedBarChartComponent=Zo,e.StackedPercentageAreaChartComponent=Yo,e.StatusBarChartComponent=Uo,e.StatusWithIconFormatterComponent=Oi,e.TEST_REGISTRY=qt,e.TableColumnConfigurationComponent=Rs,e.TableColumnsConfigurationComponent=Ks,e.TableColumnsConfigurationV2Component=cs,e.TableDataSourceAdapter=eo,e.TableDataSourceErrorComponent=Ps,e.TableFiltersEditorComponent=ms,e.TableFormatterRegistryService=So,e.TableWidgetComponent=Vo,e.TemplateLoadErrorComponent=Lo,e.ThresholdsConfigurationComponent=Da,e.TilesComponent=pn,e.TimeframeSelectionComponent=Ko,e.TimeframeSerializationService=Bo,e.TimeseriesChartPresetService=Xo,e.TimeseriesDataSourceAdapter=to,e.TimeseriesMetadataConfigurationComponent=Va,e.TimeseriesSeriesCollectionConfigurationComponent=Ws,e.TimeseriesSeriesConverterService=fo,e.TimeseriesTileDescriptionConfigurationComponent=Ms,e.TimeseriesTileIndicatorDataConfigurationComponent=Us,e.TimeseriesWidgetComponent=Jo,e.TitleAndDescriptionConfigurationComponent=Na,e.TitleAndDescriptionConverterService=po,e.UrlInteractionHandler=On,e.ValueSelectorComponent=Ls,e.WIDGET_BODY=kl,e.WIDGET_CREATE=et,e.WIDGET_EDIT=Qe,e.WIDGET_HEADER=Ol,e.WIDGET_LOADING=El,e.WIDGET_POSITION_CHANGE=ot,e.WIDGET_READY=tt,e.WIDGET_REMOVE=Je,e.WIDGET_RESIZE=nt,e.WIDGET_SEARCH=it,e.WidgetBodyComponent=ni,e.WidgetBodyContentComponent=ti,e.WidgetClonerComponent=Fi,e.WidgetClonerService=rl,e.WidgetComponent=ri,e.WidgetConfigurationService=To,e.WidgetConfiguratorSectionComponent=Li,e.WidgetConfiguratorSectionHeaderPipe=Qs,e.WidgetEditorAccordionComponent=Bi,e.WidgetEditorAccordionFormStatePipe=tl,e.WidgetEditorComponent=$i,e.WidgetEditorDirective=vl,e.WidgetEditorService=al,e.WidgetErrorComponent=Be,e.WidgetHeaderComponent=ii,e.WidgetSearchComponent=ei,e.WidgetToDashboardEventProxyService=xo,e.WidgetTypesService=_o,e.WindowObject=zn,e.XYChartComponent=Ho,e.applyStatusEndpoints=function(e,t,n){var o=t;return n.forEach((function(n,i){if(0!==n.data.length){var r=-1,a=-1,s=t[i].data;s.length>0?(r=n.data.findIndex((function(e){return ve.default(e.x).isSame(s[0].x)})),a=n.data.findIndex((function(e){return ve.default(e.x).isSame(s[s.length-1].x)}))):(r=n.data.findIndex((function(t){return ve.default(t.x).isAfter(e.startDatetime)})),a=n.data.findIndex((function(t){return ve.default(t.x).isAfter(e.endDatetime)}))-1);var l=ve.default(e.startDatetime);0!==s.length&&l.isSame(s[0].x)||!l.isBetween(n.data[0].x,n.data[n.data.length-1].x)||o[i].data.unshift(Object.assign(Object.assign({},n.data[r-1]),{x:e.startDatetime.toDate()}));var d=ve.default(e.endDatetime);0!==s.length&&d.isSame(s[s.length-1].x)||!d.isBetween(n.data[0].x,n.data[n.data.length-1].x)||o[i].data.push(Object.assign(Object.assign({},n.data[a]),{x:e.endDatetime.toDate()}))}})),o},e.chartPaletteColorMap=Ar,e.fieldMapper=Nd,e.getPizzagnaPropertyPath=on,e.hasControlInErrorState=el,e.mapDataToFormatterProperties=tn,e.mergeChanges=sn,e.percentageAggregator=$d,e.refresher=jl,e.sumAggregator=Gd,e.widgetBodyContentNodes=Fl,e.ɵ1=En,e.ɵ2=kn,e.ɵ3=Rn,e.ɵ4=An,e.ɵa=bn,e.ɵb=oo,e.ɵc=no,e.ɵd=Vi,e.ɵe=pi,e.ɵf=Wo,e.ɵg=Mo,e.ɵh=Ao,e.ɵi=Fo,e.ɵj=ul,e.ɵk=ro,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=nova-ui-dashboards.umd.min.js.map