@adaptabletools/adaptable-cjs 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 +2 -1
  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 +26 -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 +2 -2
  43. package/src/Utilities/Hooks/index.d.ts +1 -2
  44. package/src/Utilities/Hooks/index.js +1 -3
  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 +58 -0
  51. package/src/Utilities/utils/chunk.d.ts +6 -0
  52. package/src/Utilities/utils/chunk.js +20 -0
  53. package/src/Utilities/utils/clamp.d.ts +5 -0
  54. package/src/Utilities/utils/clamp.js +10 -0
  55. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  56. package/src/Utilities/utils/cloneDeepWith.js +70 -0
  57. package/src/Utilities/utils/debounce.d.ts +20 -0
  58. package/src/Utilities/utils/debounce.js +124 -0
  59. package/src/Utilities/utils/flatten.d.ts +5 -0
  60. package/src/Utilities/utils/flatten.js +10 -0
  61. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  62. package/src/Utilities/utils/flattenDeep.js +10 -0
  63. package/src/Utilities/utils/get.d.ts +6 -0
  64. package/src/Utilities/utils/get.js +38 -0
  65. package/src/Utilities/utils/index.d.ts +22 -0
  66. package/src/Utilities/utils/index.js +48 -0
  67. package/src/Utilities/utils/isArray.d.ts +6 -0
  68. package/src/Utilities/utils/isArray.js +8 -0
  69. package/src/Utilities/utils/isEqual.d.ts +5 -0
  70. package/src/Utilities/utils/isEqual.js +127 -0
  71. package/src/Utilities/utils/isObject.d.ts +6 -0
  72. package/src/Utilities/utils/isObject.js +12 -0
  73. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  74. package/src/Utilities/utils/isPlainObject.js +20 -0
  75. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  76. package/src/Utilities/utils/kebabCase.js +12 -0
  77. package/src/Utilities/utils/merge.d.ts +11 -0
  78. package/src/Utilities/utils/merge.js +44 -0
  79. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  80. package/src/Utilities/utils/mergeWith.js +50 -0
  81. package/src/Utilities/utils/orderBy.d.ts +8 -0
  82. package/src/Utilities/utils/orderBy.js +33 -0
  83. package/src/Utilities/utils/parseInt.d.ts +6 -0
  84. package/src/Utilities/utils/parseInt.js +12 -0
  85. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  86. package/src/Utilities/utils/sentenceCase.js +19 -0
  87. package/src/Utilities/utils/startCase.d.ts +5 -0
  88. package/src/Utilities/utils/startCase.js +15 -0
  89. package/src/Utilities/utils/throttle.d.ts +17 -0
  90. package/src/Utilities/utils/throttle.js +23 -0
  91. package/src/Utilities/utils/toNumber.d.ts +5 -0
  92. package/src/Utilities/utils/toNumber.js +42 -0
  93. package/src/Utilities/utils/uniq.d.ts +7 -0
  94. package/src/Utilities/utils/uniq.js +12 -0
  95. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  96. package/src/Utilities/utils/uniqBy.js +25 -0
  97. package/src/Utilities/utils/words.d.ts +7 -0
  98. package/src/Utilities/utils/words.js +13 -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 +2 -2
  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 +2 -2
  106. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  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 +86 -0
  124. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  125. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
  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} +22 -22
  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 +25 -6
  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.cjs.tsbuildinfo +1 -1
  161. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
  162. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  163. package/src/Utilities/Hooks/useAdaptableState.js +0 -42
  164. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  165. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
  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
