@adaptabletools/adaptable 12.1.4 → 12.1.7

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 (114) hide show
  1. package/bundle.cjs.js +116 -143
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +11 -4
  6. package/src/AdaptableOptions/ColumnOptions.d.ts +2 -4
  7. package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
  8. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +31 -24
  9. package/src/Api/ColumnApi.d.ts +1 -1
  10. package/src/Api/FilterApi.d.ts +6 -0
  11. package/src/Api/FlashingCellApi.d.ts +8 -0
  12. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  13. package/src/Api/Implementation/ColumnApiImpl.js +2 -2
  14. package/src/Api/Implementation/DataSetApiImpl.js +1 -1
  15. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
  16. package/src/Api/Implementation/FilterApiImpl.js +20 -2
  17. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
  19. package/src/Api/Implementation/GridApiImpl.js +4 -4
  20. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/LayoutApiImpl.js +4 -3
  22. package/src/Api/Implementation/QueryApiImpl.js +1 -1
  23. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
  24. package/src/Api/LayoutApi.d.ts +1 -1
  25. package/src/Api/SystemStatusApi.d.ts +1 -1
  26. package/src/Api/ToolPanelApi.d.ts +1 -1
  27. package/src/PredefinedConfig/AlertState.d.ts +2 -2
  28. package/src/PredefinedConfig/Common/AdaptableColumn.js +3 -2
  29. package/src/PredefinedConfig/Common/AdaptablePredicate.js +23 -7
  30. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +6 -6
  31. package/src/PredefinedConfig/Common/Types.d.ts +1 -0
  32. package/src/PredefinedConfig/Common/Types.js +38 -1
  33. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  34. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -2
  35. package/src/Redux/ActionsReducers/SystemRedux.js +1 -2
  36. package/src/Redux/Store/AdaptableStore.js +15 -10
  37. package/src/Strategy/AlertModule.js +1 -1
  38. package/src/Strategy/BulkUpdateModule.js +1 -1
  39. package/src/Strategy/CalculatedColumnModule.js +1 -1
  40. package/src/Strategy/CellSummaryModule.js +1 -1
  41. package/src/Strategy/ChartingModule.js +1 -1
  42. package/src/Strategy/ConditionalStyleModule.js +1 -1
  43. package/src/Strategy/CustomSortModule.js +1 -1
  44. package/src/Strategy/DashboardModule.js +1 -1
  45. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  46. package/src/Strategy/DataSetModule.js +1 -1
  47. package/src/Strategy/ExportModule.js +1 -1
  48. package/src/Strategy/FilterModule.js +1 -1
  49. package/src/Strategy/FlashingCellModule.js +3 -3
  50. package/src/Strategy/FormatColumnModule.js +1 -1
  51. package/src/Strategy/FreeTextColumnModule.js +1 -1
  52. package/src/Strategy/GridInfoModule.js +1 -1
  53. package/src/Strategy/LayoutModule.js +1 -1
  54. package/src/Strategy/PlusMinusModule.js +1 -1
  55. package/src/Strategy/QueryModule.js +1 -1
  56. package/src/Strategy/QuickSearchModule.js +1 -1
  57. package/src/Strategy/ScheduleModule.js +1 -1
  58. package/src/Strategy/ShortcutModule.js +1 -1
  59. package/src/Strategy/SmartEditModule.js +1 -1
  60. package/src/Strategy/StateManagementModule.js +1 -1
  61. package/src/Strategy/StatusBarModule.js +1 -1
  62. package/src/Strategy/SystemStatusModule.js +1 -1
  63. package/src/Strategy/TeamSharingModule.js +1 -1
  64. package/src/Strategy/ThemeModule.js +1 -1
  65. package/src/Strategy/ToolPanelModule.js +1 -1
  66. package/src/Utilities/Constants/ModuleConstants.d.ts +68 -0
  67. package/src/Utilities/Constants/ModuleConstants.js +70 -1
  68. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -1
  69. package/src/Utilities/Extensions/ArrayExtensions.js +6 -0
  70. package/src/Utilities/Helpers/CalendarHelper.js +10 -7
  71. package/src/Utilities/Helpers/DateHelper.d.ts +0 -26
  72. package/src/Utilities/Helpers/DateHelper.js +2 -32
  73. package/src/Utilities/ObjectFactory.d.ts +2 -2
  74. package/src/Utilities/ObjectFactory.js +14 -14
  75. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +5 -0
  76. package/src/Utilities/Services/MetamodelService.d.ts +4 -4
  77. package/src/Utilities/Services/MetamodelService.js +19 -12
  78. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +193 -135
  79. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +23 -15
  80. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +3 -7
  81. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +2 -2
  82. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +148 -8
  83. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -7
  84. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +6 -0
  85. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +33 -0
  86. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +6 -0
  87. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +82 -0
  88. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +6 -0
  89. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +109 -0
  90. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +8 -0
  91. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +16 -0
  92. package/src/View/AdaptableWizardView/Wizard.js +2 -1
  93. package/src/View/AdaptableWizardView/helper.d.ts +1 -1
  94. package/src/View/AdaptableWizardView/helper.js +3 -10
  95. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +2 -0
  96. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -4
  97. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  98. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +10 -10
  99. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  100. package/src/View/Components/FilterForm/FilterForm.js +4 -2
  101. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -1
  102. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  103. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  104. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
  105. package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
  106. package/src/agGrid/Adaptable.d.ts +2 -0
  107. package/src/agGrid/Adaptable.js +18 -11
  108. package/src/components/ProgressIndicator/ProgressIndicator.js +10 -12
  109. package/src/metamodel/adaptable.metamodel.d.ts +74 -6
  110. package/src/metamodel/adaptable.metamodel.js +1 -1
  111. package/src/parser/src/types.d.ts +1 -1
  112. package/src/types.d.ts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "12.1.4",
