@adaptabletools/adaptable 22.0.0-canary.9 → 22.0.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 (168) 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/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  7. package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
  8. package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
  9. package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
  10. package/src/AdaptableState/Common/AggregationColumns.js +1 -0
  11. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
  12. package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
  13. package/src/AdaptableState/InitialState.d.ts +1 -1
  14. package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
  15. package/src/Api/ColumnApi.d.ts +1 -1
  16. package/src/Api/GridApi.d.ts +4 -0
  17. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  18. package/src/Api/Implementation/ApiBase.js +1 -1
  19. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/ColumnApiImpl.js +4 -4
  21. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  22. package/src/Api/Implementation/GridApiImpl.js +6 -5
  23. package/src/Api/Implementation/LayoutHelpers.js +1 -1
  24. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
  25. package/src/Api/Internal/ColumnInternalApi.js +5 -3
  26. package/src/Api/Internal/EventInternalApi.js +1 -1
  27. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  28. package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
  29. package/src/Strategy/FormatColumnModule.js +2 -2
  30. package/src/Strategy/LayoutModule.js +1 -1
  31. package/src/Strategy/StyledColumnModule.js +14 -6
  32. package/src/Strategy/TeamSharingModule.js +2 -2
  33. package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
  34. package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +22 -0
  35. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
  36. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  37. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
  38. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  39. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  40. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  41. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  42. package/src/Utilities/Helpers/FormatHelper.js +1 -1
  43. package/src/Utilities/Hooks/index.d.ts +1 -2
  44. package/src/Utilities/Hooks/index.js +1 -2
  45. package/src/Utilities/Services/LicenseService/index.js +1 -1
  46. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  47. package/src/Utilities/Services/RowSummaryService.js +2 -2
  48. package/src/Utilities/getScopeViewItems.js +1 -1
  49. package/src/Utilities/only.d.ts +15 -0
  50. package/src/Utilities/only.js +54 -0
  51. package/src/Utilities/utils/chunk.d.ts +6 -0
  52. package/src/Utilities/utils/chunk.js +17 -0
  53. package/src/Utilities/utils/clamp.d.ts +5 -0
  54. package/src/Utilities/utils/clamp.js +7 -0
  55. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  56. package/src/Utilities/utils/cloneDeepWith.js +67 -0
  57. package/src/Utilities/utils/debounce.d.ts +20 -0
  58. package/src/Utilities/utils/debounce.js +121 -0
  59. package/src/Utilities/utils/flatten.d.ts +5 -0
  60. package/src/Utilities/utils/flatten.js +7 -0
  61. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  62. package/src/Utilities/utils/flattenDeep.js +7 -0
  63. package/src/Utilities/utils/get.d.ts +6 -0
  64. package/src/Utilities/utils/get.js +35 -0
  65. package/src/Utilities/utils/index.d.ts +22 -0
  66. package/src/Utilities/utils/index.js +22 -0
  67. package/src/Utilities/utils/isArray.d.ts +6 -0
  68. package/src/Utilities/utils/isArray.js +6 -0
  69. package/src/Utilities/utils/isEqual.d.ts +5 -0
  70. package/src/Utilities/utils/isEqual.js +124 -0
  71. package/src/Utilities/utils/isObject.d.ts +6 -0
  72. package/src/Utilities/utils/isObject.js +9 -0
  73. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  74. package/src/Utilities/utils/isPlainObject.js +17 -0
  75. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  76. package/src/Utilities/utils/kebabCase.js +8 -0
  77. package/src/Utilities/utils/merge.d.ts +11 -0
  78. package/src/Utilities/utils/merge.js +40 -0
  79. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  80. package/src/Utilities/utils/mergeWith.js +46 -0
  81. package/src/Utilities/utils/orderBy.d.ts +8 -0
  82. package/src/Utilities/utils/orderBy.js +30 -0
  83. package/src/Utilities/utils/parseInt.d.ts +6 -0
  84. package/src/Utilities/utils/parseInt.js +9 -0
  85. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  86. package/src/Utilities/utils/sentenceCase.js +15 -0
  87. package/src/Utilities/utils/startCase.d.ts +5 -0
  88. package/src/Utilities/utils/startCase.js +11 -0
  89. package/src/Utilities/utils/throttle.d.ts +17 -0
  90. package/src/Utilities/utils/throttle.js +19 -0
  91. package/src/Utilities/utils/toNumber.d.ts +5 -0
  92. package/src/Utilities/utils/toNumber.js +39 -0
  93. package/src/Utilities/utils/uniq.d.ts +7 -0
  94. package/src/Utilities/utils/uniq.js +9 -0
  95. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  96. package/src/Utilities/utils/uniqBy.js +22 -0
  97. package/src/Utilities/utils/words.d.ts +7 -0
  98. package/src/Utilities/utils/words.js +10 -0
  99. package/src/Utilities/weightedAverage.js +1 -1
  100. package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
  101. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  102. package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -1
  103. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  104. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  105. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -1
  106. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
  107. package/src/View/Components/RangesComponent.js +1 -1
  108. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  109. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  110. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  111. package/src/View/Components/ValueSelector/index.js +7 -2
  112. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  113. package/src/View/Dashboard/Dashboard.js +1 -1
  114. package/src/View/Dashboard/DashboardPopup.js +4 -3
  115. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  116. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  117. package/src/View/Export/Wizard/NewReportWizard.js +8 -8
  118. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  119. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
  120. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  121. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  122. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
  123. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +80 -0
  124. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  125. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -8
  126. package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
  127. package/src/View/Layout/LayoutViewPanel.js +1 -1
  128. package/src/View/Layout/TransposedPopup.js +0 -1
  129. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  130. package/src/View/Note/NoteEditor.js +1 -1
  131. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  132. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  133. package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
  134. package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +19 -19
  135. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
  136. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  137. package/src/View/Theme/ThemeEditor.js +1 -1
  138. package/src/View/Theme/ThemeField.js +1 -1
  139. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  140. package/src/View/Wizard/OnePageWizards.js +1 -1
  141. package/src/agGrid/AdaptableAgGrid.js +26 -7
  142. package/src/agGrid/AgGridAdapter.js +4 -4
  143. package/src/agGrid/AgGridColumnAdapter.js +11 -4
  144. package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
  145. package/src/agGrid/AgGridExportAdapter.js +7 -6
  146. package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
  147. package/src/components/ColorPicker/ColorPicker.js +1 -1
  148. package/src/components/DropdownButton/renderItem.js +1 -1
  149. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
  150. package/src/components/FormLayout/index.js +1 -1
  151. package/src/components/OverlayTrigger/index.js +1 -1
  152. package/src/components/Select/Select.js +4 -0
  153. package/src/env.js +2 -2
  154. package/src/layout-manager/src/isLayoutEqual.js +1 -1
  155. package/src/metamodel/adaptable.metamodel.d.ts +12 -1
  156. package/src/metamodel/adaptable.metamodel.js +1 -1
  157. package/src/migration/VersionUpgrade22.js +9 -0
  158. package/themes/dark.css +2 -3
  159. package/themes/light.css +1 -1
  160. package/tsconfig.esm.tsbuildinfo +1 -1
  161. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -12
  162. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  163. package/src/Utilities/Hooks/useAdaptableState.js +0 -39
  164. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  165. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -31
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
  167. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
  168. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