@@ -9,7 +9,7 @@ class ApiBase {
9
9
  _adaptable;
10
10
  /**
11
11
  * Constructor for all the api classes which simply takes and assigns an instance of Adaptable
12
- * @param _adaptable the core IAdaptable object
12
+ * @param _adaptable core IAdaptable object - for INTERNAL USE ONLY and not part of public API
13
13
  */
14
14
  constructor(_adaptable) {
15
15
  this._adaptable = _adaptable;
@@ -78,7 +78,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
78
78
  getAggregatableColumns(): AdaptableColumn[];
79
79
  getQueryableColumns(): AdaptableColumn[];
80
80
  getExportableColumns(): AdaptableColumn[];
81
- getAlwaysHiddenColumns(): AdaptableColumn[];
81
+ getUIHiddenColumns(): AdaptableColumn[];
82
82
  private logMissingColumnWarning;
83
83
  getPrimaryKeyColumn(): AdaptableColumn<any>;
84
84
  getDefaultAggFunc(columnId: string): string;
@@ -28,7 +28,7 @@ const ROW_GROUP_COLUMN_DEFAULTS = {
28
28
  readOnly: false,
29
29
  resizable: true,
30
30
  visible: true,
31
- alwaysHidden: false,
31
+ isUIHiddenColumn: false,
32
32
  fieldOnly: false,
33
33
  queryable: false,
34
34
  sortable: false,
@@ -131,7 +131,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
131
131
  return this.getGridApi().getInternalState().Columns ?? [];
132
132
  }
133
133
  getUIAvailableColumns() {
134
- return this.getColumns().filter((c) => !c.alwaysHidden &&
134
+ return this.getColumns().filter((c) => !c.isUIHiddenColumn &&
135
135
  !c.isGeneratedSelectionColumn &&
136
136
  // currently (20.0.7) we don't display Pivot Totals in UI
137
137
  !c.isPivotTotalColumn);
@@ -480,8 +480,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
480
480
  getExportableColumns() {
481
481
  return this.getColumns().filter((c) => c.exportable);
482
482
  }
483
- getAlwaysHiddenColumns() {
484
- return this.getColumns().filter((c) => c.alwaysHidden);
483
+ getUIHiddenColumns() {
484
+ return this.getColumns().filter((c) => c.isUIHiddenColumn);
485
485
  }
486
486
  logMissingColumnWarning(columnId) {
487
487
  if (this.getColumnOptions().showMissingColumnsWarning === true) {
@@ -152,6 +152,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
152
152
  openGridInfoSettingsPanel(): void;
153
153
  getAgGridRowModelType(): RowModelType;
154
154
  showTransposedView(transposeConfig?: TransposeConfig): void;
155
+ closeTransposedView(): void;
155
156
  getAllAgGridColumns(): Column<any>[];
156
157
  updateAgGridColumnState(columnState: ColumnState): void;
157
158
  updateAgGridColumnStates(columnStates: ColumnState[]): void;
@@ -102,15 +102,15 @@ class GridApiImpl extends ApiBase_1.ApiBase {
102
102
  async manageGridData(dataRowConfig, dataUpdateConfig) {
103
103
  const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
104
104
  if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
105
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.delete, transactionResult.removedRows, 'Delete');
105
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.deleteRows, transactionResult.removedRows, 'Delete');
106
106
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
107
107
  }
108
108
  if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
109
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.update, transactionResult.updatedRows, 'Update');
109
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.updateRows, transactionResult.updatedRows, 'Update');
110
110
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
111
111
  }
112
112
  if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
113
- const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.dataRows.add, transactionResult.addedRows, 'Add');
113
+ const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.addRows, transactionResult.addedRows, 'Add');
114
114
  this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
115
115
  }
116
116
  return transactionResult;
