@adaptabletools/adaptable-cjs 22.0.0-canary.9 → 22.0.1-canary.0

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 (180) hide show
  1. package/index.css +1157 -1319
  2. package/index.css.map +1 -1
  3. package/index.d.ts +8 -8
  4. package/index.js +8 -8
  5. package/package.json +1 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  7. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  8. package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
  9. package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
  10. package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
  11. package/src/AdaptableState/Common/AggregationColumns.js +2 -1
  12. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
  13. package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
  14. package/src/AdaptableState/InitialState.d.ts +1 -1
  15. package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
  16. package/src/Api/ColumnApi.d.ts +1 -1
  17. package/src/Api/GridApi.d.ts +8 -0
  18. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  19. package/src/Api/Implementation/ApiBase.js +1 -1
  20. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnApiImpl.js +4 -4
  22. package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
  23. package/src/Api/Implementation/GridApiImpl.js +9 -5
  24. package/src/Api/Implementation/LayoutHelpers.js +1 -1
  25. package/src/Api/Implementation/RowFormApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/RowFormApiImpl.js +13 -0
  27. package/src/Api/Internal/ActionColumnInternalApi.js +2 -19
  28. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
  29. package/src/Api/Internal/ColumnInternalApi.js +5 -3
  30. package/src/Api/Internal/EventInternalApi.js +1 -1
  31. package/src/Api/Internal/ExportInternalApi.js +1 -1
  32. package/src/Api/RowFormApi.d.ts +5 -0
  33. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  34. package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
  35. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  36. package/src/Strategy/CellSummaryModule.js +3 -0
  37. package/src/Strategy/FormatColumnModule.js +2 -2
  38. package/src/Strategy/LayoutModule.js +23 -19
  39. package/src/Strategy/PlusMinusModule.d.ts +1 -0
  40. package/src/Strategy/PlusMinusModule.js +8 -2
  41. package/src/Strategy/StyledColumnModule.js +14 -6
  42. package/src/Strategy/TeamSharingModule.js +2 -2
  43. package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
  44. package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +26 -0
  45. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
  46. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  47. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
  48. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  49. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  50. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  51. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  52. package/src/Utilities/Helpers/FormatHelper.js +2 -2
  53. package/src/Utilities/Hooks/index.d.ts +1 -2
  54. package/src/Utilities/Hooks/index.js +1 -3
  55. package/src/Utilities/Services/LicenseService/index.js +1 -1
  56. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  57. package/src/Utilities/Services/RowSummaryService.js +2 -2
  58. package/src/Utilities/getScopeViewItems.js +1 -1
  59. package/src/Utilities/only.d.ts +18 -0
  60. package/src/Utilities/only.js +44 -0
  61. package/src/Utilities/utils/chunk.d.ts +6 -0
  62. package/src/Utilities/utils/chunk.js +20 -0
  63. package/src/Utilities/utils/clamp.d.ts +5 -0
  64. package/src/Utilities/utils/clamp.js +10 -0
  65. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  66. package/src/Utilities/utils/cloneDeepWith.js +70 -0
  67. package/src/Utilities/utils/debounce.d.ts +20 -0
  68. package/src/Utilities/utils/debounce.js +124 -0
  69. package/src/Utilities/utils/flatten.d.ts +5 -0
  70. package/src/Utilities/utils/flatten.js +10 -0
  71. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  72. package/src/Utilities/utils/flattenDeep.js +10 -0
  73. package/src/Utilities/utils/get.d.ts +6 -0
  74. package/src/Utilities/utils/get.js +38 -0
  75. package/src/Utilities/utils/index.d.ts +22 -0
  76. package/src/Utilities/utils/index.js +48 -0
  77. package/src/Utilities/utils/isArray.d.ts +6 -0
  78. package/src/Utilities/utils/isArray.js +8 -0
  79. package/src/Utilities/utils/isEqual.d.ts +5 -0
  80. package/src/Utilities/utils/isEqual.js +127 -0
  81. package/src/Utilities/utils/isObject.d.ts +6 -0
  82. package/src/Utilities/utils/isObject.js +12 -0
  83. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  84. package/src/Utilities/utils/isPlainObject.js +20 -0
  85. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  86. package/src/Utilities/utils/kebabCase.js +12 -0
  87. package/src/Utilities/utils/merge.d.ts +11 -0
  88. package/src/Utilities/utils/merge.js +44 -0
  89. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  90. package/src/Utilities/utils/mergeWith.js +50 -0
  91. package/src/Utilities/utils/orderBy.d.ts +8 -0
  92. package/src/Utilities/utils/orderBy.js +33 -0
  93. package/src/Utilities/utils/parseInt.d.ts +6 -0
  94. package/src/Utilities/utils/parseInt.js +12 -0
  95. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  96. package/src/Utilities/utils/sentenceCase.js +19 -0
  97. package/src/Utilities/utils/startCase.d.ts +5 -0
  98. package/src/Utilities/utils/startCase.js +15 -0
  99. package/src/Utilities/utils/throttle.d.ts +17 -0
  100. package/src/Utilities/utils/throttle.js +23 -0
  101. package/src/Utilities/utils/toNumber.d.ts +5 -0
  102. package/src/Utilities/utils/toNumber.js +42 -0
  103. package/src/Utilities/utils/uniq.d.ts +7 -0
  104. package/src/Utilities/utils/uniq.js +12 -0
  105. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  106. package/src/Utilities/utils/uniqBy.js +25 -0
  107. package/src/Utilities/utils/words.d.ts +7 -0
  108. package/src/Utilities/utils/words.js +13 -0
  109. package/src/Utilities/weightedAverage.d.ts +11 -0
  110. package/src/Utilities/weightedAverage.js +60 -46
  111. package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
  112. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  113. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  114. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  115. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  116. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  117. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  118. package/src/View/Components/RangesComponent.js +1 -1
  119. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  120. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  121. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  122. package/src/View/Components/ValueSelector/index.js +7 -2
  123. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  124. package/src/View/Dashboard/Dashboard.js +1 -1
  125. package/src/View/Dashboard/DashboardPopup.js +4 -3
  126. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  127. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  128. package/src/View/Export/Wizard/NewReportWizard.js +8 -8
  129. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  130. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
  131. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  132. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  133. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
  134. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +86 -0
  135. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  136. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
  137. package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
  138. package/src/View/Layout/LayoutViewPanel.js +1 -1
  139. package/src/View/Layout/TransposedPopup.js +0 -1
  140. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  141. package/src/View/Note/NoteEditor.js +1 -1
  142. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  143. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  144. package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
  145. package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +22 -22
  146. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
  147. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  148. package/src/View/Theme/ThemeEditor.js +1 -1
  149. package/src/View/Theme/ThemeField.js +1 -1
  150. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  151. package/src/View/Wizard/OnePageWizards.js +1 -1
  152. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  153. package/src/agGrid/AdaptableAgGrid.js +28 -6
  154. package/src/agGrid/AgGridAdapter.js +4 -4
  155. package/src/agGrid/AgGridColumnAdapter.js +11 -4
  156. package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
  157. package/src/agGrid/AgGridExportAdapter.js +7 -6
  158. package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
  159. package/src/components/ColorPicker/ColorPicker.js +1 -1
  160. package/src/components/DropdownButton/renderItem.js +1 -1
  161. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
  162. package/src/components/FormLayout/index.js +1 -1
  163. package/src/components/OverlayTrigger/index.js +1 -1
  164. package/src/components/Select/Select.js +4 -0
  165. package/src/env.js +2 -2
  166. package/src/layout-manager/src/isLayoutEqual.js +1 -1
  167. package/src/metamodel/adaptable.metamodel.d.ts +12 -1
  168. package/src/metamodel/adaptable.metamodel.js +1 -1
  169. package/src/migration/VersionUpgrade22.js +9 -0
  170. package/themes/dark.css +2 -3
  171. package/themes/light.css +1 -1
  172. package/tsconfig.cjs.tsbuildinfo +1 -1
  173. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
  174. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  175. package/src/Utilities/Hooks/useAdaptableState.js +0 -42
  176. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  177. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
  179. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
  180. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.weightedAverage = exports.getNumericValue = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
