@adaptabletools/adaptable 15.2.0-canary.6 → 15.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bundle.cjs.js +12 -12
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  6. package/src/AdaptableOptions/AlertOptions.d.ts +3 -3
  7. package/src/AdaptableOptions/Glue42PluginOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +7 -0
  9. package/src/AdaptableOptions/PredicateOptions.d.ts +5 -1
  10. package/src/Api/AlertApi.d.ts +2 -2
  11. package/src/Api/Glue42Api.d.ts +1 -1
  12. package/src/Api/Implementation/AlertApiImpl.d.ts +2 -2
  13. package/src/Api/Implementation/AlertApiImpl.js +6 -6
  14. package/src/Api/Implementation/FilterApiImpl.js +4 -1
  15. package/src/Api/Implementation/FlashingCellApiImpl.js +1 -1
  16. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
  17. package/src/Api/Implementation/PluginsApiImpl.js +6 -0
  18. package/src/Api/Implementation/PredicateApiImpl.d.ts +5 -5
  19. package/src/Api/Implementation/PredicateApiImpl.js +8 -8
  20. package/src/Api/Internal/AlertInternalApi.d.ts +3 -3
  21. package/src/Api/Internal/AlertInternalApi.js +7 -7
  22. package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
  23. package/src/Api/Internal/GridInternalApi.js +0 -1
  24. package/src/Api/Internal/PredicateInternalApi.d.ts +5 -4
  25. package/src/Api/Internal/PredicateInternalApi.js +16 -12
  26. package/src/Api/PluginsApi.d.ts +6 -1
  27. package/src/Api/PredicateApi.d.ts +5 -5
  28. package/src/Strategy/AlertModule.js +1 -1
  29. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
  30. package/src/agGrid/Adaptable.d.ts +1 -0
  31. package/src/agGrid/Adaptable.js +23 -21
  32. package/src/metamodel/adaptable.metamodel.d.ts +12 -0
  33. package/src/metamodel/adaptable.metamodel.js +1 -1
  34. package/src/types.d.ts +1 -0
  35. package/version.d.ts +1 -1
  36. package/version.js +1 -1
@@ -729,31 +729,35 @@ class Adaptable {
729
729
  }
730
730
  createAdaptableSideBarDef() {
731
731
  var _a;
732
- if (
733
- // no need to create the sidebar if it is not enabled
734
- !this.gridOptions.sideBar) {
732
+ if (!this.gridOptions.sideBar) {
733
+ // no need to create the sidebar if it is not enabled
735
734
  return;
736
735
  }
736
+ const adaptableToolBarHidden = this.EntitlementService.isModuleHiddenEntitlement('ToolPanel');
737
737
  if (this.gridOptions.sideBar === true) {
738
738
  // create all tool panels with default settings
739
+ const toolPanels = [];
740
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_FILTERS);
741
+ toolPanels.push(GeneralConstants.AGGRID_TOOLPANEL_COLUMNS);
742
+ if (!adaptableToolBarHidden) {
743
+ toolPanels.push(this.agGridHelper.buildAdaptableToolPanelDef());
744
+ }
739
745
  return {
740
- toolPanels: [
741
- GeneralConstants.AGGRID_TOOLPANEL_FILTERS,
742
- GeneralConstants.AGGRID_TOOLPANEL_COLUMNS,
743
- this.agGridHelper.buildAdaptableToolPanelDef(),
744
- ],
746
+ toolPanels: toolPanels,
745
747
  };
746
748
  }
747
749
  else if (typeof this.gridOptions.sideBar === 'string') {
748
750
  // there is only one tool panel, and it's the adaptable one => we have to handle it
749
751
  if (this.gridOptions.sideBar === GeneralConstants.ADAPTABLE_TOOLPANEL_ID) {
750
- return {
751
- toolPanels: [this.agGridHelper.buildAdaptableToolPanelDef()],
752
- };
752
+ if (!adaptableToolBarHidden)
753
+ return {
754
+ toolPanels: [this.agGridHelper.buildAdaptableToolPanelDef()],
755
+ };
753
756
  }
754
757
  }
755
758
  else if (Array.isArray(this.gridOptions.sideBar)) {
756
- if (!this.gridOptions.sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
759
+ if (!this.gridOptions.sideBar.includes(GeneralConstants.ADAPTABLE_TOOLPANEL_ID) ||
760
+ adaptableToolBarHidden) {
757
761
  return;
758
762
  }
759
763
  // if it's an array, process the tool panel definitions
@@ -763,7 +767,8 @@ class Adaptable {
763
767
  }
764
768
  else if (this.agGridHelper.isSideBarDefObject(this.gridOptions.sideBar)) {
765
769
  if ((_a = this.gridOptions.sideBar.toolPanels) === null || _a === void 0 ? void 0 : _a.some((toolpanelDef) => typeof toolpanelDef !== 'string' &&
766
- toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID)) {
770
+ toolpanelDef.id === GeneralConstants.ADAPTABLE_TOOLPANEL_ID &&
771
+ !adaptableToolBarHidden)) {
767
772
  // return the boolean flag so that we know that we need the custom AdaptableToolPanel component
768
773
  return true;
769
774
  }
@@ -1638,7 +1643,7 @@ class Adaptable {
1638
1643
  // This method returns selected cells ONLY (if selection mode is cells or multiple cells).
1639
1644
  // If the selection mode is row it will returns nothing - use the setSelectedRows() method
1640
1645
  setSelectedCells() {
1641
- if (!this.isGridSelectable()) {
1646
+ if (!this.isGridRangeSelectable()) {
1642
1647
  return undefined;
1643
1648
  }
1644
1649
  const selected = this.gridOptions.api.getCellRanges();
@@ -4232,15 +4237,12 @@ class Adaptable {
4232
4237
  return indexFirstElement - indexSecondElement;
4233
4238
  };
4234
4239
  }
4235
- // do we want to do this each time or check once at startup and then set a flag?
4236
4240
  isGridSelectable() {
4241
+ return (this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple');
4242
+ }
4243
+ isGridRangeSelectable() {
4237
4244
  let isRangeSelectionModuleRegistered = this.isAgGridModulePresent(core_1.ModuleNames.RangeSelectionModule);
4238
- if (isRangeSelectionModuleRegistered &&
4239
- this.gridOptions.enableRangeSelection != null &&
4240
- this.gridOptions.enableRangeSelection) {
4241
- return true;
4242
- }
4243
- return false;
4245
+ return isRangeSelectionModuleRegistered && this.gridOptions.enableRangeSelection === true;
4244
4246
  }
4245
4247
  isGridGroupable() {
4246
4248
  const isTreeLayout = this.api.internalApi.isGridInTreeMode();
@@ -2935,6 +2935,18 @@ export declare const ADAPTABLE_METAMODEL: {
2935
2935
  ref?: undefined;
2936
2936
  })[];
2937
2937
  };
2938
+ Glue42WebPluginOptions: {
2939
+ name: string;
2940
+ kind: string;
2941
+ desc: string;
2942
+ props: {
2943
+ name: string;
2944
+ kind: string;
2945
+ desc: string;
2946
+ isOpt: boolean;
2947
+ defVal: string;
2948
+ }[];
2949
+ };
2938
2950
  GradientStyle: {
2939
2951
  name: string;
2940
2952
  kind: string;