@nova-ui/dashboards 12.0.17 → 13.0.1

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 (813) hide show
  1. package/esm2020/lib/common/common.module.mjs +41 -0
  2. package/esm2020/lib/common/components/preview-overlay/preview-overlay.component.mjs +35 -0
  3. package/{esm2015/lib/common/components/public-api.js → esm2020/lib/common/components/public-api.mjs} +0 -0
  4. package/esm2020/lib/common/components/widget-error/widget-error.component.mjs +54 -0
  5. package/{esm2015/lib/common/constants.js → esm2020/lib/common/constants.mjs} +0 -0
  6. package/esm2020/lib/common/pipes/dashboard-unit-conversion-pipe.mjs +57 -0
  7. package/{esm2015/lib/common/pipes/public-api.js → esm2020/lib/common/pipes/public-api.mjs} +0 -0
  8. package/{esm2015/lib/common/public-api.js → esm2020/lib/common/public-api.mjs} +0 -0
  9. package/esm2020/lib/components/dashboard/dashboard.component.mjs +222 -0
  10. package/{esm2015/lib/components/dashboard/default-gridster-config.js → esm2020/lib/components/dashboard/default-gridster-config.mjs} +0 -0
  11. package/{esm2015/lib/components/dashboard/public-api.js → esm2020/lib/components/dashboard/public-api.mjs} +0 -0
  12. package/{esm2015/lib/components/dashboard/types.js → esm2020/lib/components/dashboard/types.mjs} +0 -0
  13. package/esm2020/lib/components/embedded-content/embedded-content.component.mjs +95 -0
  14. package/esm2020/lib/components/kpi-widget/kpi.component.mjs +119 -0
  15. package/{esm2015/lib/components/kpi-widget/public-api.js → esm2020/lib/components/kpi-widget/public-api.mjs} +0 -0
  16. package/{esm2015/lib/components/kpi-widget/types.js → esm2020/lib/components/kpi-widget/types.mjs} +0 -0
  17. package/esm2020/lib/components/layouts/base-layout.mjs +118 -0
  18. package/{esm2015/lib/components/layouts/public-api.js → esm2020/lib/components/layouts/public-api.mjs} +0 -0
  19. package/esm2020/lib/components/layouts/stack/stack.component.mjs +65 -0
  20. package/esm2020/lib/components/layouts/tiles/tiles.component.mjs +99 -0
  21. package/esm2020/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.mjs +62 -0
  22. package/esm2020/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.mjs +76 -0
  23. package/esm2020/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.mjs +60 -0
  24. package/esm2020/lib/components/list-widget/list-widget.component.mjs +105 -0
  25. package/{esm2015/lib/components/list-widget/public-api.js → esm2020/lib/components/list-widget/public-api.mjs} +0 -0
  26. package/{esm2015/lib/components/list-widget/types.js → esm2020/lib/components/list-widget/types.mjs} +0 -0
  27. package/esm2020/lib/components/loading/loading.component.mjs +51 -0
  28. package/{esm2015/lib/components/loading/public-api.js → esm2020/lib/components/loading/public-api.mjs} +0 -0
  29. package/esm2020/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.mjs +152 -0
  30. package/esm2020/lib/components/proportional-widget/proportional-widget.component.mjs +328 -0
  31. package/{esm2015/lib/components/proportional-widget/public-api.js → esm2020/lib/components/proportional-widget/public-api.mjs} +0 -0
  32. package/{esm2015/lib/components/proportional-widget/types.js → esm2020/lib/components/proportional-widget/types.mjs} +0 -0
  33. package/esm2020/lib/components/providers/data-source-adapter.mjs +145 -0
  34. package/esm2020/lib/components/providers/drilldown-data-source-adapter.mjs +114 -0
  35. package/{esm2015/lib/components/providers/event-bus-debugger.js → esm2020/lib/components/providers/event-bus-debugger.mjs} +4 -4
  36. package/esm2020/lib/components/providers/interaction/interaction-handler.mjs +56 -0
  37. package/esm2020/lib/components/providers/interaction/url-interaction-handler.mjs +69 -0
  38. package/esm2020/lib/components/providers/kpi-color-prioritizer.mjs +107 -0
  39. package/esm2020/lib/components/providers/kpi-data-source-adapter.mjs +109 -0
  40. package/esm2020/lib/components/providers/kpi-scale-sync-broker.mjs +143 -0
  41. package/esm2020/lib/components/providers/kpi-status-content-fallback-adapter.mjs +104 -0
  42. package/esm2020/lib/components/providers/loading-adapter.mjs +72 -0
  43. package/esm2020/lib/components/providers/pizzagna-broadcaster.service.mjs +84 -0
  44. package/{esm2015/lib/components/providers/public-api.js → esm2020/lib/components/providers/public-api.mjs} +0 -0
  45. package/{esm2015/lib/components/providers/refresher-settings.service.js → esm2020/lib/components/providers/refresher-settings.service.mjs} +4 -4
  46. package/esm2020/lib/components/providers/refresher.mjs +105 -0
  47. package/esm2020/lib/components/providers/status-content-fallback-adapter.mjs +67 -0
  48. package/esm2020/lib/components/providers/table-data-source-adapter.mjs +83 -0
  49. package/esm2020/lib/components/providers/timeseries-data-source-adapter.mjs +72 -0
  50. package/{esm2015/lib/components/providers/types.js → esm2020/lib/components/providers/types.mjs} +0 -0
  51. package/{esm2015/lib/components/public-api.js → esm2020/lib/components/public-api.mjs} +0 -0
  52. package/esm2020/lib/components/table-widget/addons/search-feature-addon.service.mjs +101 -0
  53. package/esm2020/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.mjs +79 -0
  54. package/{esm2015/lib/components/table-widget/delayed-mouse-presence-detection.directive.js → esm2020/lib/components/table-widget/delayed-mouse-presence-detection.directive.mjs} +4 -4
  55. package/{esm2015/lib/components/table-widget/public-api.js → esm2020/lib/components/table-widget/public-api.mjs} +0 -0
  56. package/esm2020/lib/components/table-widget/table-widget.component.mjs +493 -0
  57. package/{esm2015/lib/components/table-widget/types.js → esm2020/lib/components/table-widget/types.mjs} +0 -0
  58. package/{esm2015/lib/components/template-load-error/template-load-error.component.js → esm2020/lib/components/template-load-error/template-load-error.component.mjs} +4 -4
  59. package/{esm2015/lib/components/time-frame-selection/public-api.js → esm2020/lib/components/time-frame-selection/public-api.mjs} +0 -0
  60. package/esm2020/lib/components/time-frame-selection/timeframe-selection.component.mjs +129 -0
  61. package/{esm2015/lib/components/timeseries-widget/chart-presets/public-api.js → esm2020/lib/components/timeseries-widget/chart-presets/public-api.mjs} +0 -0
  62. package/esm2020/lib/components/timeseries-widget/chart-presets/status-bar-chart/apply-status-endpoints.mjs +73 -0
  63. package/esm2020/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.mjs +152 -0
  64. package/esm2020/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.mjs +110 -0
  65. package/esm2020/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.mjs +62 -0
  66. package/esm2020/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.mjs +62 -0
  67. package/esm2020/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.mjs +79 -0
  68. package/esm2020/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.mjs +62 -0
  69. package/esm2020/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.mjs +160 -0
  70. package/{esm2015/lib/components/timeseries-widget/public-api.js → esm2020/lib/components/timeseries-widget/public-api.mjs} +0 -0
  71. package/{esm2015/lib/components/timeseries-widget/timeseries-chart-preset.service.js → esm2020/lib/components/timeseries-widget/timeseries-chart-preset.service.mjs} +4 -4
  72. package/esm2020/lib/components/timeseries-widget/timeseries-scales.service.mjs +85 -0
  73. package/esm2020/lib/components/timeseries-widget/timeseries-widget.component.mjs +69 -0
  74. package/{esm2015/lib/components/timeseries-widget/types.js → esm2020/lib/components/timeseries-widget/types.mjs} +0 -0
  75. package/{esm2015/lib/components/types.js → esm2020/lib/components/types.mjs} +0 -0
  76. package/{esm2015/lib/components/widget/public-api.js → esm2020/lib/components/widget/public-api.mjs} +0 -0
  77. package/{esm2015/lib/components/widget/types.js → esm2020/lib/components/widget/types.mjs} +0 -0
  78. package/esm2020/lib/components/widget/widget-body/widget-body.component.mjs +88 -0
  79. package/esm2020/lib/components/widget/widget-body-content/widget-body-content.component.mjs +75 -0
  80. package/{esm2015/lib/components/widget/widget-header/types.js → esm2020/lib/components/widget/widget-header/types.mjs} +0 -0
  81. package/esm2020/lib/components/widget/widget-header/widget-header.component.mjs +202 -0
  82. package/esm2020/lib/components/widget/widget.component.mjs +65 -0
  83. package/{esm2015/lib/components/widget-search/types.js → esm2020/lib/components/widget-search/types.mjs} +0 -0
  84. package/esm2020/lib/components/widget-search/widget-search.component.mjs +111 -0
  85. package/{esm2015/lib/configurator/components/color-picker/HTMLcolors.js → esm2020/lib/configurator/components/color-picker/HTMLcolors.mjs} +0 -0
  86. package/esm2020/lib/configurator/components/color-picker/color-picker.component.mjs +183 -0
  87. package/{esm2015/lib/configurator/components/color-picker/color.service.js → esm2020/lib/configurator/components/color-picker/color.service.mjs} +4 -4
  88. package/esm2020/lib/configurator/components/configurator/configurator.component.mjs +116 -0
  89. package/esm2020/lib/configurator/components/drop-area/drop-area.component.mjs +30 -0
  90. package/esm2020/lib/configurator/components/form-stack/form-stack.component.mjs +86 -0
  91. package/esm2020/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.mjs +43 -0
  92. package/esm2020/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.mjs +84 -0
  93. package/{esm2015/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.js → esm2020/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.mjs} +5 -5
  94. package/{esm2015/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.js → esm2020/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.mjs} +4 -4
  95. package/esm2020/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.mjs +84 -0
  96. package/{esm2015/lib/configurator/components/formatters/link-formatter/link-formatter.component.js → esm2020/lib/configurator/components/formatters/link-formatter/link-formatter.component.mjs} +5 -5
  97. package/{esm2015/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.js → esm2020/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.mjs} +4 -4
  98. package/{esm2015/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.js → esm2020/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.mjs} +4 -4
  99. package/esm2020/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.mjs +119 -0
  100. package/{esm2015/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.js → esm2020/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.mjs} +5 -5
  101. package/{esm2015/lib/configurator/components/formatters/types.js → esm2020/lib/configurator/components/formatters/types.mjs} +0 -0
  102. package/esm2020/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.mjs +92 -0
  103. package/esm2020/lib/configurator/components/heading/configurator-heading.component.mjs +49 -0
  104. package/esm2020/lib/configurator/components/items-dynamic/items-dynamic.component.mjs +146 -0
  105. package/{esm2015/lib/common/components/preview-overlay/preview-overlay.component.js → esm2020/lib/configurator/components/preview-placeholder/preview-placeholder.component.mjs} +7 -15
  106. package/{esm2015/lib/configurator/components/public-api.js → esm2020/lib/configurator/components/public-api.mjs} +0 -0
  107. package/{esm2015/lib/configurator/components/types.js → esm2020/lib/configurator/components/types.mjs} +0 -0
  108. package/esm2020/lib/configurator/components/widget-cloner/widget-cloner.component.mjs +169 -0
  109. package/{esm2015/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.js → esm2020/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.mjs} +4 -4
  110. package/esm2020/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.mjs +83 -0
  111. package/esm2020/lib/configurator/components/widget-editor/widget-editor.component.mjs +147 -0
  112. package/esm2020/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.mjs +69 -0
  113. package/esm2020/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.mjs +121 -0
  114. package/esm2020/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.mjs +152 -0
  115. package/esm2020/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.mjs +197 -0
  116. package/esm2020/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.mjs +74 -0
  117. package/{esm2015/lib/configurator/components/widgets/configurator-items/data-source-error/public-api.js → esm2020/lib/configurator/components/widgets/configurator-items/data-source-error/public-api.mjs} +0 -0
  118. package/esm2020/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.mjs +41 -0
  119. package/esm2020/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.mjs +133 -0
  120. package/esm2020/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.mjs +44 -0
  121. package/esm2020/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.mjs +101 -0
  122. package/{esm2015/lib/configurator/components/widgets/configurator-items/public-api.js → esm2020/lib/configurator/components/widgets/configurator-items/public-api.mjs} +0 -0
  123. package/{esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/public-api.js → esm2020/lib/configurator/components/widgets/configurator-items/refresher-configuration/public-api.mjs} +0 -0
  124. package/{esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.js → esm2020/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.mjs} +8 -14
  125. package/{esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/time-units.js → esm2020/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/time-units.mjs} +0 -0
  126. package/{esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/types.js → esm2020/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/types.mjs} +0 -0
  127. package/esm2020/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.mjs +168 -0
  128. package/esm2020/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.mjs +139 -0
  129. package/esm2020/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-validator.mjs +56 -0
  130. package/esm2020/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.mjs +150 -0
  131. package/esm2020/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.mjs +90 -0
  132. package/esm2020/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.mjs +74 -0
  133. package/esm2020/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.mjs +159 -0
  134. package/{esm2015/lib/configurator/components/widgets/drilldown/public-api.js → esm2020/lib/configurator/components/widgets/drilldown/public-api.mjs} +0 -0
  135. package/esm2020/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.mjs +92 -0
  136. package/{esm2015/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/public-api.js → esm2020/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/public-api.mjs} +0 -0
  137. package/{esm2015/lib/configurator/components/widgets/kpi/public-api.js → esm2020/lib/configurator/components/widgets/kpi/public-api.mjs} +0 -0
  138. package/{esm2015/lib/configurator/components/widgets/kpi/types.js → esm2020/lib/configurator/components/widgets/kpi/types.mjs} +0 -0
  139. package/esm2020/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.mjs +72 -0
  140. package/esm2020/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.mjs +87 -0
  141. package/esm2020/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.mjs +165 -0
  142. package/esm2020/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.mjs +107 -0
  143. package/esm2020/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.mjs +167 -0
  144. package/{esm2015/lib/configurator/components/widgets/proportional/public-api.js → esm2020/lib/configurator/components/widgets/proportional/public-api.mjs} +0 -0
  145. package/{esm2015/lib/configurator/components/widgets/public-api.js → esm2020/lib/configurator/components/widgets/public-api.mjs} +0 -0
  146. package/esm2020/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.mjs +79 -0
  147. package/esm2020/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.mjs +117 -0
  148. package/esm2020/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.mjs +53 -0
  149. package/esm2020/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.mjs +43 -0
  150. package/esm2020/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.mjs +258 -0
  151. package/esm2020/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.mjs +263 -0
  152. package/esm2020/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.mjs +122 -0
  153. package/esm2020/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.mjs +308 -0
  154. package/esm2020/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.mjs +109 -0
  155. package/esm2020/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.mjs +250 -0
  156. package/esm2020/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.mjs +121 -0
  157. package/{esm2015/lib/configurator/components/widgets/table/public-api.js → esm2020/lib/configurator/components/widgets/table/public-api.mjs} +0 -0
  158. package/{esm2015/lib/configurator/components/widgets/timeseries/public-api.js → esm2020/lib/configurator/components/widgets/timeseries/public-api.mjs} +0 -0
  159. package/esm2020/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.mjs +111 -0
  160. package/esm2020/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.mjs +67 -0
  161. package/esm2020/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.mjs +106 -0
  162. package/{esm2015/lib/configurator/components/widgets/timeseries/types.js → esm2020/lib/configurator/components/widgets/timeseries/types.mjs} +0 -0
  163. package/{esm2015/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.js → esm2020/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.mjs} +5 -5
  164. package/esm2020/lib/configurator/components/wizard/dashwiz/dashwiz.component.mjs +344 -0
  165. package/{esm2015/lib/configurator/components/wizard/dashwiz/dashwiz.service.js → esm2020/lib/configurator/components/wizard/dashwiz/dashwiz.service.mjs} +4 -4
  166. package/{esm2015/lib/configurator/components/wizard/dashwiz/model.js → esm2020/lib/configurator/components/wizard/dashwiz/model.mjs} +0 -0
  167. package/{esm2015/lib/configurator/components/wizard/dashwiz/public-api.js → esm2020/lib/configurator/components/wizard/dashwiz/public-api.mjs} +0 -0
  168. package/esm2020/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.mjs +131 -0
  169. package/{esm2015/lib/configurator/components/wizard/dashwiz-step/public-api.js → esm2020/lib/configurator/components/wizard/dashwiz-step/public-api.mjs} +0 -0
  170. package/{esm2015/lib/configurator/components/wizard/public-api.js → esm2020/lib/configurator/components/wizard/public-api.mjs} +0 -0
  171. package/{esm2015/lib/configurator/components/wizard/types.js → esm2020/lib/configurator/components/wizard/types.mjs} +0 -0
  172. package/{esm2015/lib/configurator/configurator.module.js → esm2020/lib/configurator/configurator.module.mjs} +5 -6
  173. package/{esm2015/lib/configurator/functions/has-control-in-error-state.js → esm2020/lib/configurator/functions/has-control-in-error-state.mjs} +0 -0
  174. package/{esm2015/lib/configurator/functions/public-api.js → esm2020/lib/configurator/functions/public-api.mjs} +0 -0
  175. package/{esm2015/lib/configurator/pipe/add-data.pipe.js → esm2020/lib/configurator/pipe/add-data.pipe.mjs} +4 -4
  176. package/esm2020/lib/configurator/pipe/pizzagna-root.pipe.mjs +45 -0
  177. package/{esm2015/lib/configurator/pipe/public-api.js → esm2020/lib/configurator/pipe/public-api.mjs} +0 -0
  178. package/{esm2015/lib/configurator/pipe/widget-configurator-section-header.pipe.js → esm2020/lib/configurator/pipe/widget-configurator-section-header.pipe.mjs} +4 -4
  179. package/{esm2015/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.js → esm2020/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.mjs} +4 -4
  180. package/{esm2015/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.js → esm2020/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.mjs} +4 -4
  181. package/{esm2015/lib/configurator/public-api.js → esm2020/lib/configurator/public-api.mjs} +0 -0
  182. package/esm2020/lib/configurator/services/configurator-data-source-manager.service.mjs +89 -0
  183. package/{esm2015/lib/configurator/services/configurator-heading.service.js → esm2020/lib/configurator/services/configurator-heading.service.mjs} +4 -4
  184. package/esm2020/lib/configurator/services/configurator.service.mjs +142 -0
  185. package/{esm2015/lib/configurator/services/converters/base-converter.js → esm2020/lib/configurator/services/converters/base-converter.mjs} +4 -4
  186. package/{esm2015/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.js → esm2020/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.mjs} +5 -5
  187. package/esm2020/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.mjs +107 -0
  188. package/esm2020/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.mjs +68 -0
  189. package/{esm2015/lib/configurator/services/converters/public-api.js → esm2020/lib/configurator/services/converters/public-api.mjs} +0 -0
  190. package/esm2020/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.mjs +81 -0
  191. package/{esm2015/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.js → esm2020/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.mjs} +5 -5
  192. package/esm2020/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.mjs +64 -0
  193. package/esm2020/lib/configurator/services/converters/table/table-columns-converter.service.mjs +180 -0
  194. package/esm2020/lib/configurator/services/converters/table/table-filters-converter.service.mjs +67 -0
  195. package/{esm2015/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.js → esm2020/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.mjs} +4 -4
  196. package/esm2020/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.mjs +170 -0
  197. package/{esm2015/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.js → esm2020/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.mjs} +8 -5
  198. package/{esm2015/lib/configurator/services/converters/types.js → esm2020/lib/configurator/services/converters/types.mjs} +0 -0
  199. package/{esm2015/lib/configurator/services/kpi-widget-color.service.js → esm2020/lib/configurator/services/kpi-widget-color.service.mjs} +4 -4
  200. package/{esm2015/lib/configurator/services/preview.service.js → esm2020/lib/configurator/services/preview.service.mjs} +4 -4
  201. package/{esm2015/lib/configurator/services/public-api.js → esm2020/lib/configurator/services/public-api.mjs} +0 -0
  202. package/{esm2015/lib/configurator/services/timeframe-serialization.service.js → esm2020/lib/configurator/services/timeframe-serialization.service.mjs} +4 -4
  203. package/{esm2015/lib/configurator/services/types.js → esm2020/lib/configurator/services/types.mjs} +0 -0
  204. package/{esm2015/lib/configurator/services/widget-cloner.service.js → esm2020/lib/configurator/services/widget-cloner.service.mjs} +4 -4
  205. package/esm2020/lib/configurator/services/widget-editor.service.mjs +61 -0
  206. package/{esm2015/lib/configurator/types.js → esm2020/lib/configurator/types.mjs} +0 -0
  207. package/{esm2015/lib/constants/default-palette.js → esm2020/lib/constants/default-palette.mjs} +0 -0
  208. package/{esm2015/lib/constants/public-api.js → esm2020/lib/constants/public-api.mjs} +0 -0
  209. package/{esm2015/lib/constants/si-units-prefixes.js → esm2020/lib/constants/si-units-prefixes.mjs} +0 -0
  210. package/{esm2015/lib/dashboards.module.js → esm2020/lib/dashboards.module.mjs} +5 -6
  211. package/{esm2015/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js → esm2020/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.mjs} +4 -4
  212. package/{esm2015/lib/directives/public-api.js → esm2020/lib/directives/public-api.mjs} +0 -0
  213. package/{esm2015/lib/directives/widget-editor/public-api.js → esm2020/lib/directives/widget-editor/public-api.mjs} +0 -0
  214. package/{esm2015/lib/directives/widget-editor/widget-editor.directive.js → esm2020/lib/directives/widget-editor/widget-editor.directive.mjs} +4 -4
  215. package/esm2020/lib/functions/get-parent-component-id.mjs +30 -0
  216. package/{esm2015/lib/functions/map-data-to-formatter-properties.js → esm2020/lib/functions/map-data-to-formatter-properties.mjs} +0 -0
  217. package/{esm2015/lib/functions/merge-changes.js → esm2020/lib/functions/merge-changes.mjs} +0 -0
  218. package/{esm2015/lib/functions/on-mark-as-touched.js → esm2020/lib/functions/on-mark-as-touched.mjs} +0 -0
  219. package/{esm2015/lib/functions/parse-string-with-data.js → esm2020/lib/functions/parse-string-with-data.mjs} +0 -0
  220. package/esm2020/lib/functions/proportional-aggregators/field-mapper.mjs +33 -0
  221. package/esm2020/lib/functions/proportional-aggregators/percentage-aggregator.mjs +44 -0
  222. package/{esm2015/lib/functions/proportional-aggregators/public-api.js → esm2020/lib/functions/proportional-aggregators/public-api.mjs} +0 -0
  223. package/{esm2015/lib/functions/proportional-aggregators/sum-aggregator.js → esm2020/lib/functions/proportional-aggregators/sum-aggregator.mjs} +0 -0
  224. package/{esm2015/lib/functions/proportional-aggregators/types.js → esm2020/lib/functions/proportional-aggregators/types.mjs} +0 -0
  225. package/{esm2015/lib/functions/public-api.js → esm2020/lib/functions/public-api.mjs} +0 -0
  226. package/{esm2015/lib/pizzagna/components/pizzagna/pizzagna.component.js → esm2020/lib/pizzagna/components/pizzagna/pizzagna.component.mjs} +6 -10
  227. package/{esm2015/lib/pizzagna/components/pizzagna/public-api.js → esm2020/lib/pizzagna/components/pizzagna/public-api.mjs} +0 -0
  228. package/esm2020/lib/pizzagna/directives/component-portal/component-portal.directive.mjs +306 -0
  229. package/{esm2015/lib/pizzagna/directives/component-portal/public-api.js → esm2020/lib/pizzagna/directives/component-portal/public-api.mjs} +0 -0
  230. package/{esm2015/lib/pizzagna/functions/get-pizzagna-property-path.js → esm2020/lib/pizzagna/functions/get-pizzagna-property-path.mjs} +0 -0
  231. package/{esm2015/lib/pizzagna/functions/public-api.js → esm2020/lib/pizzagna/functions/public-api.mjs} +0 -0
  232. package/{esm2015/lib/pizzagna/pizzagna.module.js → esm2020/lib/pizzagna/pizzagna.module.mjs} +5 -5
  233. package/{esm2015/lib/pizzagna/public-api.js → esm2020/lib/pizzagna/public-api.mjs} +0 -0
  234. package/{esm2015/lib/pizzagna/services/component-portal.service.js → esm2020/lib/pizzagna/services/component-portal.service.mjs} +4 -4
  235. package/{esm2015/lib/pizzagna/services/component-registry.service.js → esm2020/lib/pizzagna/services/component-registry.service.mjs} +4 -4
  236. package/esm2020/lib/pizzagna/services/dynamic-component-creator.service.mjs +63 -0
  237. package/esm2020/lib/pizzagna/services/pizzagna.service.mjs +133 -0
  238. package/{esm2015/lib/pizzagna/services/public-api.js → esm2020/lib/pizzagna/services/public-api.mjs} +0 -0
  239. package/esm2020/lib/services/category-chart-util.service.mjs +126 -0
  240. package/{esm2015/lib/services/event-registry.service.js → esm2020/lib/services/event-registry.service.mjs} +4 -4
  241. package/esm2020/lib/services/kpi-color-comparators-registry.service.mjs +68 -0
  242. package/{esm2015/lib/services/proportional-content-aggregators-registry.service.js → esm2020/lib/services/proportional-content-aggregators-registry.service.mjs} +4 -4
  243. package/{esm2015/lib/services/provider-registry.service.js → esm2020/lib/services/provider-registry.service.mjs} +4 -4
  244. package/{esm2015/lib/services/public-api.js → esm2020/lib/services/public-api.mjs} +0 -0
  245. package/esm2020/lib/services/registry-service.mjs +83 -0
  246. package/{esm2015/lib/services/table-formatter-registry.service.js → esm2020/lib/services/table-formatter-registry.service.mjs} +13 -13
  247. package/{esm2015/lib/services/types.js → esm2020/lib/services/types.mjs} +0 -0
  248. package/esm2020/lib/services/url-interaction.service.mjs +52 -0
  249. package/{esm2015/lib/services/widget-configuration.service.js → esm2020/lib/services/widget-configuration.service.mjs} +4 -4
  250. package/{esm2015/lib/services/widget-removal.service.js → esm2020/lib/services/widget-removal.service.mjs} +4 -4
  251. package/esm2020/lib/services/widget-to-dashboard-event-proxy.service.mjs +152 -0
  252. package/esm2020/lib/services/widget-types.service.mjs +88 -0
  253. package/{esm2015/lib/types.js → esm2020/lib/types.mjs} +0 -0
  254. package/{esm2015/lib/widget-types/common/configurator/components.js → esm2020/lib/widget-types/common/configurator/components.mjs} +0 -0
  255. package/{esm2015/lib/widget-types/common/configurator/public-api.js → esm2020/lib/widget-types/common/configurator/public-api.mjs} +0 -0
  256. package/{esm2015/lib/widget-types/common/public-api.js → esm2020/lib/widget-types/common/public-api.mjs} +0 -0
  257. package/esm2020/lib/widget-types/common/widget/components.mjs +133 -0
  258. package/{esm2015/lib/widget-types/common/widget/legend.js → esm2020/lib/widget-types/common/widget/legend.mjs} +0 -0
  259. package/{esm2015/lib/widget-types/common/widget/providers.js → esm2020/lib/widget-types/common/widget/providers.mjs} +0 -0
  260. package/{esm2015/lib/widget-types/common/widget/public-api.js → esm2020/lib/widget-types/common/widget/public-api.mjs} +0 -0
  261. package/{esm2015/lib/widget-types/common/widget/types.js → esm2020/lib/widget-types/common/widget/types.mjs} +0 -0
  262. package/{esm2015/lib/widget-types/drilldown/drilldown-configurator.js → esm2020/lib/widget-types/drilldown/drilldown-configurator.mjs} +0 -0
  263. package/esm2020/lib/widget-types/drilldown/drilldown-widget.mjs +95 -0
  264. package/{esm2015/lib/widget-types/drilldown/drilldown.js → esm2020/lib/widget-types/drilldown/drilldown.mjs} +0 -0
  265. package/{esm2015/lib/widget-types/embedded-content/embedded-content-configurator.js → esm2020/lib/widget-types/embedded-content/embedded-content-configurator.mjs} +0 -0
  266. package/esm2020/lib/widget-types/embedded-content/embedded-content-widget.mjs +73 -0
  267. package/{esm2015/lib/widget-types/embedded-content/embedded-content.js → esm2020/lib/widget-types/embedded-content/embedded-content.mjs} +0 -0
  268. package/{esm2015/lib/widget-types/kpi/kpi-configurator.js → esm2020/lib/widget-types/kpi/kpi-configurator.mjs} +0 -0
  269. package/esm2020/lib/widget-types/kpi/kpi-widget.mjs +105 -0
  270. package/{esm2015/lib/widget-types/kpi/kpi.js → esm2020/lib/widget-types/kpi/kpi.mjs} +0 -0
  271. package/{esm2015/lib/widget-types/preview-placeholder.js → esm2020/lib/widget-types/preview-placeholder.mjs} +0 -0
  272. package/{esm2015/lib/widget-types/proportional/donut-content-configurator-slice.js → esm2020/lib/widget-types/proportional/donut-content-configurator-slice.mjs} +0 -0
  273. package/{esm2015/lib/widget-types/proportional/proportional-configurator.js → esm2020/lib/widget-types/proportional/proportional-configurator.mjs} +0 -0
  274. package/esm2020/lib/widget-types/proportional/proportional-widget.mjs +91 -0
  275. package/{esm2015/lib/widget-types/proportional/proportional.js → esm2020/lib/widget-types/proportional/proportional.mjs} +0 -0
  276. package/{esm2015/lib/widget-types/public-api.js → esm2020/lib/widget-types/public-api.mjs} +0 -0
  277. package/{esm2015/lib/widget-types/table/default-table-formatters.js → esm2020/lib/widget-types/table/default-table-formatters.mjs} +0 -0
  278. package/{esm2015/lib/widget-types/table/table-configurator.js → esm2020/lib/widget-types/table/table-configurator.mjs} +0 -0
  279. package/esm2020/lib/widget-types/table/table-widget.mjs +111 -0
  280. package/{esm2015/lib/widget-types/table/table.js → esm2020/lib/widget-types/table/table.mjs} +0 -0
  281. package/{esm2015/lib/widget-types/timeseries/timeseries-configurator.js → esm2020/lib/widget-types/timeseries/timeseries-configurator.mjs} +0 -0
  282. package/esm2020/lib/widget-types/timeseries/timeseries-widget.mjs +122 -0
  283. package/{esm2015/lib/widget-types/timeseries/timeseries.js → esm2020/lib/widget-types/timeseries/timeseries.mjs} +0 -0
  284. package/{esm2015/nova-ui-dashboards.js → esm2020/nova-ui-dashboards.mjs} +0 -0
  285. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  286. package/fesm2015/{nova-ui-dashboards.js → nova-ui-dashboards.mjs} +1195 -1463
  287. package/fesm2015/nova-ui-dashboards.mjs.map +1 -0
  288. package/fesm2020/nova-ui-dashboards.mjs +16252 -0
  289. package/fesm2020/nova-ui-dashboards.mjs.map +1 -0
  290. package/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.d.ts +1 -1
  291. package/lib/components/providers/data-source-adapter.d.ts +1 -1
  292. package/lib/components/providers/kpi-color-prioritizer.d.ts +1 -1
  293. package/lib/components/providers/refresher.d.ts +1 -1
  294. package/lib/components/providers/status-content-fallback-adapter.d.ts +1 -1
  295. package/lib/components/widget-search/widget-search.component.d.ts +1 -1
  296. package/lib/configurator/components/configurator/configurator.component.d.ts +1 -1
  297. package/lib/configurator/services/converters/base-converter.d.ts +1 -1
  298. package/package.json +36 -17
  299. package/sdk/atoms/spec/test.po.js +1 -1
  300. package/sdk/atoms/spec/test.po.js.map +1 -1
  301. package/sdk/atoms/spec/virtual-dashboards/drilldown-widget-test/drilldown-widget-test.component.js +10 -10
  302. package/sdk/atoms/spec/virtual-dashboards/drilldown-widget-test/drilldown-widget-test.component.js.map +1 -1
  303. package/sdk/atoms/spec/virtual-dashboards/drilldown-widget-test/drilldown-widget-test.component.spec.js +1 -1
  304. package/sdk/atoms/spec/virtual-dashboards/drilldown-widget-test/drilldown-widget-test.component.spec.js.map +1 -1
  305. package/sdk/atoms/src/lib/common/common.module.js +1 -2
  306. package/sdk/atoms/src/lib/common/common.module.js.map +1 -1
  307. package/sdk/atoms/src/lib/common/components/preview-overlay/preview-overlay.component.js +1 -1
  308. package/sdk/atoms/src/lib/common/components/preview-overlay/preview-overlay.component.js.map +1 -1
  309. package/sdk/atoms/src/lib/common/components/widget-error/widget-error.component.js +6 -6
  310. package/sdk/atoms/src/lib/common/components/widget-error/widget-error.component.js.map +1 -1
  311. package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.js +1 -1
  312. package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.js.map +1 -1
  313. package/sdk/atoms/src/lib/components/dashboard/dashboard.component.js +17 -17
  314. package/sdk/atoms/src/lib/components/dashboard/dashboard.component.js.map +1 -1
  315. package/sdk/atoms/src/lib/components/embedded-content/embedded-content.component.js +8 -8
  316. package/sdk/atoms/src/lib/components/embedded-content/embedded-content.component.js.map +1 -1
  317. package/sdk/atoms/src/lib/components/kpi-widget/kpi.component.js +12 -12
  318. package/sdk/atoms/src/lib/components/kpi-widget/kpi.component.js.map +1 -1
  319. package/sdk/atoms/src/lib/components/layouts/base-layout.js +3 -3
  320. package/sdk/atoms/src/lib/components/layouts/base-layout.js.map +1 -1
  321. package/sdk/atoms/src/lib/components/layouts/stack/stack.component.js +5 -5
  322. package/sdk/atoms/src/lib/components/layouts/stack/stack.component.js.map +1 -1
  323. package/sdk/atoms/src/lib/components/layouts/tiles/tiles.component.js +5 -5
  324. package/sdk/atoms/src/lib/components/layouts/tiles/tiles.component.js.map +1 -1
  325. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.js +7 -7
  326. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.js.map +1 -1
  327. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.d.ts +1 -1
  328. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.js +10 -10
  329. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.js.map +1 -1
  330. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.js +4 -4
  331. package/sdk/atoms/src/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.js.map +1 -1
  332. package/sdk/atoms/src/lib/components/list-widget/list-widget.component.js +8 -8
  333. package/sdk/atoms/src/lib/components/list-widget/list-widget.component.js.map +1 -1
  334. package/sdk/atoms/src/lib/components/loading/loading.component.js +6 -6
  335. package/sdk/atoms/src/lib/components/loading/loading.component.js.map +1 -1
  336. package/sdk/atoms/src/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.js +6 -6
  337. package/sdk/atoms/src/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.js.map +1 -1
  338. package/sdk/atoms/src/lib/components/proportional-widget/proportional-widget.component.js +15 -15
  339. package/sdk/atoms/src/lib/components/proportional-widget/proportional-widget.component.js.map +1 -1
  340. package/sdk/atoms/src/lib/components/providers/data-source-adapter.d.ts +1 -1
  341. package/sdk/atoms/src/lib/components/providers/data-source-adapter.js +11 -11
  342. package/sdk/atoms/src/lib/components/providers/data-source-adapter.js.map +1 -1
  343. package/sdk/atoms/src/lib/components/providers/drilldown-data-source-adapter.js +3 -3
  344. package/sdk/atoms/src/lib/components/providers/drilldown-data-source-adapter.js.map +1 -1
  345. package/sdk/atoms/src/lib/components/providers/event-bus-debugger.js +4 -4
  346. package/sdk/atoms/src/lib/components/providers/event-bus-debugger.js.map +1 -1
  347. package/sdk/atoms/src/lib/components/providers/interaction/interaction-handler.js +2 -2
  348. package/sdk/atoms/src/lib/components/providers/interaction/interaction-handler.js.map +1 -1
  349. package/sdk/atoms/src/lib/components/providers/interaction/url-interaction-handler.js +3 -3
  350. package/sdk/atoms/src/lib/components/providers/interaction/url-interaction-handler.js.map +1 -1
  351. package/sdk/atoms/src/lib/components/providers/kpi-color-prioritizer.d.ts +1 -1
  352. package/sdk/atoms/src/lib/components/providers/kpi-color-prioritizer.js +4 -4
  353. package/sdk/atoms/src/lib/components/providers/kpi-color-prioritizer.js.map +1 -1
  354. package/sdk/atoms/src/lib/components/providers/kpi-data-source-adapter.js +5 -5
  355. package/sdk/atoms/src/lib/components/providers/kpi-data-source-adapter.js.map +1 -1
  356. package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.js +4 -4
  357. package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.js.map +1 -1
  358. package/sdk/atoms/src/lib/components/providers/kpi-status-content-fallback-adapter.js +5 -5
  359. package/sdk/atoms/src/lib/components/providers/kpi-status-content-fallback-adapter.js.map +1 -1
  360. package/sdk/atoms/src/lib/components/providers/loading-adapter.js +4 -4
  361. package/sdk/atoms/src/lib/components/providers/loading-adapter.js.map +1 -1
  362. package/sdk/atoms/src/lib/components/providers/pizzagna-broadcaster.service.js +6 -6
  363. package/sdk/atoms/src/lib/components/providers/pizzagna-broadcaster.service.js.map +1 -1
  364. package/sdk/atoms/src/lib/components/providers/refresher-settings.service.js +1 -1
  365. package/sdk/atoms/src/lib/components/providers/refresher-settings.service.js.map +1 -1
  366. package/sdk/atoms/src/lib/components/providers/refresher.d.ts +1 -1
  367. package/sdk/atoms/src/lib/components/providers/refresher.js +4 -4
  368. package/sdk/atoms/src/lib/components/providers/refresher.js.map +1 -1
  369. package/sdk/atoms/src/lib/components/providers/status-content-fallback-adapter.d.ts +1 -1
  370. package/sdk/atoms/src/lib/components/providers/status-content-fallback-adapter.js +3 -3
  371. package/sdk/atoms/src/lib/components/providers/status-content-fallback-adapter.js.map +1 -1
  372. package/sdk/atoms/src/lib/components/providers/table-data-source-adapter.js +7 -7
  373. package/sdk/atoms/src/lib/components/providers/table-data-source-adapter.js.map +1 -1
  374. package/sdk/atoms/src/lib/components/providers/timeseries-data-source-adapter.js +3 -3
  375. package/sdk/atoms/src/lib/components/providers/timeseries-data-source-adapter.js.map +1 -1
  376. package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.js +5 -5
  377. package/sdk/atoms/src/lib/components/table-widget/addons/search-feature-addon.service.js.map +1 -1
  378. package/sdk/atoms/src/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.js +12 -10
  379. package/sdk/atoms/src/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.js.map +1 -1
  380. package/sdk/atoms/src/lib/components/table-widget/delayed-mouse-presence-detection.directive.js +7 -7
  381. package/sdk/atoms/src/lib/components/table-widget/delayed-mouse-presence-detection.directive.js.map +1 -1
  382. package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js +31 -31
  383. package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js.map +1 -1
  384. package/sdk/atoms/src/lib/components/template-load-error/template-load-error.component.js +1 -1
  385. package/sdk/atoms/src/lib/components/template-load-error/template-load-error.component.js.map +1 -1
  386. package/sdk/atoms/src/lib/components/time-frame-selection/timeframe-selection.component.js +12 -12
  387. package/sdk/atoms/src/lib/components/time-frame-selection/timeframe-selection.component.js.map +1 -1
  388. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/apply-status-endpoints.js +6 -6
  389. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/apply-status-endpoints.js.map +1 -1
  390. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +7 -7
  391. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js.map +1 -1
  392. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js +4 -4
  393. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js.map +1 -1
  394. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js +4 -4
  395. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js.map +1 -1
  396. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js +6 -6
  397. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js.map +1 -1
  398. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js +6 -6
  399. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js.map +1 -1
  400. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js +6 -6
  401. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js.map +1 -1
  402. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js +8 -8
  403. package/sdk/atoms/src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js.map +1 -1
  404. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-chart-preset.service.js +1 -1
  405. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-chart-preset.service.js.map +1 -1
  406. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-scales.service.js +3 -3
  407. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-scales.service.js.map +1 -1
  408. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.js +6 -6
  409. package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-widget.component.js.map +1 -1
  410. package/sdk/atoms/src/lib/components/widget/widget-body/widget-body.component.js +8 -8
  411. package/sdk/atoms/src/lib/components/widget/widget-body/widget-body.component.js.map +1 -1
  412. package/sdk/atoms/src/lib/components/widget/widget-body-content/widget-body-content.component.js +7 -7
  413. package/sdk/atoms/src/lib/components/widget/widget-body-content/widget-body-content.component.js.map +1 -1
  414. package/sdk/atoms/src/lib/components/widget/widget-header/widget-header.component.js +27 -27
  415. package/sdk/atoms/src/lib/components/widget/widget-header/widget-header.component.js.map +1 -1
  416. package/sdk/atoms/src/lib/components/widget/widget.component.js +3 -3
  417. package/sdk/atoms/src/lib/components/widget/widget.component.js.map +1 -1
  418. package/sdk/atoms/src/lib/components/widget-search/widget-search.component.d.ts +1 -1
  419. package/sdk/atoms/src/lib/components/widget-search/widget-search.component.js +8 -8
  420. package/sdk/atoms/src/lib/components/widget-search/widget-search.component.js.map +1 -1
  421. package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js +12 -12
  422. package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js.map +1 -1
  423. package/sdk/atoms/src/lib/configurator/components/color-picker/color.service.js +2 -2
  424. package/sdk/atoms/src/lib/configurator/components/color-picker/color.service.js.map +1 -1
  425. package/sdk/atoms/src/lib/configurator/components/configurator/configurator.component.d.ts +1 -1
  426. package/sdk/atoms/src/lib/configurator/components/configurator/configurator.component.js +6 -6
  427. package/sdk/atoms/src/lib/configurator/components/configurator/configurator.component.js.map +1 -1
  428. package/sdk/atoms/src/lib/configurator/components/drop-area/drop-area.component.js +1 -1
  429. package/sdk/atoms/src/lib/configurator/components/drop-area/drop-area.component.js.map +1 -1
  430. package/sdk/atoms/src/lib/configurator/components/form-stack/form-stack.component.js +4 -4
  431. package/sdk/atoms/src/lib/configurator/components/form-stack/form-stack.component.js.map +1 -1
  432. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.js +1 -1
  433. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.js.map +1 -1
  434. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.js +6 -6
  435. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.js.map +1 -1
  436. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.js +4 -4
  437. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.js.map +1 -1
  438. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.js +3 -3
  439. package/sdk/atoms/src/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.js.map +1 -1
  440. package/sdk/atoms/src/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.js +2 -2
  441. package/sdk/atoms/src/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.js.map +1 -1
  442. package/sdk/atoms/src/lib/configurator/components/formatters/link-formatter/link-formatter.component.js +3 -3
  443. package/sdk/atoms/src/lib/configurator/components/formatters/link-formatter/link-formatter.component.js.map +1 -1
  444. package/sdk/atoms/src/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.js +1 -1
  445. package/sdk/atoms/src/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.js.map +1 -1
  446. package/sdk/atoms/src/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.js +4 -4
  447. package/sdk/atoms/src/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.js.map +1 -1
  448. package/sdk/atoms/src/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.js +6 -6
  449. package/sdk/atoms/src/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.js.map +1 -1
  450. package/sdk/atoms/src/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.js +2 -2
  451. package/sdk/atoms/src/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.js.map +1 -1
  452. package/sdk/atoms/src/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.js +4 -4
  453. package/sdk/atoms/src/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.js.map +1 -1
  454. package/sdk/atoms/src/lib/configurator/components/heading/configurator-heading.component.js +4 -4
  455. package/sdk/atoms/src/lib/configurator/components/heading/configurator-heading.component.js.map +1 -1
  456. package/sdk/atoms/src/lib/configurator/components/items-dynamic/items-dynamic.component.js +8 -8
  457. package/sdk/atoms/src/lib/configurator/components/items-dynamic/items-dynamic.component.js.map +1 -1
  458. package/sdk/atoms/src/lib/configurator/components/preview-placeholder/preview-placeholder.component.js +1 -1
  459. package/sdk/atoms/src/lib/configurator/components/preview-placeholder/preview-placeholder.component.js.map +1 -1
  460. package/sdk/atoms/src/lib/configurator/components/widget-cloner/widget-cloner.component.js +7 -7
  461. package/sdk/atoms/src/lib/configurator/components/widget-cloner/widget-cloner.component.js.map +1 -1
  462. package/sdk/atoms/src/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.js +2 -2
  463. package/sdk/atoms/src/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.js.map +1 -1
  464. package/sdk/atoms/src/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.js +7 -7
  465. package/sdk/atoms/src/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.js.map +1 -1
  466. package/sdk/atoms/src/lib/configurator/components/widget-editor/widget-editor.component.js +8 -8
  467. package/sdk/atoms/src/lib/configurator/components/widget-editor/widget-editor.component.js.map +1 -1
  468. package/sdk/atoms/src/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.js +3 -3
  469. package/sdk/atoms/src/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.js.map +1 -1
  470. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.js +6 -6
  471. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.js.map +1 -1
  472. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.js +8 -8
  473. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.js.map +1 -1
  474. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.js +9 -9
  475. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.js.map +1 -1
  476. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.js +6 -6
  477. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.js.map +1 -1
  478. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.js +1 -1
  479. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.js.map +1 -1
  480. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.js +8 -8
  481. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.js.map +1 -1
  482. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.js +5 -5
  483. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.js.map +1 -1
  484. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.js +14 -14
  485. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.js.map +1 -1
  486. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.js +12 -12
  487. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.js.map +1 -1
  488. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.js +12 -12
  489. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.js.map +1 -1
  490. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.js +9 -9
  491. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.js.map +1 -1
  492. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-validator.js +3 -3
  493. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-validator.js.map +1 -1
  494. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js +11 -11
  495. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js.map +1 -1
  496. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js +7 -7
  497. package/sdk/atoms/src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js.map +1 -1
  498. package/sdk/atoms/src/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.js +4 -4
  499. package/sdk/atoms/src/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.js.map +1 -1
  500. package/sdk/atoms/src/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.js +10 -10
  501. package/sdk/atoms/src/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.js.map +1 -1
  502. package/sdk/atoms/src/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.js +8 -8
  503. package/sdk/atoms/src/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.js.map +1 -1
  504. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.js +5 -5
  505. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.js.map +1 -1
  506. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.js +5 -5
  507. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.js.map +1 -1
  508. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js +9 -9
  509. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js.map +1 -1
  510. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.js +8 -8
  511. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.js.map +1 -1
  512. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.js +10 -10
  513. package/sdk/atoms/src/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.js.map +1 -1
  514. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.js +7 -7
  515. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.js.map +1 -1
  516. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.js +6 -6
  517. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.js.map +1 -1
  518. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.js +1 -1
  519. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.js.map +1 -1
  520. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.js +1 -1
  521. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.js.map +1 -1
  522. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js +13 -13
  523. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js.map +1 -1
  524. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.js +19 -19
  525. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.js.map +1 -1
  526. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.js +7 -7
  527. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.js.map +1 -1
  528. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js +15 -15
  529. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js.map +1 -1
  530. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.js +7 -7
  531. 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
  532. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js +12 -12
  533. package/sdk/atoms/src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js.map +1 -1
  534. package/sdk/atoms/src/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.js +7 -7
  535. package/sdk/atoms/src/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.js.map +1 -1
  536. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js +10 -10
  537. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js.map +1 -1
  538. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.js +4 -4
  539. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.js.map +1 -1
  540. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.js +7 -7
  541. package/sdk/atoms/src/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.js.map +1 -1
  542. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.js +12 -12
  543. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.js.map +1 -1
  544. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.component.js +24 -24
  545. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.component.js.map +1 -1
  546. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.service.js +1 -1
  547. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz/dashwiz.service.js.map +1 -1
  548. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.js +12 -12
  549. package/sdk/atoms/src/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.js.map +1 -1
  550. package/sdk/atoms/src/lib/configurator/configurator.module.js +1 -2
  551. package/sdk/atoms/src/lib/configurator/configurator.module.js.map +1 -1
  552. package/sdk/atoms/src/lib/configurator/pipe/add-data.pipe.js +3 -3
  553. package/sdk/atoms/src/lib/configurator/pipe/add-data.pipe.js.map +1 -1
  554. package/sdk/atoms/src/lib/configurator/pipe/pizzagna-root.pipe.js +1 -1
  555. package/sdk/atoms/src/lib/configurator/pipe/pizzagna-root.pipe.js.map +1 -1
  556. package/sdk/atoms/src/lib/configurator/pipe/widget-configurator-section-header.pipe.js +1 -1
  557. package/sdk/atoms/src/lib/configurator/pipe/widget-configurator-section-header.pipe.js.map +1 -1
  558. package/sdk/atoms/src/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.js +3 -3
  559. package/sdk/atoms/src/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.js.map +1 -1
  560. package/sdk/atoms/src/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.js +2 -2
  561. package/sdk/atoms/src/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.js.map +1 -1
  562. package/sdk/atoms/src/lib/configurator/services/configurator-data-source-manager.service.js +5 -5
  563. package/sdk/atoms/src/lib/configurator/services/configurator-data-source-manager.service.js.map +1 -1
  564. package/sdk/atoms/src/lib/configurator/services/configurator-heading.service.js +1 -1
  565. package/sdk/atoms/src/lib/configurator/services/configurator-heading.service.js.map +1 -1
  566. package/sdk/atoms/src/lib/configurator/services/configurator.service.js +11 -11
  567. package/sdk/atoms/src/lib/configurator/services/configurator.service.js.map +1 -1
  568. package/sdk/atoms/src/lib/configurator/services/converters/base-converter.d.ts +1 -1
  569. package/sdk/atoms/src/lib/configurator/services/converters/base-converter.js +2 -2
  570. package/sdk/atoms/src/lib/configurator/services/converters/base-converter.js.map +1 -1
  571. package/sdk/atoms/src/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.js +8 -8
  572. package/sdk/atoms/src/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.js.map +1 -1
  573. package/sdk/atoms/src/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.js +9 -9
  574. package/sdk/atoms/src/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.js.map +1 -1
  575. package/sdk/atoms/src/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js +9 -9
  576. package/sdk/atoms/src/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js.map +1 -1
  577. package/sdk/atoms/src/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.js +9 -9
  578. package/sdk/atoms/src/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.js.map +1 -1
  579. package/sdk/atoms/src/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.js +8 -8
  580. package/sdk/atoms/src/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.js.map +1 -1
  581. package/sdk/atoms/src/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.js +9 -9
  582. package/sdk/atoms/src/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.js.map +1 -1
  583. package/sdk/atoms/src/lib/configurator/services/converters/table/table-columns-converter.service.js +14 -14
  584. package/sdk/atoms/src/lib/configurator/services/converters/table/table-columns-converter.service.js.map +1 -1
  585. package/sdk/atoms/src/lib/configurator/services/converters/table/table-filters-converter.service.js +6 -6
  586. package/sdk/atoms/src/lib/configurator/services/converters/table/table-filters-converter.service.js.map +1 -1
  587. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.js +15 -15
  588. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.js.map +1 -1
  589. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.js +26 -26
  590. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.js.map +1 -1
  591. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.js +7 -7
  592. package/sdk/atoms/src/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.js.map +1 -1
  593. package/sdk/atoms/src/lib/configurator/services/kpi-widget-color.service.js +1 -1
  594. package/sdk/atoms/src/lib/configurator/services/kpi-widget-color.service.js.map +1 -1
  595. package/sdk/atoms/src/lib/configurator/services/preview.service.js +1 -1
  596. package/sdk/atoms/src/lib/configurator/services/preview.service.js.map +1 -1
  597. package/sdk/atoms/src/lib/configurator/services/timeframe-serialization.service.js +3 -3
  598. package/sdk/atoms/src/lib/configurator/services/timeframe-serialization.service.js.map +1 -1
  599. package/sdk/atoms/src/lib/configurator/services/widget-cloner.service.js +1 -1
  600. package/sdk/atoms/src/lib/configurator/services/widget-cloner.service.js.map +1 -1
  601. package/sdk/atoms/src/lib/configurator/services/widget-editor.service.js +2 -2
  602. package/sdk/atoms/src/lib/configurator/services/widget-editor.service.js.map +1 -1
  603. package/sdk/atoms/src/lib/constants/default-palette.js +1 -1
  604. package/sdk/atoms/src/lib/constants/default-palette.js.map +1 -1
  605. package/sdk/atoms/src/lib/dashboards.module.js +1 -2
  606. package/sdk/atoms/src/lib/dashboards.module.js.map +1 -1
  607. package/sdk/atoms/src/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js +4 -4
  608. package/sdk/atoms/src/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.js.map +1 -1
  609. package/sdk/atoms/src/lib/directives/widget-editor/widget-editor.directive.js +9 -9
  610. package/sdk/atoms/src/lib/directives/widget-editor/widget-editor.directive.js.map +1 -1
  611. package/sdk/atoms/src/lib/functions/merge-changes.js +3 -3
  612. package/sdk/atoms/src/lib/functions/merge-changes.js.map +1 -1
  613. package/sdk/atoms/src/lib/functions/proportional-aggregators/field-mapper.js +1 -1
  614. package/sdk/atoms/src/lib/functions/proportional-aggregators/field-mapper.js.map +1 -1
  615. package/sdk/atoms/src/lib/functions/proportional-aggregators/percentage-aggregator.js +1 -1
  616. package/sdk/atoms/src/lib/functions/proportional-aggregators/percentage-aggregator.js.map +1 -1
  617. package/sdk/atoms/src/lib/functions/proportional-aggregators/sum-aggregator.js +1 -1
  618. package/sdk/atoms/src/lib/functions/proportional-aggregators/sum-aggregator.js.map +1 -1
  619. package/sdk/atoms/src/lib/pizzagna/components/pizzagna/pizzagna.component.js +9 -9
  620. package/sdk/atoms/src/lib/pizzagna/components/pizzagna/pizzagna.component.js.map +1 -1
  621. package/sdk/atoms/src/lib/pizzagna/directives/component-portal/component-portal.directive.js +13 -13
  622. package/sdk/atoms/src/lib/pizzagna/directives/component-portal/component-portal.directive.js.map +1 -1
  623. package/sdk/atoms/src/lib/pizzagna/pizzagna.module.js +1 -1
  624. package/sdk/atoms/src/lib/pizzagna/pizzagna.module.js.map +1 -1
  625. package/sdk/atoms/src/lib/pizzagna/services/component-portal.service.js +1 -1
  626. package/sdk/atoms/src/lib/pizzagna/services/component-portal.service.js.map +1 -1
  627. package/sdk/atoms/src/lib/pizzagna/services/component-registry.service.js +1 -1
  628. package/sdk/atoms/src/lib/pizzagna/services/component-registry.service.js.map +1 -1
  629. package/sdk/atoms/src/lib/pizzagna/services/dynamic-component-creator.service.js +4 -4
  630. package/sdk/atoms/src/lib/pizzagna/services/dynamic-component-creator.service.js.map +1 -1
  631. package/sdk/atoms/src/lib/pizzagna/services/pizzagna.service.js +6 -6
  632. package/sdk/atoms/src/lib/pizzagna/services/pizzagna.service.js.map +1 -1
  633. package/sdk/atoms/src/lib/services/category-chart-util.service.js +6 -6
  634. package/sdk/atoms/src/lib/services/category-chart-util.service.js.map +1 -1
  635. package/sdk/atoms/src/lib/services/event-registry.service.js +1 -1
  636. package/sdk/atoms/src/lib/services/event-registry.service.js.map +1 -1
  637. package/sdk/atoms/src/lib/services/kpi-color-comparators-registry.service.js +1 -1
  638. package/sdk/atoms/src/lib/services/kpi-color-comparators-registry.service.js.map +1 -1
  639. package/sdk/atoms/src/lib/services/proportional-content-aggregators-registry.service.js +1 -1
  640. package/sdk/atoms/src/lib/services/proportional-content-aggregators-registry.service.js.map +1 -1
  641. package/sdk/atoms/src/lib/services/provider-registry.service.js +1 -1
  642. package/sdk/atoms/src/lib/services/provider-registry.service.js.map +1 -1
  643. package/sdk/atoms/src/lib/services/registry-service.js +3 -3
  644. package/sdk/atoms/src/lib/services/registry-service.js.map +1 -1
  645. package/sdk/atoms/src/lib/services/table-formatter-registry.service.js +4 -4
  646. package/sdk/atoms/src/lib/services/table-formatter-registry.service.js.map +1 -1
  647. package/sdk/atoms/src/lib/services/unit-test-registry.service.js +1 -1
  648. package/sdk/atoms/src/lib/services/unit-test-registry.service.js.map +1 -1
  649. package/sdk/atoms/src/lib/services/url-interaction.service.js +1 -1
  650. package/sdk/atoms/src/lib/services/url-interaction.service.js.map +1 -1
  651. package/sdk/atoms/src/lib/services/widget-configuration.service.js +1 -1
  652. package/sdk/atoms/src/lib/services/widget-configuration.service.js.map +1 -1
  653. package/sdk/atoms/src/lib/services/widget-removal.service.js +4 -4
  654. package/sdk/atoms/src/lib/services/widget-removal.service.js.map +1 -1
  655. package/sdk/atoms/src/lib/services/widget-to-dashboard-event-proxy.service.js +8 -8
  656. package/sdk/atoms/src/lib/services/widget-to-dashboard-event-proxy.service.js.map +1 -1
  657. package/sdk/atoms/src/lib/services/widget-types.service.js +3 -3
  658. package/sdk/atoms/src/lib/services/widget-types.service.js.map +1 -1
  659. package/sdk/atoms/src/lib/widget-types/drilldown/drilldown-widget.js +2 -2
  660. package/sdk/atoms/src/lib/widget-types/drilldown/drilldown-widget.js.map +1 -1
  661. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content-widget.js +2 -2
  662. package/sdk/atoms/src/lib/widget-types/embedded-content/embedded-content-widget.js.map +1 -1
  663. package/sdk/atoms/src/lib/widget-types/kpi/kpi-widget.js +3 -3
  664. package/sdk/atoms/src/lib/widget-types/kpi/kpi-widget.js.map +1 -1
  665. package/sdk/atoms/src/lib/widget-types/proportional/proportional-widget.js +3 -3
  666. package/sdk/atoms/src/lib/widget-types/proportional/proportional-widget.js.map +1 -1
  667. package/sdk/atoms/src/lib/widget-types/table/table-widget.js +3 -3
  668. package/sdk/atoms/src/lib/widget-types/table/table-widget.js.map +1 -1
  669. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries-widget.js +3 -3
  670. package/sdk/atoms/src/lib/widget-types/timeseries/timeseries-widget.js.map +1 -1
  671. package/sdk/locale/messages.en.xlf +176 -172
  672. package/sdk/schematics/ng-add/index.d.ts +2 -0
  673. package/sdk/schematics/ng-add/index.js +27 -16
  674. package/sdk/schematics/ng-add/index.js.map +1 -0
  675. package/sdk/schematics/ng-add/index.spec.d.ts +1 -0
  676. package/sdk/schematics/ng-add/index.spec.js +134 -0
  677. package/sdk/schematics/ng-add/index.spec.js.map +1 -0
  678. package/sdk/schematics/ng-add/schema.json +4 -4
  679. package/bundles/nova-ui-dashboards.umd.js +0 -17845
  680. package/bundles/nova-ui-dashboards.umd.js.map +0 -1
  681. package/esm2015/lib/common/common.module.js +0 -42
  682. package/esm2015/lib/common/components/widget-error/widget-error.component.js +0 -58
  683. package/esm2015/lib/common/pipes/dashboard-unit-conversion-pipe.js +0 -57
  684. package/esm2015/lib/components/dashboard/dashboard.component.js +0 -232
  685. package/esm2015/lib/components/embedded-content/embedded-content.component.js +0 -96
  686. package/esm2015/lib/components/kpi-widget/kpi.component.js +0 -128
  687. package/esm2015/lib/components/layouts/base-layout.js +0 -118
  688. package/esm2015/lib/components/layouts/stack/stack.component.js +0 -68
  689. package/esm2015/lib/components/layouts/tiles/tiles.component.js +0 -105
  690. package/esm2015/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.js +0 -68
  691. package/esm2015/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.js +0 -82
  692. package/esm2015/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.js +0 -66
  693. package/esm2015/lib/components/list-widget/list-widget.component.js +0 -105
  694. package/esm2015/lib/components/loading/loading.component.js +0 -56
  695. package/esm2015/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.js +0 -152
  696. package/esm2015/lib/components/proportional-widget/proportional-widget.component.js +0 -340
  697. package/esm2015/lib/components/providers/data-source-adapter.js +0 -146
  698. package/esm2015/lib/components/providers/drilldown-data-source-adapter.js +0 -115
  699. package/esm2015/lib/components/providers/interaction/interaction-handler.js +0 -57
  700. package/esm2015/lib/components/providers/interaction/url-interaction-handler.js +0 -70
  701. package/esm2015/lib/components/providers/kpi-color-prioritizer.js +0 -110
  702. package/esm2015/lib/components/providers/kpi-data-source-adapter.js +0 -104
  703. package/esm2015/lib/components/providers/kpi-scale-sync-broker.js +0 -138
  704. package/esm2015/lib/components/providers/kpi-status-content-fallback-adapter.js +0 -106
  705. package/esm2015/lib/components/providers/loading-adapter.js +0 -72
  706. package/esm2015/lib/components/providers/pizzagna-broadcaster.service.js +0 -84
  707. package/esm2015/lib/components/providers/refresher.js +0 -106
  708. package/esm2015/lib/components/providers/status-content-fallback-adapter.js +0 -68
  709. package/esm2015/lib/components/providers/table-data-source-adapter.js +0 -84
  710. package/esm2015/lib/components/providers/timeseries-data-source-adapter.js +0 -72
  711. package/esm2015/lib/components/table-widget/addons/search-feature-addon.service.js +0 -104
  712. package/esm2015/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.js +0 -81
  713. package/esm2015/lib/components/table-widget/table-widget.component.js +0 -503
  714. package/esm2015/lib/components/time-frame-selection/timeframe-selection.component.js +0 -134
  715. package/esm2015/lib/components/timeseries-widget/chart-presets/status-bar-chart/apply-status-endpoints.js +0 -67
  716. package/esm2015/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.js +0 -149
  717. package/esm2015/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.js +0 -112
  718. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.js +0 -66
  719. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.js +0 -66
  720. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.js +0 -83
  721. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.js +0 -66
  722. package/esm2015/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.js +0 -156
  723. package/esm2015/lib/components/timeseries-widget/timeseries-scales.service.js +0 -86
  724. package/esm2015/lib/components/timeseries-widget/timeseries-widget.component.js +0 -74
  725. package/esm2015/lib/components/widget/widget-body/widget-body.component.js +0 -92
  726. package/esm2015/lib/components/widget/widget-body-content/widget-body-content.component.js +0 -78
  727. package/esm2015/lib/components/widget/widget-header/widget-header.component.js +0 -207
  728. package/esm2015/lib/components/widget/widget.component.js +0 -69
  729. package/esm2015/lib/components/widget-search/widget-search.component.js +0 -121
  730. package/esm2015/lib/configurator/components/color-picker/color-picker.component.js +0 -191
  731. package/esm2015/lib/configurator/components/configurator/configurator.component.js +0 -122
  732. package/esm2015/lib/configurator/components/drop-area/drop-area.component.js +0 -34
  733. package/esm2015/lib/configurator/components/form-stack/form-stack.component.js +0 -90
  734. package/esm2015/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.js +0 -46
  735. package/esm2015/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.js +0 -86
  736. package/esm2015/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.js +0 -85
  737. package/esm2015/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.js +0 -120
  738. package/esm2015/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.js +0 -95
  739. package/esm2015/lib/configurator/components/heading/configurator-heading.component.js +0 -53
  740. package/esm2015/lib/configurator/components/items-dynamic/items-dynamic.component.js +0 -151
  741. package/esm2015/lib/configurator/components/preview-placeholder/preview-placeholder.component.js +0 -35
  742. package/esm2015/lib/configurator/components/widget-cloner/widget-cloner.component.js +0 -168
  743. package/esm2015/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.js +0 -90
  744. package/esm2015/lib/configurator/components/widget-editor/widget-editor.component.js +0 -143
  745. package/esm2015/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.js +0 -75
  746. package/esm2015/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.js +0 -132
  747. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.js +0 -158
  748. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.js +0 -207
  749. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.js +0 -75
  750. package/esm2015/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.js +0 -45
  751. package/esm2015/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.js +0 -137
  752. package/esm2015/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.js +0 -48
  753. package/esm2015/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.js +0 -107
  754. package/esm2015/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.js +0 -174
  755. package/esm2015/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.js +0 -146
  756. package/esm2015/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-validator.js +0 -56
  757. package/esm2015/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.js +0 -151
  758. package/esm2015/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.js +0 -96
  759. package/esm2015/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.js +0 -78
  760. package/esm2015/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.js +0 -165
  761. package/esm2015/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.js +0 -96
  762. package/esm2015/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.js +0 -76
  763. package/esm2015/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.js +0 -90
  764. package/esm2015/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.js +0 -171
  765. package/esm2015/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.js +0 -113
  766. package/esm2015/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.js +0 -162
  767. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.js +0 -86
  768. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.js +0 -119
  769. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.js +0 -56
  770. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.js +0 -46
  771. package/esm2015/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.js +0 -270
  772. package/esm2015/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.js +0 -270
  773. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.js +0 -129
  774. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.js +0 -323
  775. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.js +0 -110
  776. package/esm2015/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.js +0 -262
  777. package/esm2015/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.js +0 -125
  778. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.js +0 -115
  779. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.js +0 -72
  780. package/esm2015/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.js +0 -113
  781. package/esm2015/lib/configurator/components/wizard/dashwiz/dashwiz.component.js +0 -351
  782. package/esm2015/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.js +0 -135
  783. package/esm2015/lib/configurator/pipe/pizzagna-root.pipe.js +0 -46
  784. package/esm2015/lib/configurator/services/configurator-data-source-manager.service.js +0 -90
  785. package/esm2015/lib/configurator/services/configurator.service.js +0 -137
  786. package/esm2015/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.js +0 -108
  787. package/esm2015/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.js +0 -68
  788. package/esm2015/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.js +0 -81
  789. package/esm2015/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.js +0 -65
  790. package/esm2015/lib/configurator/services/converters/table/table-columns-converter.service.js +0 -182
  791. package/esm2015/lib/configurator/services/converters/table/table-filters-converter.service.js +0 -68
  792. package/esm2015/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.js +0 -168
  793. package/esm2015/lib/configurator/services/widget-editor.service.js +0 -62
  794. package/esm2015/lib/functions/get-parent-component-id.js +0 -30
  795. package/esm2015/lib/functions/proportional-aggregators/field-mapper.js +0 -33
  796. package/esm2015/lib/functions/proportional-aggregators/percentage-aggregator.js +0 -45
  797. package/esm2015/lib/pizzagna/directives/component-portal/component-portal.directive.js +0 -297
  798. package/esm2015/lib/pizzagna/services/dynamic-component-creator.service.js +0 -60
  799. package/esm2015/lib/pizzagna/services/pizzagna.service.js +0 -134
  800. package/esm2015/lib/services/category-chart-util.service.js +0 -123
  801. package/esm2015/lib/services/kpi-color-comparators-registry.service.js +0 -65
  802. package/esm2015/lib/services/registry-service.js +0 -83
  803. package/esm2015/lib/services/url-interaction.service.js +0 -53
  804. package/esm2015/lib/services/widget-to-dashboard-event-proxy.service.js +0 -152
  805. package/esm2015/lib/services/widget-types.service.js +0 -86
  806. package/esm2015/lib/widget-types/common/widget/components.js +0 -130
  807. package/esm2015/lib/widget-types/drilldown/drilldown-widget.js +0 -80
  808. package/esm2015/lib/widget-types/embedded-content/embedded-content-widget.js +0 -64
  809. package/esm2015/lib/widget-types/kpi/kpi-widget.js +0 -90
  810. package/esm2015/lib/widget-types/proportional/proportional-widget.js +0 -81
  811. package/esm2015/lib/widget-types/table/table-widget.js +0 -101
  812. package/esm2015/lib/widget-types/timeseries/timeseries-widget.js +0 -111
  813. package/fesm2015/nova-ui-dashboards.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nova-ui-dashboards.mjs","sources":["../../src/lib/common/components/preview-overlay/preview-overlay.component.ts","../../src/lib/common/components/widget-error/widget-error.component.ts","../../src/lib/common/components/widget-error/widget-error.component.html","../../src/lib/common/constants.ts","../../src/lib/common/pipes/dashboard-unit-conversion-pipe.ts","../../src/lib/common/common.module.ts","../../src/lib/common/components/public-api.ts","../../src/lib/common/pipes/public-api.ts","../../src/lib/common/public-api.ts","../../src/lib/services/types.ts","../../src/lib/types.ts","../../src/lib/components/dashboard/default-gridster-config.ts","../../src/lib/services/widget-configuration.service.ts","../../src/lib/services/widget-types.service.ts","../../src/lib/functions/merge-changes.ts","../../src/lib/pizzagna/services/dynamic-component-creator.service.ts","../../src/lib/pizzagna/functions/get-pizzagna-property-path.ts","../../src/lib/pizzagna/services/pizzagna.service.ts","../../src/lib/components/template-load-error/template-load-error.component.ts","../../src/lib/pizzagna/services/component-registry.service.ts","../../src/lib/pizzagna/services/component-portal.service.ts","../../src/lib/configurator/types.ts","../../src/lib/components/providers/data-source-adapter.ts","../../src/lib/components/providers/drilldown-data-source-adapter.ts","../../src/lib/components/providers/event-bus-debugger.ts","../../src/lib/components/providers/interaction/interaction-handler.ts","../../src/lib/services/url-interaction.service.ts","../../src/lib/components/providers/interaction/url-interaction-handler.ts","../../src/lib/services/kpi-color-comparators-registry.service.ts","../../src/lib/components/providers/kpi-color-prioritizer.ts","../../src/lib/configurator/components/widgets/kpi/types.ts","../../src/lib/components/providers/kpi-data-source-adapter.ts","../../src/lib/components/providers/kpi-scale-sync-broker.ts","../../src/lib/components/providers/status-content-fallback-adapter.ts","../../src/lib/components/providers/kpi-status-content-fallback-adapter.ts","../../src/lib/components/providers/loading-adapter.ts","../../src/lib/functions/get-parent-component-id.ts","../../src/lib/functions/parse-string-with-data.ts","../../src/lib/components/providers/pizzagna-broadcaster.service.ts","../../src/lib/components/providers/types.ts","../../src/lib/components/providers/refresher-settings.service.ts","../../src/lib/components/providers/refresher.ts","../../src/lib/components/providers/table-data-source-adapter.ts","../../src/lib/components/providers/timeseries-data-source-adapter.ts","../../src/lib/configurator/components/wizard/dashwiz/dashwiz.service.ts","../../src/lib/configurator/services/configurator-data-source-manager.service.ts","../../src/lib/configurator/services/preview.service.ts","../../src/lib/configurator/services/converters/base-converter.ts","../../src/lib/configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service.ts","../../src/lib/configurator/services/converters/kpi/kpi-tiles-converter.service.ts","../../src/lib/widget-types/common/widget/legend.ts","../../src/lib/configurator/services/converters/proportional/proportional-widget-chart-options-converter.service.ts","../../src/lib/configurator/services/converters/shared/generic-array-converter/generic-array-converter.service.ts","../../src/lib/configurator/services/converters/shared/generic-converter/generic-converter.service.ts","../../src/lib/configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service.ts","../../src/lib/configurator/services/converters/table/table-columns-converter.service.ts","../../src/lib/configurator/services/converters/table/table-filters-converter.service.ts","../../src/lib/configurator/services/converters/timeseries/timeseries-metadata-converter.service.ts","../../src/lib/configurator/services/converters/timeseries/timeseries-series-converter.service.ts","../../src/lib/configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service.ts","../../src/lib/configurator/services/converters/types.ts","../../src/lib/services/event-registry.service.ts","../../src/lib/services/registry-service.ts","../../src/lib/services/table-formatter-registry.service.ts","../../src/lib/services/widget-to-dashboard-event-proxy.service.ts","../../src/lib/services/provider-registry.service.ts","../../src/lib/pizzagna/directives/component-portal/component-portal.directive.ts","../../src/lib/pizzagna/components/pizzagna/pizzagna.component.ts","../../src/lib/pizzagna/components/pizzagna/pizzagna.component.html","../../src/lib/components/widget/widget.component.ts","../../src/lib/components/widget/widget.component.html","../../src/lib/components/loading/loading.component.ts","../../src/lib/components/loading/loading.component.html","../../src/lib/directives/gridster-item-widget-id/gridster-item-widget-id.directive.ts","../../src/lib/components/dashboard/dashboard.component.ts","../../src/lib/components/dashboard/dashboard.component.html","../../src/lib/components/types.ts","../../src/lib/components/embedded-content/embedded-content.component.ts","../../src/lib/functions/map-data-to-formatter-properties.ts","../../src/lib/components/kpi-widget/kpi.component.ts","../../src/lib/components/kpi-widget/kpi.component.html","../../src/lib/components/layouts/base-layout.ts","../../src/lib/components/layouts/stack/stack.component.ts","../../src/lib/components/layouts/stack/stack.component.html","../../src/lib/components/layouts/tiles/tiles.component.ts","../../src/lib/components/layouts/tiles/tiles.component.html","../../src/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.ts","../../src/lib/components/list-widget/list-elements/list-group-item/list-group-item.component.html","../../src/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.ts","../../src/lib/components/list-widget/list-elements/list-leaf-item/list-leaf-item.component.html","../../src/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.ts","../../src/lib/components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component.html","../../src/lib/components/list-widget/list-widget.component.ts","../../src/lib/components/list-widget/list-widget.component.html","../../src/lib/services/proportional-content-aggregators-registry.service.ts","../../src/lib/services/public-api.ts","../../src/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.ts","../../src/lib/components/proportional-widget/proportional-donut-content/proportional-donut-content.component.html","../../src/lib/components/proportional-widget/types.ts","../../src/lib/services/category-chart-util.service.ts","../../src/lib/components/proportional-widget/proportional-widget.component.ts","../../src/lib/components/proportional-widget/proportional-widget.component.html","../../src/lib/components/table-widget/delayed-mouse-presence-detection.directive.ts","../../src/lib/components/table-widget/addons/search-feature-addon.service.ts","../../src/lib/components/table-widget/addons/virtual-scroll-feature-addon.service.ts","../../src/lib/components/table-widget/table-widget.component.ts","../../src/lib/components/table-widget/table-widget.component.html","../../src/lib/configurator/services/timeframe-serialization.service.ts","../../src/lib/components/time-frame-selection/timeframe-selection.component.ts","../../src/lib/components/time-frame-selection/timeframe-selection.component.html","../../src/lib/components/timeseries-widget/types.ts","../../src/lib/components/timeseries-widget/timeseries-scales.service.ts","../../src/lib/components/timeseries-widget/chart-presets/timeseries-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component.html","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/xy-chart.component.html","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component.ts","../../src/lib/components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component.ts","../../src/lib/components/timeseries-widget/timeseries-chart-preset.service.ts","../../src/lib/components/timeseries-widget/timeseries-widget.component.ts","../../src/lib/components/timeseries-widget/timeseries-widget.component.html","../../src/lib/components/widget-search/widget-search.component.ts","../../src/lib/components/widget-search/widget-search.component.html","../../src/lib/widget-types/common/widget/types.ts","../../src/lib/components/widget/widget-body-content/widget-body-content.component.ts","../../src/lib/components/widget/widget-body-content/widget-body-content.component.html","../../src/lib/components/widget/widget-body/widget-body.component.ts","../../src/lib/components/widget/widget-body/widget-body.component.html","../../src/lib/components/widget/widget-header/widget-header.component.ts","../../src/lib/components/widget/widget-header/widget-header.component.html","../../src/lib/pizzagna/pizzagna.module.ts","../../src/lib/configurator/components/color-picker/HTMLcolors.ts","../../src/lib/configurator/components/color-picker/color.service.ts","../../src/lib/configurator/components/color-picker/color-picker.component.ts","../../src/lib/configurator/components/color-picker/color-picker.component.html","../../src/lib/configurator/pipe/pizzagna-root.pipe.ts","../../src/lib/configurator/components/configurator/configurator.component.ts","../../src/lib/configurator/components/configurator/configurator.component.html","../../src/lib/configurator/components/drop-area/drop-area.component.ts","../../src/lib/configurator/components/form-stack/form-stack.component.ts","../../src/lib/configurator/components/form-stack/form-stack.component.html","../../src/lib/configurator/components/formatters/widget-formatter-configurators/donut-formatter-configurator.component.ts","../../src/lib/pizzagna/services/public-api.ts","../../src/lib/pizzagna/components/pizzagna/public-api.ts","../../src/lib/pizzagna/directives/component-portal/public-api.ts","../../src/lib/pizzagna/functions/public-api.ts","../../src/lib/pizzagna/public-api.ts","../../src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.ts","../../src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component.html","../../src/lib/configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component.ts","../../src/lib/configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component.ts","../../src/lib/configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component.ts","../../src/lib/configurator/components/formatters/icon-formatter/icon-formatter.component.ts","../../src/lib/configurator/components/formatters/link-formatter/link-formatter.component.ts","../../src/lib/configurator/components/formatters/raw-formatter/raw-formatter.component.ts","../../src/lib/configurator/components/formatters/percentage-formatter/percentage-formatter.component.ts","../../src/lib/constants/si-units-prefixes.ts","../../src/lib/configurator/components/formatters/si-units-formatter/si-units-formatter.component.ts","../../src/lib/configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component.ts","../../src/lib/configurator/services/configurator-heading.service.ts","../../src/lib/configurator/components/heading/configurator-heading.component.ts","../../src/lib/configurator/components/heading/configurator-heading.component.html","../../src/lib/configurator/pipe/widget-configurator-section-header.pipe.ts","../../src/lib/configurator/pipe/add-data.pipe.ts","../../src/lib/configurator/components/items-dynamic/items-dynamic.component.ts","../../src/lib/configurator/components/items-dynamic/items-dynamic.component.html","../../src/lib/configurator/components/preview-placeholder/preview-placeholder.component.ts","../../src/lib/configurator/components/preview-placeholder/preview-placeholder.component.html","../../src/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.ts","../../src/lib/configurator/components/wizard/dashwiz-step/dashwiz-step.component.html","../../src/lib/configurator/components/wizard/dashwiz/dashwiz-buttons.component.ts","../../src/lib/configurator/components/wizard/dashwiz/dashwiz.component.ts","../../src/lib/configurator/components/wizard/dashwiz/dashwiz.component.html","../../src/lib/configurator/components/widget-cloner/widget-cloner.component.ts","../../src/lib/configurator/components/widget-cloner/widget-cloner.component.html","../../src/lib/configurator/components/widget-configurator-section/widget-configurator-section-coordinator.service.ts","../../src/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.ts","../../src/lib/configurator/components/widget-configurator-section/widget-configurator-section.component.html","../../src/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.ts","../../src/lib/configurator/components/widget-editor-accordion/widget-editor-accordion.component.html","../../src/lib/configurator/components/widget-editor/widget-editor.component.ts","../../src/lib/configurator/components/widget-editor/widget-editor.component.html","../../src/lib/constants/default-palette.ts","../../src/lib/configurator/functions/has-control-in-error-state.ts","../../src/lib/configurator/pipe/widget-editor-accordion-form-state.pipe.ts","../../src/lib/configurator/pipe/widget-editor-accordion-header-icon.pipe.ts","../../src/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.ts","../../src/lib/configurator/components/widgets/configurator-items/data-source-error/data-source-error.component.html","../../src/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.ts","../../src/lib/configurator/components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component.html","../../src/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.ts","../../src/lib/configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component.html","../../src/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/time-units.ts","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.ts","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component.html","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-validator.ts","../../src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component.html","../../src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.ts","../../src/lib/configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component.html","../../src/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.ts","../../src/lib/configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component.html","../../src/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.ts","../../src/lib/configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component.html","../../src/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.ts","../../src/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component.html","../../src/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.ts","../../src/lib/configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component.html","../../src/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.ts","../../src/lib/configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component.html","../../src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.ts","../../src/lib/configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component.html","../../src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.ts","../../src/lib/configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component.html","../../src/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.ts","../../src/lib/configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component.html","../../src/lib/functions/on-mark-as-touched.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component.html","../../src/lib/widget-types/table/default-table-formatters.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component.html","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component.html","../../src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component.html","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component.html","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component.html","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component.html","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component.html","../../src/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.ts","../../src/lib/configurator/components/widgets/table/columns-editor/table-columns-configuration.component.html","../../src/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.ts","../../src/lib/configurator/components/widgets/table/filters-editor/table-filters-editor.component.html","../../src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.ts","../../src/lib/configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component.html","../../src/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.ts","../../src/lib/configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component.html","../../src/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.ts","../../src/lib/configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component.html","../../src/lib/configurator/services/configurator.service.ts","../../src/lib/configurator/services/kpi-widget-color.service.ts","../../src/lib/configurator/services/widget-cloner.service.ts","../../src/lib/configurator/services/widget-editor.service.ts","../../src/lib/configurator/services/converters/public-api.ts","../../src/lib/configurator/services/public-api.ts","../../src/lib/configurator/configurator.module.ts","../../src/lib/services/widget-removal.service.ts","../../src/lib/directives/widget-editor/widget-editor.directive.ts","../../src/lib/widget-types/drilldown/drilldown-configurator.ts","../../src/lib/widget-types/common/widget/components.ts","../../src/lib/widget-types/common/widget/providers.ts","../../src/lib/widget-types/drilldown/drilldown-widget.ts","../../src/lib/widget-types/drilldown/drilldown.ts","../../src/lib/widget-types/embedded-content/embedded-content-configurator.ts","../../src/lib/widget-types/embedded-content/embedded-content-widget.ts","../../src/lib/widget-types/embedded-content/embedded-content.ts","../../src/lib/widget-types/common/configurator/components.ts","../../src/lib/widget-types/kpi/kpi-configurator.ts","../../src/lib/widget-types/kpi/kpi-widget.ts","../../src/lib/widget-types/kpi/kpi.ts","../../src/lib/widget-types/preview-placeholder.ts","../../src/lib/functions/proportional-aggregators/field-mapper.ts","../../src/lib/functions/proportional-aggregators/percentage-aggregator.ts","../../src/lib/functions/proportional-aggregators/sum-aggregator.ts","../../src/lib/widget-types/proportional/proportional-configurator.ts","../../src/lib/widget-types/proportional/proportional-widget.ts","../../src/lib/widget-types/proportional/proportional.ts","../../src/lib/widget-types/table/table-configurator.ts","../../src/lib/widget-types/table/table-widget.ts","../../src/lib/widget-types/table/table.ts","../../src/lib/widget-types/timeseries/timeseries-configurator.ts","../../src/lib/widget-types/timeseries/timeseries-widget.ts","../../src/lib/widget-types/timeseries/timeseries.ts","../../src/lib/dashboards.module.ts","../../src/lib/configurator/pipe/public-api.ts","../../src/lib/configurator/functions/public-api.ts","../../src/lib/configurator/components/widgets/kpi/kpi-tiles-configuration/public-api.ts","../../src/lib/configurator/components/widgets/kpi/public-api.ts","../../src/lib/configurator/components/widgets/table/public-api.ts","../../src/lib/configurator/components/widgets/timeseries/public-api.ts","../../src/lib/configurator/components/widgets/proportional/public-api.ts","../../src/lib/configurator/components/widgets/configurator-items/refresher-configuration/public-api.ts","../../src/lib/configurator/components/widgets/configurator-items/data-source-error/public-api.ts","../../src/lib/configurator/components/widgets/configurator-items/public-api.ts","../../src/lib/configurator/components/widgets/drilldown/public-api.ts","../../src/lib/configurator/components/widgets/public-api.ts","../../src/lib/configurator/components/wizard/dashwiz/public-api.ts","../../src/lib/configurator/components/wizard/dashwiz-step/public-api.ts","../../src/lib/configurator/components/wizard/public-api.ts","../../src/lib/configurator/components/public-api.ts","../../src/lib/configurator/public-api.ts","../../src/lib/components/dashboard/public-api.ts","../../src/lib/components/widget/public-api.ts","../../src/lib/components/layouts/public-api.ts","../../src/lib/components/proportional-widget/public-api.ts","../../src/lib/components/kpi-widget/types.ts","../../src/lib/components/kpi-widget/public-api.ts","../../src/lib/components/timeseries-widget/chart-presets/status-bar-chart/apply-status-endpoints.ts","../../src/lib/components/timeseries-widget/chart-presets/public-api.ts","../../src/lib/components/timeseries-widget/public-api.ts","../../src/lib/components/table-widget/public-api.ts","../../src/lib/components/providers/public-api.ts","../../src/lib/components/time-frame-selection/public-api.ts","../../src/lib/components/loading/public-api.ts","../../src/lib/components/list-widget/public-api.ts","../../src/lib/components/public-api.ts","../../src/lib/directives/widget-editor/public-api.ts","../../src/lib/directives/public-api.ts","../../src/lib/functions/proportional-aggregators/public-api.ts","../../src/lib/functions/public-api.ts","../../src/lib/widget-types/common/configurator/public-api.ts","../../src/lib/widget-types/common/widget/public-api.ts","../../src/lib/widget-types/common/public-api.ts","../../src/lib/widget-types/proportional/donut-content-configurator-slice.ts","../../src/lib/widget-types/public-api.ts","../../src/lib/constants/public-api.ts","../../src/public-api.ts","../../src/nova-ui-dashboards.ts"],"sourcesContent":["// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nui-preview-overlay\",\n template: `<div class=\"nui-text-label content\" i18n>\n This is a non-interactive widget preview\n </div>`,\n styleUrls: [\"./preview-overlay.component.less\"],\n})\nexport class PreviewOverlayComponent {\n static lateLoadKey = \"PreviewOverlayComponent\";\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnInit,\n} from \"@angular/core\";\n\nimport { IWidgetErrorDisplayProperties } from \"../../../components/widget/types\";\nimport { IHasChangeDetector } from \"../../../types\";\n\n@Component({\n selector: \"nui-widget-error\",\n templateUrl: \"./widget-error.component.html\",\n styleUrls: [\"./widget-error.component.less\"],\n})\nexport class WidgetErrorComponent\n implements OnInit, IHasChangeDetector, IWidgetErrorDisplayProperties\n{\n public static lateLoadKey = \"WidgetErrorComponent\";\n\n public readonly defaultClasses =\n \"d-flex flex-column justify-content-center w-100 p-3\";\n\n @Input() public image: string;\n @Input() public title: string;\n @Input() public description: string;\n\n /**\n * Optional class for styling\n */\n @Input() public elementClass = \"\";\n\n @HostBinding(\"class\") public classNames: string;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n ngOnInit() {\n this.classNames = `${this.defaultClasses} ${this.elementClass}`;\n }\n}\n","<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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** The default threshold at which unit conversion goes into effect */\nexport const DEFAULT_UNIT_CONVERSION_THRESHOLD = 1000000;\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { UnitBase, UnitConversionService, UnitOption } from \"@nova-ui/bits\";\n\nimport { DEFAULT_UNIT_CONVERSION_THRESHOLD } from \"../constants\";\n\n/**\n * Pipe for transforming large values to their abbreviated counterparts.\n * Conversions are applied for values 10000 or greater\n */\n@Pipe({ name: \"nuiDashboardUnitConversion\" })\nexport class DashboardUnitConversionPipe implements PipeTransform {\n constructor(private unitConversionService: UnitConversionService) {}\n\n /**\n * Transforms a large number value to its abbreviated counterpart\n *\n * @param value The value to convert\n *\n * @returns The string representation of the converted value\n */\n public transform = (\n value: string | number | undefined,\n units: UnitOption = \"generic\",\n defaultThreshold: number = DEFAULT_UNIT_CONVERSION_THRESHOLD\n ): string => {\n const valueAsNumber =\n typeof value === \"string\" ? parseFloat(value) : value;\n\n if (\n valueAsNumber === undefined ||\n isNaN(valueAsNumber) ||\n valueAsNumber < defaultThreshold\n ) {\n return value?.toString() || \"\";\n }\n\n const conversion = this.unitConversionService.convert(\n valueAsNumber,\n units === \"bytes\" ? UnitBase.Bytes : UnitBase.Standard,\n 1\n );\n return this.unitConversionService.getFullDisplay(conversion, units);\n };\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { NuiImageModule } from \"@nova-ui/bits\";\n\nimport { PreviewOverlayComponent } from \"./components/preview-overlay/preview-overlay.component\";\nimport { WidgetErrorComponent } from \"./components/widget-error/widget-error.component\";\nimport { DashboardUnitConversionPipe } from \"./pipes/dashboard-unit-conversion-pipe\";\n\nconst commonComponents = [PreviewOverlayComponent, WidgetErrorComponent];\n\n@NgModule({\n imports: [CommonModule, NuiImageModule],\n declarations: [DashboardUnitConversionPipe, ...commonComponents],\n exports: [CommonModule, DashboardUnitConversionPipe, ...commonComponents],\n})\nexport class NuiDashboardsCommonModule {}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./preview-overlay/preview-overlay.component\";\nexport * from \"./widget-error/widget-error.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashboard-unit-conversion-pipe\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./common.module\";\nexport * from \"./components/public-api\";\nexport * from \"./pipes/public-api\";\nexport * from \"./constants\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StaticProvider } from \"@angular/core\";\nimport { BehaviorSubject, ReplaySubject } from \"rxjs\";\n\nimport { EventDefinition, IEvent, IEventDefinition } from \"@nova-ui/bits\";\n\nimport { IDataSourceBusyPayload } from \"../components/providers/types\";\n\nexport const DEFAULT_PIZZAGNA_ROOT = \"/\";\n\nexport interface IStaticProviders {\n [providerId: string]: StaticProvider;\n}\n\nexport interface ISetPropertyPayload {\n path: string;\n value: any;\n}\n\nexport interface IPreviewEventPayload {\n id: IEventDefinition;\n payload: any;\n}\n\nexport interface IRegistryAddOptions {\n overrideExisting: boolean;\n}\nexport interface IAddFormattersOptions\n extends Pick<IRegistryAddOptions, \"overrideExisting\"> {}\n\nexport const REFRESH = new EventDefinition(\"REFRESH\");\nexport const SCROLL_NEXT_PAGE = new EventDefinition(\"SCROLL_NEXT_PAGE\");\nexport const WIDGET_REMOVE = new EventDefinition(\"WIDGET_REMOVE\");\nexport const WIDGET_EDIT = new EventDefinition(\"WIDGET_EDIT\");\nexport const WIDGET_CREATE = new EventDefinition(\"WIDGET_CREATE\");\nexport const WIDGET_READY = new EventDefinition(\"WIDGET_READY\");\nexport const WIDGET_RESIZE = new EventDefinition(\"WIDGET_RESIZE\");\nexport const WIDGET_POSITION_CHANGE = new EventDefinition(\n \"WIDGET_POSITION_CHANGE\"\n);\nexport const WIDGET_SEARCH = new EventDefinition(\n \"WIDGET_SEARCH\",\n () => new BehaviorSubject<IEvent>({ payload: \"\" })\n);\nexport const SET_PROPERTY_VALUE = new EventDefinition(\"SET_PROPERTY_VALUE\");\nexport const SET_TIMEFRAME = new EventDefinition(\"SET_TIMEFRAME\");\nexport const PREVIEW_EVENT = new EventDefinition(\"PREVIEW_EVENT\");\nexport const DATA_SOURCE_BUSY = new EventDefinition<IDataSourceBusyPayload>(\n \"DATA_SOURCE_BUSY\"\n);\nexport const DASHBOARD_EDIT_MODE = new EventDefinition(\n \"DASHBOARD_EDIT_MODE\",\n () => new ReplaySubject<IEvent>(1)\n);\nexport const INTERACTION = new EventDefinition(\"INTERACTION\");\nexport const DATA_SOURCE_INVOKED = new EventDefinition(\"DATA_SOURCE_INVOKED\");\nexport const DRILLDOWN = new EventDefinition(\"DRILLDOWN\");\n\nexport const NOVA_DATASOURCE_INTERVAL_REFRESHER =\n \"NOVA_DATASOURCE_INTERVAL_REFRESHER\";\nexport const NOVA_DATASOURCE_ADAPTER = \"NOVA_DATASOURCE_ADAPTER\";\nexport const NOVA_TIMESERIES_DATASOURCE_ADAPTER =\n \"NOVA_TIMESERIES_DATASOURCE_ADAPTER\";\nexport const NOVA_KPI_DATASOURCE_ADAPTER = \"NOVA_KPI_DATASOURCE_ADAPTER\";\nexport const NOVA_DRILLDOWN_DATASOURCE_ADAPTER =\n \"NOVA_DRILLDOWN_DATASOURCE_ADAPTER\";\nexport const NOVA_KPI_COLOR_PRIORITIZER = \"NOVA_KPI_COLOR_PRIORITIZER\";\nexport const NOVA_TITLE_AND_DESCRIPTION_CONVERTER =\n \"NOVA_TITLE_AND_DESCRIPTION_CONVERTER\";\nexport const NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER =\n \"NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER\";\nexport const NOVA_KPI_TILES_CONVERTER = \"NOVA_KPI_TILES_CONVERTER\";\nexport const NOVA_TIMESERIES_METADATA_CONVERTER =\n \"NOVA_TIMESERIES_METADATA_CONVERTER\";\nexport const NOVA_TIMESERIES_SERIES_CONVERTER =\n \"NOVA_TIMESERIES_SERIES_CONVERTER\";\nexport const NOVA_DASHBOARD_EVENT_PROXY = \"NOVA_DASHBOARD_EVENT_PROXY\";\nexport const NOVA_TABLE_COLUMNS_CONVERTER = \"NOVA_TABLE_COLUMNS_CONVERTER\";\nexport const NOVA_TABLE_FILTERS_CONVERTER = \"NOVA_TABLE_FILTERS_CONVERTER\";\nexport const NOVA_TABLE_DATASOURCE_ADAPTER = \"NOVA_TABLE_DATASOURCE_ADAPTER\";\nexport const NOVA_GENERIC_CONVERTER = \"NOVA_GENERIC_CONVERTER\";\nexport const NOVA_GENERIC_ARRAY_CONVERTER = \"NOVA_GENERIC_ARRAY_CONVERTER\";\nexport const NOVA_KPI_SECTION_CONVERTER = \"NOVA_KPI_SECTION_CONVERTER\";\nexport const NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER =\n \"NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER\";\nexport const NOVA_LOADING_ADAPTER = \"NOVA_LOADING_ADAPTER\";\nexport const NOVA_STATUS_CONTENT_FALLBACK_ADAPTER =\n \"NOVA_STATUS_CONTENT_FALLBACK_ADAPTER\";\nexport const NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER =\n \"NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER\";\nexport const NOVA_KPI_SCALE_SYNC_BROKER = \"NOVA_KPI_SCALE_SYNC_BROKER\";\nexport const NOVA_URL_INTERACTION_HANDLER = \"NOVA_URL_INTERACTION_HANDLER\";\nexport const NOVA_EVENT_BUS_DEBUGGER = \"NOVA_EVENT_BUS_DEBUGGER\";\nexport const NOVA_PIZZAGNA_BROADCASTER = \"NOVA_PIZZAGNA_BROADCASTER\";\nexport const NOVA_VIRTUAL_VIEWPORT_MANAGER = \"NOVA_VIRTUAL_VIEWPORT_MANAGER\";\nexport const NOVA_TABLE_FORMATTERS_REGISTRY = \"NOVA_TABLE_FORMATTERS_REGISTRY\";\nexport const NOVA_KPI_FORMATTERS_REGISTRY = \"NOVA_KPI_FORMATTERS_REGISTRY\";\nexport const NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY =\n \"NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY\";\nexport const NOVA_TEST_REGISTRY = \"NOVA_TEST_REGISTRY\";\nexport const NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER =\n \"NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n EventEmitter,\n InjectionToken,\n Injector,\n StaticProvider,\n} from \"@angular/core\";\nimport { AbstractControl, FormGroup } from \"@angular/forms\";\n\nimport { EventBus } from \"@nova-ui/bits\";\n\n/**\n * Same as Partial<T> but goes deeper and makes all of its properties and sub-properties Partial<T>.\n */\nexport type DeepPartial<T> = T extends object\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : T;\n\nexport const PIZZAGNA_EVENT_BUS = new InjectionToken<EventBus<Event>>(\n \"PIZZAGNA_EVENT_BUS\"\n);\nexport const DASHBOARD_EVENT_BUS = new InjectionToken<EventBus<Event>>(\n \"DASHBOARD_EVENT_BUS\"\n);\nexport const DATA_SOURCE = new InjectionToken<EventBus<Event>>(\"DATA_SOURCE\");\nexport const FORMATTERS_REGISTRY = new InjectionToken<EventBus<Event>>(\n \"FORMATTERS_REGISTRY\"\n);\nexport const TEST_REGISTRY = new InjectionToken<EventBus<Event>>(\n \"TEST_REGISTRY\"\n);\nexport const HEADER_LINK_PROVIDER = new InjectionToken<EventBus<Event>>(\n \"HEADER_LINK_PROVIDER\"\n);\n\nexport enum WellKnownProviders {\n DataSource = \"dataSource\",\n Adapter = \"adapter\",\n Converter = \"converter\",\n Broadcaster = \"broadcaster\",\n Refresher = \"refresher\",\n EventProxy = \"eventProxy\",\n LoadingAdapter = \"loadingAdapter\",\n ContentFallbackAdapter = \"contentFallbackAdapter\",\n InteractionHandler = \"interactionHandler\",\n EventBusDebugger = \"eventBusDebugger\",\n KpiColorPrioritizer = \"kpiColorPrioritizer\",\n FormattersRegistry = \"formattersRegistry\",\n DataSourceManager = \"dataSourceManager\",\n}\n\nexport enum WellKnownPathKey {\n Root = \"root\",\n DataSourceConfigComponentType = \"dataSourceConfigComponentType\",\n TileDescriptionConfigComponentType = \"tileDescriptionConfigComponentType\",\n DataSourceProviders = \"dataSourceProviders\",\n Formatters = \"formatters\",\n TileDescriptionBackgroundColors = \"tileDescriptionBackgroundColors\",\n TileBackgroundColorRulesBackgroundColors = \"tileBackgroundColorRulesBackgroundColors\",\n}\n\nexport enum WellKnownDataSourceFeatures {\n Interactivity = \"interactivity\",\n DisableTableColumnGeneration = \"disableTableColumnGeneration\",\n}\n\nexport interface IProperties extends Record<string, any> {}\n\nexport interface IProviderProperties extends IProperties {\n /** This is property is set by the component portal directive to give providers self-awareness they need to update properties in pizzagna. */\n providerKey?: string;\n}\n\nexport interface IComponentConfiguration {\n id: string;\n componentType: string;\n providers?: Record<string, IProviderConfiguration>;\n properties?: IProperties;\n}\n\nexport interface IProviderConfiguration {\n providerId: string;\n properties?: IProviderProperties;\n}\n\nexport interface IProviderConfigurationForDisplay\n extends IProviderConfiguration {\n label: string;\n}\n\nexport interface IPortalEnvironment {\n providers?: StaticProvider[];\n injector?: Injector;\n}\n\nexport interface IPizzagnaLayer\n extends Record<string, DeepPartial<IComponentConfiguration>> {}\n\nexport interface IPizzagna extends Record<string, IPizzagnaLayer> {}\n\nexport interface IPizza extends Record<string, IComponentConfiguration> {}\n\n/**\n * Interface for components that can be dynamically refreshed from the outside using the changeDetector\n */\nexport interface IHasChangeDetector {\n changeDetector: ChangeDetectorRef;\n}\n\n/**\n * Interface for components that expose a form\n */\nexport interface IHasForm<T extends AbstractControl = FormGroup> {\n form: T;\n formReady: EventEmitter<T>;\n}\n\n/**\n * Interface for providers that require the related component info\n */\nexport interface IHasComponent<T = any> {\n setComponent(component: T, componentId: string): void;\n}\n\n/**\n * Interface for configurable providers\n */\nexport interface IConfigurable {\n providerKey?: string;\n setComponent?: (component: any, componentId: string) => void;\n // TODO: BREAKING rename to 'updateProperties' in v12 - NUI-5828\n updateConfiguration(properties: IProperties): void;\n}\n\nexport enum PizzagnaLayer {\n Structure = \"structure\",\n Configuration = \"configuration\",\n Data = \"data\",\n}\n\nexport enum AccordionState {\n CRITICAL = \"critical\",\n WARNING = \"warning\",\n DEFAULT = \"default\",\n}\n\nexport enum HttpStatusCode {\n Unknown = \"0\",\n Ok = \"200\",\n Forbidden = \"403\",\n NotFound = \"404\",\n}\n\nexport interface IPaletteColor {\n color: string;\n label: string;\n}\n\nexport type ComparatorFn = (a: any, b: any) => boolean;\nexport type ComparatorTypes = \">\" | \">=\" | \"==\" | \"<\" | \"<=\";\nexport interface IBackgroundColorComparator {\n comparatorFn: ComparatorFn;\n label?: string;\n}\nexport interface IComparatorsDict\n extends Partial<\n Record<ComparatorTypes | string, IBackgroundColorComparator>\n > {}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n CompactType,\n DisplayGrid,\n GridsterConfig,\n GridType,\n} from \"angular-gridster2\";\n\nexport const DEFAULT_GRIDSTER_CONFIG: GridsterConfig = {\n displayGrid: DisplayGrid.None,\n gridType: GridType.VerticalFixed,\n compactType: CompactType.CompactUp,\n margin: 15,\n outerMargin: true,\n outerMarginTop: null,\n outerMarginRight: null,\n outerMarginBottom: null,\n outerMarginLeft: null,\n mobileBreakpoint: 640,\n minCols: 12,\n maxCols: 12,\n minRows: 12,\n fixedRowHeight: 44,\n minItemArea: 1,\n defaultItemCols: 6,\n defaultItemRows: 6,\n keepFixedHeightInMobile: false,\n keepFixedWidthInMobile: false,\n scrollSensitivity: 10,\n scrollSpeed: 20,\n enableEmptyCellClick: false,\n enableEmptyCellContextMenu: false,\n enableEmptyCellDrop: false,\n enableEmptyCellDrag: false,\n emptyCellDragMaxCols: 50,\n emptyCellDragMaxRows: 50,\n ignoreMarginInRow: false,\n draggable: {\n enabled: false,\n ignoreContent: true,\n dragHandleClass: \"nui-dashboard__widget--drag-handle\",\n },\n resizable: {\n enabled: false,\n handles: {\n s: true,\n e: true,\n n: true,\n w: true,\n se: true,\n ne: true,\n sw: true,\n nw: true,\n },\n },\n swap: false,\n pushItems: true,\n pushResizeItems: true,\n disablePushOnDrag: false,\n disablePushOnResize: false,\n pushDirections: { north: true, east: true, south: true, west: true },\n disableWindowResize: false,\n disableWarnings: false,\n scrollToNewItems: false,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { IWidget } from \"../components/widget/types\";\n\n@Injectable()\nexport class WidgetConfigurationService {\n private widget: IWidget;\n\n public updateWidget(widget: IWidget) {\n this.widget = widget;\n }\n\n public getWidget() {\n return this.widget;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport defaultsDeep from \"lodash/defaultsDeep\";\nimport set from \"lodash/set\";\n\nimport { IWidget, IWidgetTypeDefinition } from \"../components/widget/types\";\nimport { PizzagnaLayer } from \"../types\";\n\n@Injectable()\nexport class WidgetTypesService {\n private widgetTypes: Record<string, IWidgetTypeDefinition[]> = {};\n\n constructor() {}\n\n public registerWidgetType(\n key: string,\n version: number,\n widgetType: IWidgetTypeDefinition\n ): void {\n let widgetTypeVersions = this.widgetTypes[key];\n if (!widgetTypeVersions) {\n widgetTypeVersions = [];\n this.widgetTypes[key] = widgetTypeVersions;\n }\n if (widgetTypeVersions.length < version) {\n widgetTypeVersions.length = version;\n }\n widgetTypeVersions[version - 1] = widgetType;\n }\n\n public getWidgetType(\n type: string,\n version?: number\n ): IWidgetTypeDefinition {\n const widgetTypeVersions = this.widgetTypes[type];\n if (!widgetTypeVersions || widgetTypeVersions.length === 0) {\n throw new Error(\n \"Type '\" +\n type +\n \"' not found in the registry. Available types: \" +\n Object.keys(this.widgetTypes).join(\", \")\n );\n }\n\n if (\n typeof version !== \"undefined\" &&\n (version <= 0 || widgetTypeVersions.length < version)\n ) {\n throw new Error(\n \"Version \" +\n version +\n \" for widget type '\" +\n type +\n \"' not registered. Max available version is \" +\n widgetTypeVersions.length\n );\n }\n\n const adjustedVersion =\n typeof version === \"undefined\"\n ? widgetTypeVersions.length\n : version;\n return widgetTypeVersions[adjustedVersion - 1];\n }\n\n /**\n * Take a widget and merge it with the pizzagna of its type\n *\n * @param widget\n *\n * @return new reference of a widget including the pizzagna of its type\n */\n public mergeWithWidgetType(widget: IWidget): IWidget {\n const widgetType = this.getWidgetType(widget.type, widget.version);\n return {\n ...widget,\n pizzagna: defaultsDeep(widget.pizzagna, widgetType.widget),\n };\n }\n\n public setNode(\n widgetTemplate: IWidgetTypeDefinition,\n section: \"widget\" | \"configurator\",\n pathKey: string,\n value: any\n ): void {\n const widgetSection = `${section}.${PizzagnaLayer.Structure}`;\n const itemPath = `${\n widgetTemplate.paths?.[section]?.[pathKey] || pathKey\n }`;\n\n const path = `${widgetSection}.${itemPath}`;\n set(widgetTemplate, path, value);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport isArray from \"lodash/isArray\";\nimport some from \"lodash/some\";\nimport union from \"lodash/union\";\n\nexport interface IValueChange {\n previousValue: any;\n currentValue: any;\n}\n\n/**\n * This function takes a source object with a prioritized list of changes. Goes through and detects the changes on every one of these structures and builds\n * a new object that respects immutability and updates object references only where necessary. This is used to merge lasagna overlays into a component state\n * that maintains its immutability and high performance of change detection.\n *\n * @param result\n * @param changes\n */\nexport function mergeChanges<T>(result: T, ...changes: IValueChange[]): T {\n const validChanges = changes.filter(\n (c) =>\n typeof c.previousValue !== \"undefined\" ||\n typeof c.currentValue !== \"undefined\"\n );\n\n // there were no changes in the provided values, so just return the input object\n if (!some(validChanges, (c) => c.currentValue !== c.previousValue)) {\n return result;\n }\n\n // if there is only one layer of change just return the currentValue to preserve references\n if (validChanges.length === 1) {\n return validChanges[0].currentValue;\n }\n\n // first we need to determine the value type\n const valueType = findType(validChanges);\n // if it's a primitive type or an array, then we don't go further and we take a new value with the highest priority\n if (![\"object\", \"object[]\"].includes(valueType)) {\n // we take the value with the last priority\n return takeHighestPriorityValue(validChanges);\n }\n\n // collect all the keys of all the objects in given changes\n const keys: string[] = union(\n ...validChanges.map((c) =>\n typeof c.currentValue === \"object\"\n ? Object.keys(c.currentValue || {})\n : []\n )\n );\n\n const accTemplate = valueType === \"object[]\" ? [] : {};\n\n return keys.reduce((acc: Record<string, any>, key) => {\n const checkedResult =\n typeof result === \"undefined\" ||\n result === null ||\n typeof (<Record<string, any>>result)[key] === \"undefined\"\n ? undefined\n : (<Record<string, any>>result)[key];\n const nestedChanges = validChanges.map((c) => ({\n previousValue:\n typeof c.previousValue === \"undefined\" ||\n c.previousValue == null\n ? undefined\n : c.previousValue[key],\n currentValue:\n typeof c.currentValue === \"undefined\" || c.currentValue == null\n ? undefined\n : c.currentValue[key],\n }));\n\n // recursively execute this method for given property\n acc[key] = mergeChanges(checkedResult, ...nestedChanges);\n return acc;\n }, accTemplate as T) as T;\n}\n\n/**\n * Take current value from given changes with highest priority - the last one wins\n *\n * @param changes\n */\nfunction takeHighestPriorityValue(changes: IValueChange[]) {\n for (let i = changes.length - 1; i >= 0; i--) {\n const value = changes[i].currentValue;\n if (typeof value !== \"undefined\") {\n return value;\n }\n }\n return undefined;\n}\n\nfunction findType(changes: IValueChange[]): string {\n for (const c of changes) {\n const type = typeof c.currentValue;\n if (type !== \"undefined\" && c.currentValue != null) {\n if (isArray(c.currentValue)) {\n const arrElemType = typeof c.currentValue[0];\n if (arrElemType === \"object\") {\n return \"object[]\";\n } else {\n return \"array\";\n }\n }\n if (c.currentValue.constructor !== Object) {\n return \"advanced\";\n }\n\n return type;\n }\n }\n return typeof undefined;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { immutableSet } from \"@nova-ui/bits\";\n\nimport { IComponentConfiguration, IPizzagna, PizzagnaLayer } from \"../../types\";\n\n// TODO: make it dynamic!\nconst CHILD_ELEM_COMPONENT_TYPE = \"WidgetConfiguratorSectionComponent\";\n\n@Injectable()\nexport class DynamicComponentCreator {\n public getPizzagnaUpdatedWithComponents(\n pizzagna: IPizzagna,\n parentPath: string,\n componentIds: string[]\n ) {\n const parent = pizzagna[PizzagnaLayer.Structure][parentPath];\n const template = parent.properties\n ?.template as Partial<IComponentConfiguration>[];\n\n return this.getPizzagnaWithChildren(\n pizzagna,\n componentIds,\n template,\n parentPath\n );\n }\n\n private getPizzagnaWithChildren(\n pizzagna: IPizzagna,\n componentIds: string[],\n template: Partial<IComponentConfiguration>[],\n parentPath: string\n ) {\n const children = componentIds.map((id) => ({\n id,\n componentType: CHILD_ELEM_COMPONENT_TYPE,\n })) as IComponentConfiguration[];\n\n let updatedPizzagna = children.reduce(\n (res, child) => this.updateChildPizzagna(res, template, child),\n pizzagna\n );\n updatedPizzagna = this.getPizzagnaWithNodesSet(\n updatedPizzagna,\n parentPath,\n componentIds\n );\n\n return updatedPizzagna;\n }\n\n private updateChildPizzagna(\n pizzagna: IPizzagna,\n template: Partial<IComponentConfiguration>[],\n child: IComponentConfiguration\n ) {\n let updatedPizzagna = immutableSet(\n pizzagna,\n `${PizzagnaLayer.Structure}.${child.id}`,\n child\n );\n\n const nodes = template.map((node) => ({\n ...node,\n id: `${child.id}/${node.id}`,\n }));\n updatedPizzagna = nodes.reduce(\n (res, node) =>\n immutableSet(\n res,\n `${PizzagnaLayer.Structure}.${node.id}`,\n node\n ),\n updatedPizzagna\n );\n\n const nodesIDs = nodes.map((node) => node.id);\n updatedPizzagna = this.getPizzagnaWithNodesSet(\n updatedPizzagna,\n child.id,\n nodesIDs\n );\n\n return updatedPizzagna;\n }\n\n private getPizzagnaWithNodesSet(\n pizzagna: IPizzagna,\n componentId: string,\n nodes: string[]\n ) {\n const path = `${PizzagnaLayer.Structure}.${componentId}.properties.nodes`;\n\n return immutableSet(pizzagna, path, nodes);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { PizzagnaLayer } from \"../../types\";\n\nexport interface IPizzagnaProperty {\n pizzagnaKey?: string;\n componentId: string;\n providerKey?: string;\n propertyPath: string[];\n}\n\nexport function getPizzagnaPropertyPath(definition: IPizzagnaProperty) {\n if (definition.providerKey) {\n return [\n definition.pizzagnaKey || PizzagnaLayer.Data,\n definition.componentId,\n \"providers\",\n definition.providerKey,\n \"properties\",\n ...definition.propertyPath,\n ].join(\".\");\n } else {\n return [\n definition.pizzagnaKey || PizzagnaLayer.Data,\n definition.componentId,\n \"properties\",\n ...definition.propertyPath,\n ].join(\".\");\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport isArray from \"lodash/isArray\";\nimport omit from \"lodash/omit\";\nimport { ReplaySubject } from \"rxjs\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { ISetPropertyPayload, SET_PROPERTY_VALUE } from \"../../services/types\";\nimport {\n IComponentConfiguration,\n IPizza,\n IPizzagna,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport {\n getPizzagnaPropertyPath,\n IPizzagnaProperty,\n} from \"../functions/get-pizzagna-property-path\";\nimport { DynamicComponentCreator } from \"./dynamic-component-creator.service\";\n\n/**\n * This service allows pizzagna sub-components to read data of other components and initiate changes of property values\n */\n@Injectable()\nexport class PizzagnaService {\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private dynamicComponentCreator: DynamicComponentCreator\n ) {}\n\n public pizzagna: IPizzagna;\n public pizzaChanged = new ReplaySubject<IPizza>(1);\n private components: IPizza;\n\n public updatePizzagna(pizzagna: IPizzagna) {\n this.pizzagna = pizzagna;\n }\n\n public updateComponents(components: IPizza) {\n this.components = components;\n this.pizzaChanged.next(components);\n }\n\n public getComponent(refId: string): IComponentConfiguration {\n const component = this.components[refId] as IComponentConfiguration;\n if (!component) {\n throw new Error(\"Component '\" + refId + \"' is not defined!\");\n }\n return component;\n }\n\n public setProperty(property: IPizzagnaProperty | string, value: any) {\n const path =\n typeof property === \"string\"\n ? property\n : getPizzagnaPropertyPath(property);\n this.eventBus\n .getStream(SET_PROPERTY_VALUE)\n .next({ payload: { path, value } as ISetPropertyPayload });\n }\n\n public createComponentsFromTemplateWithProperties(\n parentPath: string,\n components: any\n ) {\n const componentIds = components.map((c: any) => c.id);\n let updatedPizzagna: IPizzagna =\n this.dynamicComponentCreator.getPizzagnaUpdatedWithComponents(\n this.pizzagna,\n parentPath,\n componentIds\n );\n\n for (const component of components) {\n for (const childId of Object.keys(component.children)) {\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n `${PizzagnaLayer.Data}.${childId}.properties`,\n component.children[childId]\n );\n }\n }\n\n // this is here to update the pizzagna for other converters that need to access the value immediately\n this.updatePizzagna(updatedPizzagna);\n\n this.eventBus.getStream(SET_PROPERTY_VALUE).next({\n payload: {\n path: \"\",\n value: updatedPizzagna,\n } as ISetPropertyPayload,\n });\n }\n\n public createComponentsFromTemplate(\n parentPath: string,\n componentIds: string[]\n ) {\n const updatedPizzagna =\n this.dynamicComponentCreator.getPizzagnaUpdatedWithComponents(\n this.pizzagna,\n parentPath,\n componentIds\n );\n // this is here to update the pizzagna for other converters that need to access the value immediately\n this.updatePizzagna(updatedPizzagna);\n this.eventBus.getStream(SET_PROPERTY_VALUE).next({\n payload: {\n path: \"\",\n value: updatedPizzagna,\n } as ISetPropertyPayload,\n });\n }\n\n public removeComponents(ids: string | string[]) {\n if (isArray(ids)) {\n ids.forEach((id) => this.removeComponent(id));\n } else {\n this.removeComponent(ids);\n }\n }\n\n private removeComponent(id: string): void {\n const updatedPizzagna: IPizzagna = { ...this.pizzagna };\n\n const componentNodes =\n this.pizzagna[PizzagnaLayer.Structure][id].properties?.nodes;\n const componentsToRemove = [id, ...componentNodes];\n\n const layers = [\n PizzagnaLayer.Structure,\n PizzagnaLayer.Configuration,\n PizzagnaLayer.Data,\n ];\n for (const layer of layers) {\n if (!updatedPizzagna[layer]) {\n continue;\n }\n for (const component of componentsToRemove) {\n updatedPizzagna[layer] = omit(\n updatedPizzagna[layer],\n component\n );\n }\n }\n\n this.eventBus.getStream(SET_PROPERTY_VALUE).next({\n payload: {\n path: \"\",\n value: updatedPizzagna,\n } as ISetPropertyPayload,\n });\n this.updatePizzagna(updatedPizzagna);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Component } from \"@angular/core\";\n\n/** @ignore */\n@Component({\n template: `<code>\n <pre>Template load error!</pre>\n </code>`,\n})\nexport class TemplateLoadErrorComponent {\n static lateLoadKey = \"TemplateLoadErrorComponent\";\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable, Type } from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\n// Extending with Type<any> to be compatible with EntryComponents type\nexport interface IComponentWithLateLoadKey extends Type<any> {\n lateLoadKey: string;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class ComponentRegistryService {\n private components: Record<string, any> = {};\n\n constructor(private logger: LoggerService) {}\n\n public registerByLateLoadKey(component: IComponentWithLateLoadKey) {\n this.registerComponentType(component.lateLoadKey, component);\n }\n\n public registerComponentType(key: string, component: any) {\n this.components[key] = component;\n }\n\n public getComponentType(key: string) {\n const component = this.components[key];\n\n if (!component) {\n this.logger.warn(\n \"Component '\" +\n key +\n \"' not defined. Available components: \" +\n JSON.stringify(Object.keys(this.components))\n );\n }\n\n return component;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Injectable, Injector } from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { TemplateLoadErrorComponent } from \"../../components/template-load-error/template-load-error.component\";\nimport { IPortalEnvironment } from \"../../types\";\nimport { ComponentRegistryService } from \"./component-registry.service\";\n\n/** @ignore */\n@Injectable({\n providedIn: \"root\",\n})\nexport class ComponentPortalService {\n constructor(\n private componentRegistry: ComponentRegistryService,\n private logger: LoggerService\n ) {}\n\n public createComponentPortal(\n componentType: string | Function,\n injector: Injector | null\n ): ComponentPortal<any> {\n let loadType: any;\n if (typeof componentType === \"string\") {\n loadType = this.componentRegistry.getComponentType(componentType);\n } else {\n loadType = componentType;\n }\n\n if (!loadType) {\n this.logger.error(`Cannot Find Component Type ${componentType}`);\n loadType = TemplateLoadErrorComponent;\n }\n\n return new ComponentPortal(loadType, null, injector);\n }\n\n public createInjector(environment: IPortalEnvironment): Injector {\n const providers = environment.providers || [];\n return Injector.create({\n providers,\n parent: environment.injector,\n name: \"Component Injector\",\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { BehaviorSubject, ReplaySubject } from \"rxjs\";\n\nimport { EventDefinition, IEvent } from \"@nova-ui/bits\";\n\nexport const DATA_SOURCE_OUTPUT = new EventDefinition(\n \"DATA_SOURCE_OUTPUT\",\n () => new ReplaySubject<IEvent>(1)\n);\nexport const DATA_SOURCE_DESTROYED = new EventDefinition(\n \"DATA_SOURCE_DESTROYED\"\n);\nexport const DATA_SOURCE_CHANGE = new EventDefinition(\"DATA_SOURCE_CHANGE\");\nexport const DATA_SOURCE_CREATED = new EventDefinition(\n \"DATA_SOURCE_CREATED\",\n () => new BehaviorSubject<IEvent>({ payload: undefined })\n);\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy, Optional } from \"@angular/core\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EventBus,\n IDataSource,\n IEvent,\n IFilteringOutputs,\n} from \"@nova-ui/bits\";\n\nimport {\n DATA_SOURCE_DESTROYED,\n DATA_SOURCE_OUTPUT,\n} from \"../../configurator/types\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport {\n DATA_SOURCE_BUSY,\n DATA_SOURCE_INVOKED,\n REFRESH,\n} from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IConfigurable,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport {\n IComponentIdPayload,\n IDataSourceBusyPayload,\n IDataSourceOutput,\n} from \"./types\";\n\n@Injectable()\nexport class DataSourceAdapter<T extends IFilteringOutputs = IFilteringOutputs>\n implements IConfigurable, OnDestroy\n{\n protected componentId: string;\n protected lastValue: T;\n protected destroy$ = new Subject<void>();\n protected dataSourceConfiguration: Record<string, any>;\n\n private propertyPath: string;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) public dataSource: IDataSource<T>,\n protected pizzagnaService: PizzagnaService\n ) {\n if (!this.dataSource) {\n return;\n }\n this.setupRefreshListener();\n\n this.dataSource.outputsSubject\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: T | IDataSourceOutput<T>) =>\n this.handleDataSourceUpdate(event)\n );\n\n if (this.dataSource.busy) {\n this.dataSource.busy\n .pipe(takeUntil(this.destroy$))\n .subscribe((busy: boolean) => {\n this.eventBus.getStream(DATA_SOURCE_BUSY).next({\n payload: {\n componentId: this.componentId,\n busy,\n } as IDataSourceBusyPayload,\n });\n });\n }\n }\n\n protected setupRefreshListener(): void {\n this.eventBus\n .getStream(REFRESH)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.handleRefresh());\n }\n\n protected handleRefresh(): void {\n this.eventBus.getStream(DATA_SOURCE_INVOKED).next(undefined);\n this.dataSource.applyFilters();\n }\n\n protected handleDataSourceUpdate(value: T | IDataSourceOutput<T>): void {\n this.lastValue = isUndefined(value?.result) ? value : value?.result;\n this.updateOutput(this.lastValue);\n this.eventBus\n .getStream(DATA_SOURCE_OUTPUT)\n .next({ payload: { componentId: this.componentId, ...value } });\n }\n\n public ngOnDestroy(): void {\n this.updateOutput(undefined);\n\n const destroyedEvent: IEvent<IComponentIdPayload> = {\n payload: { componentId: this.componentId },\n };\n this.eventBus.getStream(DATA_SOURCE_DESTROYED).next(destroyedEvent);\n\n const busyEvent: IEvent<IDataSourceBusyPayload> = {\n payload: { componentId: this.componentId, busy: false },\n };\n this.eventBus.getStream(DATA_SOURCE_BUSY).next(busyEvent);\n\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public updateConfiguration(properties: IProperties): void {\n if (properties.componentId) {\n this.componentId = properties.componentId;\n }\n\n this.updateAdapterProperties(properties);\n this.updateDataSourceProperties(properties);\n\n if (typeof this.lastValue !== \"undefined\") {\n this.updateOutput(this.lastValue);\n }\n }\n\n protected updateAdapterProperties(properties: IProperties): void {\n this.propertyPath = properties.propertyPath;\n }\n\n protected updateDataSourceProperties(properties: IProperties): void {\n const dataSourceConfiguration = properties?.dataSource?.properties;\n if (this.dataSourceConfiguration !== dataSourceConfiguration) {\n this.dataSourceConfiguration = dataSourceConfiguration;\n const configurableDataSource = this\n .dataSource as unknown as IConfigurable;\n if (configurableDataSource?.updateConfiguration) {\n configurableDataSource.updateConfiguration(\n properties.dataSource?.properties\n );\n }\n this.eventBus.getStream(REFRESH).next(undefined);\n }\n\n // check if this is the first call of updateConfiguration and there is no dataSource configuration present in the incoming properties\n // This results in two initial invocations of the data source, and we should eventually remove it. But, currently,\n // widgets sometimes rely on it in order to display their initial data.\n if (\n typeof this.dataSourceConfiguration === \"undefined\" &&\n typeof dataSourceConfiguration === \"undefined\"\n ) {\n // using a setTimeout here to give configurable data sources time to receive their configurations before they're invoked\n setTimeout(() => this.eventBus.getStream(REFRESH).next(undefined));\n }\n }\n\n protected updateOutput(value: T | undefined): void {\n this.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Data,\n componentId: this.componentId,\n propertyPath: [this.propertyPath],\n },\n this.processOutput(value)\n );\n }\n\n protected processOutput(value: T | undefined): T | undefined {\n return value;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject } from \"@angular/core\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EventBus,\n IDataSourceDrilldown,\n IEvent,\n IFilteringOutputs,\n} from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { DRILLDOWN, REFRESH } from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport { DataSourceAdapter } from \"./data-source-adapter\";\nimport { IDrilldownComponentsConfiguration } from \"./types\";\n\nexport class DrilldownDataSourceAdapter extends DataSourceAdapter {\n protected dataPath: string;\n protected navigationBarId: string;\n protected drillstate: string[] = [];\n protected groupBy: string[];\n protected componentsConfig: IDrilldownComponentsConfiguration;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Inject(DATA_SOURCE) public dataSource: IDataSourceDrilldown,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, dataSource, pizzagnaService);\n\n this.eventBus\n .getStream(DRILLDOWN)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent) => {\n if (this.dataSource.busy?.value) {\n return;\n }\n this.onDrilldown(event);\n });\n\n this.registerFilters();\n }\n\n protected updateAdapterProperties(properties: IProperties) {\n this.dataPath = properties.dataPath;\n this.drillstate = properties.drillstate || this.drillstate;\n this.groupBy = properties.groupBy;\n this.componentsConfig = properties.componentsConfig;\n this.navigationBarId = properties.navigationBarId;\n }\n\n protected updateOutput(output: IFilteringOutputs | undefined) {\n const widgetInput = this.getWidgetInput(\n output,\n this.drillstate.length !== this.groupBy.length\n );\n const widgetPath = `${PizzagnaLayer.Data}.${this.componentId}.properties`;\n this.pizzagnaService.setProperty(widgetPath, widgetInput);\n\n // update navBar label\n if (this.navigationBarId) {\n const navBarPath = `${PizzagnaLayer.Data}.${this.navigationBarId}.properties.navBarConfig.label`;\n const navBarIsRootPath = `${PizzagnaLayer.Data}.${this.navigationBarId}.properties.navBarConfig.isRoot`;\n const navBarBackPath = `${PizzagnaLayer.Data}.${this.navigationBarId}.properties.navBarConfig.buttons.back.disabled`;\n this.pizzagnaService.setProperty(\n navBarPath,\n this.drillstate[this.drillstate.length - 1]\n );\n this.pizzagnaService.setProperty(\n navBarBackPath,\n !!this.drillstate.length\n );\n this.pizzagnaService.setProperty(\n navBarIsRootPath,\n !this.drillstate.length\n );\n }\n }\n\n protected getWidgetInput(data: any, group: boolean) {\n const configuration = this.componentsConfig[group ? \"group\" : \"leaf\"];\n\n return {\n [this.dataPath]: data,\n configuration,\n };\n }\n\n protected onDrilldown(event: IEvent) {\n const { payload } = event;\n\n if (payload.reset) {\n this.drillstate = [];\n this.eventBus.next(REFRESH);\n return;\n }\n\n if (payload.back) {\n this.drillstate.length = this.drillstate.length - 1;\n this.eventBus.next(REFRESH);\n return;\n }\n\n this.drillstate.push(payload.id);\n this.eventBus.next(REFRESH);\n }\n\n private registerFilters() {\n this.dataSource.registerComponent({\n group: {\n componentInstance: {\n getFilters: () => ({\n // type: \"group\",\n value: this.groupBy,\n }),\n },\n },\n drillstate: {\n componentInstance: {\n getFilters: () => ({\n // type: \"drillstate\",\n value: this.drillstate,\n }),\n },\n },\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { PIZZAGNA_EVENT_BUS } from \"../../types\";\n\n/**\n * A provider that helps with debugging events on the pizzagna event bus. Include it anywhere in the widget to activate it.\n */\n@Injectable()\nexport class EventBusDebugger implements OnDestroy {\n private destroy$ = new Subject<void>();\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {\n eventBus.streamAdded\n .pipe(takeUntil(this.destroy$))\n .subscribe((stream) => {\n eventBus\n .getStream({ id: stream })\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n console.log(`${event.id}: `, event.payload);\n });\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { INTERACTION } from \"../../../services/types\";\nimport { IConfigurable, IProperties, PIZZAGNA_EVENT_BUS } from \"../../../types\";\n\nexport interface IInteractionPayload<T> {\n interactionType?: string;\n data: T;\n}\n\nexport interface IInteractionHandlerProperties extends IProperties {\n interactionType?: string;\n}\n\n@Injectable()\nexport abstract class InteractionHandler<\n T extends IInteractionHandlerProperties,\n P\n> implements IConfigurable\n{\n protected properties: T;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS)\n protected readonly eventBus: EventBus<IEvent>\n ) {\n this.initializeSubscriptions();\n }\n\n public updateConfiguration(properties: T): void {\n this.properties = properties;\n }\n\n protected initializeSubscriptions() {\n this.eventBus\n .getStream(INTERACTION)\n .subscribe((event: IEvent<IInteractionPayload<any>>) => {\n if (\n !this.properties?.interactionType ||\n this.properties?.interactionType ===\n event.payload?.interactionType\n ) {\n // TODO: ensure that payload is defined\n // @ts-ignore\n this.handleInteraction(event.payload);\n }\n });\n }\n\n protected abstract handleInteraction(\n interaction: IInteractionPayload<P>\n ): void;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class UrlInteractionService {\n constructor(private logger: LoggerService) {}\n\n public template(url: string, data: any): string {\n const regex = new RegExp(/\\$\\{([a-zA-Z0-9.]*)\\}/g);\n return url.replace(regex, (match, captured) => {\n try {\n return this.evaluate(captured.split(\".\"), data) ?? \"\";\n } catch (e) {\n this.logger.error(e);\n return \"\";\n }\n });\n }\n\n private evaluate(expresion: string[], data: any): string {\n return expresion.reduce((result, item) => result[item], data);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\n\nimport { EventBus, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { PIZZAGNA_EVENT_BUS } from \"../../../types\";\nimport { UrlInteractionService } from \"./../../../services/url-interaction.service\";\nimport {\n IInteractionHandlerProperties,\n IInteractionPayload,\n InteractionHandler,\n} from \"./interaction-handler\";\n\nexport interface IUrlInteractionHandlerProperties\n extends IInteractionHandlerProperties {\n url: string;\n newWindow?: boolean;\n}\n\n// Window is an interface, so it fails when used in constructor parameters for AoT\nexport class WindowObject extends Window {}\n\n@Injectable()\nexport class UrlInteractionHandler extends InteractionHandler<\n IUrlInteractionHandlerProperties,\n any\n> {\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Inject(\"windowObject\") private window: WindowObject,\n private logger: LoggerService,\n private urlInteractionService: UrlInteractionService\n ) {\n super(eventBus);\n }\n\n protected handleInteraction(interaction: IInteractionPayload<any>) {\n if (!this.properties?.url) {\n this.logger.warn(\"The target url has not been defined.\");\n return;\n }\n const href = this.urlInteractionService.template(this.properties.url, {\n data: interaction.data,\n });\n\n // if the link evaluates as empty, then don't go anywhere\n if (!href) {\n return;\n }\n\n if (this.properties.newWindow) {\n this.window.open(href);\n } else {\n this.window.location.href = href;\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { IComparatorsDict } from \"../types\";\n\nexport const DEFAULT_COMPARATORS: IComparatorsDict = {\n \">\": {\n comparatorFn: (a: any, b: any) => a > b,\n label: \"Value is greater than\",\n },\n \"<\": {\n comparatorFn: (a: any, b: any) => a < b,\n label: \"Value is less than\",\n },\n \">=\": {\n comparatorFn: (a: any, b: any) => a >= b,\n label: \"Value is greater, or equal to\",\n },\n \"<=\": {\n comparatorFn: (a: any, b: any) => a <= b,\n label: \"Value is less than, or equal to\",\n },\n \"==\": {\n // eslint-disable-next-line eqeqeq\n comparatorFn: (a: any, b: any) => a == b,\n label: \"Value is exactly\",\n },\n};\n\n@Injectable({ providedIn: \"root\" })\nexport class KpiColorComparatorsRegistryService {\n protected comparators: IComparatorsDict;\n\n constructor() {\n this.comparators = { ...DEFAULT_COMPARATORS };\n }\n\n public registerComparators(comparators: IComparatorsDict): void {\n this.comparators = {\n ...this.comparators,\n ...comparators,\n };\n }\n\n public clearComparators(): void {\n this.comparators = {};\n }\n\n public getComparators(): IComparatorsDict {\n return this.comparators;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy, Optional } from \"@angular/core\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IDataSource } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { KpiColorComparatorsRegistryService } from \"../../services/kpi-color-comparators-registry.service\";\nimport { DATA_SOURCE, IComparatorsDict, IConfigurable } from \"../../types\";\nimport { IKpiData } from \"../kpi-widget/types\";\nimport { IDataSourceOutput, IKpiColorRules } from \"./types\";\n\n@Injectable()\nexport class KpiColorPrioritizer implements IConfigurable, OnDestroy {\n protected destroy$ = new Subject<void>();\n protected componentId: string;\n protected propertyPath: string = \"backgroundColor\";\n protected rules: IKpiColorRules[] | undefined;\n protected comparators: IComparatorsDict;\n\n private dsSubscription$: Subscription;\n private latestValueFromDS: any;\n\n constructor(\n @Optional() @Inject(DATA_SOURCE) public dataSource: IDataSource,\n protected pizzagnaService: PizzagnaService,\n comparatorsRegistry: KpiColorComparatorsRegistryService\n ) {\n this.comparators = comparatorsRegistry.getComparators();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public updateConfiguration(properties: any) {\n if (properties?.rules) {\n this.rules = properties?.rules;\n this.subscribeToDataChanges();\n this.checkColorConditions();\n }\n }\n\n public setComponent(component: any, componentId: string) {\n this.subscribeToDataChanges();\n\n this.componentId = componentId;\n }\n\n private subscribeToDataChanges() {\n if (!this.dataSource) {\n return;\n }\n\n this.dsSubscription$?.unsubscribe();\n\n this.dsSubscription$ = this.dataSource.outputsSubject\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IDataSourceOutput<IKpiData>) => {\n this.latestValueFromDS =\n event.result?.value || this.latestValueFromDS;\n this.checkColorConditions();\n });\n }\n\n private checkColorConditions() {\n if (!this.rules) {\n return;\n }\n\n if (this.rules.length === 0) {\n this.setColor(undefined);\n this.dsSubscription$?.unsubscribe();\n return;\n }\n\n let colorToSet: string | undefined;\n // reverse because last rule has top priority\n const newRules = this.rules && [...this.rules].reverse();\n for (const rule of newRules) {\n if (\n this.comparators[rule.comparisonType]?.comparatorFn(\n this.latestValueFromDS,\n rule.value\n )\n ) {\n colorToSet = rule.color;\n break; // exit if the rule matches\n }\n }\n\n this.setColor(colorToSet);\n }\n\n /**\n * Sets the color to pizzagna\n *\n * @param color - Color to set\n */\n private setColor(color: string | undefined) {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n propertyPath: [this.propertyPath],\n },\n color\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IKpiData } from \"../../../../components/kpi-widget/types\";\nimport { IProviderConfiguration } from \"../../../../types\";\nimport { IItemConfiguration } from \"../../types\";\n\nexport interface IKpiItemConfiguration extends IItemConfiguration {\n widgetData: IKpiData;\n thresholds: IKpiThresholdsConfig;\n dataSource: IProviderConfiguration;\n}\n\nexport interface IKpiThresholdsConfig {\n showThresholds: boolean;\n reversedThresholds: boolean;\n warningThresholdValue?: number;\n criticalThresholdValue: number;\n backgroundColor?: string;\n}\n\n/**\n * @deprecated - Please use IKpiData instead - NUI-5853\n */\nexport interface IKpiWidgetIndicatorData extends IKpiData {\n description?: string;\n}\n\n/** @ignore */\nexport enum KpiWidgetThresholdColors {\n Warning = \"var(--nui-color-semantic-warning)\",\n Critical = \"var(--nui-color-semantic-critical)\",\n}\n\nexport enum KpiWidgetFontSizes {\n Small = \"24px\",\n Medium = \"48px\",\n Large = \"72px\",\n ExtraLarge = \"120px\",\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { DecimalPipe } from \"@angular/common\";\nimport { Inject, Optional } from \"@angular/core\";\nimport _isNil from \"lodash/isNil\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport {\n IKpiThresholdsConfig,\n KpiWidgetThresholdColors,\n} from \"../../configurator/components/widgets/kpi/types\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { IKpiData } from \"../kpi-widget/types\";\nimport { DataSourceAdapter } from \"./data-source-adapter\";\n\nexport interface IKpiDataSourceAdapterConfiguration {\n thresholds: IKpiThresholdsConfig;\n}\n\nexport class KpiDataSourceAdapter extends DataSourceAdapter<IKpiData> {\n private thresholds: IKpiThresholdsConfig;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n pizzagnaService: PizzagnaService,\n private numberPipe: DecimalPipe\n ) {\n super(eventBus, dataSource, pizzagnaService);\n }\n\n public updateConfiguration(properties: IKpiDataSourceAdapterConfiguration) {\n this.thresholds = properties.thresholds;\n\n super.updateConfiguration(properties);\n }\n\n protected processOutput(data: IKpiData): IKpiData {\n const processedValue = this.processThresholds(data);\n // processNumberFormat changes data.value to a string which is why this function needs to be run after processThresholds.\n return this.processNumberFormat(processedValue);\n }\n\n public setComponent(component: any, componentId: string) {\n if (componentId) {\n this.componentId = componentId;\n }\n }\n\n private getThresholdColor(\n thresholdsConfig: IKpiThresholdsConfig,\n indicatorData: IKpiData,\n defaultColor: string | undefined\n ) {\n const thresholdChecks = this.getThresholdChecks(\n thresholdsConfig,\n indicatorData,\n thresholdsConfig.reversedThresholds\n );\n if (thresholdChecks.warningCheck) {\n return KpiWidgetThresholdColors.Warning;\n }\n if (thresholdChecks.criticalCheck) {\n return KpiWidgetThresholdColors.Critical;\n }\n return defaultColor;\n }\n\n private getThresholdChecks(\n indicatorConfig: IKpiThresholdsConfig,\n indicatorData: IKpiData,\n isReversed: boolean\n ) {\n const warningThreshold = indicatorConfig.warningThresholdValue;\n const criticalThreshold = indicatorConfig.criticalThresholdValue;\n const reversedWarningCheck =\n !_isNil(warningThreshold) &&\n indicatorData.value <= warningThreshold &&\n indicatorData.value > criticalThreshold;\n const reversedCriticalCheck = indicatorData.value <= criticalThreshold;\n const normalWarningCheck =\n !_isNil(warningThreshold) &&\n indicatorData.value >= warningThreshold &&\n indicatorData.value < criticalThreshold;\n const normalCriticalCheck = indicatorData.value >= criticalThreshold;\n return {\n warningCheck: isReversed\n ? reversedWarningCheck\n : normalWarningCheck,\n criticalCheck: isReversed\n ? reversedCriticalCheck\n : normalCriticalCheck,\n };\n }\n\n private processThresholds(data: IKpiData) {\n if (\n !data ||\n !this.thresholds?.showThresholds ||\n typeof data.value !== \"number\"\n ) {\n return data;\n }\n const thresholdColor = this.getThresholdColor(\n this.thresholds,\n data,\n data.backgroundColor\n );\n return {\n ...data,\n backgroundColor: thresholdColor,\n };\n }\n\n private processNumberFormat(data: IKpiData) {\n if (typeof data?.value !== \"number\" || !data?.numberFormat) {\n return data;\n }\n const numValue = this.numberPipe.transform(\n data.value,\n data.numberFormat\n );\n return {\n ...data,\n value: numValue,\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport isArray from \"lodash/isArray\";\nimport { BehaviorSubject, Subject } from \"rxjs\";\nimport { distinctUntilChanged, filter, takeUntil, tap } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { IPizzagnaProperty } from \"../../pizzagna/functions/get-pizzagna-property-path\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport {\n IConfigurable,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport { IBroker, IBrokerUserConfig, IBrokerValue } from \"./types\";\n\n@Injectable()\nexport class KpiScaleSyncBroker implements IConfigurable {\n protected properties: IProperties;\n protected componentId: string;\n\n private valuesObject: Record<string, Array<Partial<IBrokerValue>>>;\n private brokers: IBroker[] = [];\n private builder = new KpiScaleSyncBrokerBuilder(this.brokers);\n private destroySubscriptions$ = new Subject<void>();\n private tileNodes: string[];\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private pizzagnaService: PizzagnaService\n ) {\n this.valuesObject = this.builder.valuesObject;\n }\n\n public updateConfiguration(properties: IProperties): void {\n this.properties = properties;\n\n if (this.componentId) {\n this.createPropertiesAndSubscribeToBrokers();\n }\n }\n\n public configure() {\n return this.builder;\n }\n\n public getBrokers() {\n return this.brokers;\n }\n\n public subscribeToBrokers() {\n this.destroy();\n\n this.brokers.forEach((broker) => {\n broker.in$\n .pipe(\n filter((_) => !!broker.in$.observers.length),\n distinctUntilChanged(),\n tap((data) => this.configureValueModel(data)),\n tap((data) => this.processAndEmitSyncedValue(data, broker)),\n takeUntil(this.destroySubscriptions$)\n )\n .subscribe();\n });\n }\n\n public setComponent(component: any, componentId: string) {\n this.componentId = componentId;\n this.updateConfiguration(this.properties);\n }\n\n public destroy() {\n this.destroySubscriptions$.next();\n this.destroySubscriptions$.complete();\n }\n\n private processAndEmitSyncedValue(data: IBrokerValue, broker: IBroker) {\n let fn: Function = this.getMin;\n\n if (broker?.type) {\n fn = broker.type === \"min\" ? this.getMin : this.getMax;\n }\n\n const valuesToCompare: (number | undefined)[] = this.valuesObject[\n broker.id\n ]\n .filter((item) => item.targetID && item.targetValue)\n .map((item) => item.targetValue);\n\n broker.out$.next({\n ...data,\n targetValue: fn([...valuesToCompare]),\n });\n }\n\n private configureValueModel(data: IBrokerValue) {\n const targetObj = this.valuesObject[data.id].filter(\n (obj) => obj.targetID === data.targetID\n );\n\n targetObj.length\n ? (targetObj[0].targetValue = data.targetValue)\n : this.valuesObject[data.id].push({\n targetID: data.targetID,\n targetValue: data.targetValue,\n });\n }\n\n private createPropertiesAndSubscribeToBrokers() {\n this.tileNodes = this.pizzagnaService.getComponent(\n this.componentId\n ).properties?.nodes;\n const { scaleSyncConfig } = this.properties;\n\n if (this.tileNodes?.length) {\n this.tileNodes.forEach((node, i) => {\n const property: IPizzagnaProperty = {\n componentId: node,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [`syncValuesBroker`],\n };\n this.pizzagnaService.setProperty(property, this.getBrokers());\n });\n\n if (scaleSyncConfig && isArray(scaleSyncConfig)) {\n scaleSyncConfig.forEach((s: IBrokerUserConfig) =>\n this.configure().addBroker({ id: s.id, type: s?.type })\n );\n this.subscribeToBrokers();\n }\n }\n }\n\n private getMin = (n: number[]) => Math.min(...n);\n private getMax = (n: number[]) => Math.max(...n);\n}\n\nclass KpiScaleSyncBrokerBuilder {\n public readonly valuesObject: Record<string, Array<Partial<IBrokerValue>>> =\n {};\n\n constructor(private brokers: IBroker[]) {}\n\n public addBroker(broker: IBrokerUserConfig) {\n const newBrokerSetting: IBrokerValue = {\n id: broker.id,\n targetID: \"\",\n targetValue: 1,\n };\n this.valuesObject[broker.id] = new Array<Partial<IBrokerValue>>();\n this.brokers.push({\n ...broker,\n ...this.getDefaultBrokerObject(newBrokerSetting, newBrokerSetting),\n });\n return this;\n }\n\n private getDefaultBrokerObject(input: IBrokerValue, output: IBrokerValue) {\n return {\n in$: new BehaviorSubject<IBrokerValue>(input),\n out$: new BehaviorSubject<IBrokerValue>(output),\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { DATA_SOURCE_OUTPUT } from \"../../configurator/types\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { IHasComponent, PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { IDataSourceOutputPayload } from \"./types\";\n\n@Injectable()\nexport class StatusContentFallbackAdapter implements OnDestroy, IHasComponent {\n protected destroy$ = new Subject<void>();\n protected componentId: string;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>,\n protected pizzagnaService: PizzagnaService\n ) {\n this.eventBus\n .getStream(DATA_SOURCE_OUTPUT)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent<any | IDataSourceOutputPayload<any>>) => {\n this.handleDataSourceOutput(event);\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public setComponent(component: any, componentId: string) {\n this.componentId = componentId;\n }\n\n protected handleDataSourceOutput(\n event: IEvent<any | IDataSourceOutputPayload<any>>\n ) {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n propertyPath: [\"fallbackKey\"],\n pizzagnaKey: PizzagnaLayer.Data,\n },\n typeof event.payload?.error?.type !== \"undefined\"\n ? event.payload?.error?.type.toString()\n : undefined\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport isEmpty from \"lodash/isEmpty\";\nimport uniq from \"lodash/uniq\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { DATA_SOURCE_DESTROYED } from \"../../configurator/types\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport {\n HttpStatusCode,\n IConfigurable,\n IHasComponent,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport { StatusContentFallbackAdapter } from \"./status-content-fallback-adapter\";\nimport { IComponentIdPayload, IDataSourceOutputPayload } from \"./types\";\n\nexport interface IKpiFallbackAdapterProperties extends IProperties {\n // Fallback node key to use if multiple tile data sources report different errors\n multipleErrorFallbackKey: string;\n}\n\n@Injectable()\nexport class KpiStatusContentFallbackAdapter\n extends StatusContentFallbackAdapter\n implements OnDestroy, IHasComponent, IConfigurable\n{\n /**\n * Fallback node key to use if multiple tile data sources report different errors\n */\n public multipleErrorFallbackKey: string = HttpStatusCode.Unknown;\n\n /**\n * Map of kpi tile component id's to their corresponding error\n */\n private errorMap: Record<string, string> = {};\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, pizzagnaService);\n\n this.eventBus\n .getStream(DATA_SOURCE_DESTROYED)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent<IComponentIdPayload>) => {\n this.handleDataSourceDestroyed(event);\n });\n }\n\n public updateConfiguration(properties: IKpiFallbackAdapterProperties) {\n if (properties.multipleErrorFallbackKey) {\n this.multipleErrorFallbackKey = properties.multipleErrorFallbackKey;\n }\n }\n\n protected handleDataSourceOutput(\n event: IEvent<any | IDataSourceOutputPayload<any>>\n ) {\n this.errorMap = this.updateErrorMap(event);\n\n this.setFallbackKeyProperty();\n }\n\n protected handleDataSourceDestroyed(event: IEvent<IComponentIdPayload>) {\n if (event.payload?.componentId) {\n delete this.errorMap[event.payload.componentId];\n }\n\n this.setFallbackKeyProperty();\n }\n\n private setFallbackKeyProperty() {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n propertyPath: [\"fallbackKey\"],\n pizzagnaKey: PizzagnaLayer.Data,\n },\n this.getFallbackKey()\n );\n }\n\n private getFallbackKey(): string | undefined {\n if (isEmpty(this.errorMap)) {\n return undefined;\n }\n\n const uniqueErrors = uniq(Object.values(this.errorMap));\n return uniqueErrors.length === 1\n ? uniqueErrors[0]\n : this.multipleErrorFallbackKey;\n }\n\n private updateErrorMap(event: IEvent<any | IDataSourceOutputPayload<any>>) {\n const errorMap = this.errorMap;\n const errorCode =\n typeof event.payload?.error?.type !== \"undefined\"\n ? event.payload?.error?.type.toString()\n : undefined;\n\n // an undefined result indicates the kpi tile was destroyed\n if (!errorCode) {\n delete errorMap[event.payload.componentId];\n } else if (errorCode) {\n errorMap[event.payload.componentId] = errorCode;\n }\n\n return errorMap;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport isEmpty from \"lodash/isEmpty\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { DATA_SOURCE_BUSY } from \"../../services/types\";\nimport { IHasComponent, PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { IDataSourceBusyPayload } from \"./types\";\n\n@Injectable()\nexport class LoadingAdapter implements OnDestroy, IHasComponent {\n private loadingMap: Record<string, boolean> = {};\n private destroy$ = new Subject<void>();\n private componentId: string;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private pizzagnaService: PizzagnaService\n ) {\n this.eventBus\n .getStream(DATA_SOURCE_BUSY)\n .pipe(takeUntil(this.destroy$))\n .subscribe(({ payload }: IEvent<IDataSourceBusyPayload>) => {\n if (payload?.componentId) {\n if (payload?.busy) {\n this.loadingMap[payload.componentId] = true;\n } else {\n delete this.loadingMap[payload.componentId];\n }\n }\n\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n propertyPath: [\"active\"],\n pizzagnaKey: PizzagnaLayer.Data,\n },\n !isEmpty(this.loadingMap)\n );\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public setComponent(component: any, componentId: string): void {\n this.componentId = componentId;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/**\n * Gets parent component id in the pizzagna.\n * Valid ONLY for the component ids which have parent in the their own id!\n *\n * e.g. for \"kpi3/description\" gets \"kpi3\"\n */\nexport function getParentComponentId(path: string): string {\n const parts = path.split(\"/\");\n\n return parts?.length > 1 ? parts[parts.length - 2] : path;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst keyToParseRegex = /\\{.*?\\}/g;\nconst paramsRegex = /\\{|\\}/g;\n\n/**\n * Parses the string with the values in brackets.\n * e.g. \"{componentId}.properties\" => \"chart.properties\", \"chart\" is taken from the \"data\" argument.\n */\nexport function parseStringWithData(path: string, data: any): string {\n const match = path.match(keyToParseRegex);\n\n if (!match) {\n return path;\n }\n\n let updatedPath = path;\n\n for (const input of match) {\n const key = getKeyFromParam(input);\n if (data[key]) {\n updatedPath = updatedPath.replace(input, data[key]);\n } else {\n console.warn(`There's no ${input} key found in the data: ${data}`);\n }\n }\n\n return updatedPath;\n}\n\nconst getKeyFromParam = (entry: string): string =>\n entry.replace(paramsRegex, \"\");\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable, OnDestroy } from \"@angular/core\";\nimport get from \"lodash/get\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { distinctUntilChanged, map } from \"rxjs/operators\";\n\nimport { getParentComponentId } from \"../../functions/get-parent-component-id\";\nimport { parseStringWithData } from \"../../functions/parse-string-with-data\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { IConfigurable, IProperties } from \"../../types\";\nimport { BroadcasterTrackOnType, IBroadcasterConfig } from \"./types\";\n\n@Injectable()\nexport class PizzagnaBroadcasterService implements IConfigurable, OnDestroy {\n private component: any;\n private configs: IBroadcasterConfig[];\n private readonly defaultTrackOn: BroadcasterTrackOnType = \"pizzagna\";\n\n private subscriptions: Subscription[] = [];\n private componentId: string;\n private parentComponentId: string;\n\n constructor(private pizzagnaService: PizzagnaService) {}\n\n public setComponent(component: any, componentId: string) {\n this.component = component;\n this.componentId = componentId;\n this.parentComponentId = getParentComponentId(componentId);\n\n this.initChangeSubscriptions();\n }\n\n public updateConfiguration(properties: IProperties) {\n this.configs = properties?.configs;\n }\n\n private initChangeSubscriptions() {\n for (const config of this.configs) {\n const observable = this.getObservableFor(config);\n\n if (!observable) {\n console.warn(\n \"no observable found on 'PizzagnaBroadcasterService', for part: \",\n config\n );\n return;\n }\n\n const subscription = observable.subscribe((v) => {\n for (const path of config.paths) {\n const validatedPath = parseStringWithData(path, this);\n this.pizzagnaService.setProperty(validatedPath, v);\n }\n });\n this.subscriptions.push(subscription);\n }\n }\n\n private getObservableFor(config: IBroadcasterConfig) {\n const trackOn: BroadcasterTrackOnType =\n config.trackOn || this.defaultTrackOn;\n const observable: Observable<any> =\n trackOn === \"component\"\n ? this.getComponentObservableFor(config)\n : this.getPizzagnaObservableFor(config);\n return observable;\n }\n\n private getPizzagnaObservableFor(part: IBroadcasterConfig) {\n return this.pizzagnaService.pizzaChanged.pipe(\n map((v) => get(v, part.key)),\n distinctUntilChanged()\n );\n }\n\n private getComponentObservableFor(part: IBroadcasterConfig) {\n const obs: Observable<any> = get(this.component, part.key);\n return obs?.pipe(distinctUntilChanged());\n }\n\n public ngOnDestroy() {\n for (const subscription of this.subscriptions) {\n subscription.unsubscribe();\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { BehaviorSubject } from \"rxjs\";\n\nimport { ComparatorTypes, IProperties } from \"../../types\";\nimport { ITimeseriesWidgetSeries } from \"../timeseries-widget/types\";\nimport { IFormatter } from \"../types\";\n\n/** Default refresh interval in seconds */\nexport const DEFAULT_REFRESH_INTERVAL = 300;\n\nexport interface ITimeseriesDataSourceAdapterConfiguration extends IProperties {\n series: ITimeseriesWidgetSeries[];\n}\n\nexport interface IDataSourceOutput<T> {\n result: T;\n error?: IDataSourceError;\n}\n\nexport interface IComponentIdPayload {\n componentId: string;\n}\n\nexport interface IDataSourceOutputPayload<T>\n extends IDataSourceOutput<T>,\n IComponentIdPayload {}\n\nexport interface IDataSourceBusyPayload extends IComponentIdPayload {\n busy: boolean;\n}\n\nexport interface IDataSourceError {\n type: string | number;\n message?: string;\n}\n\nexport type BroadcasterTrackOnType = \"component\" | \"pizzagna\";\n\nexport interface IBroadcasterConfig {\n trackOn?: BroadcasterTrackOnType;\n key: string;\n paths: string[];\n}\n\nexport interface IKpiColorRules {\n comparisonType: ComparatorTypes;\n value: any;\n color: any;\n}\n\nexport interface IDrilldownComponentConfiguration extends IFormatter {\n properties: Record<string, any>;\n itemProperties?: IProperties;\n}\n\nexport interface IDrilldownComponentsConfiguration {\n group: IDrilldownComponentConfiguration;\n leaf: IDrilldownComponentConfiguration;\n}\n\nexport interface IBrokerValue {\n id: string;\n targetID: string;\n targetValue: number;\n}\n\nexport interface IBrokerUserConfig {\n id: string;\n type?: \"min\" | \"max\";\n}\n\nexport interface IBroker extends IBrokerUserConfig {\n in$: BehaviorSubject<IBrokerValue>;\n out$: BehaviorSubject<IBrokerValue>;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { BehaviorSubject } from \"rxjs\";\n\nimport { DEFAULT_REFRESH_INTERVAL } from \"./types\";\n\n/**\n * This provider allows a system wide definition of widget refresh rates.\n */\n@Injectable({\n providedIn: \"root\",\n})\nexport class RefresherSettingsService {\n private _refreshRateSeconds: number = DEFAULT_REFRESH_INTERVAL;\n public refreshRateSeconds$ = new BehaviorSubject(this.refreshRateSeconds);\n\n /**\n * This is a system wide definition of refresh rate. Widgets have to be configured to use\n * the system settings to leverage this value.\n */\n public get refreshRateSeconds() {\n return this._refreshRateSeconds;\n }\n\n public set refreshRateSeconds(value: number) {\n this._refreshRateSeconds = value;\n this.refreshRateSeconds$.next(this._refreshRateSeconds);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, NgZone, OnDestroy } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, EventDefinition } from \"@nova-ui/bits\";\n\nimport { REFRESH } from \"../../services/types\";\nimport { IWidgetEvent } from \"../../services/widget-to-dashboard-event-proxy.service\";\nimport { IConfigurable, IProperties, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { RefresherSettingsService } from \"./refresher-settings.service\";\nimport { DEFAULT_REFRESH_INTERVAL } from \"./types\";\n\nexport interface IRefresherProperties extends IProperties {\n // refresh interval in seconds\n interval?: number;\n enabled?: boolean;\n overrideDefaultSettings?: boolean;\n eventDef?: EventDefinition<any>;\n}\n\n/**\n * This provider emits the REFRESH event every X milliseconds\n */\n@Injectable()\nexport class Refresher implements OnDestroy, IConfigurable {\n private intervalRef?: number;\n\n protected enabled = true;\n protected overrideDefaultSettings = true;\n protected interval = DEFAULT_REFRESH_INTERVAL;\n protected eventDef = REFRESH;\n\n public destroy$ = new Subject<void>();\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IWidgetEvent>,\n protected ngZone: NgZone,\n protected refresherSettings: RefresherSettingsService\n ) {\n this.refresherSettings.refreshRateSeconds$\n .pipe(takeUntil(this.destroy$))\n .subscribe((systemRefreshRate) => {\n if (!this.overrideDefaultSettings) {\n this.initializeInterval();\n }\n });\n }\n\n public updateConfiguration(properties: IRefresherProperties): void {\n this.interval = properties.interval ?? DEFAULT_REFRESH_INTERVAL;\n this.enabled = properties.enabled ?? true;\n this.overrideDefaultSettings =\n properties.overrideDefaultSettings ?? true;\n this.eventDef = properties.event ?? REFRESH;\n\n this.initializeInterval();\n }\n\n public ngOnDestroy(): void {\n this.clearInterval();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private initializeInterval() {\n this.clearInterval();\n\n if (\n typeof this.interval === \"undefined\" ||\n this.getInterval() <= 0 ||\n this.enabled === false\n ) {\n return;\n }\n\n this.ngZone.runOutsideAngular(() => {\n // running timeout outside of angular zone to prevent visual tests from timing out\n this.intervalRef = setInterval(() => {\n this.ngZone.run(() => {\n // callback function should be executed in zone to preserve the angular change detection\n this.performAction();\n });\n }, this.getInterval() * 1000) as any;\n });\n }\n\n protected performAction(): void {\n this.eventBus.getStream(this.eventDef).next(undefined);\n }\n\n private getInterval() {\n return this.overrideDefaultSettings\n ? this.interval\n : this.refresherSettings.refreshRateSeconds;\n }\n\n private clearInterval() {\n if (typeof this.intervalRef !== \"undefined\") {\n clearInterval(this.intervalRef);\n this.intervalRef = undefined;\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Optional } from \"@angular/core\";\nimport { merge, Observable, zip } from \"rxjs\";\nimport {\n debounceTime,\n startWith,\n switchMap,\n takeUntil,\n tap,\n} from \"rxjs/operators\";\n\nimport {\n EventBus,\n IDataSource,\n IEvent,\n IFilteringOutputs,\n VirtualViewportManager,\n} from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { REFRESH, SCROLL_NEXT_PAGE, WIDGET_READY } from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\nimport { DataSourceAdapter } from \"./data-source-adapter\";\n\nexport class TableDataSourceAdapter<\n T extends IFilteringOutputs\n> extends DataSourceAdapter<T> {\n private dataPath: string;\n private dataFieldsPath: string;\n private totalItemsPath: string;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Inject(DATA_SOURCE) dataSource: IDataSource,\n pizzagnaService: PizzagnaService,\n @Optional() protected virtualViewport: VirtualViewportManager\n ) {\n super(eventBus, dataSource, pizzagnaService);\n }\n\n protected setupRefreshListener() {\n // Note: We should wait until TableWidget is ready to be able to proceed with reset event\n // We can also listen after SCROLL_NEXT_PAGE instead of WIDGET_READY because right now\n // they are executed simultaneously but we don't know how things will change in the future\n const refresh$: Observable<void> = zip(\n this.eventBus.getStream(WIDGET_READY),\n this.eventBus.getStream(REFRESH)\n ).pipe(\n // Note: Using startWith() to re-trigger the REFRESH stream that was triggered at least on time before WIDGET_READY\n switchMap(() =>\n this.eventBus.getStream(REFRESH).pipe(startWith(undefined))\n ),\n tap(() => this.virtualViewport.reset({ emitFirstPage: false }))\n );\n\n merge(refresh$, this.eventBus.getStream(SCROLL_NEXT_PAGE))\n .pipe(\n // Note: While SCROLL_NEXT_PAGE is triggered on TableWidget initialization aka WIDGET_READY\n // we might encounter REFRESH and SCROLL_NEXT_PAGE triggered at the same time.\n // Setting a small debounceTime will help us manage simultaneous requests\n debounceTime(10),\n tap(() => this.handleRefresh()),\n takeUntil(this.destroy$)\n )\n .subscribe();\n }\n\n protected updateAdapterProperties(properties: IProperties) {\n this.dataPath = properties.dataPath;\n this.dataFieldsPath = properties.dataFieldsPath;\n this.totalItemsPath = properties.totalItemsPath;\n }\n\n protected updateOutput(output: IFilteringOutputs | undefined) {\n const total = output?.paginator?.total;\n const items = output?.repeat?.itemsSource;\n const dataFields = output?.dataFields;\n\n this.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Data,\n componentId: this.componentId,\n propertyPath: [this.totalItemsPath],\n },\n total\n );\n\n this.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Data,\n componentId: this.componentId,\n propertyPath: [this.dataPath],\n },\n items\n );\n\n this.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Data,\n componentId: this.componentId,\n propertyPath: [this.dataFieldsPath],\n },\n dataFields\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject } from \"@angular/core\";\nimport clone from \"lodash/clone\";\n\nimport {\n EventBus,\n IDataSource,\n IEvent,\n IFilteringOutputs,\n} from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport {\n ITimeseriesWidgetData,\n ITimeseriesWidgetSeries,\n} from \"../timeseries-widget/types\";\nimport { DataSourceAdapter } from \"./data-source-adapter\";\nimport { ITimeseriesDataSourceAdapterConfiguration } from \"./types\";\n\nexport class TimeseriesDataSourceAdapter extends DataSourceAdapter {\n private seriesIndex: ITimeseriesWidgetSeries[] = [];\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Inject(DATA_SOURCE) dataSource: IDataSource,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, dataSource, pizzagnaService);\n }\n\n public updateConfiguration(\n properties: ITimeseriesDataSourceAdapterConfiguration\n ) {\n this.seriesIndex = clone(properties.series);\n\n super.updateConfiguration(properties);\n }\n\n protected processOutput(value: IFilteringOutputs): IFilteringOutputs {\n if (!value) {\n return value;\n }\n return {\n ...value,\n series: this.buildSeriesSet(value?.series),\n };\n }\n\n /**\n * Builds the series set by mapping the series selected in the configurator to the data received from the data source.\n * @param data\n */\n private buildSeriesSet(data: ITimeseriesWidgetData[]) {\n if (!data) {\n return [];\n }\n\n // displaying only series which are in widget config\n return data\n .filter((series: ITimeseriesWidgetData) =>\n this.seriesIndex.find((s) => s.selectedSeriesId === series.id)\n )\n .map((series: ITimeseriesWidgetData) => ({\n id: series.id,\n data: series.data,\n link: series.link,\n secondaryLink: series.secondaryLink,\n legendDescriptionPrimary: this.seriesIndex.find(\n (s) => s.selectedSeriesId === series.id\n )?.label,\n legendDescriptionSecondary: series.description,\n }));\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { IDashwizComponent } from \"./model\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class DashwizService {\n public component: IDashwizComponent | undefined;\n\n constructor() {}\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { BehaviorSubject, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataField, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport { IDataSourceError } from \"../../components/providers/types\";\nimport { PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { DashwizService } from \"../components/wizard/dashwiz/dashwiz.service\";\nimport { DATA_SOURCE_CREATED, DATA_SOURCE_OUTPUT } from \"../types\";\n\n@Injectable()\nexport class ConfiguratorDataSourceManagerService implements OnDestroy {\n private onDestroy$: Subject<void> = new Subject<void>();\n private dataSourceCreated$: Subject<void> = new Subject<void>();\n public dataSource: IDataSource;\n public error$: Subject<IDataSourceError | null> =\n new Subject<IDataSourceError | null>();\n public busy$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(\n false\n );\n public dataSourceFields$: BehaviorSubject<Array<IDataField>> =\n new BehaviorSubject<Array<IDataField>>([]);\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private dashwizService: DashwizService\n ) {\n this.eventBus.subscribeUntil(\n DATA_SOURCE_CREATED,\n this.onDestroy$,\n (event: IEvent<IDataSource>) => {\n if (!event.payload) {\n return;\n }\n this.onDataSourceCreated(event.payload);\n }\n );\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_OUTPUT,\n this.onDestroy$,\n (event: IEvent) => {\n if (event.payload?.error) {\n this.error$.next(event.payload.error);\n } else {\n this.error$.next(null);\n const payload = isUndefined(event.payload.result)\n ? event.payload\n : event.payload.result || {};\n if (payload?.dataFields) {\n this.dataSourceFields$.next(payload.dataFields);\n }\n }\n }\n );\n }\n\n onDataSourceCreated(dataSource: IDataSource): void {\n this.dataSource = dataSource;\n this.dataSourceCreated$.next();\n\n this.dataSource.busy\n ?.pipe(takeUntil(this.dataSourceCreated$))\n .subscribe((isBusy: boolean) => {\n this.dashwizService?.component?.navigationControl.next({\n busyState: {\n busy: isBusy,\n },\n allowStepChange: !isBusy,\n });\n\n this.busy$.next(isBusy);\n });\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { IPizzagnaLayer } from \"../../types\";\n\n@Injectable()\nexport class PreviewService {\n private _preview: IPizzagnaLayer;\n\n public get preview(): IPizzagnaLayer {\n return this._preview;\n }\n\n public set preview(value: IPizzagnaLayer) {\n this._preview = value;\n this.previewChanged.next(value);\n }\n\n public previewChanged = new Subject<IPizzagnaLayer>();\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport {\n ISetPropertyPayload,\n SET_PROPERTY_VALUE,\n} from \"../../../services/types\";\nimport { IPizzagna, IPizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../types\";\nimport { PreviewService } from \"../preview.service\";\nimport { IConfiguratorConverter } from \"./types\";\n\n@Injectable()\nexport abstract class BaseConverter\n implements AfterViewInit, IConfiguratorConverter, OnDestroy\n{\n public component: any;\n public componentId: string;\n\n public destroy$ = new Subject<void>();\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>,\n private previewService: PreviewService,\n protected pizzagnaService: PizzagnaService\n ) {}\n\n ngAfterViewInit(): void {\n this.buildForm();\n\n this.toPreview(this.component.form);\n }\n\n public abstract buildForm(): void;\n\n public abstract toPreview(form: FormGroup): void;\n\n public setComponent(component: any, componentId: string) {\n this.component = component;\n this.componentId = componentId;\n }\n\n public getPreview(): IPizzagnaLayer {\n return this.previewService.preview;\n }\n\n public updatePreview(preview: IPizzagnaLayer) {\n this.previewService.preview = preview;\n }\n\n public updateFormPizzagna(pizzagna: IPizzagna) {\n this.pizzagnaService.updatePizzagna(pizzagna);\n this.eventBus.getStream(SET_PROPERTY_VALUE).next({\n payload: { path: \"\", value: pizzagna } as ISetPropertyPayload,\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport pick from \"lodash/pick\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { PreviewService } from \"../../../preview.service\";\nimport { BaseConverter } from \"../../base-converter\";\nimport { IConverterFormPartsProperties } from \"../../types\";\n\n@Injectable()\nexport class KpiSectionConverterService extends BaseConverter {\n private formParts: IConverterFormPartsProperties[];\n\n private get previewComponentId() {\n return this.componentId.split(\"/\")[0];\n }\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n public updateConfiguration(properties: {\n formParts: IConverterFormPartsProperties[];\n }) {\n if (properties && properties.formParts) {\n this.formParts = properties.formParts;\n }\n }\n\n public buildForm() {\n const preview = this.getPreview();\n\n const updatedPizzagna = this.formParts.reduce((res, v) => {\n const previewPath = `${this.previewComponentId}.${v.previewPath}`;\n // TODO: Define correct index type\n const previewSlice: Record<string, any> = get(preview, previewPath);\n\n if (previewSlice) {\n for (const key of v.keys) {\n if (previewSlice[key] !== undefined) {\n res = immutableSet(\n res,\n `${PizzagnaLayer.Data}.${this.componentId}.properties.${key}`,\n previewSlice[key]\n );\n }\n }\n }\n\n return res;\n }, this.pizzagnaService.pizzagna);\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n public toPreview(form: FormGroup) {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((formData) => {\n const updatedPreview = this.formParts.reduce((p, v) => {\n let outPath = v.previewOutputPath || v.previewPath;\n outPath = `${this.previewComponentId}.${outPath}`;\n\n const preview = get(p, outPath) as any[];\n\n const fromForm = pick(formData, v.keys);\n const merged = { ...preview, ...fromForm };\n\n return immutableSet(p, `${outPath}`, merged);\n }, this.getPreview());\n\n this.updatePreview(updatedPreview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport difference from \"lodash/difference\";\nimport keyBy from \"lodash/keyBy\";\nimport omit from \"lodash/omit\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { immutableSet } from \"@nova-ui/bits\";\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport {\n IComponentConfiguration,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../types\";\nimport { IItemConfiguration } from \"../../../components/types\";\nimport { IKpiItemConfiguration } from \"../../../components/widgets/kpi/types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class KpiTilesConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n private shouldReadForm = false;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n const preview = this.getPreview();\n const tiles: IKpiItemConfiguration[] =\n preview?.tiles?.properties?.nodes?.map(\n (id: string) =>\n ({\n id,\n componentType: preview[id].componentType,\n } as IKpiItemConfiguration)\n ) || [];\n const tileIds = tiles?.map((tile) => tile.id);\n\n this.pizzagnaService.createComponentsFromTemplate(\"tiles\", tileIds);\n let updatedPizzagna = this.pizzagnaService.pizzagna;\n\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n `${PizzagnaLayer.Data}.tiles.properties.tiles`,\n tiles\n );\n\n setTimeout(() => (this.shouldReadForm = true));\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n form.get(\"tiles\")\n ?.valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((kpiTiles) => {\n if (!this.shouldReadForm) {\n return;\n }\n let preview = this.getPreview();\n const tileIds = (kpiTiles || []).map(\n (t: IItemConfiguration) => t.id\n );\n const idDifference: string[] = difference(\n preview?.tiles?.properties?.nodes,\n tileIds\n );\n if (idDifference.length) {\n preview = omit(preview, idDifference);\n }\n const tilesIndex = keyBy(kpiTiles, (t) => t.id); // this helps us to access the actual tile forms\n preview = immutableSet(\n preview,\n \"tiles.properties.nodes\",\n tileIds\n );\n\n for (const tileId of tileIds) {\n const tile = tilesIndex[tileId];\n if (!tile) {\n // tile might not have been created yet\n continue;\n }\n\n if (!preview[tile.id]) {\n const value: IComponentConfiguration =\n this.getTileConfiguration(\n tile.id,\n tile.componentType\n );\n preview = immutableSet(preview, tile.id, value);\n }\n }\n this.updatePreview(preview);\n });\n }\n\n protected getTileConfiguration(\n id: string,\n componentType: string\n ): IComponentConfiguration {\n return {\n id: id,\n // componentType: componentType,\n providers: {\n dataSource: {\n // @ts-ignore: The expected type comes from property 'providerId'\n // which is declared here on type 'IProviderConfiguration'\n providerId: undefined,\n },\n },\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport enum LegendPlacement {\n None = \"None\",\n Right = \"Right\",\n Bottom = \"Bottom\",\n}\n\nexport interface ILegendPlacementOption {\n id: LegendPlacement;\n label: string;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { IProportionalWidgetChartOptions } from \"../../../../components/proportional-widget/types\";\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { LegendPlacement } from \"../../../../widget-types/common/widget/legend\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class ProportionalWidgetChartOptionsConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n private readonly PROPERTIES_PATH = `${PizzagnaLayer.Configuration}.chartOptionsEditor.properties`;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n const chartOptions: IProportionalWidgetChartOptions =\n this.getPreview().chart?.properties?.configuration?.chartOptions;\n let editorPizzagna = this.pizzagnaService.pizzagna;\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${this.PROPERTIES_PATH}.chartType`,\n chartOptions?.type ?? undefined\n );\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${this.PROPERTIES_PATH}.legendPlacement`,\n chartOptions?.legendPlacement ?? LegendPlacement.None\n );\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${this.PROPERTIES_PATH}.legendFormatterComponentType`,\n chartOptions?.legendFormatter?.componentType ?? \"\"\n );\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${this.PROPERTIES_PATH}.contentFormatterComponentType`,\n chartOptions?.contentFormatter?.componentType ??\n \"DonutContentRawFormatterComponent\"\n );\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${this.PROPERTIES_PATH}.contentFormatterProperties`,\n chartOptions?.contentFormatter?.properties ?? \"\"\n );\n\n this.updateFormPizzagna(editorPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((chartOptions) => {\n const preview = immutableSet(\n this.getPreview(),\n \"chart.properties.configuration.chartOptions\",\n chartOptions\n );\n this.updatePreview(preview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport pick from \"lodash/pick\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { PreviewService } from \"../../../preview.service\";\nimport { BaseConverter } from \"../../base-converter\";\nimport { IConverterFormPartsProperties } from \"../../types\";\n\n@Injectable()\nexport class GenericArrayConverterService extends BaseConverter {\n private formParts: IConverterFormPartsProperties[];\n\n private get previewComponentId() {\n return this.componentId.split(\"/\")[0];\n }\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n public updateConfiguration(properties: {\n formParts: IConverterFormPartsProperties[];\n }) {\n if (properties && properties.formParts) {\n this.formParts = properties.formParts;\n }\n }\n\n public buildForm() {\n const preview = this.getPreview();\n\n const updatedPizzagna = this.formParts.reduce((res, v) => {\n const previewSlice = get(preview, v.previewPath) as any[];\n const componentInArray = previewSlice?.find(\n (c) => c.id === this.previewComponentId\n );\n const fromPreview = pick(componentInArray, v.keys);\n\n res = immutableSet(\n res,\n `${PizzagnaLayer.Data}.${this.componentId}.properties`,\n fromPreview\n );\n\n return res;\n }, this.pizzagnaService.pizzagna);\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n public toPreview(form: FormGroup) {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((formData) => {\n const updatedPreview = this.formParts.reduce((p, v) => {\n const outPath = v.previewOutputPath || v.previewPath;\n\n const preview = get(p, outPath) as any[];\n const compIndex = preview.findIndex(\n (c) => c.id === this.previewComponentId\n );\n const fromPreview = preview[compIndex];\n\n const fromForm = pick(formData, v.keys);\n const merged = { ...fromPreview, ...fromForm };\n\n return immutableSet(p, `${outPath}[${compIndex}]`, merged);\n }, this.getPreview());\n\n this.updatePreview(updatedPreview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport pick from \"lodash/pick\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { PreviewService } from \"../../../preview.service\";\nimport { BaseConverter } from \"../../base-converter\";\nimport { IConverterFormPartsProperties } from \"../../types\";\n\n@Injectable()\nexport class GenericConverterService extends BaseConverter {\n private formParts: IConverterFormPartsProperties[];\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n public updateConfiguration(properties: {\n formParts: IConverterFormPartsProperties[];\n }) {\n if (properties && properties.formParts) {\n this.formParts = properties.formParts;\n }\n }\n\n public buildForm() {\n const preview = this.getPreview();\n\n const updatedPizzagna = this.formParts.reduce((res, v) => {\n // TODO: Define correct index type\n const previewSlice: Record<string, any> = get(\n preview,\n v.previewPath\n );\n\n if (previewSlice) {\n for (const key of v.keys) {\n if (previewSlice[key] !== undefined) {\n res = immutableSet(\n res,\n `${PizzagnaLayer.Data}.${this.componentId}.properties.${key}`,\n previewSlice[key]\n );\n }\n }\n }\n\n return res;\n }, this.pizzagnaService.pizzagna);\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n public toPreview(form: FormGroup) {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((formData) => {\n const updatedPreview = this.formParts.reduce((p, v) => {\n const outPath = v.previewOutputPath || v.previewPath;\n const fromPreview = get(p, outPath);\n const fromForm = pick(formData, v.keys);\n const merged = { ...fromPreview, ...fromForm };\n\n return immutableSet(p, outPath, merged);\n }, this.getPreview());\n\n this.updatePreview(updatedPreview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { PreviewService } from \"../../../preview.service\";\nimport { BaseConverter } from \"../../base-converter\";\n\n@Injectable()\nexport class TitleAndDescriptionConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n public static readonly PROPERTIES_PATH = `${PizzagnaLayer.Configuration}.titleAndDescription.properties`;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n let editorPizzagna = this.pizzagnaService.pizzagna;\n const headerProperties = this.getPreview()?.header?.properties;\n\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${TitleAndDescriptionConverterService.PROPERTIES_PATH}.title`,\n headerProperties?.title\n );\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${TitleAndDescriptionConverterService.PROPERTIES_PATH}.subtitle`,\n headerProperties?.subtitle\n );\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${TitleAndDescriptionConverterService.PROPERTIES_PATH}.url`,\n headerProperties?.url\n );\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${TitleAndDescriptionConverterService.PROPERTIES_PATH}.description`,\n headerProperties?.description\n );\n editorPizzagna = immutableSet(\n editorPizzagna,\n `${TitleAndDescriptionConverterService.PROPERTIES_PATH}.collapsible`,\n headerProperties?.collapsible\n );\n\n this.updateFormPizzagna(editorPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n const preview = immutableSet(\n this.getPreview(),\n `header.properties`,\n value\n );\n this.updatePreview(preview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport {\n AbstractControl,\n FormArray,\n FormGroup,\n Validators,\n} from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport isEmpty from \"lodash/isEmpty\";\nimport isEqual from \"lodash/isEqual\";\nimport {\n distinctUntilChanged,\n distinctUntilKeyChanged,\n filter,\n map,\n pluck,\n startWith,\n takeUntil,\n tap,\n} from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { ITableWidgetColumnConfig } from \"../../../../components/table-widget/types\";\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { IItemConfiguration } from \"../../../components/types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class TableColumnsConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n const table = this.getPreview()?.table;\n const dataFields = table?.properties?.dataFields;\n const columns = table?.properties?.configuration?.columns;\n\n let formPizzagna = this.pizzagnaService.pizzagna;\n\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.columns.properties.columns`,\n columns ?? []\n );\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.columns.properties.dataFields`,\n dataFields\n );\n\n this.updateFormPizzagna(formPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n // table configurator v2 doesn't have `columnsOutput`, it just uses `columns` as source of truth\n const formControl = form.contains(\"columnsOutput\")\n ? form.get(\"columnsOutput\")\n : form.get(\"columns\");\n\n if (!formControl) {\n throw new Error(\"FormControl is not defined!\");\n }\n\n formControl.valueChanges\n .pipe(takeUntil(this.destroy$), distinctUntilChanged(isEqual))\n .subscribe((columns: ITableWidgetColumnConfig[]) => {\n const columnsPath = \"table.properties.configuration.columns\";\n\n // need to wait till forms are initialized in case of creating new column\n setTimeout(() => {\n const preview = this.getPreview();\n this.updatePreview(\n immutableSet(preview, columnsPath, columns)\n );\n });\n\n let formPizzagna = this.pizzagnaService.pizzagna;\n\n // using setTimeout here updates the \"filters\" component properly - without it it doesn't update the dropdown with sortable columns\n setTimeout(() => {\n // hackfix for NUI-5712\n // this assigment resolves a race condition that sometimes occured when data fields received from the data source would be\n // overwritten by an \"older\" formPizzagna value assigned above\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Structure}.columns.properties.template`,\n this.pizzagnaService.pizzagna[PizzagnaLayer.Structure]\n .columns.properties?.template\n );\n\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.filters.properties.columns`,\n columns\n );\n // this triggers change detection on the \"filters\" component\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Structure}.presentation.properties.nodes`,\n [\n ...(formPizzagna?.structure?.presentation\n ?.properties?.nodes ?? []),\n ]\n );\n\n this.updateFormPizzagna(formPizzagna);\n });\n });\n\n this.subscribeToColumnsValueChange();\n }\n\n private subscribeToColumnsValueChange() {\n this.component.form\n .get(\"columnsOutput\")\n ?.valueChanges.pipe(\n // trigger subscription after tableColumnsFormArray is filled with values\n startWith(this.component.form.get(\"columnsOutput\").value),\n filter((columns: IItemConfiguration[]) => columns.length > 0),\n tap(() => this.handleWidthValidation()),\n map((columns: ITableWidgetColumnConfig[]) =>\n this.filterColumnsWithoutSpecifiedWidth(columns)\n ),\n map((activeColumnsWithoutWidth: ITableWidgetColumnConfig[]) =>\n this.handleColumnsWithoutSpecifiedWidth(\n activeColumnsWithoutWidth\n )\n ),\n distinctUntilKeyChanged(\"id\"),\n pluck(\"id\"),\n takeUntil(this.destroy$)\n )\n .subscribe((columnId: string) => this.setWidthMessages(columnId));\n }\n\n /**\n * Filters columns which are active (visible) and don't have specified width\n * @param columns\n */\n private filterColumnsWithoutSpecifiedWidth(\n columns: ITableWidgetColumnConfig[]\n ) {\n return columns.filter((column) => column.isActive && !column.width);\n }\n\n /**\n * Receives columns which are active and don't have specified width and returns:\n * - if all columns have specified width, reset width of the last column and return its id\n * - if there are only one column, set this columns id as last without specified width\n * - if there are more than one column that don't have specified width, do nothing\n * @param activeColumnsWithoutWidth\n */\n private handleColumnsWithoutSpecifiedWidth(\n activeColumnsWithoutWidth: Array<ITableWidgetColumnConfig>\n ) {\n switch (activeColumnsWithoutWidth.length) {\n // if all columns have specified width, reset last columns value so that other columns can resize\n case 0: {\n const activeColumns = (\n this.component.form.get(\"columns\") as FormArray\n ).controls.filter((control) =>\n get(\n control,\n `value.properties[${control.value.id}/description].isActive`\n )\n );\n if (isEmpty(activeColumns)) {\n return {\n id: undefined,\n label: undefined,\n };\n }\n const lastActiveColumn =\n activeColumns[activeColumns.length - 1];\n console.warn(\n `Cannot set width for all columns. Resetting \"${lastActiveColumn.value.label}\" width.`\n );\n lastActiveColumn.patchValue(\n { width: null },\n { emitEvent: false }\n );\n return lastActiveColumn.value;\n }\n case 1:\n return activeColumnsWithoutWidth[0];\n default:\n return {\n id: undefined,\n label: undefined,\n };\n }\n }\n\n private handleWidthValidation() {\n (this.component.form.get(\"columns\") as FormArray).controls.forEach(\n (formGroup: AbstractControl) => {\n const descriptionFormPath = `properties.${formGroup.value.id}/description`;\n const descriptionForm = formGroup.get(descriptionFormPath);\n\n if (!descriptionForm) {\n return;\n }\n const isActive = descriptionForm.get(\"isActive\")?.value;\n const widthFormField = descriptionForm.get(\"width\");\n if (isActive) {\n widthFormField?.setValidators([Validators.min(62)]);\n widthFormField?.markAllAsTouched();\n widthFormField?.updateValueAndValidity({\n emitEvent: false,\n });\n } else {\n widthFormField?.clearValidators();\n widthFormField?.updateValueAndValidity({\n emitEvent: false,\n });\n }\n }\n );\n }\n\n private setWidthMessages(columnId: string) {\n if (!this.pizzagnaService.pizzagna) {\n return;\n }\n\n const widthMessageInput = \"isWidthMessageDisplayed\";\n const { pizzagna } = this.pizzagnaService;\n const columns = pizzagna.data.columns.properties?.columns;\n columns.forEach((col: ITableWidgetColumnConfig) =>\n this.pizzagnaService.setProperty(\n `${PizzagnaLayer.Data}.${col.id}/description.properties.${widthMessageInput}`,\n false\n )\n );\n\n if (!columnId) {\n return;\n }\n this.pizzagnaService.setProperty(\n `${PizzagnaLayer.Data}.${columnId}/description.properties.${widthMessageInput}`,\n true\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class TableFiltersConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n let formPizzagna = this.pizzagnaService.pizzagna;\n\n const table = this.getPreview()?.table;\n const columns = table?.properties?.configuration?.columns;\n const sorterConfiguration =\n table?.properties?.configuration?.sorterConfiguration;\n\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.filters.properties.columns`,\n columns\n );\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.filters.properties.sorterConfiguration`,\n sorterConfiguration\n );\n\n this.updateFormPizzagna(formPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((filters) => {\n let preview = this.getPreview();\n preview = immutableSet(\n preview,\n \"table.properties.configuration.sorterConfiguration\",\n filters.sorterConfiguration\n );\n this.updatePreview(preview);\n // we need to update form with columns that are available\n this.buildForm();\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EventBus,\n IEvent,\n immutableSet,\n TimeframeService,\n} from \"@nova-ui/bits\";\n\nimport { ITimeseriesWidgetConfig } from \"../../../../components/timeseries-widget/types\";\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class TimeseriesMetadataConverterService\n extends BaseConverter\n implements AfterViewInit\n{\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService,\n private timeframeService: TimeframeService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public buildForm(): void {\n let formPizzagna = this.pizzagnaService.pizzagna;\n const preview = this.getPreview();\n const timeSpans = Object.keys(this.timeframeService.currentPresets).map(\n (k) => ({\n id: k,\n name: this.timeframeService.currentPresets[k].name,\n })\n );\n\n const propertyPrefix = `${PizzagnaLayer.Data}.timeseriesMetadata.properties`;\n formPizzagna = immutableSet(\n formPizzagna,\n `${propertyPrefix}.timeSpans`,\n timeSpans\n );\n\n const selectedPresetId = get(\n preview,\n `timeframeSelection.properties.timeframe.selectedPresetId`,\n \"last7Days\"\n ) as unknown as string;\n const selectedTimeSpan = timeSpans.find(\n (timeSpan) => timeSpan.id === selectedPresetId\n );\n if (selectedTimeSpan) {\n formPizzagna = immutableSet(\n formPizzagna,\n `${propertyPrefix}.startingTimespan`,\n selectedTimeSpan\n );\n }\n\n const configuration = get(\n preview,\n `chart.properties.configuration`\n ) as unknown as ITimeseriesWidgetConfig;\n if (configuration) {\n formPizzagna = immutableSet(\n formPizzagna,\n `${propertyPrefix}.legendPlacement`,\n configuration.legendPlacement\n );\n formPizzagna = immutableSet(\n formPizzagna,\n `${propertyPrefix}.leftAxisLabel`,\n configuration.leftAxisLabel\n );\n formPizzagna = immutableSet(\n formPizzagna,\n `${propertyPrefix}.preset`,\n configuration.preset\n );\n }\n\n this.updateFormPizzagna(formPizzagna);\n }\n\n public toPreview(form: FormGroup): void {\n form.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n let preview = this.getPreview();\n\n const presetId = get(value, \"startingTimespan.id\");\n if (presetId) {\n preview = immutableSet(\n preview,\n \"timeframeSelection.properties.timeframe.selectedPresetId\",\n presetId\n );\n }\n\n const chartConfig = `chart.properties.configuration`;\n preview = immutableSet(\n preview,\n `${chartConfig}.legendPlacement`,\n get(value, \"legendPlacement\", \"\")\n );\n preview = immutableSet(\n preview,\n `${chartConfig}.leftAxisLabel`,\n get(value, \"leftAxisLabel\", \"\")\n );\n preview = immutableSet(\n preview,\n `${chartConfig}.preset`,\n get(value, \"preset\", \"\")\n );\n\n this.updatePreview(preview);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AfterViewInit, Inject, Injectable, OnDestroy } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport isEmpty from \"lodash/isEmpty\";\nimport isEqual from \"lodash/isEqual\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { combineLatest, Subject } from \"rxjs\";\nimport { distinctUntilChanged, map, takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { IDataSourceOutput } from \"../../../../components/providers/types\";\nimport {\n ITimeseriesWidgetData,\n ITimeseriesWidgetSeries,\n} from \"../../../../components/timeseries-widget/types\";\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport {\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n WellKnownProviders,\n} from \"../../../../types\";\nimport { IItemConfiguration } from \"../../../components/types\";\nimport { ITimeseriesItemConfiguration } from \"../../../components/widgets/timeseries/types\";\nimport { DATA_SOURCE_CHANGE, DATA_SOURCE_OUTPUT } from \"../../../types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class TimeseriesSeriesConverterService\n extends BaseConverter\n implements AfterViewInit, OnDestroy\n{\n private indicatorDataKey = \"indicatorData\";\n private previewSeriesPath = `providers.${WellKnownProviders.Adapter}.properties.series`;\n private formSeriesComponentPath = `${PizzagnaLayer.Data}.series.properties`;\n\n private dataSourceSeries$ = new Subject<ITimeseriesWidgetData[]>();\n private selectedSeriesIds$ = new Subject<string[]>();\n private shouldReadForm = false;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n\n this.subscribeToAvailableDataFieldsChange();\n\n this.eventBus.subscribeUntil(DATA_SOURCE_CHANGE, this.destroy$, (v) => {\n const nodesPath = `${PizzagnaLayer.Structure}.series.properties.nodes`;\n const nodes = get(\n this.pizzagnaService.pizzagna,\n nodesPath\n ) as unknown as string[];\n this.pizzagnaService.removeComponents(nodes);\n\n let updatedPizzagna = this.pizzagnaService.pizzagna;\n updatedPizzagna = immutableSet(updatedPizzagna, nodesPath, []);\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n `${this.formSeriesComponentPath}.series`,\n []\n );\n this.updateFormPizzagna(updatedPizzagna);\n });\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_OUTPUT,\n this.destroy$,\n (event: IEvent<any | IDataSourceOutput<any>>) => {\n // Because typing is lenient for the data source output, the event may or may not contain an IDataSourceOutput\n // with a result property; the payload may actually be the result itself, so both possibilities are accommodated.\n const { series } = isUndefined(event.payload.result)\n ? event.payload\n : event.payload.result || {};\n\n if (series) {\n this.dataSourceSeries$.next(series);\n\n let updatedPizzagna = this.pizzagnaService.pizzagna;\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n `${this.formSeriesComponentPath}.allSeries`,\n series\n );\n\n const seriesTemplate =\n this.pizzagnaService.pizzagna[PizzagnaLayer.Structure][\n this.component.componentId\n ].properties?.template;\n const indicatorDataIndex = seriesTemplate.findIndex(\n (val: IItemConfiguration) =>\n val.id === this.indicatorDataKey\n );\n const indicatorDataPath = `${PizzagnaLayer.Structure}.series.properties.template[${indicatorDataIndex}].properties.allSeries`;\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n indicatorDataPath,\n series\n );\n\n const previewSeries = get(\n this.getPreview(),\n `chart.${this.previewSeriesPath}`,\n []\n ) as ITimeseriesWidgetSeries[];\n updatedPizzagna = previewSeries.reduce(\n (res, s) =>\n immutableSet(\n res,\n `${PizzagnaLayer.Data}.${s.id}/${this.indicatorDataKey}.properties.allSeries`,\n series\n ),\n updatedPizzagna\n );\n\n this.updateFormPizzagna(updatedPizzagna);\n\n // updating preview series if no series set in editor. this occurs when changing DS, for example.\n // in DS is changing all the series are removed and then all series from DS should be set.\n // that's why updating preview series.\n const editorSeriesPath = `${this.formSeriesComponentPath}.series`;\n const editorSeries = get(\n this.pizzagnaService.pizzagna,\n editorSeriesPath\n );\n if (isEmpty(editorSeries)) {\n this.shouldReadForm = false;\n\n const seriesForPreview: ITimeseriesWidgetSeries[] =\n series.map((s: ITimeseriesWidgetData) => ({\n id: s.id,\n selectedSeriesId: s.id,\n label: s.name,\n }));\n const updatedPreview = immutableSet(\n this.getPreview(),\n `chart.${this.previewSeriesPath}`,\n seriesForPreview\n );\n this.updatePreview(updatedPreview);\n\n this.buildForm();\n\n setTimeout(() => {\n this.updateAvailableSeries([]);\n this.shouldReadForm = true;\n });\n }\n }\n }\n );\n }\n\n public buildForm(): void {\n const preview = this.getPreview();\n const series = get(\n preview,\n `chart.${this.previewSeriesPath}`,\n []\n ) as ITimeseriesWidgetSeries[];\n const seriesToSet = series.map(\n (s) =>\n ({\n id: s.id,\n selectedSeriesId: s.selectedSeriesId,\n } as ITimeseriesItemConfiguration)\n );\n const seriesIds = series.map((s) => s.id);\n\n this.pizzagnaService.createComponentsFromTemplate(\"series\", seriesIds);\n const editorPizzagna = this.pizzagnaService.pizzagna;\n const pizzagnaWithSeries = immutableSet(\n editorPizzagna,\n `${this.formSeriesComponentPath}.series`,\n seriesToSet\n );\n\n this.updateFormPizzagna(pizzagnaWithSeries);\n this.selectedSeriesIds$.next(\n seriesToSet.map((s) => s.selectedSeriesId)\n );\n setTimeout(() => (this.shouldReadForm = true));\n }\n\n public toPreview(form: FormGroup): void {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((formSeries) => {\n if (!this.shouldReadForm) {\n return;\n }\n const preview = this.getPreview();\n const { chart } = preview;\n const seriesFromPreview = get(\n chart,\n this.previewSeriesPath,\n []\n ) as ITimeseriesWidgetSeries[];\n\n const series: ITimeseriesWidgetSeries[] = formSeries.map(\n (s: ITimeseriesWidgetSeries) => ({\n id: s.id,\n selectedSeriesId: s.selectedSeriesId,\n ...seriesFromPreview.find(\n (previewSeries) => previewSeries.id === s.id\n ),\n })\n );\n\n const updatedPreview = immutableSet(\n preview,\n `chart.${this.previewSeriesPath}`,\n series\n );\n this.updatePreview(updatedPreview);\n\n const selectedSeriesIds = formSeries\n .map((s: ITimeseriesWidgetSeries) =>\n get(s, `properties[${s.id}/indicatorData].id`)\n )\n .filter((v: any) => !isEmpty(v)) as string[];\n this.selectedSeriesIds$.next(selectedSeriesIds);\n });\n }\n\n public ngOnDestroy(): void {\n this.dataSourceSeries$.complete();\n this.selectedSeriesIds$.complete();\n super.ngOnDestroy();\n }\n\n private updateAvailableSeries(availableSeries: ITimeseriesWidgetData[]) {\n if (!this.pizzagnaService.pizzagna) {\n return;\n }\n\n let updatedPizzagna = this.pizzagnaService.pizzagna;\n\n // configuration component\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n `${this.formSeriesComponentPath}.availableSeries`,\n availableSeries\n );\n\n // template\n const seriesTemplate =\n this.pizzagnaService.pizzagna[PizzagnaLayer.Structure][\n this.component.componentId\n ].properties?.template;\n const indicatorDataIndex = seriesTemplate.findIndex(\n (val: ITimeseriesWidgetSeries) => val.id === this.indicatorDataKey\n );\n const indicatorDataPath = `${PizzagnaLayer.Structure}.series.properties.template[${indicatorDataIndex}].properties.availableSeries`;\n updatedPizzagna = immutableSet(\n updatedPizzagna,\n indicatorDataPath,\n availableSeries\n );\n\n // already created forms\n const seriesIds = get(\n this.pizzagnaService.pizzagna,\n `${PizzagnaLayer.Structure}.series.properties.nodes`\n ) as unknown as string[];\n updatedPizzagna = seriesIds.reduce(\n (res, id) =>\n immutableSet(\n res,\n `${PizzagnaLayer.Data}.${id}/${this.indicatorDataKey}.properties.availableSeries`,\n availableSeries\n ),\n updatedPizzagna\n );\n\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n private subscribeToAvailableDataFieldsChange() {\n combineLatest([this.dataSourceSeries$, this.selectedSeriesIds$])\n .pipe(\n takeUntil(this.destroy$),\n map(([dsSeries, usedSeriesIds]) =>\n dsSeries.filter(\n (ds) => !usedSeriesIds.find((id) => id === ds.id)\n )\n ),\n distinctUntilChanged(isEqual)\n )\n .subscribe(this.updateAvailableSeries.bind(this));\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, immutableSet } from \"@nova-ui/bits\";\n\nimport { ITimeseriesWidgetSeries } from \"../../../../components/timeseries-widget/types\";\nimport { PizzagnaService } from \"../../../../pizzagna/services/pizzagna.service\";\nimport {\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n WellKnownProviders,\n} from \"../../../../types\";\nimport { PreviewService } from \"../../preview.service\";\nimport { BaseConverter } from \"../base-converter\";\n\n@Injectable()\nexport class TimeseriesTileIndicatorDataConverterService extends BaseConverter {\n private previewSeriesPath = `chart.providers.${WellKnownProviders.Adapter}.properties.series`;\n\n private get previewComponentId() {\n return this.componentId.split(\"/\")[0];\n }\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n previewService: PreviewService,\n pizzagnaService: PizzagnaService\n ) {\n super(eventBus, previewService, pizzagnaService);\n }\n\n public buildForm() {\n const series = get(\n this.getPreview(),\n this.previewSeriesPath,\n []\n ) as ITimeseriesWidgetSeries[];\n const currentSeries = series.find(\n (s) => s.id === this.previewComponentId\n );\n const selectedSeriesId =\n currentSeries && currentSeries.selectedSeriesId;\n\n const updatedPizzagna = immutableSet(\n this.pizzagnaService.pizzagna,\n `${PizzagnaLayer.Data}.${this.componentId}.properties`,\n { selectedSeriesId }\n );\n this.updateFormPizzagna(updatedPizzagna);\n }\n\n public toPreview(form: FormGroup) {\n form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((formData) => {\n const selectedSeriesId = formData.id;\n const preview = this.getPreview();\n\n const seriesFromPreview = get(\n preview,\n this.previewSeriesPath,\n []\n ) as ITimeseriesWidgetSeries[];\n const currentSeriesIndex = seriesFromPreview.findIndex(\n (s) => s.id === this.previewComponentId\n );\n\n if (currentSeriesIndex > -1) {\n const newSeries = [...seriesFromPreview];\n newSeries[currentSeriesIndex] = {\n ...newSeries[currentSeriesIndex],\n selectedSeriesId,\n };\n\n const updatedPreview = immutableSet(\n preview,\n `${this.previewSeriesPath}`,\n newSeries\n );\n this.updatePreview(updatedPreview);\n }\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { InjectionToken } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\n\nimport { IPizzagna } from \"../../../types\";\n\nexport const CONFIGURATOR_CONVERTER =\n new InjectionToken<IConfiguratorConverter>(\"CONFIGURATOR_CONVERTER\");\n\nexport interface IConfiguratorForm {\n pizzagna: IPizzagna;\n formGroup: FormGroup;\n previousValue: any;\n}\n\nexport interface IConfiguratorConverter {\n buildForm(): any;\n\n toPreview(form: FormGroup): any;\n}\n\nexport interface IConverterFormPartsProperties {\n previewPath: string;\n keys: string[];\n /** In case you need to put data in different place use this property */\n previewOutputPath?: string;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { IEventDefinition } from \"@nova-ui/bits\";\n@Injectable({\n providedIn: \"root\",\n})\nexport class EventRegistryService {\n private events: Record<string, IEventDefinition> = {};\n\n public registerEvent(eventDefinition: IEventDefinition) {\n this.events[eventDefinition.id] = eventDefinition;\n }\n\n public getEvent(id: string) {\n const event = this.events[id];\n\n if (!event) {\n throw new Error(\n \"Event with id '\" +\n id +\n \"' is not registered. Registered events are: \" +\n JSON.stringify(Object.keys(this.events))\n );\n }\n\n return event;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Directive, OnDestroy } from \"@angular/core\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { LoggerService, uuid } from \"@nova-ui/bits\";\n\nimport { IRegistryAddOptions } from \"./types\";\n\ntype IRegistryMap<T> = Record<string, T>;\n\n@Directive()\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport abstract class RegistryService<T = Object> implements OnDestroy {\n protected state$: BehaviorSubject<IRegistryMap<T>> = new BehaviorSubject<\n IRegistryMap<T>\n >({});\n\n public stateChanged$: Observable<T[]> = this.state$\n .asObservable()\n .pipe(map(() => this.getItems()));\n\n private _stateVersion: string;\n /* Helper method for non-reactive usages */\n public get stateVersion(): string {\n return this._stateVersion;\n }\n\n private _isEmpty: boolean = true;\n public get isEmpty(): boolean {\n return this._isEmpty;\n }\n\n protected constructor(\n private logger: LoggerService,\n private className?: string\n ) {}\n\n public addItems(\n items: T[],\n options: IRegistryAddOptions = { overrideExisting: true }\n ): void {\n const storageValue: IRegistryMap<T> = this.state$.value;\n\n items.forEach((item: T) => {\n if (\n storageValue[this.getItemKey(item)] &&\n !options.overrideExisting\n ) {\n this.logger.warn(`Logger - ${\n this.className\n }: item with ${this.getItemKey(item)}\n is already registered. Skipping.`);\n\n return;\n }\n\n storageValue[this.getItemKey(item)] = { ...item };\n });\n\n this.state$.next(storageValue);\n\n if (items.length > 0) {\n this.updateStateFlags(false);\n }\n }\n\n public getItem(id: string): T | undefined {\n return this.state$.value[id];\n }\n\n public getItems(): T[] {\n return Object.values(this.state$.value);\n }\n\n public reset(): void {\n this.state$.next({});\n this.updateStateFlags(true);\n }\n\n public ngOnDestroy(): void {\n this.state$.complete();\n }\n\n protected abstract getItemKey(item: T): string;\n\n private updateStateFlags(isEmpty: boolean): void {\n this._isEmpty = isEmpty;\n this._stateVersion = uuid();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport {\n IFormatterDefinition,\n ITableFormatterDefinition,\n} from \"../components/types\";\nimport { RegistryService } from \"./registry-service\";\nimport { IAddFormattersOptions } from \"./types\";\n\nexport abstract class FormatterRegistryService<\n TFormatter extends IFormatterDefinition = IFormatterDefinition\n> extends RegistryService<TFormatter> {\n /** @deprecated use 'stateChanged$' instead - NUI-5852 */\n public formattersStateChanged$: Observable<TFormatter[]> =\n this.stateChanged$;\n\n /** @deprecated use 'addItems' instead - NUI-5852 */\n public addFormatters(\n formatters: TFormatter[],\n options: IAddFormattersOptions = { overrideExisting: true }\n ): void {\n super.addItems(formatters, options);\n }\n\n /** @deprecated use 'getItems' instead - NUI-5852 */\n public getFormatters(): TFormatter[] {\n return super.getItems();\n }\n\n protected getItemKey(item: TFormatter): string {\n return item.componentType;\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class TableFormatterRegistryService extends FormatterRegistryService<ITableFormatterDefinition> {\n constructor(logger: LoggerService) {\n super(logger, \"TableFormatterRegistryService\");\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class KpiFormattersRegistryService extends FormatterRegistryService<IFormatterDefinition> {\n constructor(logger: LoggerService) {\n super(logger, \"KpiFormattersRegistryService\");\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class ProportionalDonutContentFormattersRegistryService extends FormatterRegistryService<IFormatterDefinition> {\n constructor(logger: LoggerService) {\n super(logger, \"ProportionalDonutContentFormattersRegistryService\");\n }\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class ProportionalLegendFormattersRegistryService extends FormatterRegistryService<IFormatterDefinition> {\n constructor(logger: LoggerService) {\n super(logger, \"ProportionalLegendFormattersRegistryService\");\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Inject, Injectable, OnDestroy, Optional } from \"@angular/core\";\nimport keyBy from \"lodash/keyBy\";\nimport uniq from \"lodash/uniq\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, IEventDefinition } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../pizzagna/services/pizzagna.service\";\nimport {\n DASHBOARD_EVENT_BUS,\n IConfigurable,\n IProperties,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../types\";\nimport { EventRegistryService } from \"./event-registry.service\";\nimport { WidgetConfigurationService } from \"./widget-configuration.service\";\n\nexport interface IWidgetEvent extends IEvent {\n widgetId?: string;\n}\n\n/**\n * Configuration of WidgetToDashboardEventProxy\n */\nexport interface IWidgetToDashboardEventProxyConfiguration extends IProperties {\n /**\n * List of events that are transmitted from widget to dashboard\n */\n upstreams?: string[];\n /**\n * List of events that are transmitted from dashboard to widget\n */\n downstreams?: string[];\n}\n\n/**\n * This provider transmits events between the dashboard event bus and the widget event bus.\n * It needs to be configured with the events that need transmission each way.\n */\n@Injectable()\nexport class WidgetToDashboardEventProxyService\n implements IConfigurable, OnDestroy\n{\n private upstreamSubscriptions: Record<string, Subscription> = {};\n private downstreamSubscriptions: Record<string, Subscription> = {};\n private destroy$ = new Subject<void>();\n private component: { componentId: string };\n\n private upstreams?: string[];\n private downstreams?: string[];\n public providerKey: string;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private pizzagnaBus: EventBus<IEvent>,\n @Optional()\n @Inject(DASHBOARD_EVENT_BUS)\n private dashboardBus: EventBus<IEvent>,\n @Optional()\n private widgetConfigurationService: WidgetConfigurationService,\n private eventRegistry: EventRegistryService,\n private pizzagnaService: PizzagnaService\n ) {}\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public setComponent(component: any) {\n this.component = component;\n }\n\n public updateConfiguration(\n properties: IWidgetToDashboardEventProxyConfiguration\n ): void {\n this.providerKey = properties.providerKey;\n this.upstreams = properties.upstreams;\n this.downstreams = properties.downstreams;\n\n if (this.upstreams) {\n // upstream = widget -> dashboard\n this.registerUpstreamSubscriptions(...this.upstreams);\n }\n if (this.downstreams) {\n // downstream = dashboard -> widget\n this.registerDownstreamSubscriptions(...this.downstreams);\n }\n }\n\n public addUpstream(stream: IEventDefinition) {\n this.addStream(stream, \"upstreams\");\n }\n\n public addDownstream(stream: IEventDefinition) {\n this.addStream(stream, \"downstreams\");\n }\n\n private addStream(\n stream: IEventDefinition,\n streamKey: \"upstreams\" | \"downstreams\"\n ) {\n const streams = uniq((this[streamKey] || []).concat(stream.id));\n this[streamKey] = streams;\n\n if (!this.component) {\n return;\n }\n\n this.pizzagnaService.setProperty(\n {\n componentId: this.component.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n providerKey: this.providerKey,\n propertyPath: [streamKey],\n },\n streams\n );\n }\n\n private registerUpstreamSubscriptions(...upstreams: string[]) {\n if (!this.dashboardBus) {\n return;\n }\n\n this.registerSubscriptions(\n upstreams,\n this.upstreamSubscriptions,\n this.pizzagnaBus,\n (stream: IEventDefinition, event: IEvent) => {\n // add widgetId to all events passed to the dashboard\n const widgetId = this.widgetConfigurationService.getWidget().id;\n\n this.dashboardBus\n .getStream(stream)\n .next(<any>Object.assign({}, event, { widgetId }));\n }\n );\n }\n\n private registerDownstreamSubscriptions(...downstreams: string[]) {\n if (!this.dashboardBus) {\n return;\n }\n\n this.registerSubscriptions(\n downstreams,\n this.downstreamSubscriptions,\n this.dashboardBus,\n (stream: IEventDefinition, event: IWidgetEvent) => {\n // pass only events that have matching widgetId or a widgetId that is not defined\n const widgetId = this.widgetConfigurationService.getWidget().id;\n if (\n typeof event.widgetId === \"undefined\" ||\n widgetId === event.widgetId\n ) {\n this.pizzagnaBus.getStream(stream).next(event);\n }\n }\n );\n }\n\n private registerSubscriptions(\n streams: string[] = [],\n subscriptions: Record<string, Subscription>,\n sourceBus: EventBus<IEvent>,\n handleEvent: (stream: IEventDefinition, event: IEvent) => void\n ) {\n const streamsIndex: Record<string, string> | null = streams\n ? keyBy(streams, (x) => x)\n : null;\n\n // remove subscriptions that are not valid anymore\n for (const streamId of Object.keys(subscriptions)) {\n if (!streamsIndex || !streamsIndex[streamId]) {\n subscriptions[streamId].unsubscribe();\n delete subscriptions[streamId];\n }\n }\n\n // add subscriptions that were not registered before\n for (const streamId of Object.keys(streamsIndex ?? {}).filter(\n (s) => !subscriptions[s]\n )) {\n const eventDefinition = this.eventRegistry.getEvent(streamId);\n subscriptions[streamId] = sourceBus\n .getStream(eventDefinition)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent) => {\n handleEvent(eventDefinition, event);\n });\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { DecimalPipe } from \"@angular/common\";\nimport {\n Injectable,\n Injector,\n NgZone,\n Optional,\n StaticProvider,\n} from \"@angular/core\";\n\nimport {\n LoggerService,\n TimeframeService,\n VirtualViewportManager,\n} from \"@nova-ui/bits\";\n\nimport { DataSourceAdapter } from \"../components/providers/data-source-adapter\";\nimport { DrilldownDataSourceAdapter } from \"../components/providers/drilldown-data-source-adapter\";\nimport { EventBusDebugger } from \"../components/providers/event-bus-debugger\";\nimport { UrlInteractionHandler } from \"../components/providers/interaction/url-interaction-handler\";\nimport { KpiColorPrioritizer } from \"../components/providers/kpi-color-prioritizer\";\nimport { KpiDataSourceAdapter } from \"../components/providers/kpi-data-source-adapter\";\nimport { KpiScaleSyncBroker } from \"../components/providers/kpi-scale-sync-broker\";\nimport { KpiStatusContentFallbackAdapter } from \"../components/providers/kpi-status-content-fallback-adapter\";\nimport { LoadingAdapter } from \"../components/providers/loading-adapter\";\nimport { PizzagnaBroadcasterService } from \"../components/providers/pizzagna-broadcaster.service\";\nimport { Refresher } from \"../components/providers/refresher\";\nimport { RefresherSettingsService } from \"../components/providers/refresher-settings.service\";\nimport { StatusContentFallbackAdapter } from \"../components/providers/status-content-fallback-adapter\";\nimport { TableDataSourceAdapter } from \"../components/providers/table-data-source-adapter\";\nimport { TimeseriesDataSourceAdapter } from \"../components/providers/timeseries-data-source-adapter\";\nimport { DashwizService } from \"../configurator/components/wizard/dashwiz/dashwiz.service\";\nimport { ConfiguratorDataSourceManagerService } from \"../configurator/services/configurator-data-source-manager.service\";\nimport { KpiSectionConverterService } from \"../configurator/services/converters/kpi/kpi-section-converter/kpi-section-converter.service\";\nimport { KpiTilesConverterService } from \"../configurator/services/converters/kpi/kpi-tiles-converter.service\";\n// eslint-disable-next-line max-len\nimport { ProportionalWidgetChartOptionsConverterService } from \"../configurator/services/converters/proportional/proportional-widget-chart-options-converter.service\";\nimport { GenericArrayConverterService } from \"../configurator/services/converters/shared/generic-array-converter/generic-array-converter.service\";\nimport { GenericConverterService } from \"../configurator/services/converters/shared/generic-converter/generic-converter.service\";\n// eslint-disable-next-line max-len\nimport { TitleAndDescriptionConverterService } from \"../configurator/services/converters/shared/title-and-description-converter/title-and-description-converter.service\";\nimport { TableColumnsConverterService } from \"../configurator/services/converters/table/table-columns-converter.service\";\nimport { TableFiltersConverterService } from \"../configurator/services/converters/table/table-filters-converter.service\";\nimport { TimeseriesMetadataConverterService } from \"../configurator/services/converters/timeseries/timeseries-metadata-converter.service\";\nimport { TimeseriesSeriesConverterService } from \"../configurator/services/converters/timeseries/timeseries-series-converter.service\";\nimport { TimeseriesTileIndicatorDataConverterService } from \"../configurator/services/converters/timeseries/timeseries-tile-indicator-data-converter.service\";\nimport { CONFIGURATOR_CONVERTER } from \"../configurator/services/converters/types\";\nimport { PreviewService } from \"../configurator/services/preview.service\";\nimport { PizzagnaService } from \"../pizzagna/services/pizzagna.service\";\nimport {\n DASHBOARD_EVENT_BUS,\n DATA_SOURCE,\n FORMATTERS_REGISTRY,\n PIZZAGNA_EVENT_BUS,\n} from \"../types\";\nimport { EventRegistryService } from \"./event-registry.service\";\nimport { KpiColorComparatorsRegistryService } from \"./kpi-color-comparators-registry.service\";\nimport {\n KpiFormattersRegistryService,\n ProportionalDonutContentFormattersRegistryService,\n TableFormatterRegistryService,\n} from \"./table-formatter-registry.service\";\nimport {\n IStaticProviders,\n NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER,\n NOVA_DASHBOARD_EVENT_PROXY,\n NOVA_DATASOURCE_ADAPTER,\n NOVA_DATASOURCE_INTERVAL_REFRESHER,\n NOVA_DRILLDOWN_DATASOURCE_ADAPTER,\n NOVA_EVENT_BUS_DEBUGGER,\n NOVA_GENERIC_ARRAY_CONVERTER,\n NOVA_GENERIC_CONVERTER,\n NOVA_KPI_COLOR_PRIORITIZER,\n NOVA_KPI_DATASOURCE_ADAPTER,\n NOVA_KPI_FORMATTERS_REGISTRY,\n NOVA_KPI_SCALE_SYNC_BROKER,\n NOVA_KPI_SECTION_CONVERTER,\n NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER,\n NOVA_KPI_TILES_CONVERTER,\n NOVA_LOADING_ADAPTER,\n NOVA_PIZZAGNA_BROADCASTER,\n NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY,\n NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER,\n NOVA_STATUS_CONTENT_FALLBACK_ADAPTER,\n NOVA_TABLE_COLUMNS_CONVERTER,\n NOVA_TABLE_DATASOURCE_ADAPTER,\n NOVA_TABLE_FILTERS_CONVERTER,\n NOVA_TABLE_FORMATTERS_REGISTRY,\n NOVA_TIMESERIES_DATASOURCE_ADAPTER,\n NOVA_TIMESERIES_METADATA_CONVERTER,\n NOVA_TIMESERIES_SERIES_CONVERTER,\n NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n NOVA_URL_INTERACTION_HANDLER,\n NOVA_VIRTUAL_VIEWPORT_MANAGER,\n} from \"./types\";\nimport { UrlInteractionService } from \"./url-interaction.service\";\nimport { WidgetConfigurationService } from \"./widget-configuration.service\";\nimport { WidgetToDashboardEventProxyService } from \"./widget-to-dashboard-event-proxy.service\";\n\n@Injectable({ providedIn: \"root\" })\nexport class ProviderRegistryService {\n public staticProviders: IStaticProviders = {};\n\n constructor(private logger: LoggerService) {\n this.setProviders({\n [NOVA_DATASOURCE_INTERVAL_REFRESHER]: {\n provide: Refresher,\n deps: [PIZZAGNA_EVENT_BUS, NgZone, RefresherSettingsService],\n },\n [NOVA_DASHBOARD_EVENT_PROXY]: {\n provide: WidgetToDashboardEventProxyService,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DASHBOARD_EVENT_BUS],\n [new Optional(), WidgetConfigurationService],\n EventRegistryService,\n PizzagnaService,\n ],\n },\n [NOVA_DATASOURCE_ADAPTER]: {\n provide: DataSourceAdapter,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n ],\n },\n [NOVA_TABLE_DATASOURCE_ADAPTER]: {\n provide: TableDataSourceAdapter,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n VirtualViewportManager,\n ],\n },\n [NOVA_TIMESERIES_DATASOURCE_ADAPTER]: {\n provide: TimeseriesDataSourceAdapter,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n ],\n },\n [NOVA_KPI_DATASOURCE_ADAPTER]: {\n provide: KpiDataSourceAdapter,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n DecimalPipe,\n ],\n },\n [NOVA_DRILLDOWN_DATASOURCE_ADAPTER]: {\n provide: DrilldownDataSourceAdapter,\n deps: [\n PIZZAGNA_EVENT_BUS,\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n ],\n },\n [NOVA_KPI_COLOR_PRIORITIZER]: {\n provide: KpiColorPrioritizer,\n deps: [\n [new Optional(), DATA_SOURCE],\n PizzagnaService,\n KpiColorComparatorsRegistryService,\n ],\n },\n [NOVA_TITLE_AND_DESCRIPTION_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TitleAndDescriptionConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: ProportionalWidgetChartOptionsConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_KPI_TILES_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: KpiTilesConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_KPI_SECTION_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: KpiSectionConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_GENERIC_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: GenericConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_GENERIC_ARRAY_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: GenericArrayConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TimeseriesTileIndicatorDataConverterService,\n deps: [\n PIZZAGNA_EVENT_BUS,\n PreviewService,\n PizzagnaService,\n TimeframeService,\n ],\n },\n [NOVA_TIMESERIES_METADATA_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TimeseriesMetadataConverterService,\n deps: [\n PIZZAGNA_EVENT_BUS,\n PreviewService,\n PizzagnaService,\n TimeframeService,\n ],\n },\n [NOVA_TIMESERIES_SERIES_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TimeseriesSeriesConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_TABLE_COLUMNS_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TableColumnsConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_TABLE_FILTERS_CONVERTER]: {\n provide: CONFIGURATOR_CONVERTER,\n useClass: TableFiltersConverterService,\n deps: [PIZZAGNA_EVENT_BUS, PreviewService, PizzagnaService],\n },\n [NOVA_LOADING_ADAPTER]: {\n provide: LoadingAdapter,\n deps: [PIZZAGNA_EVENT_BUS, PizzagnaService],\n },\n [NOVA_STATUS_CONTENT_FALLBACK_ADAPTER]: {\n provide: StatusContentFallbackAdapter,\n deps: [PIZZAGNA_EVENT_BUS, PizzagnaService],\n },\n [NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER]: {\n provide: KpiStatusContentFallbackAdapter,\n deps: [PIZZAGNA_EVENT_BUS, PizzagnaService],\n },\n [NOVA_KPI_SCALE_SYNC_BROKER]: {\n provide: KpiScaleSyncBroker,\n deps: [PIZZAGNA_EVENT_BUS, PizzagnaService],\n },\n [NOVA_URL_INTERACTION_HANDLER]: {\n provide: UrlInteractionHandler,\n deps: [\n PIZZAGNA_EVENT_BUS,\n \"windowObject\",\n LoggerService,\n UrlInteractionService,\n ],\n },\n [NOVA_EVENT_BUS_DEBUGGER]: {\n provide: EventBusDebugger,\n deps: [PIZZAGNA_EVENT_BUS],\n },\n [NOVA_VIRTUAL_VIEWPORT_MANAGER]: {\n provide: VirtualViewportManager,\n deps: [],\n },\n [NOVA_PIZZAGNA_BROADCASTER]: {\n provide: PizzagnaBroadcasterService,\n deps: [PizzagnaService],\n },\n [NOVA_TABLE_FORMATTERS_REGISTRY]: {\n provide: FORMATTERS_REGISTRY,\n useExisting: TableFormatterRegistryService,\n deps: [PizzagnaService],\n },\n [NOVA_KPI_FORMATTERS_REGISTRY]: {\n provide: FORMATTERS_REGISTRY,\n useExisting: KpiFormattersRegistryService,\n deps: [PizzagnaService],\n },\n [NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY]: {\n provide: FORMATTERS_REGISTRY,\n useExisting: ProportionalDonutContentFormattersRegistryService,\n deps: [PizzagnaService],\n },\n [NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER]: {\n provide: ConfiguratorDataSourceManagerService,\n deps: [PIZZAGNA_EVENT_BUS, [new Optional(), DashwizService]],\n },\n });\n }\n\n public setProviders(providers: IStaticProviders): void {\n this.staticProviders = Object.assign(\n {},\n this.staticProviders,\n providers\n );\n }\n\n public getProvider(providerId: string): StaticProvider {\n const provider = this.staticProviders[providerId];\n if (!provider) {\n this.logger.warn(\"No provider registered for id\", providerId);\n this.logger.warn(\n \"Known providers:\",\n Object.keys(this.staticProviders).join(\", \")\n );\n }\n return provider;\n }\n\n public getProviderInstance(\n provider: StaticProvider,\n parentInjector: Injector\n ): any {\n const injector = Injector.create({\n providers: [provider],\n parent: parentInjector,\n });\n return injector.get(DATA_SOURCE);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Portal } from \"@angular/cdk/portal\";\nimport {\n AfterViewInit,\n ComponentRef,\n Directive,\n EventEmitter,\n Injector,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n SimpleChange,\n SimpleChanges,\n StaticProvider,\n} from \"@angular/core\";\nimport isArray from \"lodash/isArray\";\nimport values from \"lodash/values\";\nimport xor from \"lodash/xor\";\nimport { ReplaySubject, Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { ProviderRegistryService } from \"../../../services/provider-registry.service\";\nimport { IConfigurable, IProviderConfiguration } from \"../../../types\";\nimport { ComponentPortalService } from \"../../services/component-portal.service\";\n\n@Directive({\n selector: \"[nuiComponentPortal]\",\n exportAs: \"nuiComponentPortal\",\n})\nexport class ComponentPortalDirective\n implements OnInit, AfterViewInit, OnDestroy, OnChanges\n{\n @Input() public componentId: string;\n @Input() public componentType: string | Function;\n @Input() public properties: Record<string, any>;\n @Input() public providers: Record<string, IProviderConfiguration>;\n @Input() public outputs: string[];\n\n @Output() public output = new EventEmitter<IEvent>();\n\n public portal: Portal<any>;\n private component: any;\n private propertiesChanges = new ReplaySubject<SimpleChange>();\n private providerInstances: Record<string, any> = {};\n private destroy$ = new Subject<void>();\n private changesSubscription?: Subscription;\n\n constructor(\n private injector: Injector,\n private logger: LoggerService,\n private portalService: ComponentPortalService,\n private renderer: Renderer2,\n private providerRegistry: ProviderRegistryService\n ) {}\n\n public ngOnInit(): void {\n this.logger.debug(\"Portal created:\", this.componentId);\n this.recreatePortal();\n }\n\n public ngAfterViewInit(): void {\n Object.keys(this.providerInstances).forEach((key) => {\n const provider = this.providerInstances[key];\n if (provider.ngAfterViewInit) {\n provider.ngAfterViewInit();\n }\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n let recreated = false;\n const providersChange = changes.providers;\n\n if (providersChange && !providersChange.isFirstChange()) {\n if (this.checkForProviderChanges(providersChange)) {\n this.logger.debug(\n \"Portal recreated (provider change):\",\n this.componentId\n );\n this.recreatePortal();\n recreated = true; // we want to prevent multiple recreations within one ngOnChanges cycle\n } else {\n this.updateProviderConfigurations(providersChange);\n }\n }\n\n if (\n changes.componentType &&\n !changes.componentType.isFirstChange() &&\n !recreated\n ) {\n this.logger.debug(\n \"Portal recreated (component change):\",\n this.componentId\n );\n this.recreatePortal();\n }\n\n if (changes.properties) {\n this.propertiesChanges.next(changes.properties);\n }\n }\n\n public ngOnDestroy(): void {\n this.logger.debug(\"Portal destroyed:\", this.componentId);\n\n this.destroyProviders();\n\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public attached(componentRef: ComponentRef<any>) {\n this.component = componentRef.instance;\n\n // ctrl+shift+click on a pizzagna to get a dump of its properties\n // this will propagate through the parent components, so it should dump the parent pizzagnas as well\n this.renderer.listen(\n componentRef.location.nativeElement,\n \"click\",\n (event: MouseEvent) => {\n // event.metaKey is a CMD key for Mac\n if (\n (event.ctrlKey || event.metaKey) &&\n event.shiftKey &&\n event.button === 0\n ) {\n console.log(\n \"==================== PIZZAGNA DUMP =========================\"\n );\n console.log(\"componentId:\", this.componentId);\n console.log(\"component:\", this.component);\n console.log(\"componentType:\", this.componentType);\n console.log(\"properties:\", this.properties);\n console.log(\"providers:\", this.providers);\n console.log(\"providerInstances:\", this.providerInstances);\n console.log(\n \"============================================================\"\n );\n }\n }\n );\n\n for (const key of Object.keys(this.providerInstances)) {\n const provider = this.providerInstances[key];\n if (provider.setComponent) {\n // setting componentId separately because \"componentId\" is used as another input,\n // at the moment of setting the component here, 'this.component' doesn't have 'componentId' property,\n // because 'changesSubscription' has not received any changes. it leads to the issue\n // when providers do not know the ID until component property changed\n provider.setComponent(this.component, this.componentId);\n }\n if (provider.setProviders) {\n provider.setProviders(this.providerInstances, this.componentId);\n }\n }\n\n this.subscribeToOutputs();\n\n this.changesSubscription = this.propertiesChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((change) => this.applyPropertiesChange(change));\n }\n\n private recreatePortal() {\n if (this.changesSubscription) {\n this.changesSubscription.unsubscribe();\n this.changesSubscription = undefined;\n this.propertiesChanges = new ReplaySubject<SimpleChange>();\n }\n\n let injector = this.injector;\n\n this.destroyProviders();\n\n if (this.providers) {\n injector = this.updateProviders(injector);\n }\n\n this.portal = this.portalService.createComponentPortal(\n this.componentType,\n injector\n );\n\n // apply initial property values to the freshly (re)created component\n if (this.properties) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n for (const key of Object.keys(this.properties)) {\n this.propertiesChanges.next(\n new SimpleChange(undefined, this.properties, true)\n );\n }\n }\n }\n\n private updateProviders(injector: Injector) {\n const providerKeys = Object.keys(this.providers);\n const registeredProviders = providerKeys.reduce((acc, next) => {\n // for cases when providerId is just empty string, null or undefined (for example adding a tile doesn't provide a DS to it)\n if (this.providers[next].providerId) {\n acc[next] = this.providerRegistry.getProvider(\n this.providers[next].providerId\n );\n }\n return acc;\n }, {} as Record<string, StaticProvider>);\n\n const portalInjector = this.portalService.createInjector({\n injector: injector,\n providers: values(registeredProviders),\n });\n\n this.providerInstances = providerKeys.reduce((acc, next) => {\n const registeredProvider = registeredProviders[next] as any;\n const providerConfig = this.providers[next];\n if (registeredProvider) {\n // TODO: Why do we pass null to the injectFlags parameter?\n const injections = portalInjector.get(\n registeredProvider.provide,\n null,\n // @ts-ignore\n null\n );\n const providerInstance = isArray(injections)\n ? (injections as any).find(\n (v: any) => v instanceof registeredProvider.useClass\n )\n : injections;\n\n if (!providerInstance) {\n throw new Error(\"Provider '\" + next + \"' does not exist.\");\n }\n if (\n providerInstance.updateConfiguration &&\n providerConfig.properties\n ) {\n providerInstance.updateConfiguration({\n providerKey: next,\n ...(providerConfig.properties || {}),\n });\n }\n providerInstance.providerKey = next;\n\n acc[next] = providerInstance;\n } else if (providerConfig.providerId) {\n this.logger.error(\n \"There's no registered provider for id\",\n next\n );\n }\n return acc;\n }, this.providerInstances);\n\n for (const key of Object.keys(this.providerInstances)) {\n const pi = this.providerInstances[key];\n if (pi.ngOnInit) {\n pi.ngOnInit();\n }\n }\n\n return portalInjector;\n }\n\n private updateProviderConfigurations(providersChange: SimpleChange) {\n for (const providerKey of Object.keys(this.providers)) {\n // for cases when providerId is just empty string, null or undefined (for example adding a tile doesn't provide a DS to it)\n if (!this.providers[providerKey].providerId) {\n return;\n }\n const providerInstance = this.providerInstances[providerKey];\n if (!providerInstance) {\n throw new Error(\n \"Provider '\" + providerKey + \"' does not exist.\"\n );\n }\n\n const previousValue = providersChange.previousValue[providerKey];\n const currentValue = providersChange.currentValue[providerKey];\n\n const previousProperties =\n previousValue && previousValue.properties;\n const currentProperties = currentValue && currentValue.properties;\n\n if (\n previousProperties !== currentProperties &&\n providerInstance.updateConfiguration\n ) {\n (providerInstance as IConfigurable).updateConfiguration({\n providerKey,\n ...currentProperties,\n });\n }\n }\n }\n\n private subscribeToOutputs() {\n if (!this.outputs) {\n return;\n }\n\n for (const output of this.outputs.filter(\n (o) => this.component[o] instanceof EventEmitter\n )) {\n this.component[output]\n .pipe(takeUntil(this.destroy$))\n .subscribe(($event: any) => {\n this.output.emit({\n id: output,\n payload: $event,\n });\n });\n }\n }\n\n private checkForProviderChanges(change: SimpleChange): boolean {\n const previousKeys = change.previousValue\n ? Object.keys(change.previousValue)\n : [];\n const currentKeys = change.currentValue\n ? Object.keys(change.currentValue)\n : [];\n if (\n previousKeys.length !== currentKeys.length ||\n xor(previousKeys, currentKeys).length > 0\n ) {\n return true;\n }\n\n const previousIds = Object.keys(change.previousValue).map(\n (key: string) => change.previousValue[key].providerId\n );\n const currentIds = Object.keys(change.currentValue).map(\n (key: string) => change.currentValue[key].providerId\n );\n if (xor(previousIds, currentIds).length > 0) {\n return true;\n }\n\n return false;\n }\n\n private destroyProviders() {\n if (this.providerInstances) {\n for (const piKey of Object.keys(this.providerInstances)) {\n const providerInstance = this.providerInstances[piKey];\n if (providerInstance.ngOnDestroy) {\n providerInstance.ngOnDestroy();\n }\n delete this.providerInstances[piKey];\n }\n }\n }\n\n /**\n * There was a change in component properties, so we need to handle that here\n *\n * @param change a change of the `properties` input\n */\n private applyPropertiesChange(change: SimpleChange) {\n let properties = change.currentValue;\n if (!properties) {\n return;\n }\n\n // we add componentId to the mix, so components will be able to use it\n properties = {\n ...properties,\n componentId: this.componentId,\n };\n\n const changes: SimpleChanges = {};\n let changeHappened = false;\n for (const key of Object.keys(properties)) {\n const previousValue = this.component[key];\n\n // reference based change detection in action here!\n if (properties[key] !== previousValue) {\n changeHappened = true;\n this.component[key] = properties[key];\n // we're simulating angular by calling ngOnChanges manually\n if (this.component.ngOnChanges) {\n changes[key] = new SimpleChange(\n previousValue,\n properties[key],\n change.isFirstChange()\n );\n }\n }\n }\n\n if (changeHappened) {\n if (this.component.ngOnChanges) {\n this.component.ngOnChanges(changes);\n }\n const changeDetector = this.component.changeDetector;\n if (changeDetector) {\n changeDetector.markForCheck();\n } else {\n this.logger.warn(\n `Property 'changeDetector' is missing on component '${this.componentType}',` +\n ` so dynamic refresh of given component might not work.`\n );\n }\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\n\nimport { EventBus, IEvent, immutableSet, LoggerService } from \"@nova-ui/bits\";\n\nimport { mergeChanges } from \"../../../functions/merge-changes\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n ISetPropertyPayload,\n SET_PROPERTY_VALUE,\n} from \"../../../services/types\";\nimport {\n IComponentConfiguration,\n IPizza,\n IPizzagna,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../types\";\nimport { DynamicComponentCreator } from \"../../services/dynamic-component-creator.service\";\nimport { PizzagnaService } from \"../../services/pizzagna.service\";\n\n@Component({\n selector: \"nui-pizzagna\",\n templateUrl: \"./pizzagna.component.html\",\n providers: [\n PizzagnaService,\n DynamicComponentCreator,\n {\n provide: PIZZAGNA_EVENT_BUS,\n useClass: EventBus,\n },\n ],\n})\nexport class PizzagnaComponent implements OnChanges {\n @Input() rootNode = DEFAULT_PIZZAGNA_ROOT;\n\n @Input()\n get pizzagna(): IPizzagna {\n return this._pizzagnaBuffer || this._pizzagna;\n }\n\n set pizzagna(value: IPizzagna) {\n this._pizzagna = value;\n this._pizzagnaBuffer = null;\n }\n\n private _pizzagna: IPizzagna;\n private _pizzagnaBuffer: IPizzagna | null;\n\n @Input() outputs: string[];\n\n @Output() pizzagnaChange = new EventEmitter<IPizzagna>();\n @Output() output = new EventEmitter<IEvent>();\n\n public pizza: Record<string, IComponentConfiguration>;\n\n constructor(\n public pizzagnaService: PizzagnaService,\n public logger: LoggerService,\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>\n ) {\n eventBus\n .getStream(SET_PROPERTY_VALUE)\n .subscribe((event: IEvent<ISetPropertyPayload>) => {\n // TODO: Ensure that payload is defined\n const p = immutableSet(\n this.pizzagna,\n // @ts-ignore: Object is possibly 'undefined'.\n event.payload.path,\n // @ts-ignore: Object is possibly 'undefined'.\n event.payload.value\n );\n\n this._pizzagnaBuffer = p;\n this.pizzagnaChange.emit(p);\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.pizzagna) {\n const previousPizzagna = changes.pizzagna\n .previousValue as IPizzagna;\n\n this.pizzagnaService.updatePizzagna(this.pizzagna);\n\n this.pizza = this.mergePizzagnaIntoPizza(\n this.pizza,\n previousPizzagna,\n this.pizzagna\n );\n if (this.pizza && !this.pizza[this.rootNode]) {\n this.logger.warn(\n \"Pizzagna doesn't contain root node '\" +\n this.rootNode +\n \"'. Pizzagna = \",\n this.pizzagna\n );\n }\n this.pizzagnaService.updateComponents(this.pizza);\n }\n }\n\n public onOutput(event: IEvent) {\n this.output.emit(event);\n }\n\n /**\n * This takes all the pizzagna layers and merges them into one component pizza\n *\n * @param pizza\n * @param previousPizzagna\n * @param currentPizzagna\n */\n private mergePizzagnaIntoPizza(\n pizza: IPizza,\n previousPizzagna: IPizzagna,\n currentPizzagna: IPizzagna\n ) {\n return mergeChanges(\n pizza,\n // These are merged in reverse priority order so that values in higher priority layers\n // override the corresponding values in lower priority layers\n this.getLayerChanges(\n previousPizzagna,\n currentPizzagna,\n PizzagnaLayer.Structure\n ),\n this.getLayerChanges(\n previousPizzagna,\n currentPizzagna,\n PizzagnaLayer.Configuration\n ),\n this.getLayerChanges(\n previousPizzagna,\n currentPizzagna,\n PizzagnaLayer.Data\n )\n ) as Record<string, IComponentConfiguration>;\n }\n\n private getLayerChanges(\n previous: IPizzagna,\n current: IPizzagna,\n overlayKey: string\n ) {\n return {\n previousValue: this.getLayerSafe(previous, overlayKey),\n currentValue: this.getLayerSafe(current, overlayKey),\n };\n }\n\n private getLayerSafe(pizzagna: IPizzagna, overlayKey: string) {\n return pizzagna && pizzagna[overlayKey];\n }\n}\n","<ng-container *ngIf=\"pizza && pizza[rootNode]\">\n <ng-container\n 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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\n\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WidgetConfigurationService } from \"../../services/widget-configuration.service\";\nimport { WidgetTypesService } from \"../../services/widget-types.service\";\nimport { IPizzagna } from \"../../types\";\nimport { IWidget } from \"./types\";\n\n@Component({\n selector: \"nui-widget\",\n templateUrl: \"./widget.component.html\",\n styleUrls: [\"./widget.component.less\"],\n providers: [WidgetConfigurationService],\n host: { class: \"nui-widget\" },\n})\nexport class WidgetComponent implements OnChanges {\n @Input() widget: IWidget;\n @Output() widgetChange = new EventEmitter<IWidget>();\n\n public rootNode = DEFAULT_PIZZAGNA_ROOT;\n\n constructor(\n private widgetConfigurationService: WidgetConfigurationService,\n private widgetTypesService: WidgetTypesService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.widget) {\n const type = this.widget.type;\n const previousType =\n changes.widget.previousValue &&\n changes.widget.previousValue.type;\n if (previousType !== type) {\n const widgetType = this.widgetTypesService.getWidgetType(\n type,\n this.widget.version\n );\n this.rootNode =\n widgetType?.paths?.widget?.root || DEFAULT_PIZZAGNA_ROOT;\n }\n this.widgetConfigurationService.updateWidget(this.widget);\n }\n }\n\n public onPizzagnaChange(pizzagna: IPizzagna) {\n this.widgetChange.emit({\n ...this.widget,\n pizzagna: pizzagna,\n });\n }\n}\n","<nui-pizzagna\n [rootNode]=\"rootNode\"\n [pizzagna]=\"widget.pizzagna\"\n (pizzagnaChange)=\"onPizzagnaChange($event)\"\n></nui-pizzagna>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n} from \"@angular/animations\";\nimport { ChangeDetectorRef, Component, Input } from \"@angular/core\";\n\nimport { IHasChangeDetector } from \"../../types\";\n\n@Component({\n selector: \"nui-loading\",\n templateUrl: \"./loading.component.html\",\n styleUrls: [\"./loading.component.less\"],\n animations: [\n trigger(\"animate\", [\n state(\"true\", style({ opacity: 1 })),\n state(\"false\", style({ opacity: 0 })),\n transition(\"false <=> true\", animate(500)),\n ]),\n ],\n})\nexport class LoadingComponent implements IHasChangeDetector {\n static lateLoadKey = \"LoadingComponent\";\n\n @Input() public active = false;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n}\n","<nui-progress\n [@animate]=\"active\"\n (@animate.start)=\"$event.element.style.display = 'block'\"\n (@animate.done)=\"\n $event.element.style.display = $event.toState ? 'block' : 'none'\n \"\n [show]=\"true\"\n compactMode=\"true\"\n>\n</nui-progress>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Directive,\n Host,\n Input,\n OnChanges,\n Self,\n SimpleChanges,\n} from \"@angular/core\";\nimport { GridsterItemComponent } from \"angular-gridster2\";\n\n/**\n * This directive assigns a \"widgetId\" property to host gridster item. We need it there because moving and resizing the widget with gridster only contains\n * gridster position data and gridster component payload, so we need to identify which widget that event belongs to.\n */\n@Directive({\n selector: \"[nuiGridsterItemWidgetId]\",\n})\nexport class GridsterItemWidgetIdDirective implements OnChanges {\n @Input() nuiGridsterItemWidgetId: string;\n\n constructor(@Host() @Self() private gridsterItem: GridsterItemComponent) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.nuiGridsterItemWidgetId) {\n (this.gridsterItem as any).widgetId = this.nuiGridsterItemWidgetId;\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { KeyValue } from \"@angular/common\";\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport {\n GridsterComponent,\n GridsterConfig,\n GridsterItem,\n GridsterItemComponent,\n GridsterItemComponentInterface,\n} from \"angular-gridster2\";\nimport _defaultsDeep from \"lodash/defaultsDeep\";\n\nimport { EventBus, immutableSet } from \"@nova-ui/bits\";\n\nimport {\n DASHBOARD_EDIT_MODE,\n WIDGET_POSITION_CHANGE,\n WIDGET_RESIZE,\n} from \"../../services/types\";\nimport { IWidgetEvent } from \"../../services/widget-to-dashboard-event-proxy.service\";\nimport { DASHBOARD_EVENT_BUS } from \"../../types\";\nimport { IWidget } from \"../widget/types\";\nimport { DEFAULT_GRIDSTER_CONFIG } from \"./default-gridster-config\";\nimport { IDashboard, IDashboardBelowFoldLazyLoadingConfig } from \"./types\";\n\n@Component({\n selector: \"nui-dashboard\",\n templateUrl: \"./dashboard.component.html\",\n styleUrls: [\"./dashboard.component.less\"],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: DASHBOARD_EVENT_BUS,\n useClass: EventBus,\n },\n ],\n})\nexport class DashboardComponent implements OnChanges, AfterViewInit {\n @Input() gridsterConfig: GridsterConfig;\n\n @Input()\n get dashboard(): IDashboard {\n return this.dashboardBuffer || this._dashboard;\n }\n\n set dashboard(value: IDashboard) {\n this._dashboard = value;\n this.dashboardBuffer = null;\n }\n\n private _dashboard: IDashboard;\n // we use this buffer to store temporary values when cumulative changes are necessary before two-way binding kicks in\n public dashboardBuffer: IDashboard | null;\n\n @Input() editMode = false;\n @Input()\n public belowFoldLazyLoadingConfig: IDashboardBelowFoldLazyLoadingConfig;\n\n @Output() gridsterConfigChange = new EventEmitter<GridsterConfig>();\n @Output() dashboardChange = new EventEmitter<IDashboard>();\n\n @HostBinding(\"class.nui-dashboard\")\n get hostClass() {\n return true;\n }\n\n @ViewChild(GridsterComponent)\n public gridster: GridsterComponent;\n\n @ViewChildren(GridsterItemComponent)\n public gridsterItems: QueryList<GridsterItemComponent>;\n\n public gridsterItemsVisibilityMap: Record<string, boolean> = {};\n\n constructor(\n @Inject(DASHBOARD_EVENT_BUS)\n public readonly eventBus: EventBus<IWidgetEvent>\n ) {}\n\n public ngAfterViewInit() {\n // need to wait till DOM is rendered because of \"getBoundingClientRect\" under the hood\n setTimeout(() => this.calculateWidgetsVisibility());\n }\n\n public onGridsterScroll() {\n this.calculateWidgetsVisibility();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.gridsterConfig) {\n if (changes.gridsterConfig.isFirstChange()) {\n const gridsterConfig = _defaultsDeep(\n this.gridsterConfig || {},\n DEFAULT_GRIDSTER_CONFIG\n );\n\n this.hookEvent(\n gridsterConfig,\n \"itemChangeCallback\",\n this.updateWidgetPosition\n );\n this.hookEvent(\n gridsterConfig,\n \"itemResizeCallback\",\n this.emitWidgetResize\n );\n\n this.gridsterConfigChange.emit(gridsterConfig);\n }\n\n if (this.gridsterConfig?.api) {\n this.gridsterConfig.api.optionsChanged?.();\n }\n }\n\n if (changes.editMode) {\n if (!this.gridsterConfig.resizable) {\n throw new Error(`Gridster's resizable prop is undefined`);\n }\n this.gridsterConfig.resizable.enabled = this.editMode;\n\n if (!this.gridsterConfig.draggable) {\n throw new Error(`Gridster's draggable prop is undefined`);\n }\n this.gridsterConfig.draggable.enabled = this.editMode;\n\n this.gridsterConfigChange.emit(\n Object.assign({}, this.gridsterConfig)\n );\n\n this.eventBus\n .getStream(DASHBOARD_EDIT_MODE)\n .next({ payload: this.editMode });\n }\n\n // TODO: position doesn't update on external change of position\n // if (!changes.dashboard.isFirstChange() &&\n // changes.dashboard.currentValue.positions !== changes.dashboard.previousValue.positions) {\n // if (this.gridsterConfig.api) {\n // this.gridsterConfig.api.optionsChanged();\n // }\n // }\n }\n\n public orderWidgets = (\n a: KeyValue<string, IWidget>,\n b: KeyValue<string, IWidget>\n ): number => {\n const nextWidget = this.dashboard.positions[a.key];\n const currentWidget = this.dashboard.positions[b.key];\n\n return nextWidget.y - currentWidget.y || nextWidget.x - currentWidget.x;\n };\n\n public trackByFn = (index: number, item: KeyValue<string, IWidget>) =>\n item.key;\n\n public onWidgetChange(widget: IWidget) {\n // this could happen when changes are being made on a widget that is being removed\n if (!this.dashboard.widgets[widget.id]) {\n return;\n }\n this.updateWidget(widget);\n }\n\n public updateWidget(widget: IWidget) {\n let dashboard: IDashboard = this.dashboard;\n if (!this.dashboard.positions[widget.id] && this.gridsterConfig?.api) {\n const gridsterItem =\n this.gridsterConfig.api.getFirstPossiblePosition?.({\n x: 0,\n y: 0,\n rows: this.gridsterConfig?.defaultItemRows as number,\n cols: this.gridsterConfig?.defaultItemCols as number,\n });\n dashboard = immutableSet(\n dashboard,\n `positions.${widget.id}`,\n gridsterItem\n );\n }\n\n dashboard = immutableSet(dashboard, `widgets.${widget.id}`, widget);\n this.dashboardBuffer = dashboard;\n this.dashboardChange.emit(dashboard);\n }\n\n public removeWidget(widgetId: string, removePosition = true) {\n let dashboard: IDashboard = this.dashboard;\n if (!dashboard.widgets[widgetId]) {\n return;\n }\n\n const widgetsClone = Object.assign({}, dashboard.widgets);\n delete widgetsClone[widgetId];\n dashboard = immutableSet(dashboard, \"widgets\", widgetsClone);\n\n if (removePosition) {\n const positionsClone = Object.assign({}, dashboard.positions);\n delete positionsClone[widgetId];\n dashboard = immutableSet(dashboard, \"positions\", positionsClone);\n }\n\n this.dashboardChange.emit(dashboard);\n }\n\n public shouldWidgetRender(key: string) {\n return this.belowFoldLazyLoadingConfig?.enabled\n ? this.gridsterItemsVisibilityMap[key]\n : true;\n }\n\n private updateWidgetPosition = (\n item: GridsterItem,\n itemComponent: GridsterItemComponentInterface\n ): void => {\n const widgetId = (itemComponent as any).widgetId;\n const dashboard = immutableSet(\n this.dashboard,\n \"positions.\" + widgetId,\n item\n );\n\n this.dashboardChange.emit(dashboard);\n\n this.eventBus.getStream(WIDGET_POSITION_CHANGE).next({\n widgetId: widgetId,\n payload: item,\n });\n };\n\n private emitWidgetResize = (\n item: GridsterItem,\n itemComponent: GridsterItemComponentInterface\n ): void => {\n const widgetId = (itemComponent as any).widgetId;\n\n this.eventBus.getStream(WIDGET_RESIZE).next({\n widgetId: widgetId,\n payload: {\n widgetId: widgetId,\n height: itemComponent.height,\n width: itemComponent.width,\n },\n });\n };\n\n private hookEvent(\n options: GridsterConfig,\n eventName: string,\n invoke: (\n item: GridsterItem,\n itemComponent: GridsterItemComponentInterface\n ) => void\n ) {\n const prevEvent = options[eventName];\n options[eventName] = (\n item: GridsterItem,\n itemComponent: GridsterItemComponentInterface\n ) => {\n invoke(item, itemComponent);\n\n if (prevEvent) {\n prevEvent(item, itemComponent);\n }\n };\n }\n\n private calculateWidgetsVisibility(): void {\n if (!this.belowFoldLazyLoadingConfig?.enabled) {\n return;\n }\n\n const gridsterRect: ClientRect =\n this.gridster.el.getBoundingClientRect();\n\n this.gridsterItemsVisibilityMap = this.gridsterItems.reduce(\n (acc: Record<string, boolean>, next) => {\n const { el } = next;\n const idx: string = (next as any).widgetId;\n\n // if widget is already loaded don't hide it\n if (\n !this.belowFoldLazyLoadingConfig.configuration\n ?.reloadWidgetsOnScroll\n ) {\n const prevVisibility = acc[idx];\n if (prevVisibility) {\n return acc;\n }\n }\n\n const rect: ClientRect = el.getBoundingClientRect();\n\n const getHeightVisibility = () =>\n (rect.top > gridsterRect.top &&\n rect.top < gridsterRect.bottom) ||\n (rect.bottom > gridsterRect.top &&\n rect.bottom < gridsterRect.bottom);\n\n const getWidthVisibility = () =>\n (rect.left > gridsterRect.left &&\n rect.left < gridsterRect.right) ||\n (rect.right > gridsterRect.left &&\n rect.right < gridsterRect.right);\n\n const isVisible = getHeightVisibility() && getWidthVisibility();\n\n acc[idx] = isVisible;\n\n return acc;\n },\n this.gridsterItemsVisibilityMap\n );\n }\n}\n","<gridster\n class=\"nui-dashboard__gridster\"\n [options]=\"gridsterConfig\"\n (scroll)=\"onGridsterScroll()\"\n>\n <gridster-item\n *ngFor=\"\n let widget of dashboard.widgets | keyvalue: orderWidgets;\n trackBy: trackByFn\n \"\n [item]=\"dashboard.positions[widget.key]\"\n class=\"nui-dashboard__gridster-item\"\n [nuiGridsterItemWidgetId]=\"widget.key\"\n >\n <nui-widget\n *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 >\n </nui-widget>\n </gridster-item>\n</gridster>\n\n<ng-template #emptyWidgetTpl>\n <div class=\"w-100 h-100 d-block\">\n <nui-loading [active]=\"true\"></nui-loading>\n </div>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IDataField, TableAlignmentOptions } from \"@nova-ui/bits\";\n\nimport { IFormatterData } from \"../configurator/components/formatters/types\";\nimport { IProperties } from \"../types\";\nexport interface IFormatterProperties extends IProperties {\n dataFieldIds?: IFormatterData;\n}\n\nexport interface IFormatter {\n componentType: string;\n properties: IFormatterProperties;\n}\n\nexport interface IFormatterConfigurator {\n formatter?: IFormatter;\n formatterDefinition: IFormatterDefinition;\n dataFields: IDataField[];\n}\n\nexport interface IFormatterDefinitionProperties {\n /** CSS class to be applied to the formatter host element */\n elementClass?: string;\n}\n\nexport interface IFormatterDefinition {\n componentType: string;\n label: string;\n /**\n * The formatter's compatible data types.\n */\n dataTypes: Record<string, string | string[]>;\n /**\n * Component used to configure values for formatter.\n */\n configurationComponent?: string;\n properties?: IFormatterDefinitionProperties;\n}\n\nexport interface ITableFormatterDefinition extends IFormatterDefinition {\n alignment?: TableAlignmentOptions;\n}\n\nexport interface IInfoMessage {\n componentType: string;\n properties: IInfoMessageProperties;\n}\n\nexport interface IInfoMessageProperties {\n generalText: string;\n emphasizeText?: string;\n link?: ILinkDefinition;\n allowDismiss?: boolean;\n}\n\nexport interface ILinkDefinition {\n href: string;\n target: string;\n text: string;\n}\n\nexport enum EmbeddedContentMode {\n URL,\n HTML,\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { DOCUMENT } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SecurityContext,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { DomSanitizer } from \"@angular/platform-browser\";\n\nimport { IHasChangeDetector } from \"../../types\";\nimport { EmbeddedContentMode } from \"../types\";\n\n/* @dynamic */\n@Component({\n selector: \"nui-embedded-content\",\n template: `<div style=\"width: 100%; height: 100%\" #anchor></div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmbeddedContentComponent\n implements IHasChangeDetector, OnInit, OnChanges\n{\n public static lateLoadKey = \"EmbeddedContentComponent\";\n\n @Input() public mode: EmbeddedContentMode;\n @Input() public customEmbeddedContent: string;\n @Input() public sanitized: boolean = true;\n\n @Input() @HostBinding(\"class\") public elementClass = \"\";\n\n @ViewChild(\"anchor\", { static: true }) anchor: ElementRef;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n @Inject(DOCUMENT) private document: Document,\n private domSanitizer: DomSanitizer\n ) {}\n\n ngOnInit() {\n this.validateAndApplyEmbeddedContent();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (\n changes.customEmbeddedContent &&\n !changes.customEmbeddedContent.firstChange\n ) {\n this.validateAndApplyEmbeddedContent();\n }\n }\n\n private validateAndApplyEmbeddedContent() {\n const context =\n this.sanitized &&\n this.sanitizeContext(\n this.mode === EmbeddedContentMode.URL\n ? SecurityContext.URL\n : SecurityContext.HTML\n );\n\n this.anchor.nativeElement.innerHTML = \"\";\n\n if (this.mode === EmbeddedContentMode.URL) {\n const iframe = this.document.createElement(\"iframe\");\n iframe.src = (\n this.sanitized ? context : this.customEmbeddedContent\n ) as string;\n iframe.width = \"100%\";\n iframe.height = \"100%\";\n\n this.anchor.nativeElement.appendChild(iframe);\n } else {\n this.anchor.nativeElement.innerHTML = this.sanitized\n ? context\n : this.customEmbeddedContent;\n }\n }\n\n private sanitizeContext(\n securityContextValue: SecurityContext\n ): string | null {\n return this.domSanitizer.sanitize(\n securityContextValue,\n this.customEmbeddedContent?.trim()\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IFormatter } from \"../components/types\";\nimport { IFormatterData } from \"../configurator/components/formatters/types\";\n\n/**\n *\n * Takes formatter \"dataFieldIds\" from \"properties\" and maps the data to the formatter input.\n * Might be used for nuiComponentPortal directive for formatter \"properties\"\n *\n * @param formatter\n * @param data\n */\nexport function mapDataToFormatterProperties<T extends { [key: string]: any }>(\n formatter: IFormatter,\n data: T\n): { data: IFormatterData } {\n const { dataFieldIds } = formatter.properties || {};\n\n let formatterProps;\n if (!dataFieldIds) {\n // assign just \"value\" if no dataFields provided\n formatterProps = { value: data.value };\n } else {\n formatterProps = Object.keys(dataFieldIds).reduce(\n (dataFieldsAcc: any, formatterKey) => {\n const widgetDataKey: string = dataFieldIds[formatterKey];\n\n dataFieldsAcc[formatterKey] = data[widgetDataKey];\n return dataFieldsAcc;\n },\n {}\n );\n }\n\n return formatterProps;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n Optional,\n SimpleChanges,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport _isNil from \"lodash/isNil\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport { mapDataToFormatterProperties } from \"../../functions/map-data-to-formatter-properties\";\nimport { INTERACTION } from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IHasChangeDetector,\n PIZZAGNA_EVENT_BUS,\n WellKnownDataSourceFeatures,\n} from \"../../types\";\nimport { IBroker } from \"../providers/types\";\nimport {\n IKpiConfiguration,\n IKpiData,\n IKpiFormatterProperties,\n IKpiFormattersConfiguration,\n} from \"./types\";\n\n@Component({\n selector: \"nui-kpi\",\n templateUrl: \"./kpi.component.html\",\n styleUrls: [\"./kpi.component.less\"],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class KpiComponent implements IHasChangeDetector, OnChanges {\n public static lateLoadKey = \"KpiComponent\";\n\n @Input()\n public widgetData: IKpiData;\n\n @Input()\n public backgroundColor: string;\n\n @Input()\n public syncValuesBroker: IBroker[];\n\n @Input()\n public configuration: IKpiConfiguration;\n\n @Input()\n public busy = false;\n\n @HostBinding(\"class\")\n public elementClass = \"\";\n\n public formattersProperties: IKpiFormatterProperties;\n public defaultColor: string = \"var(--nui-color-bg-secondary)\";\n\n public get interactive(): boolean {\n return (\n ((this.configuration?.interactive ||\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.Interactivity\n )?.enabled) &&\n !_isNil(this.widgetData?.value)) ||\n false\n );\n }\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n @Optional() @Inject(DATA_SOURCE) public dataSource: IDataSource,\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>\n ) {}\n\n public onInteraction() {\n if (!this.interactive) {\n return;\n }\n this.eventBus\n .getStream(INTERACTION)\n .next({ payload: { data: this.widgetData } });\n }\n\n public getScaleBroker(id: string): IBroker | undefined {\n if (this.syncValuesBroker) {\n return this.syncValuesBroker.find((b) => b.id === id);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.configuration) {\n const formattersConfiguration: IKpiFormattersConfiguration =\n changes.configuration.currentValue.formatters;\n\n if (formattersConfiguration) {\n this.formattersProperties = this.getFormatterProperties(\n formattersConfiguration\n );\n }\n }\n\n if (changes.widgetData) {\n if (this.configuration?.formatters) {\n this.formattersProperties = this.getFormatterProperties(\n this.configuration.formatters\n );\n }\n }\n }\n\n /**\n * Iterates over formatters and maps their properties from the data\n *\n * @param formattersConfiguration\n */\n private getFormatterProperties(\n formattersConfiguration: IKpiFormattersConfiguration\n ) {\n const formatterKeys = Object.keys(formattersConfiguration);\n\n const formattersProperties = formatterKeys.reduce(\n (acc: IKpiFormatterProperties, key: string) => {\n const formatterCfg = formattersConfiguration[key]?.formatter;\n if (formatterCfg) {\n acc[key] = {\n data: mapDataToFormatterProperties(\n formatterCfg,\n this.widgetData\n ),\n };\n }\n return acc;\n },\n {}\n );\n\n return formattersProperties;\n }\n}\n","<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\n class=\"nui-kpi-indicator__background\"\n [class.nui-kpi-indicator--interactive]=\"interactive\"\n [ngStyle]=\"{\n 'background-color': backgroundColor || widgetData?.backgroundColor\n }\"\n ></div>\n <div\n class=\"nui-kpi-indicator__text\"\n [ngStyle]=\"{\n color:\n widgetData?.textColor ||\n backgroundColor ||\n widgetData?.backgroundColor ||\n defaultColor\n }\"\n >\n <div class=\"nui-kpi-indicator__zoom-container\">\n <div\n class=\"nui-kpi-indicator__description\"\n [title]=\"widgetData?.label\"\n >\n <span\n nuiZoomContent\n [useZoom]=\"false\"\n [minScale]=\"0.5\"\n [scaleIN$]=\"getScaleBroker('label')?.out$\"\n [scaleOUT$]=\"getScaleBroker('label')?.in$\"\n >{{ widgetData?.label }}</span\n >\n </div>\n\n <ng-container\n *ngIf=\"configuration?.formatters?.Value; else kpiValueRaw\"\n nuiComponentPortal\n #componentPortal=\"nuiComponentPortal\"\n componentId=\"KpiValueFormatter\"\n [componentType]=\"\n configuration?.formatters?.Value?.formatter?.componentType\n \"\n [properties]=\"formattersProperties.Value\"\n >\n <div class=\"nui-kpi-indicator__value\">\n <span\n nuiZoomContent\n [ngClass]=\"\n configuration?.formatters?.Value?.formatter\n ?.componentType === 'IconFormatterComponent'\n ? 'without-filter'\n : ''\n \"\n [useZoom]=\"false\"\n [scaleIN$]=\"getScaleBroker('value')?.out$\"\n [scaleOUT$]=\"getScaleBroker('value')?.in$\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </span>\n </div>\n </ng-container>\n\n <div class=\"nui-kpi-indicator__units\" [title]=\"widgetData?.units\">\n <span\n nuiZoomContent\n [useZoom]=\"false\"\n [scaleIN$]=\"getScaleBroker('units')?.out$\"\n [scaleOUT$]=\"getScaleBroker('units')?.in$\"\n [minScale]=\"0.5\"\n >{{ widgetData?.units }}</span\n >\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #kpiValueRaw>\n <div\n class=\"nui-kpi-indicator__value\"\n [style.font-size]=\"widgetData?.fontSize\"\n [title]=\"widgetData?.value\"\n >\n <span\n nuiZoomContent\n [useZoom]=\"false\"\n [scaleIN$]=\"getScaleBroker('value')?.out$\"\n [scaleOUT$]=\"getScaleBroker('value')?.in$\"\n >\n {{ widgetData?.value }}</span\n >\n </div>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n DoCheck,\n Injectable,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IValueChange, mergeChanges } from \"../../functions/merge-changes\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { IComponentConfiguration, IHasChangeDetector } from \"../../types\";\n\n@Injectable()\nexport abstract class BaseLayout\n implements IHasChangeDetector, OnChanges, DoCheck, OnDestroy\n{\n // components config from 'pizza'\n public nodeComponentsConfigs: IComponentConfiguration[];\n // result config from merging 'nodeComponentsConfig' and parent 'template'\n public nodeConfigs: IComponentConfiguration[];\n\n protected destroyed$: Subject<void> = new Subject<void>();\n\n @Input() public template: Partial<IComponentConfiguration>;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n protected pizzagnaService: PizzagnaService,\n protected logger: LoggerService\n ) {}\n\n public abstract getNodes(): string[];\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.nodes || changes.template) {\n this.updateNodeConfigs({\n changesNodes: changes.nodes,\n changesTemplate: changes.template,\n });\n }\n }\n\n public ngDoCheck(): void {\n if (this.checkNodeConfigs()) {\n this.updateNodeConfigs();\n this.changeDetector.detectChanges();\n }\n }\n\n public ngOnDestroy() {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n public trackByFn(index: number, node: IComponentConfiguration) {\n return node.id;\n }\n\n private checkNodeConfigs(): boolean {\n const nodes = this.getNodes();\n\n if (\n !this.nodeComponentsConfigs ||\n nodes.length !== this.nodeComponentsConfigs.length\n ) {\n return true;\n }\n\n for (let i = 0; i < nodes.length; i++) {\n if (\n this.pizzagnaService.getComponent(nodes[i]) !==\n this.nodeComponentsConfigs[i]\n ) {\n return true;\n }\n }\n\n return false;\n }\n\n private updateNodeComponentConfigs() {\n const nodes = this.getNodes();\n\n this.nodeComponentsConfigs =\n nodes &&\n nodes.map((n) => {\n const c = this.pizzagnaService.getComponent(n);\n if (typeof c === \"undefined\") {\n throw new Error(\n \"No component with id '\" +\n n +\n \"' was defined in the configuration.\"\n );\n }\n return c;\n });\n }\n\n private updateNodeConfigs(changes?: SimpleChanges) {\n this.nodeConfigs = mergeChanges(\n this.nodeConfigs,\n this.getTemplateChangeForNodes(changes),\n this.getNodeComponentsConfigs()\n );\n }\n\n private getNodeComponentsConfigs() {\n const nodeComponentsConfigsChanges: IValueChange = {\n currentValue: undefined,\n previousValue: this.nodeComponentsConfigs\n ? [...this.nodeComponentsConfigs]\n : undefined,\n };\n this.updateNodeComponentConfigs();\n nodeComponentsConfigsChanges.currentValue = this.nodeComponentsConfigs;\n\n return nodeComponentsConfigsChanges;\n }\n\n private getTemplateChangeForNodes(changes?: SimpleChanges): IValueChange {\n const { changesNodes, changesTemplate } = changes || {};\n\n const getTemplatePerNode = (template: IComponentConfiguration) =>\n template && this.getNodes()?.map(() => template);\n\n return {\n currentValue: getTemplatePerNode(\n changesTemplate ? changesTemplate.currentValue : this.template\n ),\n previousValue: changesNodes\n ? this.template\n : getTemplatePerNode(\n changesTemplate\n ? changesTemplate.previousValue\n : this.template\n ),\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n} from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { BaseLayout } from \"../base-layout\";\n\n@Component({\n selector: \"nui-stack\",\n templateUrl: \"./stack.component.html\",\n})\nexport class StackComponent extends BaseLayout implements OnInit, OnDestroy {\n public static lateLoadKey = \"StackComponent\";\n\n @Input() nodes: string[] = [];\n @Input() direction = \"column\";\n @Input() elementClass = \"\";\n\n @HostBinding(\"class\") public classNames: string;\n public readonly defaultClassNames = \"h-100 w-100 d-flex\";\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public ngOnInit(): void {\n this.classNames = `${this.defaultClassNames} flex-${this.direction} ${this.elementClass}`;\n }\n\n public ngOnDestroy() {\n // Ensures that any base class observables are unsubscribed.\n super.ngOnDestroy();\n }\n\n public getNodes(): string[] {\n return this.nodes;\n }\n}\n","<ng-container *ngFor=\"let node of nodeConfigs; trackBy: trackByFn\">\n <ng-container\n nuiComponentPortal\n #componentPortal=\"nuiComponentPortal\"\n [componentId]=\"node.id\"\n [componentType]=\"node.componentType\"\n [providers]=\"node.providers\"\n [properties]=\"node.properties\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n NgZone,\n OnDestroy,\n ViewChild,\n} from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { BaseLayout } from \"../base-layout\";\n\n@Component({\n selector: \"nui-tiles\",\n styleUrls: [\"./tiles.component.less\"],\n templateUrl: \"./tiles.component.html\",\n})\nexport class TilesComponent\n extends BaseLayout\n implements OnDestroy, AfterViewInit\n{\n public static lateLoadKey = \"TilesComponent\";\n\n @Input() public nodes: string[] = [];\n @Input() public direction = \"column\";\n\n @HostBinding(\"class\") public elementClass: string;\n public prioritizeGridRows: boolean = false;\n\n @ViewChild(\"gridItemsContainer\", { static: true })\n private gridItemsContainer: ElementRef<HTMLElement>;\n\n private tilesResizeObserver: ResizeObserver;\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService,\n private ngZone: NgZone\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public ngAfterViewInit() {\n this.handleGridFlowOnResize();\n }\n\n public ngOnDestroy() {\n this.tilesResizeObserver?.disconnect();\n // Ensures that any base class observables are unsubscribed.\n super.ngOnDestroy();\n }\n\n public getNodes(): string[] {\n return this.nodes;\n }\n\n private handleGridFlowOnResize() {\n this.tilesResizeObserver = new ResizeObserver(() => this.onResize());\n this.ngZone.runOutsideAngular(() => {\n this.tilesResizeObserver.observe(\n this.gridItemsContainer.nativeElement\n );\n });\n }\n\n private onResize() {\n if (this.nodes?.length < 2) {\n return;\n }\n\n const cssAttributes =\n this.gridItemsContainer.nativeElement.getBoundingClientRect();\n const { height, width } = cssAttributes;\n\n const h2WRatio = height / width;\n const allowedH2WRatio = getHeightToWidthRatioFor(this.nodes.length);\n\n const gap = 0.05; // height/width gap used in transitions to avoid widget lagging\n\n if (h2WRatio - gap > allowedH2WRatio && !this.prioritizeGridRows) {\n this.prioritizeGridRows = true;\n this.changeDetector.detectChanges();\n return;\n }\n\n if (h2WRatio + gap < allowedH2WRatio && this.prioritizeGridRows) {\n this.prioritizeGridRows = false;\n this.changeDetector.detectChanges();\n return;\n }\n }\n}\n\n/**\n * Height to Width container ratio varies per tiles amount.\n * Experimentally was determined valid h/w ratio for 2...8 tiles and\n * This function represents the linear dependency (approximately).\n */\nconst getHeightToWidthRatioFor = (tilesAmount: number) =>\n 0.25 * tilesAmount + 0.7;\n","<div\n #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\n nuiComponentPortal\n #componentPortal=\"nuiComponentPortal\"\n [componentId]=\"node.id\"\n [componentType]=\"node.componentType\"\n [properties]=\"node.properties\"\n [providers]=\"node.providers\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </ng-container>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n} from \"@angular/core\";\n\nimport { IHasChangeDetector } from \"../../../../types\";\n\nconst MEDIUM_WIDTH = 600;\nconst SMALL_WIDTH = 480;\n\n@Component({\n selector: \"nui-list-group-item\",\n templateUrl: \"./list-group-item.component.html\",\n styleUrls: [\"list-group-item.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: \"w-100\",\n },\n})\nexport class ListGroupItemComponent implements IHasChangeDetector {\n static lateLoadKey = \"ListGroupItemComponent\";\n\n @Input() public id: string;\n @Input() public label: string;\n @Input() public statuses: Array<{ [key: string]: any }>;\n\n @Input() public canNavigate: boolean;\n @Input() set widgetWidth(res: number) {\n this.isMedium = res <= MEDIUM_WIDTH && res > SMALL_WIDTH;\n this.isSmall = res <= SMALL_WIDTH;\n }\n\n @Output() public navigated = new EventEmitter<ListGroupItemComponent>();\n\n public isMedium: boolean;\n public isSmall: boolean;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n onButtonClick() {\n if (this.canNavigate) {\n this.navigated.emit(this);\n }\n }\n}\n","<div\n class=\"list-group-item\"\n [ngClass]=\"{ 'widget-medium': isMedium, 'widget-small': isSmall }\"\n (click)=\"onButtonClick()\"\n>\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\" *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\">{{\n status.value\n }}</span>\n </div>\n </div>\n <nui-icon *ngIf=\"canNavigate\" icon=\"caret-right\"></nui-icon>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Output,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { WIDGET_SEARCH } from \"../../../../services/types\";\nimport { IHasChangeDetector, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\n\n@Component({\n selector: \"nui-list-leaf-item\",\n templateUrl: \"./list-leaf-item.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: \"w-100\" },\n styleUrls: [\"list-leaf-item.component.less\"],\n})\nexport class ListLeafItemComponent implements IHasChangeDetector, OnInit {\n static lateLoadKey = \"ListLeafItemComponent\";\n\n @Input() public icon: string;\n @Input() public status: string;\n @Input() public detailedUrl: string;\n @Input() public label: string;\n @Input() public canNavigate: boolean;\n @Input() public url: string;\n\n @Output() public navigated = new EventEmitter<ListLeafItemComponent>();\n\n public searchTerm: string = \"\";\n protected destroy$ = new Subject<void>();\n\n onButtonClick() {\n if (this.canNavigate) {\n this.navigated.emit(this);\n }\n }\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>\n ) {}\n\n public ngOnInit() {\n this.eventBus\n .getStream(WIDGET_SEARCH)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event) => {\n this.searchTerm = event.payload;\n this.changeDetector.markForCheck();\n });\n }\n}\n","<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\n *ngIf=\"icon; else statusTpl\"\n [icon]=\"icon\"\n [status]=\"status\"\n class=\"mr-1\"\n ></nui-icon>\n </div>\n <div class=\"nui-list-leaf-item__description\">\n <a\n 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\"\n ></a>\n <div\n class=\"nui-text-secondary nui-text-ellipsis\"\n [innerHTML]=\"detailedUrl | nuiHighlight: searchTerm\"\n ></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>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n Output,\n} from \"@angular/core\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { DRILLDOWN } from \"../../../../services/types\";\nimport { PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { INavigationBarConfig } from \"../../types\";\n\n@Component({\n selector: \"nui-navigation-bar\",\n templateUrl: \"./list-navigation-bar.component.html\",\n styleUrls: [\"list-navigation-bar.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ListNavigationBarComponent {\n static lateLoadKey = \"ListNavigationBarComponent\";\n\n @Input() public navBarConfig: INavigationBarConfig;\n\n @Output() public navigated = new EventEmitter();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {}\n\n onBack() {\n if (this.navBarConfig) {\n this.eventBus.getStream(DRILLDOWN).next({\n payload: {\n back: this.navBarConfig?.buttons?.back?.disabled,\n },\n });\n }\n }\n\n onHome() {\n this.eventBus.getStream(DRILLDOWN).next({ payload: { reset: true } });\n }\n}\n","<div class=\"list-nav-bar\" *ngIf=\"navBarConfig && !navBarConfig?.isRoot\">\n <button\n nui-button\n type=\"button\"\n [isRepeat]=\"true\"\n displayStyle=\"action\"\n icon=\"arrow-left\"\n [disabled]=\"!navBarConfig?.buttons?.back?.disabled\"\n (click)=\"onBack()\"\n ></button>\n\n <button\n nui-button\n type=\"button\"\n [isRepeat]=\"true\"\n displayStyle=\"action\"\n icon=\"overview\"\n (click)=\"onHome()\"\n ></button>\n <div class=\"list-nav-bar__label\">{{ navBarConfig?.label }}</div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, ResizeObserverDirective } from \"@nova-ui/bits\";\n\nimport { mapDataToFormatterProperties } from \"../../functions/map-data-to-formatter-properties\";\nimport { DRILLDOWN } from \"../../services/types\";\nimport { IHasChangeDetector, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { IListWidgetConfiguration } from \"./types\";\n\nconst RESIZE_DEBOUNCE_TIME = 10;\n\n@Component({\n selector: \"nui-list-widget\",\n templateUrl: \"./list-widget.component.html\",\n styleUrls: [\"./list-widget.component.less\"],\n host: { style: \"overflow: scroll\" },\n})\nexport class ListWidgetComponent\n implements OnDestroy, OnInit, IHasChangeDetector, OnChanges\n{\n static lateLoadKey = \"ListWidgetComponent\";\n\n @Input() public data: any[];\n @Input() public configuration: IListWidgetConfiguration;\n @Input() @HostBinding(\"class\") public elementClass: string;\n\n private itemFormatterProps = new Map();\n private destroy$: Subject<void> = new Subject<void>();\n private widgetWidth: number;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private zone: NgZone,\n private host: ElementRef,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {}\n\n ngOnInit() {\n this.initResizeObserver();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.data?.currentValue) {\n changes.data.currentValue.forEach((v: any) =>\n this.itemFormatterProps.set(v, this.calcItemProps(v))\n );\n }\n }\n\n // TODO: think of how to get rid of this logic on listWidget\n // since it's very specific for drilldown and appstack\n onListItemEvent(item: any) {\n this.eventBus.getStream(DRILLDOWN).next({ payload: item });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.itemFormatterProps.clear();\n }\n\n public getPropsFor(item: any) {\n return {\n ...this.itemFormatterProps.get(item),\n widgetWidth: this.widgetWidth,\n };\n }\n\n private calcItemProps(item: any) {\n if (!this.configuration) {\n return item;\n }\n return {\n ...mapDataToFormatterProperties(this.configuration, item),\n ...this.configuration.itemProperties,\n };\n }\n\n // think of using eventBus to let widget entities know about it's width. - mb some formatters for widget doesn't care about it's width.\n private initResizeObserver() {\n const resizeDirective = new ResizeObserverDirective(\n this.host,\n this.zone\n );\n resizeDirective.debounceTime = RESIZE_DEBOUNCE_TIME;\n resizeDirective.ngAfterViewInit();\n\n resizeDirective.containerResize\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.widgetWidth = this.host.nativeElement.offsetWidth;\n });\n }\n}\n","<nui-repeat [itemsSource]=\"data\" [repeatItemTemplateRef]=\"repeatItemTemplate\">\n</nui-repeat>\n\n<ng-template #repeatItemTemplate let-item=\"item\">\n <ng-container\n 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\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IProportionalDonutContentAggregatorDefinition } from \"../functions/proportional-aggregators/types\";\nimport { RegistryService } from \"./registry-service\";\n\n@Injectable({ providedIn: \"root\" })\nexport class ProportionalContentAggregatorsRegistryService extends RegistryService<IProportionalDonutContentAggregatorDefinition> {\n constructor(logger: LoggerService) {\n super(logger, \"ProportionalContentAggregatorsRegistryService\");\n }\n\n getItemKey(item: IProportionalDonutContentAggregatorDefinition) {\n return item.aggregatorType;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./provider-registry.service\";\nexport * from \"./widget-configuration.service\";\nexport * from \"./widget-to-dashboard-event-proxy.service\";\nexport * from \"./widget-types.service\";\nexport * from \"./event-registry.service\";\nexport * from \"./table-formatter-registry.service\";\nexport * from \"./kpi-color-comparators-registry.service\";\nexport * from \"./proportional-content-aggregators-registry.service\";\nexport * from \"./url-interaction.service\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n} from \"@angular/core\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\nimport {\n ChartAssist,\n IAccessors,\n IChartAssistEvent,\n IChartAssistSeries,\n} from \"@nova-ui/charts\";\n\nimport { mapDataToFormatterProperties } from \"../../../functions/map-data-to-formatter-properties\";\nimport {\n IProportionalDonutContentAggregator,\n IProportionalDonutContentAggregatorDefinition,\n IProportionalDonutContentAggregatorProperties,\n} from \"../../../functions/proportional-aggregators/types\";\nimport { ProportionalContentAggregatorsRegistryService } from \"../../../services/proportional-content-aggregators-registry.service\";\nimport { ProportionalDonutContentFormattersRegistryService } from \"../../../services/public-api\";\nimport { IHasChangeDetector } from \"../../../types\";\nimport {\n IFormatter,\n IFormatterDefinition,\n IFormatterProperties,\n} from \"../../types\";\nimport { IDonutContentConfig } from \"../types\";\n\n@Component({\n selector: \"nui-proportional-donut-content\",\n templateUrl: \"./proportional-donut-content.component.html\",\n styleUrls: [\"./proportional-donut-content.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProportionalDonutContentComponent\n implements OnChanges, OnDestroy, IHasChangeDetector\n{\n static lateLoadKey = \"ProportionalDonutContentComponent\";\n\n @Input() public widgetData: IChartAssistSeries<IAccessors>[];\n @Input() public donutConfig: IDonutContentConfig;\n\n @Input() private chartAssist: ChartAssist;\n\n public aggregatedValue: string;\n public contentFormatter: IFormatter;\n public contentFormatterProperties: IFormatterProperties | undefined;\n\n private contentFormatterDefinition: IFormatterDefinition;\n private contentAggregatorDefinition: IProportionalDonutContentAggregatorDefinition;\n /** Hovered series Id */\n private emphasizedSeriesId: string;\n private destroy$ = new Subject<void>();\n private chartAssistSubscription: Subscription;\n\n constructor(\n private aggregatorRegistry: ProportionalContentAggregatorsRegistryService,\n private formatterRegistry: ProportionalDonutContentFormattersRegistryService,\n public changeDetector: ChangeDetectorRef,\n private logger: LoggerService\n ) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.donutConfig) {\n const donutConfig: IDonutContentConfig =\n changes.donutConfig.currentValue;\n\n const { formatter, aggregator } = donutConfig;\n if (aggregator?.aggregatorType) {\n this.updateAggregatorDefinition(aggregator);\n this.updateAggregatedValue();\n }\n\n if (formatter?.componentType) {\n this.contentFormatter = formatter;\n this.updateFormatterDefinition(formatter);\n this.updateFormatterProperties();\n }\n }\n\n if (changes.widgetData) {\n this.updateAggregatedValue();\n this.updateFormatterProperties();\n }\n\n if (changes.chartAssist) {\n this.subscribeToChartAssist();\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Iterates over formatters and maps their properties from the data\n *\n * @param formattersConfiguration\n */\n private getFormatterProperties(formatter: IFormatter | undefined) {\n if (!formatter) {\n return undefined;\n }\n\n return {\n ...this.contentFormatterDefinition?.properties,\n data: mapDataToFormatterProperties(formatter, {\n // add \"aggregatedValue\" as \"value\" so that formatter processes it by default\n value: this.aggregatedValue,\n }),\n };\n }\n\n private updateAggregatorDefinition(\n aggregatorConfig: IProportionalDonutContentAggregator\n ) {\n const fromRegistry = this.aggregatorRegistry.getItem(\n aggregatorConfig.aggregatorType\n );\n\n if (fromRegistry) {\n this.contentAggregatorDefinition = fromRegistry;\n } else {\n this.logger.warn(\n `No aggregator with key ${aggregatorConfig.aggregatorType} found in registry.`\n );\n }\n }\n\n private updateFormatterDefinition(formatterConfig: IFormatter) {\n const fromRegistry = this.formatterRegistry.getItem(\n formatterConfig.componentType\n );\n\n if (fromRegistry) {\n this.contentFormatterDefinition = fromRegistry;\n } else {\n this.logger.warn(\n `No aggregator with key ${formatterConfig.componentType} found in registry.`\n );\n }\n }\n\n private updateAggregatedValue(): void {\n if (!this.widgetData || !this.contentAggregatorDefinition) {\n this.logger.warn(\n `Can't aggregate value. Aggregator key: ${this.contentAggregatorDefinition?.aggregatorType}. Data: ${this.widgetData}`\n );\n return;\n }\n\n const properties = this.getAggregatorProperties();\n\n this.aggregatedValue = this.contentAggregatorDefinition\n .fn(this.widgetData, {\n ...properties,\n // prioritize emphasizedSeriesId if series is hovered on the chart\n activeMetricId:\n this.emphasizedSeriesId || properties.activeMetricId,\n })\n .toString();\n }\n\n private updateFormatterProperties() {\n this.contentFormatterProperties = this.getFormatterProperties(\n this.contentFormatter\n );\n }\n\n private getAggregatorProperties(): IProportionalDonutContentAggregatorProperties {\n return {\n ...this.contentAggregatorDefinition?.properties,\n ...this.donutConfig?.aggregator?.properties,\n };\n }\n\n private subscribeToChartAssist() {\n this.chartAssistSubscription?.unsubscribe();\n this.chartAssistSubscription = this.chartAssist?.chartAssistSubject\n ?.pipe(takeUntil(this.destroy$))\n .subscribe((data: IChartAssistEvent) => {\n this.emphasizedSeriesId = data.payload?.seriesId;\n this.updateAggregatedValue();\n this.updateFormatterProperties();\n this.changeDetector.detectChanges();\n });\n }\n}\n","<ng-container\n *ngIf=\"contentFormatter?.componentType\"\n nuiComponentPortal\n [componentType]=\"contentFormatter?.componentType\"\n [properties]=\"contentFormatterProperties\"\n #componentPortal=\"nuiComponentPortal\"\n>\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { BehaviorSubject } from \"rxjs\";\n\nimport { IDataField, IDataFieldsConfig } from \"@nova-ui/bits\";\nimport { IAllAround, IAccessors, IChartAssistSeries } from \"@nova-ui/charts\";\n\nimport { IProportionalDonutContentAggregator } from \"../../functions/proportional-aggregators/types\";\nimport {\n ILegendPlacementOption,\n LegendPlacement,\n} from \"../../widget-types/common/widget/legend\";\nimport { IFormatter, IFormatterDefinition } from \"../types\";\n\nexport enum ProportionalWidgetChartTypes {\n DonutChart = \"DonutChart\",\n PieChart = \"PieChart\",\n VerticalBarChart = \"VerticalBarChart\",\n HorizontalBarChart = \"HorizontalBarChart\",\n}\n\nexport interface IProportionalWidgetChartTypeConfiguration {\n id: ProportionalWidgetChartTypes;\n label: string;\n}\n\nexport interface ITickLabelConfig {\n maxWidth: Partial<IAllAround<number>>;\n}\n\nexport interface IProportionalWidgetChartOptions {\n type: ProportionalWidgetChartTypes;\n contentFormatter?: IFormatter;\n legendPlacement?: LegendPlacement;\n legendFormatter?: IFormatter;\n chartFormatterComponentType?: string;\n donutContentConfig?: IDonutContentConfig;\n horizontalBarTickLabelConfig?: ITickLabelConfig;\n}\n\nexport interface IProportionalWidgetConfig {\n chartDonutContentLabel?: string;\n chartDonutContentIcon?: string;\n chartOptions: IProportionalWidgetChartOptions;\n /** Chart and legend will emit an INTERACTION event on click if this property is enabled */\n interactive?: boolean;\n chartColors?: string[] | { [key: string]: string };\n /** set \"true\" if you want for widget configuration to override colors that come built-in data */\n prioritizeWidgetColors?: boolean;\n}\n\nexport interface ILegendFormat {\n displayValue: string;\n formatKey: string;\n}\n\nexport interface IProportionalWidgetChartEditorOptions {\n chartTypes: ProportionalWidgetChartTypes[];\n legendPlacementOptions: ILegendPlacementOption[];\n legendFormats: Array<ILegendFormat>;\n legendFormatters: IFormatterDefinition[];\n contentFormatters?: IFormatterDefinition[];\n}\n\nexport interface IDonutContentConfig {\n formatter: IFormatter;\n aggregator: IProportionalDonutContentAggregator;\n}\n\nexport interface IProportionalDataFieldsConfig extends IDataFieldsConfig {\n chartSeriesDataFields$: BehaviorSubject<IDataField[]>;\n}\n\nexport interface IProportionalWidgetData\n extends IChartAssistSeries<IAccessors> {\n link?: string;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport {\n barAccessors,\n barGrid,\n BarRenderer,\n barScales,\n BarSeriesHighlightStrategy,\n ChartAssist,\n IAccessors,\n IBarChartConfig,\n IChartAssistSeries,\n IChartMarker,\n IDataSeries,\n IGrid,\n IRadialAccessors,\n IValueProvider,\n PieRenderer,\n radial,\n RadialAccessors,\n radialGrid,\n RadialRenderer,\n radialScales,\n Renderer,\n Scales,\n} from \"@nova-ui/charts\";\n\nimport { ProportionalWidgetChartTypes } from \"../components/proportional-widget/types\";\n\ntype PreprocessorType<T> = (\n this: ChartAssist,\n series: IChartAssistSeries<T>[]\n) => IChartAssistSeries<T>[];\n\nexport interface IChartAttributes<T = IAccessors> {\n grid: IGrid;\n accessors: IAccessors;\n renderer: Renderer<IAccessors>;\n scales: Scales;\n preprocessor?: PreprocessorType<T>;\n}\n\ninterface IChartTools<T = IAccessors> {\n config?: IBarChartConfig;\n preprocessor?: PreprocessorType<T>;\n gridFunction: () => IGrid;\n rendererFunction: () => Renderer<IAccessors>;\n accessorFunction: (\n colors?: IValueProvider<string>,\n markers?: IValueProvider<IChartMarker>\n ) => IAccessors;\n scaleFunction: () => Scales;\n}\n\n@Injectable()\nexport class CategoryChartUtilService {\n /**\n * Combines each of IDataSeries with accessors, renderer and scales provided\n *\n * @param data\n * @param accessors\n * @param renderer\n * @param scales\n *\n * @returns resulting set of IChartAssistSeries\n */\n public static buildChartSeries(\n data: IDataSeries<IAccessors>[],\n accessors: IAccessors,\n renderer: Renderer<IAccessors>,\n scales: Scales\n ): IChartAssistSeries<IAccessors>[] {\n const result = (data || []).map((s) => ({\n ...s,\n accessors,\n renderer,\n scales,\n }));\n return result;\n }\n\n public static getChartAttributes(\n chartType: ProportionalWidgetChartTypes,\n colors?: IValueProvider<string>,\n markers?: IValueProvider<IChartMarker>\n ): IChartAttributes | IChartAttributes<IRadialAccessors> {\n const t: IChartTools | IChartTools<IRadialAccessors> =\n CategoryChartUtilService.getChartTools(chartType);\n const result: IChartAttributes | IChartAttributes<IRadialAccessors> = {\n grid: t.gridFunction(),\n accessors: t.accessorFunction(colors, markers),\n renderer: t.rendererFunction(),\n scales: t.scaleFunction(),\n };\n\n if (t.preprocessor) {\n result.preprocessor =\n t.preprocessor as PreprocessorType<IRadialAccessors>;\n }\n return result;\n }\n\n private static getChartTools(\n chartType: ProportionalWidgetChartTypes\n ): IChartTools | IChartTools<IRadialAccessors> {\n const radialChartAccessors = (colors: IValueProvider<string>) => {\n const accessors = new RadialAccessors(colors);\n accessors.series.color = (seriesId, series) =>\n series.color ?? colors.get(seriesId);\n return accessors;\n };\n\n function barChartAccessors(\n colors?: IValueProvider<string>,\n markers?: IValueProvider<IChartMarker>\n ) {\n // TODO: Refactor to accept config reference from arguments not from outer context\n // @ts-ignore: TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.;\n // An outer value of 'this' is shadowed by this container.\n const accessors = barAccessors(this.config, colors, markers);\n accessors.series.color = (seriesId, series) =>\n series.color ?? colors?.get(seriesId);\n // TODO: Remove custom accessor after fixing NUI-3688 in charts\n accessors.data.value = (d: any) =>\n Number.isFinite(d) ? d : d.value;\n return accessors;\n }\n\n const chartTools: Record<\n ProportionalWidgetChartTypes,\n IChartTools<IRadialAccessors> | IChartTools\n > = {\n [ProportionalWidgetChartTypes.DonutChart]: {\n preprocessor: radial,\n gridFunction: radialGrid,\n rendererFunction: () => new RadialRenderer(),\n // TODO: replace with correct type\n accessorFunction: radialChartAccessors as (\n colors?: IValueProvider<string>,\n markers?: IValueProvider<IChartMarker>\n ) => IAccessors,\n scaleFunction: radialScales,\n },\n [ProportionalWidgetChartTypes.PieChart]: {\n preprocessor: radial,\n gridFunction: radialGrid,\n rendererFunction: () => new PieRenderer(),\n // TODO: replace with correct type\n accessorFunction: radialChartAccessors as (\n colors?: IValueProvider<string>,\n markers?: IValueProvider<IChartMarker>\n ) => IAccessors,\n scaleFunction: radialScales,\n },\n [ProportionalWidgetChartTypes.HorizontalBarChart]: {\n config: { horizontal: true },\n gridFunction() {\n return barGrid(this.config);\n },\n rendererFunction: () =>\n new BarRenderer({\n highlightStrategy: new BarSeriesHighlightStrategy(\"y\"),\n }),\n accessorFunction: barChartAccessors,\n scaleFunction() {\n return barScales(this.config);\n },\n },\n [ProportionalWidgetChartTypes.VerticalBarChart]: {\n config: { horizontal: false },\n gridFunction() {\n return barGrid(this.config);\n },\n rendererFunction: () =>\n new BarRenderer({\n highlightStrategy: new BarSeriesHighlightStrategy(\"x\"),\n }),\n accessorFunction: barChartAccessors,\n scaleFunction() {\n return barScales(this.config);\n },\n },\n };\n\n return chartTools[chartType];\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n KeyValueDiffer,\n KeyValueDiffers,\n NgZone,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport isEqual from \"lodash/isEqual\";\nimport some from \"lodash/some\";\nimport { Subscription } from \"rxjs\";\n\nimport {\n EventBus,\n IDataSource,\n IEvent,\n LoggerService,\n UnitConversionService,\n} from \"@nova-ui/bits\";\nimport {\n Chart,\n ChartAssist,\n ChartDonutContentPlugin,\n ChartPalette,\n defaultColorProvider,\n IAccessors,\n IChartAssistSeries,\n IChartPalette,\n IValueProvider,\n MappedValueProvider,\n Renderer,\n Scales,\n SELECT_DATA_POINT_EVENT,\n SequentialColorProvider,\n XYGridConfig,\n} from \"@nova-ui/charts\";\n\nimport { DashboardUnitConversionPipe } from \"../../common/pipes/dashboard-unit-conversion-pipe\";\nimport { CategoryChartUtilService } from \"../../services/category-chart-util.service\";\nimport { INTERACTION } from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IHasChangeDetector,\n PIZZAGNA_EVENT_BUS,\n WellKnownDataSourceFeatures,\n} from \"../../types\";\nimport { LegendPlacement } from \"../../widget-types/common/widget/legend\";\nimport { IFormatter } from \"../types\";\nimport {\n IProportionalWidgetData,\n IProportionalWidgetConfig,\n ProportionalWidgetChartTypes,\n} from \"./types\";\n\n/** @ignore */\n@Component({\n selector: \"nui-proportional-widget\",\n templateUrl: \"./proportional-widget.component.html\",\n styleUrls: [\"./proportional-widget.component.less\"],\n encapsulation: ViewEncapsulation.Emulated,\n // TODO: uncomment when NUI-4307 is fixed\n // changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProportionalWidgetComponent\n implements AfterViewInit, OnChanges, IHasChangeDetector, OnDestroy\n{\n static lateLoadKey = \"ProportionalWidgetComponent\";\n private static NO_SWITCH_LAYOUT_INTERVAL_SIZE = 20;\n private static MAX_ROW_LAYOUT_SIZE = 360;\n private static TICK_LABEL_MAX_WIDTH = 75;\n\n @Input() public widgetData: IProportionalWidgetData[];\n @Input() public configuration: IProportionalWidgetConfig;\n @Input() @HostBinding(\"class\") public elementClass: string;\n @Input() public seriesToIconMap: { [seriesId: string]: string }; // will be defined using dataSource\n\n public chartAssist: ChartAssist;\n public accessors: IAccessors;\n public donutContentPlugin: ChartDonutContentPlugin | null;\n public legendUnitLabel: string;\n public legendFormatter: IFormatter | undefined;\n public contentFormatter: IFormatter | undefined;\n public chartFormatterComponentType: string | undefined;\n public contentFormatterProperties: any;\n public prioritizedGridRows = {\n right: false,\n bottom: false,\n };\n\n private differ: KeyValueDiffer<any, any>;\n\n private renderer: Renderer<IAccessors>;\n private scales: Scales;\n private chartPalette: IChartPalette = new ChartPalette(\n defaultColorProvider()\n );\n private proportionalWidgetResizeObserver: ResizeObserver;\n private unitConversionPipe: DashboardUnitConversionPipe;\n\n @ViewChild(\"gridContainer\", { static: true })\n private gridContainer: ElementRef;\n\n private chartTypeSubscription$: Subscription;\n\n public get interactive(): boolean {\n return (\n this.configuration?.interactive ||\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.Interactivity\n )?.enabled ||\n false\n );\n }\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private ngZone: NgZone,\n private kvDiffers: KeyValueDiffers,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n @Inject(DATA_SOURCE) private dataSource: IDataSource,\n private logger: LoggerService,\n unitConversionService: UnitConversionService\n ) {\n this.differ = this.kvDiffers.find(this.prioritizedGridRows).create();\n this.unitConversionPipe = new DashboardUnitConversionPipe(\n unitConversionService\n );\n }\n\n // Note: Using this helper method to be able to use\n // optional method chaining and prevent strict mode error\n public computeLegendTileValue(legendSeries: unknown): string | undefined {\n // @ts-ignore: Suppressing series null parameter value error to avoid breaking default flow\n return this.accessors.data?.value?.(legendSeries, 0, null, null);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n const newChartColors = changes.configuration?.currentValue?.chartColors;\n const prevChartColors =\n changes.configuration?.previousValue?.chartColors;\n\n if (changes.widgetData || !isEqual(newChartColors, prevChartColors)) {\n this.updateChartColors();\n }\n\n if (changes.configuration) {\n const newChartType =\n changes.configuration.currentValue.chartOptions.type;\n const prevChartType =\n changes.configuration.previousValue &&\n changes.configuration.previousValue.chartOptions.type;\n\n // configure the chart\n if (newChartType && newChartType !== prevChartType) {\n this.buildChart(newChartType);\n\n if (this.widgetData) {\n this.updateChart();\n }\n }\n\n this.legendFormatter =\n this.configuration.chartOptions.legendFormatter;\n this.contentFormatter =\n this.configuration.chartOptions.contentFormatter;\n this.chartFormatterComponentType =\n this.configuration.chartOptions.chartFormatterComponentType;\n\n this.getContentFormatterProperties();\n\n this.changeDetector.markForCheck();\n }\n\n if (changes.widgetData) {\n if (this.chartAssist) {\n this.updateChart();\n this.getContentFormatterProperties();\n this.changeDetector.markForCheck();\n }\n }\n }\n\n public ngAfterViewInit(): void {\n this.handleGridFlowOnResize();\n }\n\n public ngOnDestroy(): void {\n this.proportionalWidgetResizeObserver?.disconnect();\n this.chartTypeSubscription$?.unsubscribe();\n }\n\n public getContentFormatterProperties(): void {\n this.contentFormatterProperties = {\n data: this.widgetData,\n config: this.configuration,\n chartAssist: this.chartAssist,\n properties: this.contentFormatter?.properties,\n };\n }\n\n /** Checks if chart is donut. */\n public isDonutChart(): boolean {\n return (\n this.configuration.chartOptions.type ===\n ProportionalWidgetChartTypes.DonutChart\n );\n }\n\n /** Checks if chart is radial. */\n public isRadialChart(): boolean {\n return (\n [\n ProportionalWidgetChartTypes.DonutChart,\n ProportionalWidgetChartTypes.PieChart,\n ].indexOf(this.configuration.chartOptions.type) !== -1\n );\n }\n\n /** Checks if legend should be shown. */\n public hasLegend(): boolean {\n return (\n this.configuration.chartOptions.legendPlacement !==\n LegendPlacement.None\n );\n }\n\n /** Checks if legend should be aligned to right. */\n public legendShouldBeAlignedRight(): boolean {\n return (\n this.configuration.chartOptions.legendPlacement ===\n LegendPlacement.Right\n );\n }\n\n public onInteraction(data: any): void {\n if (!this.interactive) {\n return;\n }\n\n this.eventBus.getStream(INTERACTION).next({ payload: { data } });\n }\n\n /** Configures the chart options */\n private buildChart(chartType: ProportionalWidgetChartTypes): void {\n this.donutContentPlugin = null;\n const { grid, accessors, renderer, scales, preprocessor } =\n CategoryChartUtilService.getChartAttributes(\n chartType,\n this.chartPalette?.standardColors\n );\n // TODO: Refactor this to be able to pass different types of preprocessor to get rid of the any\n this.chartAssist = new ChartAssist(\n new Chart(grid),\n <any>preprocessor,\n this.chartPalette\n );\n this.renderer = renderer;\n this.accessors = accessors;\n this.scales = scales;\n if (this.isDonutChart()) {\n this.donutContentPlugin = new ChartDonutContentPlugin();\n this.chartAssist.chart.addPlugin(this.donutContentPlugin);\n }\n\n if (\n this.configuration.chartOptions.type ===\n ProportionalWidgetChartTypes.HorizontalBarChart\n ) {\n this.scales.x.formatters.tick = (\n value: string | number | undefined\n ) => this.unitConversionPipe.transform(value);\n this.applyTickLabelMaxWidths();\n } else if (\n this.configuration.chartOptions.type ===\n ProportionalWidgetChartTypes.VerticalBarChart\n ) {\n this.scales.y.formatters.tick = (\n value: string | number | undefined\n ) => this.unitConversionPipe.transform(value);\n }\n\n this.chartTypeSubscription$?.unsubscribe();\n this.chartTypeSubscription$ = this.chartAssist.chart\n .getEventBus()\n .getStream(SELECT_DATA_POINT_EVENT)\n .subscribe((event) => {\n // event payload is a data point from the chart - since we display one data point for every series,\n // we convert the data point to the original series\n const series = this.widgetData.find(\n (s) => s.id === event.data.seriesId\n );\n this.onInteraction(series);\n });\n }\n\n private handleGridFlowOnResize(): void {\n this.proportionalWidgetResizeObserver = new ResizeObserver(() =>\n this.onResize()\n );\n this.ngZone.runOutsideAngular(() => {\n this.proportionalWidgetResizeObserver.observe(\n this.gridContainer.nativeElement\n );\n });\n }\n\n private applyTickLabelMaxWidths() {\n const gridConfigAxis = (\n this.chartAssist.chart.getGrid().config() as XYGridConfig\n ).axis;\n\n gridConfigAxis.left.tickLabel.maxWidth =\n this.configuration.chartOptions.horizontalBarTickLabelConfig\n ?.maxWidth?.left ??\n ProportionalWidgetComponent.TICK_LABEL_MAX_WIDTH;\n gridConfigAxis.right.tickLabel.maxWidth =\n this.configuration.chartOptions.horizontalBarTickLabelConfig\n ?.maxWidth?.right ??\n ProportionalWidgetComponent.TICK_LABEL_MAX_WIDTH;\n }\n\n private onResize(): void {\n if (this.isContainerInNoSwitchLayoutInterval()) {\n return;\n }\n\n switch (this.configuration.chartOptions.legendPlacement) {\n case LegendPlacement.Bottom:\n this.prioritizedGridRows.bottom =\n this.containerHasRowLayoutWidth();\n break;\n case LegendPlacement.Right:\n this.prioritizedGridRows.right =\n this.containerHasRowLayoutWidth();\n break;\n }\n\n if (this.differ.diff(this.prioritizedGridRows)) {\n this.changeDetector.detectChanges();\n }\n }\n\n private isContainerInNoSwitchLayoutInterval(): boolean {\n const containerWidth =\n this.gridContainer.nativeElement.getBoundingClientRect().width;\n return (\n containerWidth >\n ProportionalWidgetComponent.MAX_ROW_LAYOUT_SIZE -\n ProportionalWidgetComponent.NO_SWITCH_LAYOUT_INTERVAL_SIZE /\n 2 &&\n containerWidth <\n ProportionalWidgetComponent.MAX_ROW_LAYOUT_SIZE +\n ProportionalWidgetComponent.NO_SWITCH_LAYOUT_INTERVAL_SIZE /\n 2\n );\n }\n\n private containerHasRowLayoutWidth(): boolean {\n const containerWidth =\n this.gridContainer.nativeElement.getBoundingClientRect().width;\n return containerWidth < ProportionalWidgetComponent.MAX_ROW_LAYOUT_SIZE;\n }\n\n /** Builds the chart */\n private updateChart(): void {\n this.chartAssist.update(\n CategoryChartUtilService.buildChartSeries(\n this.widgetData,\n this.accessors,\n this.renderer,\n this.scales\n )\n );\n }\n\n private updateChartColors(): void {\n let colorProvider: IValueProvider<string>;\n\n const dataColors = this.widgetData?.map((v) => v.color);\n const configurationColors = this.configuration.chartColors;\n\n if (!this.configuration.prioritizeWidgetColors && some(dataColors)) {\n colorProvider = this.getDataDriverColorProvider(this.widgetData);\n } else if (configurationColors) {\n colorProvider =\n this.getConfigurationColorProvider(configurationColors);\n } else {\n colorProvider = defaultColorProvider();\n }\n\n this.chartPalette = new ChartPalette(colorProvider);\n this.buildChart(this.configuration?.chartOptions.type);\n if (this.chartAssist) {\n this.chartAssist.palette = this.chartPalette;\n this.updateChart();\n }\n }\n\n private getDataDriverColorProvider(\n widgetData: IChartAssistSeries<IAccessors<any>>[]\n ): IValueProvider<string> {\n let colorProvider: IValueProvider<string>;\n\n const dataColors = widgetData?.map((v) => v.color).filter((v) => !!v);\n\n if (dataColors.length === widgetData.length) {\n const colorMap = widgetData.reduce(\n (acc: { [key: string]: string }, next) => {\n acc[next.id] = next.color;\n return acc;\n },\n {}\n );\n colorProvider = new MappedValueProvider<string>(colorMap);\n } else {\n const widgetDataWithColor = widgetData.filter(\n (series) => series.color\n );\n\n this.logger.warn(\n `Not all series have colors set, setting default pallette. Current series color config: ${JSON.stringify(\n widgetDataWithColor\n )}`\n );\n colorProvider = defaultColorProvider();\n }\n\n return colorProvider;\n }\n\n private getConfigurationColorProvider(\n configurationColors:\n | string[]\n | {\n [key: string]: string;\n }\n ): IValueProvider<string> {\n let colorProvider: IValueProvider<string>;\n\n // remove data colors since nui-chart takes them into consideration no matter what\n if (this.configuration.prioritizeWidgetColors && this.widgetData) {\n this.widgetData = this.widgetData.map((origin) => {\n const series = { ...origin };\n if (series.color) {\n delete series.color;\n }\n return series;\n });\n }\n\n if (Array.isArray(configurationColors)) {\n colorProvider = new SequentialColorProvider(configurationColors);\n } else {\n const setupColorsLength = Object.keys(configurationColors).length;\n if (setupColorsLength === this.widgetData?.length) {\n colorProvider = new MappedValueProvider(configurationColors);\n } else {\n // eslint-disable-next-line max-len\n this.logger.warn(\n `Not all series have colors set, setting default pallette. Current series color config: ${JSON.stringify(\n configurationColors\n )}`\n );\n colorProvider = defaultColorProvider();\n }\n }\n\n return colorProvider;\n }\n}\n","<div\n #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\n class=\"d-flex chart has-overlay\"\n *ngIf=\"widgetData && widgetData.length > 0 && chartAssist\"\n >\n <nui-chart class=\"w-100\" [chart]=\"chartAssist.chart\"></nui-chart>\n <nui-chart-donut-content\n *ngIf=\"donutContentPlugin\"\n class=\"nui-proportional-widget__chart-donut-content\"\n [plugin]=\"donutContentPlugin\"\n >\n <div\n class=\"h-100 w-100 d-flex justify-content-center align-items-center text-center\"\n >\n <div class=\"d-inline-block\" nuiZoomContent [useZoom]=\"false\">\n <!-- OLD CONFIG HERE -->\n <ng-container\n *ngIf=\"!configuration?.chartOptions?.donutContentConfig\"\n >\n <ng-container\n nuiComponentPortal\n [componentType]=\"\n contentFormatter?.componentType ||\n 'DonutContentRawFormatterComponent'\n \"\n [properties]=\"contentFormatterProperties\"\n #componentPortal2=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal2.portal\"\n (attached)=\"componentPortal2.attached($event)\"\n ></ng-template>\n </ng-container>\n </ng-container>\n\n <!-- NEW CONFIG HERE -->\n <ng-container\n *ngIf=\"configuration?.chartOptions?.donutContentConfig\"\n >\n <nui-proportional-donut-content\n [widgetData]=\"widgetData\"\n [donutConfig]=\"\n configuration?.chartOptions?.donutContentConfig\n \"\n [chartAssist]=\"chartAssist\"\n ></nui-proportional-donut-content>\n </ng-container>\n </div>\n </div>\n </nui-chart-donut-content>\n </div>\n <div\n class=\"w-100 d-flex legend\"\n [ngClass]=\"[\n legendShouldBeAlignedRight() ? 'scrollable' : 'legend-bottom'\n ]\"\n *ngIf=\"hasLegend() && chartAssist\"\n >\n <nui-legend\n class=\"w-100 m-auto\"\n [interactive]=\"false\"\n (mouseleave)=\"chartAssist.resetVisibleSeries()\"\n [orientation]=\"\n legendShouldBeAlignedRight() ? 'vertical' : 'horizontal'\n \"\n >\n <nui-legend-series\n class=\"proportional-chart__legend-series\"\n *ngFor=\"\n let legendSeries of chartAssist.legendSeriesSet;\n trackBy: chartAssist.seriesTrackByFn;\n let i = index\n \"\n [ngClass]=\"\n (prioritizedGridRows.right || prioritizedGridRows.bottom) &&\n 'description-min-width--unset'\n \"\n [isSelected]=\"!chartAssist.isSeriesHidden(legendSeries.id)\"\n (isSelectedChange)=\"\n chartAssist.toggleSeries(legendSeries.id, $event)\n \"\n [seriesRenderState]=\"\n chartAssist.renderStatesIndex[legendSeries.id]?.state\n \"\n (mouseenter)=\"chartAssist.emphasizeSeries(legendSeries.id)\"\n (click)=\"onInteraction(legendSeries)\"\n [class.nui-proportional-widget__legend--interactive]=\"\n interactive\n \"\n >\n <div\n *ngIf=\"\n legendFormatter && legendFormatter.componentType;\n else legendDefaultTile\n \"\n >\n <div description>\n <ng-container\n nuiComponentPortal\n [componentType]=\"legendFormatter.componentType\"\n [properties]=\"{ data: widgetData[i] }\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n </div>\n <ng-template #legendDefaultTile>\n <nui-rich-legend-tile\n [value]=\"\n computeLegendTileValue(legendSeries.data[0])\n | nuiDashboardUnitConversion\n \"\n [unitLabel]=\"legendUnitLabel\"\n [color]=\"\n chartAssist.palette.textColors.get(legendSeries.id)\n \"\n [backgroundColor]=\"\n chartAssist.palette.standardColors.get(\n legendSeries.id\n )\n \"\n >\n </nui-rich-legend-tile>\n\n <nui-icon\n legendTransclusion\n *ngIf=\"\n seriesToIconMap && seriesToIconMap[legendSeries.id]\n \"\n class=\"align-items-center\"\n [icon]=\"seriesToIconMap[legendSeries.id]\"\n ></nui-icon>\n\n <div\n description\n class=\"description-container d-flex flex-column nui-text-small justify-content-center\"\n >\n <div\n *ngIf=\"!legendSeries.link\"\n class=\"description description-primary\"\n [ngClass]=\"{\n 'nui-text-link-small link': interactive\n }\"\n >\n {{ legendSeries.name }}\n </div>\n <a\n 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 >\n {{ legendSeries.name }}\n </a>\n </div>\n </ng-template>\n </nui-legend-series>\n </nui-legend>\n </div>\n <div\n *ngIf=\"!widgetData || widgetData.length === 0 || !chartAssist\"\n class=\"mb-3 mt-3 d-flex align-items-center justify-content-center\"\n >\n <nui-image image=\"no-data-to-show\"></nui-image>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Directive, HostListener, Input } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\n@Directive({\n selector: \"[nuiDelayedMousePresenceDetection]\",\n})\nexport class DelayedMousePresenceDetectionDirective {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input(\"nuiDelayedMousePresenceDetection\") public enabled: boolean = true;\n @Input() mousePresentSubject: Subject<boolean>;\n @Input() delay: number = 500;\n\n private timeout: NodeJS.Timeout;\n\n @HostListener(\"mouseenter\") onHostMouseenter() {\n if (!this.enabled) {\n return;\n }\n this.timeout = setTimeout(() => {\n this.mousePresentSubject.next(true);\n }, this.delay);\n }\n\n @HostListener(\"click\") onHostClick() {\n if (!this.enabled) {\n return;\n }\n this.mousePresentSubject.next(true);\n }\n\n @HostListener(\"mouseleave\") onHostMouseleave() {\n if (!this.enabled) {\n return;\n }\n clearTimeout(this.timeout);\n\n this.mousePresentSubject.next(false);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport isNil from \"lodash/isNil\";\nimport { debounceTime, takeUntil } from \"rxjs/operators\";\n\nimport { IFilter } from \"@nova-ui/bits\";\n\nimport { REFRESH } from \"../../../services/types\";\nimport { PizzagnaLayer } from \"../../../types\";\nimport { TableWidgetComponent } from \"../public-api\";\n\n@Injectable()\nexport class SearchFeatureAddonService {\n private widget: TableWidgetComponent; // TODO: generic widget\n\n private searchDebounceTime = 500;\n\n public initWidget(widget: TableWidgetComponent) {\n this.widget = widget;\n this.initSearch();\n }\n\n private initSearch() {\n this.defineSearch();\n\n const dsFeaturesChange =\n this.widget.dataSource?.features?.featuresChanged;\n if (dsFeaturesChange) {\n dsFeaturesChange\n .pipe(takeUntil(this.widget.onDestroy$))\n .subscribe(() => {\n this.defineSearch();\n });\n }\n }\n\n private registerSearch() {\n if (this.widget.dataSource) {\n this.widget.dataSource.registerComponent({\n search: {\n componentInstance: {\n getFilters: () =>\n <IFilter<string>>{\n type: \"search\",\n value: this.widget.searchValue,\n },\n },\n },\n });\n }\n }\n\n private deregisterSearch() {\n if (this.widget.dataSource) {\n this.widget.dataSource.deregisterComponent?.(\"search\");\n }\n }\n\n private defineSearch() {\n const searchConfiguration =\n this.widget.configuration?.searchConfiguration;\n const searchDsConfig =\n this.widget.dataSource.features?.getFeatureConfig(\"search\");\n\n this.widget.isSearchEnabled = !!(\n searchConfiguration?.enabled && searchDsConfig?.enabled\n );\n\n if (this.widget.isSearchEnabled) {\n this.widget.searchValue = searchConfiguration?.searchTerm || \"\";\n this.registerSearch();\n this.searchDebounceTime = !isNil(\n searchConfiguration?.searchDebounce\n )\n ? // Note: asserting value to prevent compilation error on unable to infer correct type\n (searchConfiguration?.searchDebounce as number)\n : this.searchDebounceTime;\n this.watchSearchTerm();\n } else {\n this.deregisterSearch();\n }\n }\n\n private watchSearchTerm() {\n this.widget.searchTerm$\n .pipe(\n debounceTime(this.searchDebounceTime),\n takeUntil(this.widget.onDestroy$)\n )\n .subscribe(() => {\n this.widget.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Configuration,\n componentId: this.widget.componentId,\n propertyPath: [\n \"configuration.searchConfiguration.searchTerm\",\n ],\n },\n this.widget.searchValue\n );\n this.widget.eventBus.getStream(REFRESH).next(undefined);\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ListRange } from \"@angular/cdk/collections\";\nimport { Injectable } from \"@angular/core\";\nimport { merge } from \"rxjs\";\nimport { filter, map, takeUntil, tap } from \"rxjs/operators\";\n\nimport { INovaFilters, nameof } from \"@nova-ui/bits\";\n\nimport { SCROLL_NEXT_PAGE } from \"../../../services/types\";\nimport { TableWidgetComponent } from \"../public-api\";\n\n@Injectable()\nexport class VirtualScrollFeatureAddonService {\n private widget: TableWidgetComponent; // TODO: generic widget\n\n public visibleItems: unknown[] = [];\n\n public initWidget(widget: TableWidgetComponent) {\n this.widget = widget;\n }\n\n public initVirtualScroll() {\n if (this.widget.hasVirtualScroll) {\n this.registerVirtualScroll();\n } else {\n this.deregisterVirtualScroll();\n }\n }\n\n private registerVirtualScroll() {\n if (this.widget.dataSource) {\n this.widget.dataSource.registerComponent({\n [nameof<INovaFilters>(\"virtualScroll\")]: {\n componentInstance: this.widget.viewportManager,\n },\n });\n }\n }\n\n private deregisterVirtualScroll() {\n if (this.widget.dataSource) {\n this.widget.dataSource.deregisterComponent?.(\n nameof<INovaFilters>(\"virtualScroll\")\n );\n }\n }\n\n /**\n * Subscribe to virtual scroll rendered items and fetches next items\n */\n public subscribeToVirtualScroll() {\n if (!this.widget.vscrollViewport) {\n return;\n }\n\n // Note: Using this additional stream to pass the visible range to\n // the table and trigger change detection on range change and table data update.\n merge(\n this.widget.vscrollViewport.renderedRangeStream,\n this.widget.tableUpdate$.pipe(\n map(() => this.widget.vscrollViewport?.getRenderedRange())\n )\n )\n .pipe(\n tap((range: ListRange | undefined) => {\n this.visibleItems = this.widget.tableData.slice(\n range?.start,\n range?.end\n );\n // Since we're using onPush strategy we should trigger CD manually to ensure that visible items are updated properly\n this.widget.changeDetector.detectChanges();\n }),\n takeUntil(this.widget.onDestroy$)\n )\n .subscribe();\n\n this.widget.viewportManager\n .setViewport(this.widget.vscrollViewport)\n .observeNextPage$({\n pageSize: this.widget.range,\n emitFirstPage: true,\n })\n .pipe(\n // Note: A special check to keep our server-client-side sorting in place\n filter(\n (range) =>\n range.end >=\n (this.widget.vscrollViewport?.getDataLength() ?? 0)\n ),\n tap((range) =>\n this.widget.zone.run(() => {\n // TODO: Remove \"page\" in V10. Compute page on datasource level. - NUI-5830\n // @ts-ignore: Provide a proper interface to DS\n this.widget.dataSource.page =\n range.end / (range.end - range.start);\n this.widget.eventBus\n .getStream(SCROLL_NEXT_PAGE)\n .next(undefined);\n this.widget.changeDetector.detectChanges();\n })\n ),\n takeUntil(this.widget.onDestroy$)\n )\n .subscribe();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CdkVirtualScrollViewport } from \"@angular/cdk/scrolling\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n QueryList,\n SimpleChange,\n SimpleChanges,\n ViewChild,\n ViewChildren,\n} from \"@angular/core\";\nimport get from \"lodash/get\";\nimport isEqual from \"lodash/isEqual\";\nimport omit from \"lodash/omit\";\nimport { BehaviorSubject, merge, Observable, of, Subject } from \"rxjs\";\nimport { filter, map, take, takeUntil, tap } from \"rxjs/operators\";\n\nimport {\n DEFAULT_INTERACTIVE_ELEMENTS,\n EventBus,\n IDataField,\n IDataSource,\n IEvent,\n IFilter,\n ISortedItem,\n LoggerService,\n SorterDirection,\n TableAlignmentOptions,\n TableComponent,\n TableRowComponent,\n VirtualViewportManager,\n} from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { TableFormatterRegistryService } from \"../../services/table-formatter-registry.service\";\nimport {\n INTERACTION,\n REFRESH,\n WIDGET_READY,\n WIDGET_RESIZE,\n} from \"../../services/types\";\nimport { WidgetConfigurationService } from \"../../services/widget-configuration.service\";\nimport {\n DATA_SOURCE,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n WellKnownDataSourceFeatures,\n} from \"../../types\";\nimport { ITableFormatterDefinition } from \"../types\";\nimport { SearchFeatureAddonService } from \"./addons/search-feature-addon.service\";\nimport { VirtualScrollFeatureAddonService } from \"./addons/virtual-scroll-feature-addon.service\";\nimport { ITableWidgetColumnConfig, ITableWidgetConfig } from \"./types\";\n\n/**\n * @ignore\n */\n@Component({\n selector: \"nui-table-widget\",\n templateUrl: \"./table-widget.component.html\",\n styleUrls: [\"./table-widget.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SearchFeatureAddonService, VirtualScrollFeatureAddonService],\n host: {\n // Note: Moved here from configuration to ensure that consumers will not override it.\n // Used to prevent table overflowing preview container in the edit/configuration mode.\n \"[class.table-widget-fullwidth]\": \"true\",\n },\n})\nexport class TableWidgetComponent\n implements AfterViewInit, OnChanges, OnDestroy, OnInit\n{\n static lateLoadKey = \"TableWidgetComponent\";\n\n @Input() public widgetData: any[];\n @Input() public componentId: string;\n @Input() public configuration: ITableWidgetConfig;\n @Input() public dataFields: IDataField[];\n @Input() public totalItems: number;\n // 70 px stands for widget header and margins\n @Input() public indentFromTop: number = 70;\n @Input() public sortable: boolean = true;\n @Input() public delayedMousePresenceDetectionEnabled: boolean = true;\n\n @Input()\n public set range(value: number) {\n this._range = value;\n }\n\n public get range(): number {\n return this.getTableScrollRange();\n }\n\n public get headerTooltipsEnabled(): boolean {\n // Note: If tooltip state is not provided treat is as true;\n return this.configuration.headerTooltipsEnabled ?? true;\n }\n\n @Input() @HostBinding(\"class\") public elementClass: string;\n\n public tableData: any[] = [];\n public headers: string[];\n public sortedColumn: ISortedItem;\n public columns: ITableWidgetColumnConfig[] = [];\n public columnsWidthMap: Map<string, number | undefined> = new Map<\n string,\n number | undefined\n >();\n public hasVirtualScroll: boolean = true;\n public tableContainerHeight: number;\n public isSearchEnabled: boolean = false;\n public searchTerm$ = new Subject<string>();\n public searchValue: string;\n public onDestroy$: Subject<void> = new Subject<void>();\n public tableUpdate$: Subject<void> = new Subject<void>();\n public mousePresent$: BehaviorSubject<boolean> =\n new BehaviorSubject<boolean>(false);\n public rowHeight: number = 24;\n\n public set scrollBuffer(value: number) {\n if (value > 100 || value < 0) {\n throw new Error(\n \"Invalid scroll buffer provided. Required range 1..100\"\n );\n }\n this._scrollBuffer = value;\n }\n\n private _scrollBuffer: number = 0;\n private sortFilter: ISortedItem;\n private totalPages: number = 0;\n private lastPageFetched: number = 0;\n private sortableSet: Record<string, boolean> = {};\n private formatters: {\n version: string;\n items: Record<string, ITableFormatterDefinition>;\n };\n private tableWidgetHeight: number;\n private _range: number;\n\n private readonly defaultColumnAlignment: TableAlignmentOptions = \"left\";\n\n private idle: boolean = false;\n public isBusy: boolean = this.lastPageFetched !== this.totalPages;\n\n @ViewChild(\"widgetTable\") table: TableComponent<any>;\n @ViewChild(CdkVirtualScrollViewport)\n vscrollViewport?: CdkVirtualScrollViewport;\n @ViewChildren(TableRowComponent, { read: ElementRef })\n tableRows: QueryList<ElementRef>;\n\n public get interactive() {\n return (\n this.configuration?.interactive ||\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.Interactivity\n )?.enabled\n );\n }\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) public dataSource: IDataSource,\n @Optional()\n private widgetConfigurationService: WidgetConfigurationService,\n public changeDetector: ChangeDetectorRef,\n public pizzagnaService: PizzagnaService,\n public viewportManager: VirtualViewportManager,\n public zone: NgZone,\n private el: ElementRef,\n private logger: LoggerService,\n private searchAddon: SearchFeatureAddonService,\n public virtualScrollAddon: VirtualScrollFeatureAddonService,\n private formattersRegistryService: TableFormatterRegistryService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.dataFields) {\n if (this.dataFields?.length) {\n this.setSortableSet();\n }\n }\n\n if (changes.widgetData || changes.configuration || changes.dataFields) {\n this.updateTable();\n // Note: CDK Viewport does not have a proper mechanism to identify the changes and trigger checkViewportSize\n // we have to do it manually. Using optional chaining because vscrollViewport can be unavailable at initialization.\n // Related issue: https://github.com/angular/components/issues/10117\n this.vscrollViewport?.checkViewportSize();\n }\n\n if (changes.configuration) {\n // Note: We don't have to trigger sorting in case sortable flag is false.\n // Note: Using true as a default sortable value to maintain backward compatibility\n if (\n this.isSortByUpdated(changes.configuration) &&\n (changes.configuration.currentValue.sortable ?? true)\n ) {\n const sortedColumn = {\n direction: changes.configuration.currentValue\n .sorterConfiguration.descendantSorting\n ? SorterDirection.descending\n : SorterDirection.ascending,\n sortBy: changes.configuration.currentValue\n .sorterConfiguration.sortBy,\n };\n this.onSortOrderChanged(sortedColumn);\n }\n\n const newHasVirtualScroll = get(\n changes,\n \"configuration.currentValue.hasVirtualScroll\",\n true\n ) as boolean;\n if (this.hasVirtualScroll !== newHasVirtualScroll) {\n this.hasVirtualScroll = newHasVirtualScroll;\n this.virtualScrollAddon.initVirtualScroll();\n }\n }\n\n if (changes.totalItems) {\n this.totalPages = Math.floor((this.totalItems ?? 0) / this.range);\n }\n }\n\n public ngOnInit(): void {\n if (this.dataSource) {\n // Since the sortFilter is not initialized, we have to retrieve and set the correct filter value from the configuration before registering it\n this.setSortFilter();\n this.registerSorter();\n this.virtualScrollAddon.initWidget(this);\n }\n }\n\n public ngAfterViewInit(): void {\n if (!this.dataSource) {\n return;\n }\n\n this.dataSource.busy\n ?.pipe(\n tap((isBusy) => (this.isBusy = isBusy)),\n takeUntil(this.onDestroy$)\n )\n .subscribe();\n\n this.virtualScrollAddon.initVirtualScroll();\n this.searchAddon.initWidget(this);\n const tableHeightChanged$: Observable<number> = this.eventBus\n .getStream(WIDGET_RESIZE)\n .pipe(\n filter(\n (event) =>\n event.payload.widgetId ===\n this.widgetConfigurationService.getWidget().id\n ),\n map((event) => event.payload.height)\n );\n\n // subscribing to widget resize event from dashboard and update virtual scroll viewport size\n tableHeightChanged$\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((height) => {\n this.tableContainerHeight = height - this.indentFromTop;\n this.vscrollViewport?.checkViewportSize();\n this.changeDetector.detectChanges();\n });\n\n // Note: Secondary stream used to trigger widget ready event when table is properly displayed and we can start\n // loading data for our virtual scroll\n // setTimeout is needed because this.el.nativeElement.getBoundingClientRect().height is 0 when it switches components from\n // fallback component to table widget and it needs to have height\n setTimeout(() => {\n merge(\n of(this.range * this.rowHeight),\n tableHeightChanged$,\n of(this.el.nativeElement.getBoundingClientRect().height)\n )\n .pipe(\n filter((value) => !!value),\n take(1),\n tap((value) => {\n this.tableWidgetHeight = value;\n this.virtualScrollAddon.subscribeToVirtualScroll();\n this.eventBus.getStream(WIDGET_READY).next(undefined);\n })\n )\n .subscribe();\n });\n }\n\n public ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n this.tableUpdate$.complete();\n this.searchTerm$?.complete();\n\n // erase the error status when this component gets destroyed to prevent an error status leak when changing data sources\n this.pizzagnaService.setProperty(\n {\n componentId: \"bodyContent\",\n propertyPath: [\"fallbackKey\"],\n pizzagnaKey: PizzagnaLayer.Data,\n },\n undefined\n );\n }\n\n /** Checks if table should be displayed */\n public shouldDisplayTable(): boolean {\n const columnsCondition = this.columns.length > 0;\n const dataCondition = this.tableData?.length > 0;\n\n return this.isSearchEnabled ||\n (this.hasVirtualScroll && (this.isBusy || this.idle))\n ? columnsCondition\n : columnsCondition && dataCondition;\n }\n\n public dataTrackBy(index: number, item: any): any {\n return item ? item.id : index;\n }\n\n public columnTrackBy(\n index: number,\n item: ITableWidgetColumnConfig\n ): string {\n return item.id;\n }\n\n /**\n * Handles updating of columns.\n * @param configuration\n */\n public updateColumns(configuration: ITableWidgetConfig): void {\n this.headers = configuration.columns\n .filter((item) => item.isActive)\n .map((item) => item.id);\n const allColumnsHaveWidthSpecified = configuration.columns.every(\n (column) => Boolean(column.width)\n );\n\n const columns = configuration.columns.map((column, index, array) => {\n this.columnsWidthMap.set(column.id, column.width);\n if (allColumnsHaveWidthSpecified) {\n const lastColumn = array[array.length - 1];\n this.columnsWidthMap.set(lastColumn.id, undefined);\n }\n return {\n ...column,\n sortable:\n this.sortableSet[\n column?.formatter?.properties?.dataFieldIds?.value\n ] ?? true,\n };\n });\n\n if (columns.length > 0 && allColumnsHaveWidthSpecified) {\n this.logger.warn(\n `Cannot set width for all columns. Resetting last column width.`\n );\n }\n\n if (this.columns.length !== columns.length) {\n this.columns = [...columns];\n } else {\n // This Object.assign is important. It helps to track changes in column header names\n this.columns.forEach((c, i) => {\n Object.assign(c, columns[i], {});\n });\n }\n }\n\n /**\n * Takes tableData from back-end, columns which are provided in table widget config and dataFields and maps them to data-format\n * which is acceptable by table component.\n * Also it can merge multiple data fields into one column. If you provide more than one dataFieldId in your\n * widget config, they will be merged to an object with needed data. This data can be passed to formatter and displayed\n * in one column.\n * @param tableData\n * @param columns\n * @param dataFields\n * @returns any[]\n */\n public mapTableData(\n tableData: any[],\n columns: ITableWidgetColumnConfig[],\n dataFields: IDataField[]\n ): any[] {\n if (!dataFields || dataFields.length === 0) {\n this.logger.warn(\n \"There are no data fields defined, so table data cannot be displayed.\"\n );\n return [];\n }\n\n return tableData.map((record) => {\n const row = columns.reduce(\n (result: Record<string, any>, column) => {\n const dataFieldIds =\n column.formatter?.properties?.dataFieldIds;\n if (!dataFieldIds) {\n return result;\n }\n\n const data = Object.keys(dataFieldIds).reduce(\n (mapping: Record<string, any>, next) => {\n mapping[next] = record[dataFieldIds[next]];\n return mapping;\n },\n {}\n );\n\n result[column.id] = {\n data,\n ...omit(column.formatter?.properties, \"dataFieldIds\"),\n };\n\n return result;\n },\n {}\n );\n\n // we want to include original record for row interaction\n row.__record = record;\n\n return row;\n });\n }\n\n /**\n * Handles change of sorting. Gets sorted column from columns array.\n * @param event\n */\n public onSortOrderChanged(event: ISortedItem): void {\n this.sortedColumn = event;\n const columnToSort = this.columns.find(\n (column) => column.id === event.sortBy\n );\n if (!columnToSort) {\n return;\n }\n\n const dataFieldIds = columnToSort.formatter?.properties?.dataFieldIds;\n const sortField = dataFieldIds?.value;\n if (!sortField) {\n return;\n }\n const newSortFilter = {\n sortBy: sortField,\n direction: event.direction,\n };\n if (isEqual(newSortFilter, this.sortFilter)) {\n return;\n }\n this.sortFilter = newSortFilter;\n\n // Note: Since we're relying on the CDK Viewport internal logic to perform data load\n // we have to move to the start of the range for dataSource to take correct range,\n // if we will keep old data user can think (NUI-5333) that data is already reloaded.\n // So we're flushing the old data and waiting for new one to avoid confusion.\n this.flushTableData();\n\n this.eventBus.getStream(REFRESH).next(undefined);\n }\n\n public onInteraction(row: any, event: MouseEvent): void {\n if (!this.interactive) {\n return;\n }\n\n const ignoredSelectors =\n this.configuration.interactionIgnoredSelectors ||\n DEFAULT_INTERACTIVE_ELEMENTS;\n\n // avoid emitting events when an ignored element was clicked\n if ((event.target as HTMLElement).closest(ignoredSelectors.join(\",\"))) {\n return;\n }\n\n this.eventBus\n .getStream(INTERACTION)\n .next({ payload: { data: row.__record } });\n }\n\n public onSearchInputChanged(searchTerm: string): void {\n this.searchValue = searchTerm;\n this.searchTerm$.next(\"\");\n }\n\n public getColumnAlignment(\n column: ITableWidgetColumnConfig\n ): TableAlignmentOptions {\n // Note: In case we have provided formatters by old manner (via config)\n // we don't have to proceed with calculations\n if (\n !column?.formatter?.componentType ||\n this.formattersRegistryService.isEmpty\n ) {\n return this.defaultColumnAlignment;\n }\n\n // Note: We don't want to invoke getFormattersMap() on every change detection cycle\n // but only when it was changed\n if (\n this.formatters?.version !==\n this.formattersRegistryService.stateVersion\n ) {\n this.formatters = {\n // Transforming array into map\n items: this.formattersRegistryService.getItems().reduce(\n (prev, next) => ({\n ...prev,\n [next.componentType]: next,\n }),\n {}\n ),\n version: this.formattersRegistryService.stateVersion,\n };\n }\n\n return (\n this.formatters.items[column.formatter.componentType]?.alignment ||\n this.defaultColumnAlignment\n );\n }\n\n private setSortFilter() {\n if (this.configuration) {\n const sortBy = this.configuration.sorterConfiguration?.sortBy;\n const columnValue = this.configuration.columns?.find(\n (column) => column.id === sortBy\n )?.formatter?.properties?.dataFieldIds?.value;\n\n this.sortFilter = {\n direction: this.configuration.sorterConfiguration\n ?.descendantSorting\n ? SorterDirection.descending\n : SorterDirection.ascending,\n sortBy: columnValue,\n };\n }\n }\n\n /**\n * Checks if column id has changed or if sorting order has changed\n * @param state\n */\n private isSortByUpdated(configuration: SimpleChange) {\n const oldSorterConfiguration =\n configuration.previousValue?.sorterConfiguration;\n const newSorterConfiguration =\n configuration.currentValue.sorterConfiguration;\n const oldSortById = oldSorterConfiguration?.sortBy;\n const newSortById = newSorterConfiguration?.sortBy;\n if (!newSortById) {\n return Boolean(oldSortById);\n }\n\n const equalSortingState =\n oldSortById === newSortById &&\n newSorterConfiguration.descendantSorting ===\n oldSorterConfiguration.descendantSorting;\n\n return !equalSortingState;\n }\n\n /**\n * Updates table columns and maps table data.\n */\n private updateTable() {\n if (this.widgetData && this.dataFields && this.configuration.columns) {\n this.updateColumns(this.configuration);\n this.idle = false;\n this.tableData = this.mapTableData(\n this.widgetData,\n this.configuration.columns,\n this.dataFields\n );\n this.tableUpdate$.next();\n this.changeDetector.detectChanges();\n }\n }\n\n /**\n * Registers sorter filter.\n */\n private registerSorter() {\n this.dataSource.registerComponent({\n sorter: {\n componentInstance: {\n getFilters: () =>\n <IFilter<ISortedItem>>{\n type: \"sorter\",\n value: this.sortFilter,\n },\n },\n },\n });\n }\n\n private setSortableSet() {\n this.sortableSet = {};\n this.dataFields.forEach((dataField) => {\n this.sortableSet[dataField.id] = dataField.sortable ?? true;\n });\n }\n\n private flushTableData(): void {\n this.idle = true;\n this.tableData = [];\n }\n\n private getTableScrollRange(): number {\n // Note: To work properly virtual viewport should be scrollable\n // to ensure that container will be scrollable we're adding 50% more items\n // Ex: Viewport height: 100px, itemSize: 20px => 5 (range) in current configuration the viewport\n // will not be scrollable/work properly because all the items fits the screen.\n // We're adding 50% more items and in this case, we're covered even the user provides 0% buffer.\n const internalBuffer: number = 2;\n const scrollBuffer: number = (this._scrollBuffer ?? 0) / 100 + 1;\n\n if (this._range) {\n // Note: In case user provided a range we don't need\n // to add our internal buffer. Totally relying on user calculus\n return Math.floor(this._range * scrollBuffer);\n }\n\n return Math.floor(\n (this.tableWidgetHeight / this.rowHeight) *\n internalBuffer *\n scrollBuffer\n );\n }\n}\n","<div\n class=\"h-100 d-flex justify-content-center align-items-center\"\n *ngIf=\"!shouldDisplayTable()\"\n>\n <nui-image image=\"no-data-to-show\"></nui-image>\n</div>\n<!-- h-100 gets added only when there's data to show to prevent an extra scrollbar when the table is empty -->\n<!-- Using invisible class instead of *ngIf as an non-virtual-scroll breakable way to hide the content. -->\n<div\n class=\"nui-table-widget d-flex flex-column\"\n [ngClass]=\"shouldDisplayTable() ? 'h-100' : 'invisible'\"\n>\n <div class=\"mr-2 mb-2 flex-row\" *ngIf=\"isSearchEnabled\">\n <nui-search\n class=\"unlimited-width d-flex justify-content-end flex-grow-1\"\n [value]=\"searchValue\"\n (inputChange)=\"onSearchInputChanged($event)\"\n (cancel)=\"onSearchInputChanged($event)\"\n >\n </nui-search>\n </div>\n <div\n class=\"flex-row h-100 nui-table-widget-container\"\n [nuiDelayedMousePresenceDetection]=\"\n delayedMousePresenceDetectionEnabled\n \"\n [delay]=\"configuration.scrollActivationDelayMs\"\n [mousePresentSubject]=\"mousePresent$\"\n >\n <!-- Note: Using inline style to let tableStickyHeader pick the actual height and update it with header height when it is detached -->\n <cdk-virtual-scroll-viewport\n class=\"calc-height\"\n style=\"height: calc(100% - 2px)\"\n tableStickyHeader\n [itemSize]=\"rowHeight\"\n [ngClass]=\"{\n 'virtual-scroll-disabled':\n (mousePresent$ | async) === false &&\n delayedMousePresenceDetectionEnabled\n }\"\n >\n <table\n 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 >\n <ng-container\n nuiColumnDef=\"{{ column.id }}\"\n *ngFor=\"let column of columns; trackBy: columnTrackBy\"\n >\n <th\n 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]=\"\n headerTooltipsEnabled ? column.label : undefined\n \"\n [alignment]=\"getColumnAlignment(column)\"\n >\n {{ column.label }}\n </th>\n <ng-container>\n <td\n nui-cell\n *nuiCellDef=\"let element\"\n [style.width.px]=\"columnsWidthMap.get(column.id)\"\n [style.max-width.px]=\"\n columnsWidthMap.get(column.id)\n \"\n [style.min-width.px]=\"\n columnsWidthMap.get(column.id)\n \"\n [alignment]=\"getColumnAlignment(column)\"\n >\n <ng-container\n nuiComponentPortal\n componentId=\"formatter\"\n *ngIf=\"element[column.id] && column.formatter\"\n [componentType]=\"\n column.formatter?.componentType\n \"\n [properties]=\"element[column.id]\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"\n componentPortal.attached($event)\n \"\n ></ng-template>\n </ng-container>\n </td>\n </ng-container>\n </ng-container>\n <tr nui-header-row *nuiHeaderRowDef=\"headers\"></tr>\n <ng-template\n nuiRowDef\n cdkVirtualFor\n let-row\n [nuiRowDefColumns]=\"headers\"\n [cdkVirtualForOf]=\"tableData\"\n [cdkVirtualForTrackBy]=\"dataTrackBy\"\n >\n <tr\n nui-row\n (click)=\"onInteraction(row, $event)\"\n [attr.role]=\"interactive ? 'button' : ''\"\n density=\"tiny\"\n ></tr>\n </ng-template>\n </table>\n </cdk-virtual-scroll-viewport>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport moment from \"moment/moment\";\n\nimport { ITimeframe } from \"@nova-ui/bits\";\n\nimport { ISerializableTimeframe } from \"./types\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class TimeframeSerializationService {\n public convertToSerializable(\n timeframe: ITimeframe\n ): ISerializableTimeframe {\n return {\n startDatetime: timeframe.startDatetime.format(),\n endDatetime: timeframe.endDatetime.format(),\n selectedPresetId: timeframe.selectedPresetId,\n title: timeframe.title,\n };\n }\n\n public convertFromSerializable(\n timeframe: ISerializableTimeframe\n ): ITimeframe {\n return {\n startDatetime: moment(\n timeframe.startDatetime,\n moment.defaultFormat\n ),\n endDatetime: moment(timeframe.endDatetime, moment.defaultFormat),\n selectedPresetId: timeframe.selectedPresetId,\n title: timeframe.title,\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n SimpleChanges,\n} from \"@angular/core\";\nimport moment, { Moment } from \"moment/moment\";\n\nimport {\n EventBus,\n HistoryStorage,\n IDataSource,\n IEvent,\n IFilter,\n ITimeframe,\n TimeframeService,\n} from \"@nova-ui/bits\";\n\nimport { TimeframeSerializationService } from \"../../configurator/services/timeframe-serialization.service\";\nimport { ISerializableTimeframe } from \"../../configurator/services/types\";\nimport { PizzagnaService } from \"../../pizzagna/services/pizzagna.service\";\nimport { REFRESH, SET_TIMEFRAME } from \"../../services/types\";\nimport {\n DATA_SOURCE,\n IHasChangeDetector,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../types\";\n\n@Component({\n selector: \"nui-timeframe-selection\",\n templateUrl: \"./timeframe-selection.component.html\",\n styleUrls: [\"./timeframe-selection.component.less\"],\n providers: [HistoryStorage],\n})\nexport class TimeframeSelectionComponent\n implements OnChanges, OnInit, IHasChangeDetector\n{\n public static lateLoadKey = \"TimeframeSelectionComponent\";\n\n public currentTimeframe: ITimeframe;\n public minDateAsMoment: Moment;\n public maxDateAsMoment: Moment;\n\n @Input() public componentId: string;\n @Input() public minDate: string;\n @Input() public maxDate: string;\n @Input() public timeframe: ISerializableTimeframe;\n\n @HostBinding(\"class\") public elementClass: string;\n\n constructor(\n private pizzagnaService: PizzagnaService,\n public timeframeService: TimeframeService,\n private tfSerialization: TimeframeSerializationService,\n public history: HistoryStorage<ITimeframe>,\n @Optional() @Inject(DATA_SOURCE) private dataSource: IDataSource,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n public changeDetector: ChangeDetectorRef\n ) {\n // just setting the timeframe to some reasonable default value\n this.currentTimeframe =\n this.timeframeService.getTimeframeByPresetId(\"last7Days\");\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.timeframe) {\n let timeframe = this.tfSerialization.convertFromSerializable(\n this.timeframe\n );\n timeframe = this.timeframeService.reconcileTimeframe(timeframe);\n if (timeframe.selectedPresetId) {\n // populate the title\n timeframe = this.timeframeService.getTimeframeByPresetId(\n timeframe.selectedPresetId\n );\n }\n this.currentTimeframe = timeframe;\n if (!changes.timeframe.isFirstChange()) {\n this.eventBus.getStream(REFRESH).next(undefined);\n }\n }\n\n if (changes.minDate) {\n this.minDateAsMoment = moment(this.minDate, moment.defaultFormat);\n }\n\n if (changes.maxDate) {\n this.maxDateAsMoment = moment(this.maxDate, moment.defaultFormat);\n }\n }\n\n public ngOnInit() {\n this.history.restart(this.currentTimeframe);\n this.eventBus\n .getStream(SET_TIMEFRAME)\n .subscribe((event: IEvent<ISerializableTimeframe>) => {\n if (!event.payload) {\n throw new Error(\n \"Unable to set timeframe. Event payload is undefined\"\n );\n }\n this.onTimeframeChange(\n this.history.save(\n this.tfSerialization.convertFromSerializable(\n event.payload\n )\n )\n );\n });\n\n if (this.dataSource) {\n this.dataSource.registerComponent({\n timeframe: {\n componentInstance: {\n getFilters: () => {\n const timeframe =\n this.timeframeService.reconcileTimeframe(\n this.currentTimeframe\n );\n return <IFilter<ITimeframe>>{\n type: \"timeframe\",\n value: timeframe,\n };\n },\n },\n },\n });\n }\n }\n\n public onTimeframeChange(timeframe: ITimeframe): void {\n const newTimeframe =\n this.timeframeService.reconcileTimeframe(timeframe);\n\n // replace undefined preset value with empty string to explicitly override any value on the pizzagna's config layer\n newTimeframe.selectedPresetId = newTimeframe.selectedPresetId || \"\";\n\n if (\n !this.timeframeService.isEqual(newTimeframe, this.currentTimeframe)\n ) {\n this.pizzagnaService.setProperty(\n {\n pizzagnaKey: PizzagnaLayer.Data,\n componentId: this.componentId,\n propertyPath: [\"timeframe\"],\n },\n this.tfSerialization.convertToSerializable(newTimeframe)\n );\n }\n }\n}\n","<nui-time-frame-bar\n [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 <!-- content for default projection slot -->\n <nui-icon icon=\"calendar\" class=\"pr-3\"></nui-icon>\n {{ currentTimeframe | timeFrame }}\n\n <!-- content for time frame selection projection slot -->\n <nui-quick-picker\n [presets]=\"timeframeService.currentPresets\"\n timeFrameSelection\n >\n <nui-time-frame-picker></nui-time-frame-picker>\n </nui-quick-picker>\n</nui-time-frame-bar>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ITimeFramePresetDictionary, UnitOption } from \"@nova-ui/bits\";\n\nimport { IProperties } from \"../../types\";\nimport { LegendPlacement } from \"../../widget-types/common/widget/legend\";\n\nexport interface ITimeseriesWidgetConfig {\n interaction: null | \"series\" | \"dataPoints\";\n displayedSeries: ITimeseriesWidgetSeries[];\n legendPlacement: LegendPlacement;\n leftAxisLabel?: string;\n timeFramePickerPresets?: ITimeFramePresetDictionary;\n enableZoom: boolean; // might go under the 'chart' configuration\n chartColors?: string[]; // might go under the 'chart' configuration\n preset: TimeseriesChartPreset;\n scales: ITimeseriesScalesConfig;\n units: UnitOption;\n collectionId?: string;\n}\n\nexport interface ITimeseriesWidgetSeries {\n id: string;\n label: string;\n selectedSeriesId: string;\n}\n\nexport interface ITimeseriesWidgetData<T = ITimeseriesWidgetSeriesData> {\n id: string;\n name: string;\n description: string;\n data: T[];\n link?: string;\n secondaryLink?: string;\n}\n\nexport interface ITimeseriesWidgetSeriesData {\n x: any; // used to be Moment, but TimeIntervalScale isn't Moment compatible, so it needs to support primarily Date type\n y: any;\n [key: string]: any;\n}\n\nexport interface ITimeseriesWidgetStatusData\n extends ITimeseriesWidgetSeriesData {\n thick?: boolean;\n color?: string;\n icon?: string;\n}\n\nexport interface ITimeseriesOutput<T = ITimeseriesWidgetSeriesData> {\n series: ITimeseriesWidgetData<T>[];\n}\n\nexport enum TimeseriesInteractionType {\n DataPoints = \"dataPoints\",\n Series = \"series\",\n Values = \"values\",\n}\n\n/** Configuration for a chart preset */\nexport interface IChartPreset {\n componentType: string;\n}\n\n/**\n * Configuration of scales for a x/y chart\n */\nexport interface ITimeseriesScalesConfig {\n x: ITimeseriesScaleConfig;\n y: ITimeseriesScaleConfig;\n}\n\n/**\n * Configuration of a scale for timeseries widget\n */\nexport interface ITimeseriesScaleConfig {\n /** Type of the scale */\n type: TimeseriesScaleType;\n /** Additional properties of the scale */\n properties?: IProperties;\n}\n\n/**\n * List of supported scale types for the timeseries widget\n */\nexport enum TimeseriesScaleType {\n /** Continous time scale */\n Time = \"time\",\n /** Time interval scale */\n TimeInterval = \"timeInterval\",\n /** Numeric linear scale */\n Linear = \"linear\",\n}\n\n/** Enumeration of chart presets supported by the timeseries widget */\nexport enum TimeseriesChartPreset {\n Line = \"line\",\n StackedArea = \"stackedArea\",\n StackedPercentageArea = \"stackedPercentageArea\",\n\n StackedBar = \"stackedBar\",\n StatusBar = \"statusBar\",\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { duration } from \"moment/moment\";\n\nimport { UnitBase, UnitConversionService, UnitOption } from \"@nova-ui/bits\";\nimport {\n IScale,\n LinearScale,\n TimeIntervalScale,\n TimeScale,\n} from \"@nova-ui/charts\";\n\nimport { DashboardUnitConversionPipe } from \"../../common/pipes/dashboard-unit-conversion-pipe\";\nimport { ITimeseriesScaleConfig, TimeseriesScaleType } from \"./types\";\n\n/**\n * This service handles scale creation and configuration for the timeseries widget\n */\n@Injectable()\nexport class TimeseriesScalesService {\n private unitConversionPipe: DashboardUnitConversionPipe;\n\n constructor(private unitConversionService: UnitConversionService) {\n this.unitConversionPipe = new DashboardUnitConversionPipe(\n this.unitConversionService\n );\n }\n\n /**\n * Creates a scale based on given configuration\n *\n * @param scaleConfig\n */\n public getScale(\n scaleConfig: ITimeseriesScaleConfig,\n units: UnitOption\n ): IScale<any> {\n let scale: IScale<any>;\n\n switch (scaleConfig.type) {\n case TimeseriesScaleType.Time: {\n scale = new TimeScale();\n break;\n }\n case TimeseriesScaleType.Linear: {\n scale = new LinearScale();\n scale.formatters.tick = (value: string | number | undefined) =>\n this.unitConversionPipe.transform(\n value,\n units,\n UnitBase.Standard\n );\n break;\n }\n case TimeseriesScaleType.TimeInterval: {\n scale = new TimeIntervalScale(duration(1, \"hour\"));\n break;\n }\n }\n\n this.updateConfiguration(scale, scaleConfig);\n\n return scale;\n }\n\n /**\n * Currently only TimeIntervalScale has configuration\n *\n * @param scale\n * @param scaleConfig\n */\n public updateConfiguration(\n scale: IScale<any>,\n scaleConfig: ITimeseriesScaleConfig\n ): void {\n if (\n scaleConfig.type === TimeseriesScaleType.TimeInterval &&\n scale instanceof TimeIntervalScale\n ) {\n const interval = scaleConfig.properties?.interval;\n if (typeof interval === \"number\") {\n if (interval <= 0) {\n throw new Error(\n \"Interval value must be greater than zero.\"\n );\n }\n scale.interval(duration(interval, \"seconds\"));\n }\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Directive,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IDataSource } from \"@nova-ui/bits\";\nimport { IXYScales } from \"@nova-ui/charts\";\n\nimport { WellKnownDataSourceFeatures } from \"../../../types\";\nimport { TimeseriesScalesService } from \"../timeseries-scales.service\";\nimport {\n ITimeseriesOutput,\n ITimeseriesScalesConfig,\n ITimeseriesWidgetConfig,\n ITimeseriesWidgetSeriesData,\n} from \"../types\";\n\n@Directive()\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nexport abstract class TimeseriesChartComponent<T = ITimeseriesWidgetSeriesData>\n implements OnChanges, OnDestroy\n{\n @Input() public widgetData: ITimeseriesOutput<T> =\n {} as ITimeseriesOutput<T>;\n @Input() public configuration: ITimeseriesWidgetConfig =\n {} as ITimeseriesWidgetConfig;\n\n protected scales: IXYScales = {} as IXYScales;\n protected destroy$ = new Subject<void>();\n protected buildChart$ = new Subject<void>();\n protected resetChart = false;\n protected chartBuilt = false;\n\n public get seriesInteractive(): boolean {\n return (\n this.configuration?.interaction === \"series\" ||\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.Interactivity\n )?.enabled ||\n false\n );\n }\n\n protected constructor(\n public timeseriesScalesService: TimeseriesScalesService,\n public dataSource: IDataSource\n ) {\n this.buildChart$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.chartBuilt = true;\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n let shouldUpdateChart = false;\n let shouldRebuildChart = false;\n\n if (changes.configuration) {\n const configurationCurrent: ITimeseriesWidgetConfig =\n changes.configuration.currentValue;\n const configurationPrevious: ITimeseriesWidgetConfig =\n changes.configuration.previousValue;\n\n if (\n configurationCurrent?.preset !== configurationPrevious?.preset\n ) {\n shouldRebuildChart = true;\n }\n\n if (\n configurationCurrent?.scales !== configurationPrevious?.scales\n ) {\n for (const scaleKey of Object.keys(\n configurationCurrent?.scales\n ) as Array<keyof ITimeseriesScalesConfig>) {\n const scaleConfigCurrent =\n configurationCurrent?.scales?.[scaleKey];\n const scaleConfigPrevious =\n configurationPrevious?.scales?.[scaleKey];\n\n if (\n scaleConfigCurrent?.type !==\n scaleConfigPrevious?.type ||\n !this.scales[scaleKey]\n ) {\n this.scales[scaleKey] =\n this.timeseriesScalesService.getScale(\n scaleConfigCurrent,\n configurationCurrent.units\n );\n shouldUpdateChart = true;\n } else if (\n scaleConfigCurrent?.properties !==\n scaleConfigPrevious?.properties\n ) {\n this.timeseriesScalesService.updateConfiguration(\n this.scales[scaleKey],\n scaleConfigCurrent\n );\n shouldUpdateChart = true;\n }\n }\n }\n }\n\n if (shouldRebuildChart || !this.chartBuilt) {\n this.buildChart();\n }\n\n if (changes.widgetData && !changes.widgetData.isFirstChange()) {\n if (this.widgetData?.series?.length === 0) {\n this.resetChart = true;\n }\n\n if (this.widgetData && this.widgetData.series) {\n if (this.resetChart && this.widgetData?.series?.length > 0) {\n this.resetChart = false;\n this.buildChart();\n }\n\n shouldUpdateChart = true;\n }\n }\n\n if (shouldUpdateChart) {\n this.updateChartData();\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.buildChart$.complete();\n }\n\n /** Updates chart data. */\n protected abstract updateChartData(): void;\n\n protected abstract buildChart(): void;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n Inject,\n OnInit,\n Optional,\n} from \"@angular/core\";\nimport { merge, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EventBus,\n IconService,\n IDataSource,\n IEvent,\n uuid,\n} from \"@nova-ui/bits\";\nimport {\n BandScale,\n BarHighlightStrategy,\n BarRenderer,\n Chart,\n DESTROY_EVENT,\n IAccessors,\n IChartAssistSeries,\n IChartEvent,\n ISetDomainEventPayload,\n IStatusAccessors,\n Renderer,\n SET_DOMAIN_EVENT,\n SparkChartAssist,\n StatusAccessors,\n statusAccessors,\n TimeIntervalScale,\n ZoomPlugin,\n} from \"@nova-ui/charts\";\n\nimport { SET_TIMEFRAME } from \"../../../../services/types\";\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../../../types\";\nimport { TimeseriesScalesService } from \"../../timeseries-scales.service\";\nimport {\n ITimeseriesWidgetData,\n ITimeseriesWidgetStatusData,\n} from \"../../types\";\nimport { TimeseriesChartComponent } from \"../timeseries-chart.component\";\n\n@Component({\n selector: \"nui-status-bar-chart\",\n templateUrl: \"./status-bar-chart.component.html\",\n styleUrls: [\"./status-bar-chart.component.less\"],\n})\nexport class StatusBarChartComponent\n extends TimeseriesChartComponent<ITimeseriesWidgetStatusData>\n implements OnInit\n{\n public static lateLoadKey = \"StatusChartComponent\";\n\n public chartAssist: SparkChartAssist;\n public collectionId: string = uuid(\"timeseries-status-charts\");\n protected accessors: StatusAccessors;\n protected renderer: Renderer<IAccessors>;\n private chartUpdate$ = new Subject<void>();\n\n constructor(\n private iconService: IconService,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n public timeseriesScalesService: TimeseriesScalesService,\n public changeDetector: ChangeDetectorRef,\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>\n ) {\n super(timeseriesScalesService, dataSource);\n }\n\n public ngOnInit() {}\n\n public getDataPointData(\n series: IChartAssistSeries<IAccessors>,\n key: string\n ): any {\n const data = this.chartAssist.highlightedDataPoints[series.id]?.data;\n if (data) {\n return data[key];\n }\n return series.data.length > 0\n ? series.data[series.data.length - 1][key]\n : undefined;\n }\n\n protected buildChart(): void {\n this.buildChart$.next();\n this.chartAssist = new SparkChartAssist();\n\n this.accessors = statusAccessors(\n this.chartAssist.palette.standardColors\n );\n this.accessors.data.color = (d, i, series, dataSeries) =>\n typeof d.color === \"undefined\"\n ? \"var(--nui-color-semantic-unknown)\"\n : d.color;\n\n this.accessors.data.thickness = (data: any) =>\n typeof data.thick === \"undefined\" || data.thick\n ? BarRenderer.THICK\n : BarRenderer.THIN;\n\n const iconSize: number = 8;\n this.accessors.data.marker = (data: any) =>\n data.icon\n ? this.iconService.getIconResized(\n this.iconService.getIconData(data.icon).code,\n iconSize\n )\n : undefined;\n\n // disable pointer events on bars to ensure the zoom drag target is the mouse interactive area rather than the bars\n this.renderer = new BarRenderer({\n highlightStrategy: new BarHighlightStrategy(\"x\"),\n pointerEvents: false,\n });\n\n this.scales.y = new BandScale();\n this.scales.y.fixDomain(StatusAccessors.STATUS_DOMAIN);\n }\n\n protected updateChartData(): void {\n this.chartUpdate$.next();\n\n // Assemble the series set\n const seriesSet: IChartAssistSeries<IStatusAccessors>[] =\n this.widgetData.series.map(\n (d: ITimeseriesWidgetData<ITimeseriesWidgetStatusData>) => ({\n ...d,\n data: this.transformData(\n d.data,\n this.scales.x instanceof TimeIntervalScale\n ),\n accessors: this.accessors,\n renderer: this.renderer,\n scales: this.scales,\n })\n );\n\n // Update the chart\n this.chartAssist.update(seriesSet);\n\n if (this.configuration.enableZoom) {\n this.chartAssist.sparks.forEach((spark) => {\n if (!(spark?.chart as Chart)?.hasPlugin(ZoomPlugin)) {\n spark?.chart?.addPlugin(\n new ZoomPlugin({ enableExternalEvents: true })\n );\n }\n });\n\n // only need to subscribe to one chart's SET_DOMAIN_EVENT\n this.chartAssist.sparks[0].chart\n ?.getEventBus()\n .getStream(SET_DOMAIN_EVENT)\n .pipe(\n takeUntil(\n merge(\n this.chartUpdate$,\n (\n this.chartAssist.sparks[0].chart as Chart\n )?.eventBus.getStream(DESTROY_EVENT),\n this.buildChart$\n )\n )\n )\n .subscribe((event: IChartEvent) => {\n const payload = <ISetDomainEventPayload>event.data;\n const newDomain = payload[Object.keys(payload)[0]];\n this.eventBus.getStream(SET_TIMEFRAME).next({\n payload: {\n startDatetime: newDomain[0],\n endDatetime: newDomain[1],\n selectedPresetId: null,\n },\n });\n });\n }\n }\n\n /**\n * Transforms standard timeseries x/y data so that it can be understood by a status chart\n *\n * @param data The data to transform\n * @param isIntervalProgression Whether the data should be treated as continuous or occurring at a regular interval\n *\n * @returns The transformed data\n */\n protected transformData(\n data: ITimeseriesWidgetStatusData[],\n isIntervalProgression: boolean\n ): IStatusData[] {\n const statusDataArray: any[] = [];\n data.forEach((d, i) => {\n if (isIntervalProgression || data.length - 1 !== i) {\n statusDataArray.push({\n start: d.x,\n end: isIntervalProgression ? d.x : data[i + 1].x,\n status: d.y,\n color: d.color,\n thick: d.thick,\n icon: d.icon,\n });\n }\n });\n return statusDataArray;\n }\n}\n\ninterface IStatusData {\n start: Date;\n end: Date;\n thick?: boolean;\n color?: string;\n icon?: string;\n}\n","<div *ngIf=\"chartAssist\" class=\"p-3 status-bar-chart\">\n <div\n class=\"d-flex\"\n *ngFor=\"let spark of chartAssist.sparks; trackBy: chartAssist.trackByFn\"\n >\n <nui-chart\n class=\"d-flex flex-grow-1\"\n [chart]=\"spark.chart\"\n [nuiChartCollectionId]=\"collectionId\"\n ></nui-chart>\n <div\n class=\"d-flex flex-column pl-2\"\n *ngIf=\"\n spark.chartSeriesSet?.length > 0 && spark.chartSeriesSet[0];\n let series\n \"\n >\n <nui-legend\n class=\"status-bar-chart__legend\"\n [active]=\"chartAssist.isLegendActive\"\n >\n <nui-legend-series\n [descriptionPrimary]=\"series.legendDescriptionPrimary\"\n [descriptionSecondary]=\"series.legendDescriptionSecondary\"\n >\n <div\n class=\"status-bar-chart__legend__tile d-flex justify-content-center align-items-center\"\n >\n <div\n class=\"w-100 h-100 status-bar-chart__legend__tile__background\"\n [style.background-color]=\"\n getDataPointData(series, 'color')\n \"\n ></div>\n <nui-icon\n *ngIf=\"getDataPointData(series, 'icon'); let icon\"\n class=\"status-bar-chart__legend__tile__icon\"\n [icon]=\"icon\"\n ></nui-icon>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Inject,\n Injectable,\n OnChanges,\n OnDestroy,\n Optional,\n} from \"@angular/core\";\nimport { merge } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\nimport {\n ChartAssist,\n ChartPalette,\n defaultColorProvider,\n IAccessors,\n IChartAssistSeries,\n IChartEvent,\n IDataPointsPayload,\n IInteractionDataPointsEvent,\n IInteractionValuesPayload,\n InteractionType,\n INTERACTION_DATA_POINTS_EVENT,\n INTERACTION_VALUES_EVENT,\n ISetDomainEventPayload,\n IValueProvider,\n IXYScales,\n Renderer,\n SequentialColorProvider,\n SET_DOMAIN_EVENT,\n ZoomPlugin,\n} from \"@nova-ui/charts\";\n\nimport { INTERACTION, SET_TIMEFRAME } from \"../../../../services/types\";\nimport {\n DATA_SOURCE,\n IHasChangeDetector,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../types\";\nimport { LegendPlacement } from \"../../../../widget-types/common/widget/legend\";\nimport { TimeseriesScalesService } from \"../../timeseries-scales.service\";\nimport { TimeseriesInteractionType } from \"../../types\";\nimport { TimeseriesChartComponent } from \"../timeseries-chart.component\";\n\n@Injectable()\nexport abstract class XYChartComponent\n extends TimeseriesChartComponent\n implements OnChanges, OnDestroy, IHasChangeDetector\n{\n public chartAssist: ChartAssist;\n public valueAccessorKey: string = \"y\";\n public collectionId: string = \"\";\n\n protected renderer: Renderer<IAccessors>;\n protected accessors: IAccessors;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n public timeseriesScalesService: TimeseriesScalesService,\n public changeDetector: ChangeDetectorRef\n ) {\n super(timeseriesScalesService, dataSource);\n }\n\n protected abstract createAccessors(\n colorProvider: IValueProvider<string>\n ): IAccessors;\n\n protected abstract createChartAssist(palette: ChartPalette): ChartAssist;\n\n public mapSeriesSet(\n data: any[],\n scales: IXYScales\n ): IChartAssistSeries<IAccessors>[] {\n return data.map((series: any) => ({\n ...series,\n scales: scales,\n renderer: this.renderer,\n accessors: this.accessors,\n }));\n }\n\n /** Checks if legend should be shown. */\n public hasLegend(): boolean {\n return (\n this.configuration.legendPlacement &&\n this.configuration.legendPlacement !== LegendPlacement.None\n );\n }\n\n /** Checks if legend should be aligned to right. */\n public legendShouldBeAlignedRight(): boolean {\n return this.configuration.legendPlacement === LegendPlacement.Right;\n }\n\n public onPrimaryDescClick(\n event: MouseEvent,\n legendSeries: IChartAssistSeries<IAccessors>\n ) {\n if (!this.seriesInteractive) {\n return;\n }\n\n event.stopPropagation();\n this.eventBus.getStream(INTERACTION).next({\n payload: {\n data: legendSeries,\n interactionType: TimeseriesInteractionType.Series,\n },\n });\n }\n\n /** Updates chart data. */\n protected updateChartData(): void {\n this.chartAssist.update(\n this.mapSeriesSet(this.widgetData.series, this.scales)\n );\n }\n\n /**\n * Initialize chart\n */\n protected buildChart() {\n this.buildChart$.next();\n\n const colorProvider =\n this.configuration.chartColors &&\n this.configuration.chartColors?.length > 0\n ? new SequentialColorProvider(this.configuration.chartColors)\n : defaultColorProvider();\n\n const palette = new ChartPalette(colorProvider);\n this.accessors = this.createAccessors(palette.standardColors);\n this.chartAssist = this.createChartAssist(palette);\n\n const chart = this.chartAssist.chart;\n if (this.configuration.enableZoom) {\n chart.addPlugin(new ZoomPlugin());\n }\n\n chart\n .getEventBus()\n .getStream(SET_DOMAIN_EVENT)\n .pipe(takeUntil(merge(this.destroy$, this.buildChart$)))\n .subscribe((event) => {\n const payload = <ISetDomainEventPayload>event.data;\n const newDomain = payload[Object.keys(payload)[0]];\n this.eventBus.getStream(SET_TIMEFRAME).next({\n payload: {\n startDatetime: newDomain[0],\n endDatetime: newDomain[1],\n selectedPresetId: null,\n },\n });\n });\n\n this.setupInteraction();\n }\n\n /**\n * Subscribe to chart events and emit\n */\n protected setupInteraction() {\n // interaction with chart data points\n this.chartAssist.chart\n .getEventBus()\n .getStream(INTERACTION_DATA_POINTS_EVENT)\n .pipe(takeUntil(merge(this.destroy$, this.buildChart$)))\n .subscribe((values: IChartEvent) => {\n const payload: IInteractionDataPointsEvent = values.data;\n if (payload.interactionType === InteractionType.Click) {\n this.eventBus.getStream(INTERACTION).next({\n payload: {\n data: payload.dataPoints as IDataPointsPayload,\n interactionType:\n TimeseriesInteractionType.DataPoints,\n },\n });\n }\n });\n\n // interaction with values\n this.chartAssist.chart\n .getEventBus()\n .getStream(INTERACTION_VALUES_EVENT)\n .pipe(takeUntil(merge(this.destroy$, this.buildChart$)))\n .subscribe((values: IChartEvent) => {\n const payload: IInteractionValuesPayload = values.data;\n if (payload.interactionType === InteractionType.Click) {\n this.eventBus.getStream(INTERACTION).next({\n payload: {\n data: payload.values,\n interactionType: TimeseriesInteractionType.Values,\n },\n });\n }\n });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Inject, Optional } from \"@angular/core\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\nimport {\n Chart,\n ChartAssist,\n ChartPalette,\n IAccessors,\n IValueProvider,\n LineAccessors,\n LineRenderer,\n XYGrid,\n XYGridConfig,\n} from \"@nova-ui/charts\";\n\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { TimeseriesScalesService } from \"../../../timeseries-scales.service\";\nimport { XYChartComponent } from \"../xy-chart.component\";\n\n@Component({\n selector: \"nui-line-chart\",\n templateUrl: \"../xy-chart.component.html\",\n styleUrls: [\"../xy-chart.component.less\"],\n})\nexport class LineChartComponent extends XYChartComponent {\n public static lateLoadKey = \"LineChartComponent\";\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n timeseriesScalesService: TimeseriesScalesService,\n changeDetector: ChangeDetectorRef\n ) {\n super(eventBus, dataSource, timeseriesScalesService, changeDetector);\n\n this.renderer = new LineRenderer();\n }\n\n protected createAccessors(\n colorProvider: IValueProvider<string>\n ): IAccessors {\n return new LineAccessors(colorProvider);\n }\n\n protected createChartAssist(palette: ChartPalette): ChartAssist {\n const gridConfig = new XYGridConfig();\n gridConfig.axis.left.fit = true;\n const chart = new Chart(new XYGrid(gridConfig));\n // @ts-ignore: Avoiding strict mode errors, keeping old flow\n return new ChartAssist(chart, null, palette);\n }\n}\n","<div class=\"nui-chart-layout h-100 px-3 py-3\">\n <div class=\"axis-label-left nui-text-small\">\n <strong>{{ configuration.leftAxisLabel }}</strong>\n </div>\n <div class=\"chart\">\n <nui-chart\n [nuiChartCollectionId]=\"collectionId\"\n class=\"w-100\"\n [chart]=\"chartAssist.chart\"\n ></nui-chart>\n </div>\n <div\n class=\"d-flex\"\n *ngIf=\"hasLegend()\"\n [ngClass]=\"[\n legendShouldBeAlignedRight() ? 'legend scrollable' : 'legend-bottom'\n ]\"\n >\n <nui-legend\n class=\"m-auto\"\n [active]=\"chartAssist.isLegendActive\"\n [interactive]=\"true\"\n [orientation]=\"\n legendShouldBeAlignedRight() ? 'vertical' : 'horizontal'\n \"\n >\n <nui-legend-series\n class=\"xy-chart__legend-series\"\n [ngClass]=\"\n 'xy-chart__legend-series--state-' +\n chartAssist.renderStatesIndex[legendSeries.id]?.state\n \"\n *ngFor=\"\n let legendSeries of chartAssist.legendSeriesSet;\n trackBy: chartAssist.seriesTrackByFn\n \"\n [isSelected]=\"!chartAssist.isSeriesHidden(legendSeries.id)\"\n (isSelectedChange)=\"\n chartAssist.toggleSeries(legendSeries.id, $event)\n \"\n (mouseenter)=\"chartAssist.emphasizeSeries(legendSeries.id)\"\n (mouseleave)=\"chartAssist.resetVisibleSeries()\"\n [seriesRenderState]=\"\n chartAssist.renderStatesIndex[legendSeries.id]?.state\n \"\n >\n <nui-rich-legend-tile\n [value]=\"\n chartAssist.getHighlightedValue(\n legendSeries,\n 'y',\n 'tick',\n valueAccessorKey\n )\n \"\n [backgroundColor]=\"\n chartAssist.palette.standardColors.get(legendSeries.id)\n \"\n [color]=\"\n chartAssist.palette.textColors.get(legendSeries.id)\n \"\n >\n <nui-chart-marker\n rightEdge\n [marker]=\"chartAssist.markers.get(legendSeries.id)\"\n [color]=\"\n chartAssist.palette.standardColors.get(\n legendSeries.id\n )\n \"\n >\n </nui-chart-marker>\n </nui-rich-legend-tile>\n <div\n description\n class=\"description-container d-flex flex-column nui-text-small justify-content-center\"\n >\n <div\n *ngIf=\"!legendSeries.link\"\n class=\"description description-primary\"\n [ngClass]=\"{\n 'nui-text-link-small link': seriesInteractive\n }\"\n (click)=\"onPrimaryDescClick($event, legendSeries)\"\n >\n {{ legendSeries.legendDescriptionPrimary }}\n </div>\n <a\n 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 >\n {{ legendSeries.legendDescriptionPrimary }}\n </a>\n <div\n class=\"description description-secondary\"\n *ngIf=\"!legendSeries.secondaryLink\"\n [title]=\"legendSeries.legendDescriptionSecondary\"\n >\n {{ legendSeries.legendDescriptionSecondary }}\n </div>\n <a\n 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 >\n {{ legendSeries.legendDescriptionSecondary }}\n </a>\n </div>\n </nui-legend-series>\n </nui-legend>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Inject, Optional } from \"@angular/core\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\nimport {\n areaGrid,\n AreaRenderer,\n Chart,\n ChartAssist,\n ChartPalette,\n IAccessors,\n IValueProvider,\n stackedArea,\n stackedAreaAccessors,\n} from \"@nova-ui/charts\";\n\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { TimeseriesScalesService } from \"../../../timeseries-scales.service\";\nimport { XYChartComponent } from \"../xy-chart.component\";\n\n@Component({\n selector: \"nui-stacked-area-chart\",\n templateUrl: \"../xy-chart.component.html\",\n styleUrls: [\"../xy-chart.component.less\"],\n})\nexport class StackedAreaChartComponent extends XYChartComponent {\n public static lateLoadKey = \"StackedAreaChartComponent\";\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n timeseriesScalesService: TimeseriesScalesService,\n changeDetector: ChangeDetectorRef\n ) {\n super(eventBus, dataSource, timeseriesScalesService, changeDetector);\n\n this.renderer = new AreaRenderer();\n this.valueAccessorKey = \"y1\";\n }\n\n protected createAccessors(\n colorProvider: IValueProvider<string>\n ): IAccessors {\n return stackedAreaAccessors(colorProvider);\n }\n\n protected createChartAssist(palette: ChartPalette): ChartAssist {\n const grid = areaGrid();\n grid.config().axis.left.fit = true;\n const chart = new Chart(grid);\n return new ChartAssist(chart, stackedArea, palette);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Inject, Optional } from \"@angular/core\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\nimport {\n barAccessors,\n barGrid,\n BarHighlightStrategy,\n BarRenderer,\n Chart,\n ChartAssist,\n ChartPalette,\n IAccessors,\n IChartAssistSeries,\n InteractionLabelPlugin,\n IValueProvider,\n IXYScales,\n stack,\n TimeIntervalScale,\n} from \"@nova-ui/charts\";\n\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { TimeseriesScalesService } from \"../../../timeseries-scales.service\";\nimport { XYChartComponent } from \"../xy-chart.component\";\n\n@Component({\n selector: \"nui-stacked-bar-chart\",\n templateUrl: \"../xy-chart.component.html\",\n styleUrls: [\"../xy-chart.component.less\"],\n})\nexport class StackedBarChartComponent extends XYChartComponent {\n public static lateLoadKey = \"StackedBarChartComponent\";\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n timeseriesScalesService: TimeseriesScalesService,\n changeDetector: ChangeDetectorRef\n ) {\n super(eventBus, dataSource, timeseriesScalesService, changeDetector);\n\n this.valueAccessorKey = \"value\";\n // disable pointer events on bars to ensure the zoom drag target is the mouse interactive area rather than the bars\n this.renderer = new BarRenderer({\n highlightStrategy: new BarHighlightStrategy(\"x\"),\n pointerEvents: false,\n });\n }\n\n public mapSeriesSet(\n data: any[],\n scales: IXYScales\n ): IChartAssistSeries<IAccessors>[] {\n if (scales.x instanceof TimeIntervalScale) {\n // @ts-ignore\n this.accessors.data.thickness = undefined; // allow the renderer to calculate thickness\n } else {\n // @ts-ignore\n this.accessors.data.thickness = () => 5; // arbitrary constant value\n }\n\n return super.mapSeriesSet(data, scales);\n }\n\n protected createAccessors(\n colorProvider: IValueProvider<string>\n ): IAccessors {\n const accessors = barAccessors({ horizontal: false }, colorProvider);\n accessors.data.category = (d) => d.x;\n accessors.data.value = (d) => d.y;\n\n return accessors;\n }\n\n protected createChartAssist(palette: ChartPalette): ChartAssist {\n const chart = new Chart(barGrid());\n chart.addPlugin(new InteractionLabelPlugin());\n return new ChartAssist(chart, stack, palette);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Inject, Optional } from \"@angular/core\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\nimport {\n areaGrid,\n AreaRenderer,\n Chart,\n ChartAssist,\n ChartPalette,\n IAccessors,\n IValueProvider,\n stackedAreaAccessors,\n stackedPercentageArea,\n} from \"@nova-ui/charts\";\n\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { TimeseriesScalesService } from \"../../../timeseries-scales.service\";\nimport { XYChartComponent } from \"../xy-chart.component\";\n\n@Component({\n selector: \"nui-stacked-percentage-area-chart\",\n templateUrl: \"../xy-chart.component.html\",\n styleUrls: [\"../xy-chart.component.less\"],\n})\nexport class StackedPercentageAreaChartComponent extends XYChartComponent {\n public static lateLoadKey = \"StackedPercentageAreaChartComponent\";\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) eventBus: EventBus<IEvent>,\n @Optional() @Inject(DATA_SOURCE) dataSource: IDataSource,\n timeseriesScalesService: TimeseriesScalesService,\n changeDetector: ChangeDetectorRef\n ) {\n super(eventBus, dataSource, timeseriesScalesService, changeDetector);\n\n this.renderer = new AreaRenderer();\n this.valueAccessorKey = \"y1\";\n }\n\n protected createAccessors(\n colorProvider: IValueProvider<string>\n ): IAccessors {\n return stackedAreaAccessors(colorProvider);\n }\n\n protected createChartAssist(palette: ChartPalette): ChartAssist {\n const grid = areaGrid();\n grid.config().axis.left.fit = true;\n const chart = new Chart(grid);\n return new ChartAssist(chart, stackedPercentageArea, palette);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { StatusBarChartComponent } from \"./chart-presets/status-bar-chart/status-bar-chart.component\";\nimport { LineChartComponent } from \"./chart-presets/xy-chart/chart-types/line-chart.component\";\nimport { StackedAreaChartComponent } from \"./chart-presets/xy-chart/chart-types/stacked-area-chart.component\";\nimport { StackedBarChartComponent } from \"./chart-presets/xy-chart/chart-types/stacked-bar-chart.component\";\nimport { StackedPercentageAreaChartComponent } from \"./chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component\";\nimport { IChartPreset, TimeseriesChartPreset } from \"./types\";\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class TimeseriesChartPresetService {\n public presets: Record<TimeseriesChartPreset, IChartPreset>;\n\n constructor() {\n this.presets = {\n [TimeseriesChartPreset.Line]: {\n componentType: LineChartComponent.lateLoadKey,\n },\n [TimeseriesChartPreset.StackedArea]: {\n componentType: StackedAreaChartComponent.lateLoadKey,\n },\n [TimeseriesChartPreset.StackedPercentageArea]: {\n componentType: StackedPercentageAreaChartComponent.lateLoadKey,\n },\n [TimeseriesChartPreset.StackedBar]: {\n componentType: StackedBarChartComponent.lateLoadKey,\n },\n [TimeseriesChartPreset.StatusBar]: {\n componentType: StatusBarChartComponent.lateLoadKey,\n },\n };\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n SimpleChanges,\n} from \"@angular/core\";\n\nimport { IHasChangeDetector } from \"../../types\";\nimport { TimeseriesChartPresetService } from \"./timeseries-chart-preset.service\";\nimport {\n IChartPreset,\n ITimeseriesOutput,\n ITimeseriesWidgetConfig,\n TimeseriesChartPreset,\n} from \"./types\";\n\n/** @ignore */\n@Component({\n selector: \"nui-timeseries-widget\",\n templateUrl: \"./timeseries-widget.component.html\",\n})\nexport class TimeseriesWidgetComponent\n implements OnChanges, IHasChangeDetector\n{\n public static lateLoadKey = \"TimeseriesWidgetComponent\";\n\n @Input() public widgetData?: ITimeseriesOutput;\n @Input() public configuration?: ITimeseriesWidgetConfig;\n @Input() public collectionId?: string;\n\n @Input() @HostBinding(\"class\") public elementClass = \"\";\n\n public chartPreset: IChartPreset;\n\n constructor(\n public timeseriesChartPresetService: TimeseriesChartPresetService,\n public changeDetector: ChangeDetectorRef\n ) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.configuration) {\n const configurationCurrent: ITimeseriesWidgetConfig =\n changes.configuration.currentValue;\n const configurationPrevious: ITimeseriesWidgetConfig =\n changes.configuration.previousValue;\n\n if (\n configurationCurrent?.preset !== configurationPrevious?.preset\n ) {\n this.chartPreset =\n this.timeseriesChartPresetService.presets[\n this.configuration?.preset ?? TimeseriesChartPreset.Line\n ];\n }\n }\n }\n\n /** Checks if chart should be shown. */\n public shouldShowChart(): boolean {\n return (this.widgetData?.series?.length ?? 0) > 0;\n }\n}\n","<div class=\"h-100\" *ngIf=\"shouldShowChart()\">\n <ng-container\n nuiComponentPortal\n componentId=\"timeseriesWidgetChart\"\n [componentType]=\"chartPreset.componentType\"\n [properties]=\"{\n widgetData: widgetData,\n configuration: configuration,\n collectionId: collectionId || configuration?.collectionId\n }\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n} from \"@angular/core\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { debounceTime, takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport { REFRESH, WIDGET_SEARCH } from \"../../services/types\";\nimport { DATA_SOURCE, PIZZAGNA_EVENT_BUS } from \"../../types\";\nimport { ISearchOnKeyUp, IWidgetSearchConfiguration } from \"./types\";\n\n@Component({\n selector: \"nui-widget-search\",\n templateUrl: \"./widget-search.component.html\",\n styleUrls: [\"./widget-search.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { \"[class.default]\": \"enabled\", \"[class.invisible]\": \"!enabled\" },\n})\nexport class WidgetSearchComponent implements OnInit, OnDestroy, OnChanges {\n static lateLoadKey = \"WidgetSearchComponent\";\n static defaultSearchDebounce = 500;\n\n @Input() public configuration: IWidgetSearchConfiguration;\n @Input() public searchValue: string;\n public enabled: boolean = false;\n\n public searchTerm$ = new Subject<string>();\n public onDestroy$ = new Subject<void>();\n private searchTermSubscription: Subscription;\n\n constructor(\n @Optional() @Inject(DATA_SOURCE) private dataSource: IDataSource,\n @Inject(PIZZAGNA_EVENT_BUS) public eventBus: EventBus<IEvent>\n ) {}\n\n public ngOnInit(): void {\n if (this.dataSource.features?.getSupportedFeatures()?.search?.enabled) {\n this.enabled = true;\n }\n this.registerFilters();\n this.handleSearchTermSubscription(this.configuration?.searchOnKeyUp);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.configuration) {\n const searchCfg = changes.configuration.currentValue;\n this.handleSearchTermSubscription(searchCfg.searchOnKeyUp);\n }\n }\n\n public onSearchInputChanged(searchTerm: string) {\n if (this.configuration?.searchOnKeyUp?.enabled) {\n this.searchValue = searchTerm;\n this.searchTerm$.next(searchTerm);\n }\n }\n\n public onSearch(searchTerm: string) {\n this.searchValue = searchTerm;\n this.searchTerm$.next(searchTerm);\n }\n\n public ngOnDestroy() {\n this.eventBus.getStream(WIDGET_SEARCH).next({\n payload: \"\",\n });\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n\n private registerFilters() {\n this.dataSource?.registerComponent({\n search: {\n componentInstance: {\n getFilters: () => ({\n value: this.searchValue,\n }),\n },\n },\n });\n }\n\n private handleSearchTermSubscription(\n searchOnKeyUpCfg: ISearchOnKeyUp | undefined\n ) {\n this.searchTermSubscription?.unsubscribe();\n this.searchTermSubscription = this.searchTerm$\n .pipe(\n takeUntil(this.onDestroy$),\n debounceTime(\n searchOnKeyUpCfg?.debounceTime ||\n WidgetSearchComponent.defaultSearchDebounce\n )\n )\n .subscribe((searchTerm) => {\n this.eventBus.getStream(REFRESH).next(undefined);\n this.eventBus.getStream(WIDGET_SEARCH).next({\n payload: searchTerm,\n });\n });\n }\n}\n","<nui-search\n 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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/**\n * Node keys for common errors\n */\nexport enum ErrorNodeKey {\n ErrorUnknown = \"errorUnknown\",\n ErrorForbidden = \"errorForbidden\",\n ErrorNotFound = \"errorNotFound\",\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n} from \"@angular/core\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { ErrorNodeKey } from \"../../../widget-types/common/widget/types\";\nimport { BaseLayout } from \"../../layouts/base-layout\";\n\n@Component({\n selector: \"nui-widget-body-content\",\n templateUrl: \"./widget-body-content.component.html\",\n})\nexport class WidgetBodyContentComponent\n extends BaseLayout\n implements OnChanges, OnInit, OnDestroy\n{\n public static lateLoadKey = \"WidgetBodyContentComponent\";\n\n /**\n * The component's id\n */\n @Input() public componentId: string;\n\n /**\n * The pizzagna node to use for the primary content\n */\n @Input() public primaryContent: string;\n\n /**\n * When this property is populated, the component displays the associated\n * fallback content in place of the primary content\n */\n @Input() public fallbackKey: string;\n\n /**\n * Map of content keys to pizzagna nodes\n */\n @Input() public fallbackMap: Record<string, string>;\n\n /**\n * Optional class for styling\n */\n @Input() public elementClass = \"\";\n\n @HostBinding(\"class\") public classNames: string;\n\n public readonly defaultClasses = \"w-100\";\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public ngOnInit() {\n this.classNames = `${this.defaultClasses} ${this.elementClass}`;\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n\n public getNodes(): string[] {\n if (this.fallbackKey) {\n const fallbackContent =\n (this.fallbackMap && this.fallbackMap[this.fallbackKey]) ||\n ErrorNodeKey.ErrorUnknown;\n return [this.primaryContent, fallbackContent];\n }\n return [this.primaryContent];\n }\n}\n","<div\n class=\"h-100\"\n [ngClass]=\"{ 'd-none': fallbackKey, 'd-flex': !fallbackKey }\"\n>\n <ng-container\n 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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</div>\n<div class=\"d-flex h-100\" *ngIf=\"fallbackKey\">\n <ng-container\n 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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n} from \"@angular/core\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { DASHBOARD_EDIT_MODE } from \"../../../services/types\";\nimport { PizzagnaLayer, PIZZAGNA_EVENT_BUS } from \"../../../types\";\nimport { BaseLayout } from \"../../layouts/base-layout\";\n\n@Component({\n selector: \"nui-widget-body\",\n templateUrl: \"./widget-body.component.html\",\n styleUrls: [\"./widget-body.component.less\"],\n})\nexport class WidgetBodyComponent\n extends BaseLayout\n implements OnInit, OnDestroy\n{\n public static lateLoadKey = \"WidgetBodyComponent\";\n\n /**\n * The component's id\n */\n @Input() public componentId: string;\n\n /**\n * Keeps track of whether the dashboard is in edit mode\n */\n @Input() public editMode = false;\n\n /**\n * Pizzagna key for the widget body content\n */\n @Input() public content: string;\n\n /**\n * Optional class for styling\n */\n @Input() public elementClass = \"\";\n\n @HostBinding(\"class\") public classNames: string;\n\n public readonly defaultClasses = \"d-flex h-100 w-100\";\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public ngOnInit() {\n this.classNames = `${this.defaultClasses} ${this.elementClass}`;\n\n // subscribing to dashboard event to set 'edit mode'\n this.eventBus\n .getStream(DASHBOARD_EDIT_MODE)\n .pipe(takeUntil(this.destroyed$))\n .subscribe((event) => {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"editMode\"],\n },\n !!event.payload\n );\n });\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n\n public getNodes = (): string[] => [this.content];\n}\n","<nui-preview-overlay *ngIf=\"editMode\"></nui-preview-overlay>\n<ng-container\n 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>\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n} from \"@angular/animations\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n ViewChild,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport {\n DASHBOARD_EDIT_MODE,\n REFRESH,\n WIDGET_EDIT,\n WIDGET_REMOVE,\n} from \"../../../services/types\";\nimport { WidgetToDashboardEventProxyService } from \"../../../services/widget-to-dashboard-event-proxy.service\";\nimport {\n HEADER_LINK_PROVIDER,\n PIZZAGNA_EVENT_BUS,\n PizzagnaLayer,\n} from \"../../../types\";\nimport { IHeaderLinkProvider } from \"./types\";\n\n@Component({\n selector: \"nui-widget-header\",\n templateUrl: \"./widget-header.component.html\",\n styleUrls: [\"./widget-header.component.less\"],\n animations: [\n trigger(\"expandedState\", [\n state(\"expanded\", style({ height: \"*\" })),\n state(\"collapsed\", style({ height: \"11px\" })),\n transition(\"expanded <=> collapsed\", [\n animate(\"350ms ease-in-out\"),\n ]),\n ]),\n ],\n})\nexport class WidgetHeaderComponent implements OnInit, OnDestroy, AfterViewInit {\n static lateLoadKey = \"WidgetHeaderComponent\";\n\n @Input() public componentId: string;\n @Input() public editMode = true;\n /**\n * Boolean which shows or hides the edit button\n */\n @Input() public editable: boolean = true;\n /**\n * Boolean which shows or hides the remove widget button\n */\n @Input() public removable: boolean = true;\n /**\n * Boolean which adds ability to collapse widget header\n */\n @Input() public collapsible = false;\n @Input() public reloadable = true;\n @Input() public title: string;\n @Input() public subtitle: string;\n @Input() public hideMenu: boolean = false;\n @Input() public url: string;\n /**\n * Boolean which tells what state the widget header is in if collapsible\n */\n @Input() public collapsed: boolean = false;\n\n @HostBinding(\"class.nui-widget-header\") get hostClass() {\n return true;\n }\n\n @ViewChild(\"widgetHeaderCustomElement\")\n public widgetHeaderCustomElement: ElementRef;\n\n public withCustomElement: boolean;\n private onDestroy$: Subject<void> = new Subject<void>();\n\n public get state(): \"expanded\" | \"collapsed\" {\n return this.collapsed && this.collapsible ? \"collapsed\" : \"expanded\";\n }\n\n public linkTooltip = $localize`Explore this data`;\n\n constructor(\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n public pizzagnaService: PizzagnaService,\n public changeDetector: ChangeDetectorRef,\n @Optional() private eventProxy: WidgetToDashboardEventProxyService,\n @Inject(HEADER_LINK_PROVIDER)\n @Optional()\n private linkProvider: IHeaderLinkProvider\n ) {}\n\n public ngOnInit(): void {\n if (this.collapsible) {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"isCollapsed\"],\n },\n true\n );\n }\n\n if (this.eventProxy) {\n this.eventProxy.addUpstream(WIDGET_EDIT);\n this.eventProxy.addUpstream(WIDGET_REMOVE);\n this.eventProxy.addDownstream(DASHBOARD_EDIT_MODE);\n }\n\n // subscribing to dashboard event to set 'edit mode'\n this.eventBus\n .getStream(DASHBOARD_EDIT_MODE)\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((event) => {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"collapsed\"],\n },\n !event.payload\n );\n\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"editMode\"],\n },\n !!event.payload\n );\n });\n }\n\n public ngAfterViewInit() {\n // we can't set values in ngAfterViewInit directly - it causes ExpressionChangedAfterViewChecked error, so setTimeout has to be used\n setTimeout(() => {\n this.withCustomElement =\n this.widgetHeaderCustomElement.nativeElement.childNodes\n .length !== 0;\n });\n }\n\n public ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n\n public removeWidget() {\n this.eventBus.getStream(WIDGET_REMOVE).next(undefined);\n }\n\n public toggleCollapsed() {\n this.pizzagnaService.setProperty(\n {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"collapsed\"],\n },\n !this.collapsed\n );\n }\n\n public onEditWidget() {\n this.eventBus.getStream(WIDGET_EDIT).next(undefined);\n }\n\n public onReloadData() {\n if (!this.reloadable) {\n throw new Error(\n \"The widget is not reloadable, so it can't be reloaded manually.\"\n );\n }\n this.eventBus.getStream(REFRESH).next(undefined);\n }\n\n public prepareLink($event: MouseEvent) {\n const target: HTMLElement = $event.target as HTMLElement;\n if (target && this.linkProvider) {\n const link = this.linkProvider.getLink(this.url);\n if (link) {\n target.setAttribute(\"href\", link);\n }\n }\n return true;\n }\n}\n","<div class=\"nui-widget__header\">\n <div\n class=\"nui-widget__header__container\"\n [class.nui-widget__header__container--collapsible]=\"collapsible\"\n [class.nui-widget__header__container--collapsed]=\"\n collapsible && collapsed\n \"\n [class.nui-widget__header__container--expanded]=\"\n collapsible && !collapsed\n \"\n [@expandedState]=\"state\"\n >\n <div\n *ngIf=\"collapsed && collapsible\"\n class=\"collapse-container\"\n (click)=\"toggleCollapsed()\"\n >\n <span class=\"collapse-container__line\"></span>\n </div>\n <div class=\"nui-widget__header__content\">\n <div\n *ngIf=\"editMode\"\n class=\"nui-widget__header__content-drag-icon nui-dashboard__widget--drag-handle\"\n >\n <nui-icon icon=\"drag\" iconColor=\"gray\"></nui-icon>\n </div>\n <div\n #widgetHeaderCustomElement\n class=\"nui-widget__header__content-custom-element\"\n >\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-widget__header__content-title-container nui-dashboard__widget--drag-handle\"\n [class.nui-widget__header__content-title-with-additional-content]=\"\n withCustomElement || editMode\n \"\n >\n <!-- text only header with no url defined -->\n <div\n class=\"nui-text-widget nui-widget__header__content-title\"\n [title]=\"title\"\n *ngIf=\"!url || editMode\"\n >\n {{ title }}\n </div>\n\n <!-- link version of the header -->\n <div *ngIf=\"url && !editMode\">\n <a\n [href]=\"url\"\n (click)=\"prepareLink($event)\"\n (mouseenter)=\"prepareLink($event)\"\n (mousedown)=\"\n $event.stopPropagation(); $event.preventDefault()\n \"\n class=\"nui-text-widget nui-widget__header__content-title\"\n [nuiTooltip]=\"linkTooltip\"\n >{{ title }}</a\n >\n </div>\n\n <div\n *ngIf=\"subtitle\"\n class=\"nui-text-hint nui-widget__header__content-help-hint\"\n [title]=\"subtitle\"\n >\n {{ subtitle }}\n </div>\n </div>\n <div class=\"nui-widget__header__content-actions\">\n <a\n *ngIf=\"url && !editMode\"\n 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)=\"\n $event.stopPropagation(); $event.preventDefault()\n \"\n >\n </a>\n <button\n *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()\"\n ></button>\n <button\n *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()\"\n ></button>\n <nui-menu\n *ngIf=\"!hideMenu && !editMode\"\n class=\"nui-widget__header__content-actions__menu\"\n icon=\"menu\"\n displayStyle=\"action\"\n [appendToBody]=\"true\"\n >\n <nui-menu-action\n *ngIf=\"reloadable\"\n (actionDone)=\"onReloadData()\"\n >\n <nui-icon icon=\"reload\"></nui-icon>\n <span i18n>Reload data</span>\n </nui-menu-action>\n </nui-menu>\n <!--TODO: After NUI-3431 should be changed to regular menu instead of popup-->\n <nui-popup\n class=\"nui-widget-header__action-remove\"\n [appendToBody]=\"true\"\n *ngIf=\"removable && editMode\"\n >\n <span nuiTooltip=\"Remove widget\" i18n-nuiTooltip>\n <button\n 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\n type=\"destructive\"\n (actionDone)=\"removeWidget()\"\n i18n\n >Remove Widget</nui-menu-action\n >\n </div>\n </nui-popup>\n </div>\n </div>\n </div>\n <div *ngIf=\"collapsible\" class=\"collapse-spacer\"></div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { PortalModule } from \"@angular/cdk/portal\";\nimport { NgModule } from \"@angular/core\";\n\nimport { NuiDashboardsCommonModule } from \"../common/common.module\";\nimport { PizzagnaComponent } from \"./components/pizzagna/pizzagna.component\";\nimport { ComponentPortalDirective } from \"./directives/component-portal/component-portal.directive\";\n\n@NgModule({\n imports: [PortalModule, NuiDashboardsCommonModule],\n declarations: [PizzagnaComponent, ComponentPortalDirective],\n exports: [PortalModule, PizzagnaComponent, ComponentPortalDirective],\n})\nexport class NuiPizzagnaModule {}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport const HTML_COLORS: Map<string, string> = new Map([\n [\"aliceblue\", \"#f0f8ff\"],\n [\"antiquewhite\", \"#faebd7\"],\n [\"aqua\", \"#00ffff\"],\n [\"aquamarine\", \"#7fffd4\"],\n [\"azure\", \"#f0ffff\"],\n [\"beige\", \"#f5f5dc\"],\n [\"bisque\", \"#ffe4c4\"],\n [\"black\", \"#000000\"],\n [\"blanchedalmond\", \"#ffebcd\"],\n [\"blue\", \"#0000ff\"],\n [\"blueviolet\", \"#8a2be2\"],\n [\"brown\", \"#a52a2a\"],\n [\"burlywood\", \"#deb887\"],\n [\"cadetblue\", \"#5f9ea0\"],\n [\"chartreuse\", \"#7fff00\"],\n [\"chocolate\", \"#d2691e\"],\n [\"coral\", \"#ff7f50\"],\n [\"cornflowerblue\", \"#6495ed\"],\n [\"cornsilk\", \"#fff8dc\"],\n [\"crimson\", \"#dc143c\"],\n [\"cyan\", \"#00ffff\"],\n [\"darkblue\", \"#00008b\"],\n [\"darkcyan\", \"#008b8b\"],\n [\"darkgoldenrod\", \"#b8860b\"],\n [\"darkgray\", \"#a9a9a9\"],\n [\"darkgreen\", \"#006400\"],\n [\"darkkhaki\", \"#bdb76b\"],\n [\"darkmagenta\", \"#8b008b\"],\n [\"darkolivegreen\", \"#556b2f\"],\n [\"darkorange\", \"#ff8c00\"],\n [\"darkorchid\", \"#9932cc\"],\n [\"darkred\", \"#8b0000\"],\n [\"darksalmon\", \"#e9967a\"],\n [\"darkseagreen\", \"#8fbc8f\"],\n [\"darkslateblue\", \"#483d8b\"],\n [\"darkslategray\", \"#2f4f4f\"],\n [\"darkturquoise\", \"#00ced1\"],\n [\"darkviolet\", \"#9400d3\"],\n [\"deeppink\", \"#ff1493\"],\n [\"deepskyblue\", \"#00bfff\"],\n [\"dimgray\", \"#696969\"],\n [\"dodgerblue\", \"#1e90ff\"],\n [\"firebrick\", \"#b22222\"],\n [\"floralwhite\", \"#fffaf0\"],\n [\"forestgreen\", \"#228b22\"],\n [\"fuchsia\", \"#ff00ff\"],\n [\"gainsboro\", \"#dcdcdc\"],\n [\"ghostwhite\", \"#f8f8ff\"],\n [\"gold\", \"#ffd700\"],\n [\"goldenrod\", \"#daa520\"],\n [\"gray\", \"#808080\"],\n [\"green\", \"#008000\"],\n [\"greenyellow\", \"#adff2f\"],\n [\"honeydew\", \"#f0fff0\"],\n [\"hotpink\", \"#ff69b4\"],\n [\"indianred \", \"#cd5c5c\"],\n [\"indigo\", \"#4b0082\"],\n [\"ivory\", \"#fffff0\"],\n [\"khaki\", \"#f0e68c\"],\n [\"lavender\", \"#e6e6fa\"],\n [\"lavenderblush\", \"#fff0f5\"],\n [\"lawngreen\", \"#7cfc00\"],\n [\"lemonchiffon\", \"#fffacd\"],\n [\"lightblue\", \"#add8e6\"],\n [\"lightcoral\", \"#f08080\"],\n [\"lightcyan\", \"#e0ffff\"],\n [\"lightgoldenrodyellow\", \"#fafad2\"],\n [\"lightgrey\", \"#d3d3d3\"],\n [\"lightgreen\", \"#90ee90\"],\n [\"lightpink\", \"#ffb6c1\"],\n [\"lightsalmon\", \"#ffa07a\"],\n [\"lightseagreen\", \"#20b2aa\"],\n [\"lightskyblue\", \"#87cefa\"],\n [\"lightslategray\", \"#778899\"],\n [\"lightsteelblue\", \"#b0c4de\"],\n [\"lightyellow\", \"#ffffe0\"],\n [\"lime\", \"#00ff00\"],\n [\"limegreen\", \"#32cd32\"],\n [\"linen\", \"#faf0e6\"],\n [\"magenta\", \"#ff00ff\"],\n [\"maroon\", \"#800000\"],\n [\"mediumaquamarine\", \"#66cdaa\"],\n [\"mediumblue\", \"#0000cd\"],\n [\"mediumorchid\", \"#ba55d3\"],\n [\"mediumpurple\", \"#9370d8\"],\n [\"mediumseagreen\", \"#3cb371\"],\n [\"mediumslateblue\", \"#7b68ee\"],\n [\"mediumspringgreen\", \"#00fa9a\"],\n [\"mediumturquoise\", \"#48d1cc\"],\n [\"mediumvioletred\", \"#c71585\"],\n [\"midnightblue\", \"#191970\"],\n [\"mintcream\", \"#f5fffa\"],\n [\"mistyrose\", \"#ffe4e1\"],\n [\"moccasin\", \"#ffe4b5\"],\n [\"navajowhite\", \"#ffdead\"],\n [\"navy\", \"#000080\"],\n [\"oldlace\", \"#fdf5e6\"],\n [\"olive\", \"#808000\"],\n [\"olivedrab\", \"#6b8e23\"],\n [\"orange\", \"#ffa500\"],\n [\"orangered\", \"#ff4500\"],\n [\"orchid\", \"#da70d6\"],\n [\"palegoldenrod\", \"#eee8aa\"],\n [\"palegreen\", \"#98fb98\"],\n [\"paleturquoise\", \"#afeeee\"],\n [\"palevioletred\", \"#d87093\"],\n [\"papayawhip\", \"#ffefd5\"],\n [\"peachpuff\", \"#ffdab9\"],\n [\"peru\", \"#cd853f\"],\n [\"pink\", \"#ffc0cb\"],\n [\"plum\", \"#dda0dd\"],\n [\"powderblue\", \"#b0e0e6\"],\n [\"purple\", \"#800080\"],\n [\"rebeccapurple\", \"#663399\"],\n [\"red\", \"#ff0000\"],\n [\"rosybrown\", \"#bc8f8f\"],\n [\"royalblue\", \"#4169e1\"],\n [\"saddlebrown\", \"#8b4513\"],\n [\"salmon\", \"#fa8072\"],\n [\"sandybrown\", \"#f4a460\"],\n [\"seagreen\", \"#2e8b57\"],\n [\"seashell\", \"#fff5ee\"],\n [\"sienna\", \"#a0522d\"],\n [\"silver\", \"#c0c0c0\"],\n [\"skyblue\", \"#87ceeb\"],\n [\"slateblue\", \"#6a5acd\"],\n [\"slategray\", \"#708090\"],\n [\"snow\", \"#fffafa\"],\n [\"springgreen\", \"#00ff7f\"],\n [\"steelblue\", \"#4682b4\"],\n [\"tan\", \"#d2b48c\"],\n [\"teal\", \"#008080\"],\n [\"thistle\", \"#d8bfd8\"],\n [\"tomato\", \"#ff6347\"],\n [\"turquoise\", \"#40e0d0\"],\n [\"violet\", \"#ee82ee\"],\n [\"wheat\", \"#f5deb3\"],\n [\"white\", \"#ffffff\"],\n [\"whitesmoke\", \"#f5f5f5\"],\n [\"yellow\", \"#ffff00\"],\n [\"yellowgreen\", \"#9acd32\"],\n]);\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport isNil from \"lodash/isNil\";\n\nimport { HTML_COLORS } from \"./HTMLcolors\";\n\n@Injectable()\nexport class ColorService {\n public RGBToHexRGBToHex(rgbColor: string): string {\n // Choose correct separator\n const sep = rgbColor.indexOf(\",\") > -1 ? \",\" : \" \";\n // Turn \"rgb(r,g,b)\" into [r,g,b]\n const rgbParts = rgbColor.substr(4).split(\")\")[0].split(sep);\n\n let r = (+rgbParts[0]).toString(16),\n g = (+rgbParts[1]).toString(16),\n b = (+rgbParts[2]).toString(16);\n\n if (r.length === 1) {\n r = \"0\" + r;\n }\n if (g.length === 1) {\n g = \"0\" + g;\n }\n if (b.length === 1) {\n b = \"0\" + b;\n }\n\n return \"#\" + r + g + b;\n }\n\n public isHEX(hexColor: string): boolean {\n return (\n /^#[0-9A-F]{6}$/i.test(hexColor) ||\n /^#([0-9A-F]{3}){1,2}$/i.test(hexColor)\n );\n }\n\n public colorKeywordsToHex(color: string): string {\n const hexOfColor = HTML_COLORS.get(color);\n\n return !isNil(hexOfColor) ? hexOfColor : \"\";\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Overlay, OverlayConfig } from \"@angular/cdk/overlay\";\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil, tap } from \"rxjs/operators\";\n\nimport {\n getOverlayPositions,\n IOptionValueObject,\n IResizeConfig,\n NuiFormFieldControl,\n OverlayUtilitiesService,\n SelectV2Component,\n} from \"@nova-ui/bits\";\nimport { getColorValueByName } from \"@nova-ui/charts\";\n\nimport { IPaletteColor } from \"../../../types\";\nimport { ColorService } from \"./color.service\";\n\n// Left and right paddings of .color-picker-container element\nconst CONTAINER_SIDE_PADDINGS_PX: number = 20;\n// Width of the .box element\nconst BOX_WIDTH_PX: number = 30;\n\n@Component({\n selector: \"nui-color-picker\",\n templateUrl: \"./color-picker.component.html\",\n styleUrls: [\"./color-picker.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NuiFormFieldControl,\n useExisting: forwardRef(() => ColorPickerComponent),\n multi: true,\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ColorPickerComponent),\n multi: true,\n },\n ColorService,\n ],\n})\nexport class ColorPickerComponent\n implements\n NuiFormFieldControl,\n ControlValueAccessor,\n OnChanges,\n AfterViewInit,\n OnDestroy\n{\n @Input() colors: string[];\n @Input() colorPalette: IPaletteColor[];\n @Input() cols: number | undefined;\n\n @ViewChild(forwardRef(() => SelectV2Component))\n public select: SelectV2Component;\n\n public overlayConfig: OverlayConfig;\n public value: string | IOptionValueObject;\n public isInErrorState: boolean;\n public defaultColor: string = \"var(--nui-color-bg-secondary)\";\n public maxWidth: string;\n public palette: Partial<IPaletteColor[]>;\n public isBlackTick: boolean;\n protected overlayUtilities: OverlayUtilitiesService =\n new OverlayUtilitiesService();\n\n private selectResizeObserver: ResizeObserver;\n private destroy$ = new Subject<void>();\n\n constructor(\n protected changeDetection: ChangeDetectorRef,\n private colorService: ColorService,\n private cdkOverlay: Overlay\n ) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.colors) {\n this.colors = changes.colors.currentValue;\n }\n\n if (changes.colorPalette) {\n this.colorPalette = changes.colorPalette.currentValue;\n }\n }\n\n ngAfterViewInit() {\n if (this.value) {\n this.select?.writeValue(this.value);\n this.isBlackTick = this.determineBlackTick(this.value.toString());\n }\n\n this.palette =\n this.colorPalette || this.colors.map((color) => ({ color }));\n\n this.initOverlayUtilities();\n\n this.select.valueSelected\n .pipe(\n tap((value) => this.writeValue(value as any)),\n tap((value) => this.onChange(value)),\n takeUntil(this.destroy$)\n )\n .subscribe((value) => {\n if (value) {\n this.isBlackTick = this.determineBlackTick(\n value.toString()\n );\n }\n });\n\n const positions = getOverlayPositions();\n\n const positionStrategy = this.cdkOverlay\n .position()\n .flexibleConnectedTo(this.select.elRef.nativeElement)\n .withPush(false)\n .withViewportMargin(0)\n .withPositions([\n positions[\"bottom-right\"],\n positions[\"bottom-left\"],\n positions[\"top-right\"],\n positions[\"top-left\"],\n ]);\n\n this.overlayConfig = {\n maxWidth: this.cols\n ? this.cols * BOX_WIDTH_PX + CONTAINER_SIDE_PADDINGS_PX + \"px\"\n : \"260px\",\n positionStrategy,\n };\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n onChange(value: any) {}\n\n _onTouched() {}\n\n public writeValue(value: string | IOptionValueObject) {\n this.value = value;\n this.select?.writeValue(value);\n }\n\n public registerOnChange(fn: () => void) {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: () => {}) {\n this._onTouched = fn;\n }\n\n public setStyles = (color: string) => ({\n \"background-color\": color || this.defaultColor,\n });\n\n public determineBlackTick(color: string) {\n let hexColorValue = \"#fff\";\n\n if (this.colorService.isHEX(color)) {\n hexColorValue = color;\n } else {\n hexColorValue =\n getColorValueByName(color) ||\n this.colorService.RGBToHexRGBToHex(color) ||\n this.colorService.colorKeywordsToHex(color);\n }\n\n return this.getContrastOnBgColor(hexColorValue) === \"#fff\";\n }\n\n private initOverlayUtilities() {\n const dropdown = this.select.dropdown;\n const config = { updateSize: false } as IResizeConfig;\n this.selectResizeObserver = this.overlayUtilities\n .setPopupComponent(this.select.dropdown)\n .getResizeObserver(config);\n\n dropdown.show$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.overlayUtilities.syncWidth();\n this.selectResizeObserver.observe(this.select.elRef.nativeElement);\n });\n\n dropdown.hide$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n this.selectResizeObserver.unobserve(\n this.select.elRef.nativeElement\n );\n });\n }\n\n // convert hex code to rgb and compare the contrast of pure black and pure white on bgColor\n private getContrastOnBgColor(bgColor: string) {\n if (!bgColor) {\n return \"\";\n }\n\n return parseInt(bgColor.replace(\"#\", \"\"), 16) > 0xffffff / 2\n ? \"#fff\"\n : \"#000\";\n }\n}\n","<nui-select-v2\n class=\"color-picker-select\"\n [overlayConfig]=\"overlayConfig\"\n [syncWidth]=\"false\"\n [displayValueTemplate]=\"colorSelectTemplate\"\n>\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\n [value]=\"item?.color\"\n [displayValueContext]=\"item\"\n class=\"w-100 h-100 reset-box-sizes\"\n #option\n >\n <div\n class=\"color-picker-option\"\n [attr.title]=\"item?.label\"\n [class.color-picker-option--selected]=\"option?.selected\"\n >\n <div\n class=\"color-picker-option__color-box\"\n [ngStyle]=\"setStyles(item?.color)\"\n >\n <div\n class=\"color-picker-option__glyph\"\n [class.black-tick]=\"\n isBlackTick || item?.color === defaultColor\n \"\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\n class=\"color-picker-input__color-box\"\n [ngStyle]=\"setStyles(item?.color)\"\n ></div>\n </div>\n <div class=\"color-picker-input__toggle\">\n <nui-icon\n [style.transform]=\"open ? 'rotate(180deg)' : ''\"\n icon=\"caret-down\"\n ></nui-icon>\n </div>\n </div>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { IWidget } from \"../../components/widget/types\";\nimport { WidgetTypesService } from \"../../services/widget-types.service\";\n\n@Pipe({\n name: \"nuiPizzagnaRoot\",\n pure: true,\n})\nexport class PizzagnaRootPipe implements PipeTransform {\n constructor(private widgetTypesService: WidgetTypesService) {}\n\n public transform(\n widget: IWidget | null,\n key: \"configurator\" | \"widget\" = \"widget\"\n ) {\n if (!widget?.type) {\n return null;\n }\n\n const widgetType = this.widgetTypesService.getWidgetType(\n widget.type,\n widget.version\n );\n\n return widgetType.paths?.[key]?.root;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Portal } from \"@angular/cdk/portal\";\nimport {\n ChangeDetectorRef,\n Component,\n ComponentRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { OVERLAY_CONTAINER } from \"@nova-ui/bits\";\n\nimport { IWidget } from \"../../../components/widget/types\";\nimport { PizzagnaComponent } from \"../../../pizzagna/components/pizzagna/pizzagna.component\";\nimport { WidgetTypesService } from \"../../../services/widget-types.service\";\nimport { IPizzagna } from \"../../../types\";\nimport { PreviewService } from \"../../services/preview.service\";\n\n/** @ignore */\n@Component({\n selector: \"nui-configurator\",\n templateUrl: \"./configurator.component.html\",\n styleUrls: [\"./configurator.component.less\"],\n providers: [\n PreviewService,\n {\n provide: OVERLAY_CONTAINER,\n useValue: \".nui-dashwiz-step--active .configurator-scrollable\",\n },\n ],\n host: { class: \"nui-configurator\" },\n})\nexport class ConfiguratorComponent implements OnInit, OnDestroy {\n public static lateLoadKey = \"ConfiguratorComponent\";\n\n @Input() formPortal: Portal<any>;\n @Input() previewWidget: IWidget | null;\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() result = new EventEmitter<IWidget | null>();\n @Output() formPortalAttached = new EventEmitter<ComponentRef<any>>();\n\n @ViewChild(\"previewPizzagnaComponent\", { static: true })\n previewPizzagnaComponent: PizzagnaComponent;\n\n public submitError = new Subject<void>();\n private destroy$ = new Subject<void>();\n\n constructor(\n public widgetTypesService: WidgetTypesService,\n public changeDetector: ChangeDetectorRef\n ) {}\n\n // ----- LIFECYCLE -----\n\n public ngOnInit(): void {\n if (!this.previewWidget) {\n this.previewWidget = {\n // TODO: Replace null with an string or change the IWidget prop definition\n // @ts-ignore: Type 'null' is not assignable to type 'string'.\n id: null,\n type: \"previewPlaceholder\",\n pizzagna:\n this.widgetTypesService.getWidgetType(\"previewPlaceholder\")\n .widget,\n };\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // -----\n\n public handleSubmitError() {\n this.submitError.next();\n }\n\n public onFormPortalAttached(componentRef: ComponentRef<any>) {\n this.formPortalAttached.emit(componentRef);\n }\n\n public updateWidget(previewWidget: IWidget | null) {\n this.previewWidget = previewWidget;\n this.changeDetector.markForCheck();\n }\n\n public formCancel() {\n this.result.next(null);\n }\n\n public formSubmit() {\n this.result.next(this.previewWidget);\n }\n\n public onPizzagnaChange(pizzagna: IPizzagna) {\n if (this.previewWidget) {\n this.previewWidget.pizzagna = pizzagna;\n }\n }\n}\n","<div class=\"nui-configurator__backdrop\"></div>\n<div class=\"nui-configurator__content\">\n <nui-panel\n 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 >\n <div\n class=\"nui-configurator__preview d-flex align-items-center justify-content-center\"\n >\n <div class=\"nui-configurator__preview-area\">\n <nui-preview-overlay></nui-preview-overlay>\n <nui-pizzagna\n *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 >\n </nui-pizzagna>\n </div>\n </div>\n <div nuiPanelEmbeddedBody class=\"nui-configurator__body\">\n <ng-container\n [cdkPortalOutlet]=\"formPortal\"\n (attached)=\"onFormPortalAttached($event)\"\n ></ng-container>\n </div>\n </nui-panel>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nui-drop-area\",\n template: ``,\n styleUrls: [\"./drop-area.component.less\"],\n})\nexport class DropAreaComponent {}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n ControlContainer,\n FormGroup,\n FormGroupDirective,\n} from \"@angular/forms\";\n\nimport { EventBus, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { BaseLayout } from \"../../../components/layouts/base-layout\";\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { PIZZAGNA_EVENT_BUS } from \"../../../types\";\n\n/**\n * This component registers multiple nested form groups in a parent form\n */\n@Component({\n selector: \"nui-form-stack\",\n templateUrl: \"./form-stack.component.html\",\n viewProviders: [\n {\n provide: ControlContainer,\n useExisting: FormGroupDirective,\n },\n ],\n})\nexport class FormStackComponent\n extends BaseLayout\n implements OnInit, OnChanges\n{\n static lateLoadKey = \"FormStackComponent\";\n\n @Input() nodes: [];\n\n @HostBinding(\"class\")\n public elementClass = \"\";\n\n public form: FormGroup;\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService,\n public formDirective: FormGroupDirective,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public ngOnInit() {\n this.form = this.formDirective.form;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n super.ngOnChanges(changes);\n }\n\n public onEvent(componentId: string, event: IEvent) {\n if (event.id === \"formReady\") {\n this.addFormGroup(componentId, event.payload);\n }\n }\n\n public addFormGroup(name: string, formGroup: FormGroup) {\n this.form.addControl(name, formGroup);\n }\n\n public getNodes(): string[] {\n return this.nodes;\n }\n}\n","<ng-container *ngFor=\"let node of nodeConfigs; trackBy: trackByFn\">\n <ng-container\n 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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n EventEmitter,\n Injectable,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n FormBuilder,\n FormGroup,\n Validators,\n} from \"@angular/forms\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector, IHasForm, IProperties } from \"../../../../types\";\n\n@Injectable()\nexport abstract class DonutChartFormatterConfiguratorComponent\n implements IHasChangeDetector, IHasForm, OnChanges, OnInit\n{\n @Input() contentFormatterProperties: IProperties;\n @Input() dsOutput: any;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n protected formBuilder: FormBuilder,\n public logger: LoggerService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n // In case we change the formatter the configurator's form gets destroyed.\n // We need it recreated if it is selected once again\n if (!this.form) {\n this.initForm();\n }\n // In case we have already stored some values in the configuration we want to retreive them\n if (this.contentFormatterProperties) {\n Object.keys(this.contentFormatterProperties).forEach((p) => {\n this.form?.get(p)?.setValue(this.contentFormatterProperties[p]);\n });\n } else {\n // In case 'properties' are not set in configuration we assign the value of the very first metric\n this.form?.get(\"currentMetric\")?.patchValue(this.properMetric);\n }\n }\n\n public ngOnInit() {\n this.initForm();\n }\n\n public initForm(): void {\n this.form = this.formBuilder.group({\n currentMetric: [this.properMetric, Validators.required],\n });\n this.addCustomFormControls(this.form);\n this.formReady.emit(this.form);\n }\n\n get currentMetric(): AbstractControl {\n return this.form.get(\"currentMetric\") as AbstractControl;\n }\n\n /**\n * Returns the valid metric including cases when current selected metric does not exist eny more.\n */\n get properMetric(): string {\n const currentMetric = this.contentFormatterProperties?.currentMetric;\n // This verifies whether the current metric still exists in the list of metric received from the datasource\n const hasMetric = this.dsOutput?.result.find(\n (m: any) => m.id === currentMetric\n );\n // We return current metric if it is still in the list. Otherwise we fallback to the very first item of the\n // list received from the datasource\n return hasMetric ? currentMetric : this.dsOutput?.result[0]?.id;\n }\n\n /**\n * Add your custom form controls here\n *\n * @param form\n */\n protected addCustomFormControls(form: FormGroup): void {}\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./pizzagna.service\";\nexport * from \"./component-portal.service\";\nexport * from \"./component-registry.service\";\nexport * from \"./dynamic-component-creator.service\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./pizzagna.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./component-portal.directive\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./get-pizzagna-property-path\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./services/public-api\";\nexport * from \"./components/pizzagna/public-api\";\nexport * from \"./directives/component-portal/public-api\";\nexport * from \"./functions/public-api\";\nexport * from \"./services/public-api\";\nexport * from \"./pizzagna.module\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { PizzagnaService } from \"../../../../pizzagna/public-api\";\nimport { DonutChartFormatterConfiguratorComponent } from \"../widget-formatter-configurators/donut-formatter-configurator.component\";\n\n@Component({\n selector: \"nui-donut-content-configurator\",\n templateUrl: \"donut-content-percentage-configuration.component.html\",\n})\nexport class DonutContentPercentageConfigurationComponent extends DonutChartFormatterConfiguratorComponent {\n static lateLoadKey = \"DonutContentPercentageConfigurationComponent\";\n\n constructor(\n changeDetector: ChangeDetectorRef,\n formBuilder: FormBuilder,\n logger: LoggerService,\n private pizzagnaService: PizzagnaService\n ) {\n super(changeDetector, formBuilder, logger);\n }\n}\n","<div [formGroup]=\"form\">\n <div class=\"mt-4\">\n <nui-form-field\n caption=\"Metrics\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"currentMetric\"\n >\n <nui-select-v2 formControlName=\"currentMetric\">\n <nui-select-v2-option\n *ngFor=\"let itemValue of dsOutput?.result\"\n [value]=\"itemValue?.id\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n} from \"@angular/core\";\nimport sumBy from \"lodash/sumBy\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil, tap } from \"rxjs/operators\";\n\nimport {\n ChartAssist,\n IAccessors,\n IChartAssistEvent,\n IChartAssistSeries,\n} from \"@nova-ui/charts\";\n\nimport { IProperties } from \"../../../../types\";\n\n@Component({\n template: `<ng-container>\n <div class=\"nui-text-page\">\n <div class=\"nui-text-page\">\n {{ chartContent }}\n </div>\n </div>\n </ng-container>`,\n})\nexport class DonutContentPercentageFormatterComponent\n implements OnChanges, OnInit\n{\n static lateLoadKey = \"DonutContentPercentageFormatterComponent\";\n\n public sum: number;\n public emphasizedSeriesData: IChartAssistSeries<IAccessors> | undefined;\n public currentMetricData: number | undefined;\n public chartContent: string;\n\n private destroy$ = new Subject<void>();\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n @Input() data: IChartAssistSeries<IAccessors>[];\n @Input() chartAssist: ChartAssist;\n @Input() properties: IProperties;\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.data) {\n this.sum = sumBy(this.data, (s) => s.data[0]);\n }\n\n if (changes.properties) {\n // If current metric is not in the list of metrics any more we fall back to the very first one from the list we get from the datasource\n this.currentMetricData =\n this.data.find(\n (item) => item.id === this.properties?.currentMetric\n )?.data[0] || this.data[0].data[0];\n }\n\n this.getProperContentValue();\n }\n\n ngOnInit(): void {\n this.chartAssist.chartAssistSubject\n .pipe(\n tap(\n (data: IChartAssistEvent) =>\n (this.emphasizedSeriesData = this.data.find(\n (item) => item.id === data.payload.seriesId\n ))\n ),\n tap(() => this.getProperContentValue()),\n takeUntil(this.destroy$)\n )\n .subscribe();\n }\n\n public getProperSeriesData(): number {\n return this.emphasizedSeriesData\n ? this.emphasizedSeriesData?.data[0]\n : this.currentMetricData;\n }\n\n public getProperContentValue(): void {\n this.chartContent =\n ((this.getProperSeriesData() / this.sum) * 100).toFixed(2) + \"%\";\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n LOCALE_ID,\n OnChanges,\n} from \"@angular/core\";\nimport sumBy from \"lodash/sumBy\";\n\nimport { UnitConversionService } from \"@nova-ui/bits\";\n\nimport { DEFAULT_UNIT_CONVERSION_THRESHOLD } from \"../../../../common/constants\";\nimport { DashboardUnitConversionPipe } from \"../../../../common/pipes/dashboard-unit-conversion-pipe\";\nimport { IProportionalWidgetConfig } from \"../../../../components/public-api\";\nimport { IFormatterData } from \"../types\";\n\n@Component({\n template: `<ng-container>\n <nui-icon\n *ngIf=\"config?.chartDonutContentIcon\"\n [icon]=\"config?.chartDonutContentIcon\"\n iconSize=\"medium\"\n ></nui-icon>\n <div class=\"nui-text-page\">\n <span\n *ngIf=\"sum < conversionThreshold; else convertedValueDisplay\"\n >{{ sum | number: \"1.0-3\" }}</span\n >\n <ng-template #convertedValueDisplay>{{\n convertedValue\n }}</ng-template>\n </div>\n <div *ngIf=\"config?.chartDonutContentLabel\" class=\"nui-text-secondary\">\n {{ config?.chartDonutContentLabel }}\n </div>\n </ng-container>`,\n})\nexport class DonutContentRawFormatterComponent implements OnChanges {\n static lateLoadKey = \"DonutContentRawFormatterComponent\";\n\n public sum: number;\n public convertedValue: string;\n public conversionThreshold = DEFAULT_UNIT_CONVERSION_THRESHOLD;\n\n private unitConversionPipe: DashboardUnitConversionPipe;\n constructor(\n public changeDetector: ChangeDetectorRef,\n unitConversionService: UnitConversionService\n ) {\n this.unitConversionPipe = new DashboardUnitConversionPipe(\n unitConversionService\n );\n }\n\n @Input() data: IFormatterData[];\n @Input() config: IProportionalWidgetConfig;\n\n ngOnChanges(): void {\n this.sum = sumBy(this.data, (s) => s.data[0]);\n this.convertedValue = this.unitConversionPipe.transform(this.sum);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Input, OnChanges } from \"@angular/core\";\nimport sumBy from \"lodash/sumBy\";\n\nimport { IFormatterData } from \"../types\";\n\n@Component({\n template: `<ng-container\n ><div class=\"nui-text-page\">{{ this.sum }}</div></ng-container\n >`,\n})\nexport class DonutContentSumFormatterComponent implements OnChanges {\n static lateLoadKey = \"DonutContentSumFormatterComponent\";\n\n public sum: number;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n @Input() data: IFormatterData[];\n\n ngOnChanges() {\n this.sum = sumBy(this.data, (s) => s.data[0]);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Input, OnChanges } from \"@angular/core\";\n\nimport { IconService } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector } from \"../../../../types\";\nimport { IFormatterData } from \"../types\";\n\n@Component({\n template: `\n <div\n *ngIf=\"isValid\"\n class=\"d-flex align-items-center justify-content-center\"\n >\n <nui-icon\n *ngIf=\"iconFound; else iconNotFound\"\n [icon]=\"data?.value\"\n ></nui-icon>\n </div>\n <ng-template #iconNotFound>\n <nui-icon\n title=\"Unknown icon\"\n i18n-title\n iconColor=\"disabled-gray\"\n icon=\"help\"\n ></nui-icon>\n </ng-template>\n `,\n})\nexport class IconFormatterComponent implements OnChanges, IHasChangeDetector {\n static lateLoadKey = \"IconFormatterComponent\";\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public iconService: IconService\n ) {}\n\n public isValid: boolean = false;\n public iconFound: boolean = true;\n @Input() public data?: IFormatterData;\n\n ngOnChanges() {\n this.isValid = !!this.data?.value;\n this.iconFound = !!this.iconService.getIconData(this.data?.value);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n SimpleChanges,\n} from \"@angular/core\";\n\nimport { IHasChangeDetector } from \"../../../../types\";\nimport { ILinkFormatterData } from \"../types\";\n\n@Component({\n template: `<div class=\"link-formatter-container\">\n <a\n *ngIf=\"isValid\"\n class=\"nui-text-ellipsis\"\n [href]=\"data?.link\"\n [target]=\"targetSelf ? '_self' : '_blank'\"\n >\n {{ data?.value }}\n </a>\n </div>`,\n styles: [\n `\n .link-formatter-container {\n display: grid;\n grid-template-columns: 1fr;\n }\n `,\n ],\n})\nexport class LinkFormatterComponent implements OnChanges, IHasChangeDetector {\n static lateLoadKey = \"LinkFormatterComponent\";\n\n @Input() data: ILinkFormatterData;\n @Input() targetSelf?: boolean;\n\n public isValid = false;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.isValid = Boolean(this.data && this.data.value && this.data.link);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n} from \"@angular/core\";\n\nimport { IFormatterData } from \"../types\";\n\n@Component({\n template: ` <ng-container>{{ data?.value }}</ng-container>`,\n})\nexport class RawFormatterComponent {\n static lateLoadKey = \"RawFormatterComponent\";\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n @Input() data: IFormatterData;\n\n @Input()\n @HostBinding(\"class\")\n public elementClass: string;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Component } from \"@angular/core\";\n\nimport { RawFormatterComponent } from \"../raw-formatter/raw-formatter.component\";\n\n@Component({\n template: ` <ng-container> {{ data?.value }}% </ng-container>`,\n})\nexport class PercentageFormatterComponent extends RawFormatterComponent {\n static lateLoadKey = \"PercentageFormatterComponent\";\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport interface ISiUnitsPrefix {\n power: number;\n prefix: string;\n label: string;\n}\n\nexport const SI_UNITS_PREFIXES: ISiUnitsPrefix[] = [\n {\n power: 1,\n prefix: \"\",\n label: \"\",\n },\n {\n power: 3,\n prefix: \"k\",\n label: \"kilo\",\n },\n {\n power: 6,\n prefix: \"M\",\n label: \"mega\",\n },\n {\n power: 9,\n prefix: \"G\",\n label: \"giga\",\n },\n {\n power: 12,\n prefix: \"T\",\n label: \"tera\",\n },\n {\n power: 15,\n prefix: \"P\",\n label: \"peta\",\n },\n {\n power: 18,\n prefix: \"E\",\n label: \"exa\",\n },\n {\n power: 21,\n prefix: \"Z\",\n label: \"zetta\",\n },\n {\n power: 24,\n prefix: \"Y\",\n label: \"yotta\",\n },\n];\nexport const SI_UNITS_PREFIXES_NEGATIVE: ISiUnitsPrefix[] = [\n {\n power: -24,\n prefix: \"y\",\n label: \"yocto\",\n },\n {\n power: -21,\n prefix: \"z\",\n label: \"zepto\",\n },\n {\n power: -18,\n prefix: \"a\",\n label: \"atto\",\n },\n {\n power: -15,\n prefix: \"f\",\n label: \"femto\",\n },\n {\n power: -12,\n prefix: \"p\",\n label: \"pico\",\n },\n {\n power: -9,\n prefix: \"n\",\n label: \"nano\",\n },\n {\n power: -6,\n prefix: \"µ\",\n label: \"micro\",\n },\n {\n power: -3,\n prefix: \"m\",\n label: \"milli\",\n },\n {\n power: 1,\n prefix: \"\",\n label: \"\",\n },\n];\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n SimpleChanges,\n} from \"@angular/core\";\nimport toNumber from \"lodash/toNumber\";\nimport toString from \"lodash/toString\";\n\nimport {\n ISiUnitsPrefix,\n SI_UNITS_PREFIXES,\n SI_UNITS_PREFIXES_NEGATIVE,\n} from \"../../../../constants/si-units-prefixes\";\nimport { IFormatterData } from \"../types\";\n\n@Component({\n 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 `,\n})\nexport class SiUnitsFormatterComponent implements OnChanges {\n static lateLoadKey = \"SiUnitsFormatterComponent\";\n // e.g. setting \"shiftPoint\" to \"1\" makes \"1000k\" to be displayed instead of \"1M\"\n static SHIFT_POINT_DEFAULT = 0;\n\n @Input() public data: IFormatterData;\n\n @Input()\n @HostBinding(\"class\")\n public elementClass: string;\n\n public value: string = \"0\";\n public modifier: string | undefined;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.data) {\n const { value } = changes.data.currentValue;\n\n if (value) {\n this.processSiUnitsValue(toString(value));\n }\n }\n }\n\n protected processSiUnitsValue(value: string): void {\n const prefix = this.getTransformPrefix(toNumber(value));\n\n this.value = this.getTransformedValue(value, prefix);\n this.modifier = prefix?.prefix;\n }\n\n protected getTransformedValue(\n value: string,\n prefix: ISiUnitsPrefix | undefined\n ): string {\n if (!prefix) {\n return value;\n }\n\n const transformed =\n prefix.power !== 1 ? +value * Math.pow(10, -prefix.power) : +value;\n const rounded = Math.round(transformed * 10) / 10; // round to 1 decimal\n\n return rounded.toString();\n }\n\n protected getTransformPrefix(origin: number): ISiUnitsPrefix | undefined {\n const value = Math.abs(origin);\n\n if (Number.isNaN(value)) {\n return undefined;\n }\n\n const shiftPoint =\n this.data?.shiftPoint ||\n SiUnitsFormatterComponent.SHIFT_POINT_DEFAULT;\n\n if (value >= 1) {\n const rounded = Math.round(value);\n const roundedStr = rounded.toString();\n const roundedLength = roundedStr.length;\n\n // iterate over prefixes from higher to lower\n const prefix = [...SI_UNITS_PREFIXES]\n .reverse()\n .find((pref) => roundedLength >= pref.power + 1 + shiftPoint);\n return prefix;\n } else {\n const modifier = getValueNegativeModifier(value);\n const prefix = [...SI_UNITS_PREFIXES_NEGATIVE]\n .reverse()\n .find(\n (pref) => modifier <= Math.abs(pref.power) + 1 + shiftPoint\n );\n return prefix;\n }\n }\n}\n\nfunction getValueNegativeModifier(\n value: number,\n prevModifier: number = 1\n): number {\n const val = Math.abs(value);\n\n if (val >= 1) {\n return 1;\n }\n\n const newModifier = prevModifier + 1;\n\n return val * Math.pow(10, newModifier) > 1\n ? newModifier\n : getValueNegativeModifier(val, newModifier);\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component, Input, OnChanges } from \"@angular/core\";\n\nimport { IHasChangeDetector } from \"../../../../types\";\n\n@Component({\n template: `\n <ng-container *ngIf=\"isValid\">\n <div\n class=\"nui-text-label align-items-center status-icon-formatter\"\n >\n <span class=\"nui-text-ellipsis text-right pl-3\">{{\n data.data\n }}</span>\n <nui-icon\n [icon]=\"data.icon\"\n class=\"nui-icon nui-icon-line-height mx-2\"\n ></nui-icon>\n <div *ngIf=\"data?.link; else noLink\">\n <a\n 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 >\n {{ data.name }}\n </a>\n </div>\n <ng-template #noLink>\n <span class=\"nui-text-ellipsis\" [style.font-size.px]=\"11\">{{\n data.name\n }}</span>\n </ng-template>\n </div>\n </ng-container>\n `,\n styles: [\n `\n .status-icon-formatter {\n display: grid;\n grid-template-columns: 50px auto minmax(114px, 1fr);\n }\n `,\n ],\n})\nexport class StatusWithIconFormatterComponent\n implements OnChanges, IHasChangeDetector\n{\n static lateLoadKey = \"StatusWithIconFormatterComponent\";\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n public isValid: boolean = false;\n @Input() data: {\n name: string;\n icon: string;\n data: number[];\n link?: string;\n };\n\n ngOnChanges() {\n this.isValid = !!(\n this.data &&\n this.data.icon &&\n this.data.name &&\n this.data.data\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { BehaviorSubject } from \"rxjs\";\n\n@Injectable()\nexport class ConfiguratorHeadingService {\n public height$: BehaviorSubject<number> = new BehaviorSubject<number>(0);\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n} from \"@angular/core\";\n\nimport { ConfiguratorHeadingService } from \"../../services/configurator-heading.service\";\n\n@Component({\n selector: \"nui-configurator-heading\",\n templateUrl: \"./configurator-heading.component.html\",\n styleUrls: [\"./configurator-heading.component.less\"],\n})\nexport class ConfiguratorHeadingComponent implements OnChanges {\n @Input() public configuratorTitle: string;\n @Input() public disableCloseButton = false;\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() public close = new EventEmitter();\n\n constructor(\n public el: ElementRef,\n private heading: ConfiguratorHeadingService\n ) {}\n\n public ngOnChanges() {\n this.heading.height$.next(\n +getComputedStyle(this.el.nativeElement).height.slice(0, -2)\n );\n }\n}\n","<div\n class=\"configurator-heading d-flex justify-content-between align-items-center p-4\"\n>\n <span class=\"nui-text-panel nui-text-ellipsis\" [title]=\"configuratorTitle\">\n {{ configuratorTitle }}\n </span>\n <button\n nui-button\n type=\"button\"\n displayStyle=\"action\"\n icon=\"close\"\n [disabled]=\"disableCloseButton\"\n (click)=\"this.close.emit()\"\n ></button>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n name: \"nuiWidgetConfiguratorSectionHeader\",\n})\nexport class WidgetConfiguratorSectionHeaderPipe implements PipeTransform {\n private readonly defaultHeaderPrefix = $localize`Value`;\n\n transform(\n headerText: string | undefined,\n index: number,\n headerPrefix: string = this.defaultHeaderPrefix\n ): string {\n return `${headerPrefix} ${index + 1}${headerText ? \" - \" : \"\"}${\n headerText || \"\"\n }`;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\nimport isArray from \"lodash/isArray\";\nimport isNil from \"lodash/isNil\";\n\n@Pipe({ name: \"nuiAddData\" })\nexport class AddDataPipe implements PipeTransform {\n transform(\n origin: object | Array<any> | undefined,\n value: any,\n key?: string\n ): object | Array<any> | any[] | undefined {\n if (isNil(origin)) {\n return;\n }\n\n if (isArray(origin)) {\n if (!value) {\n return origin;\n }\n\n const newArr = [...origin];\n newArr.push(value);\n\n return newArr;\n }\n\n const computedKey: string =\n typeof key === \"undefined\" ? \"undefined\" : key;\n return Object.assign({}, origin, { [computedKey]: value });\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CdkDragDrop, CdkDragStart } from \"@angular/cdk/drag-drop\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { FormArray, FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { startWith, takeUntil } from \"rxjs/operators\";\n\nimport { IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { BaseLayout } from \"../../../components/layouts/base-layout\";\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport {\n IComponentConfiguration,\n IHasChangeDetector,\n IHasForm,\n} from \"../../../types\";\nimport { IItemConfiguration } from \"../types\";\n\n/** @ignore */\n@Component({\n selector: \"nui-items-dynamic\",\n templateUrl: \"./items-dynamic.component.html\",\n styleUrls: [\"items-dynamic.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ItemsDynamicComponent\n extends BaseLayout\n implements IHasChangeDetector, IHasForm<FormArray>, OnInit, OnDestroy\n{\n static lateLoadKey = \"ItemsDynamicComponent\";\n\n @Input() items: IItemConfiguration[] = [];\n @Input() moveButtons = true;\n @Input() nodes: string[];\n @Input() headerPrefix: string;\n @Output() formReady = new EventEmitter<FormArray>();\n @Output() itemsChange = new EventEmitter();\n\n public form: FormArray;\n public height: number;\n public headerMap: Map<string, string> = new Map<string, string>();\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService,\n private formBuilder: FormBuilder\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public getItemForNode(\n node: IComponentConfiguration\n ): IItemConfiguration | undefined {\n return this.items.find((item) => item.id === node.id);\n }\n\n public getNodes() {\n return this.nodes;\n }\n\n public ngOnInit(): void {\n this.form = this.formBuilder.array([], Validators.required);\n this.formReady.emit(this.form);\n }\n\n public onEvent(componentId: string, event: IEvent) {\n // TODO: refactor\n const item = this.items.find((i) => i.id === componentId);\n const index = this.items.findIndex((i) => i.id === componentId);\n\n if (event.id === \"formReady\" && item) {\n this.onFormReady(item, event.payload, index);\n }\n\n if (event.id === \"formDestroy\") {\n this.onFormDestroy(event.payload);\n }\n }\n\n public onFormReady(\n item: IItemConfiguration,\n form: FormGroup,\n index: number\n ) {\n const childForm = this.formBuilder.group({\n id: [item.id],\n componentType: [item.componentType],\n properties: form,\n });\n\n this.form.setControl(index, childForm);\n\n setTimeout(() => {\n const label = form.get(`${item.id}/description`)?.get(\"label\");\n label?.valueChanges\n .pipe(startWith(label.value), takeUntil(this.destroyed$))\n .subscribe((value: string) => {\n this.headerMap.set(item.id, value || \"\");\n this.changeDetector.markForCheck();\n });\n });\n }\n\n public onFormDestroy(form: FormGroup) {\n // using setTimeout to allow the change detection cycle to finish before updating the form\n setTimeout(() => {\n // remove form\n let i = 0;\n for (; i < this.form.length; i++) {\n if (this.form.at(i).get(\"properties\") === form) {\n break;\n }\n }\n\n this.form.removeAt(i);\n // triggers form change\n this.form.patchValue(this.form.value, { emitEvent: true });\n });\n }\n\n public trackBy(index: number, item: IItemConfiguration) {\n return item.id;\n }\n\n public removeItem(\n item: IItemConfiguration | undefined,\n index: number\n ): void {\n if (!item) {\n throw new Error(\"Unable to remove undefined item from pizzagna\");\n }\n\n // remove item configuration - this will cause the onFormDestroy to be called for related form after component disappears from the view\n this.itemsChange.emit(this.items.filter((it) => it !== item));\n this.items.splice(index, 1);\n\n this.nodes.splice(index, 1);\n this.pizzagnaService.removeComponents(item.id);\n }\n\n public moveItem(index: number, toIndex: number) {\n const items = [...this.items];\n const item = items.splice(index, 1);\n items.splice(toIndex, 0, ...item);\n\n const nodes = [...this.nodes];\n const node = nodes.splice(index, 1);\n nodes.splice(toIndex, 0, ...node);\n this.nodes = [...nodes];\n\n this.moveFormValues(index, toIndex);\n this.itemsChange.emit(items);\n // triggers form change - setTimeout because we need to wait first for items to update\n // console.log(this.form.value);\n setTimeout(() => {\n this.form.setValue(this.form.value, { emitEvent: true });\n });\n }\n\n public drop(event: CdkDragDrop<string[]>) {\n this.moveItem(event.previousIndex, event.currentIndex);\n }\n\n public cdkDragStarted(event: CdkDragStart): void {\n this.height = event.source.element.nativeElement.offsetHeight;\n }\n\n private moveFormValues(index: number, toIndex: number) {\n const oldValue = this.form.at(index);\n this.form.removeAt(index);\n this.form.insert(toIndex, oldValue);\n }\n\n public ngOnDestroy() {\n // Ensures that any base class observables are unsubscribed.\n super.ngOnDestroy();\n }\n}\n","<div\n class=\"nui-items-dynamic\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n [formGroup]=\"form\"\n>\n <div\n cdkDrag\n 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\n class=\"nui-items-dynamic__drop-area\"\n *cdkDragPlaceholder\n [style.height.px]=\"height\"\n ></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\n [title]=\"\n headerMap.get(node.id)\n | nuiWidgetConfiguratorSectionHeader: i:headerPrefix\n \"\n class=\"nui-items-dynamic__header-text\"\n >\n {{\n headerMap.get(node.id)\n | nuiWidgetConfiguratorSectionHeader: i:headerPrefix\n }}\n </span>\n </ng-template>\n\n <ng-template #headerButtons>\n <div class=\"d-flex\">\n <!-- TODO: remove \"kpi\" prefix in v11 - NUI-5833 -->\n <button\n id=\"kpi-widget-remove-btn-{{ i }}\"\n nui-button\n type=\"button\"\n icon=\"delete\"\n displayStyle=\"action\"\n (click)=\"removeItem(getItemForNode(node), i)\"\n ></button>\n </div>\n </ng-template>\n\n <ng-container\n nuiComponentPortal\n #componentPortal=\"nuiComponentPortal\"\n [componentId]=\"node.id\"\n [componentType]=\"node.componentType\"\n [providers]=\"node.providers\"\n [properties]=\"\n node.properties\n | nuiAddData: headerText:'headerTextTemplate'\n | nuiAddData: headerButtons:'headerButtonsTemplate'\n \"\n [outputs]=\"['formReady', 'formDestroy']\"\n (output)=\"onEvent(node.id, $event)\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\n </ng-template>\n </ng-container>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nui-preview-placeholder\",\n templateUrl: \"./preview-placeholder.component.html\",\n styleUrls: [\"./preview-placeholder.component.less\"],\n})\nexport class PreviewPlaceholderComponent {\n public static lateLoadKey = \"PreviewPlaceholderComponent\";\n}\n","<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. To get\n started, select a widget type on the configuration panel.\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n} from \"@angular/core\";\n\nimport { IBusyConfig, SpinnerSize } from \"@nova-ui/bits\";\n\nimport { IDashwizStepComponent, IDashwizStepNavigatedEvent } from \"../types\";\n\n/**\n * Component that provides wizard step functionality.\n */\n@Component({\n selector: \"nui-dashwiz-step\",\n templateUrl: \"./dashwiz-step.component.html\",\n styleUrls: [\"./dashwiz-step.component.less\"],\n})\nexport class DashwizStepComponent\n implements IDashwizStepComponent, OnInit, OnChanges\n{\n /**\n * Template for step.\n */\n @Input() public stepTemplate?: TemplateRef<any>;\n /**\n * Check is form inside step valid.\n */\n @Input() public stepControl?: boolean;\n /**\n * The title of the step.\n */\n @Input() public title: string;\n /**\n * Default:'Next'. Text for the Next button.\n */\n @Input() public nextText: string;\n /**\n * Hide step\n */\n @Input() public hidden = false;\n /**\n * Disables step\n */\n @Input() public disabled?: boolean;\n /**\n * The size of the busy spinner\n */\n @Input() public spinnerSize: SpinnerSize = SpinnerSize.Large;\n /**\n * Evaluated when the step is entered.\n */\n @Output() public enter =\n new EventEmitter<IDashwizStepNavigatedEvent | void>();\n /**\n * Evaluated when validity of the step is changed.\n */\n @Output() public valid = new EventEmitter<boolean>();\n /**\n * Evaluated when the step is exited.\n */\n @Output() public exit =\n new EventEmitter<IDashwizStepNavigatedEvent | void>();\n /**\n * Evaluated when trying to go to the next step.\n */\n @Output() public next =\n new EventEmitter<IDashwizStepNavigatedEvent | void>();\n\n /**\n *\n * Options for busy state. Default: no busy state, with clear empty busy component when set to true\n */\n public busyConfig: IBusyConfig = {\n busy: false,\n };\n\n public visited = false;\n public active = false;\n public complete = false;\n public icon = \"step\";\n public iconColor = \"\";\n\n constructor() {}\n\n ngOnInit(): void {\n this.nextText = this.nextText || $localize`Next`;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes[\"stepControl\"]) {\n this.valid.emit(this.stepControl);\n }\n }\n\n /**\n * Set flags for step entering and emits enter event\n */\n public enterStep = (event?: IDashwizStepNavigatedEvent): void => {\n this.enter.emit(event);\n };\n\n /**\n * Set flags for step exiting and emits exit event\n */\n public exitStep = (event?: IDashwizStepNavigatedEvent): void => {\n this.exit.emit(event);\n };\n\n public nextStep = (event?: IDashwizStepNavigatedEvent): void => {\n this.next.emit(event);\n };\n\n public applyEnteringStep = (): void => {\n this.active = true;\n this.icon = \"step-active\";\n this.iconColor = \"black\";\n };\n\n public applyExitingStep = (): void => {\n this.active = false;\n this.visited = true;\n this.icon = \"step-complete\";\n this.iconColor = \"\";\n };\n}\n","<div\n class=\"nui-dashwiz-step animated h-100\"\n [ngClass]=\"{ 'nui-dashwiz-step--active': active }\"\n nui-busy\n [busy]=\"busyConfig.busy\"\n>\n <div\n cdkScrollable\n class=\"h-100 overflow-auto nui-scroll-shadows configurator-scrollable\"\n >\n <ng-container *ngTemplateOutlet=\"stepTemplate\"></ng-container>\n </div>\n <nui-spinner\n [percent]=\"busyConfig.percent\"\n [allowCancel]=\"busyConfig.allowCancel\"\n [message]=\"busyConfig.message\"\n [size]=\"spinnerSize\"\n >\n </nui-spinner>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n} from \"@angular/core\";\n\nimport { IDashwizButtonsComponent } from \"../types\";\n\n@Component({\n selector: \"nui-dashwiz-buttons\",\n template: `\n <div class=\"d-flex justify-content-end p-4\">\n <button\n nui-button\n class=\"nui-dashwiz-buttons__cancel-button\"\n type=\"button\"\n [disabled]=\"busy\"\n (click)=\"onCancel()\"\n >\n <span i18n>Cancel</span>\n </button>\n <button\n *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 >\n <span i18n>Back</span>\n </button>\n <button\n *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 >\n <span>{{ nextText }}</span>\n </button>\n <button\n *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 >\n <span>{{ finishText }}</span>\n </button>\n </div>\n `,\n})\nexport class DashwizButtonsComponent implements IDashwizButtonsComponent {\n static lateLoadKey = \"DashwizButtonsComponent\";\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n @Input() public busy = false;\n @Input() public canFinish = false;\n @Input() public canProceed = false;\n @Input() public isFirstStepActive = false;\n @Input() public isLastStepActive = false;\n @Input() public nextText: string;\n @Input() public finishText: string;\n\n @Output() public cancel = new EventEmitter<void>();\n @Output() public next = new EventEmitter<void>();\n @Output() public back = new EventEmitter<void>();\n @Output() public finish = new EventEmitter<void>();\n\n public onCancel() {\n this.cancel.emit();\n }\n\n public onNext() {\n this.next.emit();\n }\n\n public onBack() {\n this.back.emit();\n }\n\n public onFinish() {\n this.finish.emit();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterContentInit,\n AfterViewChecked,\n ChangeDetectorRef,\n Component,\n ComponentFactoryResolver,\n ContentChildren,\n DoCheck,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewChildren,\n ViewContainerRef,\n} from \"@angular/core\";\nimport find from \"lodash/find\";\nimport findIndex from \"lodash/findIndex\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { BehaviorSubject } from \"rxjs\";\n\nimport { IBusyConfig, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { DashwizStepComponent } from \"../dashwiz-step/dashwiz-step.component\";\nimport {\n IDashwizButtonsComponent,\n IDashwizStepComponent,\n IDashwizStepNavigatedEvent,\n IDashwizWaitEvent,\n} from \"../types\";\nimport { DashwizButtonsComponent } from \"./dashwiz-buttons.component\";\nimport { DashwizService } from \"./dashwiz.service\";\nimport { IDashwizComponent } from \"./model\";\n\n/**\n * Component that provides wizard functionality.\n */\n@Component({\n selector: \"nui-dashwiz\",\n templateUrl: \"./dashwiz.component.html\",\n styleUrls: [\"./dashwiz.component.less\"],\n host: { class: \"flex-grow-1 overflow-auto\" },\n})\nexport class DashwizComponent\n implements\n OnInit,\n AfterContentInit,\n AfterViewChecked,\n OnDestroy,\n DoCheck,\n IDashwizComponent\n{\n private static placeholderFinishText = \"Action\"; // as a placeholder \"Action\" does not need to be i18n\n\n @ContentChildren(DashwizStepComponent)\n steps: QueryList<DashwizStepComponent>;\n @ViewChildren(\"stepTitle\") stepTitles: QueryList<ElementRef>;\n @ViewChild(\"container\", { read: ViewContainerRef }) dynamicStep: any;\n\n /**\n * Set to true to hide the wizard header including the step breadcrumbs.\n * (default: false)\n */\n @Input() public hideHeader = false;\n /**\n * Set to true to show the \"Next\" button at any point during the wizard process.\n * (default: false)\n */\n @Input() public canProceed = false;\n /**\n * Set to true to show the \"Finish\" button at any point during the wizard process.\n * (default: false)\n */\n @Input() public canFinish = false;\n /**\n * Overrides the default text on the finish step button.\n * (default: 'Action')\n */\n @Input() public finishText = DashwizComponent.placeholderFinishText;\n /**\n * Use this to stretch lines between step labels according to largest label width.\n * (default: false)\n */\n @Input() public stretchStepLines: boolean = false;\n /**\n * Optional components to use for the buttons for each step\n */\n @Input() public buttonComponentTypes: string[];\n /**\n * Evaluated when a step is selected.\n */\n @Output() public stepNavigated =\n new EventEmitter<IDashwizStepNavigatedEvent>();\n /**\n * Evaluated when the user attempts to cancel the wizard.\n */\n @Output() public cancel = new EventEmitter<boolean>();\n /**\n * Evaluated when the user completes the wizard.\n */\n @Output() public finish = new EventEmitter();\n /**\n * Emits when next button is clicked.\n */\n @Output() public next = new EventEmitter();\n /**\n * Emits when Back button is clicked.\n */\n @Output() public back = new EventEmitter();\n /**\n * Use this BehaviorSubject to control navigability between steps\n */\n @Input() public navigationControl: BehaviorSubject<IDashwizWaitEvent> =\n new BehaviorSubject<IDashwizWaitEvent>({\n busyState: { busy: false },\n allowStepChange: true,\n });\n\n public currentStep: DashwizStepComponent;\n public stepLineWidth: number = 65;\n public stepIndex: number;\n public buttonProperties: IDashwizButtonsComponent;\n\n private stepNavigatedEvent: IDashwizStepNavigatedEvent;\n private previousStepIndex = 0;\n private futureStep?: DashwizStepComponent;\n\n private arraySteps: any[];\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private componentFactoryResolver: ComponentFactoryResolver,\n private logger: LoggerService,\n private dashwizService: DashwizService\n ) {\n if (dashwizService) {\n dashwizService.component = this;\n }\n }\n\n ngOnInit() {\n this.buttonComponentTypes = this.buttonComponentTypes || [\n DashwizButtonsComponent.lateLoadKey,\n ];\n\n if (this.finishText === DashwizComponent.placeholderFinishText) {\n this.logger\n .warn(`DashwizComponent input \"finishText\" is using placeholder text\n\"${DashwizComponent.placeholderFinishText}\". A value should be specified.`);\n }\n }\n\n public ngDoCheck() {\n if (this.currentStep) {\n this.buttonProperties = {\n busy: this.currentStep.busyConfig.busy,\n canProceed: this.canProceed,\n canFinish: this.canFinish,\n isLastStepActive: this.steps.last.active,\n isFirstStepActive: this.steps.first.active,\n nextText: this.currentStep.nextText,\n finishText: this.finishText,\n };\n }\n }\n\n public ngAfterContentInit() {\n const activeTabs = this.steps.filter((item) => item.active);\n this.arraySteps = this.steps.toArray();\n if (activeTabs.length === 0) {\n this.currentStep = this.steps.first;\n this.selectStep(this.currentStep);\n this.changeDetector.detectChanges();\n }\n\n this.steps.toArray().forEach((step: DashwizStepComponent) => {\n step.valid.subscribe((event: any) => {\n if (!isUndefined(event)) {\n this.handleStepControl(step);\n }\n });\n });\n\n this.navigationControl.subscribe(\n (value: { busyState: IBusyConfig; allowStepChange: any }) => {\n this.currentStep.busyConfig = value.busyState;\n if (\n value.allowStepChange &&\n !isUndefined(this.futureStep) &&\n this.currentStep !== this.futureStep\n ) {\n this.enterAnotherStep();\n this.futureStep = undefined;\n }\n }\n );\n }\n\n public ngAfterViewChecked() {\n if (this.stretchStepLines) {\n this.stepLineWidth = Math.round(this.getLargestLabelWidth() / 2);\n this.changeDetector.detectChanges();\n }\n }\n\n public ngOnDestroy() {\n this.steps\n .toArray()\n .forEach((step: DashwizStepComponent) => step.valid.unsubscribe());\n this.navigationControl.unsubscribe();\n this.dashwizService.component = undefined;\n }\n\n public addStepDynamic(\n wizardStep: IDashwizStepComponent,\n indexToInsert: number\n ) {\n const componentFactory =\n this.componentFactoryResolver.resolveComponentFactory(\n DashwizStepComponent\n );\n const componentRef = this.dynamicStep.createComponent(componentFactory);\n const instance: IDashwizStepComponent = componentRef.instance;\n instance.stepTemplate = wizardStep.stepTemplate;\n this.arraySteps.splice(indexToInsert, 0, componentRef.instance);\n this.steps.reset(this.arraySteps);\n return componentRef.instance;\n }\n\n public disableStep(step: DashwizStepComponent) {\n const indexOfStep = this.arraySteps.indexOf(step);\n const toDisable = this.arraySteps[indexOfStep];\n toDisable.disabled = true;\n this.changeDetector.detectChanges();\n }\n\n public enableStep(step: DashwizStepComponent) {\n const indexOfStep = this.arraySteps.indexOf(step);\n const toDisable = this.arraySteps[indexOfStep];\n toDisable.disabled = false;\n this.changeDetector.detectChanges();\n }\n\n public hideStep(step: DashwizStepComponent) {\n const indexOfStep = this.arraySteps.indexOf(step);\n const toHide = this.arraySteps[indexOfStep];\n toHide.hidden = true;\n }\n\n public showStep(step: DashwizStepComponent) {\n const indexOfStep = this.arraySteps.indexOf(step);\n const visibleStep = this.arraySteps[indexOfStep];\n visibleStep.hidden = false;\n }\n\n public goToStep(stepIndex: number) {\n this.selectStep(this.arraySteps[stepIndex]);\n }\n\n public selectStep(step: DashwizStepComponent) {\n if (!step.disabled) {\n this.futureStep = step;\n this.currentStep.exitStep({\n currentStepIndex: this.arraySteps.indexOf(this.futureStep),\n currentStep: this.futureStep,\n previousStep: this.arraySteps[this.stepIndex],\n previousStepIndex: this.stepIndex,\n });\n if (this.navigationControl.value.allowStepChange) {\n this.enterAnotherStep();\n }\n }\n }\n\n public onBack = () => {\n if (!isUndefined(this.stepIndex)) {\n let previousStep = this.arraySteps[this.stepIndex - 1];\n if (previousStep.hidden || previousStep.disabled) {\n previousStep = find(\n this.arraySteps.slice(0).reverse(),\n (step) => !step.hidden,\n findIndex(\n this.arraySteps.slice(0).reverse(),\n this.arraySteps[this.stepIndex]\n ) + 1\n );\n }\n this.selectStep(previousStep);\n this.back.emit();\n }\n };\n\n public onNext = () => {\n let nextStep = this.arraySteps[this.stepIndex + 1];\n this.handleStepControl(this.currentStep);\n this.currentStep.nextStep({\n currentStepIndex: this.stepIndex,\n currentStep: this.currentStep,\n previousStep: this.currentStep,\n previousStepIndex: this.stepIndex,\n });\n if (\n nextStep.hidden ||\n (nextStep.disabled && !isUndefined(nextStep.stepControl))\n ) {\n // this disabled does not let user to go forward when next is disabled. Needs to be changed after validation\n nextStep = find(\n this.arraySteps,\n (step) => !step.hidden,\n this.stepIndex + 1\n );\n }\n if (\n isUndefined(this.currentStep.stepControl) ||\n this.currentStep.stepControl\n ) {\n this.currentStep.complete = true;\n }\n if (nextStep.disabled && !nextStep.visited) {\n this.currentStep.complete = false;\n }\n this.selectStep(nextStep);\n this.next.emit();\n };\n\n public onFinish = () => {\n this.finish.emit();\n };\n\n public onCancel = () => {\n this.cancel.emit(\n this.steps.toArray().filter((step) => step.complete).length !== 0\n );\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n public buttonPortalActionMap: Record<string, Function> = {\n cancel: this.onCancel,\n next: this.onNext,\n back: this.onBack,\n finish: this.onFinish,\n };\n\n public enterAnotherStep() {\n this.currentStep.applyExitingStep();\n this.futureStep?.enterStep();\n\n if (this.futureStep) {\n this.currentStep = this.futureStep;\n }\n\n this.currentStep.applyEnteringStep();\n this.stepIndex = this.arraySteps.indexOf(this.currentStep);\n this.stepNavigatedEvent = {\n currentStepIndex: this.stepIndex,\n currentStep: this.currentStep,\n previousStep: this.arraySteps[this.previousStepIndex],\n previousStepIndex: this.previousStepIndex,\n };\n this.stepNavigated.emit(this.stepNavigatedEvent);\n this.previousStepIndex = this.stepIndex;\n }\n\n public onButtonPortalOutput(event: IEvent) {\n // @ts-ignore\n this.buttonPortalActionMap[event.id]?.();\n }\n\n private disableFollowingSteps(): void {\n this.arraySteps.slice(this.stepIndex + 1).map((item) => {\n item.disabled = true;\n });\n }\n\n private enableFollowingSteps(): void {\n this.arraySteps.slice(this.stepIndex + 1).map((item) => {\n item.disabled = false;\n });\n }\n\n private handleStepControl(step: DashwizStepComponent) {\n if (!isUndefined(step.stepControl)) {\n if (step.stepControl) {\n this.enableFollowingSteps();\n } else {\n this.disableFollowingSteps();\n }\n }\n }\n\n private getLargestLabelWidth() {\n const widths = this.stepTitles.map(\n (title) => title.nativeElement.offsetWidth\n );\n\n return Math.round(Math.max(...widths));\n }\n}\n","<div class=\"nui-dashwiz d-flex flex-column h-100\">\n <div\n class=\"nui-dashwiz__header\"\n *ngIf=\"!hideHeader\"\n [class.nui-dashwiz__header--lines-stretched]=\"stretchStepLines\"\n >\n <ul class=\"nui-dashwiz__header-steps\" *ngIf=\"steps\">\n <li\n *ngFor=\"let step of steps; let first = first; let last = last\"\n (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':\n step.disabled ||\n !step.visited ||\n 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 >\n <div\n class=\"nui-dashwiz__header-step-container\"\n *ngIf=\"!step.hidden\"\n >\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\n class=\"nui-dashwiz__header-step-title\"\n #stepTitle\n >\n {{ step.title }}</span\n >\n <div\n class=\"nui-dashwiz__header-step-link-container\"\n >\n <div\n class=\"nui-dashwiz__header-step-col nui-dashwiz__header-step-col-right\"\n >\n <div\n class=\"nui-dashwiz__header-step-line\"\n [ngStyle]=\"{\n 'min-width.px':\n stepLineWidth\n }\"\n ></div>\n </div>\n <nui-icon\n [icon]=\"step.icon\"\n [iconColor]=\"step.iconColor\"\n ></nui-icon>\n <div\n class=\"nui-dashwiz__header-step-col nui-dashwiz__header-step-col-left\"\n >\n <div\n class=\"nui-dashwiz__header-step-line\"\n [ngStyle]=\"{\n 'min-width.px':\n stepLineWidth\n }\"\n ></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\n nuiComponentPortal\n componentId=\"dashwizButtons\"\n [componentType]=\"\n buttonComponentTypes.length === 1\n ? buttonComponentTypes[0]\n : buttonComponentTypes[stepIndex]\n \"\n [properties]=\"buttonProperties\"\n [outputs]=\"['cancel', 'next', 'back', 'finish']\"\n (output)=\"onButtonPortalOutput($event)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnDestroy,\n OnInit,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport { BehaviorSubject, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IWidget } from \"../../../components/widget/types\";\nimport { WidgetTypesService } from \"../../../services/widget-types.service\";\nimport {\n IHasChangeDetector,\n IPizzagna,\n IPizzagnaLayer,\n PizzagnaLayer,\n} from \"../../../types\";\nimport { PreviewService } from \"../../services/preview.service\";\nimport { ConfiguratorComponent } from \"../configurator/configurator.component\";\nimport { IDashwizStepNavigatedEvent, IDashwizWaitEvent } from \"../wizard/types\";\n\n@Component({\n selector: \"nui-widget-cloner\",\n templateUrl: \"./widget-cloner.component.html\",\n host: { class: \"d-flex flex-column h-100\" },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WidgetClonerComponent\n implements OnInit, OnDestroy, AfterViewInit, IHasChangeDetector\n{\n public static lateLoadKey = \"WidgetClonerComponent\";\n\n @Input() formPizzagna?: IPizzagna;\n @Input() cloneSelectionComponentType: Function;\n\n public form: FormGroup;\n public widgetTemplate: IWidget;\n public navigationControl: BehaviorSubject<IDashwizWaitEvent> =\n new BehaviorSubject<IDashwizWaitEvent>({\n busyState: { busy: false },\n allowStepChange: true,\n });\n\n private destroy$ = new Subject<void>();\n private resetForm$ = new Subject<void>();\n public busy = false;\n public isFormDisplayed = false;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configurator: ConfiguratorComponent,\n private previewService: PreviewService,\n private formBuilder: FormBuilder,\n private widgetTypesService: WidgetTypesService\n ) {\n this.resetForm();\n }\n\n public ngOnInit(): void {\n this.previewService.previewChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe((pizzagna: IPizzagnaLayer) => {\n this.onPreviewPizzagnaUpdate(pizzagna);\n });\n\n this.configurator.submitError\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.toggleBusy();\n });\n }\n\n public ngAfterViewInit(): void {\n // trigger dashwiz to update its button configuration\n this.changeDetector.markForCheck();\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n this.resetForm$.complete();\n }\n\n // --------------------------------------------------------------------------------\n\n public onPreviewPizzagnaUpdate(configLayer: IPizzagnaLayer) {\n if (!this.isFormDisplayed) {\n return;\n }\n\n const previewWidget = {\n ...this.configurator.previewWidget,\n pizzagna: {\n ...this.configurator.previewWidget?.pizzagna,\n [PizzagnaLayer.Configuration]: configLayer,\n },\n };\n // TODO: Make previewWidget to be assignable to IWidget\n // @ts-ignore: Type '{ pizzagna: { configuration: IPizzagnaLayer; }; }' is missing the following properties from type 'IWidget': id, type\n this.configurator.updateWidget(previewWidget);\n }\n\n public canFinish() {\n return (\n !!this.widgetTemplate?.pizzagna?.configuration &&\n !this.widgetTemplate?.metadata?.needsConfiguration\n );\n }\n\n public onFinish() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n // is used to trigger valueChanges to detect changes in forms\n // as form is invalid and marking as touched doesn't trigger neither statusChanges nor valueChanges\n // and validation messages and styles are not applied in that cases\n this.form.patchValue(this.form.value);\n this.form.updateValueAndValidity({ onlySelf: false });\n return;\n }\n\n this.toggleBusy();\n this.configurator.formSubmit();\n }\n\n public onCancel() {\n this.configurator.formCancel();\n }\n\n public onStepNavigated(event: IDashwizStepNavigatedEvent) {\n this.isFormDisplayed = event.currentStepIndex === 1;\n\n if (event.currentStepIndex === 0 && event.previousStepIndex === 1) {\n this.formPizzagna = undefined;\n this.resetForm();\n this.onSelect(this.widgetTemplate);\n } else if (event.currentStepIndex === 1) {\n this.formPizzagna = this.widgetTypesService.getWidgetType(\n this.widgetTemplate.type,\n this.widgetTemplate.version\n ).configurator;\n this.previewService.preview =\n this.widgetTemplate.pizzagna[PizzagnaLayer.Configuration];\n }\n }\n\n public onSelect(widget: IWidget) {\n this.widgetTemplate = widget;\n const previewWidget = {\n ...widget,\n id: this.configurator.previewWidget?.id || null,\n };\n\n // clear out the old widget first because we want to recreate the widget from scratch\n this.configurator.updateWidget(null);\n\n // the new widget is assigned in a setTimeout to apply the change in the next change detection cycle\n setTimeout(() => {\n // @ts-ignore: Type 'null' is not assignable to type 'string' on id property\n this.configurator.updateWidget(cloneDeep(previewWidget));\n });\n }\n\n private toggleBusy() {\n this.busy = !this.busy;\n this.navigationControl.next({\n busyState: { busy: this.busy },\n allowStepChange: !this.busy,\n });\n }\n\n private resetForm() {\n this.resetForm$.next();\n this.form = this.formBuilder.group({});\n this.form.statusChanges\n .pipe(takeUntil(this.resetForm$), takeUntil(this.destroy$))\n .subscribe(() => {\n this.changeDetector.markForCheck();\n });\n }\n}\n","<nui-configurator-heading\n configuratorTitle=\"Creating Widget\"\n i18n-configuratorTitle\n (close)=\"onCancel()\"\n [disableCloseButton]=\"busy\"\n></nui-configurator-heading>\n<nui-dashwiz\n [hideHeader]=\"true\"\n [canProceed]=\"!!widgetTemplate\"\n [canFinish]=\"canFinish()\"\n finishText=\"Create Widget\"\n i18n-finishText\n [navigationControl]=\"navigationControl\"\n (finish)=\"onFinish()\"\n (cancel)=\"onCancel()\"\n (stepNavigated)=\"onStepNavigated($event)\"\n>\n <nui-dashwiz-step [stepTemplate]=\"step1\" 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\n nuiComponentPortal\n [componentType]=\"cloneSelectionComponentType\"\n [outputs]=\"['widgetSelected']\"\n (output)=\"onSelect($event.payload)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #step2>\n <div [formGroup]=\"form\">\n <nui-pizzagna\n #formPizzagnaComponent\n [(pizzagna)]=\"formPizzagna\"\n ></nui-pizzagna>\n </div>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { take } from \"rxjs/operators\";\n\nimport { WidgetEditorAccordionComponent } from \"../widget-editor-accordion/widget-editor-accordion.component\";\n\ninterface AccordionCoordinatorState {\n instance: WidgetEditorAccordionComponent;\n openSubscription: Subscription;\n destroySubscription: Subscription;\n}\n\n@Injectable()\nexport class WidgetConfiguratorSectionCoordinatorService {\n private accordions: Array<AccordionCoordinatorState> = [];\n\n public registerAccordion(accordion: WidgetEditorAccordionComponent) {\n this.accordions.push({\n instance: accordion,\n openSubscription: accordion.openSubject.subscribe(() => {\n this.closeAllAccordions();\n accordion.open = true;\n }),\n destroySubscription: accordion.destroySubject\n .pipe(take(1))\n .subscribe(() => {\n this.removeAccordion(accordion);\n }),\n });\n }\n\n private closeAllAccordions() {\n this.accordions.forEach((state) => {\n state.instance.closeAccordion();\n });\n }\n\n private removeAccordion(instanceToRemove: WidgetEditorAccordionComponent) {\n const stateToRemoveIndex = this.accordions.findIndex(\n (state) => state.instance === instanceToRemove\n );\n this.accordions[stateToRemoveIndex].openSubscription.unsubscribe();\n this.accordions.splice(stateToRemoveIndex, 1);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\n\nimport { IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { BaseLayout } from \"../../../components/layouts/base-layout\";\nimport { PizzagnaService } from \"../../../pizzagna/services/pizzagna.service\";\nimport { IHasForm } from \"../../../types\";\n\n@Component({\n selector: \"nui-widget-configurator-section\",\n templateUrl: \"./widget-configurator-section.component.html\",\n styleUrls: [\"./widget-configurator-section.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: \"nui-widget-configurator-section\" },\n})\nexport class WidgetConfiguratorSectionComponent\n extends BaseLayout\n implements OnInit, OnDestroy, IHasForm\n{\n public static lateLoadKey = \"WidgetConfiguratorSectionComponent\";\n\n @Input() headerTextTemplate: TemplateRef<any>;\n @Input() headerButtonsTemplate: TemplateRef<any>;\n\n @Input() nodes: string[] = [];\n @Input() headerText: string = \"\";\n\n @Output() formReady = new EventEmitter<FormGroup>();\n @Output() formDestroy = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n constructor(\n changeDetector: ChangeDetectorRef,\n pizzagnaService: PizzagnaService,\n logger: LoggerService,\n private formBuilder: FormBuilder\n ) {\n super(changeDetector, pizzagnaService, logger);\n }\n\n public getNodes(): string[] {\n return this.nodes;\n }\n\n public ngOnInit() {\n this.form = this.formBuilder.group({});\n }\n\n public onEvent(componentId: string, event: IEvent) {\n if (event.id === \"formReady\") {\n this.addFormGroup(componentId, event.payload);\n }\n if (Object.keys(this.form.controls).length === this.getNodes().length) {\n this.formReady.emit(this.form);\n }\n }\n\n public addFormGroup(name: string, formGroup: FormGroup) {\n this.form.addControl(name, formGroup);\n }\n\n public ngOnDestroy(): void {\n this.formDestroy.emit(this.form);\n\n // Invoke super.ngOnDestroy to ensure that any base class observables are unsubscribed.\n super.ngOnDestroy();\n }\n}\n","<div class=\"widget-configurator-section\">\n <div\n class=\"widget-configurator-section__header d-flex justify-content-between align-items-center\"\n >\n <ng-container *ngTemplateOutlet=\"headerTextTemplate\"></ng-container>\n <ng-container *ngTemplateOutlet=\"headerButtonsTemplate\"></ng-container>\n\n <!-- TODO: REMOVE THOSE AFTER ALL WIDGETS ARE USING nui-items-dynamic -->\n <div\n headerText\n *ngIf=\"headerText\"\n class=\"widget-configurator-section__header-text\"\n [title]=\"headerText\"\n >\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\n 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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </ng-container>\n <ng-content></ng-content>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { AccordionState } from \"../../../types\";\nimport { WidgetConfiguratorSectionCoordinatorService } from \"../widget-configurator-section/widget-configurator-section-coordinator.service\";\n\n/** @ignore */\n@Component({\n selector: \"nui-widget-editor-accordion\",\n templateUrl: \"./widget-editor-accordion.component.html\",\n encapsulation: ViewEncapsulation.None,\n styleUrls: [\"./widget-editor-accordion.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WidgetEditorAccordionComponent implements OnInit, OnDestroy {\n @Input() public showOpenStateIcon: boolean = true;\n\n @Input() public state: AccordionState = AccordionState.DEFAULT;\n\n public open = false;\n public openSubject = new Subject<void>();\n public destroySubject = new Subject<void>();\n\n constructor(\n private accordionCoordinator: WidgetConfiguratorSectionCoordinatorService,\n public cd: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n this.accordionCoordinator.registerAccordion(this);\n }\n\n public openChange(isOpened: boolean) {\n if (isOpened) {\n this.openSubject.next();\n } else {\n this.closeAccordion();\n }\n }\n\n public closeAccordion() {\n this.cd.markForCheck();\n this.open = false;\n }\n\n ngOnDestroy() {\n this.destroySubject.next();\n this.destroySubject.complete();\n }\n}\n","<div class=\"nui-widget-editor-accordion\">\n <nui-expander [open]=\"open\" (openChange)=\"openChange($event)\">\n <div\n nuiExpanderHeader\n class=\"d-flex align-items-start\"\n [class.error-state]=\"state === 'critical'\"\n [class.warning-state]=\"state === 'warning'\"\n >\n <ng-content select=\"[accordionHeader]\"></ng-content>\n <nui-icon\n *ngIf=\"showOpenStateIcon\"\n class=\"nui-widget-editor-accordion__edit-icon\"\n [icon]=\"open ? 'triangle-down' : 'triangle-left'\"\n ></nui-icon>\n </div>\n <ng-content></ng-content>\n </nui-expander>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport { BehaviorSubject, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IEvent } from \"@nova-ui/bits\";\n\nimport { PizzagnaComponent } from \"../../../pizzagna/components/pizzagna/pizzagna.component\";\nimport { IPreviewEventPayload, PREVIEW_EVENT } from \"../../../services/types\";\nimport {\n IHasChangeDetector,\n IPizzagna,\n IPizzagnaLayer,\n PizzagnaLayer,\n} from \"../../../types\";\nimport { PreviewService } from \"../../services/preview.service\";\nimport { ConfiguratorComponent } from \"../configurator/configurator.component\";\nimport { IDashwizWaitEvent } from \"../wizard/types\";\n\n@Component({\n selector: \"nui-widget-editor\",\n templateUrl: \"./widget-editor.component.html\",\n host: { class: \"d-flex flex-column h-100\" },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WidgetEditorComponent\n implements OnInit, OnDestroy, IHasChangeDetector\n{\n public static lateLoadKey = \"WidgetEditorComponent\";\n public static readonly TITLE_PATH = \"header.properties.title\";\n\n @Input() formPizzagna: IPizzagna;\n @Input() formRoot: string;\n\n private _formPizzagnaComponent: PizzagnaComponent;\n\n @ViewChild(\"formPizzagnaComponent\", { static: false })\n public set formPizzagnaComponent(value: PizzagnaComponent) {\n value?.eventBus\n ?.getStream(PREVIEW_EVENT)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent<IPreviewEventPayload>) => {\n const payload = event.payload;\n // TODO: Ensure that we have payload\n this.configurator?.previewPizzagnaComponent?.eventBus\n // @ts-ignore\n ?.getStream(payload.id)\n // @ts-ignore\n .next(payload.payload);\n });\n this._formPizzagnaComponent = value;\n }\n\n public form: FormGroup;\n public navigationControl: BehaviorSubject<IDashwizWaitEvent> =\n new BehaviorSubject<IDashwizWaitEvent>({\n busyState: { busy: false },\n allowStepChange: true,\n });\n public busy = false;\n public configuratorTitle: string;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private previewService: PreviewService,\n private configurator: ConfiguratorComponent\n ) {\n this.form = this.formBuilder.group({});\n }\n\n public ngOnInit() {\n // TODO: Reconsider this\n // @ts-ignore: We can depend on preview being undefined somewhere\n this.previewService.preview =\n this.configurator.previewWidget?.pizzagna[\n PizzagnaLayer.Configuration\n ];\n\n this.previewService.previewChanged\n .pipe(takeUntil(this.destroy$))\n .subscribe((pizzagna: IPizzagnaLayer) => {\n this.onPreviewPizzagnaUpdate(pizzagna);\n this.changeDetector.detectChanges();\n });\n\n this.configurator.submitError\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => {\n this.toggleBusy();\n });\n this.changeDetector.detectChanges();\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // --------------------------------------------------------------------------------\n\n public onPreviewPizzagnaUpdate(configLayer: IPizzagnaLayer) {\n const previewWidget = {\n ...this.configurator.previewWidget,\n pizzagna: {\n ...this.configurator.previewWidget?.pizzagna,\n [PizzagnaLayer.Configuration]: configLayer,\n },\n };\n // TODO: Make previewWidget to be assignable to IWidget\n // @ts-ignore: Type '{ pizzagna: { configuration: IPizzagnaLayer; }; }' is missing the following properties from type 'IWidget': id, type\n this.configurator.updateWidget(previewWidget);\n const widgetTitle = get(\n configLayer,\n WidgetEditorComponent.TITLE_PATH,\n \"\"\n );\n this.configuratorTitle = $localize`Editing ${widgetTitle}`;\n }\n\n public onFinish() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n // is used to trigger valueChanges to detect changes in forms\n // as form is invalid and marking as touched doesn't trigger neither statusChanges nor valueChanges\n // and validation messages and styles are not applied in that cases\n this.form.patchValue(this.form.value);\n this.form.updateValueAndValidity({\n onlySelf: false,\n emitEvent: true,\n });\n return;\n }\n\n this.toggleBusy();\n this.configurator.formSubmit();\n }\n\n public onCancel() {\n this.configurator.formCancel();\n }\n\n private toggleBusy() {\n this.busy = !this.busy;\n this.navigationControl.next({\n busyState: { busy: this.busy },\n allowStepChange: !this.busy,\n });\n }\n}\n","<nui-configurator-heading\n [configuratorTitle]=\"configuratorTitle\"\n (close)=\"onCancel()\"\n [disableCloseButton]=\"busy\"\n></nui-configurator-heading>\n<nui-dashwiz\n [hideHeader]=\"true\"\n finishText=\"Save Changes\"\n i18n-finishText\n [navigationControl]=\"navigationControl\"\n (finish)=\"onFinish()\"\n (cancel)=\"onCancel()\"\n>\n <nui-dashwiz-step [stepTemplate]=\"step1\"></nui-dashwiz-step>\n</nui-dashwiz>\n\n<ng-template #step1>\n <div [formGroup]=\"form\">\n <nui-pizzagna\n *ngIf=\"formPizzagna\"\n #formPizzagnaComponent\n [rootNode]=\"formRoot\"\n [(pizzagna)]=\"formPizzagna\"\n >\n </nui-pizzagna>\n </div>\n</ng-template>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport zipObject from \"lodash/zipObject\";\n\nimport {\n CHART_PALETTE_CS3,\n CHART_PALETTE_CS_S_EXTENDED,\n} from \"@nova-ui/charts\";\n\nexport const CHART_PALETTE_CS3_ALTERNATIVE_NAMES = [\n $localize`Blue`,\n $localize`Blue Light`,\n $localize`Blue Dark`,\n $localize`Pink`,\n $localize`Pink Light`,\n $localize`Pink Dark`,\n $localize`Sea Green`,\n $localize`Sea Green Light`,\n $localize`Sea Green Dark`,\n $localize`Violet`,\n $localize`Violet Light`,\n $localize`Violet Dark`,\n $localize`Lime Green`,\n $localize`Lime Green Light`,\n $localize`Lime Green Dark`,\n $localize`Orange`,\n $localize`Orange Light`,\n $localize`Orange Dark`,\n $localize`Ultramarine`,\n $localize`Ultramarine Light`,\n $localize`Ultramarine Dark`,\n $localize`Bordeaux`,\n $localize`Bordeaux Light`,\n $localize`Bordeaux Dark`,\n $localize`Ochroid`,\n $localize`Ochroid Light`,\n $localize`Ochroid Dark`,\n $localize`Anthracite`,\n $localize`Anthracite Light`,\n $localize`Anthracite Dark`,\n];\n\nexport const CHART_PALETTE_CS_S_EXTENDED_ALTERNATIVE_NAMES = [\n $localize`Down`,\n $localize`Down Light`,\n $localize`Critical`,\n $localize`Critical Light`,\n $localize`Warning`,\n $localize`Warning Light`,\n $localize`Unknown`,\n $localize`Unknown Light`,\n $localize`Ok`,\n $localize`Ok Light`,\n $localize`Info`,\n $localize`Info Light`,\n];\n\nexport const chartPaletteColorMap: Record<string, string> = zipObject(\n [...CHART_PALETTE_CS3, ...CHART_PALETTE_CS_S_EXTENDED],\n [\n ...CHART_PALETTE_CS3_ALTERNATIVE_NAMES,\n ...CHART_PALETTE_CS_S_EXTENDED_ALTERNATIVE_NAMES,\n ]\n);\n\nexport const DEFAULT_KPI_TILE_COLOR = \"var(--nui-color-bg-secondary)\";\nexport const DEFAULT_KPI_BACKGROUND_COLORS = [\n ...CHART_PALETTE_CS3,\n ...CHART_PALETTE_CS_S_EXTENDED,\n].map((color) => ({\n color,\n label: chartPaletteColorMap[color],\n}));\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AbstractControl, FormArray, FormGroup } from \"@angular/forms\";\n\n/**\n * Checks whether given form has a field that should be visually marked as invalid.\n * Form is not in an error state if it's untouched even if it's invalid at that moment,\n * a user must first interact with the form before it can be considered as invalid.\n * 'invalid' form property should not be used for the purpose of this function,\n * it can be affected by its children form statuses, which can be considered as valid (untouched).\n *\n * @param parent\n */\nexport function hasControlInErrorState(parent: AbstractControl): boolean {\n // FormGroup/FormArray/FormControl is not in an error state if it's either valid or untouched\n if (parent.valid || parent.untouched) {\n return false;\n }\n\n // FormGroup is considred valid if every child form is either valid or untouched\n if (parent instanceof FormGroup) {\n for (const key of Object.keys(parent.controls)) {\n const control = parent.controls[key];\n\n if (hasControlInErrorState(control)) {\n return true;\n }\n }\n }\n\n // FormArray is considred valid if every child form is either valid or untouched\n if (parent instanceof FormArray) {\n for (let i = 0; i < parent.length; i++) {\n const control = parent.at(i);\n\n if (hasControlInErrorState(control)) {\n return true;\n }\n }\n }\n\n // Errors property contains only errors related to the currecnt form and it's not affected by any child forms\n return (parent.touched || parent.dirty) && !!parent.errors;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\nimport { AbstractControl, FormGroup } from \"@angular/forms\";\nimport { combineLatest, Observable } from \"rxjs\";\nimport { distinct, map, startWith } from \"rxjs/operators\";\n\nimport { AccordionState } from \"../../types\";\nimport { hasControlInErrorState } from \"../functions/has-control-in-error-state\";\n\n@Pipe({\n name: \"nuiWidgetEditorAccordionFormState\",\n pure: false,\n})\nexport class WidgetEditorAccordionFormStatePipe implements PipeTransform {\n public transform(\n form: FormGroup | AbstractControl | null\n ): Observable<AccordionState> {\n if (!form) {\n throw new Error(\"Provided form is undefined\");\n }\n\n return combineLatest([form.statusChanges, form.valueChanges]).pipe(\n startWith(null),\n map(() =>\n hasControlInErrorState(form)\n ? AccordionState.CRITICAL\n : AccordionState.DEFAULT\n ),\n distinct()\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\nimport { AbstractControl, FormGroup } from \"@angular/forms\";\nimport { combineLatest, Observable } from \"rxjs\";\nimport { map, startWith } from \"rxjs/operators\";\n\nimport { hasControlInErrorState } from \"../functions/has-control-in-error-state\";\n\n@Pipe({\n name: \"nuiFormHeaderIconPipe\",\n pure: false,\n})\nexport class FormHeaderIconPipePipe implements PipeTransform {\n public static readonly ERROR_ICON_DEFAULT = \"status_critical\";\n\n transform(\n form: FormGroup | AbstractControl | null,\n defaultIcon: string,\n errorIcon: string = FormHeaderIconPipePipe.ERROR_ICON_DEFAULT\n ): Observable<string | null> {\n if (!form) {\n throw new Error(\"Provided form is undefined\");\n }\n return combineLatest([form.statusChanges, form.valueChanges]).pipe(\n startWith(null),\n map(() => (hasControlInErrorState(form) ? errorIcon : defaultIcon))\n );\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CdkDragDrop, CdkDragStart } from \"@angular/cdk/drag-drop\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormArray, FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport isArray from \"lodash/isArray\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil, tap } from \"rxjs/operators\";\n\nimport { IKpiColorRules } from \"../../../../../components/providers/types\";\nimport { DEFAULT_KPI_TILE_COLOR } from \"../../../../../constants/default-palette\";\nimport { KpiColorComparatorsRegistryService } from \"../../../../../services/kpi-color-comparators-registry.service\";\nimport {\n ComparatorTypes,\n IComparatorsDict,\n IHasChangeDetector,\n IHasForm,\n IPaletteColor,\n} from \"../../../../../types\";\n\nconst DEFAULT_LABEL = \"Custom Comparator\";\n\n@Component({\n selector: \"nui-background-color-rules-configuration\",\n templateUrl: \"./background-color-rules-configuration.component.html\",\n styleUrls: [\"./background-color-rules-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BackgroundColorRulesConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnChanges, OnInit, OnDestroy\n{\n public static lateLoadKey = \"BackgroundColorRulesConfigurationComponent\";\n\n @Input() rules: IKpiColorRules[];\n @Input() backgroundColors: IPaletteColor[];\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public formLocal: FormGroup;\n public availableComparators: IComparatorsDict;\n public palette: Partial<IPaletteColor[]>;\n public height: number;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n comparatorsRegistry: KpiColorComparatorsRegistryService\n ) {\n this.availableComparators = comparatorsRegistry.getComparators();\n }\n\n public ngOnInit(): void {\n this.palette = [\n { color: DEFAULT_KPI_TILE_COLOR, label: $localize`Default color` },\n ].concat(this.backgroundColors);\n\n this.formLocal = this.initDefaultRulesGroup();\n this.form = this.formBuilder.group({\n rules: [[]],\n });\n\n this.formLocal\n .get(\"rules\")\n ?.value.valueChanges.pipe(\n tap((value: IKpiColorRules[]) =>\n this.form.get(\"rules\")?.patchValue([...value])\n ),\n takeUntil(this.destroy$)\n )\n .subscribe();\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.rules) {\n (this.formLocal?.get(\"rules\")?.value as FormArray).setValue([]);\n\n if (this.rules && isArray(this.rules)) {\n this.rules.forEach((rule) => {\n (this.formLocal.get(\"rules\")?.value as FormArray).push(\n this.formBuilder.group({\n comparisonType: [\n rule.comparisonType,\n [Validators.required],\n ],\n value: [rule.value, [Validators.required]],\n color: [rule.color],\n })\n );\n });\n }\n }\n }\n\n public getColorRulesSubtitle(): string {\n return (this.formLocal?.get(\"rules\")?.value as FormArray).controls\n .length === 0\n ? $localize`No color rules`\n : $localize`${\n (this.formLocal?.get(\"rules\")?.value as FormArray).controls\n .length\n } color rules`;\n }\n\n public getLabel(item: ComparatorTypes | string): string {\n return this.availableComparators[item]?.label || DEFAULT_LABEL;\n }\n\n public removeRule(controlIndex: number) {\n (this.formLocal?.get(\"rules\")?.value as FormArray).removeAt(\n controlIndex\n );\n }\n\n public addRule() {\n (this.formLocal?.get(\"rules\")?.value as FormArray).push(\n this.formBuilder.group({\n comparisonType: [\">\", [Validators.required]],\n value: [0, [Validators.required]],\n color: [DEFAULT_KPI_TILE_COLOR],\n })\n );\n }\n\n public drop(event: CdkDragDrop<string[]>) {\n this.move(event.currentIndex, event.previousIndex);\n }\n\n public cdkDragStarted(event: CdkDragStart): void {\n this.height = event.source.element.nativeElement.offsetHeight;\n }\n\n public ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private initDefaultRulesGroup() {\n return this.formBuilder.group({\n rules: [this.formBuilder.array([], Validators.required)],\n });\n }\n\n private move(currentIndex: number, previousIndex: number): void {\n const rules = this.formLocal?.get(\"rules\")?.value as FormArray;\n const dir = currentIndex > previousIndex ? 1 : -1;\n if (!rules) {\n return;\n }\n\n const temp = rules.at(previousIndex);\n\n for (let i = previousIndex; i * dir < currentIndex * dir; i = i + dir) {\n const current = rules.at(i + dir);\n rules.setControl(i, current);\n }\n rules.setControl(currentIndex, temp);\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"formLocal\"\n [state]=\"formLocal | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"formLocal | nuiFormHeaderIconPipe: 'color' | async\"\n ></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\" [title]=\"getColorRulesSubtitle()\">\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\">\n We can automatically change the background color when the value\n meets certain conditions.\n </p>\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container\n *ngFor=\"\n let rule of formLocal.get('rules')?.value.controls;\n index as i\n \"\n >\n <div\n class=\"kpi-color-rule d-flex pt-3\"\n [formGroup]=\"rule\"\n cdkDrag\n (cdkDragStarted)=\"cdkDragStarted($event)\"\n >\n <div\n class=\"kpi-color-rule__control justify-content-center d-flex\"\n >\n <nui-icon\n icon=\"drag\"\n class=\"kpi-color-rule__drag align-items-center\"\n cdkDragHandle\n ></nui-icon>\n </div>\n <div class=\"d-flex flex-grow-1 flex-wrap\">\n <nui-form-field\n class=\"mr-3 mb-3 flex-grow-1\"\n [control]=\"rule.get('comparisonType')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n style=\"min-width: 220px\"\n [formControl]=\"rule.get('comparisonType')\"\n >\n <nui-select-v2-option\n *ngFor=\"\n let item of availableComparators\n | keyvalue\n \"\n [value]=\"item.key\"\n >\n {{ getLabel(item.key) }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n\n <nui-form-field\n class=\"mr-3 mb-3\"\n [control]=\"rule.get('value')\"\n style=\"max-width: 100px\"\n >\n <nui-textbox\n formControlName=\"value\"\n ></nui-textbox>\n </nui-form-field>\n\n <nui-form-field\n class=\"mr-3 mb-3\"\n [control]=\"rule.get('color')\"\n >\n <nui-color-picker\n formControlName=\"color\"\n [colorPalette]=\"palette\"\n ></nui-color-picker>\n </nui-form-field>\n </div>\n <button\n 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\n *cdkDragPlaceholder\n [style.height.px]=\"height\"\n ></nui-drop-area>\n </div>\n </ng-container>\n </div>\n <button\n nui-button\n icon=\"add\"\n displayStyle=\"action\"\n type=\"button\"\n (click)=\"addRule()\"\n i18n\n >\n Add new rule\n </button>\n </div>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { IDataSource } from \"@nova-ui/bits\";\n\nimport { IDataSourceError } from \"../../../../../components/providers/types\";\n\n@Component({\n selector: \"nui-data-source-error\",\n templateUrl: \"./data-source-error.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DataSourceErrorComponent implements OnDestroy, OnChanges {\n public static lateLoadKey = \"DataSourceErrorComponent\";\n\n @Input() public dataSource: IDataSource;\n @Output() public errorState = new EventEmitter<boolean>();\n\n public dataSourceError: IDataSourceError | null;\n public busy: boolean;\n public onDestroy$: Subject<void> = new Subject<void>();\n public data: any;\n\n private dataSourceClear$: Subject<void> = new Subject<void>();\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.dataSource) {\n this.onDataSourceChanged();\n }\n }\n\n onDataSourceChanged() {\n this.dataSourceClear$.next();\n\n this.dataSource?.busy\n ?.pipe(takeUntil(this.dataSourceClear$))\n .subscribe((isBusy: boolean) => {\n this.busy = isBusy;\n this.changeDetector.markForCheck();\n });\n\n this.dataSource?.outputsSubject\n .pipe(takeUntil(this.dataSourceClear$))\n .subscribe((value) => {\n this.data = isUndefined(value?.result) ? value : value?.result;\n this.dataSourceError = value?.error;\n this.errorState.emit(!!this.dataSourceError);\n this.changeDetector.markForCheck();\n });\n }\n\n ngOnDestroy() {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n this.dataSourceClear$.next();\n this.dataSourceClear$.complete();\n }\n}\n","<div>\n <nui-message\n class=\"mt-4 d-block\"\n *ngIf=\"!dataSource\"\n type=\"info\"\n [allowDismiss]=\"false\"\n >\n <b i18n>Select a data source</b>\n </nui-message>\n <nui-message\n class=\"mt-4 d-block\"\n *ngIf=\"dataSourceError\"\n type=\"critical\"\n [allowDismiss]=\"false\"\n >\n <b i18n>Something went wrong with the data source: </b>\n {{ dataSourceError.message || dataSourceError.type }}\n </nui-message>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport isEqual from \"lodash/isEqual\";\nimport { Subject } from \"rxjs/internal/Subject\";\nimport { take } from \"rxjs/operators\";\n\nimport { EventBus, IDataSource, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { ProviderRegistryService } from \"../../../../../services/provider-registry.service\";\nimport {\n IConfigurable,\n IHasChangeDetector,\n IHasForm,\n IProperties,\n IProviderConfiguration,\n IProviderConfigurationForDisplay,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\nimport {\n DATA_SOURCE_CHANGE,\n DATA_SOURCE_CREATED,\n DATA_SOURCE_OUTPUT,\n} from \"../../../../types\";\nimport { DataSourceErrorComponent } from \"../data-source-error/data-source-error.component\";\n\n/**\n * This is a basic implementation of a data source configuration component. In the real world scenario, this component will most likely be replaced by a\n * custom one, but still can be used as a template for developing a custom specific solution.\n */\n@Component({\n selector: \"nui-data-source-configuration\",\n templateUrl: \"./data-source-configuration-v2.component.html\",\n styleUrls: [\"./data-source-configuration-v2.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DataSourceConfigurationV2Component\n implements IHasChangeDetector, IHasForm, OnInit, OnChanges, AfterViewInit\n{\n public static lateLoadKey = \"DataSourceConfigurationV2Component\";\n\n /**\n * This component shows a dropdown with options for selecting a data source, this input represents these options.\n */\n @Input() dataSourceProviders: IProviderConfigurationForDisplay[] = [];\n\n @Input() properties: IProperties;\n @Input() providerId: string;\n @Input() errorComponent: string = DataSourceErrorComponent.lateLoadKey;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public hasDataSourceError: boolean = false;\n public dataSource: IDataSource;\n\n // used by the Broadcaster\n public dataFieldIds = new Subject<any>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n protected formBuilder: FormBuilder,\n protected providerRegistryService: ProviderRegistryService,\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>,\n protected injector: Injector,\n protected logger: LoggerService\n ) {}\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n // Widget properties, form inputs and form values need to be in sync to work with generic converter\n // which is why we have providerId and properties as a form group even if we don't explicitly use it in the file.\n providerId: [this.providerId || \"\", [Validators.required]],\n properties: [this.properties || {}],\n dataSource: [null, [Validators.required]],\n });\n this.form.setValidators([\n () => (this.hasDataSourceError ? { dataSourceError: true } : null),\n ]);\n\n this.form\n .get(\"dataSource\")\n ?.valueChanges.subscribe((selectedDataSource) => {\n this.form\n .get(\"providerId\")\n ?.setValue(selectedDataSource?.providerId);\n if (selectedDataSource?.properties) {\n this.form\n .get(\"properties\")\n ?.setValue(selectedDataSource?.properties);\n }\n });\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n (changes.providerId && !changes.providerId.isFirstChange()) ||\n (changes.properties && !changes.properties.isFirstChange())\n ) {\n const previousProvider: string = changes.providerId?.previousValue;\n const previousProperties: IProperties =\n changes.properties?.previousValue;\n if (\n previousProvider !== this.providerId ||\n previousProperties !== this.properties\n ) {\n const dataSource = this.dataSourceProviders.find(\n (provider) =>\n provider.providerId === this.providerId &&\n isEqual(\n provider.properties ?? {},\n this.properties ?? {}\n )\n );\n if (!dataSource) {\n this.form?.get(\"providerId\")?.setValue(this.providerId);\n this.form?.get(\"properties\")?.setValue(this.properties);\n this.invokeDataSource({\n properties: this.properties,\n providerId: this.providerId,\n });\n } else {\n this.form?.get(\"dataSource\")?.setValue(dataSource);\n this.invokeDataSource(dataSource);\n }\n }\n }\n if (\n changes.dataSourceProviders &&\n !changes.dataSourceProviders.isFirstChange() &&\n this.dataSourceProviders.length === 1\n ) {\n const dataSource = this.dataSourceProviders[0];\n this.form.get(\"dataSource\")?.setValue(dataSource);\n this.invokeDataSource(dataSource);\n }\n }\n\n public ngAfterViewInit(): void {\n if (this.dataSourceProviders && this.dataSourceProviders.length === 1) {\n const dataSource = this.dataSourceProviders[0];\n this.form.get(\"dataSource\")?.setValue(dataSource);\n this.invokeDataSource(dataSource);\n }\n }\n\n public onDataSourceSelected(\n selectedDataSource: IProviderConfigurationForDisplay\n ) {\n this.eventBus.next(DATA_SOURCE_CHANGE, {});\n this.invokeDataSource(selectedDataSource);\n }\n\n /**\n * The data source is invoked here to notify the rest of the form about changes in the data source output.\n * DATA_SOURCE_OUTPUT event is emitted through the event bus carrying the data source result as the payload.\n * This might not be necessary in every situation. If the important information is already stored in the\n * data source properties, this step can be omitted.\n *\n * @param data\n */\n public invokeDataSource(data: IProviderConfiguration) {\n if (!data.providerId) {\n return;\n }\n const provider = this.providerRegistryService.getProvider(\n data.providerId\n );\n if (provider) {\n this.dataSource = this.providerRegistryService.getProviderInstance(\n provider,\n this.injector\n );\n\n this.eventBus.next(DATA_SOURCE_CREATED, {\n payload: this.dataSource,\n });\n\n this.dataSource.outputsSubject\n .pipe(take(1))\n .subscribe((result: any) => {\n this.eventBus.next(DATA_SOURCE_OUTPUT, { payload: result });\n this.dataFieldIds.next(\n Object.keys(result.result || result)\n );\n });\n\n const configurableDataSource = this\n .dataSource as unknown as IConfigurable;\n if (configurableDataSource?.updateConfiguration) {\n configurableDataSource.updateConfiguration(\n data.properties ?? {}\n );\n }\n // This setTimeout is because the output of the data source might come faster than the data-source-error-component is initiated\n setTimeout(() => {\n this.dataSource.applyFilters();\n });\n } else {\n this.logger.warn(\"No provider found for id:\", data.providerId);\n }\n }\n\n public onErrorState(isError: boolean) {\n this.hasDataSourceError = isError;\n this.form.markAsTouched({ onlySelf: true });\n this.form.updateValueAndValidity({ emitEvent: false });\n this.changeDetector.detectChanges();\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center pl-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'database' | async\"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt1\">\n <span class=\"nui-text-label\" i18n>Data Source</span>\n <div\n class=\"nui-text-secondary\"\n [title]=\"form.get('dataSource')?.value?.label\"\n >\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\n placeholder=\"Select data source\"\n 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 >\n <nui-select-v2-option\n *ngFor=\"let dataSourceProvider of dataSourceProviders\"\n [title]=\"dataSourceProvider?.label\"\n [value]=\"dataSourceProvider\"\n >\n {{ dataSourceProvider.label }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <ng-container\n nuiComponentPortal\n [componentId]=\"errorComponent\"\n [componentType]=\"errorComponent\"\n [outputs]=\"['errorState']\"\n [properties]=\"{ dataSource: dataSource }\"\n (output)=\"onErrorState($event.payload)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\n </ng-template>\n </ng-container>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Injector,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { take } from \"rxjs/operators\";\n\nimport { EventBus, IDataSource, IEvent, LoggerService } from \"@nova-ui/bits\";\n\nimport { IDataSourceOutput } from \"../../../../../components/providers/types\";\nimport { ProviderRegistryService } from \"../../../../../services/provider-registry.service\";\nimport {\n IHasChangeDetector,\n IHasForm,\n IProperties,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\nimport {\n DATA_SOURCE_CHANGE,\n DATA_SOURCE_CREATED,\n DATA_SOURCE_OUTPUT,\n} from \"../../../../types\";\nimport { DataSourceErrorComponent } from \"../data-source-error/data-source-error.component\";\n\n/**\n * This is a basic implementation of a data source configuration component. In the real world scenario, this component will most likely be replaced by a\n * custom one, but still can be used as a template for developing a custom specific solution.\n */\n@Component({\n selector: \"nui-data-source-configuration\",\n templateUrl: \"./data-source-configuration.component.html\",\n styleUrls: [\"./data-source-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DataSourceConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnInit, OnChanges\n{\n public static lateLoadKey = \"DataSourceConfigurationComponent\";\n\n /**\n * This component shows a dropdown with options for selecting a data source, this input represents these options.\n */\n @Input() dataSourceProviders: string[] = [];\n @Input() errorComponent: string = DataSourceErrorComponent.lateLoadKey;\n\n @Input() properties: IProperties;\n @Input() providerId: string;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public hasDataSourceError: boolean = false;\n public dataSource: IDataSource;\n\n // used by the Broadcaster\n public dsOutput = new Subject<any>();\n public dataFieldIds = new Subject<any>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n private formBuilder: FormBuilder,\n private providerRegistryService: ProviderRegistryService,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private injector: Injector,\n private logger: LoggerService\n ) {}\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n providerId: [this.providerId || \"\", [Validators.required]],\n properties: this.formBuilder.group(this.properties || {}),\n });\n this.form.setValidators([\n () => (this.hasDataSourceError ? { dataSourceError: true } : null),\n ]);\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.providerId && !changes.providerId.isFirstChange()) {\n const previousValue: string = changes.providerId.previousValue;\n if (previousValue !== this.providerId) {\n this.form.get(\"providerId\")?.setValue(this.providerId);\n this.invokeDataSource(this.providerId);\n }\n }\n }\n\n public onDataSourceChange(providerId: string) {\n this.eventBus.next(DATA_SOURCE_CHANGE, {});\n this.invokeDataSource(providerId);\n }\n\n /**\n * The data source is invoked here to notify the rest of the form about changes in the data source output.\n * DATA_SOURCE_OUTPUT event is emitted through the event bus carrying the data source result as the payload.\n * This might not be necessary in every situation. If the important information is already stored in the\n * data source properties, this step can be omitted.\n *\n * @param providerId\n */\n public invokeDataSource(providerId: string) {\n if (!providerId) {\n return;\n }\n const provider = this.providerRegistryService.getProvider(providerId);\n if (provider) {\n this.dataSource = this.providerRegistryService.getProviderInstance(\n provider,\n this.injector\n );\n this.eventBus.next(DATA_SOURCE_CREATED, {\n payload: this.dataSource,\n });\n this.dataSource.outputsSubject\n .pipe(take(1))\n .subscribe((result: any | IDataSourceOutput<any>) => {\n this.eventBus.next(DATA_SOURCE_OUTPUT, { payload: result });\n this.dsOutput.next(result);\n const dataFieldIdsResult = result?.result || result;\n if (dataFieldIdsResult) {\n this.dataFieldIds.next(Object.keys(dataFieldIdsResult));\n }\n });\n // This setTimeout is because the output of the data source might come faster than the data-source-error-component is initiated\n setTimeout(() => {\n this.dataSource.applyFilters();\n });\n } else {\n this.logger.warn(\"No provider found for id:\", providerId);\n }\n }\n\n public onErrorState(isError: boolean) {\n this.hasDataSourceError = isError;\n this.form.markAsTouched({ onlySelf: true });\n this.form.updateValueAndValidity({ emitEvent: false });\n this.changeDetector.detectChanges();\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center pl-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'database' | async\"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt1\">\n <span class=\"nui-text-label\" i18n>Data Source</span>\n <div\n class=\"nui-text-secondary\"\n [title]=\"form.get('providerId')?.value\"\n >\n {{ form.get(\"providerId\")?.value }}\n </div>\n </div>\n </div>\n <div class=\"datasource-configuration__accordion-content\">\n <nui-form-field\n caption=\"Select Data Source\"\n i18n-caption\n [control]=\"form.get('providerId')\"\n >\n <nui-select-v2\n placeholder=\"Data Sources\"\n 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 >\n <nui-select-v2-option\n *ngFor=\"let dataSourceProvider of dataSourceProviders\"\n [title]=\"dataSourceProvider\"\n [value]=\"dataSourceProvider\"\n >\n {{ dataSourceProvider }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <ng-container\n nuiComponentPortal\n [componentId]=\"errorComponent\"\n [componentType]=\"errorComponent\"\n [outputs]=\"['errorState']\"\n [properties]=\"{ dataSource: dataSource }\"\n (output)=\"onErrorState($event.payload)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n >\n </ng-template>\n </ng-container>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n} from \"@angular/core\";\n\nimport { IDataField } from \"@nova-ui/bits\";\n\nimport { DataSourceErrorComponent } from \"../data-source-error.component\";\n\n@Component({\n selector: \"nui-table-data-source-error\",\n templateUrl: \"./table-data-source-error.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableDataSourceErrorComponent\n extends DataSourceErrorComponent\n implements OnDestroy\n{\n public static lateLoadKey = \"TableDataSourceErrorComponent\";\n\n constructor(public changeDetector: ChangeDetectorRef) {\n super(changeDetector);\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\n","<div>\n <nui-message\n *ngIf=\"\n dataSource && !data?.dataFields.length && !dataSourceError && !busy\n \"\n class=\"mt-4 d-block\"\n type=\"info\"\n [allowDismiss]=\"false\"\n >\n <b i18n>Data source needs to be configured</b>\n </nui-message>\n <nui-message\n class=\"mt-4 d-block\"\n *ngIf=\"!dataSource\"\n type=\"info\"\n [allowDismiss]=\"false\"\n >\n <b i18n>Select a data source</b>\n </nui-message>\n <nui-message\n class=\"mt-4 d-block\"\n *ngIf=\"dataSourceError\"\n type=\"critical\"\n [allowDismiss]=\"false\"\n >\n <b i18n>Something went wrong with the data source: </b>\n {{ dataSourceError.message || dataSourceError.type }}\n </nui-message>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EmbeddedContentMode,\n IInfoMessage,\n} from \"../../../../../components/types\";\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\n\n@Component({\n selector: \"nui-embedded-content-configuration\",\n templateUrl: \"./embedded-content-configuration.component.html\",\n styleUrls: [\"./embedded-content-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EmbeddedContentConfigurationComponent\n implements OnInit, OnChanges, IHasChangeDetector, IHasForm, OnDestroy\n{\n public static lateLoadKey = \"EmbeddedContentConfigurationComponent\";\n\n @Input() mode = EmbeddedContentMode.URL;\n @Input() messageComponent: IInfoMessage;\n @Input() customEmbeddedContent: string;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n private destroyed$ = new Subject<void>();\n\n public form: FormGroup = this.formBuilder.group({\n mode: [this.mode],\n urlCustomContent: [\"\"],\n htmlCustomContent: [\"\"],\n customEmbeddedContent: [\"\"],\n });\n\n public modes = [\n {\n value: EmbeddedContentMode.URL,\n displayValue: $localize`Show the contents of a specific URL`,\n },\n {\n value: EmbeddedContentMode.HTML,\n displayValue: $localize`Show the exact HTML I supply below`,\n },\n ];\n\n get urlCustomContent() {\n return this.form.get(\"urlCustomContent\");\n }\n\n get htmlCustomContent() {\n return this.form.get(\"htmlCustomContent\");\n }\n\n get modeValue() {\n return this.form.get(\"mode\");\n }\n\n get customEmbeddedContentValue() {\n return this.form.get(\"customEmbeddedContent\");\n }\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder\n ) {}\n\n public ngOnInit(): void {\n this.initializeForm();\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.customEmbeddedContent) {\n if (this.mode === EmbeddedContentMode.URL) {\n this.urlCustomContent?.setValue(this.customEmbeddedContent);\n } else if (this.mode === EmbeddedContentMode.HTML) {\n this.htmlCustomContent?.setValue(this.customEmbeddedContent);\n }\n }\n\n if (changes.mode) {\n this.modeValue?.setValue(changes.mode.currentValue);\n }\n }\n\n public ngOnDestroy() {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n private initializeForm() {\n this.modeValue?.valueChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe((value) => {\n if (value === EmbeddedContentMode.URL) {\n this.customEmbeddedContentValue?.setValue(\n this.form.get(\"urlCustomContent\")?.value\n );\n this.htmlCustomContent?.disable();\n this.urlCustomContent?.enable();\n } else if (value === EmbeddedContentMode.HTML) {\n this.customEmbeddedContentValue?.setValue(\n this.form.get(\"htmlCustomContent\")?.value\n );\n this.urlCustomContent?.disable();\n this.htmlCustomContent?.enable();\n }\n });\n\n this.urlCustomContent?.valueChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe((value) => {\n this.customEmbeddedContentValue?.setValue(value);\n });\n\n this.htmlCustomContent?.valueChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe((value) => {\n this.customEmbeddedContentValue?.setValue(value);\n });\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center pl-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'tag' | async\"\n ></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\n nuiComponentPortal\n #componentPortal=\"nuiComponentPortal\"\n [componentType]=\"messageComponent.componentType\"\n [properties]=\"messageComponent.properties\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n <nui-form-field\n [control]=\"form.get('mode')\"\n caption=\"What do you want to show in the widget?\"\n i18n-caption\n >\n <nui-radio-group\n formControlName=\"mode\"\n [(value)]=\"mode\"\n name=\"mode\"\n required\n >\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\n class=\"textarea-scrollable\"\n formControlName=\"htmlCustomContent\"\n rows=\"7\"\n >\n </nui-textbox>\n </nui-form-field>\n </nui-radio-group>\n </nui-form-field>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n} from \"@angular/core\";\n\nimport { ILinkDefinition } from \"../../../../../components/types\";\nimport { IHasChangeDetector } from \"../../../../../types\";\n\n@Component({\n selector: \"nui-info-message-configuration\",\n templateUrl: \"./info-message-configuration.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class InfoMessageConfigurationComponent implements IHasChangeDetector {\n public static lateLoadKey = \"InfoMessageConfigurationComponent\";\n\n @Input() emphasizeText: string;\n @Input() generalText: string;\n @Input() link: ILinkDefinition;\n @Input() allowDismiss: boolean;\n\n constructor(public changeDetector: ChangeDetectorRef) {}\n}\n","<nui-message type=\"info\" [allowDismiss]=\"allowDismiss\" i18n>\n <b> {{ emphasizeText }} </b> {{ generalText }}\n <a *ngIf=\"link\" [href]=\"link.href\" [target]=\"link.target\">{{\n link.text\n }}</a>\n</nui-message>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { combineLatest, Observable } from \"rxjs\";\nimport { map, startWith } from \"rxjs/operators\";\n\nimport {\n chartPaletteColorMap,\n DEFAULT_KPI_TILE_COLOR,\n} from \"../../../../../constants/default-palette\";\nimport {\n IHasChangeDetector,\n IHasForm,\n IPaletteColor,\n} from \"../../../../../types\";\n\n@Component({\n selector: \"nui-kpi-description-configuration\",\n templateUrl: \"./kpi-description-configuration.component.html\",\n styleUrls: [\"./kpi-description-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class KpiDescriptionConfigurationComponent\n implements OnInit, OnChanges, IHasChangeDetector, IHasForm\n{\n public static lateLoadKey = \"KpiDescriptionConfigurationComponent\";\n public defaultColor = {\n label: $localize`Default color`,\n color: DEFAULT_KPI_TILE_COLOR,\n };\n\n @Input() componentId: string;\n @Input() configurableUnits: boolean;\n\n @Input() label: string = \"\";\n @Input() backgroundColor: string = this.defaultColor.color;\n @Input() units: string = \"\";\n @Input() backgroundColors: IPaletteColor[];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public subtitle$: Observable<string>;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder\n ) {}\n\n public ngOnInit(): void {\n this.backgroundColors = [...this.backgroundColors];\n this.backgroundColors.unshift(this.defaultColor);\n\n this.form = this.formBuilder.group({\n label: [this.label, [Validators.required]],\n backgroundColor: [this.backgroundColor, [Validators.required]],\n });\n\n if (this.configurableUnits) {\n this.form.addControl(\"units\", this.formBuilder.control(this.units));\n }\n\n const label = this.form.get(\"label\");\n const labelValue = label?.valueChanges.pipe(startWith(label.value));\n\n const backgroundColor = this.form.get(\"backgroundColor\");\n const backgroundColorValue = backgroundColor?.valueChanges.pipe(\n startWith(backgroundColor?.value)\n );\n this.subtitle$ = combineLatest([\n labelValue?.pipe(map((t) => t || $localize`no label`)),\n backgroundColorValue?.pipe(\n map((t) => chartPaletteColorMap[t] || $localize`Default Color`)\n ),\n ]).pipe(map((labels) => labels.join(\", \")));\n\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.label) {\n this.form?.patchValue({ label: changes.label.currentValue });\n }\n if (changes.backgroundColor) {\n this.form?.patchValue({\n backgroundColor: changes.backgroundColor.currentValue,\n });\n }\n if (changes.units) {\n this.form?.patchValue({ units: changes.units.currentValue });\n }\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_list' | async\"\n ></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\n caption=\"Label\"\n i18n-caption\n [control]=\"form.get('label')\"\n class=\"form-group\"\n >\n <nui-textbox\n formControlName=\"label\"\n placeholder=\"Set label\"\n i18n-placeholder\n ></nui-textbox>\n </nui-form-field>\n </div>\n\n <nui-form-field\n caption=\"Background Color\"\n i18n-caption\n [control]=\"form.get('backgroundColor')\"\n class=\"form-group\"\n >\n <nui-color-picker\n class=\"kpi-description-configuration__accordion-content__color-picker\"\n formControlName=\"backgroundColor\"\n [colorPalette]=\"backgroundColors\"\n >\n </nui-color-picker>\n </nui-form-field>\n\n <div class=\"mt-4\" *ngIf=\"configurableUnits\">\n <nui-form-field\n caption=\"Units\"\n i18n-caption\n [control]=\"form.get('units')\"\n class=\"form-group\"\n >\n <nui-textbox\n formControlName=\"units\"\n placeholder=\"Units\"\n i18n-placeholder\n ></nui-textbox>\n </nui-form-field>\n </div>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport enum TimeUnit {\n Second = \"second\",\n Minute = \"minute\",\n Hour = \"hour\",\n}\n\nexport const TIME_UNITS_TO_MS = {\n [TimeUnit.Second]: 1000,\n [TimeUnit.Minute]: 60000,\n [TimeUnit.Hour]: 3600000,\n};\n\nexport const TIME_UNITS_LONG = {\n [TimeUnit.Hour]: $localize`:hours unit (long):hours`,\n [TimeUnit.Minute]: $localize`:minutes unit (long):minutes`,\n [TimeUnit.Second]: $localize`:seconds unit (long):seconds`,\n};\n\nexport const TIME_UNITS_SHORT = {\n [TimeUnit.Hour]: $localize`:hours unit (short):h`,\n [TimeUnit.Minute]: $localize`:minutes unit (short):min`,\n [TimeUnit.Second]: $localize`:seconds unit (short):sec`,\n};\n\nexport function getTimeUnitsRatio(fromUnit: TimeUnit, toUnit: TimeUnit) {\n return TIME_UNITS_TO_MS[fromUnit] / TIME_UNITS_TO_MS[toUnit];\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Input,\n OnDestroy,\n OnInit,\n} from \"@angular/core\";\nimport {\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validators,\n} from \"@angular/forms\";\nimport { noop, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { getTimeUnitsRatio, TimeUnit, TIME_UNITS_LONG } from \"./time-units\";\nimport { NumberValidationParams } from \"./types\";\n\n/**\n * As per Wolfi, this is a candidate for reworking into a general time interval selector implemented as a Web Component\n */\n@Component({\n selector: \"nui-refresh-rate-configurator\",\n templateUrl: \"./refresh-rate-configurator.component.html\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RefreshRateConfiguratorComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RefreshRateConfiguratorComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RefreshRateConfiguratorComponent\n implements ControlValueAccessor, OnInit, OnDestroy\n{\n @Input() minSeconds: number;\n @Input() maxSeconds: number;\n\n possibleUnits = [TimeUnit.Second, TimeUnit.Minute, TimeUnit.Hour];\n\n unitItems: any[] = [];\n displayedUnitItems: any[] = [];\n\n form: FormGroup;\n numberControl: FormControl;\n unitControl: FormControl;\n currentUnit: TimeUnit | null = null;\n\n valueChangeFix = noop; // TODO this can be removed after NUI-3442 is fixed\n\n private onChange: (value: number | null) => void;\n private destroy$$ = new Subject<void>();\n\n constructor(private fb: FormBuilder, private cd: ChangeDetectorRef) {}\n\n ngOnInit() {\n this.generateUnitItems();\n this.filterUnitItems();\n this.createForm();\n }\n\n ngOnDestroy(): void {\n this.destroy$$.next();\n this.destroy$$.complete();\n }\n\n getNumberMin(): number | undefined {\n if (!this.unitControl.value || this.minSeconds == null) {\n return undefined;\n }\n\n const ratio = getTimeUnitsRatio(\n TimeUnit.Second,\n this.unitControl.value.id\n );\n return Math.ceil(this.minSeconds * ratio);\n }\n\n getNumberMax(): number | undefined {\n if (!this.unitControl.value || this.maxSeconds == null) {\n return undefined;\n }\n\n const ratio = getTimeUnitsRatio(\n TimeUnit.Second,\n this.unitControl.value.id\n );\n return Math.floor(this.maxSeconds * ratio);\n }\n\n writeValue(seconds: number): void {\n if (\n isFinite(seconds) &&\n this.isRangeValid() &&\n this.unitControl.value\n ) {\n const ratio = getTimeUnitsRatio(\n TimeUnit.Second,\n this.unitControl.value.id\n );\n const num = seconds * ratio;\n\n this.numberControl.setValue(num);\n } else {\n this.numberControl.setValue(null);\n }\n this.cd.markForCheck();\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {}\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.numberControl.disable({ emitEvent: false });\n this.unitControl.disable({ emitEvent: false });\n } else {\n this.numberControl.enable({ emitEvent: false });\n this.unitControl.enable({ emitEvent: false });\n }\n this.cd.markForCheck();\n }\n\n resetUnits(): void {\n this.unitControl.setValue(this.displayedUnitItems[0]);\n }\n\n private generateUnitItems() {\n this.possibleUnits.forEach((item, index) => {\n this.unitItems[index] = {\n id: item,\n label: TIME_UNITS_LONG[item],\n };\n });\n }\n\n private filterUnitItems() {\n this.displayedUnitItems = this.unitItems.filter((item) => {\n let tooLarge = false;\n\n if (this.maxSeconds != null) {\n const ratio = getTimeUnitsRatio(TimeUnit.Second, item.id);\n tooLarge = Math.floor(this.maxSeconds * ratio) <= 0;\n }\n\n return !tooLarge;\n });\n }\n\n private createForm() {\n this.form = this.fb.group({\n number: [1, [Validators.required]],\n unit: this.displayedUnitItems[0],\n });\n\n this.numberControl = this.form.get(\"number\") as FormControl;\n this.unitControl = this.form.get(\"unit\") as FormControl;\n if (this.unitControl.value) {\n this.currentUnit = this.unitControl.value.id;\n }\n\n this.form.valueChanges.pipe(takeUntil(this.destroy$$)).subscribe(() => {\n this.updateError();\n this.emitValueChange();\n });\n }\n\n private updateError() {\n if (this.isNumberValid()) {\n this.numberControl.setErrors(null);\n } else {\n this.numberControl.setErrors({ invalidNumber: true });\n }\n }\n\n private emitValueChange() {\n const num = this.numberControl.value;\n const unit = this.unitControl.value;\n if (num == null || unit == null) {\n if (this.onChange) {\n this.onChange(null);\n }\n return;\n }\n\n const ratio = getTimeUnitsRatio(unit.id, TimeUnit.Second);\n const seconds = num * ratio;\n\n if (this.onChange) {\n this.onChange(seconds);\n }\n }\n\n private isRangeValid(): boolean {\n return this.minSeconds <= this.maxSeconds || this.maxSeconds == null;\n }\n\n public isNumberValid(): boolean {\n const num = this.numberControl.value;\n const unit = this.unitControl.value;\n\n if (num < this.minSeconds) {\n return false;\n }\n if (num % 1 !== 0) {\n return false;\n }\n const ratio = getTimeUnitsRatio(unit.id, TimeUnit.Second);\n const seconds = num * ratio;\n if (seconds > this.maxSeconds) {\n return false;\n }\n\n return this.isRangeValid();\n }\n\n public getNumberValidationMessage(): string {\n const validationParams: NumberValidationParams = {\n min: this.getNumberMin(),\n max: this.getNumberMax(),\n whole: true,\n };\n return this.getLocalizedNumberValidationMessage(validationParams);\n }\n\n public getLocalizedNumberValidationMessage(\n params: NumberValidationParams\n ): string {\n const { min, max, whole } = params;\n let numberTypeText: string;\n if (whole) {\n numberTypeText = $localize`a whole number`;\n } else {\n numberTypeText = $localize`a number`;\n }\n\n if (min != null && max != null) {\n if (min === max) {\n return $localize`Must be ${numberTypeText} equal to ${min}`;\n } else {\n return $localize`Must be ${numberTypeText} between ${min} and ${max}`;\n }\n } else if (min == null && max != null) {\n return $localize`Must be ${numberTypeText} not larger than ${max}`;\n } else if (min != null && max == null) {\n return $localize`Must be ${numberTypeText} not smaller than ${min}`;\n }\n return $localize`Must be ${numberTypeText}`;\n }\n\n public validate(): ValidationErrors | null {\n // TODO: Check this, when number FormControl is undefined casting\n // it to null to avoid changing the signature\n return this.form.get(\"number\")?.errors || null;\n }\n}\n","<form [formGroup]=\"form\" class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row\">\n <nui-textbox-number\n formControlName=\"number\"\n customBoxWidth=\"90px\"\n [minValue]=\"minSeconds\"\n [maxValue]=\"maxSeconds\"\n (valueChange)=\"valueChangeFix()\"\n ></nui-textbox-number>\n\n <nui-select-v2 formControlName=\"unit\" class=\"ml-3\">\n <nui-select-v2-option\n *ngFor=\"let item of displayedUnitItems\"\n [value]=\"item\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { combineLatest, Subject } from \"rxjs\";\nimport { filter, takeUntil, tap } from \"rxjs/operators\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { RefresherSettingsService } from \"../../../../../components/providers/refresher-settings.service\";\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\nimport { RefreshRateConfiguratorComponent } from \"./refresh-rate-configurator/refresh-rate-configurator.component\";\nimport {\n TimeUnit,\n TIME_UNITS_SHORT,\n} from \"./refresh-rate-configurator/time-units\";\n\n@Component({\n selector: \"nui-refresher-configuration\",\n templateUrl: \"./refresher-configuration.component.html\",\n styleUrls: [\"./refresher-configuration.component.less\"],\n})\nexport class RefresherConfigurationComponent\n implements OnInit, OnChanges, OnDestroy, IHasChangeDetector, IHasForm\n{\n public static lateLoadKey = \"RefresherConfigurationComponent\";\n\n @Input() enabled: boolean;\n @Input() interval: number;\n @Input() minSeconds: number = 1;\n @Input() maxSeconds: number = 86400;\n @Input() overrideDefaultSettingsCaption = $localize`Custom refresh rate`;\n @Input() overrideDefaultSettings = true;\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n private destroyed$ = new Subject<void>();\n @ViewChild(RefreshRateConfiguratorComponent)\n private refreshRateComp: RefreshRateConfiguratorComponent;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private logger: LoggerService,\n public refresherSettings: RefresherSettingsService,\n private cd: ChangeDetectorRef\n ) {}\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n enabled: [true, [Validators.required]],\n overrideDefaultSettings: [\n this.overrideDefaultSettings,\n [Validators.required],\n ],\n interval: [this.interval ?? 0, [Validators.required]],\n });\n\n this.form.statusChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe(() => {\n this.form.markAllAsTouched();\n this.cd.detectChanges();\n });\n\n combineLatest([\n this.form.controls[\"enabled\"].valueChanges,\n this.form.controls[\"overrideDefaultSettings\"].valueChanges,\n ])\n .pipe(\n filter((values) => values.some((v) => !v)),\n tap(this.resetInterval),\n takeUntil(this.destroyed$)\n )\n .subscribe();\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.enabled) {\n this.form?.get(\"enabled\")?.patchValue(this.enabled);\n }\n if (changes.interval) {\n this.form?.get(\"interval\")?.patchValue(this.interval);\n }\n if (changes.overrideDefaultSettings) {\n this.form\n ?.get(\"overrideDefaultSettings\")\n ?.patchValue(this.overrideDefaultSettings);\n }\n }\n\n public ngOnDestroy() {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n public getHeaderSubtitle() {\n let result = \"\";\n if (this.form.get(\"enabled\")?.value) {\n result += $localize`Enabled`;\n result += \", \";\n if (this.form.get(\"overrideDefaultSettings\")?.value) {\n result += this.getDurationLabel(\n this.form.get(\"interval\")?.value\n );\n } else {\n result +=\n $localize`Use default value` +\n \" (\" +\n this.getDurationLabel(\n this.refresherSettings.refreshRateSeconds\n ) +\n \")\";\n }\n } else {\n result += $localize`Disabled`;\n }\n\n return result;\n }\n\n // TODO: make reusable\n public getDurationLabel(seconds: number): string {\n let totalSeconds = seconds;\n let result: string = \"\";\n const hours = Math.floor(totalSeconds / 3600);\n\n totalSeconds %= 3600;\n const minutes = Math.floor(totalSeconds / 60);\n\n const calculatedSeconds = totalSeconds % 60;\n\n if (hours > 0) {\n result += hours + \" \" + TIME_UNITS_SHORT[TimeUnit.Hour] + \" \";\n }\n\n if (minutes > 0) {\n result += minutes + \" \" + TIME_UNITS_SHORT[TimeUnit.Minute] + \" \";\n }\n\n if (calculatedSeconds > 0) {\n result +=\n calculatedSeconds +\n \" \" +\n TIME_UNITS_SHORT[TimeUnit.Second] +\n \" \";\n }\n\n result = result.trim();\n\n if (result === \"\") {\n return \"0 \" + TIME_UNITS_SHORT[TimeUnit.Second];\n }\n\n return result;\n }\n\n private resetInterval = () => {\n this.refreshRateComp.resetUnits();\n this.form.get(\"interval\")?.setValue(this.interval || this.minSeconds);\n };\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n iconColor=\"gray\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'reset' | async\"\n ></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()\">\n {{ getHeaderSubtitle() }}\n </div>\n </div>\n </div>\n <div\n class=\"d-flex flex-column nui-refresher-configuration__accordion-content\"\n >\n <div>\n <nui-form-field [control]=\"form.get('enabled')\">\n <nui-switch formControlName=\"enabled\" i18n\n >Refresh widget periodically</nui-switch\n >\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\"\n >{{ overrideDefaultSettingsCaption }}\n <div\n class=\"nui-help-hint\"\n *ngIf=\"!form.get('overrideDefaultSettings')?.value\"\n i18n\n >\n By default, the widget will refresh every\n {{\n getDurationLabel(\n refresherSettings.refreshRateSeconds\n )\n }}.\n </div>\n </nui-switch>\n </nui-form-field>\n </div>\n <div\n [class.hidden]=\"!form.get('overrideDefaultSettings')?.value\"\n class=\"mt-4\"\n >\n <nui-form-field [control]=\"form.get('interval')\">\n <nui-refresh-rate-configurator\n [minSeconds]=\"minSeconds\"\n [maxSeconds]=\"maxSeconds\"\n formControlName=\"interval\"\n ></nui-refresh-rate-configurator>\n </nui-form-field>\n </div>\n </div>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AbstractControl, ValidatorFn } from \"@angular/forms\";\nimport _isNil from \"lodash/isNil\";\n\nimport { removeErrors } from \"@nova-ui/bits\";\n\nexport const thresholdsValidator: ValidatorFn = (form: AbstractControl) => {\n const critical = form.get(\"criticalThresholdValue\");\n const warning = form.get(\"warningThresholdValue\");\n const reverse = form.get(\"reversedThresholds\");\n const show = form.get(\"showThresholds\");\n\n if (!critical) {\n throw new Error(\"criticalThresholdValue formControl is not defined\");\n }\n removeErrors(critical, \"min\", \"max\");\n\n if (!warning) {\n throw new Error(\"warningThresholdValue formControl is not defined\");\n }\n removeErrors(warning, \"min\", \"max\");\n\n if (show?.value) {\n if (_isNil(warning.value)) {\n return null;\n }\n if (reverse?.value) {\n if (critical.value >= warning.value) {\n warning.setErrors({ min: true });\n critical.setErrors({ max: true });\n return { thresholds: true };\n }\n } else {\n if (critical.value <= warning.value) {\n warning.setErrors({ max: true });\n critical.setErrors({ min: true });\n return { thresholds: true };\n }\n }\n }\n\n return null;\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport includes from \"lodash/includes\";\nimport _isNil from \"lodash/isNil\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\nimport { thresholdsValidator } from \"./thresholds-validator\";\n\n@Component({\n selector: \"nui-thresholds-configuration\",\n templateUrl: \"./thresholds-configuration.component.html\",\n styleUrls: [\"./thresholds-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ThresholdsConfigurationComponent\n implements OnInit, OnDestroy, OnChanges, IHasChangeDetector, IHasForm\n{\n public static lateLoadKey = \"ThresholdsConfigurationComponent\";\n\n @Input() criticalThresholdValue: number;\n @Input() warningThresholdValue: number;\n @Input() showThresholds: boolean;\n @Input() reversedThresholds: boolean;\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public thresholdOptions = [\n {\n value: false,\n displayValue: $localize`Never show critical or warning states for this KPI`,\n },\n {\n value: true,\n displayValue: $localize`Set custom thresholds for this widget`,\n },\n ];\n\n /**\n * this value is added because of the setTimeout in RadioButtonComponent which will be removed in v10 - NUI-4843.\n * when setTimeout is removed this hack can be removed as well\n * @deprecated - remove in scope of NUI-4843\n * */\n public radioButtonGroupValue: boolean;\n\n public form: FormGroup;\n\n private destroyed$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private logger: LoggerService,\n private cd: ChangeDetectorRef\n ) {}\n\n public ngOnInit(): void {\n this.validateRadioButtonsGroupValue();\n this.form = this.formBuilder.group(\n {\n criticalThresholdValue: [\n this.criticalThresholdValue || 0,\n [Validators.required],\n ],\n warningThresholdValue: [this.warningThresholdValue || 0],\n showThresholds: [\n this.showThresholds || false,\n [Validators.required],\n ],\n reversedThresholds: [this.reversedThresholds || false],\n },\n {\n validators: thresholdsValidator,\n }\n );\n\n this.handleWarningThreshold(this.warningThresholdValue);\n\n this.form.statusChanges\n .pipe(takeUntil(this.destroyed$))\n .subscribe((change) => {\n this.form.markAllAsTouched();\n this.cd.detectChanges();\n });\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n const formKeys = [\n \"criticalThresholdValue\",\n \"warningThresholdValue\",\n \"showThresholds\",\n \"reversedThresholds\",\n ];\n\n if (changes) {\n for (const key of Object.keys(changes)) {\n if (includes(formKeys, key)) {\n const value = changes[key].currentValue;\n if (value) {\n this.form?.patchValue({ [key]: value });\n }\n }\n }\n\n if (changes.showThresholds) {\n setTimeout(() => this.validateRadioButtonsGroupValue());\n }\n }\n\n if (changes.warningThresholdValue) {\n this.handleWarningThreshold(\n changes.warningThresholdValue.currentValue\n );\n }\n }\n\n public getThresholdsSubtitle(showThreshold: boolean): string {\n return showThreshold\n ? $localize`Custom thresholds`\n : $localize`No thresholds`;\n }\n\n public ngOnDestroy() {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n\n private validateRadioButtonsGroupValue() {\n this.radioButtonGroupValue = this.showThresholds;\n }\n\n private handleWarningThreshold(value: number | undefined) {\n const warningThresholdFormControl = this.form?.get(\n \"warningThresholdValue\"\n );\n if (_isNil(value)) {\n warningThresholdFormControl?.setValue(null);\n }\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'thresholds' | async\"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt-1\">\n <span class=\"nui-text-label\" i18n>Thresholds</span>\n <div\n class=\"nui-text-secondary\"\n [title]=\"\n getThresholdsSubtitle(form.get('showThresholds')?.value)\n \"\n >\n {{ getThresholdsSubtitle(form.get(\"showThresholds\")?.value) }}\n </div>\n </div>\n </div>\n <div class=\"kpi-thresholds-configuration__accordion-content\">\n <nui-form-field\n [control]=\"form.get('showThresholds')\"\n caption=\"How do you want to set warning/critical thresholds?\"\n i18n-caption\n >\n <nui-radio-group\n formControlName=\"showThresholds\"\n [value]=\"radioButtonGroupValue\"\n name=\"showThresholds\"\n required\n >\n <nui-radio\n *ngFor=\"let thresholdOption of thresholdOptions\"\n [value]=\"thresholdOption.value\"\n >\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\n caption=\"Warning value\"\n i18n-caption\n [control]=\"form.get('warningThresholdValue')\"\n >\n <nui-textbox-number\n formControlName=\"warningThresholdValue\"\n placeholder=\"Never show the warning state\"\n i18n-placeholder\n ></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\n threshold\n </nui-validation-message>\n <nui-validation-message for=\"max\" i18n>\n Warning threshold should be lower than critical\n threshold\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Critical value\"\n i18n-caption\n [control]=\"form.get('criticalThresholdValue')\"\n >\n <nui-textbox-number\n formControlName=\"criticalThresholdValue\"\n placeholder=\"Set critical value\"\n i18n-placeholder\n ></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\n threshold\n </nui-validation-message>\n <nui-validation-message for=\"max\" i18n>\n Critical threshold should be lower than warning\n threshold\n </nui-validation-message>\n </nui-form-field>\n </div>\n\n <nui-form-field\n caption=\"Warning and critical when below threshold values\"\n i18n-caption\n [control]=\"form.get('reversedThresholds')\"\n [showOptionalText]=\"false\"\n >\n <nui-checkbox\n formControlName=\"reversedThresholds\"\n required\n ></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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IEvent } from \"@nova-ui/bits\";\n\nimport { TimeseriesChartPreset } from \"../../../../../components/timeseries-widget/types\";\nimport { PREVIEW_EVENT, REFRESH } from \"../../../../../services/types\";\nimport {\n IHasChangeDetector,\n IHasForm,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { LegendPlacement } from \"../../../../../widget-types/common/widget/legend\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\n\nexport interface ITimeseriesChartTypeOption {\n label: string;\n value: TimeseriesChartPreset;\n}\n\nexport interface ITimeSpanOption {\n id: string;\n name: string;\n}\n\n@Component({\n selector: \"nui-timeseries-metadata-configuration\",\n templateUrl: \"./timeseries-metadata-configuration.component.html\",\n styleUrls: [\"./timeseries-metadata-configuration.component.less\"],\n})\nexport class TimeseriesMetadataConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnInit, OnChanges, OnDestroy\n{\n static lateLoadKey = \"TimeseriesMetadataConfigurationComponent\";\n\n @Input() legendPlacements: LegendPlacement[] = [];\n @Input() timeSpans: ITimeSpanOption[] = [];\n @Input() startingTimespan: any;\n @Input() legendPlacement: LegendPlacement;\n @Input() leftAxisLabel: string;\n @Input() preset: TimeseriesChartPreset;\n @Input() availableChartTypes: ITimeseriesChartTypeOption[] = [\n { label: $localize`Line`, value: TimeseriesChartPreset.Line },\n {\n label: $localize`Stacked area`,\n value: TimeseriesChartPreset.StackedArea,\n },\n {\n label: $localize`Stacked % area`,\n value: TimeseriesChartPreset.StackedPercentageArea,\n },\n { label: $localize`Bar`, value: TimeseriesChartPreset.StackedBar },\n { label: $localize`Status`, value: TimeseriesChartPreset.StatusBar },\n ];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n private formBuilder: FormBuilder,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {\n this.form = this.formBuilder.group({\n leftAxisLabel: [\"\"],\n startingTimespan: [null, Validators.required],\n legendPlacement: [LegendPlacement.None, [Validators.required]],\n preset: [TimeseriesChartPreset.Line, [Validators.required]],\n });\n }\n\n public ngOnInit(): void {\n this.form\n .get(\"startingTimespan\")\n ?.valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((value) => {\n // this is to wait until the value of 'startingTimespan' is converted to the preview\n setTimeout(() => {\n this.eventBus.next(PREVIEW_EVENT, {\n payload: { id: REFRESH },\n });\n });\n });\n\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const startingTimespanControl = this.form.get(\"startingTimespan\");\n\n if (changes.leftAxisLabel) {\n this.form\n .get(\"leftAxisLabel\")\n ?.setValue(this.leftAxisLabel, { emitEvent: false });\n }\n\n if (changes.startingTimespan) {\n startingTimespanControl?.setValue(this.startingTimespan, {\n emitEvent: false,\n });\n }\n\n if (changes.legendPlacement) {\n this.form\n .get(\"legendPlacement\")\n ?.setValue(this.legendPlacement, { emitEvent: false });\n }\n\n if (changes.preset) {\n this.form\n .get(\"preset\")\n ?.setValue(this.preset, { emitEvent: false });\n }\n\n if (changes.timeSpans) {\n if (!startingTimespanControl?.value && this.timeSpans?.length > 0) {\n startingTimespanControl?.setValue(this.timeSpans[0]);\n }\n }\n }\n\n public getSecondaryText() {\n const startingTimespan = this.form.controls[\"startingTimespan\"].value;\n const forTimeframe =\n (startingTimespan && startingTimespan.name) ||\n $localize`No timespan`;\n const forLegend =\n this.form.controls[\"legendPlacement\"].value || $localize`No legend`;\n const forAxisLabel =\n this.form.controls[\"leftAxisLabel\"].value ||\n $localize`No y-axis label`;\n return `${forTimeframe}, ${forLegend}, ${forAxisLabel}`;\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n [icon]=\"form | nuiFormHeaderIconPipe: 'edit' | async\"\n [iconColor]=\"form | nuiFormHeaderIconPipe: 'gray':'' | async\"\n ></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()\">\n {{ getSecondaryText() }}\n </div>\n </div>\n </div>\n <div class=\"timeseries-metadata-configuration__accordion-content\">\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Starting timespan\"\n i18n-caption\n [control]=\"form.controls['startingTimespan']\"\n >\n <nui-select-v2\n placeholder=\"Starting Timespan\"\n i18n-placeholder\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n formControlName=\"startingTimespan\"\n >\n <nui-select-v2-option\n *ngFor=\"let timeSpan of timeSpans\"\n [value]=\"timeSpan\"\n >\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\n caption=\"Chart legend\"\n i18n-caption\n [control]=\"form.controls['legendPlacement']\"\n >\n <nui-select-v2\n placeholder=\"Select Legend Orientation\"\n i18n-placeholder\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n formControlName=\"legendPlacement\"\n >\n <nui-select-v2-option\n *ngFor=\"let legendPlacement of legendPlacements\"\n [value]=\"legendPlacement.id\"\n >\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\n caption=\"Chart y-axis label\"\n i18n-caption\n [control]=\"form.controls['leftAxisLabel']\"\n >\n <nui-textbox\n formControlName=\"leftAxisLabel\"\n placeholder=\"Set chart y-axis label\"\n i18n-placeholder\n ></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\n caption=\"Chart type\"\n i18n-caption\n [control]=\"form.controls['preset']\"\n >\n <nui-select-v2\n placeholder=\"Chart type\"\n i18n-placeholder\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n formControlName=\"preset\"\n >\n <nui-select-v2-option\n *ngFor=\"let option of availableChartTypes\"\n [value]=\"option.value\"\n >{{ option.label }}</nui-select-v2-option\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\n\n@Component({\n selector: \"nui-title-and-description-configuration\",\n templateUrl: \"./title-and-description-configuration.component.html\",\n styleUrls: [\"title-and-description-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TitleAndDescriptionConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnInit, OnChanges\n{\n public static lateLoadKey = \"TitleAndDescriptionConfigurationComponent\";\n\n @Input() title: string;\n @Input() url: string;\n @Input() subtitle: string;\n @Input() description: string;\n @Input() collapsible: boolean;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n private logger: LoggerService\n ) {\n this.form = this.formBuilder.group({\n title: [\"\", Validators.required],\n subtitle: [\"\"],\n url: [\"\"],\n description: [\"\"],\n collapsible: [false],\n collapsed: [true], // setting 'collapsed' to true to demonstrate the collapsed appearance in the preview\n });\n }\n\n public ngOnInit(): void {\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.title) {\n this.form.get(\"title\")?.setValue(this.title);\n }\n if (changes.url) {\n this.form.get(\"url\")?.setValue(this.url);\n }\n if (changes.subtitle) {\n this.form.get(\"subtitle\")?.setValue(this.subtitle);\n }\n if (changes.description) {\n this.form.get(\"description\")?.setValue(this.description);\n }\n if (changes.collapsible) {\n this.form.get(\"collapsible\")?.setValue(this.collapsible);\n }\n }\n\n public getSecondaryText() {\n const forTitle =\n this.form.controls[\"title\"].value || $localize`No title`;\n const forSubtitle =\n this.form.controls[\"subtitle\"].value || $localize`no subtitle`;\n return `${forTitle}, ${forSubtitle}`;\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_list' | async\"\n ></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\">\n {{ getSecondaryText() }}\n </div>\n </div>\n </div>\n <div class=\"title-and-description-configuration__accordion-content\">\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Widget title\"\n i18n-caption\n [control]=\"form.get('title')\"\n >\n <!-- TODO: remove \"kpi\" prefix in v11 - NUI-5833-->\n <nui-textbox\n id=\"kpi-widget-title\"\n formControlName=\"title\"\n placeholder=\"Set widget title\"\n i18n-placeholder\n ></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\n caption=\"Widget subtitle\"\n i18n-caption\n [control]=\"form.get('subtitle')\"\n >\n <!-- TODO: remove \"kpi\" prefix in v11 - NUI-5833 -->\n <nui-textbox\n id=\"kpi-widget-subtitle\"\n formControlName=\"subtitle\"\n placeholder=\"Do not show a subtitle\"\n i18n-placeholder\n ></nui-textbox>\n </nui-form-field>\n </div>\n\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Widget link URL\"\n i18n-caption\n [control]=\"form.get('url')\"\n >\n <!-- TODO: remove \"kpi\" prefix in v11 - NUI-5833-->\n <nui-textbox\n id=\"kpi-widget-url\"\n formControlName=\"url\"\n placeholder=\"Do not link to another page\"\n i18n-placeholder\n ></nui-textbox>\n </nui-form-field>\n </div>\n\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Widget description\"\n 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\"\n i18n-hint\n >\n <nui-textbox\n formControlName=\"description\"\n placeholder=\"No description\"\n i18n-placeholder\n ></nui-textbox>\n </nui-form-field>\n </div>\n <div>\n <nui-form-field\n caption=\"Hide widget header\"\n [showOptionalText]=\"false\"\n i18n-caption\n [control]=\"form.get('collapsible')\"\n >\n <nui-checkbox formControlName=\"collapsible\" i18n\n >Collapsible</nui-checkbox\n >\n </nui-form-field>\n </div>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\n\n@Component({\n selector: \"nui-entity-formatting-configuration\",\n templateUrl: \"./entity-formatting-configuration.component.html\",\n styles: [\n `\n .entity-formatting__accordion-content {\n padding: 15px 15px 15px 46px;\n }\n `,\n ],\n})\nexport class EntityFormattingConfigurationComponent\n implements OnInit, OnChanges\n{\n public static lateLoadKey = \"EntityFormattingComponent\";\n\n @Input() mappingKeys: string[];\n @Input() dataFieldIds: { [key: string]: string };\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup = this.formBuilder.group({\n dataFieldIds: this.formBuilder.group({\n icon: \"\",\n status: \"\",\n detailedUrl: \"\",\n label: \"\",\n url: \"\",\n }),\n });\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder\n ) {}\n\n public ngOnInit(): void {\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.dataFieldIds) {\n this.getFieldMappingsControl.setValue(\n changes.dataFieldIds.currentValue\n );\n }\n }\n\n public get getFieldMappingsControl(): FormGroup {\n return this.form.get(\"dataFieldIds\") as FormGroup;\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"'tag'\"\n iconColor=\"gray\"\n ></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\" title=\"Show status icon\">\n Show status icon\n </div>\n </div>\n </div>\n <div\n class=\"entity-formatting__accordion-content\"\n formGroupName=\"dataFieldIds\"\n >\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\n class=\"d-flex flex-grow-1\"\n [control]=\"getFieldMappingsControl.get('icon')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n formControlName=\"icon\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of mappingKeys\"\n [value]=\"item\"\n >\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\n class=\"d-flex flex-grow-1\"\n [control]=\"getFieldMappingsControl.get('status')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n formControlName=\"status\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of mappingKeys\"\n [value]=\"item\"\n >\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\n class=\"d-flex flex-grow-1\"\n [control]=\"getFieldMappingsControl.get('detailedUrl')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n formControlName=\"detailedUrl\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of mappingKeys\"\n [value]=\"item\"\n >\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\n class=\"d-flex flex-grow-1\"\n [control]=\"getFieldMappingsControl.get('label')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n formControlName=\"label\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of mappingKeys\"\n [value]=\"item\"\n >\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\n class=\"d-flex flex-grow-1\"\n [control]=\"getFieldMappingsControl.get('url')\"\n >\n <nui-select-v2\n placeholder=\"Select Item\"\n i18n-placeholder\n formControlName=\"url\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of mappingKeys\"\n [value]=\"item\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n} from \"@angular/forms\";\nimport _difference from \"lodash/difference\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataField, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport {\n IHasChangeDetector,\n IHasForm,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { DATA_SOURCE_CREATED } from \"../../../../types\";\n\n@Component({\n selector: \"nui-grouping-configuration\",\n templateUrl: \"./grouping-configuration.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\n `\n .grouping-configuration__accordion-content {\n padding: 15px 15px 15px 46px;\n }\n `,\n ],\n})\n// Remember to declare this class in the parent module\nexport class GroupingConfigurationComponent\n implements OnInit, OnChanges, IHasChangeDetector, IHasForm, OnDestroy\n{\n public static lateLoadKey = \"DrilldownConfiguratorComponent\";\n\n @Input() groups: string[];\n @Input() groupBy: string[];\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup = this.formBuilder.group({\n groups: [],\n groupBy: this.formBuilder.array([]),\n drillstate: [undefined],\n });\n\n public selectData: Array<Array<string>>;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {}\n\n public get getGroupByControl(): FormArray {\n return this.form.get(\"groupBy\") as FormArray;\n }\n\n public get getDrillStateControl(): FormArray {\n return this.form.get(\"drillstate\") as FormArray;\n }\n\n public get getGroupsControl(): FormControl {\n return this.form.get(\"groups\") as FormControl;\n }\n\n public ngOnInit(): void {\n this.eventBus\n .getStream(DATA_SOURCE_CREATED)\n .pipe(takeUntil(this.destroy$))\n .subscribe((provider: IEvent<IDataSource>) =>\n this.onDataSourceCreated(provider)\n );\n\n this.getGroupByControl.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.fillGroupsOptions());\n\n this.fillGroupsOptions();\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.groups) {\n this.getGroupsControl.setValue(changes.groups.currentValue);\n }\n if (changes.groupBy && !changes.groupBy.firstChange) {\n this.getGroupByControl.clear();\n this.groupBy.forEach((group) =>\n this.getGroupByControl.push(this.createControl(group))\n );\n this.fillGroupsOptions();\n }\n }\n\n public createControl(value?: string): FormControl {\n return this.formBuilder.control(value || \"\", Validators.required);\n }\n\n public addGrouping(): void {\n const control = this.createControl();\n this.getGroupByControl.push(control);\n this.fillGroupsOptions();\n const lastControlIndex = this.getGroupByControl.controls.length - 1;\n control.setValue(this.selectData[lastControlIndex][0]);\n }\n\n public removeRule(index: number): void {\n this.getGroupByControl.removeAt(index);\n this.fillGroupsOptions();\n }\n\n public isAddRestricted() {\n return this.selectData.some((i) => i.length === 1);\n }\n\n public getSubtitle(): string {\n const subtitle = this.getGroupByControl.controls\n .map(\n (control: AbstractControl, index: number) =>\n `${index === 0 ? \"By\" : \"then\"} ${control.value}`\n )\n .join(\", \");\n\n return this.getGroupByControl?.value.length === 0\n ? $localize`No groups`\n : $localize`${subtitle}`;\n }\n\n public ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private onDataSourceCreated(provider: IEvent<IDataSource>) {\n provider?.payload?.dataFieldsConfig?.dataFields$\n ?.pipe(takeUntil(this.destroy$))\n .subscribe((dataFields: IDataField[]) => {\n if (dataFields) {\n const dataFieldIds = dataFields.map(\n (field: IDataField) => field.id\n );\n const dataDiff = _difference(this.groups, dataFieldIds);\n if (dataDiff.length || !this.groups?.length) {\n this.groups = dataFieldIds;\n this.getGroupsControl.setValue(dataFieldIds);\n this.getGroupByControl.clear();\n this.getDrillStateControl.setValue([]);\n this.fillGroupsOptions();\n }\n }\n });\n }\n\n private fillGroupsOptions() {\n this.selectData = [];\n const controlValue = this.getGroupByControl.value as string[];\n this.getGroupByControl.controls.forEach(\n (value: AbstractControl, index: number) => {\n this.selectData[index] = [];\n const diff = _difference(this.groups, controlValue);\n if (controlValue[index]) {\n this.selectData[index].push(controlValue[index]);\n }\n this.selectData[index] = [...this.selectData[index], ...diff];\n }\n );\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"'tag'\"\n iconColor=\"gray\"\n ></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\" [title]=\"getSubtitle()\">\n {{ getSubtitle() }}\n </div>\n </div>\n </div>\n <div\n class=\"grouping-configuration__accordion-content\"\n formArrayName=\"groupBy\"\n >\n <ng-container\n *ngFor=\"let group of getGroupByControl.controls; index as i\"\n >\n <label *ngIf=\"i !== 0\" class=\"d-flex nui-text-secondary mb-1\" i18n\n >Then</label\n >\n <label *ngIf=\"i === 0\" class=\"d-flex nui-text-panel mb-2\" i18n\n >Group by</label\n >\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\n placeholder=\"Select Item\"\n i18n-placeholder\n [formControlName]=\"i\"\n >\n <nui-select-v2-option\n *ngFor=\"let item of selectData[i]\"\n [value]=\"item\"\n >\n {{ item }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n <div class=\"justify-content-center\">\n <button\n 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\n nui-button\n icon=\"add\"\n displayStyle=\"action\"\n type=\"button\"\n i18n\n *ngIf=\"!this.isAddRestricted()\"\n (click)=\"addGrouping()\"\n >\n Add another level\n </button>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormGroup,\n} from \"@angular/forms\";\nimport { Observable } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, uuid } from \"@nova-ui/bits\";\n\nimport { KpiComponent } from \"../../../../../components/kpi-widget/kpi.component\";\nimport { IPizzagnaProperty } from \"../../../../../pizzagna/functions/get-pizzagna-property-path\";\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport {\n IHasChangeDetector,\n IHasForm,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { IItemConfiguration } from \"../../../types\";\nimport { IKpiItemConfiguration } from \"../types\";\n\n/**\n * This component and its related form represent a collection of KPI tile configuration components\n */\n@Component({\n selector: \"nui-kpi-tiles-configuration-component\",\n templateUrl: \"./kpi-tiles-configuration.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class KpiTilesConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnChanges\n{\n static lateLoadKey = \"KpiTilesConfigurationComponent\";\n\n @Input() componentId: string;\n @Input() tiles: IKpiItemConfiguration[] = [];\n @Input() nodes: string[];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public emptyItems$: Observable<boolean>;\n\n constructor(\n public pizzagnaService: PizzagnaService,\n public changeDetector: ChangeDetectorRef,\n private formBuilder: FormBuilder,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {}\n\n ngOnChanges(changes: SimpleChanges): void {}\n\n public onFormReady(form: AbstractControl) {\n this.form = this.formBuilder.group({\n tiles: form as FormArray,\n });\n\n this.emptyItems$ = this.form.valueChanges.pipe(\n map((result) => result.tiles.length === 0)\n );\n this.formReady.emit(this.form);\n }\n\n public onItemsChange(tiles: IItemConfiguration[]) {\n const parentPath = \"tiles\";\n const componentIds = tiles.map((tile) => tile.id);\n this.pizzagnaService.createComponentsFromTemplate(\n parentPath,\n componentIds\n );\n\n const property: IPizzagnaProperty = {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"tiles\"],\n };\n this.pizzagnaService.setProperty(property, tiles);\n }\n\n public addTile() {\n this.onItemsChange([\n ...this.tiles,\n {\n id: uuid(\"kpi\"),\n componentType: KpiComponent.lateLoadKey,\n },\n ]);\n }\n}\n","<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\n 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\n>\n Add new value\n</button>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\n\nimport { IDataField, LoggerService, SelectV2Component } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector } from \"../../../../../../types\";\n\nexport interface IAggregatorConfiguratorProperties {\n metrics: IDataField[];\n activeMetricId?: string;\n [key: string]: any;\n}\n\n@Component({\n selector: \"nui-aggregator-configurator\",\n templateUrl: \"./aggregator-configurator.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AggregatorMetricSelectorConfigurationComponent\n implements OnInit, OnChanges, IHasChangeDetector\n{\n static lateLoadKey = \"AggregatorMetricSelectorConfigurationComponent\";\n\n @Input() public metrics: IDataField[];\n @Input() public activeMetricId: string;\n\n @Output() public formReady = new EventEmitter();\n\n public form: FormGroup = this.formBuilder.group({\n activeMetricId: [],\n });\n\n @ViewChild(\"metricsSelect\")\n public meticsSelect: SelectV2Component;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n protected formBuilder: FormBuilder,\n protected logger: LoggerService\n ) {}\n\n ngOnInit(): void {\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.activeMetricId) {\n this.form\n .get(\"activeMetricId\")\n ?.setValue(changes.activeMetricId.currentValue);\n\n const currentMetricConfig = this.metrics.find(\n (m) => m.id === changes.activeMetricId.currentValue\n );\n if (!currentMetricConfig) {\n this.logger.warn(\n `AggregatorMetricSelectorConfigurationComponent: No metric found for id: ${changes.activeMetricId.currentValue}`\n );\n }\n }\n }\n\n unsetMetric() {\n this.form.controls[\"activeMetricId\"].reset();\n this.meticsSelect.hideDropdown();\n }\n}\n","<div *ngIf=\"form\" [formGroup]=\"form\">\n <div>\n <nui-form-field\n caption=\"Default Metric\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"form.controls['activeMetricId']\"\n >\n <nui-select-v2\n #metricsSelect\n formControlName=\"activeMetricId\"\n placeholder=\"Select Value\"\n i18n-placeholder\n >\n <nui-overlay-item\n (click)=\"unsetMetric()\"\n class=\"nui-combobox-v2__popup-box\"\n style=\"cursor: pointer\"\n >Unset</nui-overlay-item\n >\n <nui-select-v2-option\n *ngFor=\"let metric of metrics\"\n [displayValueContext]=\"metric.label\"\n [value]=\"metric.id\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n EventBus,\n IDataField,\n IDataSource,\n IEvent,\n LoggerService,\n} from \"@nova-ui/bits\";\n\nimport { IProportionalDataFieldsConfig } from \"../../../../../../components/proportional-widget/types\";\nimport {\n IHasChangeDetector,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../../types\";\nimport { DATA_SOURCE_CREATED } from \"../../../../../types\";\nimport { AggregatorMetricSelectorConfigurationComponent } from \"../aggregator-configurator/aggregator-configurator.component\";\n\nconst DEFAULT_CHART_SERIES_DATA_FIELD: IDataField = {\n id: \"data[0]\",\n label: \"data\",\n // @ts-ignore\n dataType: null,\n};\n\n@Component({\n selector: \"nui-field-mapper-aggregator-configurator\",\n templateUrl: \"./field-mapper-aggregator-configurator.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FieldMapperAggregatorConfiguratorComponent\n extends AggregatorMetricSelectorConfigurationComponent\n implements OnInit, OnChanges, OnDestroy, IHasChangeDetector\n{\n static lateLoadKey = \"FieldMapperAggregatorConfiguratorComponent\";\n\n @Input() chartSeriesDataFieldId: string;\n\n public chartSeriesDataFields: IDataField[] = [\n DEFAULT_CHART_SERIES_DATA_FIELD,\n ];\n public form: FormGroup = this.formBuilder.group({\n activeMetricId: [],\n chartSeriesDataFieldId: [],\n });\n\n private destroy$ = new Subject<void>();\n\n constructor(\n changeDetector: ChangeDetectorRef,\n formBuilder: FormBuilder,\n logger: LoggerService,\n @Inject(PIZZAGNA_EVENT_BUS) protected eventBus: EventBus<IEvent>\n ) {\n super(changeDetector, formBuilder, logger);\n\n this.eventBus\n .getStream(DATA_SOURCE_CREATED)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent<IDataSource>) => {\n const dataSource = event.payload;\n if (dataSource) {\n (<IProportionalDataFieldsConfig>(\n dataSource.dataFieldsConfig\n ))?.chartSeriesDataFields$\n ?.pipe(takeUntil(this.destroy$))\n .subscribe(\n (dataFields) =>\n (this.chartSeriesDataFields = dataFields)\n );\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n super.ngOnChanges(changes);\n\n if (changes.chartSeriesDataFieldId) {\n this.form\n .get(\"chartSeriesDataFieldId\")\n ?.setValue(changes.chartSeriesDataFieldId.currentValue);\n }\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div *ngIf=\"form\" [formGroup]=\"form\">\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Default Metric\"\n i18n-caption\n class=\"mb-4\"\n [control]=\"form.controls['activeMetricId']\"\n >\n <nui-select-v2\n formControlName=\"activeMetricId\"\n #metricsSelect\n placeholder=\"Select Value\"\n i18n-placeholder\n >\n <nui-overlay-item\n (click)=\"unsetMetric()\"\n class=\"nui-combobox-v2__popup-box\"\n style=\"cursor: pointer\"\n >Unset</nui-overlay-item\n >\n <nui-select-v2-option\n *ngFor=\"let metric of metrics\"\n [displayValueContext]=\"metric.label\"\n [value]=\"metric.id\"\n >\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\n caption=\"Chart Series Data Field\"\n i18n-caption\n class=\"mb-4\"\n [control]=\"form.controls['chartSeriesDataFieldId']\"\n >\n <nui-select-v2\n formControlName=\"chartSeriesDataFieldId\"\n placeholder=\"Select Value\"\n i18n-placeholder\n >\n <nui-select-v2-option\n *ngFor=\"let chartSeriesDataField of chartSeriesDataFields\"\n [displayValueContext]=\"chartSeriesDataField.label\"\n [value]=\"chartSeriesDataField.id\"\n >\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</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n} from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n IProportionalWidgetChartTypeConfiguration,\n ProportionalWidgetChartTypes,\n} from \"../../../../../components/proportional-widget/types\";\nimport {\n IFormatter,\n IFormatterDefinition,\n} from \"../../../../../components/types\";\nimport { ProportionalLegendFormattersRegistryService } from \"../../../../../services/table-formatter-registry.service\";\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\nimport { ILegendPlacementOption } from \"../../../../../widget-types/common/widget/legend\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\n\n@Component({\n selector: \"nui-proportional-chart-options-editor-v2-component\",\n templateUrl: \"proportional-chart-options-editor-v2.component.html\",\n styleUrls: [\"proportional-chart-options-editor-v2.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProportionalChartOptionsEditorV2Component\n implements OnInit, IHasChangeDetector, IHasForm, OnChanges, OnDestroy\n{\n static lateLoadKey = \"ProportionalChartOptionsEditorV2Component\";\n\n @Input() type: ProportionalWidgetChartTypes;\n @Input() legendPlacement: ILegendPlacementOption;\n @Input() legendFormatter: IFormatter;\n\n @Input() chartTypes: IProportionalWidgetChartTypeConfiguration[];\n @Input() legendPlacementOptions: ILegendPlacementOption[];\n public legendFormatters: IFormatterDefinition[];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup = this.formBuilder.group({\n type: [undefined, Validators.required],\n legendPlacement: [undefined],\n legendFormatter: this.formBuilder.group({\n componentType: [undefined],\n }),\n });\n // used by Broadcaster\n public chartTypeChanged$ = new Subject<ProportionalWidgetChartTypes>();\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n private formBuilder: FormBuilder,\n legendFormattersRegistry: ProportionalLegendFormattersRegistryService\n ) {\n this.legendFormatters = legendFormattersRegistry.getItems();\n\n // broadcast chart type\n this.form.controls[\"type\"].valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((v) => this.chartTypeChanged$.next(v));\n }\n\n public ngOnInit() {\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.type) {\n this.form.controls[\"type\"].setValue(changes.type.currentValue);\n }\n\n if (changes.legendPlacement) {\n this.form.controls[\"legendPlacement\"].setValue(\n changes.legendPlacement.currentValue\n );\n }\n\n if (changes.legendFormatter) {\n this.form\n .get(\"legendFormatter.componentType\")\n ?.setValue(changes.legendFormatter.currentValue.componentType);\n }\n }\n\n public ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n this.chartTypeChanged$.complete();\n }\n\n public get chartTitle() {\n const currentChartType: string = this.form.get(\"type\")?.value;\n const currentChartTypeDefinition = this.chartTypes.find(\n (chartType) => chartType.id === currentChartType\n );\n return currentChartTypeDefinition?.label;\n }\n\n public get legendFormatterControl(): FormControl {\n return this.form.get(\"legendFormatter.componentType\") as FormControl;\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_pie-chart' | async\"\n ></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\n class=\"proportional-widget-chart-options-configuration__accordion-content\"\n >\n <!-- chart type -->\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Chart Type\"\n i18n-caption\n [control]=\"form.controls['type']\"\n >\n <nui-select-v2\n placeholder=\"Select chart type\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n formControlName=\"type\"\n i18n-placeholder\n >\n <nui-select-v2-option\n *ngFor=\"let chartType of chartTypes\"\n [displayValueContext]=\"chartType.label\"\n [value]=\"chartType.id\"\n >\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 <!-- legend placement -->\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Legend\"\n i18n-caption\n [showOptionalText]=\"false\"\n [control]=\"form.controls['legendPlacement']\"\n >\n <nui-select-v2\n formControlName=\"legendPlacement\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n >\n <nui-select-v2-option\n *ngFor=\"let option of legendPlacementOptions\"\n [value]=\"option.id\"\n >\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 <!-- legend formatter -->\n <div class=\"mb-4\">\n <ng-container formGroupName=\"legendFormatter\">\n <nui-form-field\n caption=\"Legend format\"\n i18n-caption\n [showOptionalText]=\"false\"\n [control]=\"legendFormatterControl\"\n >\n <nui-select-v2\n formControlName=\"componentType\"\n [popupViewportMargin]=\"\n configuratorHeading.height$ | async\n \"\n >\n <nui-select-v2-option\n *ngFor=\"let legendFormatter of legendFormatters\"\n [value]=\"legendFormatter.componentType\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport {\n IProportionalWidgetChartEditorOptions,\n ProportionalWidgetChartTypes,\n} from \"../../../../../components/proportional-widget/types\";\nimport { IFormatterDefinition } from \"../../../../../components/types\";\nimport {\n IHasChangeDetector,\n IHasForm,\n IProperties,\n} from \"../../../../../types\";\nimport { LegendPlacement } from \"../../../../../widget-types/common/widget/legend\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\n\ntype ChartTypeNamesMap = { [key in ProportionalWidgetChartTypes]: string };\nconst proportionalWidgetChartTypesNamesMap: ChartTypeNamesMap = {\n [ProportionalWidgetChartTypes.DonutChart]: $localize`Donut`,\n [ProportionalWidgetChartTypes.PieChart]: $localize`Pie`,\n [ProportionalWidgetChartTypes.VerticalBarChart]: $localize`Vertical Bar`,\n [ProportionalWidgetChartTypes.HorizontalBarChart]: $localize`Horizontal Bar`,\n};\ninterface IChartOptionViewModel {\n label: string;\n value: ProportionalWidgetChartTypes;\n}\n\n@Component({\n selector: \"nui-proportional-chart-options-editor-component\",\n templateUrl: \"proportional-chart-options-editor.component.html\",\n styleUrls: [\"proportional-chart-options-editor.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ProportionalChartOptionsEditorComponent\n implements IHasChangeDetector, IHasForm, OnInit, OnChanges\n{\n static lateLoadKey = \"ProportionalChartOptionsEditorComponent\";\n\n @Input() chartOptions: IProportionalWidgetChartEditorOptions;\n @Input() chartType: ProportionalWidgetChartTypes;\n @Input() legendPlacement = LegendPlacement.None;\n @Input() legendFormatterComponentType: string;\n @Input() contentFormatterComponentType: string;\n @Input() contentFormatterProperties: IProperties | undefined;\n // filled by the Broadcaster\n @Input() dsOutput: any;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n public chartTypeNamesMap: ChartTypeNamesMap =\n proportionalWidgetChartTypesNamesMap;\n public legendFormatters: IFormatterDefinition[] = [];\n public contentFormatters: IFormatterDefinition[] = [];\n public formatterHasConfigurationComponent: boolean = false;\n public currentConfigurationComponent: string = \"\";\n public currentConfigurationComponentProperties: any;\n public chartFormatters: any = [];\n public configurationComponentProperties: any;\n\n private cachedChartOptionsViewModels: IChartOptionViewModel[] = [];\n private rawFormatter: IFormatterDefinition = {\n componentType: \"\",\n label: $localize`Raw`,\n dataTypes: {\n // @ts-ignore: pe 'null' is not as signable to type 'string | string[]'.\n value: null,\n },\n };\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n private formBuilder: FormBuilder\n ) {}\n\n public get chartTypeSelectViewModels(): IChartOptionViewModel[] {\n // Using simple caching helper to prevent triggering values map on every CD cycle\n if (\n !this.cachedChartOptionsViewModels ||\n this.cachedChartOptionsViewModels.length !==\n this.chartOptions?.chartTypes?.length\n ) {\n this.cachedChartOptionsViewModels = (\n this.chartOptions?.chartTypes || []\n ).map((value) => ({ label: this.chartTypeNamesMap[value], value }));\n }\n return this.cachedChartOptionsViewModels;\n }\n\n public get chartTitle(): string {\n return this.chartTypeNamesMap[\n <ProportionalWidgetChartTypes>this.form.controls[\"type\"].value\n ];\n }\n\n public getConfigurationComponent(): string {\n return (\n this.getCurrentFormatterDefinition()?.configurationComponent || \"\"\n );\n }\n\n public getConfigurationComponentProperties() {\n this.configurationComponentProperties = {\n contentFormatterProperties: this.contentFormatterProperties,\n contentFormatterDefinition: this.getCurrentFormatterDefinition(),\n dsOutput: this.dsOutput,\n };\n }\n\n public getCurrentFormatterDefinition(): IFormatterDefinition | undefined {\n const currentFormValue = this.form.get(\n \"contentFormatter.componentType\"\n )?.value;\n return this.contentFormatters.find(\n (item) => item.componentType === currentFormValue\n );\n }\n\n public ngOnInit(): void {\n this.form = this.formBuilder.group({\n type: [this.chartType || \"\", Validators.required],\n legendPlacement: this.legendPlacement,\n legendFormatter: this.formBuilder.group({\n componentType:\n this.legendFormatterComponentType ||\n this.rawFormatter.componentType,\n }),\n contentFormatter: this.formBuilder.group({\n componentType: this.contentFormatterComponentType,\n // the 'properties' control is being dynamically added here from the onFormReady() method\n }),\n });\n\n this.legendFormatters = [\n this.rawFormatter,\n ...(this.chartOptions.legendFormatters || []),\n ];\n this.contentFormatters = [\n ...(this.chartOptions.contentFormatters || []),\n ];\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.chartType && !changes.chartType.isFirstChange()) {\n this.form.get(\"type\")?.setValue(changes.chartType.currentValue);\n }\n\n if (\n changes.legendPlacement &&\n !changes.legendPlacement.isFirstChange()\n ) {\n this.form\n .get(\"legendPlacement\")\n ?.setValue(changes.legendPlacement.currentValue);\n }\n\n if (\n changes.legendFormatterComponentType &&\n !changes.legendFormatterComponentType.isFirstChange()\n ) {\n (this.form.get(\"legendFormatter\") as FormGroup)\n .get(\"componentType\")\n ?.setValue(this.legendFormatterComponentType);\n }\n\n if (\n changes.contentFormatterComponentType &&\n !changes.contentFormatterComponentType.isFirstChange()\n ) {\n (this.form.get(\"contentFormatter\") as FormGroup)\n .get(\"componentType\")\n ?.setValue(this.contentFormatterComponentType);\n }\n\n if (this.form) {\n this.getConfigurationComponentProperties();\n }\n }\n\n public onFormReady(payload: FormGroup) {\n (this.form.get(\"contentFormatter\") as FormGroup).setControl(\n \"properties\",\n payload\n );\n }\n}\n","<nui-widget-editor-accordion\n [formGroup]=\"form\"\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n>\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_pie-chart' | async\"\n ></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\n class=\"proportional-widget-chart-options-configuration__accordion-content\"\n >\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Chart Type\"\n i18n-caption\n [control]=\"form.controls['type']\"\n >\n <nui-select-v2\n formControlName=\"type\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n placeholder=\"Select chart type\"\n i18n-placeholder\n >\n <nui-select-v2-option\n *ngFor=\"\n let chartTypeSelectViewModel of chartTypeSelectViewModels\n \"\n [value]=\"chartTypeSelectViewModel.value\"\n >\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 <!-- Donut chart content formatter -->\n <div class=\"mb-4\">\n <ng-container\n formGroupName=\"contentFormatter\"\n *ngIf=\"form.get('type')?.value === 'DonutChart'\"\n >\n <nui-form-field\n caption=\"Content format\"\n i18n-caption\n class=\"mb-4\"\n [showOptionalText]=\"false\"\n [control]=\"form.controls['componentType']\"\n >\n <nui-select-v2\n formControlName=\"componentType\"\n [popupViewportMargin]=\"\n configuratorHeading.height$ | async\n \"\n >\n <nui-select-v2-option\n *ngFor=\"let contentFormatter of contentFormatters\"\n [value]=\"contentFormatter.componentType\"\n >\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 <!-- Donut formatter configurator's portal goes here. Make form working in scope of NUI-5014 -->\n <ng-container\n *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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Legend\"\n i18n-caption\n [showOptionalText]=\"false\"\n [control]=\"form.controls['legendPlacement']\"\n >\n <nui-select-v2\n formControlName=\"legendPlacement\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n >\n <nui-select-v2-option\n *ngFor=\"\n let option of chartOptions.legendPlacementOptions\n \"\n [value]=\"option.id\"\n >\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\n caption=\"Legend format\"\n i18n-caption\n [showOptionalText]=\"false\"\n [control]=\"form.controls['componentType']\"\n >\n <nui-select-v2\n formControlName=\"componentType\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n >\n <nui-select-v2-option\n *ngFor=\"let legendFormatter of legendFormatters\"\n [value]=\"legendFormatter.componentType\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataField, IDataSource, IEvent } from \"@nova-ui/bits\";\n\nimport { ProportionalWidgetChartTypes } from \"../../../../../components/proportional-widget/types\";\nimport {\n IFormatter,\n IFormatterConfigurator,\n IFormatterDefinition,\n} from \"../../../../../components/types\";\nimport {\n IProportionalDonutContentAggregator,\n IProportionalDonutContentAggregatorDefinition,\n} from \"../../../../../functions/proportional-aggregators/types\";\nimport { ProportionalContentAggregatorsRegistryService } from \"../../../../../services/proportional-content-aggregators-registry.service\";\nimport { ProportionalDonutContentFormattersRegistryService } from \"../../../../../services/table-formatter-registry.service\";\nimport { IHasChangeDetector, PIZZAGNA_EVENT_BUS } from \"../../../../../types\";\nimport { DATA_SOURCE_CREATED } from \"../../../../types\";\nimport { IAggregatorConfiguratorProperties } from \"../aggregators-configurators/aggregator-configurator/aggregator-configurator.component\";\n\n@Component({\n selector: \"nui-donut-content-configuration\",\n templateUrl: \"./donut-content-configuration.component.html\",\n styleUrls: [\"./donut-content-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DonutContentConfigurationComponent\n implements OnInit, OnChanges, IHasChangeDetector, OnDestroy\n{\n static lateLoadKey = \"DonutContentConfigurationComponent\";\n\n @Input() public chartType: ProportionalWidgetChartTypes;\n @Input() public formatter: IFormatter;\n @Input() public aggregator: IProportionalDonutContentAggregator;\n\n @Output() public formReady = new EventEmitter();\n\n public shown: boolean = true;\n public form = this.formBuilder.group({\n formatter: this.formBuilder.group({\n componentType: [undefined],\n properties: [],\n }),\n aggregator: this.formBuilder.group({\n aggregatorType: [undefined],\n properties: [],\n }),\n });\n public formatters: IFormatterDefinition[];\n public aggregators: IProportionalDonutContentAggregatorDefinition[];\n public dataFields: IDataField[] = [];\n\n public currentFormatterDefinition: IFormatterDefinition | undefined;\n public formatterConfiguratorProps: IFormatterConfigurator;\n\n public currentAggregatorDefinition:\n | IProportionalDonutContentAggregatorDefinition\n | undefined;\n public aggregatorConfiguratorProps: IAggregatorConfiguratorProperties;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n private contentFormattersRegistry: ProportionalDonutContentFormattersRegistryService,\n private aggregatorRegistry: ProportionalContentAggregatorsRegistryService\n ) {}\n\n public ngOnInit(): void {\n this.watchFormChanges();\n this.setFromRegistry();\n\n this.eventBus\n .getStream(DATA_SOURCE_CREATED)\n .pipe(takeUntil(this.destroy$))\n .subscribe((event: IEvent<IDataSource>) => {\n const dataSource = event.payload;\n if (dataSource) {\n dataSource.dataFieldsConfig?.dataFields$\n .pipe(takeUntil(this.destroy$))\n .subscribe((dataFields) => {\n this.dataFields = dataFields;\n this.updateAggregatorConfiguratorProps();\n });\n }\n });\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.formatter) {\n this.form.get(\"formatter\")?.patchValue({\n ...changes.formatter.currentValue,\n });\n }\n\n if (changes.aggregator) {\n this.form.get(\"aggregator\")?.patchValue({\n ...changes.aggregator.currentValue,\n });\n }\n\n if (changes.chartType) {\n const chartType = changes.chartType.currentValue;\n this.shown = chartType === ProportionalWidgetChartTypes.DonutChart;\n }\n }\n\n public ngOnDestroy() {\n this.destroy$.complete();\n }\n\n public onFormReady(formControlName: string, form: FormGroup) {\n (<FormGroup>this.form.get(formControlName)).setControl(\n \"properties\",\n form\n );\n }\n\n public get subtitleText() {\n return `${this.currentAggregatorDefinition?.label}, ${this.currentFormatterDefinition?.label}`;\n }\n\n private setFromRegistry() {\n this.formatters = this.contentFormattersRegistry.getItems();\n this.aggregators = this.aggregatorRegistry.getItems();\n\n let formatterToSet = this.formatters.find(\n (formatter) =>\n formatter.componentType === this.formatter?.componentType\n );\n if (!formatterToSet) {\n formatterToSet = this.formatters[0];\n }\n this.form\n .get(\"formatter.componentType\")\n ?.setValue(formatterToSet.componentType);\n\n let aggregatorToSet = this.aggregators.find(\n (aggregator) =>\n aggregator.aggregatorType === this.aggregator?.aggregatorType\n );\n if (!aggregatorToSet) {\n aggregatorToSet = this.aggregators[0];\n }\n this.form\n .get(\"aggregator.aggregatorType\")\n ?.setValue(aggregatorToSet.aggregatorType);\n }\n\n private watchFormChanges() {\n this.form\n .get(\"aggregator.aggregatorType\")\n ?.valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((aggregatorType: string) => {\n this.currentAggregatorDefinition = this.aggregators.find(\n (f) => f.aggregatorType === aggregatorType\n ) as IProportionalDonutContentAggregatorDefinition;\n this.updateAggregatorConfiguratorProps();\n });\n\n this.form\n .get(\"formatter.componentType\")\n ?.valueChanges.pipe(takeUntil(this.destroy$))\n .subscribe((componentType: string) => {\n this.currentFormatterDefinition = this.formatters.find(\n (f) => f.componentType === componentType\n ) as IFormatterDefinition;\n this.updateAggregatorConfiguratorProps();\n });\n }\n\n private updateAggregatorConfiguratorProps() {\n this.aggregatorConfiguratorProps = {\n ...this.currentAggregatorDefinition?.properties,\n ...this.aggregator?.properties,\n metrics: this.dataFields,\n };\n }\n}\n","<ng-container *ngIf=\"shown\" [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'customize' | async\"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt-1\">\n <span class=\"nui-text-label\" i18n\n >Donut Content Configuration</span\n >\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 <!-- aggregator -->\n <div class=\"mb-4\" formGroupName=\"aggregator\">\n <nui-form-field\n caption=\"Aggregate\"\n i18n-caption\n [control]=\"form.get('aggregator.aggregatorType')\"\n >\n <nui-select-v2\n placeholder=\"Select Format\"\n i18n-placeholder\n formControlName=\"aggregatorType\"\n >\n <nui-select-v2-option\n *ngFor=\"let aggregator of aggregators\"\n [displayValueContext]=\"aggregator.label\"\n [value]=\"aggregator.aggregatorType\"\n >\n {{ aggregator.label }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n\n <!-- formatter -->\n <div class=\"mb-4\" formGroupName=\"formatter\">\n <nui-form-field\n caption=\"Format\"\n i18n-caption\n [control]=\"form.get('formatter.componentType')\"\n >\n <nui-select-v2\n placeholder=\"Select Format\"\n i18n-placeholder\n formControlName=\"componentType\"\n >\n <nui-select-v2-option\n *ngFor=\"let formatter of formatters\"\n [displayValueContext]=\"formatter.label\"\n [value]=\"formatter.componentType\"\n >\n {{ formatter.label }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n\n <!-- aggregator configuration component -->\n <ng-container\n *ngIf=\"currentAggregatorDefinition?.configurationComponent\"\n nuiComponentPortal\n componentId=\"formatterConfigurator\"\n [componentType]=\"\n currentAggregatorDefinition?.configurationComponent\n \"\n [properties]=\"aggregatorConfiguratorProps\"\n [outputs]=\"['formReady']\"\n (output)=\"onFormReady('aggregator', $event.payload)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n\n <!-- formatter configuration component -->\n <ng-container\n *ngIf=\"currentFormatterDefinition?.configurationComponent\"\n nuiComponentPortal\n componentId=\"formatterConfigurator\"\n [componentType]=\"\n currentFormatterDefinition?.configurationComponent\n \"\n [properties]=\"formatterConfiguratorProps\"\n [outputs]=\"['formReady']\"\n (output)=\"onFormReady('formatter', $event.payload)\"\n #componentPortal=\"nuiComponentPortal\"\n >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { AbstractControl } from \"@angular/forms\";\n\n/**\n * This is the only way to be notified of the parent form control being \"touched\"\n * We replace the parent formControl method with our own implementation that also calls the original function\n * @param formControl\n * @param callback Run this callback when the `formControl.markAsTouched` is run\n */\nexport function onMarkAsTouched(\n formControl: AbstractControl,\n callback: Function\n) {\n const origFunc = formControl.markAsTouched;\n formControl.markAsTouched = () => {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n origFunc.apply(formControl, arguments);\n\n callback();\n };\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n forwardRef,\n Input,\n OnInit,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validators,\n} from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { ITableWidgetColumnConfig } from \"../../../../../../../components/table-widget/types\";\nimport { onMarkAsTouched } from \"../../../../../../../functions/on-mark-as-touched\";\nimport { IHasChangeDetector } from \"../../../../../../../types\";\n\n@Component({\n selector: \"nui-description-configuration-v2\",\n templateUrl: \"./description-configuration-v2.component.html\",\n styleUrls: [\"./description-configuration-v2.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DescriptionConfigurationV2Component),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => DescriptionConfigurationV2Component),\n multi: true,\n },\n ],\n})\nexport class DescriptionConfigurationV2Component\n implements IHasChangeDetector, ControlValueAccessor, OnInit\n{\n static lateLoadKey = \"DescriptionConfigurationV2Component\";\n\n @Input() formControl: AbstractControl;\n @Input() isWidthMessageDisplayed = false;\n\n public form: FormGroup;\n public changeFn: Function;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef\n ) {\n this.form = this.formBuilder.group({\n label: [\"\", [Validators.required]],\n isActive: true,\n width: undefined,\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe((value) => {\n this.changeFn?.(value);\n });\n }\n\n public registerOnChange(fn: any): void {\n this.changeFn = fn;\n }\n\n public registerOnTouched(fn: any): void {}\n\n public setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.form.disable();\n } else {\n this.form.enable();\n }\n }\n\n public validate(c: FormControl): ValidationErrors | null {\n return this.form.valid ? null : { nestedForm: true };\n }\n\n public writeValue(obj: ITableWidgetColumnConfig): void {\n this.form.patchValue(\n {\n label: obj.label,\n isActive: obj.isActive,\n width: obj.width,\n },\n { emitEvent: false }\n );\n\n this.changeDetector.markForCheck();\n }\n\n public ngOnInit(): void {\n onMarkAsTouched(this.formControl, () => {\n this.form.markAllAsTouched();\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n public stub() {\n // empty function to hotfix textbox-number behavior (NUI-3442)\n }\n\n public isWidthMessageDisplayedForThisColumn() {\n const width = this.form.controls[\"width\"].value;\n return this.isWidthMessageDisplayed && typeof width !== \"number\";\n }\n}\n","<ng-container [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_list' | async\"\n ></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\n class=\"nui-text-secondary nui-text-ellipsis\"\n [title]=\"form.controls['label'].value\"\n >\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\n caption=\"Label\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"form.controls['label']\"\n >\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\n >Show this column</nui-checkbox\n >\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\n caption=\"Column width (px)\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"form.controls['width']\"\n >\n <!-- TODO: Remove this valueChange stub after NUI-3442 is finished-->\n <nui-textbox-number\n class=\"description-configuration__accordion-content__width-input\"\n (valueChange)=\"stub()\"\n placeholder=\"Auto width\"\n i18n-placeholder\n formControlName=\"width\"\n ></nui-textbox-number>\n <nui-validation-message\n [show]=\"form.controls['width'].invalid\"\n for=\"min\"\n i18n\n >\n Minimum width of the column is 62px\n </nui-validation-message>\n </nui-form-field>\n </div>\n </ng-container>\n <div\n *ngIf=\"isWidthMessageDisplayedForThisColumn()\"\n class=\"mt-4\"\n >\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 </nui-widget-editor-accordion>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IFormatterDefinition } from \"../../components/types\";\nimport { IconFormatterComponent } from \"../../configurator/components/formatters/icon-formatter/icon-formatter.component\";\nimport { LinkFormatterComponent } from \"../../configurator/components/formatters/link-formatter/link-formatter.component\";\nimport { RawFormatterComponent } from \"../../configurator/components/formatters/raw-formatter/raw-formatter.component\";\n\nexport const DEFAULT_TABLE_FORMATTERS: IFormatterDefinition[] = [\n {\n componentType: RawFormatterComponent.lateLoadKey,\n label: $localize`No Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n {\n componentType: LinkFormatterComponent.lateLoadKey,\n label: $localize`Link`,\n configurationComponent: \"LinkConfiguratorComponent\",\n dataTypes: {\n value: \"label\",\n link: \"link\",\n },\n },\n {\n componentType: IconFormatterComponent.lateLoadKey,\n label: $localize`Icon`,\n dataTypes: {\n value: \"string\",\n },\n },\n];\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n ControlContainer,\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n FormGroup,\n FormGroupDirective,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validators,\n} from \"@angular/forms\";\nimport isUndefined from \"lodash/isUndefined\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { EventBus, IDataField, IEvent } from \"@nova-ui/bits\";\n\nimport { IDataSourceOutput } from \"../../../../../../../components/providers/types\";\nimport {\n IFormatter,\n IFormatterConfigurator,\n IFormatterDefinition,\n} from \"../../../../../../../components/types\";\nimport { onMarkAsTouched } from \"../../../../../../../functions/on-mark-as-touched\";\nimport {\n FormatterRegistryService,\n TableFormatterRegistryService,\n} from \"../../../../../../../services/table-formatter-registry.service\";\nimport {\n FORMATTERS_REGISTRY,\n IHasChangeDetector,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../../../types\";\nimport { DEFAULT_TABLE_FORMATTERS } from \"../../../../../../../widget-types/table/default-table-formatters\";\nimport { ConfiguratorHeadingService } from \"../../../../../../services/configurator-heading.service\";\nimport { DATA_SOURCE_OUTPUT } from \"../../../../../../types\";\n\n@Component({\n selector: \"nui-presentation-configuration-v2\",\n templateUrl: \"./presentation-configuration-v2.component.html\",\n styleUrls: [\"./presentation-configuration-v2.component.less\"],\n viewProviders: [\n { provide: ControlContainer, useExisting: FormGroupDirective },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => PresentationConfigurationV2Component),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PresentationConfigurationV2Component),\n multi: true,\n },\n ],\n})\nexport class PresentationConfigurationV2Component\n implements\n IHasChangeDetector,\n OnInit,\n OnDestroy,\n OnChanges,\n DoCheck,\n ControlValueAccessor\n{\n static lateLoadKey = \"PresentationConfigurationV2Component\";\n\n @Input()\n public set formatters(formatters: Array<IFormatterDefinition>) {\n // Note: As discussed we will ignore the config formatters if\n // the user already provided formatters via registry\n if (!this.tableFormattersRegistryService.isEmpty) {\n return;\n }\n this.handleFormattersUpdate(formatters);\n }\n\n public get formatters() {\n return this._formatters;\n }\n\n @Input() public dataFieldIds: string[];\n\n @Input() formControl: AbstractControl;\n\n public set dataFields(dataFields: Array<IDataField>) {\n this._dataFields = dataFields;\n this.updateAvailableFormatters();\n }\n\n public get dataFields(): IDataField[] {\n return this._dataFields;\n }\n\n public get formatter(): IFormatter {\n return this.form?.value;\n }\n\n public form: FormGroup;\n public propertiesForm: FormGroup;\n\n public formatterConfigurator: string | null;\n public formatterConfiguratorProps: IFormatterConfigurator;\n public subtitleText: string;\n\n private _dataFields: Array<IDataField> = [];\n private onDestroy$: Subject<void> = new Subject<void>();\n private providedFormatters: Array<IFormatterDefinition> = [];\n private _formatters: Array<IFormatterDefinition> = [];\n private changeFn: Function;\n private touchFn: Function;\n private propertiesFormReady = new Subject<void>();\n private input: IFormatter;\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>,\n @Optional()\n @Inject(FORMATTERS_REGISTRY)\n private formattersRegistryCommon: FormatterRegistryService,\n // used as a fallback, remove in vNext\n /**\n * @deprecated will be removed in the scope of NUI-5839\n */\n private tableFormattersRegistryService: TableFormatterRegistryService\n ) {\n this.subscribeToFormattersRegistry();\n\n this.form = this.formBuilder.group({\n componentType: this.formBuilder.control(\n this.providedFormatters?.[0]?.componentType,\n Validators.required\n ),\n properties: this.formBuilder.control({}, () =>\n this.propertiesForm?.invalid ? { properties: true } : null\n ),\n });\n\n this.form\n .get(\"componentType\")\n ?.valueChanges.pipe(takeUntil(this.onDestroy$))\n .subscribe(() => this.createFormatterConfigurator());\n\n this.form.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe(() => {\n this.updateSubtitle();\n this.onValueChange();\n this.changeDetector.detectChanges();\n });\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_OUTPUT,\n this.onDestroy$,\n (event: IEvent<any | IDataSourceOutput<any>>) => {\n const { dataFields } = isUndefined(event.payload.result)\n ? event.payload\n : event.payload.result || {};\n\n this.dataFields = dataFields;\n }\n );\n }\n\n public ngOnInit(): void {\n onMarkAsTouched(this.formControl, () => {\n this.form.markAllAsTouched();\n this.propertiesForm.markAllAsTouched();\n });\n }\n\n public ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n\n public ngOnChanges(changes: SimpleChanges) {}\n\n public registerOnChange(fn: any): void {\n this.changeFn = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.touchFn = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {}\n\n public writeValue(obj: IFormatter): void {\n this.input = obj;\n\n this.form.patchValue(obj, { emitEvent: false });\n\n this.createFormatterConfigurator();\n\n this.changeDetector.markForCheck();\n }\n\n public validate(c: FormControl): ValidationErrors | null {\n return this.form.valid &&\n (!this.propertiesForm || this.propertiesForm.valid)\n ? null\n : { error: \"error\" };\n }\n\n public getSelectedFormatterDefinition(): IFormatterDefinition | null {\n if (this.providedFormatters.length > 0) {\n const formatterId = this.form.get(\"componentType\")?.value;\n return (\n this.providedFormatters.find(\n (formatter) => formatter.componentType === formatterId\n ) ?? null\n );\n }\n return null;\n }\n\n public getSelectedDataField(): IDataField | null {\n const propertiesControl = this.form.controls[\"properties\"];\n if (\n propertiesControl &&\n this.dataFields &&\n this.dataFields.length > 0\n ) {\n const dataFieldId = propertiesControl.value.dataFieldIds?.value;\n return (\n this.dataFields.find(\n (dataField) => dataField.id === dataFieldId\n ) ?? null\n );\n }\n return null;\n }\n\n public ngDoCheck() {\n if (!this.form || !this.propertiesForm) {\n return;\n }\n\n const propertiesControl = this.form.controls[\"properties\"];\n if (this.propertiesForm.touched && propertiesControl.untouched) {\n propertiesControl.markAsTouched();\n this.changeDetector.markForCheck();\n }\n if (this.propertiesForm.untouched && propertiesControl.touched) {\n propertiesControl.markAsUntouched();\n this.changeDetector.markForCheck();\n }\n }\n\n public onFormReady(form: FormGroup) {\n this.propertiesFormReady.next();\n\n this.propertiesForm = form;\n\n const propertiesControl = this.form.controls[\"properties\"];\n const updateParentForm = () => {\n propertiesControl.setValue(this.propertiesForm.value);\n this.onValueChange();\n };\n\n propertiesControl.markAsPristine();\n\n this.propertiesForm.valueChanges\n .pipe(takeUntil(this.propertiesFormReady))\n .subscribe(updateParentForm);\n\n // initially, populate the formatter form with inputs from the widget\n this.propertiesForm.patchValue(this.formatter.properties);\n }\n\n public onValueChange() {\n this.changeFn?.(this.form.value);\n }\n\n private updateSubtitle() {\n this.subtitleText = `${this.getSelectedFormatterDefinition()?.label}`;\n if (this.getSelectedDataField()) {\n this.subtitleText = this.subtitleText.concat(\n `, ${this.getSelectedDataField()?.label}`\n );\n }\n }\n\n /**\n * Creates portal for dynamic configuration of formatter value.\n * @returns ComponentPortal\n */\n private createFormatterConfigurator() {\n const formatterDefinition = this.providedFormatters.find(\n (formatter) =>\n formatter.componentType ===\n this.form.get(\"componentType\")?.value\n );\n\n // if configurationComponent property is present in formatters configuration, use it to render portal,\n // otherwise, use default ValueSelectorComponent\n if (formatterDefinition) {\n this.formatterConfigurator =\n formatterDefinition.configurationComponent ??\n \"ValueSelectorComponent\";\n } else {\n this.formatterConfigurator = null;\n }\n\n // if the currently selected component doesn't match the original value from the input then we reset the form values\n if (\n formatterDefinition?.componentType !==\n this.formatter?.componentType &&\n this.formatter?.properties?.dataFieldIds\n ) {\n this.formatter.properties.dataFieldIds = { value: null };\n }\n\n this.formatterConfiguratorProps = {\n dataFields: this.dataFields,\n formatter: this.formatter,\n formatterDefinition: formatterDefinition as IFormatterDefinition,\n };\n }\n\n private updateAvailableFormatters() {\n if (!this._dataFields?.length || !this.providedFormatters.length) {\n return;\n }\n\n // allow by default RawFormatter which has null as dataType\n const sourceDataTypes: Record<string, boolean> = { null: true };\n this._dataFields.forEach((f) => (sourceDataTypes[f.dataType] = true));\n this._formatters = this.providedFormatters.filter((f) => {\n // cast to array in case we have a single value\n const formatterDataTypes =\n f.dataTypes.value instanceof Array\n ? f.dataTypes.value\n : [f.dataTypes.value];\n\n return formatterDataTypes.some((v) => sourceDataTypes[v]);\n });\n if (this.form) {\n this.createFormatterConfigurator();\n }\n }\n\n private subscribeToFormattersRegistry(): void {\n this.handleFormattersUpdate(this.formattersRegistry.getItems());\n\n this.formattersRegistry.stateChanged$\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((formatters) => {\n this.handleFormattersUpdate(formatters);\n });\n }\n\n private handleFormattersUpdate(formatters: IFormatterDefinition[]): void {\n if (formatters !== this.providedFormatters) {\n this.providedFormatters =\n formatters?.length > 0 ? formatters : DEFAULT_TABLE_FORMATTERS;\n this.updateAvailableFormatters();\n }\n }\n\n /**\n * Fallback for table,\n *\n * nothing should go wrong, but in case \"FORMATTERS_REGISTRY\" is lost, get table registry\n */\n private get formattersRegistry() {\n return (\n this.formattersRegistryCommon || this.tableFormattersRegistryService\n );\n }\n}\n","<ng-container [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'customize' | async\"\n ></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\n caption=\"Format\"\n i18n-caption\n [control]=\"form.controls['componentType']\"\n >\n <nui-select-v2\n placeholder=\"Select Format\"\n i18n-placeholder\n [popupViewportMargin]=\"\n configuratorHeading.height$ | async\n \"\n formControlName=\"componentType\"\n >\n <nui-select-v2-option\n *ngFor=\"let formatter of formatters\"\n [displayValueContext]=\"formatter.label\"\n [value]=\"formatter.componentType\"\n >\n {{ formatter.label }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n <ng-container\n *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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n Component,\n forwardRef,\n Input,\n OnInit,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormBuilder,\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n} from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { ITableWidgetColumnConfig } from \"../../../../../../../components/table-widget/types\";\nimport { onMarkAsTouched } from \"../../../../../../../functions/on-mark-as-touched\";\n\n@Component({\n selector: \"nui-table-column-configuration\",\n templateUrl: \"./table-column-configuration.component.html\",\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TableColumnConfigurationComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => TableColumnConfigurationComponent),\n multi: true,\n },\n ],\n})\nexport class TableColumnConfigurationComponent\n implements ControlValueAccessor, OnInit\n{\n public static lateLoadKey = \"TableColumnConfigurationComponent\";\n\n public form: FormGroup;\n public changeFn: Function;\n\n private onDestroy$ = new Subject<void>();\n private input: ITableWidgetColumnConfig;\n\n @Input() formControl: AbstractControl;\n @Input() isWidthMessageDisplayed = false;\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef\n ) {\n this.form = this.formBuilder.group({\n description: this.formBuilder.control({}),\n presentation: this.formBuilder.control({}),\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((value) => {\n const newValue = {\n id: this.input?.id,\n ...value.description,\n formatter: value.presentation,\n };\n this.changeFn(newValue);\n });\n }\n\n public ngOnInit(): void {\n onMarkAsTouched(this.formControl, () => {\n this.form.markAllAsTouched();\n });\n }\n\n public registerOnChange(fn: any): void {\n this.changeFn = fn;\n }\n\n public registerOnTouched(fn: any): void {}\n\n public setDisabledState(isDisabled: boolean): void {}\n\n public validate(c: FormControl): ValidationErrors | null {\n return this.form.valid ? null : { error: \"error\" };\n }\n\n public writeValue(obj: ITableWidgetColumnConfig): void {\n this.input = obj;\n\n this.form.setValue(\n {\n presentation: obj?.formatter || {},\n description: obj,\n },\n { emitEvent: false }\n );\n\n this.changeDetector.markForCheck();\n }\n\n public ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n}\n","<div [formGroup]=\"form\">\n <nui-description-configuration-v2\n [formControl]=\"form.controls['description']\"\n [isWidthMessageDisplayed]=\"isWidthMessageDisplayed\"\n >\n </nui-description-configuration-v2>\n\n <nui-presentation-configuration-v2\n [formControl]=\"form.controls['presentation']\"\n >\n </nui-presentation-configuration-v2>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { CdkDragDrop, CdkDragStart } from \"@angular/cdk/drag-drop\";\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormControl,\n FormGroup,\n} from \"@angular/forms\";\nimport isUndefined from \"lodash/isUndefined\";\nimport values from \"lodash/values\";\nimport { Observable, Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n DialogService,\n EventBus,\n IDataField,\n IDataSource,\n IEvent,\n uuid,\n} from \"@nova-ui/bits\";\n\nimport {\n IDataSourceError,\n IDataSourceOutput,\n} from \"../../../../../components/providers/types\";\nimport { ITableWidgetColumnConfig } from \"../../../../../components/table-widget/types\";\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport { TableFormatterRegistryService } from \"../../../../../services/table-formatter-registry.service\";\nimport {\n IHasForm,\n PIZZAGNA_EVENT_BUS,\n WellKnownDataSourceFeatures,\n} from \"../../../../../types\";\nimport { ConfiguratorDataSourceManagerService } from \"../../../../services/configurator-data-source-manager.service\";\nimport { DATA_SOURCE_CREATED, DATA_SOURCE_OUTPUT } from \"../../../../types\";\n\n@Component({\n selector: \"nui-table-columns-configuration\",\n templateUrl: \"./table-columns-configuration-v2.component.html\",\n styleUrls: [\"./table-columns-configuration-v2.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TableColumnsConfigurationV2Component\n implements OnInit, IHasForm, OnChanges, OnDestroy\n{\n static lateLoadKey = \"TableColumnsConfigurationV2Component\";\n\n @Input() columns: ITableWidgetColumnConfig[] = [];\n @Input() componentId: string;\n\n /**\n * @deprecated backward compatibility measure - deprecated in v11. Removal: NUI-5898\n *\n * This property is here because it was present in V1 component and was used to configure formatters\n */\n @Input() template: any;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public emptyColumns$: Observable<boolean>;\n // this can't be \"dataFields\" because that's an already used name for a property in pizzagna\n public dataSourceFields: Array<IDataField> = [];\n public draggedItemHeight: number;\n public isWidthMessageDisplayed = false;\n public dataSourceError: IDataSourceError | null;\n\n public get columnForms(): FormControl[] {\n return (this.form.controls[\"columns\"] as FormArray)\n .controls as FormControl[];\n }\n\n // the last selected data source will be stored here\n public dataSource: IDataSource;\n public columnLabel = $localize`Column`;\n\n private onDestroy$: Subject<void> = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n private changeDetector: ChangeDetectorRef,\n private dialogService: DialogService,\n private pizzagnaService: PizzagnaService,\n public dataSourceManager: ConfiguratorDataSourceManagerService,\n public tableFormatterRegistry: TableFormatterRegistryService,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {\n this.form = this.formBuilder.group({\n columns: this.formBuilder.array([]),\n });\n\n this.form.controls[\"columns\"].valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((columns: ITableWidgetColumnConfig[]) => {\n this.isWidthMessageDisplayed =\n this.getWidthMessageDisplayed(columns);\n this.changeDetector.markForCheck();\n });\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_CREATED,\n this.onDestroy$,\n (event: IEvent<IDataSource>) => {\n if (!event.payload) {\n return;\n }\n\n this.dataSource = event.payload;\n this.changeDetector.markForCheck();\n }\n );\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_OUTPUT,\n this.onDestroy$,\n (event: IEvent<any | IDataSourceOutput<any>>) => {\n if (event.payload?.error) {\n return;\n }\n const { dataFields } = isUndefined(event.payload.result)\n ? event.payload\n : event.payload.result || {};\n this.dataSourceFields = dataFields ?? [];\n const disableColumnGeneration =\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.DisableTableColumnGeneration\n )?.enabled;\n\n const columns = this.mergeColumns(\n this.dataSourceFields,\n this.getColumns()\n );\n if (columns?.length || disableColumnGeneration) {\n // if disableColumnGeneration is enabled and there are no columns to be kept,\n // we have to clear the form by updating the column input via the `onItemsChange` method\n this.updateColumns(columns);\n } else {\n if (!disableColumnGeneration) {\n this.resetColumns(false);\n }\n }\n this.changeDetector.markForCheck();\n }\n );\n dataSourceManager.error$\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((err: IDataSourceError | null) => {\n this.dataSourceError = err;\n this.changeDetector.markForCheck();\n });\n }\n\n public ngOnInit() {\n this.formReady.emit(this.form);\n\n if (this.template && !this.tableFormatterRegistry.getItems()?.length) {\n const formatters = this.template?.[1].properties?.formatters;\n this.tableFormatterRegistry.addItems(formatters);\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n // columns from input property are set directly to the form\n if (changes.columns) {\n this.updateColumns(this.columns, false);\n }\n }\n\n public ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n\n public getColumns() {\n return this.form.controls[\"columns\"].value;\n }\n\n public updateColumns(\n columns: ITableWidgetColumnConfig[],\n emitEvent: boolean = true\n ) {\n const cols = this.form.controls[\"columns\"] as FormArray;\n cols.controls = columns.map((c) => {\n const fc = new FormControl(c);\n fc.setParent(cols);\n\n // Nova's markAsTouched function gets attached to formControl during init of TableColumnConfigurationComponent,\n // must be pass to newly created formControl here otherwise gets lost and column validation doesn't get triggered.\n const colControl = cols.controls.find(\n (cControl: AbstractControl) => cControl.value.id === c.id\n );\n if (colControl) {\n fc.markAsTouched = colControl.markAsTouched;\n }\n\n return fc;\n });\n cols.updateValueAndValidity({ emitEvent });\n\n this.changeDetector.markForCheck();\n }\n\n public trackBy(index: number, item: FormControl) {\n return item?.value?.id;\n }\n\n public addColumn() {\n (this.form.controls[\"columns\"] as FormArray).push(\n new FormControl({\n id: uuid(\"column\"),\n label: \"\",\n isActive: true,\n formatter: {},\n } as ITableWidgetColumnConfig)\n );\n }\n\n public onResetColumns() {\n this.resetColumns(!!this.getColumns()?.length);\n }\n\n public resetColumns(confirmation: boolean) {\n const reset = () => {\n const columns: ITableWidgetColumnConfig[] =\n this.dataSourceFields?.map((df) => ({\n id: uuid(\"column\"),\n formatter: {\n componentType: \"RawFormatterComponent\",\n properties: {\n dataFieldIds: {\n value: df.id,\n },\n },\n },\n isActive: true,\n label: df.label,\n width: undefined,\n sortable: df.sortable,\n }));\n\n this.updateColumns(columns);\n };\n\n if (confirmation) {\n const dialog = this.dialogService.confirm({\n title: $localize`Are you sure?`,\n message: $localize`Resetting the columns will revert them to their default configurations. Do you wish to proceed?`,\n confirmText: $localize`Reset Columns`,\n });\n\n dialog.result.then(\n (result) => {\n if (result) {\n reset();\n }\n },\n () => {\n // this being here prevents a \"unhandled rejection\" console error from showing up\n }\n );\n } else {\n reset();\n }\n }\n\n /**\n * Merges current column definitions with new incoming data fields\n *\n * @param currentDatafields\n * @param columns\n */\n private mergeColumns(\n currentDatafields: IDataField[],\n columns: ITableWidgetColumnConfig[]\n ): ITableWidgetColumnConfig[] {\n const currentDatafieldIds = currentDatafields.map(\n (datafield) => datafield.id\n );\n return columns.filter((column) => {\n if (!column.formatter?.properties?.dataFieldIds) {\n return false;\n }\n return values(column.formatter?.properties?.dataFieldIds).some(\n (datafield: string) => currentDatafieldIds.includes(datafield)\n );\n });\n }\n\n /**\n * This method calculates whether the width message should be displayed\n *\n * @param columns\n * @private\n */\n private getWidthMessageDisplayed(columns: ITableWidgetColumnConfig[]) {\n let count = 0;\n for (const c of columns) {\n if (typeof c.width !== \"number\") {\n count++;\n }\n if (count > 1) {\n return false;\n }\n }\n return true;\n }\n\n // ------------------------------------------------- items dynamic stuff ------------------------------------------------\n\n public moveItem(index: number, toIndex: number) {\n const columns = this.form.controls[\"columns\"] as FormArray;\n\n const column = columns.at(index);\n columns.removeAt(index);\n columns.insert(toIndex, column);\n\n this.changeDetector.detectChanges();\n }\n\n public removeItem(index: number): void {\n const columns = this.form.controls[\"columns\"] as FormArray;\n columns.removeAt(index);\n\n this.changeDetector.detectChanges();\n }\n\n public drop(event: CdkDragDrop<string[]>) {\n this.moveItem(event.previousIndex, event.currentIndex);\n }\n\n public cdkDragStarted(event: CdkDragStart): void {\n this.draggedItemHeight =\n event.source.element.nativeElement.offsetHeight;\n }\n}\n","<div class=\"nui-table-columns-configuration\">\n <div\n *ngIf=\"!dataSourceError && dataSourceFields.length\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n [formGroup]=\"form\"\n >\n <div formArrayName=\"columns\">\n <div\n cdkDrag\n (cdkDragStarted)=\"cdkDragStarted($event)\"\n class=\"nui-table-columns-configuration__node-item\"\n *ngFor=\"\n let columnForm of columnForms;\n index as i;\n trackBy: trackBy\n \"\n >\n <nui-drop-area\n class=\"nui-table-columns-configuration__drop-area\"\n *cdkDragPlaceholder\n [style.height.px]=\"draggedItemHeight\"\n ></nui-drop-area>\n\n <ng-template #headerText>\n <ng-container>\n <div\n class=\"nui-table-columns-configuration__drag-handler\"\n cdkDragHandle\n >\n <nui-icon icon=\"drag\"></nui-icon>\n </div>\n </ng-container>\n <span\n class=\"nui-table-columns-configuration__header-text\"\n [title]=\"\n columnForm?.value.label\n | nuiWidgetConfiguratorSectionHeader\n : i\n : columnLabel\n \"\n >\n {{\n columnForm?.value.label\n | nuiWidgetConfiguratorSectionHeader\n : i\n : columnLabel\n }}\n </span>\n </ng-template>\n\n <ng-template #headerButtons>\n <div class=\"d-flex\">\n <button\n id=\"table-widget-remove-column-btn-{{ i }}\"\n nui-button\n type=\"button\"\n icon=\"delete\"\n displayStyle=\"action\"\n (click)=\"removeItem(i)\"\n ></button>\n </div>\n </ng-template>\n\n <nui-widget-configurator-section\n class=\"no-margin\"\n [headerTextTemplate]=\"headerText\"\n [headerButtonsTemplate]=\"headerButtons\"\n >\n <nui-table-column-configuration\n [formControl]=\"columnForm\"\n [isWidthMessageDisplayed]=\"isWidthMessageDisplayed\"\n ></nui-table-column-configuration>\n </nui-widget-configurator-section>\n </div>\n\n <div\n class=\"pl-4 pr-4\"\n *ngIf=\"(emptyColumns$ | async) && form.touched\"\n >\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\n 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\n >\n Add new column\n </button>\n\n <button\n 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\n >\n Reset columns\n </button>\n </div>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { IHasChangeDetector } from \"../../../../../../../types\";\n\n@Component({\n selector: \"nui-table-column-description-configuration\",\n templateUrl: \"./description-configuration.component.html\",\n styleUrls: [\"./description-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DescriptionConfigurationComponent\n implements OnInit, OnDestroy, OnChanges, IHasChangeDetector\n{\n static lateLoadKey = \"DescriptionConfigurationComponent\";\n\n @Input() label: string;\n @Input() isActive: string;\n @Input() width: number;\n @Input() isWidthMessageDisplayed: boolean;\n\n @Output() formReady: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n @Output() formDestroy: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.form = this.formBuilder.group({\n label: [this.label || null, [Validators.required]],\n isActive: this.isActive ?? true,\n width: this.width || undefined,\n });\n\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.label) {\n this.form?.patchValue({ label: changes.label.currentValue });\n }\n if (changes.isActive) {\n this.form?.patchValue({ isActive: changes.isActive.currentValue });\n }\n if (changes.width) {\n this.form?.patchValue({ width: changes.width.currentValue });\n }\n }\n\n public stub() {}\n\n ngOnDestroy(): void {\n this.formDestroy.emit(this.form);\n }\n}\n","<ng-container [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'widget_list' | async\"\n ></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\n class=\"nui-text-secondary nui-text-ellipsis\"\n [title]=\"form.controls['label'].value\"\n >\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\n caption=\"Label\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"form.controls['label']\"\n >\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\n >Show this column</nui-checkbox\n >\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\n caption=\"Column width (px)\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"form.controls['width']\"\n >\n <!-- TODO: Remove this valueChange stub after NUI-3442 is finished-->\n <nui-textbox-number\n class=\"description-configuration__accordion-content__width-input\"\n (valueChange)=\"stub()\"\n placeholder=\"Auto width\"\n i18n-placeholder\n formControlName=\"width\"\n ></nui-textbox-number>\n <nui-validation-message\n [show]=\"form.controls['width'].invalid\"\n for=\"min\"\n i18n\n >\n Minimum width of the column is 62px\n </nui-validation-message>\n </nui-form-field>\n </div>\n </ng-container>\n <nui-message\n *ngIf=\"isWidthMessageDisplayed\"\n type=\"info\"\n [allowDismiss]=\"false\"\n i18n\n >\n <b>All columns can not have fixed width.</b>\n </nui-message>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectorRef,\n EventEmitter,\n Injectable,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { IDataField, LoggerService } from \"@nova-ui/bits\";\n\nimport {\n IFormatter,\n IFormatterConfigurator,\n IFormatterDefinition,\n} from \"../../../../../../../../components/types\";\nimport { IHasChangeDetector, IHasForm } from \"../../../../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../../../../services/configurator-heading.service\";\n\n@Injectable()\nexport abstract class FormatterConfiguratorComponent\n implements IFormatterConfigurator, IHasChangeDetector, IHasForm, OnChanges\n{\n @Input() formatter: IFormatter;\n @Input() formatterDefinition: IFormatterDefinition;\n @Input() dataFields: IDataField[];\n @Input() formArrayName: string;\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public dropdownItems: Record<string, IDataField[]> = {};\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n protected formBuilder: FormBuilder,\n public logger: LoggerService\n ) {}\n\n public ngOnChanges(changes: SimpleChanges) {\n if (changes.formatterDefinition) {\n this.mapDropdownItems();\n this.initForm();\n }\n if (changes.dataFields) {\n this.mapDropdownItems();\n }\n if (changes.formatter) {\n this.updateForm();\n }\n }\n\n /**\n * This method pregenerates lists of dropdown items for all required formatter columns mappings based on their type\n */\n public mapDropdownItems() {\n if (!this.dataFields) {\n this.logger.error(\n \"There are no dataFields defined for formatter:\",\n this.formatterDefinition\n );\n return;\n }\n\n this.dropdownItems = Object.keys(\n this.formatterDefinition.dataTypes\n ).reduce((result, next) => {\n const allowedDataTypes = this.formatterDefinition.dataTypes[next];\n\n result[next] = allowedDataTypes\n ? this.dataFields.filter((df) =>\n // dataTypes could be a string or an array of strings, so we're checking that here\n typeof allowedDataTypes === \"string\"\n ? df.dataType === allowedDataTypes\n : (allowedDataTypes as string[]).includes(df.dataType)\n )\n : // if no data types are defined then just include all the fields\n this.dataFields;\n\n return result;\n }, {} as Record<string, IDataField[]>);\n }\n\n get dataFieldIds(): FormGroup {\n return this.form.get(\"dataFieldIds\") as FormGroup;\n }\n\n public initForm(): void {\n // initialize the formArray with selected values or null\n const dataFieldsDefinition = this.formatterDefinition.dataTypes || {};\n const dataFieldForm = Object.keys(dataFieldsDefinition).reduce(\n (result, next) => {\n result[next] = [\n this.formatter?.properties?.dataFieldIds?.[next] ?? null,\n Validators.required,\n ];\n return result;\n },\n {} as Record<string, any>\n );\n\n this.form = this.formBuilder.group({\n dataFieldIds: this.formBuilder.group(dataFieldForm),\n });\n\n this.addCustomFormControls(this.form);\n\n this.formReady.emit(this.form);\n }\n\n protected updateForm(): void {\n this.form.patchValue(this.formatter.properties ?? {}, {\n onlySelf: false,\n emitEvent: false,\n });\n }\n\n /**\n * Add your custom form controls here\n *\n * @param form\n */\n protected addCustomFormControls(form: FormGroup): void {}\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { IHasChangeDetector } from \"../../../../../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../../../../../services/configurator-heading.service\";\nimport { FormatterConfiguratorComponent } from \"../formatter-configurator.component\";\n\n@Component({\n selector: \"nui-link-configurator\",\n templateUrl: \"./link-configurator.component.html\",\n})\nexport class LinkConfiguratorComponent\n extends FormatterConfiguratorComponent\n implements IHasChangeDetector\n{\n public static lateLoadKey = \"LinkConfiguratorComponent\";\n\n constructor(\n changeDetector: ChangeDetectorRef,\n configuratorHeading: ConfiguratorHeadingService,\n formBuilder: FormBuilder,\n logger: LoggerService\n ) {\n super(changeDetector, configuratorHeading, formBuilder, logger);\n }\n\n public initForm(): void {\n const dataFieldForm: Record<string, any> = {\n link: [null, Validators.required],\n value: [null, Validators.required],\n };\n\n this.form = this.formBuilder.group({\n dataFieldIds: this.formBuilder.group(dataFieldForm),\n targetSelf: [false],\n });\n\n this.formReady.emit(this.form);\n }\n}\n","<div [formGroup]=\"form\">\n <div formGroupName=\"dataFieldIds\">\n <div class=\"mb-4\">\n <nui-form-field\n caption=\"Label\"\n i18n-caption=\"\n label field caption| the entity field to be selected for the\n html label property\n \"\n class=\"mb-3\"\n [control]=\"dataFieldIds.controls['value']\"\n >\n <nui-select-v2 formControlName=\"value\">\n <nui-select-v2-option\n *ngFor=\"let itemValue of dropdownItems.value\"\n [value]=\"itemValue.id\"\n >\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\n caption=\"URL\"\n i18n-caption=\"\n url field caption| the entity field to be selected for the\n url html property\n \"\n class=\"mb-3\"\n [control]=\"dataFieldIds.controls['link']\"\n >\n <nui-select-v2 formControlName=\"link\">\n <nui-select-v2-option\n *ngFor=\"let itemLink of dropdownItems.link\"\n [value]=\"itemLink.id\"\n >\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 <nui-form-field\n caption=\"Open in the same window\"\n i18n-caption=\"\n form field caption|switch configuring whether formatted link\n should open in new window/tab\n \"\n class=\"mb-3\"\n [control]=\"form.controls.targetSelf\"\n >\n <nui-switch id=\"nui-switch-target\" formControlName=\"targetSelf\">\n </nui-switch>\n </nui-form-field>\n </div>\n</div>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ChangeDetectorRef, Component } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { ConfiguratorHeadingService } from \"../../../../../../../../services/configurator-heading.service\";\nimport { FormatterConfiguratorComponent } from \"../formatter-configurator.component\";\n\n/** @ignore */\n@Component({\n selector: \"nui-value-selector\",\n templateUrl: \"./value-selector.component.html\",\n})\nexport class ValueSelectorComponent extends FormatterConfiguratorComponent {\n static lateLoadKey = \"ValueSelectorComponent\";\n\n constructor(\n changeDetector: ChangeDetectorRef,\n configuratorHeading: ConfiguratorHeadingService,\n formBuilder: FormBuilder,\n logger: LoggerService\n ) {\n super(changeDetector, configuratorHeading, formBuilder, logger);\n }\n}\n","<div *ngIf=\"form\" [formGroup]=\"form\">\n <div formGroupName=\"dataFieldIds\">\n <nui-form-field\n caption=\"Value\"\n i18n-caption\n class=\"mb-3\"\n [control]=\"dataFieldIds.controls['value']\"\n >\n <nui-select-v2\n formControlName=\"value\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n placeholder=\"Select Value\"\n i18n-placeholder\n >\n <nui-select-v2-option\n *ngFor=\"let itemValue of dropdownItems.value\"\n [displayValueContext]=\"itemValue.label\"\n [value]=\"itemValue.id\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n ControlContainer,\n FormBuilder,\n FormGroup,\n FormGroupDirective,\n Validators,\n} from \"@angular/forms\";\nimport capitalize from \"lodash/capitalize\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil, tap } from \"rxjs/operators\";\n\nimport { IDataField } from \"@nova-ui/bits\";\n\nimport {\n IFormatter,\n IFormatterConfigurator,\n IFormatterDefinition,\n} from \"../../../../../../../components/types\";\nimport {\n FormatterRegistryService,\n TableFormatterRegistryService,\n} from \"../../../../../../../services/table-formatter-registry.service\";\nimport {\n FORMATTERS_REGISTRY,\n IHasChangeDetector,\n} from \"../../../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../../../services/configurator-heading.service\";\n\n@Component({\n selector: \"nui-table-column-presentation-configuration\",\n templateUrl: \"./presentation-configuration.component.html\",\n styleUrls: [\"./presentation-configuration.component.less\"],\n viewProviders: [\n { provide: ControlContainer, useExisting: FormGroupDirective },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PresentationConfigurationComponent\n implements IHasChangeDetector, OnInit, OnDestroy, OnChanges, AfterViewInit\n{\n static lateLoadKey = \"PresentationConfigurationComponent\";\n\n private _providedFormatters: Array<IFormatterDefinition> = [];\n private _formatters: Array<IFormatterDefinition> = [];\n @Input() formatter: IFormatter;\n\n @Input()\n public set formatters(formatters: Array<IFormatterDefinition>) {\n // Note: As discussed we will ignore the config formatters if\n // the user already provided formatters via registry\n if (!this.tableFormattersRegistryService.isEmpty) {\n return;\n }\n this.handleFormattersUpdate(formatters);\n }\n\n public get formatters() {\n return this._formatters;\n }\n\n @Input() public dataFieldIds: string[];\n\n private _dataFields: Array<IDataField> = [];\n @Input()\n public set dataFields(dataFields: Array<IDataField>) {\n this._dataFields = dataFields;\n this.updateAvailableFormatters();\n }\n\n public get dataFields(): IDataField[] {\n return this._dataFields;\n }\n\n @Output() formReady: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n @Output() formDestroy: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public formatterForm: FormGroup = this.formBuilder.group({});\n\n public formatterConfigurator: string | null;\n public formatterConfiguratorProps: IFormatterConfigurator;\n public readonly formatterFormGroupName = \"formatter\";\n public subtitleText: string;\n private onDestroy$: Subject<void> = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n @Optional()\n @Inject(FORMATTERS_REGISTRY)\n private formattersRegistryCommon: FormatterRegistryService,\n // used as a fallback, remove in vNext\n /**\n * @deprecated will be removed in the scope of NUI-5839\n */\n private tableFormattersRegistryService: TableFormatterRegistryService\n ) {\n this.subscribeToFormattersRegistry();\n }\n\n ngOnInit(): void {\n this.formatterForm = this.formBuilder.group({\n componentType: [\n (this.formatter && this.formatter.componentType) ||\n (this._providedFormatters &&\n this._providedFormatters.length > 0 &&\n this._providedFormatters[0].componentType),\n [Validators.required],\n ],\n });\n this.form = this.formBuilder.group({\n [this.formatterFormGroupName]: this.formatterForm,\n });\n\n this.formatterForm\n .get(\"componentType\")\n ?.valueChanges.pipe(takeUntil(this.onDestroy$))\n .subscribe(() => this.createFormatterConfigurator());\n\n this.createFormatterConfigurator();\n this.formReady.emit(this.form);\n this.formatterForm.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe(() => {\n this.updateSubtitle();\n this.changeDetector.detectChanges();\n });\n }\n\n ngAfterViewInit() {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.dataFieldIds) {\n const { currentValue, previousValue } = changes.dataFieldIds;\n\n if (currentValue && currentValue !== previousValue) {\n const dataFields = currentValue.map(\n (df: string) =>\n ({\n id: df,\n label: capitalize(df),\n } as IDataField)\n );\n\n this.dataFields = dataFields;\n this.updateSubtitle();\n }\n }\n\n if (changes.formatter) {\n this.form?.patchValue(\n {\n [this.formatterFormGroupName]:\n changes.formatter.currentValue,\n },\n { emitEvent: false }\n );\n this.updateSubtitle();\n }\n\n if (\n changes.dataFields &&\n changes.dataFields.previousValue.length === 0 &&\n this.formatterForm\n ) {\n this.updateSubtitle();\n }\n }\n\n public getSelectedFormatterDefinition(): IFormatterDefinition | null {\n if (this._providedFormatters.length > 0) {\n const formatterId = this.formatterForm.get(\"componentType\")?.value;\n return (\n this._providedFormatters.find(\n (formatter) => formatter.componentType === formatterId\n ) ?? null\n );\n }\n return null;\n }\n\n public getSelectedDataField(): IDataField | null {\n const propertiesControl = this.formatterForm.controls[\"properties\"];\n if (\n propertiesControl &&\n this.dataFields &&\n this.dataFields.length > 0\n ) {\n const dataFieldId =\n propertiesControl.get(\"dataFieldIds\")?.value.value;\n return (\n this.dataFields.find(\n (dataField) => dataField.id === dataFieldId\n ) ?? null\n );\n }\n return null;\n }\n\n public onFormReady(form: FormGroup) {\n (this.form.get(this.formatterFormGroupName) as FormGroup).setControl(\n \"properties\",\n form\n );\n }\n\n private updateSubtitle() {\n this.subtitleText = `${this.getSelectedFormatterDefinition()?.label}`;\n if (this.getSelectedDataField()) {\n this.subtitleText = this.subtitleText.concat(\n `, ${this.getSelectedDataField()?.label}`\n );\n }\n }\n\n /**\n * Creates portal for dynamic configuration of formatter value.\n * @returns ComponentPortal\n */\n private createFormatterConfigurator() {\n const formatterDefinition = this._providedFormatters.find(\n (formatter) =>\n formatter.componentType ===\n this.formatterForm.get(\"componentType\")?.value\n );\n\n // if configurationComponent property is present in formatters configuration, use it to render portal,\n // otherwise, use default ValueSelectorComponent\n if (formatterDefinition) {\n this.formatterConfigurator =\n formatterDefinition.configurationComponent ??\n \"ValueSelectorComponent\";\n } else {\n this.formatterConfigurator = null;\n }\n\n // if the currently selected component doesn't match the original value from the input then we reset the form values\n if (\n formatterDefinition?.componentType !==\n this.formatter?.componentType &&\n this.formatter?.properties?.dataFieldIds\n ) {\n this.formatter.properties.dataFieldIds = { value: null };\n }\n\n this.formatterConfiguratorProps = {\n dataFields: this.dataFields,\n formatter: this.formatter,\n // TODO: Ensure that formatterDefinition is not undefined\n formatterDefinition: formatterDefinition as IFormatterDefinition,\n };\n }\n\n private updateAvailableFormatters() {\n if (!this._dataFields.length || !this._providedFormatters.length) {\n return;\n }\n\n // allow by default RawFormatter which has null as dataType\n const sourceDataTypes: Record<string, boolean> = { null: true };\n this._dataFields.forEach((f) => (sourceDataTypes[f.dataType] = true));\n this._formatters = this._providedFormatters.filter((f) => {\n // cast to array in case we have a single value\n const formatterDataTypes =\n f.dataTypes.value instanceof Array\n ? f.dataTypes.value\n : [f.dataTypes.value];\n\n return formatterDataTypes.some((v) => sourceDataTypes[v]);\n });\n if (this.formatterForm) {\n this.createFormatterConfigurator();\n }\n }\n\n private subscribeToFormattersRegistry(): void {\n this.handleFormattersUpdate(this.formattersRegistry.getItems());\n\n this.formattersRegistry.stateChanged$\n .pipe(\n tap(this.handleFormattersUpdate.bind(this)),\n takeUntil(this.onDestroy$)\n )\n .subscribe();\n }\n\n private handleFormattersUpdate(formatters: IFormatterDefinition[]): void {\n if (formatters !== this._providedFormatters) {\n this._providedFormatters = formatters;\n this.updateAvailableFormatters();\n }\n }\n\n /**\n * Fallback for table,\n *\n * nothing should go wrong, but in case \"FORMATTERS_REGISTRY\" is lost, get table registry\n */\n private get formattersRegistry() {\n return (\n this.formattersRegistryCommon || this.tableFormattersRegistryService\n );\n }\n\n ngOnDestroy(): void {\n this.formDestroy.emit(this.form);\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n}\n","<ng-container [formGroup]=\"formatterForm\">\n <nui-widget-editor-accordion\n [state]=\"form | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"form | nuiFormHeaderIconPipe: 'customize' | async\"\n ></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\n caption=\"Format\"\n i18n-caption\n [control]=\"formatterForm.controls['componentType']\"\n >\n <nui-select-v2\n placeholder=\"Select Format\"\n i18n-placeholder\n [popupViewportMargin]=\"\n configuratorHeading.height$ | async\n \"\n formControlName=\"componentType\"\n >\n <nui-select-v2-option\n *ngFor=\"let formatter of formatters\"\n [displayValueContext]=\"formatter.label\"\n [value]=\"formatter.componentType\"\n >\n {{ formatter.label }}\n </nui-select-v2-option>\n </nui-select-v2>\n </nui-form-field>\n </div>\n <ng-container\n *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 >\n <ng-template\n [cdkPortalOutlet]=\"componentPortal.portal\"\n (attached)=\"componentPortal.attached($event)\"\n ></ng-template>\n </ng-container>\n </div>\n </nui-widget-editor-accordion>\n</ng-container>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport {\n AbstractControl,\n FormArray,\n FormBuilder,\n FormGroup,\n} from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport isUndefined from \"lodash/isUndefined\";\nimport values from \"lodash/values\";\nimport { Observable, Subject } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport {\n DialogService,\n EventBus,\n IDataField,\n IDataSource,\n IEvent,\n immutableSet,\n uuid,\n} from \"@nova-ui/bits\";\n\nimport { IDataSourceOutput } from \"../../../../../components/providers/types\";\nimport { ITableWidgetColumnConfig } from \"../../../../../components/table-widget/types\";\nimport { IFormatterDefinition } from \"../../../../../components/types\";\nimport { IPizzagnaProperty } from \"../../../../../pizzagna/functions/get-pizzagna-property-path\";\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport {\n ISetPropertyPayload,\n SET_PROPERTY_VALUE,\n} from \"../../../../../services/types\";\nimport {\n IHasForm,\n IPizzagna,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n WellKnownDataSourceFeatures,\n} from \"../../../../../types\";\nimport { DATA_SOURCE_CREATED, DATA_SOURCE_OUTPUT } from \"../../../../types\";\n\n@Component({\n selector: \"nui-table-columns-configuration\",\n templateUrl: \"./table-columns-configuration.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableColumnsConfigurationComponent\n implements OnInit, IHasForm, OnChanges, OnDestroy\n{\n static lateLoadKey = \"TableColumnsConfigurationComponent\";\n\n @Input() columns: ITableWidgetColumnConfig[] = [];\n @Input() formatters: Array<IFormatterDefinition> = [];\n @Input() componentId: string;\n @Input() dataFields: Array<IDataField> = [];\n @Input() nodes: string[];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public emptyColumns$: Observable<boolean>;\n\n // the last selected data source will be stored here\n public dataSource: IDataSource;\n\n private onDestroy$: Subject<void> = new Subject<void>();\n\n // hackfix for NUI-5712\n // Depending on the timing of pizzagna changes, the incoming value for dataFields may be undefined.\n // This property ensures that we are only acting on valid values for the data fields.\n private lastValidDataFields: IDataField[] = [];\n\n constructor(\n private formBuilder: FormBuilder,\n private changeDetector: ChangeDetectorRef,\n private dialogService: DialogService,\n private pizzagnaService: PizzagnaService,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {\n this.eventBus.subscribeUntil(\n DATA_SOURCE_CREATED,\n this.onDestroy$,\n (event: IEvent<IDataSource>) => {\n if (!event.payload) {\n return;\n }\n\n this.dataSource = event.payload;\n }\n );\n\n this.eventBus.subscribeUntil(\n DATA_SOURCE_OUTPUT,\n this.onDestroy$,\n (event: IEvent<any | IDataSourceOutput<any>>) => {\n // Because typing is lenient for the data source output, the event may or may not contain an IDataSourceOutput\n // with a result property; the payload may actually be the result itself, so both possibilities are accommodated.\n const { dataFields } = isUndefined(event.payload.result)\n ? event.payload\n : event.payload.result || {};\n\n if (dataFields) {\n let formPizzagna: IPizzagna = this.pizzagnaService.pizzagna;\n formPizzagna = immutableSet(\n formPizzagna,\n `${PizzagnaLayer.Data}.columns.properties.dataFields`,\n dataFields\n );\n\n const columnsTemplate =\n this.pizzagnaService.pizzagna[PizzagnaLayer.Structure]\n .columns.properties?.template;\n const presentationIndex = columnsTemplate.findIndex(\n (val: { id: string }) => val.id === \"presentation\"\n );\n const presentationPizzagnaPath: string = `${PizzagnaLayer.Structure}.columns.properties.template[${presentationIndex}].properties.dataFields`;\n formPizzagna = immutableSet(\n formPizzagna,\n presentationPizzagnaPath,\n dataFields\n );\n\n const columns = get(\n this.pizzagnaService.pizzagna,\n `${PizzagnaLayer.Data}.columns.properties.columns`\n ) as any;\n const columnIds = columns.map(\n (c: ITableWidgetColumnConfig) => c.id\n );\n formPizzagna = columnIds.reduce(\n (res: IPizzagna, id: string) =>\n immutableSet(\n res,\n `${PizzagnaLayer.Data}.${id}/presentation.properties.dataFields`,\n dataFields\n ),\n formPizzagna\n );\n\n this.pizzagnaService.updatePizzagna(formPizzagna);\n\n this.eventBus.getStream(SET_PROPERTY_VALUE).next({\n payload: {\n path: \"\",\n value: formPizzagna,\n } as ISetPropertyPayload,\n });\n }\n }\n );\n }\n\n public ngOnInit() {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.dataFields && changes.dataFields.currentValue) {\n // hackfix for NUI-5712\n this.lastValidDataFields = changes.dataFields.currentValue;\n\n const disableColumnGeneration =\n this.dataSource?.features?.getFeatureConfig(\n WellKnownDataSourceFeatures.DisableTableColumnGeneration\n )?.enabled;\n\n const columns = this.mergeColumns(\n changes.dataFields.currentValue,\n this.columns\n );\n if (columns?.length || disableColumnGeneration) {\n // if disableColumnGeneration is enabled and there are no columns to be kept,\n // we have to clear the form by updating the column input via the `onItemsChange` method\n this.onItemsChange(columns);\n } else {\n if (!disableColumnGeneration) {\n this.resetColumns(false);\n }\n }\n // column components are not updated properly without this one\n setTimeout(() => this.changeDetector.markForCheck());\n }\n\n if (changes.columns) {\n const components = this.columns.map((c) => ({\n id: c.id,\n children: {\n [`${c.id}/description`]: {\n ...c,\n },\n [`${c.id}/presentation`]: {\n ...c,\n },\n },\n }));\n\n this.pizzagnaService.createComponentsFromTemplateWithProperties(\n \"columns\",\n components\n );\n\n // wait for column components to be created from template\n setTimeout(() => {\n // triggering the form update to update the preview - without this it was not updating the last added column as form field changes through\n // pizzagna don't generate valueChange events\n this.form\n .get(\"columns\")\n ?.setValue([...(this.form.get(\"columns\")?.value ?? [])]);\n });\n }\n }\n\n public onFormReady(form: AbstractControl) {\n this.form = this.formBuilder.group({\n columns: form as FormArray,\n // this form field serves as a source of truth for anybody interesting in reading/modifying the columns value\n // originally the values were mapped from the form directly to the preview without having a place where all the data would be consolidated\n // together in the form. Converters subscribe to this form field to listen for column changes. The value is transformed in this method down below.\n columnsOutput: {},\n });\n this.emptyColumns$ = this.form.valueChanges.pipe(\n map((result) => result.columns.length === 0)\n );\n this.formReady.emit(this.form);\n\n // we listen for changes of the `columns` and transform it into ITableWidgetColumnConfig[]\n this.form.get(\"columns\")?.valueChanges.subscribe((value) => {\n const newColumns = value.map(\n (c: any /* form representing one column */) => {\n let result: ITableWidgetColumnConfig = {\n id: c.id,\n } as any;\n for (const key of Object.keys(c.properties)) {\n result = {\n ...result,\n ...c.properties[\n key\n ] /* merge properties from each child form */,\n };\n }\n result.sortable = this.lastValidDataFields?.find(\n (df) =>\n df.id ===\n result.formatter?.properties?.dataFieldIds?.value\n )?.sortable;\n return result;\n }\n );\n\n this.form.get(\"columnsOutput\")?.setValue(newColumns);\n });\n }\n\n public onItemsChange(columns: ITableWidgetColumnConfig[]) {\n const parentPath = \"columns\";\n const componentIds = columns.map((tile) => tile.id);\n this.pizzagnaService.createComponentsFromTemplate(\n parentPath,\n componentIds\n );\n\n const property: IPizzagnaProperty = {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"columns\"],\n };\n this.pizzagnaService.setProperty(property, columns);\n }\n\n public addColumn() {\n // @ts-ignore: Types of property 'formatter' are incompatible.\n this.onItemsChange([\n ...this.columns,\n {\n id: uuid(\"column\"),\n label: \"\",\n formatter: undefined,\n },\n ]);\n }\n\n public onResetColumns() {\n this.resetColumns(!!this.columns?.length);\n }\n\n public resetColumns(confirmation: boolean) {\n const reset = () => {\n const columns: ITableWidgetColumnConfig[] =\n this.lastValidDataFields.map((df) => ({\n id: uuid(\"column\"),\n formatter: {\n componentType: \"RawFormatterComponent\",\n properties: {\n dataFieldIds: {\n value: df.id,\n },\n },\n },\n isActive: true,\n label: df.label,\n width: undefined,\n sortable: df.sortable,\n }));\n\n this.onItemsChange(columns);\n };\n\n if (confirmation) {\n const dialog = this.dialogService.confirm({\n title: $localize`Are you sure?`,\n message: $localize`Resetting the columns will revert them to their default configurations. Do you wish to proceed?`,\n confirmText: $localize`Reset Columns`,\n });\n\n dialog.result.then(\n (result) => {\n if (result) {\n reset();\n }\n },\n () => {\n // this being here prevents a \"unhandled rejection\" console error from showing up\n }\n );\n } else {\n reset();\n }\n }\n\n /**\n * Merges current column definitions with new incoming data fields\n *\n * @param currentDatafields\n * @param columns\n */\n private mergeColumns(\n currentDatafields: IDataField[],\n columns: ITableWidgetColumnConfig[]\n ): ITableWidgetColumnConfig[] {\n const currentDatafieldIds = currentDatafields.map(\n (datafield) => datafield.id\n );\n return columns.filter((column) => {\n if (!column.formatter?.properties?.dataFieldIds) {\n return false;\n }\n return values(column.formatter?.properties?.dataFieldIds).some(\n (datafield: string) => currentDatafieldIds.includes(datafield)\n );\n });\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n}\n","<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\n 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\n>\n Add new column\n</button>\n\n<button\n 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\n>\n Reset columns\n</button>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup } from \"@angular/forms\";\nimport get from \"lodash/get\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport {\n ITableWidgetColumnConfig,\n ITableWidgetConfig,\n ITableWidgetSorterConfig,\n} from \"../../../../../components/table-widget/types\";\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\n\n@Component({\n selector: \"nui-table-filters-editor-component\",\n templateUrl: \"table-filters-editor.component.html\",\n styleUrls: [\"table-filters-editor.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableFiltersEditorComponent\n implements OnInit, OnChanges, OnDestroy, IHasForm, IHasChangeDetector\n{\n static lateLoadKey = \"TableFiltersEditorComponent\";\n\n @Input() sorterConfiguration: ITableWidgetSorterConfig;\n @Input() columns: Array<ITableWidgetColumnConfig> = [];\n\n @Output() formReady = new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n public selectedSortByValue: string;\n public selectedSortOrderValue: string;\n public sortableColumns: Array<ITableWidgetColumnConfig> = [];\n\n private onDestroy$ = new Subject<void>();\n\n constructor(\n private formBuilder: FormBuilder,\n public configuratorHeading: ConfiguratorHeadingService,\n public changeDetector: ChangeDetectorRef\n ) {}\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n sorterConfiguration: this.formBuilder.group({\n sortBy: get(this.sorterConfiguration, \"sortBy\", \"\"),\n descendantSorting: get(\n this.sorterConfiguration,\n \"descendantSorting\",\n false\n ),\n }),\n });\n\n this.form.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((val) => {\n this.setAccordionSubtitleValues(val);\n });\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const sortByFormControl = this.form\n .get(\"sorterConfiguration\")\n ?.get(\"sortBy\");\n const descendantSortingFormControl = this.form\n .get(\"sorterConfiguration\")\n ?.get(\"descendantSorting\");\n if (changes.sorterConfiguration) {\n const sortedColumn = this.sortableColumns.find(\n (column) => column.id === this.sorterConfiguration?.sortBy\n );\n sortByFormControl?.setValue(sortedColumn?.id, { emitEvent: false });\n descendantSortingFormControl?.setValue(\n this.sorterConfiguration?.descendantSorting,\n { emitEvent: false }\n );\n }\n if (changes.columns) {\n this.sortableColumns = this.columns.filter(\n (column: ITableWidgetColumnConfig) =>\n !!column.formatter && (column.sortable ?? true)\n );\n const sortedColumn = this.sortableColumns.find(\n (column) => column.id === this.sorterConfiguration?.sortBy\n );\n\n sortByFormControl?.setValue(sortedColumn?.id, { emitEvent: false });\n descendantSortingFormControl?.setValue(\n this.sorterConfiguration?.descendantSorting,\n { emitEvent: false }\n );\n\n if (this.sortableColumns.length === 0) {\n sortByFormControl?.disable();\n descendantSortingFormControl?.disable();\n } else {\n sortByFormControl?.enable();\n descendantSortingFormControl?.enable();\n }\n }\n this.changeDetector.detectChanges();\n }\n\n private setAccordionSubtitleValues(val: ITableWidgetConfig) {\n if (val.sorterConfiguration) {\n const sortedColumn = this.columns?.find(\n (col) => col.id === val.sorterConfiguration.sortBy\n );\n if (!sortedColumn) {\n this.selectedSortByValue = $localize`No sorting`;\n this.selectedSortOrderValue = \"\";\n this.form\n .get(\"sorterConfiguration\")\n ?.patchValue(\n { sortBy: \"\", descendantSorting: \"\" },\n { emitEvent: false }\n );\n return;\n }\n const sortOrder = val.sorterConfiguration.descendantSorting\n ? $localize`Descending`\n : $localize`Ascending`;\n this.selectedSortByValue = sortedColumn.label;\n this.selectedSortOrderValue = \", \" + sortOrder;\n\n this.changeDetector.detectChanges();\n }\n }\n\n ngOnDestroy() {\n this.onDestroy$.next();\n this.onDestroy$.complete();\n }\n}\n","<nui-widget-editor-accordion [formGroup]=\"form\">\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n icon=\"widget_pie-chart\"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt-1\">\n <span class=\"nui-text-label\" i18n>Sorting</span>\n <div\n class=\"nui-text-secondary\"\n [title]=\"selectedSortByValue + selectedSortOrderValue\"\n >\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\n caption=\"Sort by\"\n i18n-caption\n [control]=\"form.controls['sortBy']\"\n class=\"w-50\"\n >\n <nui-select-v2\n placeholder=\"Select column\"\n i18n-placeholder\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n formControlName=\"sortBy\"\n class=\"table-filters-configuration__accordion-content__sort-by-input\"\n >\n <nui-select-v2-option\n *ngFor=\"let column of sortableColumns\"\n [value]=\"column.id\"\n >\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\n *ngIf=\"!sortableColumns.length\"\n type=\"info\"\n [allowDismiss]=\"false\"\n i18n\n >\n <b>No columns are sortable.</b>\n </nui-message>\n </div>\n</nui-widget-editor-accordion>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { AbstractControl, FormGroup } from \"@angular/forms\";\nimport { Observable, Subject } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { EventBus, IEvent, uuid } from \"@nova-ui/bits\";\n\nimport { ITimeseriesWidgetData } from \"../../../../../components/timeseries-widget/types\";\nimport { IPizzagnaProperty } from \"../../../../../pizzagna/functions/get-pizzagna-property-path\";\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport {\n IHasChangeDetector,\n IHasForm,\n PizzagnaLayer,\n PIZZAGNA_EVENT_BUS,\n} from \"../../../../../types\";\nimport { ITimeseriesItemConfiguration } from \"../types\";\n\n@Component({\n selector: \"nui-timeseries-series-collection-configuration\",\n templateUrl: \"timeseries-series-collection-configuration.component.html\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimeseriesSeriesCollectionConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnDestroy, OnChanges\n{\n static lateLoadKey = \"TimeseriesSeriesCollectionConfigurationComponent\";\n\n @Input() nodes: string[];\n @Input() componentId: string;\n @Input() series: ITimeseriesItemConfiguration[] = [];\n @Input() availableSeries: ITimeseriesWidgetData[];\n @Input() allSeries: ITimeseriesWidgetData[];\n\n @Output() formReady = new EventEmitter();\n\n public form: FormGroup;\n public emptySeries$: Observable<boolean>;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public pizzagnaService: PizzagnaService,\n public changeDetector: ChangeDetectorRef,\n @Inject(PIZZAGNA_EVENT_BUS) private eventBus: EventBus<IEvent>\n ) {}\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.allSeries && !changes.allSeries.isFirstChange()) {\n // if we receive 'allSeries' data from the data source after component initialization, we\n // re-create the series config components to make them aware of this change\n this.createSeriesConfigComponents(this.series);\n setTimeout(() => this.changeDetector.markForCheck());\n }\n }\n\n public onFormReady(form: AbstractControl) {\n this.form = form as FormGroup;\n this.formReady.emit(form);\n this.emptySeries$ = this.form.valueChanges.pipe(\n map((result) => result.length === 0)\n );\n }\n\n public onItemsChange(series: ITimeseriesItemConfiguration[]) {\n this.createSeriesConfigComponents(series);\n\n const property: IPizzagnaProperty = {\n componentId: this.componentId,\n pizzagnaKey: PizzagnaLayer.Data,\n propertyPath: [\"series\"],\n };\n this.pizzagnaService.setProperty(property, series);\n }\n\n public isPossibleToAddSeries() {\n const total = this.allSeries && this.allSeries.length;\n const present = this.series && this.series.length;\n\n return total > present;\n }\n\n public addSeries() {\n this.onItemsChange([\n // @ts-ignore: Types of property 'selectedSeriesId' are incompatible.\n ...this.series,\n {\n id: uuid(\"series\"),\n // TODO: Provide selectedSeriesId value that corresponds to it's type which is string\n // @ts-ignore: Types of property 'selectedSeriesId' are incompatible.\n selectedSeriesId: null,\n },\n ]);\n }\n\n private createSeriesConfigComponents(\n series: ITimeseriesItemConfiguration[]\n ) {\n const parentPath = \"series\";\n const componentIds = series.map((tile) => tile.id);\n this.pizzagnaService.createComponentsFromTemplate(\n parentPath,\n componentIds\n );\n }\n}\n","<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\n 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\n>\n Add new series\n</button>\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { IHasChangeDetector, IHasForm } from \"../../../../../types\";\n\n@Component({\n selector: \"nui-table-column-description-configuration\",\n templateUrl: \"./timeseries-tile-description-configuration.component.html\",\n styleUrls: [\"./timeseries-tile-description-configuration.component.less\"],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimeseriesTileDescriptionConfigurationComponent\n implements OnInit, OnDestroy, OnChanges, IHasChangeDetector, IHasForm\n{\n static lateLoadKey = \"TimeseriesTileDescriptionConfigurationComponent\";\n\n @Input() label: string;\n\n @Output() formReady: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n @Output() formDestroy: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n\n public form: FormGroup;\n\n constructor(\n private formBuilder: FormBuilder,\n public changeDetector: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.form = this.formBuilder.group({\n label: [this.label, Validators.required],\n });\n\n this.formReady.emit(this.form);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.label) {\n const value = changes.label.currentValue;\n if (value) {\n this.form.patchValue({ label: value });\n }\n }\n }\n\n ngOnDestroy(): void {\n this.formDestroy.emit(this.form);\n }\n}\n","<ng-container [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form.get('label') | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"\n form.get('label') | nuiFormHeaderIconPipe: 'edit' | async\n \"\n [iconColor]=\"\n form.get('label') | nuiFormHeaderIconPipe: 'gray':'' | async\n \"\n ></nui-icon>\n <div class=\"d-flex flex-column ml-4 pt-1\">\n <span class=\"nui-text-label\" i18n>Description</span>\n <div\n class=\"nui-text-secondary\"\n [title]=\"form.get('label')?.value\"\n >\n {{ form.get(\"label\")?.value }}\n </div>\n </div>\n </div>\n <div\n class=\"timeseries-tile-description-configuration__accordion-content\"\n >\n <nui-form-field\n caption=\"Label\"\n i18n-caption\n [control]=\"form.get('label')\"\n >\n <nui-textbox\n formControlName=\"label\"\n placeholder=\"Set label\"\n i18n-placeholder\n ></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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\n\nimport { ITimeseriesWidgetData } from \"../../../../../components/timeseries-widget/types\";\nimport { PizzagnaService } from \"../../../../../pizzagna/services/pizzagna.service\";\nimport {\n IHasChangeDetector,\n IHasForm,\n PizzagnaLayer,\n} from \"../../../../../types\";\nimport { ConfiguratorHeadingService } from \"../../../../services/configurator-heading.service\";\n\n@Component({\n selector: \"nui-timeseries-tile-indicator-data-configuration\",\n templateUrl:\n \"./timeseries-tile-indicator-data-configuration.component.html\",\n styleUrls: [\n \"./timeseries-tile-indicator-data-configuration.component.less\",\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TimeseriesTileIndicatorDataConfigurationComponent\n implements IHasChangeDetector, IHasForm, OnInit, OnDestroy, OnChanges\n{\n static lateLoadKey = \"TimeseriesTileIndicatorDataConfigurationComponent\";\n\n @Input() componentId: string;\n @Input() selectedSeriesId: string;\n @Input() allSeries: ITimeseriesWidgetData[];\n @Input() availableSeries: ITimeseriesWidgetData[];\n\n @Output() formReady: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n @Output() formDestroy: EventEmitter<FormGroup> =\n new EventEmitter<FormGroup>();\n\n public set selectedSeries(value: ITimeseriesWidgetData | undefined) {\n this._selectedSeries = value;\n if (value) {\n this.form.patchValue({ id: value.id });\n }\n }\n\n public get selectedSeries(): ITimeseriesWidgetData | undefined {\n return this._selectedSeries;\n }\n\n public form: FormGroup;\n\n private destroy$ = new Subject<void>();\n private _selectedSeries?: ITimeseriesWidgetData;\n\n constructor(\n public changeDetector: ChangeDetectorRef,\n public configuratorHeading: ConfiguratorHeadingService,\n private formBuilder: FormBuilder,\n private pizzagnaService: PizzagnaService\n ) {}\n\n public ngOnInit() {\n this.form = this.formBuilder.group({\n id: [this.selectedSeriesId || null, [Validators.required]],\n });\n\n this.formReady.emit(this.form);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (changes.allSeries) {\n this.selectedSeries = this.allSeries.find(\n (s) => this.selectedSeriesId === s.id\n );\n }\n\n if (changes.selectedSeriesId) {\n if (!this.allSeries) {\n return;\n }\n this.selectedSeries = this.allSeries.find(\n (s) => this.selectedSeriesId === s.id\n );\n }\n }\n\n public onSelect(selectedSeries: ITimeseriesWidgetData) {\n this.selectedSeriesId = selectedSeries.id;\n this.selectedSeries = selectedSeries;\n this.form.patchValue({ id: selectedSeries.id });\n setTimeout(() => {\n this.pizzagnaService.setProperty(\n `${PizzagnaLayer.Data}.${this.componentId}.properties.selectedSeriesId`,\n selectedSeries.id\n );\n this.changeDetector.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.formDestroy.emit(this.form);\n\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<ng-container [formGroup]=\"form\">\n <nui-widget-editor-accordion\n [state]=\"form.get('id') | nuiWidgetEditorAccordionFormState | async\"\n >\n <div accordionHeader class=\"d-flex align-items-center px-4 py-2\">\n <nui-icon\n class=\"align-self-start pt-2\"\n [icon]=\"\n form.get('id') | nuiFormHeaderIconPipe: 'database' | async\n \"\n ></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\n class=\"nui-text-secondary\"\n [title]=\"selectedSeries?.description\"\n >\n {{ selectedSeries?.description }}\n </div>\n </div>\n </div>\n <div class=\"timeseries-tile-data-configuration__accordion-content\">\n <nui-form-field\n caption=\"Series data\"\n i18n-caption\n [control]=\"form.get('id')\"\n >\n <nui-select-v2\n placeholder=\"Series data\"\n i18n-placeholder\n [value]=\"selectedSeries\"\n [popupViewportMargin]=\"configuratorHeading.height$ | async\"\n (valueSelected)=\"onSelect($event)\"\n >\n <nui-select-v2-option\n *ngFor=\"\n let series of availableSeries\n | nuiAddData: selectedSeries\n \"\n [value]=\"series\"\n >\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","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n Injectable,\n Injector,\n Optional,\n Renderer2,\n RendererFactory2,\n} from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport isFunction from \"lodash/isFunction\";\nimport { EMPTY, Observable, of, Subject } from \"rxjs\";\nimport { catchError, filter, switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { LoggerService, uuid } from \"@nova-ui/bits\";\n\nimport { DashboardComponent } from \"../../components/dashboard/dashboard.component\";\nimport { IWidget } from \"../../components/widget/types\";\nimport { WidgetUpdateOperation } from \"../../configurator/services/types\";\nimport { WidgetTypesService } from \"../../services/widget-types.service\";\nimport { ConfiguratorComponent } from \"../components/configurator/configurator.component\";\nimport { IConfigurator, IConfiguratorSource } from \"./types\";\n\n@Injectable()\nexport class ConfiguratorService {\n private renderer: Renderer2;\n private componentRef: ComponentRef<ConfiguratorComponent>;\n private close$: Subject<void> = new Subject<void>();\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private widgetTypesService: WidgetTypesService,\n private injector: Injector,\n private appRef: ApplicationRef,\n private logger: LoggerService,\n rendererFactory: RendererFactory2,\n @Optional() private router: Router\n ) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n public open(configurator: IConfigurator): Observable<void> {\n const source: IConfiguratorSource = {\n dashboardComponent: configurator.dashboardComponent,\n widget: cloneDeep(configurator.widget),\n };\n\n this.componentRef = this.appendComponentToBody();\n const component: ConfiguratorComponent = this.componentRef.instance;\n\n // TODO: Handle the case when portalBundle is undefined\n // @ts-ignore\n component.formPortal = configurator.portalBundle.portal;\n // TODO: Handle the case when widget is undefined\n // @ts-ignore\n component.previewWidget = cloneDeep(configurator.widget);\n if (configurator.portalBundle?.attached) {\n component.formPortalAttached\n .pipe(takeUntil(this.close$))\n .subscribe(configurator.portalBundle.attached);\n }\n\n component.changeDetector.detectChanges();\n\n return (\n component.result\n .asObservable()\n // TODO: Handle the case when trySubmit is undefined\n // @ts-ignore\n .pipe(this.handleSubmit(source, configurator.trySubmit))\n );\n }\n\n public close(): void {\n if (!this.renderer) {\n return;\n }\n\n this.close$.next();\n this.renderer.removeChild(\n document.body,\n (this.componentRef.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement\n );\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n\n this.renderer.removeStyle(document.body, \"overflow\");\n }\n\n public handleSubmit =\n (confSource: IConfiguratorSource, trySubmit: WidgetUpdateOperation) =>\n (source: Observable<IWidget>) =>\n source.pipe(\n this.trySubmit(trySubmit, confSource),\n this.updateDashboard(confSource.dashboardComponent)\n );\n\n private trySubmit =\n (trySubmit: WidgetUpdateOperation, confSource: IConfigurator) =>\n (source: Observable<IWidget>) =>\n source.pipe(\n switchMap((widget: IWidget) => {\n if (widget && isFunction(trySubmit)) {\n return trySubmit(widget, confSource).pipe(\n catchError((err: any) => {\n this.logger.error(err);\n this.componentRef.instance.handleSubmitError();\n return EMPTY;\n })\n );\n } else {\n return of(widget);\n }\n })\n );\n\n private updateDashboard =\n (dashboardComponent: DashboardComponent) =>\n (source: Observable<IWidget>) =>\n new Observable<void>((observer) =>\n source.subscribe((widget: IWidget) => {\n if (widget) {\n widget.id = widget.id || uuid();\n\n let widgetToSet: IWidget;\n const dashboardWidget =\n dashboardComponent.dashboard.widgets[widget.id];\n if (dashboardWidget) {\n widgetToSet = {\n ...widget,\n pizzagna: {\n ...this.widgetTypesService.getWidgetType(\n widget.type,\n widget.version\n ).widget,\n configuration:\n widget.pizzagna.configuration,\n },\n };\n } else {\n widgetToSet = widget;\n }\n\n // first we remove the widget so that we can recreate it from scratch\n dashboardComponent.removeWidget(\n widgetToSet.id,\n false /* this is set to preserve the widget location */\n );\n\n // then we wait for the removal to take effect and we create the widget again\n setTimeout(() => {\n dashboardComponent.updateWidget(widgetToSet);\n });\n }\n\n this.close();\n observer.next();\n })\n );\n\n private appendComponentToBody(): ComponentRef<ConfiguratorComponent> {\n const factory = this.componentFactoryResolver.resolveComponentFactory(\n ConfiguratorComponent\n );\n const componentRef: ComponentRef<ConfiguratorComponent> =\n factory.create(this.injector);\n\n this.appRef.attachView(componentRef.hostView);\n this.renderer.appendChild(\n document.body,\n (componentRef.hostView as EmbeddedViewRef<any>)\n .rootNodes[0] as HTMLElement\n );\n this.renderer.setStyle(document.body, \"overflow\", \"hidden\");\n if (this.router) {\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n takeUntil(this.close$)\n )\n .subscribe(() => this.close());\n }\n return componentRef;\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\n\nimport { SequentialColorProvider, TextColorProvider } from \"@nova-ui/charts\";\n\n@Injectable()\nexport class KpiWidgetColorService {\n /**\n *\n * @param color Background color\n * @return Calculated text color based on background color\n */\n public static getTextColor(color: string) {\n const colorProvider = new TextColorProvider(\n new SequentialColorProvider([color]),\n {\n light: \"white\",\n dark: \"black\",\n }\n );\n return colorProvider.get(color);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ComponentRef, Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { ComponentPortalService } from \"../../pizzagna/services/component-portal.service\";\nimport { WidgetClonerComponent } from \"../components/widget-cloner/widget-cloner.component\";\nimport { ConfiguratorService } from \"./configurator.service\";\nimport { IComponentPortalBundle, IWidgetSelector } from \"./types\";\n\n@Injectable()\nexport class WidgetClonerService {\n constructor(\n private configuratorService: ConfiguratorService,\n private componentPortalService: ComponentPortalService\n ) {}\n\n public open(cloner: IWidgetSelector): Observable<void> {\n if (!cloner.portalBundle) {\n const formPortal: IComponentPortalBundle<WidgetClonerComponent> = {\n portal: this.componentPortalService.createComponentPortal(\n WidgetClonerComponent,\n null\n ),\n attached: (\n componentRef: ComponentRef<WidgetClonerComponent>\n ) => {\n componentRef.instance.cloneSelectionComponentType =\n cloner.widgetSelectionComponentType;\n },\n };\n\n cloner.portalBundle = formPortal;\n }\n\n return this.configuratorService.open(cloner);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport { Observable } from \"rxjs\";\n\nimport { IWidget } from \"../../components/widget/types\";\nimport { ComponentPortalService } from \"../../pizzagna/services/component-portal.service\";\nimport { PizzagnaLayer } from \"../../types\";\nimport { WidgetEditorComponent } from \"../components/widget-editor/widget-editor.component\";\nimport { ConfiguratorService } from \"./configurator.service\";\nimport { IComponentPortalBundle, IWidgetEditor } from \"./types\";\n\n@Injectable()\nexport class WidgetEditorService {\n constructor(\n private configuratorService: ConfiguratorService,\n private componentPortalService: ComponentPortalService\n ) {}\n\n public open(widgetEditor: IWidgetEditor): Observable<void> {\n if (!widgetEditor.portalBundle) {\n const formPortal: IComponentPortalBundle<WidgetEditorComponent> = {\n portal: this.componentPortalService.createComponentPortal(\n WidgetEditorComponent,\n null\n ),\n attached: (componentRef) => {\n const editorComponent = componentRef.instance;\n editorComponent.formPizzagna = widgetEditor.formPizzagna;\n editorComponent.formRoot = widgetEditor.paths?.root;\n editorComponent.changeDetector.markForCheck();\n },\n };\n\n widgetEditor.portalBundle = formPortal;\n }\n\n // TODO: Handle the case when widget is undefined\n // @ts-ignore\n const widgetClone: IWidget = cloneDeep(widgetEditor.widget);\n // wipe the data layer of the preview\n delete widgetClone.pizzagna[PizzagnaLayer.Data];\n widgetEditor.widget = widgetClone;\n\n return this.configuratorService.open(widgetEditor);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi/kpi-tiles-converter.service\";\nexport * from \"./timeseries/timeseries-series-converter.service\";\nexport * from \"./shared/title-and-description-converter/title-and-description-converter.service\";\nexport * from \"./types\";\nexport * from \"./proportional/proportional-widget-chart-options-converter.service\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi-widget-color.service\";\nexport * from \"./configurator.service\";\nexport * from \"./timeframe-serialization.service\";\nexport * from \"./widget-cloner.service\";\nexport * from \"./widget-editor.service\";\nexport * from \"./types\";\nexport * from \"./converters/public-api\";\nexport * from \"./preview.service\";\nexport * from \"./configurator-heading.service\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { DragDropModule } from \"@angular/cdk/drag-drop\";\nimport { PortalModule } from \"@angular/cdk/portal\";\nimport { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { NgModule } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { GridsterModule } from \"angular-gridster2\";\n\nimport {\n NuiBusyModule,\n NuiButtonModule,\n NuiCheckboxModule,\n NuiDialogModule,\n NuiDividerModule,\n NuiExpanderModule,\n NuiFormFieldModule,\n NuiIconModule,\n NuiImageModule,\n NuiMenuModule,\n NuiMessageModule,\n NuiOverlayAdditionsModule,\n NuiPanelModule,\n NuiPopupModule,\n NuiRadioModule,\n NuiRepeatModule,\n NuiSearchModule,\n NuiSelectV2Module,\n NuiSorterModule,\n NuiSpinnerModule,\n NuiSwitchModule,\n NuiTextboxModule,\n NuiValidationMessageModule,\n NuiWizardModule,\n} from \"@nova-ui/bits\";\n\nimport { NuiDashboardsCommonModule } from \"../common/common.module\";\nimport { TimeseriesChartPresetService } from \"../components/timeseries-widget/timeseries-chart-preset.service\";\nimport { TimeseriesScalesService } from \"../components/timeseries-widget/timeseries-scales.service\";\nimport { NuiPizzagnaModule } from \"../pizzagna/pizzagna.module\";\nimport {\n ComponentRegistryService,\n IComponentWithLateLoadKey,\n} from \"../pizzagna/services/component-registry.service\";\nimport { ColorPickerComponent } from \"./components/color-picker/color-picker.component\";\nimport { ConfiguratorComponent } from \"./components/configurator/configurator.component\";\nimport { DropAreaComponent } from \"./components/drop-area/drop-area.component\";\nimport { FormStackComponent } from \"./components/form-stack/form-stack.component\";\nimport { DonutContentPercentageConfigurationComponent } from \"./components/formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component\";\nimport { DonutContentPercentageFormatterComponent } from \"./components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component\";\nimport { DonutContentRawFormatterComponent } from \"./components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component\";\nimport { DonutContentSumFormatterComponent } from \"./components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component\";\nimport { IconFormatterComponent } from \"./components/formatters/icon-formatter/icon-formatter.component\";\nimport { LinkFormatterComponent } from \"./components/formatters/link-formatter/link-formatter.component\";\nimport { PercentageFormatterComponent } from \"./components/formatters/percentage-formatter/percentage-formatter.component\";\nimport { RawFormatterComponent } from \"./components/formatters/raw-formatter/raw-formatter.component\";\nimport { SiUnitsFormatterComponent } from \"./components/formatters/si-units-formatter/si-units-formatter.component\";\nimport { StatusWithIconFormatterComponent } from \"./components/formatters/status-with-icon-formatter/status-with-icon-formatter.component\";\nimport { ConfiguratorHeadingComponent } from \"./components/heading/configurator-heading.component\";\nimport { ItemsDynamicComponent } from \"./components/items-dynamic/items-dynamic.component\";\nimport { PreviewPlaceholderComponent } from \"./components/preview-placeholder/preview-placeholder.component\";\nimport { WidgetClonerComponent } from \"./components/widget-cloner/widget-cloner.component\";\nimport { WidgetConfiguratorSectionCoordinatorService } from \"./components/widget-configurator-section/widget-configurator-section-coordinator.service\";\nimport { WidgetConfiguratorSectionComponent } from \"./components/widget-configurator-section/widget-configurator-section.component\";\nimport { WidgetEditorAccordionComponent } from \"./components/widget-editor-accordion/widget-editor-accordion.component\";\nimport { WidgetEditorComponent } from \"./components/widget-editor/widget-editor.component\";\nimport { BackgroundColorRulesConfigurationComponent } from \"./components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component\";\nimport { DataSourceConfigurationV2Component } from \"./components/widgets/configurator-items/data-source-configuration-v2/data-source-configuration-v2.component\";\nimport { DataSourceConfigurationComponent } from \"./components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { DataSourceErrorComponent } from \"./components/widgets/configurator-items/data-source-error/data-source-error.component\";\nimport { TableDataSourceErrorComponent } from \"./components/widgets/configurator-items/data-source-error/table/table-data-source-error.component\";\nimport { EmbeddedContentConfigurationComponent } from \"./components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component\";\nimport { InfoMessageConfigurationComponent } from \"./components/widgets/configurator-items/info-message-configuration/info-message-configuration.component\";\nimport { KpiDescriptionConfigurationComponent } from \"./components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component\";\nimport { RefreshRateConfiguratorComponent } from \"./components/widgets/configurator-items/refresher-configuration/refresh-rate-configurator/refresh-rate-configurator.component\";\nimport { RefresherConfigurationComponent } from \"./components/widgets/configurator-items/refresher-configuration/refresher-configuration.component\";\nimport { ThresholdsConfigurationComponent } from \"./components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component\";\nimport { TimeseriesMetadataConfigurationComponent } from \"./components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"./components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { EntityFormattingConfigurationComponent } from \"./components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component\";\nimport { GroupingConfigurationComponent } from \"./components/widgets/drilldown/grouping-configuration/grouping-configuration.component\";\nimport { KpiTilesConfigurationComponent } from \"./components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component\";\nimport { AggregatorMetricSelectorConfigurationComponent } from \"./components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component\";\nimport { FieldMapperAggregatorConfiguratorComponent } from \"./components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component\";\nimport { ProportionalChartOptionsEditorV2Component } from \"./components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component\";\nimport { ProportionalChartOptionsEditorComponent } from \"./components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component\";\nimport { DonutContentConfigurationComponent } from \"./components/widgets/proportional/donut-content-configuration/donut-content-configuration.component\";\nimport { DescriptionConfigurationV2Component } from \"./components/widgets/table/columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component\";\nimport { PresentationConfigurationV2Component } from \"./components/widgets/table/columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component\";\nimport { TableColumnConfigurationComponent } from \"./components/widgets/table/columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component\";\nimport { TableColumnsConfigurationV2Component } from \"./components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component\";\nimport { DescriptionConfigurationComponent } from \"./components/widgets/table/columns-editor/column-configuration/description-configuration/description-configuration.component\";\nimport { LinkConfiguratorComponent } from \"./components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component\";\nimport { ValueSelectorComponent } from \"./components/widgets/table/columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component\";\nimport { PresentationConfigurationComponent } from \"./components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component\";\nimport { TableColumnsConfigurationComponent } from \"./components/widgets/table/columns-editor/table-columns-configuration.component\";\nimport { TableFiltersEditorComponent } from \"./components/widgets/table/filters-editor/table-filters-editor.component\";\nimport { TimeseriesSeriesCollectionConfigurationComponent } from \"./components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component\";\nimport { TimeseriesTileDescriptionConfigurationComponent } from \"./components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component\";\nimport { TimeseriesTileIndicatorDataConfigurationComponent } from \"./components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component\";\nimport { DashwizStepComponent } from \"./components/wizard/dashwiz-step/dashwiz-step.component\";\nimport { DashwizButtonsComponent } from \"./components/wizard/dashwiz/dashwiz-buttons.component\";\nimport { DashwizComponent } from \"./components/wizard/dashwiz/dashwiz.component\";\nimport { AddDataPipe } from \"./pipe/add-data.pipe\";\nimport { PizzagnaRootPipe } from \"./pipe/pizzagna-root.pipe\";\nimport { WidgetConfiguratorSectionHeaderPipe } from \"./pipe/widget-configurator-section-header.pipe\";\nimport { WidgetEditorAccordionFormStatePipe } from \"./pipe/widget-editor-accordion-form-state.pipe\";\nimport { FormHeaderIconPipePipe } from \"./pipe/widget-editor-accordion-header-icon.pipe\";\nimport { ConfiguratorService } from \"./services/configurator.service\";\nimport { KpiWidgetColorService } from \"./services/kpi-widget-color.service\";\nimport { ConfiguratorHeadingService } from \"./services/public-api\";\nimport { WidgetClonerService } from \"./services/widget-cloner.service\";\nimport { WidgetEditorService } from \"./services/widget-editor.service\";\n/* eslint-enable max-len */\n\nconst entryComponents: IComponentWithLateLoadKey[] = [\n ConfiguratorComponent,\n FormStackComponent,\n DashwizButtonsComponent,\n DataSourceConfigurationComponent,\n DataSourceConfigurationV2Component,\n DataSourceErrorComponent,\n KpiTilesConfigurationComponent,\n EmbeddedContentConfigurationComponent,\n InfoMessageConfigurationComponent,\n ProportionalChartOptionsEditorComponent,\n ProportionalChartOptionsEditorV2Component,\n TableFiltersEditorComponent,\n TimeseriesMetadataConfigurationComponent,\n TimeseriesSeriesCollectionConfigurationComponent,\n TableColumnsConfigurationComponent,\n TableColumnsConfigurationV2Component,\n TableColumnConfigurationComponent,\n TableDataSourceErrorComponent,\n DonutContentPercentageFormatterComponent,\n DonutContentPercentageConfigurationComponent,\n DonutContentSumFormatterComponent,\n DonutContentRawFormatterComponent,\n IconFormatterComponent,\n SiUnitsFormatterComponent,\n LinkConfiguratorComponent,\n ValueSelectorComponent,\n LinkFormatterComponent,\n PreviewPlaceholderComponent,\n StatusWithIconFormatterComponent,\n RawFormatterComponent,\n PercentageFormatterComponent,\n KpiDescriptionConfigurationComponent,\n ThresholdsConfigurationComponent,\n TitleAndDescriptionConfigurationComponent,\n WidgetConfiguratorSectionComponent,\n WidgetEditorComponent,\n WidgetClonerComponent,\n DescriptionConfigurationComponent,\n DescriptionConfigurationV2Component,\n PresentationConfigurationComponent,\n PresentationConfigurationV2Component,\n TimeseriesTileDescriptionConfigurationComponent,\n TimeseriesTileIndicatorDataConfigurationComponent,\n RefresherConfigurationComponent,\n BackgroundColorRulesConfigurationComponent,\n GroupingConfigurationComponent,\n EntityFormattingConfigurationComponent,\n DonutContentConfigurationComponent,\n AggregatorMetricSelectorConfigurationComponent,\n FieldMapperAggregatorConfiguratorComponent,\n];\n\nconst exportedDeclarations = [\n ...entryComponents,\n DashwizComponent,\n DashwizStepComponent,\n WidgetEditorAccordionComponent,\n ItemsDynamicComponent,\n ColorPickerComponent,\n ConfiguratorHeadingComponent,\n RefreshRateConfiguratorComponent,\n AddDataPipe,\n PizzagnaRootPipe,\n WidgetEditorAccordionFormStatePipe,\n WidgetConfiguratorSectionHeaderPipe,\n FormHeaderIconPipePipe,\n DropAreaComponent,\n];\n\n@NgModule({\n imports: [\n ScrollingModule,\n NuiDashboardsCommonModule,\n ReactiveFormsModule,\n GridsterModule,\n DragDropModule,\n PortalModule,\n NuiBusyModule,\n NuiPizzagnaModule,\n NuiIconModule,\n NuiMenuModule,\n NuiPopupModule,\n NuiDialogModule,\n NuiSpinnerModule,\n NuiTextboxModule,\n NuiFormFieldModule,\n NuiButtonModule,\n NuiOverlayAdditionsModule,\n NuiSelectV2Module,\n NuiRadioModule,\n NuiCheckboxModule,\n NuiValidationMessageModule,\n NuiExpanderModule,\n NuiPanelModule,\n NuiDividerModule,\n NuiSwitchModule,\n NuiMessageModule,\n NuiWizardModule,\n NuiSorterModule,\n NuiSearchModule,\n NuiRepeatModule,\n NuiImageModule,\n ],\n declarations: [...exportedDeclarations],\n providers: [\n ConfiguratorService,\n ConfiguratorHeadingService,\n WidgetConfiguratorSectionCoordinatorService,\n WidgetEditorService,\n WidgetClonerService,\n KpiWidgetColorService,\n TimeseriesChartPresetService,\n TimeseriesScalesService,\n ],\n exports: exportedDeclarations,\n})\nexport class NuiDashboardConfiguratorModule {\n constructor(componentRegistry: ComponentRegistryService) {\n for (const ec of entryComponents.filter(\n (c: IComponentWithLateLoadKey) => c.lateLoadKey\n )) {\n componentRegistry.registerByLateLoadKey(ec);\n }\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Injectable } from \"@angular/core\";\nimport isFunction from \"lodash/isFunction\";\nimport { EMPTY, Observable, of } from \"rxjs\";\nimport { catchError } from \"rxjs/operators\";\n\nimport { LoggerService } from \"@nova-ui/bits\";\n\nimport { DashboardComponent } from \"../components/dashboard/dashboard.component\";\nimport { IConfiguratorSource } from \"../configurator/services/types\";\nimport { WidgetRemovalOperation } from \"../configurator/services/types\";\n\n@Injectable({ providedIn: \"root\" })\nexport class WidgetRemovalService {\n constructor(private logger: LoggerService) {}\n\n public handleRemove(\n dashboardComponent: DashboardComponent,\n widgetId: string,\n configuratorSource: IConfiguratorSource,\n tryRemove?: WidgetRemovalOperation\n ) {\n // TODO: Handle the case when tryRemove is undefined\n // @ts-ignore\n return this.tryRemove(tryRemove, widgetId, configuratorSource).pipe(\n this.updateDashboard(dashboardComponent)\n );\n }\n\n private tryRemove(\n tryRemove: WidgetRemovalOperation,\n widgetId: string,\n configuratorSource: IConfiguratorSource\n ) {\n if (isFunction(tryRemove)) {\n return tryRemove(widgetId, configuratorSource).pipe(\n catchError((err: any) => {\n this.logger.error(err);\n return EMPTY;\n })\n );\n } else {\n return of(widgetId);\n }\n }\n\n private updateDashboard =\n (dashboardComponent: DashboardComponent) =>\n (source: Observable<string>) =>\n new Observable<void>((observer) =>\n source.subscribe((widgetId: string) => {\n if (widgetId) {\n dashboardComponent.removeWidget(widgetId);\n }\n observer.next();\n })\n );\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { Directive, Host, Input, OnDestroy, OnInit, Self } from \"@angular/core\";\nimport cloneDeep from \"lodash/cloneDeep\";\nimport { Subject } from \"rxjs\";\nimport { switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { DashboardComponent } from \"../../components/dashboard/dashboard.component\";\nimport { IDashboardPersistenceHandler } from \"../../components/dashboard/types\";\nimport {\n IConfiguratorSource,\n IWidgetEditor,\n} from \"../../configurator/services/types\";\nimport { WidgetEditorService } from \"../../configurator/services/widget-editor.service\";\nimport { WIDGET_EDIT, WIDGET_REMOVE } from \"../../services/types\";\nimport { WidgetRemovalService } from \"../../services/widget-removal.service\";\nimport { WidgetTypesService } from \"../../services/widget-types.service\";\n\n@Directive({\n selector: \"[nuiWidgetEditor]\",\n})\nexport class WidgetEditorDirective implements OnInit, OnDestroy {\n @Input(\"nuiWidgetEditor\")\n dashboardPersistenceHandler: IDashboardPersistenceHandler;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n @Host() @Self() private dashboardComponent: DashboardComponent,\n private widgetEditorService: WidgetEditorService,\n private widgetRemovalService: WidgetRemovalService,\n private widgetTypesService: WidgetTypesService\n ) {}\n\n public ngOnInit(): void {\n this.dashboardComponent.eventBus\n .getStream(WIDGET_EDIT)\n .pipe(\n switchMap((event) => {\n const widget =\n this.dashboardComponent.dashboard.widgets[\n event.widgetId\n ];\n const widgetType = this.widgetTypesService.getWidgetType(\n widget.type,\n widget.version\n );\n // TODO: Ensure that widgetType is defined;\n const widgetEditor: IWidgetEditor = {\n dashboardComponent: this.dashboardComponent,\n // @ts-ignore: Configurator is possibly undefined and is not assignable to IPizzagna type\n formPizzagna: widgetType.configurator,\n // @ts-ignore: Type 'undefined' is not assignable to type 'Record<string, string>'.\n paths: widgetType.paths.configurator,\n widget,\n trySubmit:\n this.dashboardPersistenceHandler &&\n this.dashboardPersistenceHandler.trySubmit,\n };\n\n return this.widgetEditorService.open(widgetEditor);\n }),\n takeUntil(this.destroy$)\n )\n .subscribe();\n\n this.dashboardComponent.eventBus\n .getStream(WIDGET_REMOVE)\n .pipe(\n switchMap((event) => {\n const widgetId = event.widgetId;\n const tryRemove =\n this.dashboardPersistenceHandler &&\n this.dashboardPersistenceHandler.tryRemove;\n\n const configuratorSource: IConfiguratorSource = {\n dashboardComponent: this.dashboardComponent,\n widget: cloneDeep(\n this.dashboardComponent.dashboard.widgets[widgetId]\n ),\n };\n return this.widgetRemovalService.handleRemove(\n this.dashboardComponent,\n widgetId,\n configuratorSource,\n tryRemove\n );\n }),\n takeUntil(this.destroy$)\n )\n .subscribe();\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { DataSourceConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { EntityFormattingConfigurationComponent } from \"../../configurator/components/widgets/drilldown/entity-formatting-configuration/entity-formatting-configuration.component\";\nimport { GroupingConfigurationComponent } from \"../../configurator/components/widgets/drilldown/grouping-configuration/grouping-configuration.component\";\nimport { IConverterFormPartsProperties } from \"../../configurator/services/converters/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_GENERIC_CONVERTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport {\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\n/* eslint-enable max-len */\n\nexport const drilldownConfigurator = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"dataAndCalculations\"],\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Presentation`,\n nodes: [\"titleAndDescription\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n converter: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n },\n },\n },\n // /dataAndCalculations\n dataAndCalculations: {\n id: \"dataAndCalculations\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Data and calculations`,\n nodes: [\"dataSource\", \"grouping\", \"entityFormatting\"],\n },\n },\n dataSource: {\n id: \"dataSource\",\n componentType: DataSourceConfigurationComponent.lateLoadKey,\n properties: {\n // for the DataSourceConfigurationComponent, this defines the list of data sources to pick from\n dataSourceProviders: [] as string[],\n },\n providers: {\n // converter transforms the data source metadata between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates 'providerId' of 'dataSource'\n previewPath: \"/.providers.dataSource\",\n keys: [\"providerId\"],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n // /dataAndCalculations/grouping\n grouping: {\n id: \"grouping\",\n componentType: GroupingConfigurationComponent.lateLoadKey,\n properties: {\n // all available groups\n groups: [],\n // grouping for the list widget\n groupBy: [],\n },\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath: `listWidget.providers.${WellKnownProviders.Adapter}.properties`,\n keys: [\"groupBy\", \"drillstate\", \"groups\"],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n // /dataAndCalculations/entityFormatting\n entityFormatting: {\n id: \"entityFormatting\",\n componentType: EntityFormattingConfigurationComponent.lateLoadKey,\n properties: {\n // TODO: Should be taken dynamically from DataSource. See NUI-5583\n mappingKeys: [\"icon_status\", \"capital\", \"name\", \"icon\", \"url\"],\n dataFieldIds: {\n icon: \"icon\",\n status: \"icon_status\",\n detailedUrl: \"capital\",\n label: \"name\",\n url: \"url\",\n },\n },\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath: `listWidget.providers.${WellKnownProviders.Adapter}.properties.componentsConfig.leaf.properties`,\n keys: [\"dataFieldIds\"],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { WidgetErrorComponent } from \"../../../common/components/widget-error/widget-error.component\";\nimport { LoadingComponent } from \"../../../components/loading/loading.component\";\nimport { IWidgetErrorDisplayProperties } from \"../../../components/widget/types\";\nimport { WidgetBodyContentComponent } from \"../../../components/widget/widget-body-content/widget-body-content.component\";\nimport { WidgetBodyComponent } from \"../../../components/widget/widget-body/widget-body.component\";\nimport { WidgetHeaderComponent } from \"../../../components/widget/widget-header/widget-header.component\";\nimport {\n NOVA_LOADING_ADAPTER,\n NOVA_STATUS_CONTENT_FALLBACK_ADAPTER,\n} from \"../../../services/types\";\nimport {\n HttpStatusCode,\n IComponentConfiguration,\n IProviderConfiguration,\n WellKnownProviders,\n} from \"../../../types\";\nimport { ErrorNodeKey } from \"./types\";\n\n/**\n * Component definition for the widget header node\n */\nexport const WIDGET_HEADER: IComponentConfiguration = {\n id: \"header\",\n componentType: WidgetHeaderComponent.lateLoadKey,\n properties: {\n editMode: false,\n },\n};\n\n/**\n * Component definition for the loading node\n */\nexport const WIDGET_LOADING: IComponentConfiguration = {\n id: \"loading\",\n componentType: LoadingComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.LoadingAdapter]: {\n providerId: NOVA_LOADING_ADAPTER,\n },\n },\n};\n\n/**\n * Component configuration definition for the basic widget body node\n */\nexport const WIDGET_BODY: IComponentConfiguration = {\n id: \"body\",\n componentType: WidgetBodyComponent.lateLoadKey,\n properties: {\n // this value references the 'bodyContent' component in this structure\n content: \"bodyContent\",\n },\n};\n\n/**\n * A map of error codes to widget error node keys\n * --\n * An error code doesn't have to be an HTTP status code; it may be any string that matches an expected\n * data source error type. Additionally, the node keys may be any string as long as they correspond to an\n * error configuration node defined in the widget structure.\n */\nexport const ERROR_FALLBACK_MAP: Record<string, ErrorNodeKey> = {\n [HttpStatusCode.Unknown]: ErrorNodeKey.ErrorUnknown,\n [HttpStatusCode.Forbidden]: ErrorNodeKey.ErrorForbidden,\n [HttpStatusCode.NotFound]: ErrorNodeKey.ErrorNotFound,\n};\n\n/**\n * An index of common error configurations\n */\nexport const ERROR_NODES: Record<string, IComponentConfiguration> = {\n [ErrorNodeKey.ErrorUnknown]: {\n id: ErrorNodeKey.ErrorUnknown,\n componentType: WidgetErrorComponent.lateLoadKey,\n properties: {\n image: \"no-data-to-show\",\n title: $localize`Whoops, something went wrong`,\n description: $localize`There was an unexpected error.`,\n } as IWidgetErrorDisplayProperties,\n },\n [ErrorNodeKey.ErrorForbidden]: {\n id: ErrorNodeKey.ErrorForbidden,\n componentType: WidgetErrorComponent.lateLoadKey,\n properties: {\n image: \"no-data-to-show\",\n title: $localize`403 - Forbidden`,\n description: $localize`The requested action was forbidden.`,\n } as IWidgetErrorDisplayProperties,\n },\n [ErrorNodeKey.ErrorNotFound]: {\n id: ErrorNodeKey.ErrorNotFound,\n componentType: WidgetErrorComponent.lateLoadKey,\n properties: {\n image: \"no-data-to-show\",\n title: $localize`404 - Not Found`,\n description: $localize`The requested resource could not be found.`,\n } as IWidgetErrorDisplayProperties,\n },\n};\n\n/**\n * Retrieves an index of the basic widget body content nodes including fallback nodes\n *\n * @param mainContentNodeKey The key corresponding to the main body content node\n * @param fallbackAdapterId The id for the adapter responsible for activating fallback content in case of an error\n * @param fallbackMap A map of node keys to fallback content definitions\n * @param fallbackNodes An index of fallback content definitions\n *\n * @returns An index of component configurations\n */\nexport function widgetBodyContentNodes(\n mainContentNodeKey: string,\n fallbackAdapterId = NOVA_STATUS_CONTENT_FALLBACK_ADAPTER,\n fallbackMap: Record<string, string> = ERROR_FALLBACK_MAP,\n fallbackNodes: Record<string, IComponentConfiguration> = ERROR_NODES\n): Record<string, IComponentConfiguration> {\n return {\n bodyContent: {\n id: \"bodyContent\",\n componentType: WidgetBodyContentComponent.lateLoadKey,\n properties: {\n primaryContent: mainContentNodeKey,\n fallbackMap,\n },\n providers: {\n [WellKnownProviders.ContentFallbackAdapter]: {\n providerId: fallbackAdapterId,\n } as IProviderConfiguration,\n },\n },\n ...fallbackNodes,\n };\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IRefresherProperties } from \"../../../components/providers/refresher\";\nimport {\n NOVA_DASHBOARD_EVENT_PROXY,\n NOVA_DATASOURCE_INTERVAL_REFRESHER,\n} from \"../../../services/types\";\nimport { IProviderConfiguration } from \"../../../types\";\n\n/**\n * A provider configuration for the dashboard event proxy\n */\nexport const EVENT_PROXY: IProviderConfiguration = {\n providerId: NOVA_DASHBOARD_EVENT_PROXY,\n} as IProviderConfiguration;\n\n/**\n * Retrieves a provider configuration for the interval refresher\n *\n * @param enabled Specify whether the adapter should be active by default\n * @param interval Specify the interval (in seconds) at which the refresher should invoke the data source adapter\n *\n * @returns A provider configuration for the refresher\n */\nexport function refresher(\n enabled = false,\n interval = 0\n): IProviderConfiguration {\n return {\n providerId: NOVA_DATASOURCE_INTERVAL_REFRESHER,\n properties: {\n enabled,\n interval,\n } as IRefresherProperties,\n } as IProviderConfiguration;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { ListNavigationBarComponent } from \"../../components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component\";\nimport { ListWidgetComponent } from \"../../components/list-widget/list-widget.component\";\nimport { WidgetSearchComponent } from \"../../components/widget-search/widget-search.component\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { IPizzagna, PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { EVENT_PROXY } from \"../common/widget/providers\";\n\nexport const drilldownWidget: IPizzagna = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n properties: {\n // these values reference other components in this structure\n nodes: [\"header\", \"loading\", \"search\", \"body\"],\n },\n providers: {\n // event proxy manages the transmission of events between widget and dashboard\n [WellKnownProviders.EventProxy]: EVENT_PROXY,\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: {\n ...WIDGET_BODY,\n properties: {\n ...WIDGET_BODY.properties,\n elementClass: \"overflow-auto\",\n },\n },\n // retrieving the definitions for the body content nodes. the argument corresponds to the main content node key\n ...widgetBodyContentNodes(\"listWidget\"),\n search: {\n id: \"search\",\n componentType: WidgetSearchComponent.lateLoadKey,\n },\n ...widgetBodyContentNodes(\"mainContent\"),\n mainContent: {\n id: \"mainContent\",\n componentType: StackComponent.lateLoadKey,\n properties: {\n // these values reference other components in this configuration\n nodes: [\"navigationBar\", \"listWidget\"],\n },\n },\n navigationBar: {\n id: \"navigationBar\",\n componentType: ListNavigationBarComponent.lateLoadKey,\n },\n listWidget: {\n id: \"listWidget\",\n componentType: ListWidgetComponent.lateLoadKey,\n providers: {},\n properties: {\n elementClass: \"w-100 p-3\",\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n },\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty Custom Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { drilldownConfigurator } from \"./drilldown-configurator\";\nimport { drilldownWidget } from \"./drilldown-widget\";\n\n/***********************************************************************************************************\n * Drilldown widget definition starts here\n ***********************************************************************************************************/\nexport const drilldown: IWidgetTypeDefinition = {\n /***************************************************************************************************\n * Paths to important settings in this type definition\n ***************************************************************************************************/\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n // for the default data source configuration component, this changes the list of data sources to pick from\n [WellKnownPathKey.DataSourceProviders]:\n \"dataSource.properties.dataSourceProviders\",\n },\n },\n /***************************************************************************************************\n * Widget section describes the structural part of the KPI widget\n ***************************************************************************************************/\n widget: drilldownWidget,\n /***************************************************************************************************\n * Configurator section describes the form that is used to configure the widget\n ***************************************************************************************************/\n configurator: drilldownConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport {\n IInfoMessage,\n IInfoMessageProperties,\n ILinkDefinition,\n} from \"../../components/types\";\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { EmbeddedContentConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/embedded-content-configuration/embedded-content-configuration.component\";\nimport { InfoMessageConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/info-message-configuration/info-message-configuration.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { IConverterFormPartsProperties } from \"../../configurator/services/converters/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_GENERIC_CONVERTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport {\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\n/* eslint-enable max-len */\n\nexport const embeddedContentConfigurator = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"customConfig\"],\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Presentation`,\n nodes: [\"titleAndDescription\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n converter: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n } as IProviderConfiguration,\n },\n },\n // /customConfig\n customConfig: {\n id: \"customConfig\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Custom Widget Configuration`,\n nodes: [\"embeddedContentSelection\"],\n },\n },\n // /customConfig/embeddedContentSelection\n embeddedContentSelection: {\n id: \"embeddedContentSelection\",\n componentType: EmbeddedContentConfigurationComponent.lateLoadKey,\n properties: {\n messageComponent: {\n componentType:\n InfoMessageConfigurationComponent.lateLoadKey,\n properties: {\n emphasizeText: \"Some content may not work as expected.\",\n 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.`,\n link: {\n href: \"https://www.solarwinds.com/\",\n target: \"_blank\",\n text: \"Learn more about best practices for the HTML widget\",\n } as ILinkDefinition,\n allowDismiss: true,\n } as IInfoMessageProperties,\n } as IInfoMessage,\n },\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath: \"mainContent.properties\",\n keys: [\n \"customEmbeddedContent\",\n \"mode\",\n \"messageComponent\",\n \"sanitized\",\n ],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { EmbeddedContentComponent } from \"../../components/embedded-content/embedded-content.component\";\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { EVENT_PROXY, refresher } from \"../common/widget/providers\";\n\nexport const embeddedContentWidget = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n providers: {\n // When enabled, this provider emits the REFRESH event on the pizzagna event bus every X seconds\n [WellKnownProviders.Refresher]: refresher(),\n // event proxy manages the transmission of events between widget and dashboard\n [WellKnownProviders.EventProxy]: EVENT_PROXY,\n },\n properties: {\n nodes: [\"header\", \"loading\", \"body\"],\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: WIDGET_BODY,\n\n /**\n * Retrieving definitions for the body content nodes\n * ---\n * The first argument corresponds to the main content node key.\n * The second argument is the id of the adapter responsible for activating fallback content in case of an error.\n */\n ...widgetBodyContentNodes(\"mainContent\"),\n\n // the main content node specifying a component that manages layout of the KPI tiles in a CSS grid\n mainContent: {\n id: \"mainContent\",\n componentType: EmbeddedContentComponent.lateLoadKey,\n properties: {\n elementClass: \"d-flex w-100 justify-content-center\",\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty Embedded Content Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { embeddedContentConfigurator } from \"./embedded-content-configurator\";\nimport { embeddedContentWidget } from \"./embedded-content-widget\";\n\n/***********************************************************************************************************\n * EmbeddedContent widget definition starts here\n ***********************************************************************************************************/\nexport const embeddedContent: IWidgetTypeDefinition = {\n /***************************************************************************************************\n * Paths to important settings in this type definition\n ***************************************************************************************************/\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n },\n /***************************************************************************************************\n * Widget section describes the structural part of the widget\n ***************************************************************************************************/\n widget: embeddedContentWidget,\n /***************************************************************************************************\n * Configurator section describes the form that is used to configure the widget\n ***************************************************************************************************/\n configurator: embeddedContentConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// eslint-disable-next-line max-len\nimport { RefresherConfigurationComponent } from \"../../../configurator/components/widgets/configurator-items/refresher-configuration/refresher-configuration.component\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_GENERIC_CONVERTER,\n} from \"../../../services/types\";\nimport { IComponentConfiguration, WellKnownProviders } from \"../../../types\";\n\n/**\n * Component configuration for the refresher configurator node\n */\nexport const REFRESHER_CONFIGURATOR: IComponentConfiguration = {\n id: \"refresher\",\n componentType: RefresherConfigurationComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath: `${DEFAULT_PIZZAGNA_ROOT}.providers.refresher.properties`,\n keys: [\n \"enabled\",\n \"interval\",\n \"overrideDefaultSettings\",\n ],\n },\n ],\n },\n },\n },\n properties: {\n overrideDefaultSettings: false,\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { IBroadcasterConfig } from \"../../components/providers/types\";\nimport { IFormatterDefinition } from \"../../components/types\";\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { IconFormatterComponent } from \"../../configurator/components/formatters/icon-formatter/icon-formatter.component\";\nimport { RawFormatterComponent } from \"../../configurator/components/formatters/raw-formatter/raw-formatter.component\";\nimport { SiUnitsFormatterComponent } from \"../../configurator/components/formatters/si-units-formatter/si-units-formatter.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { BackgroundColorRulesConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/background-color-rules-configuration/background-color-rules-configuration.component\";\nimport { DataSourceConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { DataSourceErrorComponent } from \"../../configurator/components/widgets/configurator-items/data-source-error/data-source-error.component\";\nimport { KpiDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/kpi-description-configuration/kpi-description-configuration.component\";\nimport { ThresholdsConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/thresholds-configuration/thresholds-configuration.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { KpiTilesConfigurationComponent } from \"../../configurator/components/widgets/kpi/kpi-tiles-configuration/kpi-tiles-configuration.component\";\nimport { PresentationConfigurationComponent } from \"../../configurator/components/widgets/table/columns-editor/column-configuration/presentation-configuration/presentation-configuration.component\";\nimport { DEFAULT_KPI_BACKGROUND_COLORS } from \"../../constants/default-palette\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_KPI_FORMATTERS_REGISTRY,\n NOVA_KPI_SECTION_CONVERTER,\n NOVA_KPI_TILES_CONVERTER,\n NOVA_PIZZAGNA_BROADCASTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport {\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\nimport { REFRESHER_CONFIGURATOR } from \"../common/configurator/components\";\n\n/* eslint-enable max-len */\n\nexport const DEFAULT_KPI_FORMATTERS: IFormatterDefinition[] = [\n {\n componentType: RawFormatterComponent.lateLoadKey,\n label: $localize`Raw Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n {\n componentType: SiUnitsFormatterComponent.lateLoadKey,\n label: $localize`Si Units Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n {\n componentType: IconFormatterComponent.lateLoadKey,\n label: $localize`Icon`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n];\n\nexport const kpiConfigurator = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"tiles\"],\n },\n providers: {\n [WellKnownProviders.FormattersRegistry]: {\n providerId: NOVA_KPI_FORMATTERS_REGISTRY,\n },\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Presentation`,\n nodes: [\"titleAndDescription\", \"refresher\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n converter: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n },\n },\n },\n refresher: REFRESHER_CONFIGURATOR,\n // /tiles\n tiles: {\n id: \"tiles\",\n componentType: KpiTilesConfigurationComponent.lateLoadKey,\n properties: {\n // these components serve as a template for every KPI tile created\n template: [\n {\n // KPI tile description (label, color, etc.) configuration section\n id: \"description\",\n componentType:\n KpiDescriptionConfigurationComponent.lateLoadKey,\n properties: {\n configurableUnits: true,\n backgroundColors: [\n ...DEFAULT_KPI_BACKGROUND_COLORS,\n ],\n },\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_SECTION_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath:\n \"properties.widgetData\",\n keys: [\n \"label\",\n \"backgroundColor\",\n \"units\",\n ],\n },\n ],\n },\n } as IProviderConfiguration,\n },\n },\n {\n // data source configuration section\n id: \"dataSource\",\n componentType:\n DataSourceConfigurationComponent.lateLoadKey,\n properties: {\n // for the DataSourceConfigurationComponent, this defines the list of data sources to pick from\n dataSourceProviders: [] as string[],\n errorComponent:\n DataSourceErrorComponent.lateLoadKey,\n },\n providers: {\n // converter transforms the data source metadata between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_SECTION_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates 'providerId' of 'dataSource'\n previewPath: \"providers.dataSource\",\n // TODO: Remove 'properties' key in v10 - NUI-5831\n keys: [\"providerId\", \"properties\"],\n },\n {\n // this component updates 'properties' of 'dataSource' via an adapter\n previewPath:\n \"providers.adapter.properties.dataSource\",\n keys: [\"properties\"],\n },\n ],\n },\n } as IProviderConfiguration,\n [WellKnownProviders.Broadcaster]: {\n providerId: NOVA_PIZZAGNA_BROADCASTER,\n properties: {\n configs: [\n {\n trackOn: \"component\",\n key: \"dataFieldIds\",\n paths: [\n \"data.{parentComponentId}/formatting.properties.dataFieldIds\",\n ],\n },\n ] as IBroadcasterConfig[],\n },\n },\n },\n },\n {\n // thresholds configuration section\n id: \"thresholds\",\n componentType:\n ThresholdsConfigurationComponent.lateLoadKey,\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_SECTION_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates `thresholds` properties of `adapter`\n previewPath:\n \"providers.adapter.properties.thresholds\",\n keys: [\n \"criticalThresholdValue\",\n \"warningThresholdValue\",\n \"showThresholds\",\n \"reversedThresholds\",\n ],\n },\n ],\n },\n } as IProviderConfiguration,\n },\n },\n {\n id: \"backgroundColorRules\",\n componentType:\n BackgroundColorRulesConfigurationComponent.lateLoadKey,\n properties: {\n backgroundColors: [\n ...DEFAULT_KPI_BACKGROUND_COLORS,\n ],\n },\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_SECTION_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath:\n \"providers.kpiColorPrioritizer.properties\",\n keys: [\"rules\"],\n },\n ],\n },\n } as IProviderConfiguration,\n },\n },\n {\n id: \"formatting\",\n componentType:\n PresentationConfigurationComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_SECTION_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath:\n \"properties.configuration.formatters.Value\",\n keys: [\"formatter\"],\n },\n ],\n },\n } as IProviderConfiguration,\n },\n properties: {\n // Note: Now you should define your formatters in the KpiFormatterRegistry which can contain more formatter options\n // formatters: DEFAULT_KPI_FORMATTERS,\n\n // Set default formatter to the configuration section as RawFormatterComponent.\n // In case Kpi doesn't use the formatters yet, it will be overridden with default formatter value on first save\n formatter: {\n componentType:\n RawFormatterComponent.lateLoadKey,\n properties: {\n dataFieldIds: {\n value: \"value\",\n },\n },\n },\n },\n },\n ],\n },\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_KPI_TILES_CONVERTER,\n } as IProviderConfiguration,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { KpiComponent } from \"../../components/kpi-widget/kpi.component\";\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { TilesComponent } from \"../../components/layouts/tiles/tiles.component\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_KPI_COLOR_PRIORITIZER,\n NOVA_KPI_DATASOURCE_ADAPTER,\n NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER,\n} from \"../../services/types\";\nimport {\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { EVENT_PROXY, refresher } from \"../common/widget/providers\";\n\nexport const kpiWidget = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n providers: {\n // When enabled, this provider emits the REFRESH event on the pizzagna event bus every X seconds\n [WellKnownProviders.Refresher]: refresher(),\n // event proxy manages the transmission of events between widget and dashboard\n [WellKnownProviders.EventProxy]: EVENT_PROXY,\n },\n properties: {\n nodes: [\"header\", \"loading\", \"body\"],\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: {\n ...WIDGET_BODY,\n properties: {\n ...WIDGET_BODY.properties,\n elementClass: \"overflow-hidden\",\n },\n },\n\n /**\n * Retrieving definitions for the body content nodes\n * ---\n * The first argument corresponds to the main content node key.\n * The second argument is the id of the adapter responsible for activating fallback content in case of an error.\n */\n ...widgetBodyContentNodes(\n \"tiles\",\n NOVA_KPI_STATUS_CONTENT_FALLBACK_ADAPTER\n ),\n\n // the main content node specifying a component that manages layout of the KPI tiles in a CSS grid\n tiles: {\n id: \"tiles\",\n componentType: TilesComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 pt-2 px-3 pb-3 w-100\",\n template: {\n componentType: KpiComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.KpiColorPrioritizer]: {\n providerId: NOVA_KPI_COLOR_PRIORITIZER,\n properties: {},\n } as IProviderConfiguration,\n [WellKnownProviders.Adapter]: {\n providerId: NOVA_KPI_DATASOURCE_ADAPTER,\n properties: {\n propertyPath: \"widgetData\",\n },\n } as IProviderConfiguration,\n },\n properties: {\n elementClass: \"flex-grow-1\",\n },\n },\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n providers: {\n // default refresher configuration\n [WellKnownProviders.Refresher]: refresher(false, 60),\n },\n },\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty KPI Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { kpiConfigurator } from \"./kpi-configurator\";\nimport { kpiWidget } from \"./kpi-widget\";\n\nconst tileDescriptionConfiguratorTemplatePath = `tiles.properties.template[0]`;\nconst dataSourceConfiguratorTemplatePath = `tiles.properties.template[1]`;\nconst backgroundColorRulesConfiguratorTemplatePath = `tiles.properties.template[3]`;\n\n/***********************************************************************************************************\n * KPI widget definition starts here\n ***********************************************************************************************************/\nexport const kpi: IWidgetTypeDefinition = {\n /***************************************************************************************************\n * Paths to important settings in this type definition\n ***************************************************************************************************/\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n // this points at the component type you need to change if you want to change the component for data source configuration\n [WellKnownPathKey.DataSourceConfigComponentType]: `${dataSourceConfiguratorTemplatePath}.componentType`,\n // this points at the component type you need to change if you want to change the component for tile description configuration\n [WellKnownPathKey.TileDescriptionConfigComponentType]: `${tileDescriptionConfiguratorTemplatePath}.componentType`,\n // for the default data source configuration component, this changes the list of data sources to pick from\n [WellKnownPathKey.DataSourceProviders]: `${dataSourceConfiguratorTemplatePath}.properties.dataSourceProviders`,\n // this points to the Tile's description background color picker\n [WellKnownPathKey.TileDescriptionBackgroundColors]: `${tileDescriptionConfiguratorTemplatePath}.properties.backgroundColors`,\n // this points to the Background Color Rules background color picker\n [WellKnownPathKey.TileBackgroundColorRulesBackgroundColors]: `${backgroundColorRulesConfiguratorTemplatePath}.properties.backgroundColors`,\n },\n },\n /***************************************************************************************************\n * Widget section describes the structural part of the KPI widget\n ***************************************************************************************************/\n widget: kpiWidget,\n /***************************************************************************************************\n * Configurator section describes the form that is used to configure the widget\n ***************************************************************************************************/\n configurator: kpiConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StackComponent } from \"../components/layouts/stack/stack.component\";\nimport { IWidgetTypeDefinition } from \"../components/widget/types\";\nimport { PreviewPlaceholderComponent } from \"../configurator/components/preview-placeholder/preview-placeholder.component\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../services/types\";\nimport { PizzagnaLayer, WellKnownPathKey } from \"../types\";\nimport { WIDGET_BODY, WIDGET_HEADER } from \"./common/widget/components\";\n\nexport const previewPlaceholder: IWidgetTypeDefinition = {\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n },\n widget: {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n componentType: StackComponent.lateLoadKey,\n properties: {\n nodes: [\"header\", \"body\"],\n },\n },\n header: WIDGET_HEADER,\n body: WIDGET_BODY,\n bodyContent: {\n id: \"bodyContent\",\n componentType: PreviewPlaceholderComponent.lateLoadKey,\n },\n },\n [PizzagnaLayer.Configuration]: {\n header: {\n properties: {\n title: $localize`New Widget`,\n },\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport get from \"lodash/get\";\n\nimport {\n IProportionalAggregatorFn,\n IProportionalDonutContentAggregatorProperties,\n} from \"./types\";\n\nexport interface IFieldMapperAggregatorProperties\n extends IProportionalDonutContentAggregatorProperties {\n chartSeriesDataFieldId?: string;\n}\n\nexport const fieldMapper: IProportionalAggregatorFn = (\n origin,\n properties?: IFieldMapperAggregatorProperties\n) => {\n const chartSeriesDataFieldId =\n properties?.chartSeriesDataFieldId || \"data[0]\";\n\n let metric: any = origin[0];\n if (properties?.activeMetricId) {\n metric = origin.find(\n (entry) => entry.id === properties?.activeMetricId\n );\n\n if (!metric) {\n console.warn(\n `No metric with id: ${properties?.activeMetricId} found. Taking first available.`\n );\n }\n }\n\n return get(metric, chartSeriesDataFieldId);\n};\n\nfieldMapper.aggregatorType = \"fieldMapper\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport sum from \"lodash/sum\";\n\nimport {\n IProportionalAggregatorFn,\n IProportionalDonutContentAggregatorProperties,\n} from \"./types\";\n\nexport interface IPercentageAggregatorProperties\n extends IProportionalDonutContentAggregatorProperties {\n /** if \"true\" it'll be 58 not 0.58 */\n base100?: boolean;\n}\n\n/**\n * Aggregator for the Proportional Widget with Donut chart type.\n *\n * Receives all the metrics from the donut and gets the active metric percentage.\n */\nexport const percentageAggregator: IProportionalAggregatorFn = (\n origin,\n properties?: IPercentageAggregatorProperties\n) => {\n const data = origin.map((v) => v.data[0]);\n const { activeMetricId, base100 } = properties || {};\n\n const summed = sum(data);\n\n let metric = data[0];\n if (activeMetricId) {\n metric = origin.find((entry) => entry.id === activeMetricId)?.data[0];\n\n if (!metric) {\n console.warn(\n `No metric with id: ${activeMetricId} found. Taking first available.`\n );\n }\n }\n\n const percentage = metric / summed;\n\n let finalValue = base100 ? percentage * 100 : percentage;\n // round to 2 digits on fractional part\n finalValue = Math.round(finalValue * 100) / 100;\n\n return finalValue.toString();\n};\n\npercentageAggregator.aggregatorType = \"percentageAggregator\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport sum from \"lodash/sum\";\n\nimport { IProportionalAggregatorFn } from \"./types\";\n\n/**\n * Receives all the metrics from the donut and gets their sum.\n */\nexport const sumAggregator: IProportionalAggregatorFn = (\n origin,\n properties?\n) => {\n const { activeMetricId } = properties || {};\n\n if (activeMetricId) {\n const activeMetric = origin.find(\n (entry) => entry.id === activeMetricId\n );\n if (activeMetric) {\n return activeMetric.data[0];\n }\n }\n\n return sum(origin.map((entry) => entry.data[0])).toString();\n};\n\nsumAggregator.aggregatorType = \"sumAggregator\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { IBroadcasterConfig } from \"../../components/providers/types\";\nimport { IFormatterDefinition } from \"../../components/types\";\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { DonutContentPercentageFormatterComponent } from \"../../configurator/components/formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component\";\nimport { DonutContentRawFormatterComponent } from \"../../configurator/components/formatters/donut-content-raw-formatter/donut-content-raw-formatter.component\";\nimport { DonutContentSumFormatterComponent } from \"../../configurator/components/formatters/donut-content-sum-formatter/donut-content-sum-formatter.component\";\nimport { LinkFormatterComponent } from \"../../configurator/components/formatters/link-formatter/link-formatter.component\";\nimport { PercentageFormatterComponent } from \"../../configurator/components/formatters/percentage-formatter/percentage-formatter.component\";\nimport { RawFormatterComponent } from \"../../configurator/components/formatters/raw-formatter/raw-formatter.component\";\nimport { SiUnitsFormatterComponent } from \"../../configurator/components/formatters/si-units-formatter/si-units-formatter.component\";\nimport { StatusWithIconFormatterComponent } from \"../../configurator/components/formatters/status-with-icon-formatter/status-with-icon-formatter.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { DataSourceConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { DataSourceErrorComponent } from \"../../configurator/components/widgets/configurator-items/data-source-error/data-source-error.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { AggregatorMetricSelectorConfigurationComponent } from \"../../configurator/components/widgets/proportional/aggregators-configurators/aggregator-configurator/aggregator-configurator.component\";\nimport { FieldMapperAggregatorConfiguratorComponent } from \"../../configurator/components/widgets/proportional/aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component\";\nimport { ProportionalChartOptionsEditorComponent } from \"../../configurator/components/widgets/proportional/chart-options-editor/proportional-chart-options-editor.component\";\nimport { fieldMapper } from \"../../functions/proportional-aggregators/field-mapper\";\nimport {\n IPercentageAggregatorProperties,\n percentageAggregator,\n} from \"../../functions/proportional-aggregators/percentage-aggregator\";\nimport { sumAggregator } from \"../../functions/proportional-aggregators/sum-aggregator\";\nimport { IProportionalDonutContentAggregatorDefinition } from \"../../functions/proportional-aggregators/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_GENERIC_CONVERTER,\n NOVA_PIZZAGNA_BROADCASTER,\n NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY,\n NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport { PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport { LegendPlacement } from \"../../widget-types/common/widget/legend\";\nimport { REFRESHER_CONFIGURATOR } from \"../common/configurator/components\";\n/* eslint-enable max-len */\n\nexport const DEFAULT_LEGEND_FORMATTERS: IFormatterDefinition[] = [\n {\n componentType: \"\",\n label: $localize`Raw Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n {\n componentType: StatusWithIconFormatterComponent.lateLoadKey,\n label: $localize`Status With Icon`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n {\n componentType: LinkFormatterComponent.lateLoadKey,\n label: $localize`Link`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n },\n];\nexport const DEFAULT_PROPORTIONAL_CONTENT_FORMATTERS: IFormatterDefinition[] = [\n {\n componentType: RawFormatterComponent.lateLoadKey,\n label: $localize`Raw Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n properties: {\n elementClass: \"nui-text-page\",\n },\n },\n {\n componentType: SiUnitsFormatterComponent.lateLoadKey,\n label: $localize`Si Units Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n properties: {\n elementClass: \"nui-text-page\",\n },\n },\n {\n componentType: PercentageFormatterComponent.lateLoadKey,\n label: $localize`Percentage Formatter`,\n dataTypes: {\n // @ts-ignore\n value: null,\n },\n properties: {\n elementClass: \"nui-text-page\",\n },\n },\n];\n\nexport const DEFAULT_PROPORTIONAL_CONTENT_AGGREGATORS: IProportionalDonutContentAggregatorDefinition[] =\n [\n {\n aggregatorType: sumAggregator.aggregatorType,\n label: \"Sum Aggregator\",\n fn: sumAggregator,\n configurationComponent:\n AggregatorMetricSelectorConfigurationComponent.lateLoadKey,\n },\n {\n aggregatorType: percentageAggregator.aggregatorType,\n label: \"Percentage Aggregator\",\n fn: percentageAggregator,\n properties: {\n base100: true,\n } as IPercentageAggregatorProperties,\n configurationComponent:\n AggregatorMetricSelectorConfigurationComponent.lateLoadKey,\n },\n {\n aggregatorType: fieldMapper.aggregatorType,\n label: \"Field Mapper Aggregator\",\n fn: fieldMapper,\n configurationComponent:\n FieldMapperAggregatorConfiguratorComponent.lateLoadKey,\n },\n ];\n\nexport const proportionalConfigurator = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"dataAndCalculations\"],\n },\n providers: {\n [WellKnownProviders.FormattersRegistry]: {\n providerId: NOVA_PROPORTIONAL_CONTENT_FORMATTERS_REGISTRY,\n },\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: \"Presentation\",\n nodes: [\"titleAndDescription\", \"chartOptionsEditor\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n },\n },\n },\n // /presentation/chartOptionsEditor\n chartOptionsEditor: {\n id: \"chartOptionsEditor\",\n componentType: ProportionalChartOptionsEditorComponent.lateLoadKey,\n properties: {\n chartOptions: {\n chartTypes: [\n \"PieChart\",\n \"DonutChart\",\n \"VerticalBarChart\",\n \"HorizontalBarChart\",\n ],\n legendPlacementOptions: [\n {\n id: LegendPlacement.None,\n label: $localize`None`,\n },\n {\n id: LegendPlacement.Right,\n label: $localize`Right`,\n },\n {\n id: LegendPlacement.Bottom,\n label: $localize`Bottom`,\n },\n ],\n contentFormatters: [\n {\n componentType:\n DonutContentRawFormatterComponent.lateLoadKey,\n label: $localize`Raw`,\n },\n {\n componentType:\n DonutContentSumFormatterComponent.lateLoadKey,\n label: $localize`Sum`,\n },\n {\n componentType:\n DonutContentPercentageFormatterComponent.lateLoadKey,\n label: $localize`Percentage`,\n configurationComponent:\n \"DonutContentPercentageConfigurationComponent\",\n },\n ] as IFormatterDefinition[],\n legendFormatters: [\n {\n componentType:\n StatusWithIconFormatterComponent.lateLoadKey,\n label: $localize`Status With Icon`,\n },\n {\n componentType: LinkFormatterComponent.lateLoadKey,\n label: $localize`Link`,\n },\n ] as IFormatterDefinition[],\n },\n },\n providers: {\n // converter transforms the chart options data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId:\n NOVA_PROPORTIONAL_WIDGET_CHART_OPTIONS_CONVERTER,\n },\n },\n },\n refresher: REFRESHER_CONFIGURATOR,\n // /dataAndCalculations\n dataAndCalculations: {\n id: \"dataAndCalculations\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Data and Calculations`,\n nodes: [\"dataSource\"],\n },\n },\n // /dataAndCalculations/dataSource\n dataSource: {\n id: \"dataSource\",\n componentType: DataSourceConfigurationComponent.lateLoadKey,\n properties: {\n // for the DataSourceConfigurationComponent, this defines the list of data sources to pick from\n dataSourceProviders: [] as string[],\n errorComponent: DataSourceErrorComponent.lateLoadKey,\n },\n providers: {\n // converter transforms the data source metadata between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates the 'providerId' of the 'dataSource'\n previewPath: \"chart.providers.dataSource\",\n // TODO: Remove 'properties' key in v10 - NUI-5831\n keys: [\"providerId\", \"properties\"],\n },\n {\n // this component updates the 'properties' of the 'dataSource' via an adapter\n previewPath:\n \"chart.providers.adapter.properties.dataSource\",\n keys: [\"properties\"],\n },\n ],\n },\n },\n [WellKnownProviders.Broadcaster]: {\n providerId: NOVA_PIZZAGNA_BROADCASTER,\n properties: {\n configs: [\n {\n trackOn: \"component\",\n key: \"dsOutput\",\n paths: [\n \"data.chartOptionsEditor.properties.dsOutput\",\n ],\n },\n ] as IBroadcasterConfig[],\n },\n },\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { ProportionalWidgetComponent } from \"../../components/proportional-widget/proportional-widget.component\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_DATASOURCE_ADAPTER,\n} from \"../../services/types\";\nimport { PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { EVENT_PROXY, refresher } from \"../common/widget/providers\";\n\nexport const proportionalWidget = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n properties: {\n // these values reference other components in this structure\n nodes: [\"header\", \"loading\", \"body\"],\n },\n providers: {\n // When enabled, this provider emits the REFRESH event on the pizzagna event bus every X seconds\n [WellKnownProviders.Refresher]: refresher(),\n // event proxy manages the transmission of events between widget and dashboard\n [WellKnownProviders.EventProxy]: EVENT_PROXY,\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: {\n ...WIDGET_BODY,\n properties: {\n ...WIDGET_BODY.properties,\n elementClass: \"overflow-auto\",\n },\n },\n\n // retrieving the definitions for the body content nodes. the argument corresponds to the main content node key\n ...widgetBodyContentNodes(\"chart\"),\n\n // a component that manages layout and behavior of the proportional chart\n chart: {\n id: \"chart\",\n componentType: ProportionalWidgetComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Adapter]: {\n providerId: NOVA_DATASOURCE_ADAPTER,\n properties: {\n componentId: \"chart\",\n propertyPath: \"widgetData\",\n },\n },\n },\n properties: {\n elementClass:\n \"d-flex flex-grow-1 justify-content-center overflow-auto\",\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n providers: {\n // default refresher configuration\n [WellKnownProviders.Refresher]: refresher(false, 60),\n },\n },\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty Proportional Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { proportionalConfigurator } from \"./proportional-configurator\";\nimport { proportionalWidget } from \"./proportional-widget\";\n\n/***********************************************************************************************************\n * Proportional widget definition starts here\n ***********************************************************************************************************/\nexport const proportional: IWidgetTypeDefinition = {\n /***************************************************************************************************\n * Paths to important settings in this type definition\n ***************************************************************************************************/\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n // this points at the component type you need to change if you want to change the component for data source configuration\n [WellKnownPathKey.DataSourceConfigComponentType]:\n \"dataSource.componentType\",\n // for the default data source configuration component, this changes the list of data sources to pick from\n [WellKnownPathKey.DataSourceProviders]:\n \"dataSource.properties.dataSourceProviders\",\n // this is where donut content chart formatters are defined\n [WellKnownPathKey.Formatters]:\n \"chartOptionsEditor.properties.chartOptions.contentFormatters\",\n },\n },\n /***************************************************************************************************\n * Widget section describes the structural part of the proportional widget\n ***************************************************************************************************/\n widget: proportionalWidget,\n /***************************************************************************************************\n * Configuration section describes the form that is used to configure the widget\n ***************************************************************************************************/\n configurator: proportionalConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { DataSourceConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { TableDataSourceErrorComponent } from \"../../configurator/components/widgets/configurator-items/data-source-error/table/table-data-source-error.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { TableColumnsConfigurationV2Component } from \"../../configurator/components/widgets/table/columns-editor-v2/table-columns-configuration-v2.component\";\nimport { TableFiltersEditorComponent } from \"../../configurator/components/widgets/table/filters-editor/table-filters-editor.component\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER,\n NOVA_GENERIC_CONVERTER,\n NOVA_TABLE_COLUMNS_CONVERTER,\n NOVA_TABLE_FILTERS_CONVERTER,\n NOVA_TABLE_FORMATTERS_REGISTRY,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport { IPizzagna, PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport { REFRESHER_CONFIGURATOR } from \"../common/configurator/components\";\nimport { DEFAULT_TABLE_FORMATTERS } from \"./default-table-formatters\";\n\n/* eslint-enable max-len */\n\nexport const tableConfigurator: IPizzagna = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n id: DEFAULT_PIZZAGNA_ROOT,\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"dataAndCalculations\", \"columns\"],\n },\n providers: {\n [WellKnownProviders.FormattersRegistry]: {\n providerId: NOVA_TABLE_FORMATTERS_REGISTRY,\n },\n [WellKnownProviders.DataSourceManager]: {\n providerId: NOVA_CONFIGURATOR_DATA_SOURCE_MANAGER,\n },\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Presentation`,\n // references to other components laid out in this form\n nodes: [\"titleAndDescription\", \"filters\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n },\n },\n },\n // /presentation/filters - configuration of built-in filters like search, sorting and pagination\n filters: {\n id: \"filters\",\n componentType: TableFiltersEditorComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TABLE_FILTERS_CONVERTER,\n },\n },\n },\n refresher: REFRESHER_CONFIGURATOR,\n // /dataAndCalculations\n dataAndCalculations: {\n id: \"dataAndCalculations\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Data and Calculations`,\n nodes: [\"dataSource\"],\n },\n },\n // /dataAndCalculations/dataSource\n dataSource: {\n id: \"dataSource\",\n componentType: DataSourceConfigurationComponent.lateLoadKey,\n properties: {\n dataSourceProviders: [],\n errorComponent: TableDataSourceErrorComponent.lateLoadKey,\n },\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath: \"table.providers.dataSource\",\n // TODO: Remove 'properties' key in v10 - NUI-5831\n keys: [\"providerId\", \"properties\"],\n },\n {\n previewPath:\n \"table.providers.adapter.properties.dataSource\",\n keys: [\"properties\"],\n },\n ],\n },\n },\n },\n },\n // A very important part of this configuration form is the 'columns' section. It manages the configuration of columns and formatters that are used\n // to display data in this table. Every column has multiple properties associated with it like: label, width, formatter and how to map incoming data\n // into the formatter.\n columns: {\n id: \"columns\",\n componentType: TableColumnsConfigurationV2Component.lateLoadKey,\n properties: {\n // Deprecated (see TableColumnsConfigurationV2Component.template)\n template: [\n {},\n {\n properties: {\n formatters: DEFAULT_TABLE_FORMATTERS,\n },\n },\n ],\n },\n providers: {\n [WellKnownProviders.Converter]: {\n // this specialized converter does all the work with building the complex forms for every column of the table and mapping the data back\n // to the widget configuration that builds the table component from the individual column configurations\n providerId: NOVA_TABLE_COLUMNS_CONVERTER,\n },\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { TableWidgetComponent } from \"../../components/table-widget/table-widget.component\";\nimport { ITableWidgetConfig } from \"../../components/table-widget/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_DASHBOARD_EVENT_PROXY,\n NOVA_TABLE_DATASOURCE_ADAPTER,\n NOVA_VIRTUAL_VIEWPORT_MANAGER,\n WIDGET_RESIZE,\n} from \"../../services/types\";\nimport { IPizzagna, PizzagnaLayer, WellKnownProviders } from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { refresher } from \"../common/widget/providers\";\n\nexport const tableWidget: IPizzagna = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n providers: {\n // When enabled, this provider emits the REFRESH event on the pizzagna event bus every X seconds\n [WellKnownProviders.Refresher]: refresher(),\n [WellKnownProviders.EventProxy]: {\n // event proxy manages the transmission of events between widget and dashboard\n providerId: NOVA_DASHBOARD_EVENT_PROXY,\n properties: {\n // WIDGET_RESIZE event is used to adjust the virtual scroll viewport size\n downstreams: [WIDGET_RESIZE.id],\n },\n },\n },\n properties: {\n nodes: [\"header\", \"loading\", \"body\"],\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: {\n ...WIDGET_BODY,\n properties: {\n ...WIDGET_BODY.properties,\n elementClass: \"overflow-auto\",\n },\n },\n\n // retrieving the definitions for the body content nodes. the argument corresponds to the main content node key\n ...widgetBodyContentNodes(\"table\"),\n\n // this is the main component showing a table with data\n table: {\n id: \"table\",\n componentType: TableWidgetComponent.lateLoadKey,\n providers: {\n // adapter invokes the data source and assigns the output to this component\n [WellKnownProviders.Adapter]: {\n providerId: NOVA_TABLE_DATASOURCE_ADAPTER,\n properties: {\n componentId: \"table\",\n dataPath: \"widgetData\",\n // data-fields are necessary to map incoming data to configured columns\n dataFieldsPath: \"dataFields\",\n totalItemsPath: \"totalItems\",\n },\n },\n virtualViewportManager: {\n providerId: NOVA_VIRTUAL_VIEWPORT_MANAGER,\n },\n },\n properties: {\n elementClass: \"flex-grow-1 mx-3 mb-3 mt-2\",\n delayedMousePresenceDetectionEnabled: true,\n configuration: {\n columns: [],\n // The delay in milliseconds after table mouseenter before scrolling is activated\n scrollActivationDelayMs: 500,\n // Whether to display or not table header tooltips\n headerTooltipsEnabled: true, // default\n } as unknown as ITableWidgetConfig,\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n providers: {\n // default refresher configuration\n [WellKnownProviders.Refresher]: refresher(false, 60),\n },\n },\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty Table Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { tableConfigurator } from \"./table-configurator\";\nimport { tableWidget } from \"./table-widget\";\n\nexport const table: IWidgetTypeDefinition = {\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n [WellKnownPathKey.DataSourceConfigComponentType]:\n \"dataSource.componentType\",\n [WellKnownPathKey.DataSourceProviders]:\n \"dataSource.properties.dataSourceProviders\",\n [WellKnownPathKey.Formatters]:\n \"columns.properties.template[1].properties.formatters\",\n },\n },\n widget: tableWidget,\n configurator: tableConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { FormStackComponent } from \"../../configurator/components/form-stack/form-stack.component\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { DataSourceConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/data-source-configuration/data-source-configuration.component\";\nimport { DataSourceErrorComponent } from \"../../configurator/components/widgets/configurator-items/data-source-error/data-source-error.component\";\nimport { TimeseriesMetadataConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component\";\nimport { TitleAndDescriptionConfigurationComponent } from \"../../configurator/components/widgets/configurator-items/title-and-description-configuration/title-and-description-configuration.component\";\nimport { TimeseriesSeriesCollectionConfigurationComponent } from \"../../configurator/components/widgets/timeseries/timeseries-series-collection-configuration/timeseries-series-collection-configuration.component\";\nimport { TimeseriesTileDescriptionConfigurationComponent } from \"../../configurator/components/widgets/timeseries/timeseries-tile-description-configuration/timeseries-tile-description-configuration.component\";\nimport { TimeseriesTileIndicatorDataConfigurationComponent } from \"../../configurator/components/widgets/timeseries/timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component\";\nimport { IConverterFormPartsProperties } from \"../../configurator/services/converters/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_GENERIC_ARRAY_CONVERTER,\n NOVA_GENERIC_CONVERTER,\n NOVA_TIMESERIES_METADATA_CONVERTER,\n NOVA_TIMESERIES_SERIES_CONVERTER,\n NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER,\n NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n} from \"../../services/types\";\nimport {\n IPizzagna,\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\nimport { LegendPlacement } from \"../../widget-types/common/widget/legend\";\nimport { REFRESHER_CONFIGURATOR } from \"../common/configurator/components\";\n/* eslint-enable max-len */\n\nexport const timeseriesConfigurator: IPizzagna = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the configurator - all form components referenced herein will be stacked in a column\n componentType: FormStackComponent.lateLoadKey,\n properties: {\n elementClass: \"flex-grow-1 overflow-auto nui-scroll-shadows\",\n // references to other components laid out in this form\n nodes: [\"presentation\", \"dataAndCalculations\", \"series\"],\n },\n },\n // /presentation\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Presentation`,\n nodes: [\"titleAndDescription\", \"timeseriesMetadata\"],\n },\n },\n // /presentation/titleAndDescription\n titleAndDescription: {\n id: \"titleAndDescription\",\n componentType:\n TitleAndDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TITLE_AND_DESCRIPTION_CONVERTER,\n } as IProviderConfiguration,\n },\n },\n // /presentation/timeseriesMetadata\n timeseriesMetadata: {\n id: \"timeseriesMetadata\",\n componentType: TimeseriesMetadataConfigurationComponent.lateLoadKey,\n properties: {\n legendPlacements: [\n {\n id: LegendPlacement.None,\n label: $localize`None`,\n },\n {\n id: LegendPlacement.Right,\n label: $localize`Right`,\n },\n {\n id: LegendPlacement.Bottom,\n label: $localize`Bottom`,\n },\n ],\n },\n providers: {\n // converter transforms the timeseries metadata configuration between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TIMESERIES_METADATA_CONVERTER,\n } as IProviderConfiguration,\n },\n },\n refresher: REFRESHER_CONFIGURATOR,\n // /dataAndCalculations\n dataAndCalculations: {\n id: \"dataAndCalculations\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: $localize`Data and Calculations`,\n nodes: [\"dataSource\"],\n },\n },\n // /dataAndCalculations/dataSource\n dataSource: {\n id: \"dataSource\",\n componentType: DataSourceConfigurationComponent.lateLoadKey,\n properties: {\n // for the DataSourceConfigurationComponent, this defines the list of data sources to pick from\n dataSourceProviders: [] as string[],\n errorComponent: DataSourceErrorComponent.lateLoadKey,\n },\n providers: {\n // converter transforms the data source metadata between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates 'providerId' of 'dataSource'\n previewPath: \"/.providers.dataSource\",\n // TODO: Remove 'properties' key in v10 - NUI-5831\n keys: [\"providerId\", \"properties\"],\n },\n {\n // this component updates 'properties' of 'dataSource' via an adapter\n previewPath:\n \"chart.providers.adapter.properties.dataSource\",\n keys: [\"properties\"],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n // /series\n series: {\n id: \"series\",\n componentType:\n TimeseriesSeriesCollectionConfigurationComponent.lateLoadKey,\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_TIMESERIES_SERIES_CONVERTER,\n } as IProviderConfiguration,\n },\n properties: {\n // these components serve as a template for every configured timeseries\n template: [\n {\n // series description (label) configuration section\n id: \"description\",\n componentType:\n TimeseriesTileDescriptionConfigurationComponent.lateLoadKey,\n providers: {\n // converter transforms the data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_ARRAY_CONVERTER,\n properties: {\n formParts: [\n {\n // this component updates 'label' of 'series' via an adapter\n previewPath:\n \"chart.providers.adapter.properties.series\",\n keys: [\"label\"],\n },\n ] as IConverterFormPartsProperties[],\n },\n } as IProviderConfiguration,\n },\n },\n {\n // indicator data configuration section\n id: \"indicatorData\",\n componentType:\n TimeseriesTileIndicatorDataConfigurationComponent.lateLoadKey,\n providers: {\n // converter transforms the data such as the selected series between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId:\n NOVA_TIMESERIES_TILE_INDICATOR_DATA_CONVERTER,\n } as IProviderConfiguration,\n },\n },\n ],\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { StackComponent } from \"../../components/layouts/stack/stack.component\";\nimport { TimeframeSelectionComponent } from \"../../components/time-frame-selection/timeframe-selection.component\";\nimport { TimeseriesWidgetComponent } from \"../../components/timeseries-widget/timeseries-widget.component\";\nimport {\n ITimeseriesScaleConfig,\n ITimeseriesWidgetConfig,\n TimeseriesChartPreset,\n TimeseriesScaleType,\n} from \"../../components/timeseries-widget/types\";\nimport { ITimeseriesItemConfiguration } from \"../../configurator/components/widgets/timeseries/types\";\nimport {\n DEFAULT_PIZZAGNA_ROOT,\n NOVA_TIMESERIES_DATASOURCE_ADAPTER,\n} from \"../../services/types\";\nimport {\n IProviderConfiguration,\n PizzagnaLayer,\n WellKnownProviders,\n} from \"../../types\";\nimport {\n widgetBodyContentNodes,\n WIDGET_BODY,\n WIDGET_HEADER,\n WIDGET_LOADING,\n} from \"../common/widget/components\";\nimport { EVENT_PROXY, refresher } from \"../common/widget/providers\";\n\nexport const timeseriesWidget = {\n [PizzagnaLayer.Structure]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n // base layout of the widget - all components referenced herein will be stacked in a column\n componentType: StackComponent.lateLoadKey,\n providers: {\n // When enabled, this provider emits the REFRESH event on the pizzagna event bus every X seconds\n [WellKnownProviders.Refresher]: refresher(),\n // event proxy manages the transmission of events between widget and dashboard\n [WellKnownProviders.EventProxy]: EVENT_PROXY,\n },\n properties: {\n // these values reference other components in this structure\n nodes: [\"header\", \"loading\", \"body\"],\n },\n },\n // widget header\n header: WIDGET_HEADER,\n // this is the loading bar below the header\n loading: WIDGET_LOADING,\n // widget body\n body: {\n ...WIDGET_BODY,\n properties: {\n ...WIDGET_BODY.properties,\n elementClass: \"overflow-auto\",\n },\n },\n\n // retrieving the definitions for the body content nodes. the argument corresponds to the main content node key\n ...widgetBodyContentNodes(\"mainContent\"),\n\n mainContent: {\n id: \"mainContent\",\n componentType: StackComponent.lateLoadKey,\n properties: {\n // these values reference other components in this configuration\n nodes: [\"timeframeSelection\", \"chart\"],\n },\n },\n // component that filters the widget's timeseries data by timeframe\n timeframeSelection: {\n id: \"timeframeSelection\",\n componentType: TimeframeSelectionComponent.lateLoadKey,\n },\n // component that displays the widget's timeseries data as a line chart\n chart: {\n id: \"chart\",\n componentType: TimeseriesWidgetComponent.lateLoadKey,\n properties: {\n elementClass:\n \"d-flex flex-column justify-content-center h-100 overflow-auto\",\n configuration: {\n preset: TimeseriesChartPreset.Line,\n // this scales configuration defines default scale types for the chart\n scales: {\n y: {\n // linear numeric scale for the y axis\n type: TimeseriesScaleType.Linear,\n } as ITimeseriesScaleConfig,\n x: {\n // continuous time scale for the x axis\n type: TimeseriesScaleType.Time,\n } as ITimeseriesScaleConfig,\n },\n } as ITimeseriesWidgetConfig,\n },\n providers: {\n // provider for mapping the timeseries data source output to the format required by the widget\n [WellKnownProviders.Adapter]: {\n providerId: NOVA_TIMESERIES_DATASOURCE_ADAPTER,\n properties: {\n componentId: \"chart\",\n propertyPath: \"widgetData\",\n series: [] as ITimeseriesItemConfiguration[],\n },\n } as IProviderConfiguration,\n },\n },\n },\n [PizzagnaLayer.Configuration]: {\n [DEFAULT_PIZZAGNA_ROOT]: {\n id: DEFAULT_PIZZAGNA_ROOT,\n providers: {\n // default refresher configuration\n [WellKnownProviders.Refresher]: refresher(false, 60),\n },\n },\n // default header configuration\n header: {\n properties: {\n title: $localize`Empty Timeseries Widget`,\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IWidgetTypeDefinition } from \"../../components/widget/types\";\nimport { DEFAULT_PIZZAGNA_ROOT } from \"../../services/types\";\nimport { WellKnownPathKey } from \"../../types\";\nimport { timeseriesConfigurator } from \"./timeseries-configurator\";\nimport { timeseriesWidget } from \"./timeseries-widget\";\n\n/***********************************************************************************************************\n * Timeseries widget definition starts here\n ***********************************************************************************************************/\nexport const timeseries: IWidgetTypeDefinition = {\n /***************************************************************************************************\n * Paths to important settings in this type definition\n ***************************************************************************************************/\n paths: {\n widget: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n },\n configurator: {\n [WellKnownPathKey.Root]: DEFAULT_PIZZAGNA_ROOT,\n // this points at the component type you need to change if you want to change the component for data source configuration\n [WellKnownPathKey.DataSourceConfigComponentType]:\n \"dataSource.componentType\",\n // for the default data source configuration component, this changes the list of data sources to pick from\n [WellKnownPathKey.DataSourceProviders]:\n \"dataSource.properties.dataSourceProviders\",\n },\n },\n /***************************************************************************************************\n * Widget section describes the structural part of the Timeseries widget\n ***************************************************************************************************/\n widget: timeseriesWidget,\n /***************************************************************************************************\n * Configurator section describes the form that is used to configure the widget\n ***************************************************************************************************/\n configurator: timeseriesConfigurator,\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { DecimalPipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n// This is not technically used here, but it does pull in the type for $localize\n// noinspection ES6UnusedImports\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { LocalizeFn } from \"@angular/localize/init\";\nimport { GridsterModule } from \"angular-gridster2\";\n\nimport {\n NuiBusyModule,\n NuiButtonModule,\n NuiCommonModule,\n NuiIconModule,\n NuiImageModule,\n NuiMenuModule,\n NuiPopupModule,\n NuiProgressModule,\n NuiRepeatModule,\n NuiSearchModule,\n NuiSelectModule,\n NuiSpinnerModule,\n NuiTableModule,\n NuiTimeFrameBarModule,\n NuiTimeFramePickerModule,\n NuiTooltipModule,\n} from \"@nova-ui/bits\";\nimport { NuiChartsModule } from \"@nova-ui/charts\";\n\nimport { NuiDashboardsCommonModule } from \"./common/common.module\";\nimport { WidgetErrorComponent } from \"./common/components/widget-error/widget-error.component\";\nimport { DashboardComponent } from \"./components/dashboard/dashboard.component\";\nimport { EmbeddedContentComponent } from \"./components/embedded-content/embedded-content.component\";\nimport { KpiComponent } from \"./components/kpi-widget/kpi.component\";\nimport { StackComponent } from \"./components/layouts/stack/stack.component\";\nimport { TilesComponent } from \"./components/layouts/tiles/tiles.component\";\nimport { ListGroupItemComponent } from \"./components/list-widget/list-elements/list-group-item/list-group-item.component\";\nimport { ListLeafItemComponent } from \"./components/list-widget/list-elements/list-leaf-item/list-leaf-item.component\";\nimport { ListNavigationBarComponent } from \"./components/list-widget/list-elements/list-navigation-bar/list-navigation-bar.component\";\nimport { ListWidgetComponent } from \"./components/list-widget/list-widget.component\";\nimport { LoadingComponent } from \"./components/loading/loading.component\";\nimport { ProportionalDonutContentComponent } from \"./components/proportional-widget/proportional-donut-content/proportional-donut-content.component\";\nimport { ProportionalWidgetComponent } from \"./components/proportional-widget/proportional-widget.component\";\nimport { RefresherSettingsService } from \"./components/providers/refresher-settings.service\";\nimport { DelayedMousePresenceDetectionDirective } from \"./components/table-widget/delayed-mouse-presence-detection.directive\";\nimport { TableWidgetComponent } from \"./components/table-widget/table-widget.component\";\nimport { TemplateLoadErrorComponent } from \"./components/template-load-error/template-load-error.component\";\nimport { TimeframeSelectionComponent } from \"./components/time-frame-selection/timeframe-selection.component\";\nimport { StatusBarChartComponent } from \"./components/timeseries-widget/chart-presets/status-bar-chart/status-bar-chart.component\";\nimport { LineChartComponent } from \"./components/timeseries-widget/chart-presets/xy-chart/chart-types/line-chart.component\";\nimport { StackedAreaChartComponent } from \"./components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-area-chart.component\";\nimport { StackedBarChartComponent } from \"./components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-bar-chart.component\";\nimport { StackedPercentageAreaChartComponent } from \"./components/timeseries-widget/chart-presets/xy-chart/chart-types/stacked-percentage-area-chart.component\";\nimport { TimeseriesWidgetComponent } from \"./components/timeseries-widget/timeseries-widget.component\";\nimport { WidgetSearchComponent } from \"./components/widget-search/widget-search.component\";\nimport { WidgetBodyContentComponent } from \"./components/widget/widget-body-content/widget-body-content.component\";\nimport { WidgetBodyComponent } from \"./components/widget/widget-body/widget-body.component\";\nimport { WidgetHeaderComponent } from \"./components/widget/widget-header/widget-header.component\";\nimport { WidgetComponent } from \"./components/widget/widget.component\";\nimport { NuiDashboardConfiguratorModule } from \"./configurator/configurator.module\";\nimport { DATA_SOURCE_OUTPUT } from \"./configurator/types\";\nimport { GridsterItemWidgetIdDirective } from \"./directives/gridster-item-widget-id/gridster-item-widget-id.directive\";\nimport { WidgetEditorDirective } from \"./directives/widget-editor/widget-editor.directive\";\nimport { NuiPizzagnaModule } from \"./pizzagna/pizzagna.module\";\nimport { ComponentPortalService } from \"./pizzagna/services/component-portal.service\";\nimport {\n ComponentRegistryService,\n IComponentWithLateLoadKey,\n} from \"./pizzagna/services/component-registry.service\";\nimport { EventRegistryService } from \"./services/event-registry.service\";\nimport { KpiFormattersRegistryService } from \"./services/table-formatter-registry.service\";\nimport {\n DASHBOARD_EDIT_MODE,\n DATA_SOURCE_BUSY,\n PREVIEW_EVENT,\n REFRESH,\n SET_PROPERTY_VALUE,\n SET_TIMEFRAME,\n WIDGET_CREATE,\n WIDGET_EDIT,\n WIDGET_POSITION_CHANGE,\n WIDGET_READY,\n WIDGET_REMOVE,\n WIDGET_RESIZE,\n} from \"./services/types\";\nimport { WidgetTypesService } from \"./services/widget-types.service\";\nimport { drilldown } from \"./widget-types/drilldown/drilldown\";\nimport { embeddedContent } from \"./widget-types/embedded-content/embedded-content\";\nimport { kpi } from \"./widget-types/kpi/kpi\";\nimport { DEFAULT_KPI_FORMATTERS } from \"./widget-types/kpi/kpi-configurator\";\nimport { previewPlaceholder } from \"./widget-types/preview-placeholder\";\nimport { proportional } from \"./widget-types/proportional/proportional\";\nimport { table } from \"./widget-types/table/table\";\nimport { timeseries } from \"./widget-types/timeseries/timeseries\";\n\nconst dashboardComponents = [\n DashboardComponent,\n EmbeddedContentComponent,\n GridsterItemWidgetIdDirective,\n KpiComponent,\n LineChartComponent,\n LoadingComponent,\n ProportionalWidgetComponent,\n StackComponent,\n StackedAreaChartComponent,\n StackedBarChartComponent,\n StackedPercentageAreaChartComponent,\n StatusBarChartComponent,\n TableWidgetComponent,\n DelayedMousePresenceDetectionDirective,\n TemplateLoadErrorComponent,\n TilesComponent,\n TimeframeSelectionComponent,\n TimeseriesWidgetComponent,\n WidgetBodyComponent,\n WidgetBodyContentComponent,\n WidgetComponent,\n WidgetEditorDirective,\n WidgetHeaderComponent,\n ListWidgetComponent,\n ListLeafItemComponent,\n ListGroupItemComponent,\n ListNavigationBarComponent,\n WidgetSearchComponent,\n ProportionalDonutContentComponent,\n];\n\nconst entryComponents: IComponentWithLateLoadKey[] = [\n EmbeddedContentComponent,\n KpiComponent,\n LineChartComponent,\n LoadingComponent,\n ProportionalWidgetComponent,\n StackComponent,\n StackedAreaChartComponent,\n StackedBarChartComponent,\n StackedPercentageAreaChartComponent,\n StatusBarChartComponent,\n TableWidgetComponent,\n TemplateLoadErrorComponent,\n TilesComponent,\n TimeframeSelectionComponent,\n TimeseriesWidgetComponent,\n WidgetBodyComponent,\n WidgetBodyContentComponent,\n WidgetHeaderComponent,\n WidgetErrorComponent,\n ListWidgetComponent,\n ListLeafItemComponent,\n ListGroupItemComponent,\n ListNavigationBarComponent,\n WidgetSearchComponent,\n ProportionalDonutContentComponent,\n];\n\n@NgModule({\n imports: [\n NuiDashboardsCommonModule,\n GridsterModule,\n NuiBusyModule,\n NuiButtonModule,\n NuiChartsModule,\n NuiDashboardConfiguratorModule,\n NuiIconModule,\n NuiImageModule,\n NuiMenuModule,\n NuiPizzagnaModule,\n NuiPopupModule,\n NuiProgressModule,\n NuiTableModule,\n NuiTimeFrameBarModule,\n ScrollingModule,\n NuiTimeFramePickerModule,\n ReactiveFormsModule,\n NuiSpinnerModule,\n NuiTooltipModule,\n NuiSearchModule,\n NuiCommonModule,\n NuiRepeatModule,\n NuiSelectModule,\n ],\n declarations: dashboardComponents,\n providers: [\n ComponentPortalService,\n WidgetTypesService,\n DecimalPipe,\n RefresherSettingsService,\n ],\n exports: dashboardComponents,\n})\nexport class NuiDashboardsModule {\n constructor(\n widgetTypesService: WidgetTypesService,\n componentRegistry: ComponentRegistryService,\n eventRegistry: EventRegistryService,\n kpiFormattersRegistry: KpiFormattersRegistryService\n ) {\n widgetTypesService.registerWidgetType(\"kpi\", 1, kpi);\n widgetTypesService.registerWidgetType(\"table\", 1, table);\n widgetTypesService.registerWidgetType(\"proportional\", 1, proportional);\n widgetTypesService.registerWidgetType(\"timeseries\", 1, timeseries);\n widgetTypesService.registerWidgetType(\n \"previewPlaceholder\",\n 1,\n previewPlaceholder\n );\n widgetTypesService.registerWidgetType(\n \"embedded-content\",\n 1,\n embeddedContent\n );\n widgetTypesService.registerWidgetType(\"drilldown\", 1, drilldown);\n\n for (const ec of entryComponents.filter(\n (c: IComponentWithLateLoadKey) => c.lateLoadKey\n )) {\n componentRegistry.registerByLateLoadKey(ec);\n }\n\n eventRegistry.registerEvent(REFRESH);\n eventRegistry.registerEvent(WIDGET_REMOVE);\n eventRegistry.registerEvent(WIDGET_READY);\n eventRegistry.registerEvent(WIDGET_EDIT);\n eventRegistry.registerEvent(WIDGET_CREATE);\n eventRegistry.registerEvent(WIDGET_RESIZE);\n eventRegistry.registerEvent(WIDGET_POSITION_CHANGE);\n eventRegistry.registerEvent(SET_PROPERTY_VALUE);\n eventRegistry.registerEvent(SET_TIMEFRAME);\n eventRegistry.registerEvent(PREVIEW_EVENT);\n eventRegistry.registerEvent(DASHBOARD_EDIT_MODE);\n eventRegistry.registerEvent(DATA_SOURCE_OUTPUT);\n eventRegistry.registerEvent(DATA_SOURCE_BUSY);\n\n kpiFormattersRegistry.addItems(DEFAULT_KPI_FORMATTERS);\n }\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./add-data.pipe\";\nexport * from \"./pizzagna-root.pipe\";\nexport * from \"./widget-configurator-section-header.pipe\";\nexport * from \"./widget-editor-accordion-form-state.pipe\";\nexport * from \"./widget-editor-accordion-header-icon.pipe\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./has-control-in-error-state\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi-tiles-configuration.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi-tiles-configuration/public-api\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./filters-editor/table-filters-editor.component\";\nexport * from \"./columns-editor/table-columns-configuration.component\";\nexport * from \"./columns-editor/column-configuration/presentation-configuration/portals/formatter-configurator.component\";\nexport * from \"./columns-editor/column-configuration/presentation-configuration/portals/link-configurator/link-configurator.component\";\nexport * from \"./columns-editor/column-configuration/presentation-configuration/portals/value-selector/value-selector.component\";\nexport * from \"./columns-editor/column-configuration/presentation-configuration/presentation-configuration.component\";\nexport * from \"./columns-editor/column-configuration/description-configuration/description-configuration.component\";\nexport * from \"./columns-editor-v2/column-configuration/description-configuration/description-configuration-v2.component\";\nexport * from \"./columns-editor-v2/column-configuration/presentation-configuration/presentation-configuration-v2.component\";\nexport * from \"./columns-editor-v2/column-configuration/table-column-configuration/table-column-configuration.component\";\nexport * from \"./columns-editor-v2/table-columns-configuration-v2.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"../configurator-items/timeseries-metadata-configuration/timeseries-metadata-configuration.component\";\nexport * from \"./timeseries-series-collection-configuration/timeseries-series-collection-configuration.component\";\nexport * from \"./timeseries-tile-description-configuration/timeseries-tile-description-configuration.component\";\nexport * from \"./timeseries-tile-indicator-data-configuration/timeseries-tile-indicator-data-configuration.component\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./chart-options-editor/proportional-chart-options-editor.component\";\nexport * from \"./chart-options-editor-v2/proportional-chart-options-editor-v2.component\";\nexport * from \"./donut-content-configuration/donut-content-configuration.component\";\nexport * from \"./aggregators-configurators/aggregator-configurator/aggregator-configurator.component\";\nexport * from \"./aggregators-configurators/field-mapper-aggregator-configurator/field-mapper-aggregator-configurator.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./refresher-configuration.component\";\nexport * from \"./refresh-rate-configurator/refresh-rate-configurator.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./data-source-error.component\";\nexport * from \"./table/table-data-source-error.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./data-source-configuration/data-source-configuration.component\";\nexport * from \"./data-source-configuration-v2/data-source-configuration-v2.component\";\nexport * from \"./kpi-description-configuration/kpi-description-configuration.component\";\nexport * from \"./thresholds-configuration/thresholds-configuration.component\";\nexport * from \"./title-and-description-configuration/title-and-description-configuration.component\";\nexport * from \"./refresher-configuration/public-api\";\nexport * from \"./embedded-content-configuration/embedded-content-configuration.component\";\nexport * from \"./info-message-configuration/info-message-configuration.component\";\nexport * from \"./background-color-rules-configuration/background-color-rules-configuration.component\";\nexport * from \"./data-source-error/public-api\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport { EntityFormattingConfigurationComponent } from \"./entity-formatting-configuration/entity-formatting-configuration.component\";\nexport { GroupingConfigurationComponent } from \"./grouping-configuration/grouping-configuration.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi/public-api\";\nexport * from \"./table/public-api\";\nexport * from \"./timeseries/public-api\";\nexport * from \"./proportional/public-api\";\nexport * from \"./configurator-items/public-api\";\nexport * from \"./drilldown/public-api\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashwiz.component\";\nexport * from \"./dashwiz-buttons.component\";\nexport * from \"./model\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashwiz-step.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashwiz/public-api\";\nexport * from \"./dashwiz-step/public-api\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./configurator/configurator.component\";\nexport * from \"./widgets/public-api\";\nexport * from \"./wizard/public-api\";\nexport * from \"./types\";\nexport * from \"./form-stack/form-stack.component\";\nexport * from \"./formatters/link-formatter/link-formatter.component\";\nexport * from \"./formatters/status-with-icon-formatter/status-with-icon-formatter.component\";\nexport * from \"./formatters/raw-formatter/raw-formatter.component\";\nexport * from \"./formatters/percentage-formatter/percentage-formatter.component\";\nexport * from \"./formatters/donut-content-percentage-formatter/donut-content-percentage-formatter.component\";\nexport * from \"./formatters/donut-content-percentage-formatter/donut-content-percentage-configuration.component\";\nexport * from \"./formatters/donut-content-sum-formatter/donut-content-sum-formatter.component\";\nexport * from \"./formatters/donut-content-raw-formatter/donut-content-raw-formatter.component\";\nexport * from \"./formatters/widget-formatter-configurators/donut-formatter-configurator.component\";\nexport * from \"./formatters/icon-formatter/icon-formatter.component\";\nexport * from \"./formatters/si-units-formatter/si-units-formatter.component\";\nexport * from \"./heading/configurator-heading.component\";\nexport * from \"./items-dynamic/items-dynamic.component\";\nexport * from \"./preview-placeholder/preview-placeholder.component\";\nexport * from \"./widget-cloner/widget-cloner.component\";\nexport * from \"./widget-configurator-section/widget-configurator-section.component\";\nexport * from \"./widget-editor/widget-editor.component\";\nexport * from \"./widget-editor-accordion/widget-editor-accordion.component\";\nexport * from \"./color-picker/color-picker.component\";\nexport * from \"./drop-area/drop-area.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./pipe/public-api\";\nexport * from \"./functions/public-api\";\nexport * from \"./services/public-api\";\nexport * from \"./components/public-api\";\nexport * from \"./configurator.module\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashboard.component\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./widget.component\";\nexport * from \"./widget-header/widget-header.component\";\nexport * from \"./widget-body/widget-body.component\";\nexport * from \"./widget-body-content/widget-body-content.component\";\nexport * from \"./widget-header/types\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./stack/stack.component\";\nexport * from \"./tiles/tiles.component\";\nexport * from \"./base-layout\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./proportional-widget.component\";\nexport * from \"./proportional-donut-content/proportional-donut-content.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { IFormatter } from \"../types\";\n\nexport enum KpiFormatterTypes {\n // ROOT ?\n Value = \"Value\",\n}\n\nexport interface IKpiData {\n id?: string;\n value?: any;\n units?: string;\n label?: string;\n backgroundColor?: string;\n textColor?: string;\n fontSize?: string;\n numberFormat?: string;\n link?: string;\n [key: string]: any;\n}\n\nexport interface IKpiConfiguration {\n interactive?: boolean;\n formatters?: IKpiFormattersConfiguration;\n}\n\nexport interface IKpiFormattersConfiguration\n extends Partial<\n Record<\n KpiFormatterTypes | string,\n {\n formatter: IFormatter;\n }\n >\n > {}\nexport interface IKpiFormatterProperties\n extends Partial<Record<KpiFormatterTypes | string, any>> {}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./kpi.component\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport moment from \"moment/moment\";\n\nimport { ITimeframe } from \"@nova-ui/bits\";\n\nimport { ITimeseriesWidgetData } from \"../../types\";\n\n/**\n * Use this function to apply endpoints on status data returned by a data source so that when the status\n * chart is zoomed (filtered), each status visualization is ensured to have valid start and end values\n *\n * @param timeframeFilter The timeframe used for filtering the data\n * @param filteredSeriesData The series data after the filter is applied\n * @param originalSeriesData The superset of series data with no filter applied\n *\n * @returns The filtered data including start and end data points applied to each series\n */\nexport function applyStatusEndpoints(\n timeframeFilter: ITimeframe,\n filteredSeriesData: ITimeseriesWidgetData[],\n originalSeriesData: ITimeseriesWidgetData[]\n): ITimeseriesWidgetData[] {\n const filteredDataWithEndpoints = filteredSeriesData;\n originalSeriesData.forEach((series: ITimeseriesWidgetData, i: number) => {\n if (series.data.length === 0) {\n return;\n }\n\n let startIndex = -1;\n let endIndex = -1;\n\n const filteredData = filteredSeriesData[i].data;\n if (filteredData.length > 0) {\n // if we have filtered data, get the start and end indexes from the original unfiltered data\n startIndex = series.data.findIndex((datum) =>\n moment(datum.x).isSame(filteredData[0].x)\n );\n endIndex = series.data.findIndex((datum) =>\n moment(datum.x).isSame(filteredData[filteredData.length - 1].x)\n );\n } else {\n // if the filter doesn't overlap any data points, use the indexes of the first data points\n // in the original data that come after the start and before end filter date times respectively\n startIndex = series.data.findIndex((datum) =>\n moment(datum.x).isAfter(timeframeFilter.startDatetime)\n );\n endIndex =\n series.data.findIndex((datum) =>\n moment(datum.x).isAfter(timeframeFilter.endDatetime)\n ) - 1;\n }\n\n const filterStartMoment = moment(timeframeFilter.startDatetime);\n if (\n (filteredData.length === 0 ||\n !filterStartMoment.isSame(filteredData[0].x)) &&\n filterStartMoment.isBetween(\n series.data[0].x,\n series.data[series.data.length - 1].x\n )\n ) {\n filteredDataWithEndpoints[i].data.unshift({\n ...series.data[startIndex - 1],\n x: timeframeFilter.startDatetime.toDate(),\n });\n }\n\n const filterEndMoment = moment(timeframeFilter.endDatetime);\n if (\n (filteredData.length === 0 ||\n !filterEndMoment.isSame(\n filteredData[filteredData.length - 1].x\n )) &&\n filterEndMoment.isBetween(\n series.data[0].x,\n series.data[series.data.length - 1].x\n )\n ) {\n filteredDataWithEndpoints[i].data.push({\n ...series.data[endIndex],\n x: timeframeFilter.endDatetime.toDate(),\n });\n }\n });\n\n return filteredDataWithEndpoints;\n}\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./xy-chart/xy-chart.component\";\nexport * from \"./xy-chart/chart-types/line-chart.component\";\nexport * from \"./xy-chart/chart-types/stacked-area-chart.component\";\nexport * from \"./xy-chart/chart-types/stacked-bar-chart.component\";\nexport * from \"./xy-chart/chart-types/stacked-percentage-area-chart.component\";\nexport * from \"./status-bar-chart/status-bar-chart.component\";\nexport * from \"./status-bar-chart/apply-status-endpoints\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./timeseries-widget.component\";\nexport * from \"./timeseries-chart-preset.service\";\nexport * from \"./chart-presets/public-api\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./table-widget.component\";\nexport * from \"./delayed-mouse-presence-detection.directive\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./refresher\";\nexport * from \"./refresher-settings.service\";\nexport * from \"./data-source-adapter\";\nexport * from \"./timeseries-data-source-adapter\";\nexport * from \"./table-data-source-adapter\";\nexport * from \"./interaction/interaction-handler\";\nexport * from \"./interaction/url-interaction-handler\";\nexport * from \"./types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./timeframe-selection.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./loading.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./types\";\nexport * from \"./list-widget.component\";\nexport * from \"./list-elements/list-leaf-item/list-leaf-item.component\";\nexport * from \"./list-elements/list-group-item/list-group-item.component\";\nexport * from \"./list-elements/list-navigation-bar/list-navigation-bar.component\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./dashboard/public-api\";\nexport * from \"./widget/public-api\";\nexport * from \"./layouts/public-api\";\nexport * from \"./template-load-error/template-load-error.component\";\nexport * from \"./proportional-widget/public-api\";\nexport * from \"./kpi-widget/public-api\";\nexport * from \"./timeseries-widget/public-api\";\nexport * from \"./table-widget/public-api\";\nexport * from \"./providers/public-api\";\nexport * from \"./types\";\nexport * from \"./time-frame-selection/public-api\";\nexport * from \"./loading/public-api\";\nexport * from \"./embedded-content/embedded-content.component\";\nexport * from \"./list-widget/public-api\";\nexport * from \"./widget-search/widget-search.component\";\nexport * from \"./widget-search/types\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./widget-editor.directive\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./widget-editor/public-api\";\nexport * from \"./gridster-item-widget-id/gridster-item-widget-id.directive\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./percentage-aggregator\";\nexport * from \"./sum-aggregator\";\nexport * from \"./types\";\nexport * from \"./field-mapper\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./proportional-aggregators/public-api\";\nexport * from \"./merge-changes\";\nexport * from \"./map-data-to-formatter-properties\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./components\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./components\";\nexport * from \"./providers\";\nexport * from \"./types\";\nexport * from \"./legend\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./configurator/public-api\";\nexport * from \"./widget/public-api\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-len */\nimport { IBroadcasterConfig } from \"../../components/providers/types\";\nimport { WidgetConfiguratorSectionComponent } from \"../../configurator/components/widget-configurator-section/widget-configurator-section.component\";\nimport { ProportionalChartOptionsEditorV2Component } from \"../../configurator/components/widgets/proportional/chart-options-editor-v2/proportional-chart-options-editor-v2.component\";\nimport { DonutContentConfigurationComponent } from \"../../configurator/components/widgets/proportional/donut-content-configuration/donut-content-configuration.component\";\nimport {\n NOVA_GENERIC_CONVERTER,\n NOVA_PIZZAGNA_BROADCASTER,\n} from \"../../services/types\";\nimport { WellKnownProviders } from \"../../types\";\nimport { LegendPlacement } from \"../../widget-types/common/widget/legend\";\n\nexport const DONUT_CONTENT_CONFIGURATION_SLICE = {\n presentation: {\n id: \"presentation\",\n componentType: WidgetConfiguratorSectionComponent.lateLoadKey,\n properties: {\n headerText: \"Presentation\",\n nodes: [\n \"titleAndDescription\",\n \"chartOptionsEditor\",\n \"donutContentConfiguration\",\n ],\n },\n },\n chartOptionsEditor: {\n id: \"chartOptionsEditor\",\n componentType: ProportionalChartOptionsEditorV2Component.lateLoadKey,\n properties: {\n chartTypes: [\n {\n id: \"PieChart\",\n label: $localize`Pie`,\n },\n {\n id: \"DonutChart\",\n label: $localize`Donut`,\n },\n {\n id: \"VerticalBarChart\",\n label: $localize`Vertical Bar`,\n },\n {\n id: \"HorizontalBarChart\",\n label: $localize`Horizontal Bar`,\n },\n ],\n legendPlacementOptions: [\n {\n id: LegendPlacement.None,\n label: $localize`None`,\n },\n {\n id: LegendPlacement.Right,\n label: $localize`Right`,\n },\n {\n id: LegendPlacement.Bottom,\n label: $localize`Bottom`,\n },\n ],\n },\n providers: {\n // converter transforms the chart options data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath:\n \"chart.properties.configuration.chartOptions\",\n keys: [\n \"type\",\n \"legendPlacement\",\n \"legendFormatter\",\n ],\n },\n // {\n // previewPath: \"chart.properties.configuration\",\n // keys: [\"legendFormatter\"],\n // },\n ],\n },\n },\n [WellKnownProviders.Broadcaster]: {\n providerId: NOVA_PIZZAGNA_BROADCASTER,\n properties: {\n configs: [\n {\n trackOn: \"component\",\n key: \"chartTypeChanged$\",\n paths: [\n \"data.donutContentConfiguration.properties.chartType\",\n ],\n },\n ] as IBroadcasterConfig[],\n },\n },\n },\n },\n // /presentation/donutContentConfiguration\n donutContentConfiguration: {\n id: \"donutContentConfiguration\",\n componentType: DonutContentConfigurationComponent.lateLoadKey,\n providers: {\n // converter transforms the chart options data between the widget and the form\n [WellKnownProviders.Converter]: {\n providerId: NOVA_GENERIC_CONVERTER,\n properties: {\n formParts: [\n {\n previewPath:\n \"chart.properties.configuration.chartOptions.donutContentConfig\",\n keys: [\"formatter\", \"aggregator\"],\n },\n ],\n },\n },\n },\n },\n};\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./common/public-api\";\nexport { DEFAULT_KPI_FORMATTERS } from \"./kpi/kpi-configurator\";\nexport {\n DEFAULT_PROPORTIONAL_CONTENT_FORMATTERS,\n DEFAULT_PROPORTIONAL_CONTENT_AGGREGATORS,\n DEFAULT_LEGEND_FORMATTERS,\n} from \"./proportional/proportional-configurator\";\nexport * from \"./proportional/donut-content-configurator-slice\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./default-palette\";\n","// © 2022 SolarWinds Worldwide, LLC. All rights reserved.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport * from \"./lib/common/public-api\";\nexport * from \"./lib/dashboards.module\";\nexport * from \"./lib/types\";\nexport * from \"./lib/services/public-api\";\nexport * from \"./lib/configurator/public-api\";\nexport * from \"./lib/pizzagna/public-api\";\nexport * from \"./lib/components/public-api\";\nexport * from \"./lib/directives/public-api\";\nexport * from \"./lib/functions/public-api\";\nexport * from \"./lib/widget-types/public-api\";\nexport * from \"./lib/constants/public-api\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["difference","_defaultsDeep","isNil","Subject","entryComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;MA6Ba,uBAAuB;;AACzB,mCAAW,GAAG,yBAAyB,CAAC;wIADtC,uBAAuB;4HAAvB,uBAAuB,2DALtB;;WAEH;4FAGE,uBAAuB;kBAPnC,SAAS;+BACI,qBAAqB,YACrB;;WAEH;;;AC1BX;MAoCa,oBAAoB;IAmB7B,YAAmB,cAAiC;QAAjC,mBAAc,GAAd,cAAc,CAAmB;QAdpC,mBAAc,GAC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