@adaptabletools/adaptable-cjs 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 +18 -17
  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 +16 -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 +31 -0
  175. package/src/parser/src/ExpressionEvaluationError.js +1 -0
  176. package/src/types.d.ts +1 -1
  177. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -4,9 +4,10 @@ exports.CalculatedColumnExpressionService = void 0;
4
4
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
5
5
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
6
6
  class CalculatedColumnExpressionService {
7
+ adaptableApi;
8
+ aggregatedScalarLiveValuesMap = new Map();
7
9
  constructor(adaptableApi) {
8
10
  this.adaptableApi = adaptableApi;
9
- this.aggregatedScalarLiveValuesMap = new Map();
10
11
  this.adaptableApi = adaptableApi;
11
12
  }
12
13
  listentoCellDataChange(cellDataChangedInfo) {
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/InternalRedux"));
6
6
  const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
7
7
  class ChartingService {
8
+ api;
8
9
  constructor(api) {
9
10
  this.api = api;
10
11
  }
@@ -8,10 +8,16 @@ const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
8
8
  // ~ 8 hours
9
9
  const MAX_TIMEFRAME_SIZE = 86400000;
10
10
  class DataService {
11
+ adaptable;
12
+ emitter;
13
+ cellDataChangeLogSubject$;
14
+ cellDataChangeLog$;
15
+ rowDataChangeLogSubject$;
16
+ rowDataChangeLog$;
17
+ undoChangeLog;
18
+ undoChangeTimers;
11
19
  constructor(adaptable) {
12
20
  this.adaptable = adaptable;
13
- this.on = (eventName, callback) => this.emitter.on(eventName, callback);
14
- this.emit = (eventName, data) => this.emitter.emit(eventName, data);
15
21
  this.adaptable = adaptable;
16
22
  this.emitter = new Emitter_1.default();
17
23
  this.cellDataChangeLogSubject$ = new rxjs_1.Subject();
@@ -35,6 +41,8 @@ class DataService {
35
41
  this.undoChangeTimers.clear();
36
42
  this.undoChangeTimers = null;
37
43
  }
44
+ on = (eventName, callback) => this.emitter.on(eventName, callback);
45
+ emit = (eventName, data) => this.emitter.emit(eventName, data);
38
46
  CreateCellDataChangedEvent(cellDataChangedInfo) {
39
47
  if (cellDataChangedInfo.newValue != cellDataChangedInfo.oldValue) {
40
48
  this.emitter.emitSync('CellDataChanged', cellDataChangedInfo);
@@ -4,11 +4,13 @@ exports.Fdc3Service = void 0;
4
4
  const Fdc3Context_1 = require("../../AdaptableState/Common/Fdc3Context");
5
5
  const Fdc3Intent_1 = require("../../AdaptableState/Common/Fdc3Intent");
6
6
  class Fdc3Service {
7
+ adaptableApi;
8
+ contextHandlerSubscriptions = [];
9
+ intentHandlerSubscriptions = [];
10
+ loggedAgentError = false;
11
+ uiControlsDefaultConfiguration;
7
12
  constructor(adaptableApi) {
8
13
  this.adaptableApi = adaptableApi;
9
- this.contextHandlerSubscriptions = [];
10
- this.intentHandlerSubscriptions = [];
11
- this.loggedAgentError = false;
12
14
  // 1. Subscribe to FDC3 events
13
15
  const adaptableHandleIntentFn = this.getFdc3Options().intents?.handleIntent;
14
16
  const listenForIntents = this.getFdc3Options().intents?.listensFor ?? [];
@@ -6,6 +6,11 @@ exports.FLASHING_CELL_ROW_KEY = '__ROW';
6
6
  * This service manages Flashing Cells
7
7
  */
8
8
  class FlashingCellService {
9
+ api;
10
+ // map of rowPrimaryKey -> ColIdOrRowId -> FlashingCellUuid
11
+ gridCellsCurrentlyFlashing;
12
+ // map of FlashingCellUuid -> FlashingCell
13
+ flashingCellsMapping;
9
14
  constructor(api) {
10
15
  this.api = api;
11
16
  this.gridCellsCurrentlyFlashing = {};
@@ -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{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("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;
@@ -9,9 +9,9 @@ const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
9
9
  const DefaultAdaptableOptions_1 = require("../../AdaptableOptions/DefaultAdaptableOptions");
10
10
  const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
11
11
  class MetamodelService {
12
+ gridInfoOptions = new Map();
13
+ getAdaptableOptions = () => null;
12
14
  constructor(getAdaptableOptions, validateOptions) {
13
- this.gridInfoOptions = new Map();
14
- this.getAdaptableOptions = () => null;
15
15
  this.getAdaptableOptions = getAdaptableOptions;
16
16
  this.gridInfoOptions = this.buildGridInfoOptions();
17
17
  if (validateOptions) {
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
6
6
  const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
7
7
  class ModuleService {
8
+ adaptableApi;
8
9
  constructor(adaptableApi) {
9
10
  this.adaptableApi = adaptableApi;
10
11
  this.adaptableApi = adaptableApi;
@@ -117,13 +118,13 @@ class ModuleService {
117
118
  case 'CalculatedColumn':
118
119
  return url + 'handbook-calculated-column';
119
120
  case 'CellSummary':
120
- return url + 'handbook-summarising';
121
+ return url + 'handbook-summarising-cells';
121
122
  case 'Charting':
122
123
  return url + 'handbook-charts';
123
124
  case 'ColumnFilter':
124
125
  return url + 'handbook-column-filter';
125
126
  case 'ColumnInfo':
126
- return url + 'dev-guide-column-grid-column-info';
127
+ return url + 'dev-guide-columns-column-info';
127
128
  case 'Comment':
128
129
  return url + 'handbook-comments';
129
130
  case 'CustomSort':
@@ -149,7 +150,7 @@ class ModuleService {
149
150
  case 'GridFilter':
150
151
  return url + 'handbook-grid-filter';
151
152
  case 'GridInfo':
152
- return url + 'dev-guide-column-grid-column-info';
153
+ return url + 'dev-guide-support-monitoring';
153
154
  case 'Layout':
154
155
  return url + 'handbook-layouts';
155
156
  case 'NamedQuery':
@@ -13,13 +13,14 @@ const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpres
13
13
  const TypeExtensions_1 = require("../Extensions/TypeExtensions");
14
14
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
15
15
  class QueryLanguageService {
16
+ adaptableApi;
17
+ cacheBooleanValidation = new Map();
18
+ cacheObservableValidation = new Map();
19
+ cacheAggregatedBooleanValidation = new Map();
20
+ cacheAggregatedScalarValidation = new Map();
21
+ cacheModuleSpecificExpressionFunctions = new Map();
16
22
  constructor(adaptableApi) {
17
23
  this.adaptableApi = adaptableApi;
18
- this.cacheBooleanValidation = new Map();
19
- this.cacheObservableValidation = new Map();
20
- this.cacheAggregatedBooleanValidation = new Map();
21
- this.cacheAggregatedScalarValidation = new Map();
22
- this.cacheModuleSpecificExpressionFunctions = new Map();
23
24
  }
24
25
  evaluateBooleanExpression(expression, module, rowNode, evalContext) {
25
26
  if (expression == undefined) {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RowFormService = void 0;
4
4
  class RowFormService {
5
+ adaptableApi;
5
6
  constructor(adaptableApi) {
6
7
  this.adaptableApi = adaptableApi;
7
8
  if (adaptableApi.optionsApi.getRowFormOptions().autoHandle) {
@@ -14,15 +14,12 @@ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
14
14
  * The logic is extracted here to make it easier to follow
15
15
  */
16
16
  class RowSummaryService {
17
+ api;
18
+ cachedCellSummary = new Map();
19
+ previousRowSummaries;
20
+ previousLayout;
17
21
  constructor(api) {
18
22
  this.api = api;
19
- this.cachedCellSummary = new Map();
20
- this._throttleAcumulatedColumnsThatChanged = new Set();
21
- /**
22
- *
23
- * @param colId optional to evaluate only one column
24
- */
25
- this._throttledEvaluateRowSummary = (0, throttle_1.default)(this.evaluateRowSummary, 300);
26
23
  }
27
24
  onAdaptableReady() {
28
25
  this.rowSummariesSubscriptions();
@@ -70,12 +67,18 @@ class RowSummaryService {
70
67
  this.throttledEvaluateRowSummary();
71
68
  });
72
69
  }
70
+ _throttleAcumulatedColumnsThatChanged = new Set();
73
71
  throttledEvaluateRowSummary(reason) {
74
72
  if (reason) {
75
73
  reason.columnIds.forEach((col) => this._throttleAcumulatedColumnsThatChanged.add(col));
76
74
  }
77
75
  this._throttledEvaluateRowSummary(reason);
78
76
  }
77
+ /**
78
+ *
79
+ * @param colId optional to evaluate only one column
80
+ */
81
+ _throttledEvaluateRowSummary = (0, throttle_1.default)(this.evaluateRowSummary, 300);
79
82
  evaluateRowSummary(reason) {
80
83
  if (this._throttleAcumulatedColumnsThatChanged.size > 0) {
81
84
  const columnIds = Array.from(this._throttleAcumulatedColumnsThatChanged.values());
@@ -5,9 +5,11 @@ const tslib_1 = require("tslib");
5
5
  const Uuid_1 = require("../../AdaptableState/Uuid");
6
6
  const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
7
7
  class TeamSharingService {
8
+ adaptableApi;
9
+ dismissedNotifications = [];
10
+ updateCheckTimerId;
8
11
  constructor(adaptableApi) {
9
12
  this.adaptableApi = adaptableApi;
10
- this.dismissedNotifications = [];
11
13
  const teamSharingOptions = adaptableApi.optionsApi.getTeamSharingOptions();
12
14
  if (teamSharingOptions.updateInterval > 0) {
13
15
  // convert minutes to millis
@@ -2,16 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThemeService = void 0;
4
4
  class ThemeService {
5
+ api;
6
+ unsubscribe = () => { };
7
+ styleSheetObject;
5
8
  constructor(api) {
6
- this.unsubscribe = () => { };
7
- this.onThemeChanged = () => {
8
- let currentTheme = this.api.themeApi.getCurrentThemeObject();
9
- currentTheme = this.mapOsTheme(currentTheme);
10
- this.applyNewThemeVariables(currentTheme);
11
- // this needs to be called after variables are set
12
- // as it may show the warning for a custom/runtime theme
13
- this.showMissingThemeFiles(currentTheme);
14
- };
15
9
  this.api = api;
16
10
  this.subscribe();
17
11
  if (!this.styleSheetObject) {
@@ -36,6 +30,14 @@ class ThemeService {
36
30
  prefferedColorSchemeUnsubscribe();
37
31
  };
38
32
  }
33
+ onThemeChanged = () => {
34
+ let currentTheme = this.api.themeApi.getCurrentThemeObject();
35
+ currentTheme = this.mapOsTheme(currentTheme);
36
+ this.applyNewThemeVariables(currentTheme);
37
+ // this needs to be called after variables are set
38
+ // as it may show the warning for a custom/runtime theme
39
+ this.showMissingThemeFiles(currentTheme);
40
+ };
39
41
  applyNewThemeVariables(theme) {
40
42
  const variables = theme.CSSVariables;
41
43
  if (!variables || Object.keys(variables).length === 0) {
@@ -8,6 +8,7 @@ const ModuleConstants_1 = require("../Constants/ModuleConstants");
8
8
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
9
9
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
10
10
  class ValidationService {
11
+ adaptableApi;
11
12
  constructor(adaptableApi) {
12
13
  this.adaptableApi = adaptableApi;
13
14
  this.adaptableApi = adaptableApi;
@@ -23,6 +23,9 @@ const createAgStatusPanelComponent = (component, adaptable, context) => {
23
23
  };
24
24
  }
25
25
  return class StatusBarRenderer {
26
+ params;
27
+ eGui;
28
+ unmountReactRoot;
26
29
  init(params) {
27
30
  this.params = params;
28
31
  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;
@@ -39,7 +39,7 @@ class AdaptablePopover extends React.Component {
39
39
  // showTriangle
40
40
  visible: this.props.visible, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
41
41
  overflow: 'visible',
42
- }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo_1.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' } },
42
+ }, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo_1.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' } },
43
43
  this.props.children,
44
44
  showIcon && React.createElement(icons_1.Icon, { name: icon, style: iconStyle }))))));
45
45
  }
@@ -11,6 +11,14 @@ const ActiveAlertsPanel = () => {
11
11
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
12
12
  const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
13
13
  const alerts = (0, react_redux_1.useSelector)((state) => state.Internal.AdaptableAlerts);
14
+ // map the suspended property from the underlying AlertDefinitions
15
+ alerts.forEach((alert) => {
16
+ const liveAlertDef = adaptable.api.alertApi.getAlertDefinitionById(alert.alertDefinition.Uuid);
17
+ if (liveAlertDef) {
18
+ // @ts-ignore theoretically AdaptableAlert is not Suspendable; practically <AdaptableObjectCompactList> expects it
19
+ alert.IsSuspended = liveAlertDef.IsSuspended;
20
+ }
21
+ });
14
22
  return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
15
23
  };
16
24
  exports.ActiveAlertsPanel = ActiveAlertsPanel;
@@ -6,10 +6,11 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/InternalRedux"));
8
8
  const AdaptablePopover_1 = require("../AdaptablePopover");
9
- const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
10
9
  const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
11
10
  const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
12
11
  const Flex_1 = require("../../components/Flex");
12
+ const ButtonClear_1 = require("../Components/Buttons/ButtonClear");
13
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
13
14
  class AlertViewPanelComponent extends React.Component {
14
15
  constructor(props) {
15
16
  super(props);
@@ -24,7 +25,6 @@ class AlertViewPanelComponent extends React.Component {
24
25
  }
25
26
  }
26
27
  render() {
27
- const messageType = UIHelper_1.default.getMessageTypeFromAdaptableAlerts(this.props.AdaptableAlerts);
28
28
  const { color: buttonTextColor, background: buttonBackground } = (0, getAlertButtonStyle_1.getAlertButtonStyle)(this.props.AdaptableAlerts);
29
29
  const collapsedText = this.props.AdaptableAlerts.length == 0
30
30
  ? '0 Alerts'
@@ -32,13 +32,17 @@ class AlertViewPanelComponent extends React.Component {
32
32
  ? '1 Alert'
33
33
  : this.props.AdaptableAlerts.length + ' Alerts';
34
34
  const alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
35
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
36
- return (React.createElement(Flex_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
37
- React.createElement(Flex_1.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),
38
- this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex_1.Flex, { alignItems: "center" },
39
- React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "",
40
- // tooltipText="Alerts"
41
- bodyText: [alertsPanel], MessageType: messageType, useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
35
+ const isToolbar = this.props.viewType === 'Toolbar';
36
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
37
+ return (React.createElement(Flex_1.Flex, { alignItems: "stretch", className: (0, clsx_1.default)(`ab-${elementType}__Alert__wrap twa:gap-1`, {
38
+ 'twa:min-w-[140px] twa:w-[140px]': isToolbar,
39
+ [`twa:flex-1`]: !isToolbar,
40
+ }) },
41
+ React.createElement(Flex_1.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),
42
+ this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex_1.Flex, { className: 'twa:gap-1' },
43
+ React.createElement(Flex_1.Flex, { className: "twa:flex twa:box-border" },
44
+ React.createElement(ButtonClear_1.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')),
45
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "Alerts Details", bodyText: [alertsPanel], MessageType: 'Info', useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
42
46
  }
43
47
  }
44
48
  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
  };
@@ -8,9 +8,17 @@ const getAlertButtonStyle = (alerts) => {
8
8
  const messageTypeColor = UIHelper_1.default.getColorByMessageType(messageType);
9
9
  const buttonBackground = UIHelper_1.default.getButtonColourForAdaptableAlerts(alerts, messageTypeColor);
10
10
  const buttonTextColor = UIHelper_1.default.getButtonTextColourForArrayandMessageType(alerts, messageType);
11
+ let cssClasses = '';
12
+ if (alerts?.length) {
13
+ const cssMessageType = UIHelper_1.default.getCSSColorByMessageType(messageType);
14
+ cssClasses = cssMessageType
15
+ ? `twa:bg-${cssMessageType} twa:text-text-on-${cssMessageType}`
16
+ : '';
17
+ }
11
18
  return {
12
19
  color: buttonTextColor,
13
20
  background: buttonBackground,
21
+ cssClasses,
14
22
  };
15
23
  };
16
24
  exports.getAlertButtonStyle = getAlertButtonStyle;
@@ -17,6 +17,7 @@ const react_redux_1 = require("react-redux");
17
17
  const Flex_1 = require("../../components/Flex");
18
18
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
19
19
  class BulkUpdateViewPanelComponent extends React.Component {
20
+ cleanupEvent;
20
21
  constructor(props) {
21
22
  super(props);
22
23
  this.state = {
@@ -41,24 +42,36 @@ class BulkUpdateViewPanelComponent extends React.Component {
41
42
  let statusColour = this.getStatusColour();
42
43
  let selectedColumn = this.props.BulkUpdateValidationResult.Column;
43
44
  let previewPanel = (React.createElement(PreviewResultsPanel_1.PreviewResultsPanel, { previewInfo: this.props.PreviewInfo, api: this.props.api, selectedColumn: selectedColumn, showPanel: true, showHeader: false }));
44
- let shouldDisable = this.props.accessLevel == 'ReadOnly' ||
45
+ const valueSelectorDisabled = this.props.accessLevel == 'ReadOnly' ||
45
46
  !this.props.BulkUpdateValidationResult.IsValid ||
46
- this.props.api.layoutApi.isCurrentLayoutPivot() == true;
47
+ this.props.api.layoutApi.isCurrentLayoutPivot();
48
+ const valueOperationDisabled = valueSelectorDisabled ||
49
+ StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
50
+ (this.props.PreviewInfo != null &&
51
+ this.props.PreviewInfo.previewValidationSummary.validationResult == 'All');
47
52
  const applyStyle = {
48
53
  color: statusColour,
49
54
  fill: 'currentColor',
50
55
  };
51
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
52
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:min-w-[150px]`), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
53
- React.createElement(Flex_1.Flex, null,
56
+ const isToolbar = this.props.viewType === 'Toolbar';
57
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
58
+ const messageStyle = UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour);
59
+ const infoStyle = messageStyle === 'Success' ? 'Info' : messageStyle;
60
+ return (React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(valueSelectorDisabled ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:gap-1 twa:flex-row`, {
61
+ 'twa:min-w-[300px] twa:max-w-[300px] twa:w-[300px] twa:flex-nowrap': isToolbar,
62
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
63
+ }), flexWrap: isToolbar ? 'nowrap' : 'wrap' },
64
+ React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)('twa:flex-1', {
65
+ 'twa:min-w-[100px]': !isToolbar,
66
+ 'twa:min-w-0': isToolbar,
67
+ }) },
54
68
  React.createElement(BulkUpdateValueSelector_1.BulkUpdateValueSelector, { selectedGridCells: this.props.SelectedGridCells, newLabel: "New", existingLabel: "Existing", dropdownButtonProps: {
55
69
  listMinWidth: 160,
56
- }, className: `ab-${elementType}__BulkUpdate__select`, disabled: shouldDisable, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: selectedColumn, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns) })),
57
- React.createElement(Flex_1.Flex, null,
58
- !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply_1.ButtonApply, { className: `ab-${elementType}__BulkUpdate__apply twa:ml-2`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
59
- (this.props.PreviewInfo != null &&
60
- this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
61
- !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
70
+ }, 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) })),
71
+ React.createElement(Flex_1.Flex, { className: "twa:flex-shrink-0 twa:gap-1" },
72
+ React.createElement(Flex_1.Flex, { className: "twa:flex twa:box-border twa:items-center" },
73
+ React.createElement(ButtonApply_1.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')),
74
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: infoStyle, useButton: true, showEvent: 'focus', hideEvent: "blur", disabled: valueSelectorDisabled || StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) }))));
62
75
  }
63
76
  onColumnValueSelectedChanged(selectedColumnValue) {
64
77
  this.props.onBulkUpdateValueChange(selectedColumnValue);
@@ -13,14 +13,6 @@ const CalculatedColumnWizard_1 = require("./Wizard/CalculatedColumnWizard");
13
13
  class CalculatedColumnSummaryComponent extends React.Component {
14
14
  constructor(props) {
15
15
  super(props);
16
- this.onFinishWizard = (calculatedColumn) => {
17
- this.props.onEdit(calculatedColumn);
18
- this.setState({
19
- editedAdaptableObject: null,
20
- wizardStartIndex: 0,
21
- wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
22
- });
23
- };
24
16
  this.state = UIHelper_1.UIHelper.getEmptyConfigState();
25
17
  }
26
18
  render() {
@@ -48,6 +40,14 @@ class CalculatedColumnSummaryComponent extends React.Component {
48
40
  wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
49
41
  });
50
42
  }
43
+ onFinishWizard = (calculatedColumn) => {
44
+ this.props.onEdit(calculatedColumn);
45
+ this.setState({
46
+ editedAdaptableObject: null,
47
+ wizardStartIndex: 0,
48
+ wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
49
+ });
50
+ };
51
51
  }
52
52
  exports.CalculatedColumnSummaryComponent = CalculatedColumnSummaryComponent;
53
53
  function mapStateToProps(state) {
@@ -22,11 +22,11 @@ const isValidCalculatedColumnExpression = (data, api) => {
22
22
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
23
23
  const expression = api.expressionApi.getAdaptableQueryExpression(data.Query)?.trim();
24
24
  if (!expression) {
25
- return 'Calculated column expression cannot be empty';
25
+ return 'Calculated Column Expression cannot be empty';
26
26
  }
27
27
  const isValid = calculatedColumnExpressionService.isCalculatedColumnQueryValid(data.Query);
28
28
  if (!isValid) {
29
- return 'Calculated column expression is not valid';
29
+ return 'Calculated Column Expression is not valid';
30
30
  }
31
31
  return true;
32
32
  };
@@ -13,7 +13,9 @@ const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/
13
13
  const react_redux_1 = require("react-redux");
14
14
  const Select_1 = require("../../components/Select");
15
15
  const Flex_1 = require("../../components/Flex");
16
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
16
17
  class CellSummaryViewPanelComponent extends React.Component {
18
+ cleanupEvent;
17
19
  constructor(props) {
18
20
  super(props);
19
21
  }
@@ -47,30 +49,27 @@ class CellSummaryViewPanelComponent extends React.Component {
47
49
  });
48
50
  let cellSummaryPopover = React.createElement(CellSummaryPopover_1.CellSummaryPopover, { CellSummary: this.props.CellSummary });
49
51
  let shouldDisable = this.props.accessLevel == 'ReadOnly' || this.props.CellSummary == null;
50
- const renderOperationValue = () => {
51
- if (shouldDisable) {
52
- return;
53
- }
54
- const operationValue = this.getOperationValue();
55
- if (operationValue == undefined) {
56
- return;
57
- }
58
- return this.props.viewType === 'ToolPanel' ? (React.createElement(Flex_1.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_1.Flex, { justifyContent: "center", className: `ab-${elementType}__CellSummary__value twa:flex-1 twa:mr-2 twa:ml-1 text-text-on-primary` }, operationValue));
59
- };
60
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
61
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: shouldDisable ? GeneralConstants.READ_ONLY_STYLE : `ab-${elementType}__CellSummary__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
52
+ const isToolbar = this.props.viewType === 'Toolbar';
53
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
54
+ const operationValue = this.getOperationValue() ?? 'N/A';
55
+ return (React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
56
+ 'twa:min-w-[215px] twa:max-w-[215px] twa:w-[215px] twa:flex-nowrap': isToolbar,
57
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
58
+ }) },
62
59
  React.createElement(Flex_1.Flex, { className: "twa:flex-1" },
63
60
  React.createElement(Select_1.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 })),
64
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" }, React.createElement(React.Fragment, null,
65
- renderOperationValue(),
66
- this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries' }))))));
61
+ React.createElement(Flex_1.Flex, { className: "twa:items-center twa:gap-1" }, React.createElement(React.Fragment, null,
62
+ React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__value twa:min-w-[50px]`, {
63
+ 'twa:rounded-standard twa:text-color-text-on-info twa:bg-color-info twa:text-2': !isToolbar,
64
+ 'twa:flex-1 twa:text-color-text-on-primary twa:justify-center': isToolbar,
65
+ }) }, operationValue),
66
+ React.createElement(AdaptablePopover_1.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 })))));
67
67
  }
68
68
  checkSelectedCells() {
69
69
  this.props.onCreateCellSummary();
70
70
  }
71
71
  getOperationValue() {
72
- const api = this.props.api;
73
- return api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
72
+ return this.props.api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
74
73
  }
75
74
  }
76
75
  function mapStateToProps(state, ownProps) {
@@ -11,7 +11,7 @@ const AdaptableDateInput = React.forwardRef(function AdaptableDateInputCmp(props
11
11
  const { value: _, defaultValue: __, onChange, required, disabled, showClearButton, ...inputProps } = props;
12
12
  const [value, setValue] = (0, useProperty_1.default)(props, 'value', undefined, {
13
13
  onChange: (dateString) =>
14
- // wrap date value in FormEvent in order to keep the external API unchanged
14
+ // wrap date value in ChangeEvent in order to keep the external API unchanged
15
15
  props.onChange?.({
16
16
  target: {
17
17
  // ALWAYS trigger onChange with the ISO format
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
7
7
  class ButtonApply extends React.Component {
8
8
  render() {
9
- return (React.createElement(SimpleButton_1.default, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "text", ...this.props }));
9
+ return (React.createElement(SimpleButton_1.default, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "outlined", ...this.props }));
10
10
  }
11
11
  }
12
12
  exports.ButtonApply = ButtonApply;
@@ -11,6 +11,15 @@ const Glyphicon = ({ glyph, style }) => {
11
11
  };
12
12
  const baseClassName = 'ab-Button twa:text-current';
13
13
  class ButtonBase extends React.Component {
14
+ static defaultProps = {
15
+ overrideDisableButton: false,
16
+ toolTipAndText: '',
17
+ glyph: '',
18
+ displayMode: 'Glyph+Text',
19
+ transformGlyph: false,
20
+ accessLevel: 'Full',
21
+ showDefaultStyle: false,
22
+ };
14
23
  render() {
15
24
  let isDisabled;
16
25
  isDisabled = this.props.accessLevel == 'Hidden';
@@ -64,12 +73,3 @@ class ButtonBase extends React.Component {
64
73
  }
65
74
  }
66
75
  exports.ButtonBase = ButtonBase;
67
- ButtonBase.defaultProps = {
68
- overrideDisableButton: false,
69
- toolTipAndText: '',
70
- glyph: '',
71
- displayMode: 'Glyph+Text',
72
- transformGlyph: false,
73
- accessLevel: 'Full',
74
- showDefaultStyle: false,
75
- };