@adaptabletools/adaptable 22.0.0-canary.1 → 22.0.0-canary.3

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 (177) hide show
  1. package/index.css +55 -37
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  5. package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
  6. package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
  7. package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
  8. package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
  9. package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
  10. package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
  11. package/src/AdaptableState/FormatColumnState.d.ts +0 -8
  12. package/src/AdaptableState/InitialState.d.ts +1 -1
  13. package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
  14. package/src/Api/DataSetApi.d.ts +1 -1
  15. package/src/Api/GridApi.d.ts +3 -3
  16. package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
  17. package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
  18. package/src/Api/Implementation/AlertApiImpl.js +1 -0
  19. package/src/Api/Implementation/ApiBase.js +1 -0
  20. package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
  21. package/src/Api/Implementation/ChartingApiImpl.js +4 -0
  22. package/src/Api/Implementation/ColumnApiImpl.js +1 -0
  23. package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
  24. package/src/Api/Implementation/CommentsApiImpl.js +1 -0
  25. package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
  26. package/src/Api/Implementation/DashboardApiImpl.js +1 -0
  27. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
  28. package/src/Api/Implementation/DataImportApiImpl.js +1 -0
  29. package/src/Api/Implementation/DataSetApiImpl.js +1 -0
  30. package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
  31. package/src/Api/Implementation/EventApiImpl.js +16 -14
  32. package/src/Api/Implementation/ExportApiImpl.js +1 -0
  33. package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
  34. package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
  35. package/src/Api/Implementation/FilterApiImpl.js +3 -0
  36. package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
  37. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
  38. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
  39. package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
  40. package/src/Api/Implementation/GridApiImpl.js +17 -16
  41. package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
  42. package/src/Api/Implementation/LayoutApiImpl.js +1 -0
  43. package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
  44. package/src/Api/Implementation/NoteApiImpl.js +1 -0
  45. package/src/Api/Implementation/PredicateApiImpl.js +1 -0
  46. package/src/Api/Implementation/RowFormApiImpl.js +1 -0
  47. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
  48. package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
  49. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  50. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  51. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
  52. package/src/Api/Internal/ColumnInternalApi.js +1 -1
  53. package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
  54. package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
  55. package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
  56. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
  57. package/src/Redux/Store/AdaptableStore.js +49 -43
  58. package/src/Strategy/AdaptableModuleBase.js +4 -0
  59. package/src/Strategy/AlertModule.js +1 -0
  60. package/src/Strategy/CalculatedColumnModule.js +1 -0
  61. package/src/Strategy/CellSummaryModule.js +1 -1
  62. package/src/Strategy/DataChangeHistoryModule.js +1 -0
  63. package/src/Strategy/FlashingCellModule.js +1 -0
  64. package/src/Strategy/FreeTextColumnModule.js +1 -0
  65. package/src/Strategy/LayoutModule.js +2 -1
  66. package/src/Strategy/PlusMinusModule.js +2 -0
  67. package/src/Strategy/ScheduleModule.js +1 -0
  68. package/src/Strategy/ShortcutModule.js +2 -0
  69. package/src/Strategy/TeamSharingModule.js +10 -10
  70. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
  71. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -3
  72. package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -3
  73. package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
  74. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
  75. package/src/Utilities/Helpers/StyleHelper.js +14 -0
  76. package/src/Utilities/MenuItem.js +18 -0
  77. package/src/Utilities/ObjectFactory.js +1 -1
  78. package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
  79. package/src/Utilities/Services/AlertService.js +6 -4
  80. package/src/Utilities/Services/AnnotationsService.js +4 -1
  81. package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
  82. package/src/Utilities/Services/ChartingService.js +1 -0
  83. package/src/Utilities/Services/DataService.js +10 -2
  84. package/src/Utilities/Services/Fdc3Service.js +5 -3
  85. package/src/Utilities/Services/FlashingCellService.js +5 -0
  86. package/src/Utilities/Services/LicenseService/index.js +1 -1
  87. package/src/Utilities/Services/MetamodelService.js +2 -2
  88. package/src/Utilities/Services/ModuleService.js +4 -3
  89. package/src/Utilities/Services/QueryLanguageService.js +6 -5
  90. package/src/Utilities/Services/RowFormService.js +1 -0
  91. package/src/Utilities/Services/RowSummaryService.js +10 -7
  92. package/src/Utilities/Services/TeamSharingService.js +3 -1
  93. package/src/Utilities/Services/ThemeService.js +11 -9
  94. package/src/Utilities/Services/ValidationService.js +1 -0
  95. package/src/Utilities/createAgStatusPanelComponent.js +3 -0
  96. package/src/View/AdaptablePopover/index.d.ts +1 -0
  97. package/src/View/AdaptablePopover/index.js +1 -1
  98. package/src/View/Alert/ActiveAlertsPanel.js +8 -0
  99. package/src/View/Alert/AlertViewPanel.js +13 -9
  100. package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
  101. package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
  102. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
  103. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
  104. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  105. package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
  106. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  107. package/src/View/Components/Buttons/ButtonApply.js +1 -1
  108. package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
  109. package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
  110. package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
  111. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
  112. package/src/View/Components/ExpressionWizard.js +5 -5
  113. package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
  114. package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
  115. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
  116. package/src/View/Components/StyleComponent.js +20 -1
  117. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
  118. package/src/View/CustomSort/CustomSortSummary.js +13 -13
  119. package/src/View/Dashboard/DashboardPopup.js +4 -5
  120. package/src/View/Export/ExportDestinationPicker.js +1 -1
  121. package/src/View/Export/ExportStatusBar.js +4 -2
  122. package/src/View/Export/ExportViewPanel.js +25 -18
  123. package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
  124. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -23
  125. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
  126. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
  127. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
  128. package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
  129. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -2
  130. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
  131. package/src/View/Theme/ThemePopup.js +13 -16
  132. package/src/View/UIHelper.d.ts +2 -0
  133. package/src/View/UIHelper.js +15 -0
  134. package/src/agGrid/Adaptable.js +4 -0
  135. package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
  136. package/src/agGrid/AdaptableAgGrid.js +104 -38
  137. package/src/agGrid/AdaptableFilterHandler.js +4 -0
  138. package/src/agGrid/AdaptableLogger.d.ts +3 -0
  139. package/src/agGrid/AdaptableLogger.js +10 -0
  140. package/src/agGrid/AgGridAdapter.js +11 -1
  141. package/src/agGrid/AgGridColumnAdapter.js +5 -18
  142. package/src/agGrid/AgGridExportAdapter.js +10 -9
  143. package/src/agGrid/AgGridFilterAdapter.js +4 -0
  144. package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
  145. package/src/agGrid/AgGridMenuAdapter.js +1 -0
  146. package/src/agGrid/AgGridModulesAdapter.js +2 -1
  147. package/src/agGrid/AgGridOptionsService.js +3 -0
  148. package/src/agGrid/AgGridThemeAdapter.js +2 -0
  149. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
  150. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
  151. package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
  152. package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
  153. package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
  154. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
  155. package/src/agGrid/index.d.ts +6 -0
  156. package/src/agGrid/index.js +6 -0
  157. package/src/components/Dashboard/DashboardToolbar.js +1 -1
  158. package/src/components/Datepicker/index.js +1 -1
  159. package/src/components/ExpressionEditor/EditorInput.js +19 -3
  160. package/src/components/Tree/TreeDropdown/index.js +1 -1
  161. package/src/components/overlayBaseZIndex.js +1 -1
  162. package/src/components/utils/useContainerScrollObserver/index.js +17 -14
  163. package/src/devTools/index.js +54 -53
  164. package/src/env.js +2 -2
  165. package/src/layout-manager/src/LMEmitter.js +11 -11
  166. package/src/layout-manager/src/LMLogger.js +7 -0
  167. package/src/layout-manager/src/index.js +56 -51
  168. package/src/metamodel/adaptable.metamodel.d.ts +66 -7
  169. package/src/metamodel/adaptable.metamodel.js +1 -1
  170. package/src/migration/AdaptableUpgradeHelper.js +5 -0
  171. package/src/migration/VersionUpgrade.js +1 -0
  172. package/src/migration/VersionUpgrade17.js +1 -2
  173. package/src/migration/VersionUpgrade22.d.ts +6 -0
  174. package/src/migration/VersionUpgrade22.js +27 -0
  175. package/src/parser/src/ExpressionEvaluationError.js +1 -0
  176. package/src/types.d.ts +1 -1
  177. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -1,6 +1,7 @@