3
+ "version": "12.1.7",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1659024589656;
1
+ declare const _default: 1660658453580;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1659024589656;
3
+ exports.default = 1660658453580;
@@ -49,14 +49,20 @@ export interface IAdaptable {
49
49
  * Avoid unnecessary store calls and rendering
50
50
  */
51
51
  isInitialised: boolean;
52
- /**
53
- * TRUE if the Adaptable custom tool panel (side-bar) is displayed
54
- */
55
- hasAdaptableToolPanel: boolean;
56
52
  /**
57
53
  * Set to true when adaptable is destroyed.
58
54
  */
59
55
  isDestroyed: boolean;
56
+ /**
57
+ * TRUE iff:
58
+ * 1. isInitialised = TRUE
59
+ * 2. isDestroyed = FALSE
60
+ */
61
+ isLive: boolean;
62
+ /**
63
+ * TRUE if the Adaptable custom tool panel (side-bar) is displayed
64
+ */
65
+ hasAdaptableToolPanel: boolean;
60
66
  /**
61
67
  * Adaptable contains a number of 'Services' which are created at Startup
62
68
  *
@@ -113,6 +119,7 @@ export interface IAdaptable {
113
119
  _emitSync(eventName: 'CreateAdaptableContextMenuItems', data?: any): Promise<any>;
114
120
  prepareGrid(): void;
115
121
  redrawBody(): void;
122
+ redrawRenderedRows(): void;
116
123
  redrawHeader(): void;
117
124
  redrawRow(rowNode: RowNode): void;
118
125
  redrawRows(rowNodes: RowNode[]): void;
@@ -5,14 +5,12 @@ import { Column } from '@ag-grid-community/all-modules';
5
5
  export interface ColumnOptions {
6
6
  /**
7
7
  * Provide an alternative Friendly Name for a Column
8
- *
9
8
  * @defaultValue undefined
10
9
  */
11
10
  columnFriendlyName?: (columnFriendlyNameContext: ColumnFriendlyNameContext) => string | undefined;
12
11
  /**
13
- * Optional list of Column Types - used primarily for Special Columns
14
- *
15
- * @defaultValue []
12
+ * Optional list of Column Types - used primarily for Calculated and FreeText Columns
13
+ * @defaultValue undefined
16
14
  */
17
15
  columnTypes?: string[];
18
16
  /**
@@ -150,4 +150,11 @@ export interface FilterOptions {
150
150
  * @defaultValue true
151
151
  */
152
152
  showQuickFilter?: boolean;
153
+ /**
154
+ * Display only currently filtered distinct values in Filter controls
155
+ *
156
+ * @defaultValue false
157
+ * @gridInfoItem
158
+ */
159
+ showDistinctFilteredValuesOnly?: boolean;
153
160
  }