@@ -1,5 +1,5 @@
1
- import throttle from 'lodash/throttle';
2
- import debounce from 'lodash/debounce';
1
+ import throttle from '../Utilities/utils/throttle';
2
+ import debounce from '../Utilities/utils/debounce';
3
3
  import { createGrid, LocalEventService, } from 'ag-grid-enterprise';
4
4
  import { AdaptableLogger } from './AdaptableLogger';
5
5
  import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkConstants';
@@ -78,7 +78,7 @@ import { AgGridOptionsService } from './AgGridOptionsService';
78
78
  import { parseDateValue } from '../Utilities/Helpers/DateHelper';
79
79
  import { AgGridColumnAdapter } from './AgGridColumnAdapter';
80
80
  import getScrollbarSize from '../Utilities/getScrollbarSize';
81
- import { WEIGHTED_AVERAGE_AGG_FN_NAME, } from '../AdaptableState/Common/AggregationColumns';
81
+ import { ONLY_AGG_FN_NAME, WEIGHTED_AVERAGE_AGG_FN_NAME, } from '../AdaptableState/Common/AggregationColumns';
82
82
  import { RowFormService } from '../Utilities/Services/RowFormService';
83
83
  import { FilterOnDataChangeOptions } from '../AdaptableState/Common/Enums';
