@adaptabletools/adaptable-cjs 23.0.0-canary.8 → 23.0.0-canary.9

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 (276) hide show
  1. package/index.css +29 -14
  2. package/package.json +1 -1
  3. package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +2 -3
  4. package/src/AdaptableState/Common/Enums.d.ts +0 -12
  5. package/src/AdaptableState/Common/Enums.js +1 -16
  6. package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
  7. package/src/{Utilities → AdaptableState/Common}/MenuItem.js +1 -1
  8. package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +5 -5
  9. package/src/AdaptableState/StyledColumns/Common/{BarChartCellText.d.ts → BarStyleProperties.d.ts} +34 -10
  10. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +2 -2
  11. package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +2 -2
  12. package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +5 -5
  13. package/src/Api/Implementation/AlertApiImpl.js +1 -1
  14. package/src/Api/Implementation/ChartingApiImpl.js +5 -5
  15. package/src/Api/Implementation/ExportApiImpl.js +1 -1
  16. package/src/Api/Implementation/LayoutHelpers.js +2 -3
  17. package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
  18. package/src/Api/Implementation/ThemeApiImpl.js +2 -2
  19. package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
  20. package/src/Api/Internal/AlertInternalApi.js +1 -1
  21. package/src/Api/Internal/ChartingInternalApi.js +2 -2
  22. package/src/Api/Internal/ColumnInternalApi.js +2 -2
  23. package/src/Api/Internal/EventInternalApi.js +3 -4
  24. package/src/Api/Internal/ExportInternalApi.js +2 -2
  25. package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
  26. package/src/Api/Internal/GridInternalApi.js +1 -1
  27. package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
  28. package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
  29. package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
  30. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
  31. package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
  32. package/src/Redux/Store/AdaptableStore.js +5 -5
  33. package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
  34. package/src/Strategy/AdaptableModuleBase.js +1 -1
  35. package/src/Strategy/AlertModule.d.ts +1 -1
  36. package/src/Strategy/AlertModule.js +2 -2
  37. package/src/Strategy/BulkUpdateModule.d.ts +1 -1
  38. package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
  39. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  40. package/src/Strategy/ChartingModule.d.ts +1 -1
  41. package/src/Strategy/ChartingModule.js +4 -4
  42. package/src/Strategy/ColumnInfoModule.d.ts +2 -2
  43. package/src/Strategy/CommentModule.d.ts +1 -1
  44. package/src/Strategy/CustomSortModule.d.ts +1 -1
  45. package/src/Strategy/ExportModule.js +2 -2
  46. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  47. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  48. package/src/Strategy/GridInfoModule.d.ts +2 -2
  49. package/src/Strategy/LayoutModule.js +2 -2
  50. package/src/Strategy/NoteModule.d.ts +1 -1
  51. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  52. package/src/Strategy/PlusMinusModule.js +8 -8
  53. package/src/Strategy/SettingsPanelModule.d.ts +2 -2
  54. package/src/Strategy/SmartEditModule.d.ts +1 -1
  55. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  56. package/src/Strategy/TeamSharingModule.js +4 -4
  57. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
  58. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  59. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
  60. package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
  61. package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
  62. package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
  63. package/src/Utilities/Extensions/NumberExtensions.js +78 -0
  64. package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
  65. package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
  66. package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
  67. package/src/Utilities/Extensions/StringExtensions.js +49 -3
  68. package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
  69. package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
  70. package/src/Utilities/Helpers/DateHelper.js +2 -2
  71. package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
  72. package/src/Utilities/Helpers/Helper.d.ts +0 -6
  73. package/src/Utilities/Helpers/Helper.js +0 -38
  74. package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
  75. package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
  76. package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
  77. package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
  78. package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
  79. package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
  80. package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
  81. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
  82. package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
  83. package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
  84. package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
  85. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
  86. package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +16 -1
  87. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
  88. package/src/Utilities/Helpers/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +48 -47
  89. package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
  90. package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
  91. package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
  92. package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
  93. package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -2
  94. package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -12
  95. package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
  96. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
  97. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
  98. package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
  99. package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
  100. package/src/Utilities/ObjectFactory.js +1 -1
  101. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
  102. package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
  103. package/src/Utilities/Services/LicenseService/index.js +1 -1
  104. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  105. package/src/Utilities/Services/RowSummaryService.js +6 -6
  106. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
  107. package/src/View/Alert/Utilities/getAlertType.js +1 -1
  108. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
  109. package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
  110. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
  111. package/src/View/Alert/Wizard/AlertButtonsEditor.js +3 -3
  112. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
  113. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
  114. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
  115. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  116. package/src/View/Alert/Wizard/AlertWizard.js +1 -1
  117. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  118. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
  119. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  120. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  121. package/src/View/Comments/CommentsEditor.js +2 -2
  122. package/src/View/Comments/CommentsPopup.js +2 -2
  123. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
  124. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  125. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  126. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
  127. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
  128. package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
  129. package/src/View/Components/Popups/Utilities.js +5 -5
  130. package/src/View/Components/RangesComponent.d.ts +3 -3
  131. package/src/View/Components/RangesComponent.js +5 -9
  132. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
  133. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
  134. package/src/View/Dashboard/CustomDashboardButton.js +2 -3
  135. package/src/View/Dashboard/Dashboard.js +2 -2
  136. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
  137. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
  138. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
  139. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
  140. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
  141. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
  142. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
  143. package/src/View/Layout/LayoutViewPanel.js +2 -2
  144. package/src/View/Note/NoteEditor.js +2 -2
  145. package/src/View/Note/NotePopup.js +2 -2
  146. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
  147. package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
  148. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  149. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  150. package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
  151. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +16 -20
  152. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
  153. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +4 -4
  154. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -16
  155. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
  156. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
  157. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
  158. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.d.ts → BarStyleCellTextPreview.d.ts} +6 -6
  159. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.js → BarStyleCellTextPreview.js} +9 -9
  160. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
  161. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
  162. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +7 -7
  163. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +4 -4
  164. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +19 -17
  165. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +7 -7
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +2 -2
  167. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -15
  168. package/src/View/UIHelper.js +1 -1
  169. package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
  170. package/src/View/Wizard/OnePageWizards.js +3 -1
  171. package/src/agGrid/AdaptableAgGrid.js +11 -11
  172. package/src/agGrid/AgGridColumnAdapter.js +30 -29
  173. package/src/agGrid/AgGridExportAdapter.js +3 -3
  174. package/src/agGrid/AgGridMenuAdapter.js +129 -4
  175. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -2
  176. package/src/agGrid/cellRenderers/BulletChartRenderer.js +8 -8
  177. package/src/agGrid/cellRenderers/IconRenderer.js +7 -8
  178. package/src/agGrid/cellRenderers/PercentBarRenderer.js +9 -9
  179. package/src/agGrid/cellRenderers/RangeBarRenderer.js +10 -11
  180. package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
  181. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  182. package/src/components/ColorPicker/ColorPicker.js +2 -2
  183. package/src/components/Datepicker/index.js +2 -2
  184. package/src/components/FormLayout/index.js +2 -2
  185. package/src/components/OverlayTrigger/index.js +2 -2
  186. package/src/env.js +2 -2
  187. package/src/layout-manager/src/isLayoutEqual.js +4 -5
  188. package/src/metamodel/adaptable.metamodel.d.ts +41 -8
  189. package/src/metamodel/adaptable.metamodel.js +1 -1
  190. package/src/migration/VersionUpgrade23.js +2 -2
  191. package/src/types.d.ts +3 -3
  192. package/tsconfig.cjs.tsbuildinfo +1 -1
  193. package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -7
  194. package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +0 -24
  195. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
  196. package/src/Utilities/Helpers/barChartCellText.d.ts +0 -63
  197. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
  198. package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -18
  199. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
  200. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
  201. package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
  202. package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
  203. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
  204. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
  205. package/src/Utilities/utils/chunk.d.ts +0 -6
  206. package/src/Utilities/utils/chunk.js +0 -20
  207. package/src/Utilities/utils/clamp.d.ts +0 -5
  208. package/src/Utilities/utils/clamp.js +0 -10
  209. package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
  210. package/src/Utilities/utils/cloneDeepWith.js +0 -70
  211. package/src/Utilities/utils/debounce.d.ts +0 -20
  212. package/src/Utilities/utils/flatten.d.ts +0 -5
  213. package/src/Utilities/utils/flatten.js +0 -10
  214. package/src/Utilities/utils/flattenDeep.d.ts +0 -5
  215. package/src/Utilities/utils/flattenDeep.js +0 -10
  216. package/src/Utilities/utils/get.d.ts +0 -6
  217. package/src/Utilities/utils/get.js +0 -38
  218. package/src/Utilities/utils/index.d.ts +0 -22
  219. package/src/Utilities/utils/index.js +0 -48
  220. package/src/Utilities/utils/isArray.d.ts +0 -6
  221. package/src/Utilities/utils/isArray.js +0 -8
  222. package/src/Utilities/utils/isEqual.d.ts +0 -5
  223. package/src/Utilities/utils/isEqual.js +0 -127
  224. package/src/Utilities/utils/isObject.d.ts +0 -6
  225. package/src/Utilities/utils/isObject.js +0 -12
  226. package/src/Utilities/utils/isPlainObject.d.ts +0 -6
  227. package/src/Utilities/utils/isPlainObject.js +0 -20
  228. package/src/Utilities/utils/kebabCase.d.ts +0 -5
  229. package/src/Utilities/utils/kebabCase.js +0 -12
  230. package/src/Utilities/utils/merge.d.ts +0 -11
  231. package/src/Utilities/utils/merge.js +0 -44
  232. package/src/Utilities/utils/mergeWith.d.ts +0 -7
  233. package/src/Utilities/utils/mergeWith.js +0 -50
  234. package/src/Utilities/utils/orderBy.d.ts +0 -8
  235. package/src/Utilities/utils/orderBy.js +0 -33
  236. package/src/Utilities/utils/parseInt.d.ts +0 -6
  237. package/src/Utilities/utils/parseInt.js +0 -12
  238. package/src/Utilities/utils/sentenceCase.d.ts +0 -6
  239. package/src/Utilities/utils/sentenceCase.js +0 -19
  240. package/src/Utilities/utils/startCase.d.ts +0 -5
  241. package/src/Utilities/utils/startCase.js +0 -15
  242. package/src/Utilities/utils/throttle.d.ts +0 -17
  243. package/src/Utilities/utils/throttle.js +0 -23
  244. package/src/Utilities/utils/toNumber.d.ts +0 -5
  245. package/src/Utilities/utils/toNumber.js +0 -42
  246. package/src/Utilities/utils/uniq.d.ts +0 -7
  247. package/src/Utilities/utils/uniq.js +0 -12
  248. package/src/Utilities/utils/uniqBy.d.ts +0 -8
  249. package/src/Utilities/utils/uniqBy.js +0 -25
  250. package/src/Utilities/utils/words.d.ts +0 -7
  251. package/src/Utilities/utils/words.js +0 -13
  252. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -40
  253. package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
  254. package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
  255. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
  256. package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
  257. package/src/agGrid/createAgGridIcon.d.ts +0 -10
  258. package/src/agGrid/createAgGridIcon.js +0 -19
  259. /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
  260. /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
  261. /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
  262. /package/src/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js} +0 -0
  263. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
  264. /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
  265. /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
  266. /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
  267. /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
  268. /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
  269. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
  270. /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
  271. /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
  272. /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
  273. /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
  274. /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
  275. /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
  276. /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