@@ -611,7 +611,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
611
611
  showTransposedView(transposeConfig = {}) {
612
612
  const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
613
613
  const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
614
- const autosize = transposeConfig.autosize ?? true;
615
614
  const columnsToTranspose = transposeConfig.columnsToTranspose;
616
615
  const rowsToTranspose = transposeConfig.rowsToTranspose;
617
616
  this.getAdaptableInternalApi().showPopupWindow({
@@ -622,12 +621,14 @@ class GridApiImpl extends ApiBase_1.ApiBase {
622
621
  popupProps: {
623
622
  transposedColumnId,
624
623
  hideTransposedColumn,
625
- autosize,
626
624
  columnsToTranspose,
627
625
  rowsToTranspose,
628
626
  },
629
627
  });
630
628
  }
629
+ closeTransposedView() {
630
+ this.getUserInterfaceApi().closeCustomWindowPopup('WINDOW_SHOW_TRANSPOSED_VIEW');
631
+ }
631
632
  getAllAgGridColumns() {
632
633
  return this._adaptable.getAllGridColumns();
633
634
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isPivotLayout = exports.pivotLayoutModelToPivotLayout = exports.tableLayoutModelToTableLayout = exports.pivotLayoutToPivotLayoutModel = exports.tableLayoutToTableLayoutModel = exports.checkForDuplicateColumns = exports.toRowGroupValuesForLayoutModel = exports.toRowGroupValuesForLayoutState = exports.getLayoutRowGroupValuesExceptionGroupKeys = exports.normalizePivotLayout = exports.normalizeTableLayout = exports.normalizeLayout = exports.areLayoutsEqual = exports.layoutModelToLayoutState = exports.layoutStateToLayoutModel = void 0;
4
4
  exports.columnWidthsToColumnSizing = columnWidthsToColumnSizing;
5
5
  const tslib_1 = require("tslib");
6
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
6
+ const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
7
7
  const isPivotLayoutModel_1 = require("../../layout-manager/src/isPivotLayoutModel");
8
8
  const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
9
9
  const simplifyLayoutModel_1 = require("../../layout-manager/src/simplifyLayoutModel");
@@ -32,6 +32,6 @@ export declare class ColumnInternalApi extends ApiBase {
32
32
  private buildColumnHeaderContext;
33
33
  hasArrayDataType(column: AdaptableColumn): boolean;
34
34
  getQueryableColumnsForUIEditor(): AdaptableColumn[];
35
- isAlwaysHiddenColumn(columnIdentifier: string | ColDef): boolean;
35
+ isColumnUIHidden(columnIdentifier: string | ColDef): boolean;
36
36
  getColumnDateTypes(): AdaptableColumnDataType[];
37
37
  }
@@ -5,7 +5,7 @@ exports.getAutoRowGroupColumnIdFor = getAutoRowGroupColumnIdFor;
5
5
  const tslib_1 = require("tslib");
6
6
  const ApiBase_1 = require("../Implementation/ApiBase");
7
7
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
8
- const uniq_1 = tslib_1.__importDefault(require("lodash/uniq"));
8
+ const uniq_1 = tslib_1.__importDefault(require("../../Utilities/utils/uniq"));
9
9
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
10
10
  const ColumnApiImpl_1 = require("../Implementation/ColumnApiImpl");
11
11
  const destructurePivotColumnId_1 = require("../../layout-manager/src/destructurePivotColumnId");
@@ -282,9 +282,11 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
282
282
  getQueryableColumnsForUIEditor() {
283
283
  return this.getColumnApi()
284
284
  .getQueryableColumns()
285
- .filter((column) => !column.isGeneratedPivotResultColumn && !column.isGeneratedRowGroupColumn && !column.isGeneratedSelectionColumn);
285
+ .filter((column) => !column.isGeneratedPivotResultColumn &&
286
+ !column.isGeneratedRowGroupColumn &&
287
+ !column.isGeneratedSelectionColumn);
286
288
  }
287
- isAlwaysHiddenColumn(columnIdentifier) {
289
+ isColumnUIHidden(columnIdentifier) {
288
290
  return this.getColumnApi().hasColumnType(columnIdentifier, AdaptableColumn_1.HIDDEN_COLUMN_TYPE);
289
291
  }
290
292
  getColumnDateTypes() {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventInternalApi = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ApiBase_1 = require("../Implementation/ApiBase");
6
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
6
+ const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
7
7
  class EventInternalApi extends ApiBase_1.ApiBase {
8
8
  fireGridSortedEvent() {
9
9
  if (this.isAdapTableReady()) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createEngine = createEngine;
4
4
  const tslib_1 = require("tslib");
5
- const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
5
+ const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
6
6
  const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
7
7
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
8
8
  const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
@@ -6,11 +6,10 @@ exports.ProcessKeepUserDefinedRevision = ProcessKeepUserDefinedRevision;
6
6
  exports.MergeStateFunction = MergeStateFunction;
7
7
  exports.MergeState = MergeState;
8
8
  const tslib_1 = require("tslib");
9
- const mergeWith_1 = tslib_1.__importDefault(require("lodash/mergeWith"));
10
- const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
11
- const isArray_1 = tslib_1.__importDefault(require("lodash/isArray"));
12
- const extend_1 = tslib_1.__importDefault(require("lodash/extend"));
13
- const isObject_1 = tslib_1.__importDefault(require("lodash/isObject"));
9
+ const mergeWith_1 = tslib_1.__importDefault(require("../../Utilities/utils/mergeWith"));
10
+ const merge_1 = tslib_1.__importDefault(require("../../Utilities/utils/merge"));
11
+ const isArray_1 = tslib_1.__importDefault(require("../../Utilities/utils/isArray"));
12
+ const isObject_1 = tslib_1.__importDefault(require("../../Utilities/utils/isObject"));
14
13
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
15
14
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
16
15
  function customizer(objValue, srcValue) {
@@ -120,7 +119,7 @@ function MergeStateFunction(oldState, newState) {
120
119
  }
121
120
  // main merge function
122
121
  function MergeState(oldState, newState) {
123
- const result = (0, extend_1.default)({}, oldState);
122
+ const result = Object.assign({}, oldState);
124
123
  for (const key in newState) {
125
124
  if (!newState.hasOwnProperty(key)) {
126
125
  continue;
@@ -13,7 +13,7 @@ const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
13
13
  const getObjectTagsViewItems_1 = require("../Utilities/getObjectTagsViewItems");
14
14
  const getRuleViewItems_1 = require("../Utilities/getRuleViewItems");
15
15
  const getScopeViewItems_1 = require("../Utilities/getScopeViewItems");
16
- const getFormatColumnSettingsTargetItems_1 = require("./Utilities/FormatColumn/getFormatColumnSettingsTargetItems");
16
+ const getFormatColumnRowTargetItems_1 = require("./Utilities/FormatColumn/getFormatColumnRowTargetItems");
17
17
  const FormatColumnStyleWizardSection_1 = require("../View/FormatColumn/Wizard/FormatColumnStyleWizardSection");
18
18
  class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  constructor(api) {
@@ -91,7 +91,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
91
91
  values: [formatColumn.Name],
92
92
  },
93
93
  (0, getScopeViewItems_1.getScopeViewItems)(formatColumn.Scope, this.api),
94
- (0, getFormatColumnSettingsTargetItems_1.getFormatColumnSettingsTargetItems)(formatColumn),
94
+ (0, getFormatColumnRowTargetItems_1.getFormatColumnRowTargetItems)(formatColumn),
95
95
  formatColumn.Rule && (0, getRuleViewItems_1.getRuleViewItems)(formatColumn.Rule, this.api),
96
96
  {
97
97
  name: 'Style',
@@ -15,7 +15,7 @@ const getLayoutFilterViewItems_1 = require("./Utilities/Layout/getLayoutFilterVi
15
15
  const getLayoutSortViewItems_1 = require("./Utilities/Layout/getLayoutSortViewItems");
16
16
  const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
17
17
  const windowFactory_1 = require("../View/Components/Popups/WindowPopups/windowFactory");
18
- const flattenDeep_1 = tslib_1.__importDefault(require("lodash/flattenDeep"));
18
+ const flattenDeep_1 = tslib_1.__importDefault(require("../Utilities/utils/flattenDeep"));
19
19
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
20
20
  const getGridFilterPreview_1 = require("../View/Layout/Wizard/getGridFilterPreview");
21
21
  const RowSummaryService_1 = require("../Utilities/Services/RowSummaryService");
@@ -191,14 +191,22 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
191
191
  });
192
192
  }
193
193
  if (styledColumn.BadgeStyle) {
194
+ let rowTypes = [];
195
+ if (!styledColumn.BadgeStyle?.RowScope?.ExcludeDataRows) {
196
+ rowTypes.push('Data');
197
+ }
198
+ if (!styledColumn.BadgeStyle?.RowScope?.ExcludeGroupRows) {
199
+ rowTypes.push('Group');
200
+ }
201
+ if (!styledColumn.BadgeStyle?.RowScope?.ExcludeSummaryRows) {
202
+ rowTypes.push('Summary');
203
+ }
204
+ if (!styledColumn.BadgeStyle?.RowScope?.ExcludeTotalRows) {
205
+ rowTypes.push('Total');
206
+ }
194
207
  specificTypeItems.push({
195
208
  name: 'Rows',
196
- values: [
197
- `Data Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeDataRows ? 'No' : 'Yes'}`,
198
- `Group Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeGroupRows ? 'No' : 'Yes'}`,
199
- `Summary Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeSummaryRows ? 'No' : 'Yes'}`,
200
- `Total Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeTotalRows ? 'No' : 'Yes'}`,
201
- ],
209
+ values: rowTypes
202
210
  });
203
211
  }
204
212
  if (styledColumn.BadgeStyle) {
@@ -6,13 +6,13 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
6
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
7
  const TeamSharingRedux_1 = require("../Redux/ActionsReducers/TeamSharingRedux");
8
8
  const TeamSharingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/TeamSharingRedux"));
9
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
9
+ const isEqual_1 = tslib_1.__importDefault(require("../Utilities/utils/isEqual"));
10
10
  const LayoutRedux_1 = require("../Redux/ActionsReducers/LayoutRedux");
11
11
  const SharedEntityObjectView_1 = require("../View/TeamSharing/SharedEntityObjectView");
12
12
  const TeamSharingApplyButton_1 = require("../View/TeamSharing/TeamSharingApplyButton");
13
13
  const SharedEntityDependencies_1 = require("../View/TeamSharing/SharedEntityDependencies");
14
14
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
15
- const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
15
+ const flatten_1 = tslib_1.__importDefault(require("../Utilities/utils/flatten"));
16
16
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
17
17
  class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
18
18
  SKIP_TEAMSHARING_UPDATE_ACTIONS = [
@@ -1,5 +1,5 @@
1
1
  import { FormatColumn } from '../../../AdaptableState/FormatColumnState';
2
- export declare const getFormatColumnSettingsTargetItems: (formatColumn: FormatColumn) => {
2
+ export declare const getFormatColumnRowTargetItems: (formatColumn: FormatColumn) => {
3
3
  name: string;
4
4
  values: string[];
5
5
  };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFormatColumnRowTargetItems = void 0;
4
+ const getFormatColumnRowTargetItems = (formatColumn) => {
5
+ let values = [];
6
+ if (formatColumn.RowScope) {
7
+ if (!formatColumn.RowScope.ExcludeDataRows) {
8
+ values.push('Data');
9
+ }
10
+ if (!formatColumn.RowScope.ExcludeGroupRows) {
11
+ values.push('Group');
12
+ }
13
+ if (!formatColumn.RowScope.ExcludeSummaryRows) {
14
+ values.push('Summary');
15
+ }
16
+ if (!formatColumn.RowScope.ExcludeTotalRows) {
17
+ values.push('Total');
18
+ }
19
+ }
20
+ values = values.filter(Boolean);
21
+ return {
22
+ name: 'Rows',
23
+ values: values.length > 0 ? values : ['-'],
24
+ };
25
+ };
26
+ exports.getFormatColumnRowTargetItems = getFormatColumnRowTargetItems;
@@ -3,19 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFormatColumnSettingsViewItems = void 0;
4
4
  const getFormatColumnSettingsViewItems = (formatColumn) => {
5
5
  let values = [];
6
- if (formatColumn.RowScope) {
7
- if (formatColumn.RowScope.ExcludeDataRows) {
8
- values.push('Exclude Data Rows');
9
- }
10
- if (formatColumn.RowScope.ExcludeGroupRows) {
11
- values.push('Exclude Group Rows');
12
- }
13
- if (formatColumn.RowScope.ExcludeSummaryRows) {
14
- values.push('Exclude Summary Rows');
15
- }
16
- if (formatColumn.RowScope.ExcludeTotalRows) {
17
- values.push('Exclude Total Rows');
18
- }
6
+ if (!formatColumn.Target || formatColumn.Target === 'cell') {
7
+ values.push('Target: Column Cells');
8
+ }
9
+ else {
10
+ values.push('Target: Column Header');
19
11
  }
20
12
  if (formatColumn.ColumnGroupScope) {
21
13
  values.push(`Column Groups: ${formatColumn.ColumnGroupScope === 'Both' ? 'Always' : formatColumn.ColumnGroupScope}`);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.aggregatedBooleanExpressionFunctionNames = exports.aggregatedBooleanExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
5
+ const parseInt_1 = tslib_1.__importDefault(require("../utils/parseInt"));
6
6
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
7
7
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
8
8
  const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
@@ -454,7 +454,7 @@ exports.aggregatedScalarExpressionFunctions = {
454
454
  handler(args, context) {
455
455
  const distinctColumnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('ONLY', args);
456
456
  const onlyColumnName = distinctColumnParameter.value;
457
- const columnType = (0, expressionFunctionUtils_1.validateColumnType)(onlyColumnName, ['number'], 'ONLY', context.adaptableApi);
457
+ const columnType = (0, expressionFunctionUtils_1.validateColumnType)(onlyColumnName, ['number', 'text'], 'ONLY', context.adaptableApi);
458
458
  const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('ONLY', 'operand', ['GROUP_BY'], args, {
459
459
  isOptional: true,
460
460
  });
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
6
6
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
7
7
  const operators_1 = require("rxjs/operators");
8
- const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
8
+ const toNumber_1 = tslib_1.__importDefault(require("../utils/toNumber"));
9
9
  const evaluator_1 = require("../../parser/src/evaluator");
10
10
  // string functions may be case (in)sensitive, see internalApi.isTextComparisonCaseSensitive()
11
11
  // if case is insensitive, we convert ALL involved strings to lower case
@@ -4,7 +4,7 @@ exports.observableExpressionFunctionNames = exports.observableExpressionFunction
4
4
  const tslib_1 = require("tslib");
5
5
  const rxjs_1 = require("rxjs");
6
6
  const operators_1 = require("rxjs/operators");
7
- const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
7
+ const parseInt_1 = tslib_1.__importDefault(require("../utils/parseInt"));
8
8
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
9
9
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
10
10
  const TypeExtensions_1 = require("../Extensions/TypeExtensions");
@@ -22,7 +22,7 @@ exports.IsNumeric = IsNumeric;
22
22
  exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
23
23
  exports.ReplaceAllOccurencesExceptLastOne = ReplaceAllOccurencesExceptLastOne;
24
24
  const tslib_1 = require("tslib");
25
- const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
25
+ const startCase_1 = tslib_1.__importDefault(require("../utils/startCase"));
26
26
  function IsNull(stringToCheck) {
27
27
  return stringToCheck == null || stringToCheck == undefined;
28
28
  }
@@ -9,8 +9,8 @@ exports.removeAdaptableObjectPrimitivesInline = removeAdaptableObjectPrimitivesI
9
9
  exports.removeAdaptableObjectPrimitives = removeAdaptableObjectPrimitives;
10
10
  exports.isAdaptableObject = isAdaptableObject;
11
11
  const tslib_1 = require("tslib");
12
- const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
13
- const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
12
+ const cloneDeepWith_1 = tslib_1.__importDefault(require("../utils/cloneDeepWith"));
13
+ const isPlainObject_1 = tslib_1.__importDefault(require("../utils/isPlainObject"));
14
14
  const Uuid_1 = require("../../AdaptableState/Uuid");
15
15
  const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
16
16
  const GET_CURRENT_VERSION = () => {
@@ -6,7 +6,7 @@ exports.StringFormatter = StringFormatter;
6
6
  const tslib_1 = require("tslib");
7
7
  // TODO inspect why the following is erroring on angular build
8
8
  const date_fns_1 = require("date-fns");
9
- const sentence_case_1 = require("sentence-case");
9
+ const sentenceCase_1 = tslib_1.__importDefault(require("../utils/sentenceCase"));
10
10
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
11
11
  const Helper_1 = tslib_1.__importDefault(require("./Helper"));
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
@@ -175,7 +175,7 @@ function StringFormatter(input, options = {}, rowNode, column, api) {
175
175
  s = s.toUpperCase();
176
176
  }
177
177
  else if (options.Case == 'Sentence') {
178
- s = (0, sentence_case_1.sentenceCase)(s);
178
+ s = (0, sentenceCase_1.default)(s);
179
179
  }
180
180
  }
181
181
  if (options.Trim !== undefined && options.Trim == true) {
@@ -1,4 +1,3 @@
1
1
  import { useAdaptableColumn } from './useAdaptableColumn';
2
2
  import { useAdaptableOptions } from './useAdaptableOptions';
3
- import { useAdaptableState } from './useAdaptableState';
4
- export { useAdaptableColumn, useAdaptableOptions, useAdaptableState };
3
+ export { useAdaptableColumn, useAdaptableOptions };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAdaptableState = exports.useAdaptableOptions = exports.useAdaptableColumn = void 0;
3
+ exports.useAdaptableOptions = exports.useAdaptableColumn = void 0;
4
4
  const useAdaptableColumn_1 = require("./useAdaptableColumn");
5
5
  Object.defineProperty(exports, "useAdaptableColumn", { enumerable: true, get: function () { return useAdaptableColumn_1.useAdaptableColumn; } });
6
6
  const useAdaptableOptions_1 = require("./useAdaptableOptions");
7
7
  Object.defineProperty(exports, "useAdaptableOptions", { enumerable: true, get: function () { return useAdaptableOptions_1.useAdaptableOptions; } });
8
- const useAdaptableState_1 = require("./useAdaptableState");
9
- Object.defineProperty(exports, "useAdaptableState", { enumerable: true, get: function () { return useAdaptableState_1.useAdaptableState; } });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("../../utils/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
@@ -19,7 +19,7 @@ export declare class RowSummaryService {
19
19
  *
20
20
  * @param colId optional to evaluate only one column
21
21
  */
22
- _throttledEvaluateRowSummary: import("lodash").DebouncedFuncLeading<(reason?: {
22
+ _throttledEvaluateRowSummary: import("../utils/debounce").DebouncedFunction<(reason?: {
23
23
  columnIds: string[];
24
24
  }) => void>;
25
25
  private evaluateRowSummary;
@@ -8,8 +8,8 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
8
8
  const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
9
9
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
10
10
  const ObjectExtensions_1 = require("../Extensions/ObjectExtensions");
11
- const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
12
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
11
+ const throttle_1 = tslib_1.__importDefault(require("../utils/throttle"));
12
+ const isEqual_1 = tslib_1.__importDefault(require("../utils/isEqual"));
13
13
  /**
14
14
  * The logic is extracted here to make it easier to follow
15
15
  */
@@ -21,7 +21,7 @@ const getScopeViewItems = (scope, api) => {
21
21
  values = scope.ColumnTypes;
22
22
  }
23
23
  return {
24
- label: 'Scope',
24
+ label: 'Columns',
25
25
  name: 'Target',
26
26
  values,
27
27
  };
@@ -0,0 +1,15 @@
1
+ import { IAggFuncParams } from 'ag-grid-enterprise';
2
+ interface OnlyAggResult {
3
+ distinctValues: Set<number | string>;
4
+ value: number | string | null;
5
+ toString(): string;
6
+ }
7
+ /**
8
+ * AG Grid aggFunc that returns the column value only when all rows in the group
9
+ * share the same value. Returns null when values differ (or when there are no values).
10
+ *
11
+ * Supports multiple group levels: leaf groups aggregate raw cell values while
12
+ * parent groups merge the metadata objects returned by child groups.
13
+ */
14
+ export declare const only: (params: IAggFuncParams, columnId: string) => OnlyAggResult;
15
+ export {};
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.only = void 0;
4
+ function createOnlyResult(distinctValues) {
5
+ const value = distinctValues.size === 1 ? distinctValues.values().next().value : null;
6
+ return {
7
+ distinctValues,
8
+ value,
9
+ toString() {
10
+ return value != null ? String(value) : '';
11
+ },
12
+ };
13
+ }
14
+ /**
15
+ * AG Grid aggFunc that returns the column value only when all rows in the group
16
+ * share the same value. Returns null when values differ (or when there are no values).
17
+ *
18
+ * Supports multiple group levels: leaf groups aggregate raw cell values while
19
+ * parent groups merge the metadata objects returned by child groups.
20
+ */
21
+ const only = (params, columnId) => {
22
+ const { api: gridApi, rowNode: groupRowNode, values } = params;
23
+ // Leaf group: the lowest-level group whose children are actual data rows.
24
+ // We read raw cell values and collect distinct ones, bailing out early
25
+ // as soon as we see a second distinct value (the result would be null anyway).
26
+ if (groupRowNode.leafGroup) {
27
+ const filteredOnly = !gridApi.getGridOption('suppressAggFilteredOnly');
28
+ const childNodes = (filteredOnly ? groupRowNode.childrenAfterFilter : groupRowNode.childrenAfterGroup) ?? [];
29
+ const distinctValues = new Set();
30
+ for (const rowNode of childNodes) {
31
+ const rawValue = gridApi.getCellValue({ colKey: columnId, rowNode });
32
+ if (typeof rawValue === 'number' || typeof rawValue === 'string') {
33
+ distinctValues.add(rawValue);
34
+ if (distinctValues.size > 1) {
35
+ return createOnlyResult(distinctValues);
36
+ }
37
+ }
38
+ }
39
+ return createOnlyResult(distinctValues);
40
+ }
41
+ // Non-leaf group: children are other groups, not data rows.
42
+ // AG Grid has already called this aggFunc on each child group, so
43
+ // `params.values` contains the OnlyAggResult objects they returned.
44
+ // We merge their distinctValues sets instead of re-traversing leaf rows.
45
+ const mergedDistinctValues = new Set();
46
+ for (const childResult of values) {
47
+ if (childResult && typeof childResult === 'object' && 'distinctValues' in childResult) {
48
+ for (const val of childResult.distinctValues) {
49
+ mergedDistinctValues.add(val);
50
+ if (mergedDistinctValues.size > 1) {
51
+ return createOnlyResult(mergedDistinctValues);
52
+ }
53
+ }
54
+ }
55
+ }
56
+ return createOnlyResult(mergedDistinctValues);
57
+ };
58
+ exports.only = only;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Creates an array of elements split into groups the length of size.
3
+ * If array can't be split evenly, the final chunk will be the remaining elements.
4
+ * Drop-in replacement for lodash/chunk.
5
+ */
6
+ export default function chunk<T>(array: T[], size?: number): T[][];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = chunk;
4
+ /**
5
+ * Creates an array of elements split into groups the length of size.
6
+ * If array can't be split evenly, the final chunk will be the remaining elements.
7
+ * Drop-in replacement for lodash/chunk.
8
+ */
9
+ function chunk(array, size = 1) {
10
+ const length = array.length;
11
+ if (!length || !(size >= 1)) {
12
+ return [];
13
+ }
14
+ const chunkSize = Math.floor(size);
15
+ const result = [];
16
+ for (let i = 0; i < length; i += chunkSize) {
17
+ result.push(array.slice(i, i + chunkSize));
18
+ }
19
+ return result;
20
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Clamps number within the inclusive lower and upper bounds.
3
+ * Drop-in replacement for lodash/clamp.
4
+ */
5
+ export default function clamp(number: number, lower: number, upper: number): number;