84
84
  import { ADAPTABLE_PUBLISH_TIMESTAMP } from '../EnvVars';
@@ -87,6 +87,7 @@ import { ensureLoadingScreenPortalElement } from '../components/Modal';
87
87
  import { AdaptableLoadingScreen } from '../View/Components/Popups/AdaptableLoadingScreen';
88
88
  import { createElement } from 'react';
89
89
  import { createAgStatusPanelComponent } from '../Utilities/createAgStatusPanelComponent';
90
+ import { only } from '../Utilities/only';
90
91
  import { weightedAverage } from '../Utilities/weightedAverage';
91
92
  import { ROW_SUMMARY_ROW_ID } from '../AdaptableState/Common/RowSummary';
92
93
  import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
@@ -1080,6 +1081,9 @@ export class AdaptableAgGrid {
1080
1081
  */
1081
1082
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'aggFuncs', (original_aggFuncs) => {
1082
1083
  const aggregationFunctions = original_aggFuncs || {};
1084
+ aggregationFunctions[ONLY_AGG_FN_NAME] = (params) => {
1085
+ return only(params, params.column.getColId());
1086
+ };
1083
1087
  aggregationFunctions[WEIGHTED_AVERAGE_AGG_FN_NAME] = (params) => {
1084
1088
  const columnId = params.column.getColId();
1085
1089
  const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(columnId);
@@ -1462,6 +1466,18 @@ export class AdaptableAgGrid {
1462
1466
  caseSensitive: !!this.adaptableOptions.quickSearchOptions.isQuickSearchCaseSensitive,
1463
1467
  };
1464
1468
  });
1469
+ /**
1470
+ * suppressOverlays
1471
+ */
1472
+ this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressOverlays', (original_suppressOverlays) => {
1473
+ // we want to suppress the exporting overlay because having it enabled will turn api.exportDataAsExcel() and api.exportDataAsCsv() into async operations,
1474
+ // see #export_data_synchronously
1475
+ let suppressOverlays = original_suppressOverlays || [];
1476
+ if (!suppressOverlays.includes('exporting')) {
1477
+ suppressOverlays.push('exporting');
1478
+ }
1479
+ return suppressOverlays;
1480
+ });
1465
1481
  }