@@ -4,8 +4,8 @@ exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope =
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
- const uniq_1 = tslib_1.__importDefault(require("../../../Utilities/utils/uniq"));
8
- const clamp_1 = tslib_1.__importDefault(require("../../../Utilities/utils/clamp"));
7
+ const ArrayExtensions_1 = require("../../../Utilities/Extensions/ArrayExtensions");
8
+ const NumberExtensions_1 = require("../../../Utilities/Extensions/NumberExtensions");
9
9
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
10
10
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
11
11
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
@@ -18,7 +18,7 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
18
18
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
19
19
  const Tag_1 = require("../../../components/Tag");
20
20
  const AdaptableContext_1 = require("../../AdaptableContext");
21
- const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/FormatHelper"));
21
+ const DisplayFormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/DisplayFormatHelper"));
22
22
  const Toggle_1 = require("../../../components/Toggle");
23
23
  const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
24
24
  const Textarea_1 = tslib_1.__importDefault(require("../../../components/Textarea"));
@@ -193,7 +193,7 @@ const getFormatDisplayTypeForScope = (scope, api) => {
193
193
  // Check for ColumnIds in scope
194
194
  if ('ColumnIds' in scope) {
195
195
  const columns = scope.ColumnIds.map((c) => api.columnApi.getColumnWithColumnId(c)).filter(Boolean);
196
- const columnDataTypes = (0, uniq_1.default)(columns.map((c) => c.dataType));
196
+ const columnDataTypes = (0, ArrayExtensions_1.uniq)(columns.map((c) => c.dataType));
197
197
  // If there's only one data type
198
198
  if (columnDataTypes.length === 1) {
199
199
  const dataType = columnDataTypes[0];
@@ -298,7 +298,7 @@ const DATE_FORMAT_PRESET_HEADER_HEIGHT = 40;
298
298
  const DateFormatPresetsTable = ({ onApplyPattern }) => {
299
299
  const rows = React.useMemo(() => DateFormatPresets.map((pattern) => ({
300
300
  pattern,
301
- formattedDate: FormatHelper_1.default.DateFormatter(new Date(), { Pattern: pattern }) ?? '',
301
+ formattedDate: DisplayFormatHelper_1.default.DateFormatter(new Date(), { Pattern: pattern }) ?? '',
302
302
  })), []);
303
303
  const columns = React.useMemo(() => ({
304
304
  pattern: {
@@ -331,7 +331,7 @@ const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatte
331
331
  return null;
332
332
  }
333
333
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Format" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Enter a Unicode date pattern (e.g. dd/MM/yyyy), or pick a preset below" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Pattern", children: [(0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "pattern", value: resolved.Options.Pattern ?? '', onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), className: "twa:mr-2" }), (0, jsx_runtime_1.jsx)("span", { children: resolved.Options.Pattern &&
334
- FormatHelper_1.default.DateFormatter(new Date(), resolved.Options, true) })] }) }) })] }), scopedCustomFormatters.length > 0 && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Custom Formats" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) })] })), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Presets" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a common date pattern as a starting point" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:px-0 twa:pt-0 twa:pb-1", children: (0, jsx_runtime_1.jsx)(DateFormatPresetsTable, { onApplyPattern: (pattern) => setFormatOption('Pattern', pattern) }) })] })] }));
334
+ DisplayFormatHelper_1.default.DateFormatter(new Date(), resolved.Options, true) })] }) }) })] }), scopedCustomFormatters.length > 0 && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Custom Formats" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a developer-defined formatter to this Column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: scopedCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)) }) })] })), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Presets" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Apply a common date pattern as a starting point" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:px-0 twa:pt-0 twa:pb-1", children: (0, jsx_runtime_1.jsx)(DateFormatPresetsTable, { onApplyPattern: (pattern) => setFormatOption('Pattern', pattern) }) })] })] }));
335
335
  };