1
1
  import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
2
2
  import ObjectFactory from '../ObjectFactory';
3
3
  export class ChartingService {
4
+ api;
4
5
  constructor(api) {
5
6
  this.api = api;
6
7
  }
@@ -4,10 +4,16 @@ import Helper from '../Helpers/Helper';
4
4
  // ~ 8 hours
5
5
  const MAX_TIMEFRAME_SIZE = 86400000;
6
6
  export class DataService {
7
+ adaptable;
8
+ emitter;
9
+ cellDataChangeLogSubject$;
10
+ cellDataChangeLog$;
11
+ rowDataChangeLogSubject$;
12
+ rowDataChangeLog$;
13
+ undoChangeLog;
14
+ undoChangeTimers;
7
15
  constructor(adaptable) {
8
16
  this.adaptable = adaptable;
9
- this.on = (eventName, callback) => this.emitter.on(eventName, callback);
10
- this.emit = (eventName, data) => this.emitter.emit(eventName, data);
11
17
  this.adaptable = adaptable;
12
18
  this.emitter = new Emitter();
13
19
  this.cellDataChangeLogSubject$ = new Subject();
@@ -31,6 +37,8 @@ export class DataService {
31
37
  this.undoChangeTimers.clear();
32
38
  this.undoChangeTimers = null;
33
39
  }
40
+ on = (eventName, callback) => this.emitter.on(eventName, callback);
41
+ emit = (eventName, data) => this.emitter.emit(eventName, data);
34
42
  CreateCellDataChangedEvent(cellDataChangedInfo) {
35
43
  if (cellDataChangedInfo.newValue != cellDataChangedInfo.oldValue) {
36
44
  this.emitter.emitSync('CellDataChanged', cellDataChangedInfo);
@@ -1,11 +1,13 @@
1
1
  import { ContextConfiguration } from '../../AdaptableState/Common/Fdc3Context';
2
2
  import { Fdc3IntentConfiguration } from '../../AdaptableState/Common/Fdc3Intent';
3
3
  export class Fdc3Service {
4
+ adaptableApi;
5
+ contextHandlerSubscriptions = [];
6
+ intentHandlerSubscriptions = [];
7
+ loggedAgentError = false;
8
+ uiControlsDefaultConfiguration;
4
9
  constructor(adaptableApi) {
5
10
  this.adaptableApi = adaptableApi;
6
- this.contextHandlerSubscriptions = [];
7
- this.intentHandlerSubscriptions = [];
8
- this.loggedAgentError = false;
9
11
  // 1. Subscribe to FDC3 events
10
12
  const adaptableHandleIntentFn = this.getFdc3Options().intents?.handleIntent;
11
13
  const listenForIntents = this.getFdc3Options().intents?.listensFor ?? [];
@@ -3,6 +3,11 @@ export const FLASHING_CELL_ROW_KEY = '__ROW';
3
3
  * This service manages Flashing Cells
4
4
  */
5
5
  export class FlashingCellService {
6
+ api;
7
+ // map of rowPrimaryKey -> ColIdOrRowId -> FlashingCellUuid
8
+ gridCellsCurrentlyFlashing;
9
+ // map of FlashingCellUuid -> FlashingCell
10
+ flashingCellsMapping;
6
11
  constructor(api) {
7
12
  this.api = api;
8
13
  this.gridCellsCurrentlyFlashing = {};
@@ -1 +1 @@
1
- import{LicenseDisablePersistence as e,LicenseShowWatermark as a}from"../../../Redux/ActionsReducers/InternalRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",p=10,d=864e5;export var LicenseValidityType;!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"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{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=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let i=0;e instanceof Error||!e?.end||(i=Math.floor((e?.end?.getTime()-t.getTime())/d),i=s(i,0,1/0));let n="",h="";!e||e instanceof Error||!e.appName||e.appName==r||(n=e.appName,h=" for application [APP_NAME]");const E=(e,a=o,t=c,s=i,r=n)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",r).replace("[DAYS]",`${s}`);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(i<=p)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{l()&&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(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
1
+ import{LicenseDisablePersistence as e,LicenseShowWatermark as a}from"../../../Redux/ActionsReducers/InternalRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",p=10,d=864e5;export var LicenseValidityType;!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"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{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=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let i=0;e instanceof Error||!e?.end||(i=Math.floor((e?.end?.getTime()-t.getTime())/d),i=s(i,0,1/0));let n="",h="";!e||e instanceof Error||!e.appName||e.appName==r||(n=e.appName,h=" for application [APP_NAME]");const E=(e,a=o,t=c,s=i,r=n)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",r).replace("[DAYS]",`${s}`);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(i<=p)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{l()&&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(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
@@ -5,9 +5,9 @@ import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
5
5
  import { getDefaultAdaptableOptions } from '../../AdaptableOptions/DefaultAdaptableOptions';
6
6
  const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
7
7
  export class MetamodelService {
8
+ gridInfoOptions = new Map();
9
+ getAdaptableOptions = () => null;
8
10
  constructor(getAdaptableOptions, validateOptions) {
9
- this.gridInfoOptions = new Map();
10
- this.getAdaptableOptions = () => null;
11
11
  this.getAdaptableOptions = getAdaptableOptions;
12
12
  this.gridInfoOptions = this.buildGridInfoOptions();
13
13
  if (validateOptions) {
@@ -1,6 +1,7 @@
1
1
  import Helper from '../Helpers/Helper';
2
2
  import { AgGridRequiredModulesDocsLink, HOST_URL_DOCS, } from '../Constants/DocumentationLinkConstants';
3
3
  export class ModuleService {
4
+ adaptableApi;
4
5
  constructor(adaptableApi) {
5
6
  this.adaptableApi = adaptableApi;
6
7
  this.adaptableApi = adaptableApi;
@@ -113,13 +114,13 @@ export class ModuleService {
113
114
  case 'CalculatedColumn':
114
115
  return url + 'handbook-calculated-column';
115
116
  case 'CellSummary':
116
- return url + 'handbook-summarising';
117
+ return url + 'handbook-summarising-cells';
117
118
  case 'Charting':
118
119
  return url + 'handbook-charts';
119
120
  case 'ColumnFilter':
120
121
  return url + 'handbook-column-filter';
121
122
  case 'ColumnInfo':
122
- return url + 'dev-guide-column-grid-column-info';
123
+ return url + 'dev-guide-columns-column-info';
123
124
  case 'Comment':
124
125
  return url + 'handbook-comments';
125
126
  case 'CustomSort':
@@ -145,7 +146,7 @@ export class ModuleService {
145
146
  case 'GridFilter':
146
147
  return url + 'handbook-grid-filter';
147
148
  case 'GridInfo':
148
- return url + 'dev-guide-column-grid-column-info';
149
+ return url + 'dev-guide-support-monitoring';
149
150
  case 'Layout':
150
151
  return url + 'handbook-layouts';
151
152
  case 'NamedQuery':
@@ -9,13 +9,14 @@ import { scalarExpressionFunctions } from '../ExpressionFunctions/scalarExpressi
9
9
  import { getTypedKeys } from '../Extensions/TypeExtensions';
10
10
  import { AggregatedScalarLiveValue } from './AggregatedScalarLiveValue';
11
11
  export class QueryLanguageService {
12
+ adaptableApi;
13
+ cacheBooleanValidation = new Map();
14
+ cacheObservableValidation = new Map();
15
+ cacheAggregatedBooleanValidation = new Map();
16
+ cacheAggregatedScalarValidation = new Map();
17
+ cacheModuleSpecificExpressionFunctions = new Map();
12
18
  constructor(adaptableApi) {
13
19
  this.adaptableApi = adaptableApi;
14
- this.cacheBooleanValidation = new Map();
15
- this.cacheObservableValidation = new Map();
16
- this.cacheAggregatedBooleanValidation = new Map();
17
- this.cacheAggregatedScalarValidation = new Map();
18
- this.cacheModuleSpecificExpressionFunctions = new Map();
19
20
  }
20
21
  evaluateBooleanExpression(expression, module, rowNode, evalContext) {
21
22
  if (expression == undefined) {
@@ -1,4 +1,5 @@
1
1
  export class RowFormService {
2
+ adaptableApi;
2
3
  constructor(adaptableApi) {
3
4
  this.adaptableApi = adaptableApi;
4
5
  if (adaptableApi.optionsApi.getRowFormOptions().autoHandle) {
@@ -10,15 +10,12 @@ import isEqual from 'lodash/isEqual';
10
10
  * The logic is extracted here to make it easier to follow
11
11
  */
12
12
  export class RowSummaryService {
13
+ api;
14
+ cachedCellSummary = new Map();
15
+ previousRowSummaries;
16
+ previousLayout;
13
17
  constructor(api) {
14
18
  this.api = api;
15
- this.cachedCellSummary = new Map();
16
- this._throttleAcumulatedColumnsThatChanged = new Set();
17
- /**
18
- *
19
- * @param colId optional to evaluate only one column
20
- */
21
- this._throttledEvaluateRowSummary = throttle(this.evaluateRowSummary, 300);
22
19
  }
23
20
  onAdaptableReady() {
24
21
  this.rowSummariesSubscriptions();
@@ -66,12 +63,18 @@ export class RowSummaryService {
66
63
  this.throttledEvaluateRowSummary();
67
64
  });
68
65
  }
66
+ _throttleAcumulatedColumnsThatChanged = new Set();
69
67
  throttledEvaluateRowSummary(reason) {
70
68
  if (reason) {
71
69
  reason.columnIds.forEach((col) => this._throttleAcumulatedColumnsThatChanged.add(col));
72
70
  }
73
71
  this._throttledEvaluateRowSummary(reason);
74
72
  }
73
+ /**
74
+ *
75
+ * @param colId optional to evaluate only one column
76
+ */
77
+ _throttledEvaluateRowSummary = throttle(this.evaluateRowSummary, 300);
75
78
  evaluateRowSummary(reason) {
76
79
  if (this._throttleAcumulatedColumnsThatChanged.size > 0) {
77
80
  const columnIds = Array.from(this._throttleAcumulatedColumnsThatChanged.values());
@@ -1,9 +1,11 @@
1
1
  import { createUuid } from '../../AdaptableState/Uuid';
2
2
  import ObjectFactory from '../ObjectFactory';
3
3
  export class TeamSharingService {
4
+ adaptableApi;
5
+ dismissedNotifications = [];
6
+ updateCheckTimerId;
4
7
  constructor(adaptableApi) {
5
8
  this.adaptableApi = adaptableApi;
6
- this.dismissedNotifications = [];
7
9
  const teamSharingOptions = adaptableApi.optionsApi.getTeamSharingOptions();
8
10
  if (teamSharingOptions.updateInterval > 0) {
9
11
  // convert minutes to millis
@@ -1,14 +1,8 @@
1
1
  export class ThemeService {
2
+ api;
3
+ unsubscribe = () => { };
4
+ styleSheetObject;
2
5
  constructor(api) {
3
- this.unsubscribe = () => { };
4
- this.onThemeChanged = () => {
5
- let currentTheme = this.api.themeApi.getCurrentThemeObject();
6
- currentTheme = this.mapOsTheme(currentTheme);
7
- this.applyNewThemeVariables(currentTheme);
8
- // this needs to be called after variables are set
9
- // as it may show the warning for a custom/runtime theme
10
- this.showMissingThemeFiles(currentTheme);
11
- };
12
6
  this.api = api;
13
7
  this.subscribe();
14
8
  if (!this.styleSheetObject) {
@@ -33,6 +27,14 @@ export class ThemeService {
33
27
  prefferedColorSchemeUnsubscribe();
34
28
  };
35
29
  }
30
+ onThemeChanged = () => {
31
+ let currentTheme = this.api.themeApi.getCurrentThemeObject();
32
+ currentTheme = this.mapOsTheme(currentTheme);
33
+ this.applyNewThemeVariables(currentTheme);
34
+ // this needs to be called after variables are set
35
+ // as it may show the warning for a custom/runtime theme
36
+ this.showMissingThemeFiles(currentTheme);
37
+ };
36
38
  applyNewThemeVariables(theme) {
37
39
  const variables = theme.CSSVariables;
38
40
  if (!variables || Object.keys(variables).length === 0) {
@@ -4,6 +4,7 @@ import { AlertModuleId } from '../Constants/ModuleConstants';
4
4
  import { SERVER_VALIDATION_HEADER, SERVER_VALIDATION_MESSAGE_TYPE, } from '../Constants/GeneralConstants';
5
5
  import { errorOnce } from '../../agGrid/AdaptableLogger';
6
6
  export class ValidationService {
7
+ adaptableApi;
7
8
  constructor(adaptableApi) {
8
9
  this.adaptableApi = adaptableApi;
9
10
  this.adaptableApi = adaptableApi;
@@ -19,6 +19,9 @@ export const createAgStatusPanelComponent = (component, adaptable, context) => {
19
19
  };
20
20
  }
21
21
  return class StatusBarRenderer {
22
+ params;
23
+ eGui;
24
+ unmountReactRoot;
22
25
  init(params) {
23
26
  this.params = params;
24
27
  this.eGui = document.createElement('div');
@@ -17,6 +17,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<React.Props
17
17
  popupPadding?: 0 | 2;
18
18
  alignPosition?: OverlayShowParams['alignPosition'];
19
19
  visible?: boolean;
20
+ disabled?: boolean;
20
21
  }
21
22
  export declare class AdaptablePopover extends React.Component<React.PropsWithChildren<AdaptablePopoverProps>, {}> {
22
23
  render(): React.JSX.Element;
@@ -35,7 +35,7 @@ export class AdaptablePopover extends React.Component {
35
35
  // showTriangle
36
36
  visible: this.props.visible, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
37
37
  overflow: 'visible',
38
- }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
38
+ }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText, disabled: this.props.disabled }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
39
39
  this.props.children,
40
40
  showIcon && React.createElement(Icon, { name: icon, style: iconStyle }))))));
41
41
  }
@@ -7,5 +7,13 @@ export const ActiveAlertsPanel = () => {
7
7
  const adaptable = useAdaptable();
8
8
  const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
9
9
  const alerts = useSelector((state) => state.Internal.AdaptableAlerts);
10
+ // map the suspended property from the underlying AlertDefinitions
11
+ alerts.forEach((alert) => {
12
+ const liveAlertDef = adaptable.api.alertApi.getAlertDefinitionById(alert.alertDefinition.Uuid);
13
+ if (liveAlertDef) {
14
+ // @ts-ignore theoretically AdaptableAlert is not Suspendable; practically <AdaptableObjectCompactList> expects it
15
+ alert.IsSuspended = liveAlertDef.IsSuspended;
16
+ }
17
+ });
10
18
  return React.createElement(AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
11
19
  };
@@ -2,10 +2,11 @@ import * as React from 'react';
2
2
  import { connect } from 'react-redux';
3
3
  import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
4
4
  import { AdaptablePopover } from '../AdaptablePopover';
5
- import UIHelper from '../UIHelper';
6
5
  import { getAlertButtonStyle } from './Utilities/getAlertButtonStyle';
7
6
  import { ActiveAlertsPanel } from './ActiveAlertsPanel';
8
7
  import { Flex } from '../../components/Flex';
8
+ import { ButtonClear } from '../Components/Buttons/ButtonClear';
9
+ import clsx from 'clsx';
9
10
  class AlertViewPanelComponent extends React.Component {
10
11
  constructor(props) {
11
12
  super(props);
@@ -20,7 +21,6 @@ class AlertViewPanelComponent extends React.Component {
20
21
  }
21
22
  }
22
23
  render() {
23
- const messageType = UIHelper.getMessageTypeFromAdaptableAlerts(this.props.AdaptableAlerts);
24
24
  const { color: buttonTextColor, background: buttonBackground } = getAlertButtonStyle(this.props.AdaptableAlerts);
25
25
  const collapsedText = this.props.AdaptableAlerts.length == 0
26
26
  ? '0 Alerts'
@@ -28,13 +28,17 @@ class AlertViewPanelComponent extends React.Component {
28
28
  ? '1 Alert'
29
29
  : this.props.AdaptableAlerts.length + ' Alerts';
30
30
  const alertsPanel = React.createElement(ActiveAlertsPanel, null);
31
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
32
- return (React.createElement(Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
33
- React.createElement(Flex, { className: `ab-${elementType}__Alert__text twa:rounded-standard twa:mr-2 twa:p-2 text-2`, style: { color: buttonTextColor, backgroundColor: buttonBackground }, alignItems: "center" }, collapsedText),
34
- this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex, { alignItems: "center" },
35
- React.createElement(AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "",
36
- // tooltipText="Alerts"
37
- bodyText: [alertsPanel], MessageType: messageType, useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
31
+ const isToolbar = this.props.viewType === 'Toolbar';
32
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
33
+ return (React.createElement(Flex, { alignItems: "stretch", className: clsx(`ab-${elementType}__Alert__wrap twa:gap-1`, {
34
+ 'twa:min-w-[140px] twa:w-[140px]': isToolbar,
35
+ [`twa:flex-1`]: !isToolbar,
36
+ }) },
37
+ React.createElement(Flex, { key: `${buttonTextColor}_${buttonBackground}_${collapsedText}`, className: `ab-${elementType}__Alert__text twa:flex-1 twa:rounded-standard twa:p-2 text-2 twa:items-center twa:justify-center twa:min-h-input`, style: { color: buttonTextColor, backgroundColor: buttonBackground } }, collapsedText),
38
+ this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex, { className: 'twa:gap-1' },
39
+ React.createElement(Flex, { className: "twa:flex twa:box-border" },
40
+ React.createElement(ButtonClear, { "aria-label": 'Clear All Alerts', variant: 'outlined', className: `ab-${elementType}__Alert__clear`, onClick: () => this.props.onDeleteAllAlert(this.state.Alerts), tooltip: "Clear All Alerts", showText: this.props.viewType === 'ToolPanel' }, 'Clear Alerts')),
41
+ React.createElement(AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "Alerts Details", bodyText: [alertsPanel], MessageType: 'Info', useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
38
42
  }
39
43
  }
40
44
  function mapStateToProps(state, ownProps) {
@@ -2,4 +2,5 @@ import { AdaptableAlert } from '../../../../types';
2
2
  export declare const getAlertButtonStyle: (alerts: AdaptableAlert[]) => {
3
3
  color: string;
4
4
  background: string;
5
+ cssClasses: string;
5
6
  };
@@ -4,8 +4,16 @@ export const getAlertButtonStyle = (alerts) => {
4
4
  const messageTypeColor = UIHelper.getColorByMessageType(messageType);
5
5
  const buttonBackground = UIHelper.getButtonColourForAdaptableAlerts(alerts, messageTypeColor);
6
6
  const buttonTextColor = UIHelper.getButtonTextColourForArrayandMessageType(alerts, messageType);
7
+ let cssClasses = '';
8
+ if (alerts?.length) {
9
+ const cssMessageType = UIHelper.getCSSColorByMessageType(messageType);
10
+ cssClasses = cssMessageType
11
+ ? `twa:bg-${cssMessageType} twa:text-text-on-${cssMessageType}`
12
+ : '';
13
+ }
7
14
  return {
8
15
  color: buttonTextColor,
9
16
  background: buttonBackground,
17
+ cssClasses,
10
18
  };
11
19
  };
@@ -13,6 +13,7 @@ import { connect } from 'react-redux';
13
13
  import { Flex } from '../../components/Flex';
14
14
  import clsx from 'clsx';
15
15
  class BulkUpdateViewPanelComponent extends React.Component {
16
+ cleanupEvent;
16
17
  constructor(props) {
17
18
  super(props);
18
19
  this.state = {
@@ -37,24 +38,36 @@ class BulkUpdateViewPanelComponent extends React.Component {
37
38
  let statusColour = this.getStatusColour();
38
39
  let selectedColumn = this.props.BulkUpdateValidationResult.Column;
39
40
  let previewPanel = (React.createElement(PreviewResultsPanel, { previewInfo: this.props.PreviewInfo, api: this.props.api, selectedColumn: selectedColumn, showPanel: true, showHeader: false }));
40
- let shouldDisable = this.props.accessLevel == 'ReadOnly' ||
41
+ const valueSelectorDisabled = this.props.accessLevel == 'ReadOnly' ||
41
42
  !this.props.BulkUpdateValidationResult.IsValid ||
42
- this.props.api.layoutApi.isCurrentLayoutPivot() == true;
43
+ this.props.api.layoutApi.isCurrentLayoutPivot();
44
+ const valueOperationDisabled = valueSelectorDisabled ||
45
+ StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
46
+ (this.props.PreviewInfo != null &&
47
+ this.props.PreviewInfo.previewValidationSummary.validationResult == 'All');
43
48
  const applyStyle = {
44
49
  color: statusColour,
45
50
  fill: 'currentColor',
46
51
  };
47
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
48
- return (React.createElement(Flex, { flexDirection: "row", className: clsx(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:min-w-[150px]`), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
49
- React.createElement(Flex, null,
52
+ const isToolbar = this.props.viewType === 'Toolbar';
53
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
54
+ const messageStyle = UIHelper.getMessageTypeByStatusColour(statusColour);
55
+ const infoStyle = messageStyle === 'Success' ? 'Info' : messageStyle;
56
+ return (React.createElement(Flex, { className: clsx(valueSelectorDisabled ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:gap-1 twa:flex-row`, {
57
+ 'twa:min-w-[300px] twa:max-w-[300px] twa:w-[300px] twa:flex-nowrap': isToolbar,
58
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
59
+ }), flexWrap: isToolbar ? 'nowrap' : 'wrap' },
60
+ React.createElement(Flex, { className: clsx('twa:flex-1', {
61
+ 'twa:min-w-[100px]': !isToolbar,
62
+ 'twa:min-w-0': isToolbar,
63
+ }) },
50
64
  React.createElement(BulkUpdateValueSelector, { selectedGridCells: this.props.SelectedGridCells, newLabel: "New", existingLabel: "Existing", dropdownButtonProps: {
51
65
  listMinWidth: 160,
52
- }, className: `ab-${elementType}__BulkUpdate__select`, disabled: shouldDisable, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: selectedColumn, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns) })),
53
- React.createElement(Flex, null,
54
- !shouldDisable && StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply, { className: `ab-${elementType}__BulkUpdate__apply twa:ml-2`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
55
- (this.props.PreviewInfo != null &&
56
- this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
57
- !shouldDisable && StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
66
+ }, className: `ab-${elementType}__BulkUpdate__select twa:w-full`, disabled: valueSelectorDisabled, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: selectedColumn, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns) })),
67
+ React.createElement(Flex, { className: "twa:flex-shrink-0 twa:gap-1" },
68
+ React.createElement(Flex, { className: "twa:flex twa:box-border twa:items-center" },
69
+ React.createElement(ButtonApply, { className: `ab-${elementType}__BulkUpdate__apply twa:h-full`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: valueOperationDisabled, accessLevel: this.props.accessLevel }, 'Apply')),
70
+ React.createElement(AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: infoStyle, useButton: true, showEvent: 'focus', hideEvent: "blur", disabled: valueSelectorDisabled || StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) }))));
58
71
  }
59
72
  onColumnValueSelectedChanged(selectedColumnValue) {
60
73
  this.props.onBulkUpdateValueChange(selectedColumnValue);
@@ -9,14 +9,6 @@ import { CalculatedColumnWizard } from './Wizard/CalculatedColumnWizard';
9
9
  export class CalculatedColumnSummaryComponent extends React.Component {
10
10
  constructor(props) {
11
11
  super(props);
12
- this.onFinishWizard = (calculatedColumn) => {
13
- this.props.onEdit(calculatedColumn);
14
- this.setState({
15
- editedAdaptableObject: null,
16
- wizardStartIndex: 0,
17
- wizardStatus: WizardStatus.None,
18
- });
19
- };
20
12
  this.state = UIHelper.getEmptyConfigState();
21
13
  }
22
14
  render() {
@@ -44,6 +36,14 @@ export class CalculatedColumnSummaryComponent extends React.Component {
44
36
  wizardStatus: WizardStatus.None,
45
37
  });
46
38
  }
39
+ onFinishWizard = (calculatedColumn) => {
40
+ this.props.onEdit(calculatedColumn);
41
+ this.setState({
42
+ editedAdaptableObject: null,
43
+ wizardStartIndex: 0,
44
+ wizardStatus: WizardStatus.None,
45
+ });
46
+ };
47
47
  }
48
48
  function mapStateToProps(state) {
49
49
  return {
@@ -17,11 +17,11 @@ export const isValidCalculatedColumnExpression = (data, api) => {
17
17
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
18
18
  const expression = api.expressionApi.getAdaptableQueryExpression(data.Query)?.trim();
19
19
  if (!expression) {
20
- return 'Calculated column expression cannot be empty';
20
+ return 'Calculated Column Expression cannot be empty';
21
21
  }
22
22
  const isValid = calculatedColumnExpressionService.isCalculatedColumnQueryValid(data.Query);
23
23
  if (!isValid) {
24
- return 'Calculated column expression is not valid';
24
+ return 'Calculated Column Expression is not valid';
25
25
  }
26
26
  return true;
27
27
  };
@@ -9,7 +9,9 @@ import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
9
9
  import { connect } from 'react-redux';
10
10
  import { Select } from '../../components/Select';
11
11
  import { Flex } from '../../components/Flex';
12
+ import clsx from 'clsx';
12
13
  class CellSummaryViewPanelComponent extends React.Component {
14
+ cleanupEvent;
13
15
  constructor(props) {
14
16
  super(props);
15
17
  }
@@ -43,30 +45,27 @@ class CellSummaryViewPanelComponent extends React.Component {
43
45
  });
44
46
  let cellSummaryPopover = React.createElement(CellSummaryPopover, { CellSummary: this.props.CellSummary });
45
47
  let shouldDisable = this.props.accessLevel == 'ReadOnly' || this.props.CellSummary == null;
46
- const renderOperationValue = () => {
47
- if (shouldDisable) {
48
- return;
49
- }
50
- const operationValue = this.getOperationValue();
51
- if (operationValue == undefined) {
52
- return;
53
- }
54
- return this.props.viewType === 'ToolPanel' ? (React.createElement(Flex, { className: `ab-${elementType}__CellSummary__value twa:rounded-standard twa:mr-2 twa:p-2 twa:text-text-on-info twa:bg-info twa:text-2` }, operationValue)) : (React.createElement(Flex, { justifyContent: "center", className: `ab-${elementType}__CellSummary__value twa:flex-1 twa:mr-2 twa:ml-1 text-text-on-primary` }, operationValue));
55
- };
56
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
57
- return (React.createElement(Flex, { flexDirection: "row", className: shouldDisable ? GeneralConstants.READ_ONLY_STYLE : `ab-${elementType}__CellSummary__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
48
+ const isToolbar = this.props.viewType === 'Toolbar';
49
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
50
+ const operationValue = this.getOperationValue() ?? 'N/A';
51
+ return (React.createElement(Flex, { className: clsx(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
52
+ 'twa:min-w-[215px] twa:max-w-[215px] twa:w-[215px] twa:flex-nowrap': isToolbar,
53
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
54
+ }) },
58
55
  React.createElement(Flex, { className: "twa:flex-1" },
59
56
  React.createElement(Select, { "aria-label": "Cell Summary Operation Selector", className: `ab-${elementType}__CellSummary__select twa:w-full`, disabled: shouldDisable, options: [...operationMenuItems, ...operationDefinitions], onChange: (x) => this.props.onCellSummaryOperationChange(x), value: this.props.CellSummaryOperation })),
60
- React.createElement(Flex, { alignItems: "center", className: "twa:ml-2" }, React.createElement(React.Fragment, null,
61
- renderOperationValue(),
62
- this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries' }))))));
57
+ React.createElement(Flex, { className: "twa:items-center twa:gap-1" }, React.createElement(React.Fragment, null,
58
+ React.createElement(Flex, { className: clsx(`ab-${elementType}__CellSummary__value twa:min-w-[50px]`, {
59
+ 'twa:rounded-standard twa:text-color-text-on-info twa:bg-color-info twa:text-2': !isToolbar,
60
+ 'twa:flex-1 twa:text-color-text-on-primary twa:justify-center': isToolbar,
61
+ }) }, operationValue),
62
+ React.createElement(AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries', disabled: !this.props.CellSummary?.Count })))));
63
63
  }
64
64
  checkSelectedCells() {
65
65
  this.props.onCreateCellSummary();
66
66
  }
67
67
  getOperationValue() {
68
- const api = this.props.api;
69
- return api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
68
+ return this.props.api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
70
69
  }
71
70
  }
72
71
  function mapStateToProps(state, ownProps) {
@@ -8,7 +8,7 @@ const AdaptableDateInput = React.forwardRef(function AdaptableDateInputCmp(props
8
8
  const { value: _, defaultValue: __, onChange, required, disabled, showClearButton, ...inputProps } = props;
9
9
  const [value, setValue] = useProperty(props, 'value', undefined, {
10
10
  onChange: (dateString) =>
11
- // wrap date value in FormEvent in order to keep the external API unchanged
11
+ // wrap date value in ChangeEvent in order to keep the external API unchanged
12
12
  props.onChange?.({
13
13
  target: {
14
14
  // ALWAYS trigger onChange with the ISO format
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
  import SimpleButton from '../../../components/SimpleButton';
3
3
  export class ButtonApply extends React.Component {
4
4
  render() {
5
- return (React.createElement(SimpleButton, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "text", ...this.props }));
5
+ return (React.createElement(SimpleButton, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "outlined", ...this.props }));
6
6
  }
7
7
  }
@@ -7,6 +7,15 @@ const Glyphicon = ({ glyph, style }) => {
7
7
  };
8
8
  const baseClassName = 'ab-Button twa:text-current';
9
9
  export class ButtonBase extends React.Component {
10
+ static defaultProps = {
11
+ overrideDisableButton: false,
12
+ toolTipAndText: '',
13
+ glyph: '',
14
+ displayMode: 'Glyph+Text',
15
+ transformGlyph: false,
16
+ accessLevel: 'Full',
17
+ showDefaultStyle: false,
18
+ };
10
19
  render() {
11
20
  let isDisabled;
12
21
  isDisabled = this.props.accessLevel == 'Hidden';
@@ -59,12 +68,3 @@ export class ButtonBase extends React.Component {
59
68
  return hideToolTip ? button : buttonwithtooltip;
60
69
  }
61
70
  }
62
- ButtonBase.defaultProps = {
63
- overrideDisableButton: false,
64
- toolTipAndText: '',
65
- glyph: '',
66
- displayMode: 'Glyph+Text',
67
- transformGlyph: false,
68
- accessLevel: 'Full',
69
- showDefaultStyle: false,
70
- };
@@ -3,6 +3,7 @@ import { SimpleButtonProps } from '../../../components/SimpleButton';
3
3
  export interface ClearButtonProps extends SimpleButtonProps {
4
4
  showText?: boolean;
5
5
  showIcon?: boolean;
6
+ variant?: SimpleButtonProps['variant'];
6
7
  }
7
8
  export declare class ButtonClear extends React.Component<ClearButtonProps, {}> {
8
9
  render(): React.JSX.Element;