1466
1482
  /**
1467
1483
  * Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
@@ -2541,12 +2557,15 @@ export class AdaptableAgGrid {
2541
2557
  updatedRows: [],
2542
2558
  removedRows: [],
2543
2559
  };
2544
- if (!dataRowConfig || !dataRowConfig.dataRows) {
2560
+ if (!dataRowConfig) {
2561
+ return result;
2562
+ }
2563
+ if (!dataRowConfig.addRows || !dataRowConfig.updateRows || !dataRowConfig.deleteRows) {
2545
2564
  return result;
2546
2565
  }
2547
- const addDataRows = dataRowConfig.dataRows.add;
2548
- const updateDataRows = dataRowConfig.dataRows.update;
2549
- const removeDataRows = dataRowConfig.dataRows.delete;
2566
+ const addDataRows = dataRowConfig.addRows;
2567
+ const updateDataRows = dataRowConfig.updateRows;
2568
+ const removeDataRows = dataRowConfig.deleteRows;
2550
2569
  if (this.hasAutogeneratedPrimaryKey) {
2551
2570
  this.addSyntheticPrimaryKeyIfMissing(addDataRows);
2552
2571
  }
@@ -471,8 +471,8 @@ export class AgGridAdapter {
471
471
  ? 'number'
472
472
  : this.deriveAdaptableColumnDataType(agGridColumn, false);
473
473
  const isTreeColumn = this.isTreeColumn(isGeneratedRowGroupColumn);
474
- const alwaysHidden = this.adaptableApi.columnApi.internalApi.isAlwaysHiddenColumn(colDef);
475
- const visible = !alwaysHidden || agGridColumn.isVisible();
474
+ const isUIHiddenColumn = this.adaptableApi.columnApi.internalApi.isColumnUIHidden(colDef);
475
+ const visible = !isUIHiddenColumn || agGridColumn.isVisible();
476
476
  const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn || isGeneratedSelectionColumn;
477
477
  const abColumn = {
478
478
  Uuid: createUuid(),
@@ -482,9 +482,9 @@ export class AgGridAdapter {
482
482
  resizable: colDef.resizable !== false,
483
483
  friendlyName: friendlyName,
484
484
  isPrimaryKey: ColumnId === pkColumn,
485
- dataType: dataType,
485
+ dataType,
486
486
  visible,
487
- alwaysHidden,
487
+ isUIHiddenColumn,
488
488
  readOnly: this.isColumnReadonly(colDef),
489
489
  columnGroup: ColumnGroup,
490
490
  fieldOnly: isGenerated ? false : this.isColumnFieldonly(colDef),
@@ -1,5 +1,5 @@
1
- import kebabCase from 'lodash/kebabCase';
2
- import merge from 'lodash/merge';
1
+ import kebabCase from '../Utilities/utils/kebabCase';
2
+ import merge from '../Utilities/utils/merge';
3
3
  import { convertAdaptableStyleToCSS, getVariableColor, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
4
4
  import StringExtensions from '../Utilities/Extensions/StringExtensions';
5
5
  import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
@@ -533,8 +533,15 @@ export class AgGridColumnAdapter {
533
533
  returnValue = params.value;
534
534
  }
535
535
  if (textOptions.includes('PercentageValue')) {
536
- const clampedValue = Helper.clamp(params.value, min, max);
537
- const percentageValue = ((clampedValue - min) / (max - min)) * 100;
536
+ let percentageValue;
537
+ if (styledColumn.PercentBarStyle.ColumnComparison) {
538
+ const absMax = Math.abs(max);
539
+ percentageValue = absMax === 0 ? 0 : (Number(params.value) / absMax) * 100;
540
+ }
541
+ else {
542
+ const clampedValue = Helper.clamp(params.value, min, max);
543
+ percentageValue = ((clampedValue - min) / (max - min)) * 100;
544
+ }
538
545
  returnValue += ' ' + `(${percentageValue.toFixed(0)}%)`;
539
546
  }
540
547
  return returnValue ? returnValue : params.value;
@@ -1,8 +1,8 @@
1
- import { AdaptableAgGrid } from './AdaptableAgGrid';
2
- import { Report, ReportFormatType } from '../AdaptableState/ExportState';
3
1
  import { CsvExportParams, ExcelExportParams, ExcelStyle } from 'ag-grid-enterprise';
4
2
  import { CustomExportParams, ExportDestinationType, ExportResultData } from '../AdaptableOptions/ExportOptions';
3
+ import { Report, ReportFormatType } from '../AdaptableState/ExportState';
5
4
  import { Layout } from '../AdaptableState/LayoutState';
5
+ import { AdaptableAgGrid } from './AdaptableAgGrid';
6
6
  export interface ExportConfig {
7
7
  report: Report;
8
8
  format: ReportFormatType;
@@ -1,12 +1,12 @@
1
- import { ExportModuleId } from '../Utilities/Constants/ModuleConstants';
2
- import { waitForTimeout } from '../Utilities/waitForTimeout';
3
- import { convertCSSAbsoluteFontSizeToPt, getVariableColor, sanitizeStyle, } from '../Utilities/Helpers/StyleHelper';
4
- import FormatHelper, { DateFormatter } from '../Utilities/Helpers/FormatHelper';
5
1
  import tinycolor from 'tinycolor2';
6
- import StringExtensions from '../Utilities/Extensions/StringExtensions';
7
- import { createUuid } from '../AdaptableState/Uuid';
8
2
  import { inferSchema, initParser } from 'udsv';
3
+ import { createUuid } from '../AdaptableState/Uuid';
9
4
  import { AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN, } from '../Utilities/Constants/GeneralConstants';
5
+ import { ExportModuleId } from '../Utilities/Constants/ModuleConstants';
6
+ import StringExtensions from '../Utilities/Extensions/StringExtensions';
7
+ import FormatHelper, { DateFormatter } from '../Utilities/Helpers/FormatHelper';
8
+ import { convertCSSAbsoluteFontSizeToPt, getVariableColor, sanitizeStyle, } from '../Utilities/Helpers/StyleHelper';
9
+ import { waitForTimeout } from '../Utilities/waitForTimeout';
10
10
  export class AgGridExportAdapter {
11
11
  _adaptableInstance;
12
12
  /**
@@ -87,6 +87,7 @@ export class AgGridExportAdapter {
87
87
  this.patchExcelStyles(exportContext);
88
88
  excelStylesWerePatched = true;
89
89
  }
90
+ // see #export_data_synchronously
90
91
  // 1. easiest case, we download the file using AG Grid
91
92
  // these methods will automatically handle the file download
92
93
  if (exportContext.destination === 'Download' && exportContext.isExcelReport) {
@@ -1,5 +1,5 @@
1
1
  import Helper from '../../Utilities/Helpers/Helper';
2
- import clamp from 'lodash/clamp';
2
+ import clamp from '../../Utilities/utils/clamp';
3
3
  export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
4
4
  if (!styledColumn.PercentBarStyle) {
5
5
  return;
@@ -21,10 +21,22 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
21
21
  }
22
22
  return;
23
23
  }
24
- const clampedValue = clamp(value, min, max);
25
- const percentageValue = ((clampedValue - min) / (max - min)) * 100;
26
- let cellBackColor;
27
24
  const percentBarStyle = styledColumn.PercentBarStyle;
25
+ let percentageValue;
26
+ let barWidthPercent;
27
+ if (percentBarStyle.ColumnComparison) {
28
+ // Finance convention: (difference / |base|) * 100 — signed %, use |price| when base is negative
29
+ const absMax = Math.abs(max);
30
+ percentageValue = absMax === 0 ? 0 : (Number(value) / absMax) * 100;
31
+ // Bar width uses |percentage| so 50% and -50% have the same visual width
32
+ barWidthPercent = Math.min(100, Math.abs(percentageValue));
33
+ }
34
+ else {
35
+ const clampedValue = clamp(value, min, max);
36
+ percentageValue = ((clampedValue - min) / (max - min)) * 100;
37
+ barWidthPercent = percentageValue;
38
+ }
39
+ let cellBackColor;
28
40
  if (percentBarStyle.ColumnComparison) {
29
41
  cellBackColor = percentBarStyle.ColumnComparison.Color;
30
42
  }
@@ -52,7 +64,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
52
64
  barInsideEl.className = 'ab-PercentBar__barInside';
53
65
  barInsideEl.style.background = cellBackColor;
54
66
  barInsideEl.style.height = '100%';
55
- barInsideEl.style.width = `${percentageValue.toFixed(0)}%`;
67
+ barInsideEl.style.width = `${barWidthPercent.toFixed(0)}%`;
56
68
  barEl.append(barInsideEl);
57
69
  this.eGui.append(barEl);
58
70
  if (hasCellText) {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useCallback, useEffect } from 'react';
3
- import debounce from 'lodash/debounce';
3
+ import debounce from '../../Utilities/utils/debounce';
4
4
  import Input from '../Input';
5
5
  import { getVariableColor } from '../../Utilities/Helpers/StyleHelper';
6
6
  import tinycolor from 'tinycolor2';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import isPlainObject from 'lodash/isPlainObject';
2
+ import isPlainObject from '../../Utilities/utils/isPlainObject';
3
3
  export default ({ domProps, item, onItemClick, index, columns, className, idProperty, style, }) => {
4
4
  const key = item[idProperty] || index;
5
5
  if (!isPlainObject(item)) {
@@ -130,7 +130,7 @@ export const PrimitiveValueInput = (props) => {
130
130
  } }));
131
131
  }
132
132
  else if (!['date', 'boolean'].includes(props.inputType)) {
133
- editor = (React.createElement(PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', value: props.value, columnId: mapColumnExpressionToColumnId(props.lefthandColumnIdParam), onChange: (value) => {
133
+ editor = (React.createElement(PermittedValuesSelector, { allowNewValues: true, searchable: 'menulist', value: props.value, columnId: mapColumnExpressionToColumnId(props.lefthandColumnIdParam), onChange: (value) => {
134
134
  props.onChange(value);
135
135
  } }));
136
136
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { createContext, useContext } from 'react';
3
- import merge from 'lodash/merge';
3
+ import merge from '../../Utilities/utils/merge';
4
4
  import join from '../utils/join';
5
5
  import { Box } from '../Flex';
6
6
  const FormLayoutContext = createContext(null);
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useRef, useEffect } from 'react';
3
- import debounce from 'lodash/debounce';
3
+ import debounce from '../../Utilities/utils/debounce';
4
4
  import batchUpdate from '../utils/batchUpdate';
5
5
  import selectParent from '../utils/selectParent';
6
6
  import useProperty from '../utils/useProperty';
@@ -362,6 +362,10 @@ export const Select = function (props) {
362
362
  // and then pass the actual values to Resizable
363
363
  minWidth: CSS_VARS_VALUES['--ab-cmp-select-menu__min-width'], maxHeight: CSS_VARS_VALUES['--ab-cmp-select-menu__max-height'], maxWidth: CSS_VARS_VALUES['--ab-cmp-select-menu__max-width'], defaultSize: sizeRef.current, onResizeStop: onResizeStop, onResizeStart: (e) => {
364
364
  e.preventDefault();
365
+ }, handleClasses: {
366
+ right: 'ab-Select-resize-handle ab-Select-resize-handle--right',
367
+ bottom: 'ab-Select-resize-handle ab-Select-resize-handle--bottom',
368
+ bottomRight: 'ab-Select-resize-handle ab-Select-resize-handle--bottom-right',
365
369
  } }, theChildren)) : (theChildren))));
366
370
  };
367
371
  }, [resizable, JSON.stringify(CSS_VARS_VALUES)]);
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1770908579112 || Date.now(),
4
- VERSION: "22.0.0-canary.9" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1771927464818 || Date.now(),
4
+ VERSION: "22.0.0" || '--current-version--',
5
5
  };
@@ -1,4 +1,4 @@
1
- import isDeepEqual from 'lodash/isEqual';
1
+ import isDeepEqual from '../../Utilities/utils/isEqual';
2
2
  import { debug as debugFactory } from '@infinite-table/infinite-react';
3
3
  import { isPivotLayoutModel } from './isPivotLayoutModel';
4
4
  import { normalizePivotLayoutModel, normalizeTableLayoutModel } from './normalizeLayoutModel';
@@ -329,7 +329,7 @@ export declare const ADAPTABLE_METAMODEL: {
329
329
  kind: string;
330
330
  desc: string;
331
331
  };
332
- AdaptableColumnType: {
332
+ AdaptableColumnTypeName: {
333
333
  name: string;
334
334
  kind: string;
335
335
  desc: string;
@@ -3002,6 +3002,17 @@ export declare const ADAPTABLE_METAMODEL: {
3002
3002
  desc: string;
3003
3003
  }[];
3004
3004
  };
3005
+ DataRowConfig: {
3006
+ name: string;
3007
+ kind: string;
3008
+ desc: string;
3009
+ props: {
3010
+ name: string;
3011
+ kind: string;
3012
+ desc: string;
3013
+ isOpt: boolean;
3014
+ }[];
3015
+ };
3005
3016
  DataSet: {
3006
3017
  name: string;
3007
3018
  kind: string;