336
336
  const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters, api) => {
337
337
  const resolved = (0, AdaptableFormatPresets_1.resolveDisplayFormat)(data.DisplayFormat);
@@ -367,9 +367,9 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
367
367
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": 'format-column-display-format', className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Presets" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick a common numeric preset as a starting point" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:m-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:mr-6", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-dollar", className: "twa:my-1", checked: IS_DOLLAR, onChange: () => setPreset('Dollar'), children: "Dollar" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-sterling", className: "twa:my-1", checked: IS_STERLING, onChange: () => setPreset('Sterling'), children: "Sterling" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-euro", className: "twa:my-1", checked: IS_EURO, onChange: () => setPreset('Euro'), children: "Euro" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-yen", className: "twa:my-1", checked: IS_YEN, onChange: () => setPreset('Yen'), children: "Yen" })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:mr-6", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-thousand", className: "twa:my-1", checked: IS_THOUSAND, onChange: () => setPreset('Thousand'), children: "K (Thousand)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-million", className: "twa:my-1", checked: IS_MILLION, onChange: () => setPreset('Million'), children: "M (Million)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-billion", className: "twa:my-1", checked: IS_BILLION, onChange: () => setPreset('Billion'), children: "B (Billion)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-basis-points", className: "twa:my-1", checked: IS_BASIS_POINTS, onChange: () => setPreset('BasisPoints'), children: "bps (Basis Pts)" })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:mr-6", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-integer", className: "twa:my-1", checked: IS_INTEGER, onChange: () => setPreset('Integer'), children: "Integer" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-decimal", className: "twa:my-1", checked: IS_DECIMAL, onChange: () => setPreset('Decimal'), children: "Decimal" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-percentage", className: "twa:my-1", checked: IS_PERCENT, onChange: () => setPreset('Percentage'), children: "Percentage" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-scientific", className: "twa:my-1", checked: IS_SCIENTIFIC, onChange: () => setPreset('Scientific'), children: "Scientific" })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-accounting", className: "twa:my-1", checked: IS_ACCOUNTING, onChange: () => setPreset('Accounting'), children: "Accounting" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-fx-rate", className: "twa:my-1", checked: IS_FX_RATE, onChange: () => setPreset('FXRate'), children: "FX Rate" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "preset-bitcoin", className: "twa:my-1", checked: IS_BITCOIN, onChange: () => setPreset('Bitcoin'), children: "Bitcoin" })] })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:pl-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Format" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Fine-tune digits, separators, prefix / suffix and rounding behaviour" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:px-0 twa:pt-0 twa:pb-1", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-row twa:items-start twa:-ml-0.5", children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: NUMBER_FORMAT_DIGIT_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, { name: 'children' }], className: "twa:mr-6 twa:shrink-0", children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Fraction Digits", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "fraction-digits", type: "number", min: "0", value: typeof resolved.Options.FractionDigits === 'number'
368
368
  ? resolved.Options.FractionDigits
369
369
  : '', onChange: (e) => setFormatOption('FractionDigits', StringExtensions_1.default.IsNumeric(e.currentTarget.value)
370
- ? (0, clamp_1.default)(Number(e.currentTarget.value), 0, 20)
370
+ ? (0, NumberExtensions_1.clamp)(Number(e.currentTarget.value), 0, 20)
371
371
  : undefined) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Integer Digits", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "integer-digits", type: "number", min: "0", value: resolved.Options.IntegerDigits, onChange: (e) => setFormatOption('IntegerDigits', StringExtensions_1.default.IsNumeric(e.currentTarget.value)