@@ -105,7 +105,7 @@ export interface BasePermittedValues {
105
105
  */
106
106
  export interface PermittedValues extends BasePermittedValues {
107
107
  /**
108
- * Values to display: either hardcoded list or a function
108
+ * Values to display: either hardcoded list or a function that returns a list
109
109
  */
110
110
  values?: any[] | ((context: PermittedValuesContext) => any[]);
111
111
  }
@@ -113,6 +113,9 @@ export interface PermittedValues extends BasePermittedValues {
113
113
  * Used to define permitted values for inline column editor
114
114
  */
115
115
  export interface EditLookUpPermittedValues extends BasePermittedValues {
116
+ /**
117
+ * Values to display in Edit Look Up: either hardcoded list or a function that returns a list
118
+ */
116
119
  values?: any[] | ((context: EditLookUpContext) => any[]);
117
120
  }
118
121
  /**
@@ -124,56 +127,60 @@ export interface FilterPermittedValues extends BasePermittedValues {
124
127
  * @defaultValue false
125
128
  */
126
129
  suppressFilterSearchBar?: boolean;
130
+ /**
131
+ * Values to display in 'IN' Filter: either hardcoded list or a function that returns a list
132
+ */
127
133
  values: (context: FilterPermittedValuesContext) => any[] | Promise<any[]>;
128
134
  }
129
135
  /**
130
- * Custom column values for custom sort.
136
+ * Custom column values for Custom Sort
131
137
  */
132
138
  export interface CustomSortPermittedValues extends BasePermittedValues {
139
+ /**
140
+ * Values to display in Custom Sort Wizard: either hardcoded list or a function that returns a list
141
+ */
133
142
  values: (context: PermittedValuesContext) => any[] | Promise<any[]>;
134
143
  }
135
144
  /**
136
145
  * User to define permitted values when updating cells via bulk update
137
146
  */
138
147
  export interface BulkUpdatePermittedValues extends BasePermittedValues {
148
+ /**
149
+ * Values to display in Bulk Update Wizard: either hardcoded list or a function that returns a list
150
+ */
139
151
  values: (context: BulkUpdatePermittedValuesContext) => any[] | Promise<any[]>;
140
152
  }
141
153
  /**
142
- * Use PermittedValues instead
143
- * @deprecated use PermittedValues instead
154
+ * Context used when getting PermittedValues via a function
144
155
  */
145
- export declare type CellValuesList = PermittedValues;
146
- export interface EditLookUpContext extends BaseContext {
147
- /**
148
- * Column displaying the Edit LookUp
149
- */
150
- column: AdaptableColumn;
151
- /**
152
- * Cell being edited
153
- */
154
- gridCell?: GridCell;
155
- }
156
156
  export interface PermittedValuesContext extends BaseContext {
157
157
  /**
158
158
  * Column whose values are being displayed
159
159
  */
160
160
  column: AdaptableColumn;
161
161
  }
162
- export interface FilterPermittedValuesContext extends BaseContext {
162
+ /**
163
+ * Context used when getting EditLookUpPermittedValues via a function
164
+ */
165
+ export interface EditLookUpContext extends PermittedValuesContext {
163
166
  /**
164
- * Column hosting the filter form
167
+ * Cell being edited
165
168
  */
166
- column: AdaptableColumn;
169
+ gridCell?: GridCell;
170
+ }
171
+ /**
172
+ * Context used when getting FilterPermittedValues via a function
173
+ */
174
+ export interface FilterPermittedValuesContext extends PermittedValuesContext {
167
175
  /**
168
176
  * A search string
169
177
  */
170
- filter: string;
178
+ searchFilter: string;
171
179
  }
172
- export interface BulkUpdatePermittedValuesContext extends BaseContext {
173
- /**
174
- * Column being edited via Bulk Update
175
- */
176
- column: AdaptableColumn;
180
+ /**
181
+ * Context used when getting BulkUpdatePermittedValues via a function
182
+ */
183
+ export interface BulkUpdatePermittedValuesContext extends PermittedValuesContext {
177
184
  /**
178
185
  * Cells which will be modified in the Bulk Update
179
186
  */
@@ -229,7 +229,7 @@ export interface ColumnApi {
229
229
  * @param columnId Column to check
230
230
  * @param columnFilter Current applied filter
231
231
  */
232
- getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string): Promise<{
232
+ getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string, showFilteredRowsOnly: boolean): Promise<{
233
233
  values: {
234
234
  value: any;
235
235
  label: string;
@@ -138,4 +138,10 @@ export interface FilterApi {
138
138
  * Fires Filter Applied Event - typically used to enable filtering on the server
139
139
  */
140
140
  fireFilterAppliedEvent(): void;
141
+ /**
142
+ * Compares to sets of Column Filters to see if they are identical
143
+ * @param filters1
144
+ * @param filters2
145
+ */
146
+ areColumnFiltersDifferent(filters1: ColumnFilter[], filters2: ColumnFilter[]): boolean;
141
147
  }
@@ -60,6 +60,10 @@ export interface FlashingCellApi {
60
60
  * @param flashingCellDefinitions Flashing Cell Definitions to Add to State
61
61
  */
62
62
  setFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): void;
63
+ /**
64
+ * Merges a Flashing Cell Definition with default values
65
+ * @param flashingCellDefinition Flashing Cell Definition to Merge
66
+ */
63
67
  mergeFlashingCellDefinitionWithDefaults(flashingCellDefinition: FlashingCellDefinition): FlashingCellDefinition;
64
68
  /**
65
69
  * Adds provided Flashing cell Definitions
@@ -88,4 +92,8 @@ export interface FlashingCellApi {
88
92
  * @param scope the Scope to check
89
93
  */
90
94
  getFlashingCellPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
95
+ /**
96
+ * Clears all Cells and Rows which have been flashed (primarily used if duration is 'Always')
97
+ */
98
+ clearGridFlashing(): void;
91
99
  }
@@ -53,7 +53,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
53
53
  getQueryableColumns(): AdaptableColumn[];
54
54
  private LogMissingColumnWarning;
55
55
  getDistinctDisplayValuesForColumn(columnId: string): any[];
56
- getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string): Promise<{
56
+ getDistinctFilterDisplayValuesForColumn(columnId: string, filter: string, showFilteredRowsOnly: boolean): Promise<{
57
57
  values: any[];
58
58
  suppressClientSideFilter: boolean;
59
59
  }>;
@@ -289,7 +289,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
289
289
  return cv.normalisedValue;
290
290
  });
291
291
  }
292
- async getDistinctFilterDisplayValuesForColumn(columnId, filter) {
292
+ async getDistinctFilterDisplayValuesForColumn(columnId, filter, showFilteredRowsOnly) {
293
293
  const abColumn = this.getColumnFromId(columnId);
294
294
  if (abColumn == undefined) {
295
295
  return {
@@ -297,7 +297,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
297
297
  suppressClientSideFilter: false,
298
298
  };
299
299
  }
300
- const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, false, filter);
300
+ const { gridCells, suppressClientSideFilter } = await this.adaptable.getDistinctFilterValuesForColumn(abColumn, showFilteredRowsOnly, filter);
301
301
  return {
302
302
  values: this.sortDistinctValues(gridCells, abColumn).map((cv) => {
303
303
  return {
@@ -30,7 +30,7 @@ class DataSetApiImpl extends ApiBase_1.ApiBase {
30
30
  this.showModulePopup(ModuleConstants.DataSetModuleId);
31
31
  }
32
32
  fireDataSetSelectedEvent(dataSet) {
33
- if (this.adaptable.isInitialised) {
33
+ if (this.adaptable.isLive) {
34
34
  const dataSetSelectedInfo = {
35
35
  adaptableApi: this.adaptable.api,
36
36
  dataSet,
@@ -42,5 +42,6 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
42
42
  */
43
43
  isFilterActive(filter: ColumnFilter): boolean;
44
44
  shouldNewColumnFilterTriggerGridFiltering(action: LayoutRedux.LayoutColumnFilterAction | Redux.Action): boolean;
45
+ areColumnFiltersDifferent(oldFilters: ColumnFilter[], newFilters: ColumnFilter[]): boolean;
45
46
  fireFilterAppliedEvent(): void;
46
47
  }
@@ -176,7 +176,16 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
176
176
  if (!columnFilter.Predicate) {
177
177
  return true;
178
178
  }
179
- if ((_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => StringExtensions_1.default.IsNullOrEmpty(input))) {
179
+ const someInputsAreEmpty = (_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => {
180
+ if (typeof input === 'string') {
181
+ return StringExtensions_1.default.IsNullOrEmpty(input);
182
+ }
183
+ if (typeof input === 'number') {
184
+ return isNaN(input);
185
+ }
186
+ return !input;
187
+ });
188
+ if (someInputsAreEmpty) {
180
189
  return true;
181
190
  }
182
191
  const column = this.adaptable.api.columnApi.getColumnFromId(columnFilter.ColumnId);
@@ -208,6 +217,9 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
208
217
  * @param filter
209
218
  */
210
219
  isFilterActive(filter) {
220
+ if (!filter || !filter.Predicate || !filter.Predicate.PredicateId) {
221
+ return false;
222
+ }
211
223
  const predicateDef = this.adaptable.api.predicateApi.getPredicateDefById(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId);
212
224
  if (ArrayExtensions_1.default.IsNull(predicateDef.inputs) &&
213
225
  // values predicates have no inputs in the definition
@@ -267,8 +279,14 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
267
279
  isEditTrigger ||
268
280
  isSetAndActive);
269
281
  }
282
+ areColumnFiltersDifferent(oldFilters, newFilters) {
283
+ if (ArrayExtensions_1.default.IsNullOrEmpty(oldFilters) && ArrayExtensions_1.default.IsNullOrEmpty(newFilters)) {
284
+ return false;
285
+ }
286
+ return ArrayExtensions_1.default.areArraysNotEqual(oldFilters, newFilters);
287
+ }
270
288
  fireFilterAppliedEvent() {
271
- if (this.adaptable.isInitialised) {
289
+ if (this.adaptable.isLive) {
272
290
  const filterAppliedInfo = {
273
291
  columnFilters: this.getColumnFilters(),
274
292
  adaptableApi: this.getAdaptableApi(),
@@ -21,4 +21,5 @@ export declare class FlashingCellApiImpl extends ApiBase implements FlashingCell
21
21
  editFlashingCellDefinitions(flashingCellDefinitions: FlashingCellDefinition[]): FlashingCellDefinition[];
22
22
  getFlashingCellPredicateDefs(): AdaptablePredicateDef[];
23
23
  getFlashingCellPredicateDefsForScope(scope: AdaptableScope): AdaptablePredicateDef[];
24
+ clearGridFlashing(): void;
24
25
  }
@@ -106,5 +106,9 @@ class FlashingCellApiImpl extends ApiBase_1.ApiBase {
106
106
  getFlashingCellPredicateDefsForScope(scope) {
107
107
  return this.getFlashingCellPredicateDefs().filter((predicateDef) => this.adaptable.api.scopeApi.isScopeInScope(scope, predicateDef.columnScope));
108
108
  }
109
+ clearGridFlashing() {
110
+ const currentFlashingCells = this.getAdaptableState().System.AdaptableFlashingCells;
111
+ this.dispatchAction(SystemRedux.SystemFlashingCellDeleteAll());
112
+ }
109
113
  }
110
114
  exports.FlashingCellApiImpl = FlashingCellApiImpl;
@@ -260,7 +260,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
260
260
  this.adaptable.redrawHeader();
261
261
  }
262
262
  fireSearchChangedEvent(searchChangedTrigger) {
263
- if (this.adaptable.isInitialised) {
263
+ if (this.adaptable.isLive) {
264
264
  const adaptableSearchState = this.adaptable.api.configApi.getAdaptableSearchState();
265
265
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
266
266
  const searchChangedInfo = {
@@ -273,7 +273,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
273
273
  }
274
274
  }
275
275
  fireGridSortedEvent() {
276
- if (this.adaptable.isInitialised) {
276
+ if (this.adaptable.isLive) {
277
277
  const adaptableSortState = this.adaptable.api.configApi.getAdaptableSortState();
278
278
  const adaptableApi = this.getAdaptableApi();
279
279
  const gridSortedInfo = {
@@ -284,7 +284,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
284
284
  }
285
285
  }
286
286
  fireCellChangedEvent(cellDataChangedInfo) {
287
- if (this.adaptable.isInitialised) {
287
+ if (this.adaptable.isLive) {
288
288
  const cellChangedInfo = {
289
289
  adaptableApi: this.adaptable.api,
290
290
  cellChange: cellDataChangedInfo,
@@ -293,7 +293,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
293
293
  }
294
294
  }
295
295
  fireGridDataChangedEvent(dataRows, rowNodes = [], rowTrigger) {
296
- if (this.adaptable.isInitialised) {
296
+ if (this.adaptable.isLive) {
297
297
  const gridDataChangedInfo = {
298
298
  changedAt: Date.now(),
299
299
  adaptableApi: this.adaptable.api,
@@ -12,7 +12,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
12
12
  };
13
13
  getCurrentVisibleColumnIds(): string[];
14
14
  setLayout(layoutName: string): void;
15
- fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
15
+ fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState, skipEqualityCheck?: boolean): void;
16
16
  getCurrentLayout(): Layout;
17
17
  getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
18
18
  areDraftAndCurrentLayoutEqual(): boolean;
@@ -50,16 +50,17 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
50
50
  }
51
51
  }
52
52
  }
53
- fireLayoutChangedEvent(trigger, oldSate, newState) {
53
+ fireLayoutChangedEvent(trigger, oldSate, newState, skipEqualityCheck) {
54
54
  const layoutChangedInfo = {
55
55
  adaptableApi: this.adaptable.api,
56
56
  actionName: trigger,
57
57
  oldLayoutState: oldSate,
58
58
  newLayoutState: newState,
59
59
  };
60
- if (!isEqual_1.default(oldSate, newState)) {
61
- this.adaptable.api.eventApi.emit('LayoutChanged', layoutChangedInfo);
60
+ if (!skipEqualityCheck && isEqual_1.default(oldSate, newState)) {
61
+ return;
62
62
  }
63
+ this.adaptable.api.eventApi.emit('LayoutChanged', layoutChangedInfo);
63
64
  }
64
65
  getCurrentLayout() {
65
66
  const state = this.getAdaptableState();
@@ -89,7 +89,7 @@ class QueryApiImpl extends ApiBase_1.ApiBase {
89
89
  }));
90
90
  }
91
91
  fireQueryRunEvent() {
92
- if (this.adaptable.isInitialised) {
92
+ if (this.adaptable.isLive) {
93
93
  const currentQuery = this.adaptable.api.queryApi.getCurrentQuery();
94
94
  const adaptableApi = this.getAdaptableApi();
95
95
  const queryRunInfo = {
@@ -47,7 +47,7 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
47
47
  this.showModulePopup(ModuleConstants.TeamSharingModuleId);
48
48
  }
49
49
  fireTeamSharingEntityChangedEvent(sharedEntity) {
50
- if (this.adaptable.isInitialised) {
50
+ if (this.adaptable.isLive) {
51
51
  const teamSharingEntityChangedInfo = {
52
52
  adaptableApi: this.adaptable.api,
53
53
  sharedEntity: sharedEntity,
@@ -113,7 +113,7 @@ export interface LayoutApi {
113
113
  * @param oldSate Layout State before change
114
114
  * @param newState Layout State after change
115
115
  */
116
- fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
116
+ fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState, skipEqualityCheck?: boolean): void;
117
117
  /**
118
118
  * Compares 2 Layouts for equality
119
119
  * @param layout1 First Layout
@@ -24,7 +24,7 @@ export interface SystemStatusApi {
24
24
  */
25
25
  setInfoSystemStatus(statusMessage: string, furtherInformation?: string): void;
26
26
  /**
27
- * Opens System Status popup
27
+ * Opens Settings Panel with System Status section selected and visible
28
28
  */
29
29
  showSystemStatusPopup(): void;
30
30
  /**
@@ -11,7 +11,7 @@ export interface ToolPanelApi {
11
11
  */
12
12
  getToolPanelState(): ToolPanelState;
13
13
  /**
14
- * Opens the Tool Panel popup
14
+ * Opens Settings Panel with Tool Panel section selected and visible
15
15
  */
16
16
  showToolPanelPopup(): void;
17
17
  /**
@@ -37,7 +37,7 @@ export interface AlertDefinition extends SuspendableObject {
37
37
  */
38
38
  MessageType: AdaptableMessageType;
39
39
  /**
40
- * Alert Message - can be string or function; if not provided AdapTable creates dynamically using Rule & Scope
40
+ * Alert Message; if not provided AdapTable creates dynamically using Rule & Scope (Note: can be provided as a function in AlertOptions)
41
41
  */
42
42
  MessageText?: string;
43
43
  /**
@@ -126,4 +126,4 @@ export interface AlertProperties {
126
126
  */
127
127
  PreventEdit?: boolean;
128
128
  }
129
- export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
129
+ export declare type SystemAlertPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'True' | 'False' | 'PercentChange' | 'PrimaryKeyDuplicate' | 'ExistingValuesOnly' | 'NoDuplicateValues' | 'IsNumeric' | 'IsNotNumeric' | 'AddedRow' | 'RemovedRow' | 'Any';
@@ -8,14 +8,15 @@ const isValidOrderForColumnGroups = ({ oldColumns, newColumns, }) => {
8
8
  let count = 0;
9
9
  columns.forEach((column) => {
10
10
  var _a, _b;
11
- if (column.columnGroup &&
11
+ if (column &&
12
+ column.columnGroup &&
12
13
  column.columnGroup.groupCount > 1 &&
13
14
  !column.columnGroup.allowGroupSplit) {
14
15
  if (prevGroup !== column.columnGroup.columnGroupId) {
15
16
  count++;
16
17
  }
17
18
  }
18
- prevGroup = (_b = (_a = column.columnGroup) === null || _a === void 0 ? void 0 : _a.columnGroupId) !== null && _b !== void 0 ? _b : '';
19
+ prevGroup = (_b = (_a = column === null || column === void 0 ? void 0 : column.columnGroup) === null || _a === void 0 ? void 0 : _a.columnGroupId) !== null && _b !== void 0 ? _b : '';
19
20
  });
20
21
  return count;
21
22
  };
@@ -16,6 +16,7 @@ const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
16
16
  const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
17
17
  const isSameDay_1 = tslib_1.__importDefault(require("date-fns/isSameDay"));
18
18
  const CalendarHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/CalendarHelper"));
19
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
19
20
  const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
20
21
  /**
21
22
  * Array of Predicate Defs which are shipped by AdapTable
@@ -59,7 +60,7 @@ exports.SystemPredicateDefs = [
59
60
  return true;
60
61
  }
61
62
  if (column.dataType === 'Date') {
62
- return inputs.some((input) => {
63
+ return inputs.every((input) => {
63
64
  return !isSameDay_1.default(input, value);
64
65
  });
65
66
  }
@@ -143,7 +144,14 @@ exports.SystemPredicateDefs = [
143
144
  columnScope: { DataTypes: ['Number'] },
144
145
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
145
146
  inputs: [{ type: 'number' }],
146
- handler: ({ value, inputs }) => Number(value) === Number(inputs[0]),
147
+ handler: ({ value, inputs }) => {
148
+ const input = inputs[0];
149
+ if ((typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) ||
150
+ (typeof input === 'string' && !StringExtensions_1.default.IsNumeric(input))) {
151
+ return false;
152
+ }
153
+ return Number(value) === Number(inputs[0]);
154
+ },
147
155
  toString: ({ inputs }) => `= ${inputs[0]}`,
148
156
  shortcuts: ['='],
149
157
  },
@@ -186,6 +194,14 @@ exports.SystemPredicateDefs = [
186
194
  icon: { text: '1' },
187
195
  columnScope: { DataTypes: ['Number'] },
188
196
  moduleScope: ['alert', 'flashingcell'],
197
+ handler: ({ value }) => !isNaN(Number(value)),
198
+ },
199
+ {
200
+ id: 'IsNotNumeric',
201
+ label: 'Is Not Numeric',
202
+ icon: { text: '1' },
203
+ columnScope: { DataTypes: ['Number'] },
204
+ moduleScope: ['alert', 'flashingcell'],
189
205
  handler: ({ value }) => isNaN(Number(value)),
190
206
  },
191
207
  // String System Filters
@@ -389,7 +405,7 @@ exports.SystemPredicateDefs = [
389
405
  columnScope: { DataTypes: ['Date'] },
390
406
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
391
407
  inputs: [{ type: 'date' }],
392
- handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
408
+ handler: ({ value, inputs }) => isAfter_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
393
409
  toString: ({ inputs }) => `> ${inputs[0]}`,
394
410
  },
395
411
  {
@@ -399,7 +415,7 @@ exports.SystemPredicateDefs = [
399
415
  columnScope: { DataTypes: ['Date'] },
400
416
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
401
417
  inputs: [{ type: 'date' }],
402
- handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
418
+ handler: ({ value, inputs }) => isBefore_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
403
419
  toString: ({ inputs }) => `< ${inputs[0]}`,
404
420
  },
405
421
  {
@@ -409,7 +425,7 @@ exports.SystemPredicateDefs = [
409
425
  columnScope: { DataTypes: ['Date'] },
410
426
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
411
427
  inputs: [{ type: 'date' }],
412
- handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
428
+ handler: ({ value, inputs }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
413
429
  toString: ({ inputs }) => `= ${inputs[0]}`,
414
430
  },
415
431
  {
@@ -419,7 +435,7 @@ exports.SystemPredicateDefs = [
419
435
  columnScope: { DataTypes: ['Date'] },
420
436
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
421
437
  inputs: [{ type: 'date' }],
422
- handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), DateHelper_1.parseFilterInputDate(inputs[0])),
438
+ handler: ({ value, inputs }) => !isSameDay_1.default(DateHelper_1.parseDateValue(value), DateHelper_1.parseDateValue(inputs[0])),
423
439
  toString: ({ inputs }) => `!= ${inputs[0]}`,
424
440
  },
425
441
  {
@@ -428,7 +444,7 @@ exports.SystemPredicateDefs = [
428
444
  icon: { name: 'calendar' },
429
445
  columnScope: { DataTypes: ['Date'] },
430
446
  moduleScope: ['filter', 'alert', 'flashingcell', 'conditionalstyle'],
431
- handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseFilterValueDate(value), CalendarHelper_1.default.getNextWorkingDay()),
447
+ handler: ({ value, api }) => isSameDay_1.default(DateHelper_1.parseDateValue(value), CalendarHelper_1.default.getNextWorkingDay()),
432
448
  },
433
449
  {
434
450
  id: 'LastWorkDay',
@@ -8,32 +8,32 @@ export interface SpecialColumnSettings {
8
8
  Width?: number;
9
9
  /**
10
10
  * Whether Column is filterable
11
- * @defaultValue true
11
+ * @defaultValue false
12
12
  */
13
13
  Filterable?: boolean;
14
14
  /**
15
15
  * Whether Column can be resized (by dragging column header edges)
16
- * @defaultValue true
16
+ * @defaultValue false
17
17
  */
18
18
  Resizable?: boolean;
19
19
  /**
20
20
  * Whether Column can be grouped
21
- * @defaultValue true
21
+ * @defaultValue false
22
22
  */
23
23
  Groupable?: boolean;
24
24
  /**
25
25
  * Whether Column is sortable
26
- * @defaultValue true
26
+ * @defaultValue false
27
27
  */
28
28
  Sortable?: boolean;
29
29
  /**
30
30
  * Whether Column can be used when grid is in pivot mode
31
- * @defaultValue true
31
+ * @defaultValue false
32
32
  */
33
33
  Pivotable?: boolean;
34
34
  /**
35
35
  * Whether Column can be used in an aggregation when grouping
36
- * @defaultValue true
36
+ * @defaultValue false
37
37
  */
38
38
  Aggregatable?: boolean;
39
39
  /**
@@ -29,6 +29,7 @@ export declare type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFi
29
29
  * Modules provided by AdapTable, subject to Entitlements and usually have Predefined Config
30
30
  */
31
31
  export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
32
+ export declare const ALL_MODULES: AdaptableModule[];
32
33
  export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
33
34
  export declare type TypeHint<Base, Literals> = (Base & {
34
35
  __subType?: true;