5
+ const toNumber_1 = tslib_1.__importDefault(require("./utils/toNumber"));
6
6
  const getNumericValue = (input) => {
7
7
  if (typeof input === 'number') {
8
8
  return input;
@@ -11,56 +11,70 @@ const getNumericValue = (input) => {
11
11
  return isNaN(numericValue) ? null : numericValue;
12
12
  };
13
13
  exports.getNumericValue = getNumericValue;
14
- function getWeightedAverageLeafNodes(gridApi, groupRowNode, filteredOnly) {
15
- const nodeList = (filteredOnly ? groupRowNode.childrenAfterFilter : groupRowNode.childrenAfterGroup) ?? [];
16
- let leafNodes = [];
17
- nodeList.forEach((rowNode) => {
18
- if (rowNode.group === true) {
19
- // Recursively extract leaf nodes from group
20
- leafNodes = leafNodes.concat(getWeightedAverageLeafNodes(gridApi, rowNode, filteredOnly));
21
- }
22
- else {
23
- leafNodes.push(rowNode);
24
- }
25
- });
26
- return leafNodes;
27
- }
14
+ /**
15
+ * Computes a weighted average aggregation: Σ(value × weight) / Σ(weight)
16
+ *
17
+ * AG Grid calls agg functions bottom-up through the group hierarchy. For each group:
18
+ * - Leaf children contribute their raw value × weight
19
+ * - Sub-group children already have partial sums from a previous pass,
20
+ * so we combine those directly instead of re-traversing to leaves
21
+ *
22
+ * The returned object stores partial sums ([columnId] and [weightColumnId])
23
+ * so parent groups can combine sub-group results correctly.
24
+ */
28
25
  const weightedAverage = (params, columnId, weightColumnId) => {
29
- const { api: gridApi, rowNode: groupRowNode } = params;
30
- let weightedColumnValueSum = 0;
31
- let columnValueSum = 0;
32
- const filteredOnly = !gridApi.getGridOption('suppressAggFilteredOnly');
33
- const leafNodes = getWeightedAverageLeafNodes(gridApi, groupRowNode, filteredOnly);
34
- leafNodes.forEach((rowNode) => {
35
- // when editing values might be converted to strings
36
- const rawColumnValue = gridApi.getCellValue({ colKey: columnId, rowNode });
37
- const columnValue = (0, exports.getNumericValue)(rawColumnValue);
38
- const rawWeightedColumnValue = gridApi.getCellValue({ colKey: weightColumnId, rowNode });
39
- const weightedColumnValue = (0, exports.getNumericValue)(rawWeightedColumnValue);
40
- if (weightedColumnValue !== null) {
41
- weightedColumnValueSum += weightedColumnValue;
26
+ const { api: gridApi, rowNode: groupRowNode, values } = params;
27
+ // numerator: Σ(value × weight)
28
+ let weightedValueSum = 0;
29
+ // denominator: Σ(weight)
30
+ let totalWeight = 0;
31
+ // params.values already respects suppressAggFilteredOnly.
32
+ // We need the matching child nodes only for leaf rows (to look up weight column values).
33
+ const childNodes = getMatchingChildNodes(groupRowNode, values.length);
34
+ for (let i = 0; i < values.length; i++) {
35
+ const value = values[i];
36
+ if (value != null && typeof value === 'object') {
37
+ // sub-group: partial sums already computed by a previous aggregation pass
38
+ weightedValueSum += value[columnId] ?? 0;
39
+ totalWeight += value[weightColumnId] ?? 0;
42
40
  }
43
- if (columnValue !== null) {
44
- columnValueSum += columnValue * weightedColumnValue;
41
+ else {
42
+ // leaf row: compute value × weight from cell data
43
+ const childNode = childNodes[i];
44
+ if (!childNode) {
45
+ continue;
46
+ }
47
+ // values might be strings during editing
48
+ const columnValue = (0, exports.getNumericValue)(value);
49
+ const weightValue = (0, exports.getNumericValue)(gridApi.getCellValue({ colKey: weightColumnId, rowNode: childNode }));
50
+ if (weightValue !== null) {
51
+ totalWeight += weightValue;
52
+ }
53
+ if (columnValue !== null && weightValue !== null) {
54
+ weightedValueSum += columnValue * weightValue;
55
+ }
45
56
  }
46
- });
47
- let result = columnValueSum / weightedColumnValueSum;
48
- // 0 / 0 = NaN
49
- if (isNaN(result)) {
50
- result = 0;
51
57
  }
58
+ const result = totalWeight !== 0 ? weightedValueSum / totalWeight : 0;
52
59
  return {
53
- // the grid by default uses toString to render values for an object, so this
54
- // is a trick to get the default cellRenderer to display the avg value
55
- toString: () => {
56
- return String(result);
57
- },
58
- // used for sorting
59
- toNumber: function () {
60
- return result;
61
- },
62
- [columnId]: columnValueSum,
63
- [weightColumnId]: weightedColumnValueSum,
60
+ // toString/toNumber let AG Grid's default cell renderer display and sort the value
61
+ toString: () => String(result),
62
+ toNumber: () => result,
63
+ // partial sums stored so parent groups can combine sub-group results
64
+ [columnId]: weightedValueSum,
65
+ [weightColumnId]: totalWeight,
64
66
  };
65
67
  };
66
68
  exports.weightedAverage = weightedAverage;
69
+ /**
70
+ * Returns the child node list that corresponds to params.values.
71
+ * When suppressAggFilteredOnly is false, params.values comes from childrenAfterFilter.
72
+ * When true, it comes from childrenAfterGroup (all children).
73
+ * We match by length to pick the right list without checking the grid option directly.
74
+ */
75
+ function getMatchingChildNodes(groupRowNode, valueCount) {
76
+ if (groupRowNode.childrenAfterFilter?.length === valueCount) {
77
+ return groupRowNode.childrenAfterFilter;
78
+ }
79
+ return groupRowNode.childrenAfterGroup ?? [];
80
+ }
@@ -4,7 +4,7 @@ exports.useAdaptableComputedCSSVar = exports.useAdaptableComputedCSSVars = expor
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const CSSNumericVariableWatch_1 = require("../components/Select/CSSNumericVariableWatch");
7
- const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
+ const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
8
8
  const react_1 = require("react");
9
9
  const computedCSSVarNames = [
10
10
  '--ab-cmp-select-menu__max-width',
@@ -11,7 +11,7 @@ const react_1 = require("react");
11
11
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
12
12
  const InfiniteTable_1 = require("../../../components/InfiniteTable");
13
13
  const Flex_1 = require("../../../components/Flex");
14
- const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
14
+ const throttle_1 = tslib_1.__importDefault(require("../../../Utilities/utils/throttle"));
15
15
  const twMerge_1 = require("../../../twMerge");
16
16
  const dataTypes = [
17
17
  {
@@ -12,7 +12,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/E
12
12
  const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector");
13
13
  const Select_1 = require("../../../components/Select");
14
14
  const Flex_1 = require("../../../components/Flex");
15
- const sentence_case_1 = require("sentence-case");
15
+ const sentenceCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/sentenceCase"));
16
16
  function renderCommand(command) {
17
17
  switch (command) {
18
18
  case 'highlight-cell':
@@ -225,7 +225,7 @@ const AlertButtonsEditor = (props) => {
225
225
  buttonCommands.map((commandName) => {
226
226
  return (React.createElement(CheckBox_1.CheckBox, { key: commandName, className: "twa:mr-3", onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
227
227
  (Array.isArray(button.Command) && button.Command.includes(commandName)) },
228
- React.createElement(Flex_1.Box, { className: "twa:text-2" }, (0, sentence_case_1.sentenceCase)(commandName))));
228
+ React.createElement(Flex_1.Box, { className: "twa:text-2" }, (0, sentenceCase_1.default)(commandName))));
229
229
  }),
230
230
  btnUserFunctions.length ? (React.createElement(CheckBox_1.CheckBox, { checked: true, disabled: true },
231
231
  React.createElement(Flex_1.Box, { className: "twa:text-2" },
@@ -4,7 +4,7 @@ exports.PreviewChartSection = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
7
+ const isEqual_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/isEqual"));
8
8
  const InternalRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/InternalRedux"));
9
9
  const AdaptableContext_1 = require("../../../AdaptableContext");
10
10
  const PreviewChartSection = (props) => {
@@ -8,7 +8,7 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../../AdaptableInput")
8
8
  const AdaptableDateInlineInput_1 = require("../../AdaptableInput/AdaptableDateInlineInput");
9
9
  const PermittedValuesSelector_1 = require("../../Selectors/PermittedValuesSelector");
10
10
  const AdaptableContext_1 = require("../../../AdaptableContext");
11
- const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
11
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
12
12
  const react_1 = require("react");
13
13
  function debounceOrImmediate(fn, time) {
14
14
  return time && time > 0 ? (0, debounce_1.default)(fn, time) : fn;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ColumnFilterInputList = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const lodash_1 = require("lodash");
5
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const utils_1 = require("../../../../components/ExpressionEditor/QueryBuilder/utils");
8
8
  const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
@@ -21,7 +21,7 @@ const ColumnFilterInputList = (props) => {
21
21
  const matchingInputs = predicateDef
22
22
  ? (0, utils_1.getOperatorMatchingInputs)(fnTypeInput, predicateDef?.inputs, true)
23
23
  : [];
24
- const debouncedPredicateChange = React.useCallback((0, lodash_1.debounce)((predicate) => {
24
+ const debouncedPredicateChange = React.useCallback((0, debounce_1.default)((predicate) => {
25
25
  props.onPredicateChange(predicate);
26
26
  }, 300), [props.predicate, props.columnId]);
27
27
  if (['date[]', 'number[]', 'text[]'].includes(matchingInputs[0])) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FloatingFilterInputList = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const lodash_1 = require("lodash");
5
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const utils_1 = require("../../../../components/ExpressionEditor/QueryBuilder/utils");
8
8
  const adaptableQlUtils_1 = require("../../../../Utilities/adaptableQlUtils");
@@ -20,7 +20,7 @@ const FloatingFilterInputList = (props) => {
20
20
  const matchingInputs = predicateDef
21
21
  ? (0, utils_1.getOperatorMatchingInputs)(fnTypeInput, predicateDef?.inputs, true)
22
22
  : [];
23
- const debouncedPredicateChange = React.useCallback((0, lodash_1.debounce)((predicate) => {
23
+ const debouncedPredicateChange = React.useCallback((0, debounce_1.default)((predicate) => {
24
24
  props.onPredicateChange(predicate);
25
25
  }, 300), [props.predicate, props.columnId]);
26
26
  if (['date[]', 'number[]', 'text[]'].includes(matchingInputs[0])) {
@@ -4,7 +4,7 @@ exports.RangesComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const ColorPicker_1 = require("../../components/ColorPicker");
7
- const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
7
+ const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
8
8
  const CheckBox_1 = require("../../components/CheckBox");
9
9
  const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
10
10
  const NumberInput_1 = require("../../components/Input/NumberInput");
@@ -102,6 +102,6 @@ const PermittedValuesSelector = function (props) {
102
102
  reload();
103
103
  }
104
104
  };
105
- return (React.createElement(Select_1.Select, { "aria-label": "Permitted Values Selector", searchable: props.searchable, size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
105
+ return (React.createElement(Select_1.Select, { "aria-label": "Permitted Values Selector", searchable: props.searchable ?? 'menulist', size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
106
106
  };
107
107
  exports.PermittedValuesSelector = PermittedValuesSelector;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAdaptableToolPanelAgGridComponent = exports.ConnectedAdaptableToolPanel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
6
+ const kebabCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/kebabCase"));
7
7
  const ToolPanelRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ToolPanelRedux"));
8
8
  const react_redux_1 = require("react-redux");
9
9
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
@@ -7,7 +7,7 @@ const react_1 = require("react");
7
7
  const AdaptableContext_1 = require("../../AdaptableContext");
8
8
  const uuid_1 = require("../../../components/utils/uuid");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
10
+ const kebabCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/kebabCase"));
11
11
  const CustomToolPanelContent = (props) => {
12
12
  const { customToolPanel } = props;
13
13
  const { api } = (0, AdaptableContext_1.useAdaptable)();
@@ -164,7 +164,12 @@ const renderSelectionSection = (props) => {
164
164
  const { value, options, disabled, singleSelect, toLabel, toIdentifier, } = props;
165
165
  const selectionBox = (React.createElement(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:py-2" },
166
166
  React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:flex twa:flex-row', 'twa:border-b twa:border-primarydark/30 twa:rounded-standard') },
167
- React.createElement(CheckBox_1.CheckBox, { className: "twa:ml-0.5 twa:font-bold", checked: !value.length ? false : value.length === options.length ? true : null, onChange: (checked) => {
167
+ singleSelect ? (React.createElement(Flex_1.Box, { className: "twa:flex twa:flex-row twa:text-3 twa:font-normal" },
168
+ "(",
169
+ value.length,
170
+ " of ",
171
+ options.length,
172
+ " selected)")) : (React.createElement(CheckBox_1.CheckBox, { className: "twa:ml-0.5 twa:font-bold", checked: !value.length ? false : value.length === options.length ? true : null, onChange: (checked) => {
168
173
  if (checked) {
169
174
  props.onSelectAll();
170
175
  }
@@ -179,7 +184,7 @@ const renderSelectionSection = (props) => {
179
184
  value.length,
180
185
  " of ",
181
186
  options.length,
182
- " selected)"))),
187
+ " selected)")))),
183
188
  React.createElement("div", { className: "twa:flex-1" }),
184
189
  React.createElement(Flex_1.Box, { className: "twa:mr-2 twa:text-2 twa:font-normal" }, props.showOnlySelectedCheckbox))));
185
190
  return React.createElement(Flex_1.Box, { className: (0, clsx_1.default)(`${baseClassName}__header `) }, selectionBox);
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
7
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
8
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
8
+ const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
9
9
  const CustomDashboardButton = (props) => {
10
10
  const { button } = props;
11
11
  const [componentRevision, setComponentRevision] = (0, react_1.useState)(1);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Dashboard = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
5
+ const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const react_redux_1 = require("react-redux");
8
8
  const Dashboard_1 = require("../../components/Dashboard");
@@ -75,9 +75,10 @@ class DashboardPopupComponent extends React.Component {
75
75
  React.createElement(Card_1.Card, null,
76
76
  React.createElement(Card_1.Card.Title, { gap: 8 }, "Display Settings"),
77
77
  React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:p-2" },
78
- React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
79
- this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
80
- this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null)))),
78
+ React.createElement("div", { className: "twa:flex twa:flex-row twa:items-center twa:justify-start twa:gap-3" },
79
+ React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
80
+ this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
81
+ this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null))))),
81
82
  React.createElement(Card_1.Card, { className: "twa:flex-1 twa:overflow-hidden", gap: 0 },
82
83
  React.createElement(Card_1.Card.Title, null, "Contents"),
83
84
  React.createElement(Card_1.Card.Body, { className: "twa:p-2" },
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataPreview = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
5
+ const flatten_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/flatten"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
8
8
  const icons_1 = require("../../../../components/icons");
@@ -16,8 +16,8 @@ declare class DataSetViewPanelComponent extends React.Component<DataSetViewPanel
16
16
  onSelectedDataSetChanged(dataSetName: string): void;
17
17
  }
18
18
  export declare let DataSetViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSetViewPanelComponent, {
19
- ref?: React.Ref<DataSetViewPanelComponent>;
20
19
  key?: React.Key | null | undefined;
20
+ ref?: React.Ref<DataSetViewPanelComponent>;
21
21
  context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
22
22
  store?: import("redux").Store;
23
23
  }>;
@@ -39,6 +39,14 @@ const NewReportWizard = (props) => {
39
39
  props.onFinishWizard(report);
40
40
  };
41
41
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: report, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
42
+ {
43
+ title: 'Name',
44
+ details: 'Enter the name of the Report',
45
+ isValid: ReportNameWizardSection_1.isValidReportName,
46
+ renderSummary: ReportNameWizardSection_1.renderReportNameSummary,
47
+ render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
48
+ React.createElement(ReportNameWizardSection_1.ReportNameWizardSection, { onChange: setReport }))),
49
+ },
42
50
  {
43
51
  title: 'Columns',
44
52
  details: 'Choose the Columns you want to include in the Report',
@@ -52,14 +60,6 @@ const NewReportWizard = (props) => {
52
60
  renderSummary: ReportRowsWizardSection_1.renderReportRowsSummary,
53
61
  render: () => React.createElement(ReportRowsWizardSection_1.ReportRowsWizardSection, { onChange: setReport }),
54
62
  },
55
- {
56
- title: 'Name',
57
- details: 'Enter the name of the Report',
58
- isValid: ReportNameWizardSection_1.isValidReportName,
59
- renderSummary: ReportNameWizardSection_1.renderReportNameSummary,
60
- render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
61
- React.createElement(ReportNameWizardSection_1.ReportNameWizardSection, { onChange: setReport }))),
62
- },
63
63
  {
64
64
  details: 'Select Report Tags',
65
65
  title: 'Tags',
@@ -18,8 +18,8 @@ declare class FilterViewPanelComponent extends React.Component<FilterViewPanelCo
18
18
  private onClearFilters;
19
19
  }
20
20
  export declare const FilterViewPanelControl: import("react-redux").ConnectedComponent<typeof FilterViewPanelComponent, {
21
- ref?: React.Ref<FilterViewPanelComponent>;
22
21
  key?: React.Key | null | undefined;
22
+ ref?: React.Ref<FilterViewPanelComponent>;
23
23
  context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
24
24
  store?: import("redux").Store;
25
25
  }>;
@@ -86,15 +86,12 @@ const FlashingAlertSettingsWizardSection = (props) => {
86
86
  React.createElement(Tabs_1.Tabs.Content, null,
87
87
  React.createElement(FormLayout_1.default, null,
88
88
  React.createElement(FormLayout_1.FormRow, { label: "Name" },
89
- React.createElement(Input_1.default, { "data-name": "flashing-cell-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: flashingCell.Name ?? '' })),
90
- React.createElement(FormLayout_1.FormRow, { label: "Flash Target" },
91
- React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target", onChange: (checked) => handleTargetChange('cell', checked), className: "twa:mr-3", checked: flashingCell?.FlashTarget === 'cell' ||
92
- flashingCell?.FlashTarget?.includes?.('cell'), tabIndex: -1 }, "Cell"),
93
- React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-row", className: "twa:mr-3", onChange: (checked) => handleTargetChange('row', checked), checked: flashingCell?.FlashTarget === 'row' ||
94
- flashingCell?.FlashTarget?.includes?.('row'), tabIndex: -1 }, "Row"),
95
- React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-aggFuncCell", onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: flashingCell?.FlashTarget === 'aggFuncCell' ||
96
- flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell")),
97
- React.createElement(FormLayout_1.FormRow, { label: "Duration" },
89
+ React.createElement(Input_1.default, { "data-name": "flashing-cell-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: flashingCell.Name ?? '' }))))),
90
+ React.createElement(Tabs_1.Tabs, { autoFocus: false, className: "twa:p-2" },
91
+ React.createElement(Tabs_1.Tabs.Tab, null, "Flash Duration"),
92
+ React.createElement(Tabs_1.Tabs.Content, null,
93
+ React.createElement(FormLayout_1.default, null,
94
+ React.createElement(FormLayout_1.FormRow, { label: "" },
98
95
  React.createElement(Flex_1.Flex, { alignItems: "center" },
99
96
  React.createElement(CheckBox_1.CheckBox, { "data-name": "duration-always", checked: duration === 'always', onChange: (checked) => handleTypeChange(checked ? 'always' : 'number'), className: "twa:mr-4", tabIndex: -1 }, "Always"),
100
97
  duration !== 'always' && (React.createElement(React.Fragment, null,
@@ -102,6 +99,18 @@ const FlashingAlertSettingsWizardSection = (props) => {
102
99
  const value = event.target.value;
103
100
  setDuration(isNaN(Number(value)) ? 500 : Number(value));
104
101
  } }),
105
- React.createElement(Flex_1.Box, { className: "twa:text-2" }, "ms"))))))))));
102
+ React.createElement(Flex_1.Box, { className: "twa:text-2" }, "ms")))))))),
103
+ ' ',
104
+ React.createElement(Tabs_1.Tabs, { autoFocus: false, className: "twa:p-2" },
105
+ React.createElement(Tabs_1.Tabs.Tab, null, "Flash Target"),
106
+ React.createElement(Tabs_1.Tabs.Content, null,
107
+ React.createElement(FormLayout_1.default, null,
108
+ React.createElement(FormLayout_1.FormRow, { label: "" },
109
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target", onChange: (checked) => handleTargetChange('cell', checked), className: "twa:mr-3", checked: flashingCell?.FlashTarget === 'cell' ||
110
+ flashingCell?.FlashTarget?.includes?.('cell'), tabIndex: -1 }, "Cell"),
111
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-row", className: "twa:mr-3", onChange: (checked) => handleTargetChange('row', checked), checked: flashingCell?.FlashTarget === 'row' ||
112
+ flashingCell?.FlashTarget?.includes?.('row'), tabIndex: -1 }, "Row"),
113
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-aggFuncCell", onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: flashingCell?.FlashTarget === 'aggFuncCell' ||
114
+ flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell")))))));
106
115
  };
107
116
  exports.FlashingAlertSettingsWizardSection = FlashingAlertSettingsWizardSection;
@@ -77,7 +77,7 @@ const FlashingCellWizard = (props) => {
77
77
  isValid: NewScopeComponent_1.isScopeValid,
78
78
  render: () => React.createElement(FlashingCellScopeWizardSection_1.FlashingAlertScopeWizardSection, { onChange: setFlashingCell }),
79
79
  renderSummary: BaseAlertScopeWizardSection_1.renderScopeSummary,
80
- title: 'Scope',
80
+ title: 'Columns',
81
81
  },
82
82
  {
83
83
  details: 'Build the Rules for when Cells should Flash',
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope = exports.renderFormatColumnFormatSummary = exports.getFormatColumnFormatSummaryValue = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const uniq_1 = tslib_1.__importDefault(require("lodash/uniq"));
7
- const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
6
+ const uniq_1 = tslib_1.__importDefault(require("../../../Utilities/utils/uniq"));
7
+ const clamp_1 = tslib_1.__importDefault(require("../../../Utilities/utils/clamp"));
8
8
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
9
9
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
10
10
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { FormatColumn } from '../../../AdaptableState/FormatColumnState';
3
+ type FormatColumnRowScopeWizardSectionProps = {
4
+ onChange: (data: FormatColumn) => void;
5
+ };
6
+ export declare const renderFormatColumnRowScopeSummary: (data: FormatColumn) => React.JSX.Element;
7
+ export declare const FormatColumnRowScopeWizardSection: (props: FormatColumnRowScopeWizardSectionProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FormatColumnRowScopeWizardSection = exports.renderFormatColumnRowScopeSummary = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
7
+ const CheckBox_1 = require("../../../components/CheckBox");
8
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
+ const Tag_1 = require("../../../components/Tag");
10
+ const Flex_1 = require("../../../components/Flex");
11
+ const Tabs_1 = require("../../../components/Tabs");
12
+ const renderFormatColumnRowScopeSummary = (data) => {
13
+ return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
14
+ React.createElement(Flex_1.Box, { className: "twa:mt-3" },
15
+ "Data Rows ",
16
+ React.createElement(Tag_1.Tag, null, data.RowScope?.ExcludeDataRows ? 'no' : 'yes')),
17
+ ' ',
18
+ React.createElement(Flex_1.Box, { className: "twa:mt-3" },
19
+ "Group Rows ",
20
+ React.createElement(Tag_1.Tag, null, data.RowScope?.ExcludeGroupRows ? 'no' : 'yes')),
21
+ React.createElement(Flex_1.Box, { className: "twa:mt-3" },
22
+ "Summary Rows ",
23
+ React.createElement(Tag_1.Tag, null, data.RowScope?.ExcludeSummaryRows ? 'no' : 'yes')),
24
+ React.createElement(Flex_1.Box, { className: "twa:mt-3" },
25
+ "Total Rows ",
26
+ React.createElement(Tag_1.Tag, null, data.RowScope?.ExcludeTotalRows ? 'no' : 'yes'))));
27
+ };
28
+ exports.renderFormatColumnRowScopeSummary = renderFormatColumnRowScopeSummary;
29
+ const FormatColumnRowScopeWizardSection = (props) => {
30
+ const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
31
+ const onExcludeDataRowsChanged = (includeDataRows) => {
32
+ props.onChange({
33
+ ...data,
34
+ RowScope: {
35
+ ...data.RowScope,
36
+ ExcludeDataRows: !includeDataRows,
37
+ },
38
+ });
39
+ };
40
+ const onExcludeGroupedRowsChanged = (includeGroupedRows) => {
41
+ props.onChange({
42
+ ...data,
43
+ RowScope: {
44
+ ...data.RowScope,
45
+ ExcludeGroupRows: !includeGroupedRows,
46
+ },
47
+ });
48
+ };
49
+ const onExcludeSummaryRowsChanged = (includeSummaryRows) => {
50
+ props.onChange({
51
+ ...data,
52
+ RowScope: {
53
+ ...data.RowScope,
54
+ ExcludeSummaryRows: !includeSummaryRows,
55
+ },
56
+ });
57
+ };
58
+ const onExcludeTotalRowsChanged = (includeTotalRows) => {
59
+ props.onChange({
60
+ ...data,
61
+ RowScope: {
62
+ ...data.RowScope,
63
+ ExcludeTotalRows: !includeTotalRows,
64
+ },
65
+ });
66
+ };
67
+ return (React.createElement(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' } },
68
+ React.createElement(Tabs_1.Tabs, { className: "twa:mb-3" },
69
+ React.createElement(Tabs_1.Tabs.Tab, null, "Row Types"),
70
+ React.createElement(Tabs_1.Tabs.Content, null,
71
+ React.createElement(Flex_1.Flex, { flexDirection: "row" },
72
+ React.createElement(FormLayout_1.default, null, data.Target === 'cell' && (React.createElement(React.Fragment, null,
73
+ React.createElement(FormLayout_1.FormRow, { label: "Data (leaf) Rows:" },
74
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
75
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "include-data-rows-checkbox", checked: !data.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged, className: "twa:mr-2" }))),
76
+ React.createElement(FormLayout_1.FormRow, { label: "Group Rows:" },
77
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
78
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "include-grouped-rows-checkbox", checked: !data.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, className: "twa:mr-2" }))),
79
+ React.createElement(FormLayout_1.FormRow, { label: "Summary Rows:" },
80
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
81
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "include-summary-rows-checkbox", checked: !data.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, className: "twa:mr-2" }))),
82
+ React.createElement(FormLayout_1.FormRow, { label: "Total Rows:" },
83
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
84
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "include-total-rows-checkbox", checked: !data.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged, className: "twa:mr-2" })))))))))));
85
+ };
86
+ exports.FormatColumnRowScopeWizardSection = FormatColumnRowScopeWizardSection;