372
- ? (0, clamp_1.default)(Number(e.currentTarget.value), 0, 20)
372
+ ? (0, NumberExtensions_1.clamp)(Number(e.currentTarget.value), 0, 20)
373
373
  : undefined) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Fraction Separator", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "fraction-separator", value: resolved.Options.FractionSeparator ?? '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Integer Separator", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "integer-separator", value: resolved.Options.IntegerSeparator ?? '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) }) })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: NUMBER_FORMAT_VALUE_FORM_SIZES, columns: [NUMBER_FORMAT_LABEL_COLUMN, NUMBER_FORMAT_VALUE_CHILDREN_COLUMN], className: "twa:mr-5 twa:shrink-0", children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Multiplier", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "multiplier", type: "number", value: resolved.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Prefix", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "prefix", value: resolved.Options.Prefix ?? '', onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Suffix", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "suffix", value: resolved.Options.Suffix ?? '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Zero Display", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: NUMBER_FORMAT_INPUT_CLASS, "data-name": "zero-display", value: resolved.Options.ZeroDisplay === undefined ||
374
374
  resolved.Options.ZeroDisplay === '0'
375
375
  ? '0'
@@ -390,25 +390,25 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
390
390
  ] }), (0, jsx_runtime_1.jsx)(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
391
391
  { Content: GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, Size: 1 },
392
392
  {
393
- Content: FormatHelper_1.default.NumberFormatter(GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, resolved.Options),
393
+ Content: DisplayFormatHelper_1.default.NumberFormatter(GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, resolved.Options),
394
394
  Size: 1,
395
395
  },
396
396
  ] }), (0, jsx_runtime_1.jsx)(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
397
397
  { Content: '-' + GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, Size: 1 },
398
398
  {
399
- Content: FormatHelper_1.default.NumberFormatter(-GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, resolved.Options),
399
+ Content: DisplayFormatHelper_1.default.NumberFormatter(-GeneralConstants_1.DEFAULT_DOUBLE_DISPLAY_VALUE, resolved.Options),
400
400
  Size: 1,
401
401
  },
402
402
  ] }), (0, jsx_runtime_1.jsx)(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
403
403
  { Content: '0.123', Size: 1 },
404
404
  {
405
- Content: FormatHelper_1.default.NumberFormatter(0.123, resolved.Options),
405
+ Content: DisplayFormatHelper_1.default.NumberFormatter(0.123, resolved.Options),
406
406
  Size: 1,
407
407
  },
408
408
  ] }), (0, jsx_runtime_1.jsx)(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
409
409
  { Content: '0', Size: 1 },
410
410
  {
411
- Content: FormatHelper_1.default.NumberFormatter(0, resolved.Options),
411
+ Content: DisplayFormatHelper_1.default.NumberFormatter(0, resolved.Options),
412
412
  Size: 1,
413
413
  },
414
414
  ] })] })] })] }));
@@ -426,7 +426,7 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
426
426
  { Content: '"' + GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE + '"', Size: 1 },
427
427
  {
428
428
  Content: '"' +
429
- FormatHelper_1.default.StringFormatter(GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE, resolved.Options) +
429
+ DisplayFormatHelper_1.default.StringFormatter(GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE, resolved.Options) +
430
430
  '"',
431
431
  Size: 1,
432
432
  },
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const AdaptableFormatPresets_1 = require("../../../AdaptableState/Common/AdaptableFormatPresets");
7
7
  const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
8
- const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/FormatHelper"));
8
+ const DisplayFormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/DisplayFormatHelper"));
9
9
  const StyleHelper_1 = require("../../../Utilities/Helpers/StyleHelper");
10
10
  const Card_1 = require("../../../components/Card");
11
11
  const Flex_1 = require("../../../components/Flex");
@@ -52,13 +52,13 @@ const getFormatColumnPreviewText = (formatColumn, api) => {
52
52
  return String(sample);
53
53
  }
54
54
  if (resolved.Formatter === 'NumberFormatter' && typeof sample === 'number') {
55
- return FormatHelper_1.default.NumberFormatter(sample, resolved.Options) ?? String(sample);
55
+ return DisplayFormatHelper_1.default.NumberFormatter(sample, resolved.Options) ?? String(sample);
56
56
  }
57
57
  if (resolved.Formatter === 'DateFormatter') {
58
- return FormatHelper_1.default.DateFormatter(new Date(), resolved.Options) ?? String(sample);
58
+ return DisplayFormatHelper_1.default.DateFormatter(new Date(), resolved.Options) ?? String(sample);
59
59
  }
60
60
  if (resolved.Formatter === 'StringFormatter' && typeof sample === 'string') {
61
- return FormatHelper_1.default.StringFormatter(sample, resolved.Options) ?? sample;
61
+ return DisplayFormatHelper_1.default.StringFormatter(sample, resolved.Options) ?? sample;
62
62
  }
63
63
  return String(sample);
64
64
  };
@@ -8,7 +8,7 @@ const Radio_1 = tslib_1.__importStar(require("../../../components/Radio"));
8
8
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
10
10
  const CheckBox_1 = require("../../../components/CheckBox");
11
- const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
11
+ const DisplayFormatHelper_1 = require("../../../Utilities/Helpers/DisplayFormatHelper");
12
12
  const DateHelper_1 = require("../../../Utilities/Helpers/DateHelper");
13
13
  const Tag_1 = require("../../../components/Tag");
14
14
  const SpecialColumnSettingsWizardStep_1 = require("../../SpecialColumnSettingsWizardStep");
