@adaptabletools/adaptable 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 +1 -0
  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 +22 -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 +1 -1
  53. package/src/Utilities/Hooks/index.d.ts +1 -2
  54. package/src/Utilities/Hooks/index.js +1 -2
  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 +40 -0
  61. package/src/Utilities/utils/chunk.d.ts +6 -0
  62. package/src/Utilities/utils/chunk.js +17 -0
  63. package/src/Utilities/utils/clamp.d.ts +5 -0
  64. package/src/Utilities/utils/clamp.js +7 -0
  65. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  66. package/src/Utilities/utils/cloneDeepWith.js +67 -0
  67. package/src/Utilities/utils/debounce.d.ts +20 -0
  68. package/src/Utilities/utils/debounce.js +121 -0
  69. package/src/Utilities/utils/flatten.d.ts +5 -0
  70. package/src/Utilities/utils/flatten.js +7 -0
  71. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  72. package/src/Utilities/utils/flattenDeep.js +7 -0
  73. package/src/Utilities/utils/get.d.ts +6 -0
  74. package/src/Utilities/utils/get.js +35 -0
  75. package/src/Utilities/utils/index.d.ts +22 -0
  76. package/src/Utilities/utils/index.js +22 -0
  77. package/src/Utilities/utils/isArray.d.ts +6 -0
  78. package/src/Utilities/utils/isArray.js +6 -0
  79. package/src/Utilities/utils/isEqual.d.ts +5 -0
  80. package/src/Utilities/utils/isEqual.js +124 -0
  81. package/src/Utilities/utils/isObject.d.ts +6 -0
  82. package/src/Utilities/utils/isObject.js +9 -0
  83. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  84. package/src/Utilities/utils/isPlainObject.js +17 -0
  85. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  86. package/src/Utilities/utils/kebabCase.js +8 -0
  87. package/src/Utilities/utils/merge.d.ts +11 -0
  88. package/src/Utilities/utils/merge.js +40 -0
  89. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  90. package/src/Utilities/utils/mergeWith.js +46 -0
  91. package/src/Utilities/utils/orderBy.d.ts +8 -0
  92. package/src/Utilities/utils/orderBy.js +30 -0
  93. package/src/Utilities/utils/parseInt.d.ts +6 -0
  94. package/src/Utilities/utils/parseInt.js +9 -0
  95. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  96. package/src/Utilities/utils/sentenceCase.js +15 -0
  97. package/src/Utilities/utils/startCase.d.ts +5 -0
  98. package/src/Utilities/utils/startCase.js +11 -0
  99. package/src/Utilities/utils/throttle.d.ts +17 -0
  100. package/src/Utilities/utils/throttle.js +19 -0
  101. package/src/Utilities/utils/toNumber.d.ts +5 -0
  102. package/src/Utilities/utils/toNumber.js +39 -0
  103. package/src/Utilities/utils/uniq.d.ts +7 -0
  104. package/src/Utilities/utils/uniq.js +9 -0
  105. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  106. package/src/Utilities/utils/uniqBy.js +22 -0
  107. package/src/Utilities/utils/words.d.ts +7 -0
  108. package/src/Utilities/utils/words.js +10 -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 +1 -1
  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 +1 -1
  117. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
  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 +80 -0
  135. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  136. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -8
  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} +19 -19
  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 +29 -7
  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.esm.tsbuildinfo +1 -1
  173. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -12
  174. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  175. package/src/Utilities/Hooks/useAdaptableState.js +0 -39
  176. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  177. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -31
  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
@@ -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: 1772037233183 || Date.now(),
4
+ VERSION: "22.0.1-canary.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;