@@ -56,7 +56,7 @@ const FreeTextColumnSettingsWizardSection = (props) => {
56
56
  let e = event.target;
57
57
  let DefaultValue = e.value;
58
58
  if (data.FreeTextColumnSettings.DataType === 'date') {
59
- DefaultValue = (0, FormatHelper_1.DateFormatter)(DefaultValue, {
59
+ DefaultValue = (0, DisplayFormatHelper_1.DateFormatter)(DefaultValue, {
60
60
  Pattern,
61
61
  });
62
62
  }
@@ -6,7 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
8
8
  const react_redux_1 = require("react-redux");
9
- const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
9
+ const ObjectExtensions_1 = require("../../Utilities/Extensions/ObjectExtensions");
10
10
  const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
11
11
  const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
12
12
  const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants/GeneralConstants"));
@@ -24,7 +24,7 @@ const NewSelect_1 = require("../../components/NewSelect");
24
24
  exports.COMPONENT_LAYOUT_POPUP_NAME = 'LayoutEditorStandalonePopup';
25
25
  const LayoutViewPanelComponent = (props) => {
26
26
  const { Layouts, CurrentLayoutName, accessLevel, viewType, api, onSelectLayout, showMissingLayoutsError, } = props;
27
- const isErrorLayout = !Layouts.length || (Layouts.length === 1 && (0, isEqual_1.default)(Layouts[0], GeneralConstants_1.ERROR_LAYOUT));
27
+ const isErrorLayout = !Layouts.length || (Layouts.length === 1 && (0, ObjectExtensions_1.isEqual)(Layouts[0], GeneralConstants_1.ERROR_LAYOUT));
28
28
  React.useEffect(() => {
29
29
  if (isErrorLayout) {
30
30
  showMissingLayoutsError();
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoteEditor = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const throttle_1 = tslib_1.__importDefault(require("../../Utilities/utils/throttle"));
6
+ const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
7
7
  const React = tslib_1.__importStar(require("react"));
8
8
  const Textarea_1 = tslib_1.__importDefault(require("../../components/Textarea"));
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
@@ -15,7 +15,7 @@ const NoteEditor = ({ note, onNoteChange, onClose, editMode, isReadonly }) => {
15
15
  const textAreaRef = React.useRef(null);
16
16
  const [liveValue, setLiveValue] = React.useState(note || '');
17
17
  const throttledOnChange = React.useMemo(() => {
18
- const throttled = (0, throttle_1.default)((value) => onNoteChange(value), 300);
18
+ const throttled = (0, TimingHelper_1.throttle)((value) => onNoteChange(value), 300);
19
19
  return (value) => {
20
20
  setLiveValue(value);
21
21
  throttled(value);
@@ -11,7 +11,7 @@ const AdaptableContext_1 = require("../AdaptableContext");
11
11
  const AdaptableButton_1 = require("../Components/AdaptableButton");
12
12
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
13
13
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
14
- const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
14
+ const DisplayFormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/DisplayFormatHelper"));
15
15
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
16
16
  const tableDOMProps = {
17
17
  style: {
@@ -40,7 +40,7 @@ const NotePopup = (props) => {
40
40
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') ===
41
41
  GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
42
42
  const formatDate = (date, format) => {
43
- return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
43
+ return DisplayFormatHelper_1.default.DateFormatter(date, { Pattern: format });
44
44
  };
45
45
  const columnsMap = React.useMemo(() => {
46
46
  const columns = {
@@ -9,10 +9,10 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const Tag_1 = require("../../../components/Tag");
10
10
  const Flex_1 = require("../../../components/Flex");
11
11
  const Card_1 = require("../../../components/Card");
12
- const plusMinusTriggerKeys_1 = require("../../../Utilities/Helpers/plusMinusTriggerKeys");
12
+ const PlusMinusHelper_1 = require("../../../Utilities/Helpers/PlusMinusHelper");
13
13
  const PlusMinusSettingsSummary = () => {
14
14
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
15
- const { incrementKey, decrementKey } = (0, plusMinusTriggerKeys_1.resolvePlusMinusTriggerKeysForNudge)(data, api.optionsApi.getEditOptions().plusMinusOptions ?? {});
15
+ const { incrementKey, decrementKey } = (0, PlusMinusHelper_1.resolvePlusMinusTriggerKeysForNudge)(data, api.optionsApi.getEditOptions().plusMinusOptions ?? {});
16
16
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.Name || 'Not specified' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Nudge Value ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.NudgeValue ?? 'Not selected' })] }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_1.SummaryText, { children: ["Keys ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: incrementKey }), " / ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: decrementKey })] })] }));
17
17
  };
18
18
  exports.PlusMinusSettingsSummary = PlusMinusSettingsSummary;
@@ -31,7 +31,7 @@ const isSettingsValid = (data, api, _context) => {
31
31
  if (data.NudgeValue === 0) {
32
32
  return 'Nudge value must not be zero.';
33
33
  }
34
- if ((0, plusMinusTriggerKeys_1.plusMinusResolvedKeysConflict)(data, api.optionsApi.getEditOptions().plusMinusOptions ?? {})) {
34
+ if ((0, PlusMinusHelper_1.plusMinusResolvedKeysConflict)(data, api.optionsApi.getEditOptions().plusMinusOptions ?? {})) {
35
35
  return 'Increment and decrement keys cannot be the same for this nudge.';
36
36
  }
37
37
  return true;
@@ -40,8 +40,8 @@ exports.isSettingsValid = isSettingsValid;
40
40
  const PlusMinusSettingsWizardSection = (props) => {
41
41
  const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
42
42
  const pmOpts = api.optionsApi.getEditOptions().plusMinusOptions ?? {};
43
- const incrementBaseline = (0, plusMinusTriggerKeys_1.plusMinusIncrementKeyFromOptionsOnly)(pmOpts);
44
- const decrementBaseline = (0, plusMinusTriggerKeys_1.plusMinusDecrementKeyFromOptionsOnly)(pmOpts);
43
+ const incrementBaseline = (0, PlusMinusHelper_1.plusMinusIncrementKeyFromOptionsOnly)(pmOpts);
44
+ const decrementBaseline = (0, PlusMinusHelper_1.plusMinusDecrementKeyFromOptionsOnly)(pmOpts);
45
45
  const [incrementEdit, setIncrementEdit] = React.useState(undefined);
46
46
  const [decrementEdit, setDecrementEdit] = React.useState(undefined);
47
47
  React.useEffect(() => {
@@ -60,7 +60,7 @@ const PlusMinusSettingsWizardSection = (props) => {
60
60
  : decrementBaseline;
61
61
  const commitIncrementKey = React.useCallback((raw) => {
62
62
  const trimmed = raw.trim();
63
- const next = trimmed === '' || (0, plusMinusTriggerKeys_1.plusMinusTriggerSameAsBaseline)(trimmed, incrementBaseline)
63
+ const next = trimmed === '' || (0, PlusMinusHelper_1.plusMinusTriggerSameAsBaseline)(trimmed, incrementBaseline)
64
64
  ? undefined
65
65
  : trimmed;
66
66
  const prev = data.IncrementKey?.trim() || undefined;
@@ -70,7 +70,7 @@ const PlusMinusSettingsWizardSection = (props) => {
70
70
  }, [data, incrementBaseline, props.onChange]);
71
71
  const commitDecrementKey = React.useCallback((raw) => {
72
72
  const trimmed = raw.trim();
73
- const next = trimmed === '' || (0, plusMinusTriggerKeys_1.plusMinusTriggerSameAsBaseline)(trimmed, decrementBaseline)
73
+ const next = trimmed === '' || (0, PlusMinusHelper_1.plusMinusTriggerSameAsBaseline)(trimmed, decrementBaseline)
74
74
  ? undefined
75
75
  : trimmed;
76
76
  const prev = data.DecrementKey?.trim() || undefined;
@@ -15,7 +15,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Exte
15
15
  const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
16
16
  const QuickSearchInput_1 = require("./QuickSearchInput");
17
17
  const Card_1 = require("../../components/Card");
18
- const QuickSearchStyleHelper_1 = require("../../Utilities/Helpers/QuickSearchStyleHelper");
18
+ const QuickSearchHelper_1 = require("../../Utilities/Helpers/QuickSearchHelper");
19
19
  const QuickSearchStyleEditor = ({ api, helpText, headerText, style, updateStyle }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: headerText }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: helpText })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(StyleComponent_1.StyleComponent, { headless: true, hidePreview: true, className: "twa:h-full twa:flex-1 twa:rounded-none", api: api, Style: style, UpdateStyle: updateStyle }) })] }));
20
20
  const QuickSearchPopupComponent = (props) => {
21
21
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
@@ -34,10 +34,10 @@ function mapStateToProps(state, ownProps) {
34
34
  const quickSearch = state.QuickSearch;
35
35
  return {
36
36
  QuickSearchText: quickSearch.QuickSearchText,
37
- QuickSearchTextMatchStyle: (0, QuickSearchStyleHelper_1.resolveQuickSearchTextMatchStyle)(quickSearch),
38
- QuickSearchCurrentTextMatchStyle: (0, QuickSearchStyleHelper_1.resolveQuickSearchCurrentTextMatchStyle)(quickSearch),
37
+ QuickSearchTextMatchStyle: (0, QuickSearchHelper_1.resolveQuickSearchTextMatchStyle)(quickSearch),
38
+ QuickSearchCurrentTextMatchStyle: (0, QuickSearchHelper_1.resolveQuickSearchCurrentTextMatchStyle)(quickSearch),
39
39
  // Cell match: show only what is in state — defaults are not applied until explicitly set
40
- QuickSearchCellMatchStyle: (0, QuickSearchStyleHelper_1.isQuickSearchStyleUnset)(quickSearch.CellMatchStyle)
40
+ QuickSearchCellMatchStyle: (0, QuickSearchHelper_1.isQuickSearchStyleUnset)(quickSearch.CellMatchStyle)
41
41
  ? {}
42
42
  : quickSearch.CellMatchStyle,
43
43
  };
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useQuickSearchDebounced = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const react_1 = require("react");
6
- const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
5
+ const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
7
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
7
  const useQuickSearchDebounced = (props) => {
9
8
  const [searchText, setSearchText] = (0, react_1.useState)(props.QuickSearchText ?? '');
10
- const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0, debounce_1.default)(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
9
+ const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0, TimingHelper_1.debounce)(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
11
10
  (0, react_1.useEffect)(() => {
12
11
  setSearchText(props.QuickSearchText);
13
12
  }, [props.QuickSearchText]);
@@ -13,7 +13,7 @@ const Flex_1 = require("../../../components/Flex");
13
13
  const Card_1 = require("../../../components/Card");
14
14
  const NewSelect_1 = require("../../../components/NewSelect");
15
15
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
16
- const ScheduleHelper_1 = require("../../../Utilities/Helpers/ScheduleHelper");
16
+ const ScheduleHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduleHelper");
17
17
  const isScheduleValid = (holder) => {
18
18
  if (!holder?.Schedule) {
19
19
  return 'Schedule is not specified';
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpecialColumnSettingsWizardStep = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const chunk_1 = tslib_1.__importDefault(require("../Utilities/utils/chunk"));
6
+ const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
7
7
  const CheckBox_1 = require("../components/CheckBox");
8
8
  const FormLayout_1 = tslib_1.__importStar(require("../components/FormLayout"));
9
9
  const AdaptableContext_1 = require("./AdaptableContext");
@@ -39,6 +39,6 @@ const SpecialColumnSettingsWizardStep = (props) => {
39
39
  { name: 'first', size: '30%' },
40
40
  { size: '30%', name: 'second' },
41
41
  { size: '30%', name: 'third' },
42
- ], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0, chunk_1.default)(possibleColumnTypes ?? [], 2)?.map(([first, second]) => ((0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [first && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: props.settings?.ColumnTypes?.includes?.(first), children: first })), second && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": second, onChange: (checked) => handleColumnTypeChange(second, checked), checked: props.settings?.ColumnTypes?.includes?.(second), children: second }))] }, first))) }) })] }))] }));
42
+ ], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0, ArrayExtensions_1.chunk)(possibleColumnTypes ?? [], 2)?.map(([first, second]) => ((0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [first && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: props.settings?.ColumnTypes?.includes?.(first), children: first })), second && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": second, onChange: (checked) => handleColumnTypeChange(second, checked), checked: props.settings?.ColumnTypes?.includes?.(second), children: second }))] }, first))) }) })] }))] }));
43
43
  };
44
44
  exports.SpecialColumnSettingsWizardStep = SpecialColumnSettingsWizardStep;
@@ -21,8 +21,8 @@ const NewSelect_1 = require("../../../components/NewSelect");
21
21
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
22
22
  const Card_1 = require("../../../components/Card");
23
23
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
24
- const barChartCellText_1 = require("../../../Utilities/Helpers/barChartCellText");
25
- const BarChartCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor");
24
+ const BarStylesHelper_1 = require("../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
25
+ const BarStyleCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor");
26
26
  const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
27
27
  const getTargetSummary = (target) => {
28
28
  if (target == undefined) {
@@ -55,12 +55,8 @@ const formatBulletOriginLabel = (origin) => {
55
55
  }
56
56
  return origin;
57
57
  };
58
- const formatBulletCellTextSummary = (cellText) => cellText
59
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
60
- .join(' + ') ?? '';
61
- const formatBulletToolTipSummary = (toolTipText) => toolTipText
62
- ?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
63
- .join(' + ') ?? '';
58
+ const formatBulletCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
59
+ const formatBulletToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
64
60
  const getStyledColumnBulletRangesViewValues = (data) => {
65
61
  const bullet = data.BulletChartStyle;
66
62
  if (!bullet) {
@@ -105,10 +101,10 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
105
101
  if (bullet.BackColor) {
106
102
  items.push(`Back Colour: ${bullet.BackColor}`);
107
103
  }
108
- if ((0, barChartCellText_1.hasBarChartCellTextConfigured)(bullet.CellTextProperties)) {
109
- const tokens = (0, barChartCellText_1.getActiveBarChartCellTextTokens)(bullet.CellTextProperties);
104
+ if ((0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(bullet.CellTextProperties)) {
105
+ const tokens = (0, BarStylesHelper_1.getActiveBarStyleCellTextTokens)(bullet.CellTextProperties);
110
106
  items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
111
- const layoutSummary = (0, barChartCellText_1.formatBarChartCellTextLayoutSummary)((0, barChartCellText_1.resolveBarChartCellTextLayout)(bullet.CellTextProperties));
107
+ const layoutSummary = (0, BarStylesHelper_1.formatBarStyleCellTextLayoutSummary)((0, BarStylesHelper_1.resolveBarStyleCellTextLayout)(bullet.CellTextProperties));
112
108
  if (layoutSummary) {
113
109
  items.push(`Placement: ${layoutSummary}`);
114
110
  }
@@ -300,9 +296,7 @@ const StyledColumnWizardBulletSection = (props) => {
300
296
  }
301
297
  if (mode === 'Column') {
302
298
  // Use the first available numeric column (excluding the styled column itself)
303
- const candidate = api.columnApi
304
- .getNumericColumns()
305
- .find((c) => c.columnId !== data.ColumnId);
299
+ const candidate = api.columnApi.getNumericColumns().find((c) => c.columnId !== data.ColumnId);
306
300
  setTarget(candidate?.columnId ?? '');
307
301
  return;
308
302
  }
@@ -334,11 +328,11 @@ const StyledColumnWizardBulletSection = (props) => {
334
328
  };
335
329
  // -- Cell text -------------------------------------------------------------
336
330
  const toggleCellText = (token, show) => {
337
- update((0, barChartCellText_1.toggleBarChartCellTextToken)(bullet.CellTextProperties, token, show));
331
+ update((0, BarStylesHelper_1.toggleBarStyleCellTextToken)(bullet.CellTextProperties, token, show));
338
332
  };
339
333
  const onCellTextPlacementChange = (token, patch) => {
340
334
  update({
341
- CellTextProperties: (0, barChartCellText_1.patchBarChartCellTextPlacement)(bullet.CellTextProperties, token, patch),
335
+ CellTextProperties: (0, BarStylesHelper_1.patchBarStyleCellTextPlacement)(bullet.CellTextProperties, token, patch),
342
336
  });
343
337
  };
344
338
  const toggleToolTipText = (token, checked) => {
@@ -368,7 +362,9 @@ const StyledColumnWizardBulletSection = (props) => {
368
362
  : typeof primaryTarget?.Value === 'number'
369
363
  ? primaryTarget.Value
370
364
  : undefined;
371
- const columnTargetValue = typeof primaryTarget === 'string' && primaryTarget !== 'Col-Avg' && primaryTarget !== 'Col-Median'
365
+ const columnTargetValue = typeof primaryTarget === 'string' &&
366
+ primaryTarget !== 'Col-Avg' &&
367
+ primaryTarget !== 'Col-Median'
372
368
  ? primaryTarget
373
369
  : typeof primaryTarget?.Value === 'string'
374
370
  ? primaryTarget.Value
@@ -380,7 +376,7 @@ const StyledColumnWizardBulletSection = (props) => {
380
376
  Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
381
377
  };
382
378
  const cellTextProperties = bullet.CellTextProperties;
383
- const cellTextDisabled = !(0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties) || disabled;
379
+ const cellTextDisabled = !(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) || disabled;
384
380
  return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Target" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select a target value for the bullet scale" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[180px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
385
381
  { value: 'None', label: 'None' },
386
382
  { value: 'Number', label: 'Fixed Number' },
@@ -392,7 +388,7 @@ const StyledColumnWizardBulletSection = (props) => {
392
388
  { value: 'Vertical', label: 'Vertical' },
393
389
  ] }) }) }), bullet.Orientation === 'Vertical' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", (0, jsx_runtime_1.jsx)("code", { children: "rowHeight" }), " on ", (0, jsx_runtime_1.jsx)("code", { children: " gridOptions " }), " or use", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getRowHeight" }), "."] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Bar Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
394
390
  Height: e.target.value === '' ? undefined : Number(e.target.value),
395
- }), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : (bullet.Origin ?? 'Auto'), onValueChange: (v) => {
391
+ }), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
396
392
  if (v === 'Auto' || v === 'Zero') {
397
393
  update({ Origin: v });
398
394
  }
@@ -402,7 +398,7 @@ const StyledColumnWizardBulletSection = (props) => {
402
398
  }, items: [
403
399
  { value: 'Auto', label: 'Auto' },
404
400
  { value: 'Zero', label: 'Zero' },
405
- ] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Cell Text Layout:", children: (0, jsx_runtime_1.jsx)(BarChartCellTextLayoutEditor_1.BarChartCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
401
+ ] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(BarStyleCellTextLayoutEditor_1.BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
406
402
  if (next) {
407
403
  update({ Font: next });
408
404
  }
@@ -11,7 +11,7 @@ const Tag_1 = require("../../../components/Tag");
11
11
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
12
  const Flex_1 = require("../../../components/Flex");
13
13
  const NumberInput_1 = require("../../../components/Input/NumberInput");
14
- const StyledColumnGradientHelper_1 = require("../../../Utilities/Helpers/StyledColumnGradientHelper");
14
+ const GradientStyleHelper_1 = require("../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
15
15
  const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
16
16
  const Card_1 = require("../../../components/Card");
17
17
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
@@ -23,8 +23,8 @@ function formatGradientToolTipSummary(opts) {
23
23
  .join(' + ');
24
24
  }
25
25
  const buildStyledColumnGradientStyleSummaryStrings = (gs, options) => {
26
- const minA = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
27
- const maxA = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
26
+ const minA = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
27
+ const maxA = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
28
28
  const items = [`Alpha: ${minA} → ${maxA}`];
29
29
  if (gs.AutoContrastText) {
30
30
  items.push('Auto Contrast: On');
@@ -90,10 +90,10 @@ const StyledColumnWizardGradientSection = (props) => {
90
90
  patchGradient({ ToolTipText: next });
91
91
  }
92
92
  };
93
- const minAlphaDisplay = gs.MinAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
94
- const maxAlphaDisplay = gs.MaxAlpha ?? StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
95
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ", StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA, " &", ' ', StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA, " (Min 0 fades out lowest values)"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Alpha range:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2 twa:flex-wrap twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Min" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: minAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
96
- if (v === StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MIN_ALPHA) {
93
+ const minAlphaDisplay = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
94
+ const maxAlphaDisplay = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
95
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ", GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA, " &", ' ', GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA, " (Min 0 fades out lowest values)"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Alpha range:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2 twa:flex-wrap twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Min" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: minAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
96
+ if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA) {
97
97
  const { MinAlpha: _m, ...rest } = gs;
98
98
  props.onChange({ ...data, GradientStyle: rest });
99
99
  }
@@ -101,7 +101,7 @@ const StyledColumnWizardGradientSection = (props) => {
101
101
  patchGradient({ MinAlpha: v });
102
102
  }
103
103
  } })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Max" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: maxAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
104
- if (v === StyledColumnGradientHelper_1.DEFAULT_GRADIENT_MAX_ALPHA) {
104
+ if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA) {
105
105
  const { MaxAlpha: _m, ...rest } = gs;
106
106
  props.onChange({ ...data, GradientStyle: rest });
107
107
  }
@@ -18,7 +18,7 @@ const IconSelector_1 = require("../../../components/IconSelector");
18
18
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
19
19
  const AdaptableContext_1 = require("../../AdaptableContext");
20
20
  const AdaptableIconComponent_1 = require("../../Components/AdaptableIconComponent");
21
- const IconStylePresets_1 = require("../../../Utilities/Helpers/IconStylePresets");
21
+ const IconStyleHelper_1 = require("../../../Utilities/Helpers/StyledColumns/IconStyleHelper");
22
22
  const IconRenderer_1 = require("../../../agGrid/cellRenderers/IconRenderer");
23
23
  const Card_1 = require("../../../components/Card");
24
24
  const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
@@ -73,7 +73,7 @@ const getStyledColumnIconMappingsViewValues = (data) => {
73
73
  const effectiveMappings = (0, IconRenderer_1.resolveEffectiveIconStyleMappings)(ic);
74
74
  const items = [`Mappings: ${effectiveMappings.length}`];
75
75
  if (ic.Preset) {
76
- items.push(`Preset: ${IconStylePresets_1.ICON_STYLE_PRESET_LABELS[ic.Preset]}`);
76
+ items.push(`Preset: ${IconStyleHelper_1.ICON_STYLE_PRESET_LABELS[ic.Preset]}`);
77
77
  }
78
78
  const customCount = ic.Mappings?.length ?? 0;
79
79
  if (customCount > 0) {
@@ -308,9 +308,9 @@ const StyledColumnWizardIconSection = (props) => {
308
308
  // -----------------------------------------------------------------------
309
309
  if (props.variant === 'mappings') {
310
310
  const presetMappingsPreview = iconStyle.Preset
311
- ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
311
+ ? (0, IconStyleHelper_1.getIconStylePresetMappings)(iconStyle.Preset)
312
312
  : [];
313
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Presets" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Contains most commonly used values; add anything missing in", ' ', (0, jsx_runtime_1.jsx)("strong", { children: "Custom mappings" }), " below"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Select Preset:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [['Flags', 'Currencies', 'Trend', 'Status'].map((p) => ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { ...(0, wizardSelection_1.wizardSelectionSimpleButtonProps)(iconStyle.Preset === p), onClick: () => applyPreset(p), children: IconStylePresets_1.ICON_STYLE_PRESET_LABELS[p] }, p))), iconStyle.Preset && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { variant: "text", icon: "undo", tooltip: "Stop using this preset (custom mappings are kept)", onClick: clearPreset, children: "Clear preset" }))] }) }), iconStyle.Preset && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Active:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1 twa:max-w-[640px]", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: [IconStylePresets_1.ICON_STYLE_PRESET_DESCRIPTIONS[iconStyle.Preset], " \u2014", ' ', presetMappingsPreview.length, " mappings shipped with the preset."] }), renderMappingsPreview(presetMappingsPreview)] }) }))] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Custom Mappings" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: iconStyle.Preset
313
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Presets" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Contains most commonly used values; add anything missing in", ' ', (0, jsx_runtime_1.jsx)("strong", { children: "Custom mappings" }), " below"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Select Preset:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [['Flags', 'Currencies', 'Trend', 'Status'].map((p) => ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { ...(0, wizardSelection_1.wizardSelectionSimpleButtonProps)(iconStyle.Preset === p), onClick: () => applyPreset(p), children: IconStyleHelper_1.ICON_STYLE_PRESET_LABELS[p] }, p))), iconStyle.Preset && ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { variant: "text", icon: "undo", tooltip: "Stop using this preset (custom mappings are kept)", onClick: clearPreset, children: "Clear preset" }))] }) }), iconStyle.Preset && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Active:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1 twa:max-w-[640px]", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: [IconStyleHelper_1.ICON_STYLE_PRESET_DESCRIPTIONS[iconStyle.Preset], " \u2014", ' ', presetMappingsPreview.length, " mappings shipped with the preset."] }), renderMappingsPreview(presetMappingsPreview)] }) }))] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Custom Mappings" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: iconStyle.Preset
314
314
  ? 'Add any mappings that are not present in the selected preset'
315
315
  : 'Add custom mappings entries (icon, key and description)' })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [mappings.length === 0 ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-60 twa:max-w-[520px] twa:mb-2", children: iconStyle.Preset
316
316
  ? 'No custom mappings — the preset above is being used as-is'