@adaptabletools/adaptable-cjs 20.2.0 → 20.2.2

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 (66) hide show
  1. package/base.css +7 -7
  2. package/base.css.map +1 -1
  3. package/index.css +7 -7
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
  7. package/src/AdaptableOptions/StateOptions.d.ts +60 -15
  8. package/src/AdaptableState/Common/AdaptableColumn.d.ts +4 -0
  9. package/src/AdaptableState/FormatColumnState.d.ts +11 -6
  10. package/src/AdaptableState/LayoutState.d.ts +16 -2
  11. package/src/AdaptableState/QuickSearchState.d.ts +5 -5
  12. package/src/Api/Implementation/ColumnApiImpl.js +4 -2
  13. package/src/Api/Implementation/LayoutHelpers.d.ts +3 -0
  14. package/src/Api/Implementation/LayoutHelpers.js +80 -41
  15. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -2
  16. package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
  17. package/src/Api/Implementation/StateApiImpl.d.ts +1 -0
  18. package/src/Api/Implementation/StateApiImpl.js +6 -5
  19. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
  20. package/src/Api/Internal/ColumnInternalApi.js +5 -0
  21. package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -1
  22. package/src/Api/Internal/FormatColumnInternalApi.js +8 -8
  23. package/src/Api/QuickSearchApi.d.ts +2 -2
  24. package/src/Api/StateApi.d.ts +9 -0
  25. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +4 -4
  26. package/src/Redux/ActionsReducers/QuickSearchRedux.js +9 -9
  27. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +14 -18
  28. package/src/Redux/Store/AdaptableStore.d.ts +2 -0
  29. package/src/Redux/Store/AdaptableStore.js +13 -5
  30. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  31. package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
  32. package/src/Redux/Store/buildAdaptableStateFunctionConfig.d.ts +3 -0
  33. package/src/Redux/Store/buildAdaptableStateFunctionConfig.js +13 -0
  34. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  35. package/src/Utilities/Helpers/StyleHelper.d.ts +1 -1
  36. package/src/Utilities/Helpers/StyleHelper.js +11 -0
  37. package/src/Utilities/Services/LicenseService/index.js +1 -1
  38. package/src/Utilities/license/decode.js +1 -1
  39. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -3
  40. package/src/View/Components/EntityRulesEditor/index.js +3 -3
  41. package/src/View/Components/ExpressionWizard.js +1 -1
  42. package/src/View/Components/StyleComponent.d.ts +1 -0
  43. package/src/View/Components/StyleComponent.js +2 -1
  44. package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
  45. package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
  46. package/src/View/Layout/Wizard/sections/ColumnsSection.js +27 -8
  47. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  48. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +4 -4
  49. package/src/View/License/LicenseWatermark.js +1 -1
  50. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  51. package/src/View/QuickSearch/QuickSearchInput.js +3 -2
  52. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  53. package/src/View/QuickSearch/QuickSearchPopup.js +7 -4
  54. package/src/agGrid/AdaptableAgGrid.js +21 -10
  55. package/src/agGrid/AgGridAdapter.js +6 -1
  56. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
  57. package/src/agGrid/AgGridColumnAdapter.js +39 -17
  58. package/src/agGrid/AgGridExportAdapter.js +22 -10
  59. package/src/env.js +2 -2
  60. package/src/layout-manager/src/LayoutManagerModel.d.ts +17 -4
  61. package/src/layout-manager/src/index.d.ts +1 -1
  62. package/src/layout-manager/src/index.js +61 -18
  63. package/src/metamodel/adaptable.metamodel.d.ts +43 -16
  64. package/src/metamodel/adaptable.metamodel.js +1 -1
  65. package/src/types.d.ts +2 -2
  66. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -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{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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=exports.GENERIC_APP_NAME=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License");exports.GENERIC_APP_NAME="GenericAdaptableApp";const r=e=>{const r=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map),o={start:new Date(r.get("StartDate")),end:new Date(r.get("EndDate")),owner:r.get("Owner"),appName:r.get("AppName")||exports.GENERIC_APP_NAME,timestamp:r.get("TS")?Number(r.get("TS")):0,trial:"true"===r.get("Trial"),ref:r.get("Ref")??""};if(!(o.start&&o.end&&o.owner&&"boolean"==typeof o.trial&&o.ref))throw t();return o};exports.fieldsToLicenseDetails=r;const o=r=>{let o="",s=r.split("|").map((e=>{let[t,r]=e.split("=");return"C"===t&&(o=r),{name:t,value:r}}));if(!o)throw t();const a=o.split(",").reverse(),n=a.pop();a.forEach(((r,o)=>{const a=s[o];if((0,e.compute_string)(a.value)!==r)throw t()}));const p=[...s];p.pop();const i=p.map((e=>`${e.name}=${e.value}`)).join("|");if((0,e.compute_string)(i)!==n)throw t();return s=s.map((e=>({...e,value:decodeURI(e.value)}))),(0,exports.fieldsToLicenseDetails)(s)};exports.decode=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=exports.fieldsToLicenseDetails=exports.GENERIC_APP_NAME=void 0;const e=require("./hashing"),t=()=>new Error("Invalid License");exports.GENERIC_APP_NAME="GenericAdaptableApp";const r=e=>{const r=e.reduce((e,t)=>(e.set(t.name,t.value),e),new Map),o={start:new Date(r.get("StartDate")),end:new Date(r.get("EndDate")),owner:r.get("Owner"),appName:r.get("AppName")||exports.GENERIC_APP_NAME,timestamp:r.get("TS")?Number(r.get("TS")):0,trial:"true"===r.get("Trial"),ref:r.get("Ref")??""};if(!(o.start&&o.end&&o.owner&&"boolean"==typeof o.trial&&o.ref))throw t();return o};exports.fieldsToLicenseDetails=r;const o=r=>{let o="",s=r.split("|").map(e=>{let[t,r]=e.split("=");return"C"===t&&(o=r),{name:t,value:r}});if(!o)throw t();const a=o.split(",").reverse(),n=a.pop();a.forEach((r,o)=>{const a=s[o];if((0,e.compute_string)(a.value)!==r)throw t()});const p=[...s];p.pop();const i=p.map(e=>`${e.name}=${e.value}`).join("|");if((0,e.compute_string)(i)!==n)throw t();return s=s.map(e=>({...e,value:decodeURI(e.value)})),(0,exports.fieldsToLicenseDetails)(s)};exports.decode=o;
@@ -58,9 +58,7 @@ const CalculatedColumnExpressionWizardSection = (props) => {
58
58
  return 'quantileAggregatedScalar';
59
59
  }
60
60
  };
61
- const columns = api.columnApi
62
- .getQueryableColumns()
63
- .filter((c) => !c.isGeneratedPivotResultColumn);
61
+ const columns = api.columnApi.internalApi.getQueryableColumnsForUIEditor();
64
62
  return (React.createElement(Tabs_1.Tabs, { autoFocus: false, height: "100%" },
65
63
  React.createElement(Tabs_1.Tabs.Tab, null, (0, StringExtensions_1.Humanize)(props.expressionType)),
66
64
  React.createElement(Tabs_1.Tabs.Content, null, (() => {
@@ -152,14 +152,14 @@ const EntityRulesEditor = (props) => {
152
152
  React.createElement(EntityRulePredicatesEditor_1.EntityRulePredicatesEditor, { enablePredicateColumnId: props.enablePredicateColumnId, data: data, descriptions: descriptions, predicateDefs: filteredPredicateDefs, getPredicateDefsForColId: props.getPredicateDefsForColId, onChange: props.onChange }))) : null,
153
153
  showBoolean ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "BooleanExpression", type: type, label: "Boolean" })) : null,
154
154
  showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "BooleanExpression", value: 'BooleanExpression' }, (() => {
155
- const editor = (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule?.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api, showQueryBuilder: props.showQueryBuilder }));
155
+ const editor = (React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule?.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api, showQueryBuilder: props.showQueryBuilder }));
156
156
  return props.showQueryBuilder ? React.createElement(Panel_1.default, null, editor) : editor;
157
157
  })())) : null,
158
158
  showObservable ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "ObservableExpression", type: type, label: "Observable" })) : null,
159
159
  showObservable ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "ObservableExpression", value: 'ObservableExpression' },
160
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule?.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null,
160
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule?.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null,
161
161
  showAggregation ? (React.createElement(QueryTab, { showRadio: showRadioButtons, value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
162
162
  showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "AggregatedBooleanExpression", value: 'AggregatedBooleanExpression' },
163
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule?.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null)));
163
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule?.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }))) : null)));
164
164
  };
165
165
  exports.EntityRulesEditor = EntityRulesEditor;
@@ -31,7 +31,7 @@ class ExpressionWizard extends React.Component {
31
31
  render() {
32
32
  const initialData = (0, react_1.useMemo)(() => this.props.api.internalApi.getQueryPreviewData(), []);
33
33
  return (React.createElement(React.Fragment, null,
34
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
34
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
35
35
  ' ',
36
36
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, marginBottom: 2, marginLeft: 1, alignItems: "center", "data-name": "expression-wizard-save-option" },
37
37
  React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, disabled: !this.isValidExpression(), marginBottom: 2, checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
@@ -8,6 +8,7 @@ export interface StyleComponentProps extends React.ClassAttributes<StyleComponen
8
8
  api: AdaptableApi;
9
9
  headless?: boolean;
10
10
  hidePreview?: boolean;
11
+ headerText?: string;
11
12
  Style: AdaptableStyle;
12
13
  showFontSizeAs?: 'radio' | 'dropdown';
13
14
  UpdateStyle: (style: AdaptableStyle) => void;
@@ -48,10 +48,11 @@ class StyleComponent extends React.Component {
48
48
  }
49
49
  render() {
50
50
  const Cmp = this.props.headless ? rebass_1.Box : Panel_1.default;
51
+ const headerText = this.props.headerText ?? 'Style';
51
52
  const cmpProps = this.props.headless
52
53
  ? {}
53
54
  : {
54
- header: 'Style',
55
+ header: headerText,
55
56
  margin: 2,
56
57
  'data-name': 'style-component',
57
58
  };
@@ -76,6 +76,6 @@ const ReportRowsWizardSection = (props) => {
76
76
  BooleanExpression,
77
77
  },
78
78
  });
79
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })))));
79
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })))));
80
80
  };
81
81
  exports.ReportRowsWizardSection = ReportRowsWizardSection;
@@ -92,7 +92,7 @@ const GridFilterExpressionEditor = (props) => {
92
92
  },
93
93
  } },
94
94
  React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column" },
95
- React.createElement(ExpressionEditor_1.ExpressionEditor, { ...expressionEditorProps, type: 'boolean', module: ModuleConstants_1.GridFilterModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }),
95
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { ...expressionEditorProps, type: 'boolean', module: ModuleConstants_1.GridFilterModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }),
96
96
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, alignItems: "center" },
97
97
  props.onDismiss && (React.createElement(SimpleButton_1.default, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
98
98
  props.onDismiss();
@@ -26,6 +26,7 @@ const ReorderDraggable_1 = require("../../../Components/ReorderDraggable");
26
26
  const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/AdaptableFormControlTextClear");
27
27
  const sortColumnIdsByOrder_1 = require("../../../../layout-manager/src/sortColumnIdsByOrder");
28
28
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
29
+ const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
29
30
  const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
30
31
  const columnTypes = {
31
32
  default: {
@@ -200,6 +201,7 @@ const ColumnsSection = (props) => {
200
201
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
201
202
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
202
203
  const [searchInputValue, setSearchInputValue] = React.useState('');
204
+ let hasSelectionColumn = false;
203
205
  const allColumns = adaptable.api.columnApi
204
206
  .getUIAvailableColumns()
205
207
  .filter((col) => {
@@ -209,7 +211,23 @@ const ColumnsSection = (props) => {
209
211
  return !col.isGeneratedRowGroupColumn;
210
212
  })
211
213
  // if the current Layout is a PivotLayout, then we also filter out current Pivot Result Columns
212
- .filter((col) => !col.isGeneratedPivotResultColumn);
214
+ .filter((col) => !col.isGeneratedPivotResultColumn)
215
+ // also we need to filter out selection column
216
+ .filter((col) => {
217
+ const result = !col.isGeneratedSelectionColumn;
218
+ if (!result) {
219
+ hasSelectionColumn = true;
220
+ }
221
+ return result;
222
+ });
223
+ const onChange = (data) => {
224
+ if (hasSelectionColumn &&
225
+ Array.isArray(data.TableColumns) &&
226
+ !data.TableColumns.includes(GeneralConstants_1.AG_GRID_SELECTION_COLUMN)) {
227
+ data.TableColumns.unshift(GeneralConstants_1.AG_GRID_SELECTION_COLUMN);
228
+ }
229
+ props.onChange(data);
230
+ };
213
231
  // however, changes in RowGroupedColumns done in the previous step
214
232
  // are reflected into the layout, so we use the latest layout.RowGroupedColumns
215
233
  // to create new columns
@@ -266,7 +284,7 @@ const ColumnsSection = (props) => {
266
284
  ColumnVisibility[colId] = false;
267
285
  }
268
286
  });
269
- props.onChange({
287
+ onChange({
270
288
  ...layout,
271
289
  TableColumns: columnIds,
272
290
  ColumnVisibility,
@@ -305,14 +323,14 @@ const ColumnsSection = (props) => {
305
323
  return shouldInclude;
306
324
  });
307
325
  }
308
- props.onChange({
326
+ onChange({
309
327
  ...layout,
310
328
  TableColumns: TableColumns,
311
329
  ColumnVisibility,
312
330
  });
313
331
  };
314
332
  const handlePinChange = (columnId, pinning) => {
315
- props.onChange({
333
+ onChange({
316
334
  ...layout,
317
335
  ColumnPinning: {
318
336
  ...layout.ColumnPinning,
@@ -321,7 +339,7 @@ const ColumnsSection = (props) => {
321
339
  });
322
340
  };
323
341
  const handleColumnNameChange = (columnId, headerName) => {
324
- props.onChange({
342
+ onChange({
325
343
  ...layout,
326
344
  ColumnHeaders: {
327
345
  ...layout.ColumnHeaders,
@@ -330,7 +348,7 @@ const ColumnsSection = (props) => {
330
348
  });
331
349
  };
332
350
  const handleColumnWidthChange = (columnId, width) => {
333
- props.onChange({
351
+ onChange({
334
352
  ...layout,
335
353
  ColumnWidths: {
336
354
  ...layout.ColumnWidths,
@@ -339,7 +357,8 @@ const ColumnsSection = (props) => {
339
357
  });
340
358
  };
341
359
  const visibleIds = layout.TableColumns.filter((colId) => {
342
- return layout.ColumnVisibility?.[colId] !== false;
360
+ return (layout.ColumnVisibility?.[colId] !== false &&
361
+ adaptable.api.columnApi.isSelectionColumn(colId) === false);
343
362
  });
344
363
  const toLabel = (colId) => adaptable.api.columnApi.getFriendlyNameForColumnId(colId, layout);
345
364
  const toIdentifier = (colId) => colId;
@@ -378,7 +397,7 @@ const ColumnsSection = (props) => {
378
397
  noSelectionLabel: `No Columns Selected`,
379
398
  onChange: handleColumnsChange,
380
399
  onSelectAll: () => {
381
- props.onChange({
400
+ onChange({
382
401
  ...layout,
383
402
  ColumnVisibility: {},
384
403
  TableColumns: ColumnOrderAllColumns.map((col) => col.columnId),
@@ -38,7 +38,7 @@ const GridFilterSection = (props) => {
38
38
  Expression: expression,
39
39
  },
40
40
  });
41
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns().filter((c) => !c.isGeneratedPivotResultColumn), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
41
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
42
42
  return React.createElement("div", null, expressionEditorContent);
43
43
  };
44
44
  exports.GridFilterSection = GridFilterSection;
@@ -23,8 +23,8 @@ const RowGroupingSectionSummary = () => {
23
23
  React.createElement(Tag_1.Tag, null, "Row Grouping is not available in Tree Grids")));
24
24
  }
25
25
  return (React.createElement(rebass_1.Box, { display: 'flex', flexDirection: 'row' }, layout.RowGroupedColumns?.length ? (layout.RowGroupedColumns.map((columnId) => {
26
- return (React.createElement(rebass_1.Box, { mb: 2, mr: 2 },
27
- React.createElement(Tag_1.Tag, { key: columnId }, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))));
26
+ return (React.createElement(rebass_1.Box, { key: columnId, mb: 2, mr: 2 },
27
+ React.createElement(Tag_1.Tag, null, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))));
28
28
  })) : (React.createElement(Tag_1.Tag, null, "No Row Grouping"))));
29
29
  };
30
30
  exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
@@ -44,8 +44,8 @@ const RowGroupBehaviorSection = (props) => {
44
44
  }
45
45
  onChange(newLayout);
46
46
  } },
47
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Always open Layout with all Grouped Rows collapsed" }),
48
- React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Always open Layout with all Grouped Rows expanded" }),
47
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "Layout opens with all Grouped Rows always collapsed" }),
48
+ React.createElement(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "Layout opens with all Grouped Rows always expanded" }),
49
49
  React.createElement(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "Layout opens with all Grouped rows expanded, other than those collapsed when Layout last displayed" }),
50
50
  React.createElement(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "Layout opens with all Grouped rows collapsed, other than those expanded when Layout last displayed" }))));
51
51
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),t=e.__importStar(require("react")),r=require("../../components/Logo"),o=require("rebass"),n={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-text-on-defaultbackground)",background:"var(--ab-color-defaultbackground)"},i=e=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of t)if(e.style[r]===o)return!1;return!0},l=e=>{const l=t.useRef(null);return t.useEffect((()=>{const e=setInterval((()=>{l.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),i(l.current)||alert("It is not allowed to modify the Adaptable watermark."),l?.current?.style&&(l.current.style.border=n.border,l.current.style.padding=n.padding,l.current.style.fontWeight=`${n.fontWeight}`,l.current.style.margin=n.margin,l.current.style.fontSize=n.fontSize,l.current.style.color=n.color,l.current.style.background=n.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")}),5e3);return()=>clearTimeout(e)}),[]),t.createElement(o.Flex,{style:n,ref:l},t.createElement(r.Logo,{style:{marginRight:10}}),t.createElement("div",null,e.children))};exports.LicenseWatermark=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),t=e.__importStar(require("react")),r=require("../../components/Logo"),o=require("rebass"),n={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-text-on-defaultbackground)",background:"var(--ab-color-defaultbackground)"},i=e=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of t)if(e.style[r]===o)return!1;return!0},l=e=>{const l=t.useRef(null);return t.useEffect(()=>{const e=setInterval(()=>{l.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),i(l.current)||alert("It is not allowed to modify the Adaptable watermark."),l?.current?.style&&(l.current.style.border=n.border,l.current.style.padding=n.padding,l.current.style.fontWeight=`${n.fontWeight}`,l.current.style.margin=n.margin,l.current.style.fontSize=n.fontSize,l.current.style.color=n.color,l.current.style.background=n.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")},5e3);return()=>clearTimeout(e)},[]),t.createElement(o.Flex,{style:n,ref:l},t.createElement(r.Logo,{style:{marginRight:10}}),t.createElement("div",null,e.children))};exports.LicenseWatermark=l;
@@ -32,6 +32,6 @@ const NamedQueryExpressionWizardSection = (props) => {
32
32
  const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
33
33
  return (React.createElement(ExpressionEditor_1.ExpressionEditor, { allowSaveNamedQuery: false, showQueryBuilder: true, type: 'boolean', module: moduleInfo.ModuleName, value: data.BooleanExpression, onChange: (BooleanExpression) => {
34
34
  props.onChange({ ...data, BooleanExpression });
35
- }, initialData: initialData, columns: api.columnApi.getQueryableColumns(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
35
+ }, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }));
36
36
  };
37
37
  exports.NamedQueryExpressionWizardSection = NamedQueryExpressionWizardSection;
@@ -16,12 +16,13 @@ const QuickSearchInput = (props) => {
16
16
  const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
17
17
  const dispatch = (0, react_redux_1.useDispatch)();
18
18
  const onRunQuickSearch = react_1.default.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
19
+ const isServerSideRowModel = adaptable.api.gridApi.getAgGridRowModelType() === 'serverSide';
19
20
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)({
20
21
  QuickSearchText,
21
22
  onRunQuickSearch,
22
23
  });
23
- return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, join_1.default)('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: react_1.default.createElement(rebass_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
24
+ return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, join_1.default)('ab-DashboardToolbar__QuickSearch__text', props.className), value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: props.width ?? '10rem' }, actionTools: isServerSideRowModel ? null : (react_1.default.createElement(rebass_1.Box, { display: "flex", flexDirection: "row", alignItems: "center", flex: 'none' },
24
25
  react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Previous Match', icon: "arrow-up", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoPreviousMatch() }),
25
- react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() })) }));
26
+ react_1.default.createElement(SimpleButton_1.default, { "aria-label": 'Next Match', icon: "arrow-down", px: 0, py: 0, mr: 1, disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() }))) }));
26
27
  };
27
28
  exports.QuickSearchInput = QuickSearchInput;
@@ -6,7 +6,7 @@ interface QuickSearchPopupProps extends ModuleViewPopupProps<any> {
6
6
  QuickSearchText: string;
7
7
  QuickSearchStyle: AdaptableStyle;
8
8
  onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
9
- onSetStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetStyleAction;
9
+ onSetMatchingCellStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetMatchingCellStyleAction;
10
10
  }
11
11
  export declare const QuickSearchPopup: import("react-redux").ConnectedComponent<(props: QuickSearchPopupProps) => React.JSX.Element, {
12
12
  [x: string]: any;
@@ -15,6 +15,7 @@ const CheckBox_1 = require("../../components/CheckBox");
15
15
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
16
16
  const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
17
17
  const QuickSearchInput_1 = require("./QuickSearchInput");
18
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
18
19
  const QuickSearchPopupComponent = (props) => {
19
20
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
20
21
  const [state, setState] = (0, react_1.useState)({
@@ -23,7 +24,7 @@ const QuickSearchPopupComponent = (props) => {
23
24
  });
24
25
  const onUpdateStyle = (style) => {
25
26
  setState({ ...state, EditedStyle: style });
26
- props.onSetStyle(style);
27
+ props.onSetMatchingCellStyle(style);
27
28
  };
28
29
  const onQuickSearchBehaviourChange = (checked) => {
29
30
  setState({ ...state, RunQueryAfterQuickSearch: checked });
@@ -37,21 +38,23 @@ const QuickSearchPopupComponent = (props) => {
37
38
  React.createElement(Panel_1.default, { header: props.api.internalApi.getCorrectEnglishVariant('Behaviour'), style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 3, marginLeft: 2, marginRight: 2 },
38
39
  ' ',
39
40
  React.createElement(rebass_1.Flex, { flexDirection: "column" },
41
+ React.createElement(HelpBlock_1.default, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Filters the Grid to only show rows with matching cells; use with care as can cause performance issues"),
42
+ ' ',
40
43
  React.createElement(FormLayout_1.default, { columns: [1, 2] },
41
44
  React.createElement(FormLayout_1.FormRow, null,
42
45
  React.createElement(CheckBox_1.CheckBox, { "data-name": "filter-quick-search-results", value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))))),
43
- React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
46
+ React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, headerText: 'Cell Matching Style', api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
44
47
  };
45
48
  function mapStateToProps(state, ownProps) {
46
49
  return {
47
50
  QuickSearchText: state.QuickSearch.QuickSearchText,
48
- QuickSearchStyle: state.QuickSearch.Style,
51
+ QuickSearchStyle: state.QuickSearch.CellMatchStyle,
49
52
  };
50
53
  }
51
54
  function mapDispatchToProps(dispatch) {
52
55
  return {
53
56
  onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(quickSearchText)),
54
- onSetStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetStyle(style)),
57
+ onSetMatchingCellStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style)),
55
58
  };
56
59
  }
57
60
  exports.QuickSearchPopup = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(QuickSearchPopupComponent);
@@ -453,7 +453,7 @@ class AdaptableAgGrid {
453
453
  this.updateColumnModelAndRefreshGrid();
454
454
  }
455
455
  const layoutModelForApply = (0, LayoutHelpers_1.layoutStateToLayoutModel)(currentLayout);
456
- this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues);
456
+ this.layoutManager.applyRowGroupValues(layoutModelForApply.RowGroupValues, layoutModelForApply.RowGroupedColumns);
457
457
  this.layoutManager.applyColumnGroupCollapseExpandState(layoutModelForApply);
458
458
  this.autoSizeLayoutIfNeeded();
459
459
  this.ModuleService.createModuleUIItems();
@@ -1326,12 +1326,12 @@ You need to define at least one Layout!`);
1326
1326
  this.autoSizeLayoutIfNeeded();
1327
1327
  }));
1328
1328
  /**
1329
- * Use Case: A format column that has ColumnGroupState needs to be re-evaluated
1329
+ * Use Case: A format column that has ColumnGroupScope needs to be re-evaluated
1330
1330
  * whenever a column group is expanded or collapsed
1331
1331
  */
1332
1332
  this.agGridAdapter.getAgGridApi().addEventListener('columnGroupOpened', (this.listenerColumnGroupOpened = () => {
1333
1333
  if (this.api.formatColumnApi.getActiveFormatColumns().some((fc) => {
1334
- return fc.ColumnGroupState != null;
1334
+ return fc.ColumnGroupScope != null;
1335
1335
  })) {
1336
1336
  this.updateColumnModelAndRefreshGrid();
1337
1337
  }
@@ -2018,7 +2018,7 @@ You need to define at least one Layout!`);
2018
2018
  layout = this.api.layoutApi.getCurrentLayout();
2019
2019
  }
2020
2020
  const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
2021
- this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues);
2021
+ this.layoutManager.applyRowGroupValues(layoutModel.RowGroupValues, layoutModel.RowGroupedColumns);
2022
2022
  }
2023
2023
  isGroupRowNode(rowNode) {
2024
2024
  if (!rowNode) {
@@ -3111,12 +3111,23 @@ You need to define at least one Layout!`);
3111
3111
  (0, LayoutHelpers_1.checkForDuplicateColumns)(layout);
3112
3112
  const isLayoutSwitch = this._prevLayout && layout.Name != this._prevLayout.Name;
3113
3113
  let shouldUpdateExpandState = isLayoutSwitch;
3114
- if (!isLayoutSwitch &&
3115
- this._prevLayout &&
3116
- layout.RowGroupValues?.RowGroupDefaultBehavior &&
3117
- this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3118
- layout.RowGroupValues?.RowGroupDefaultBehavior) {
3119
- shouldUpdateExpandState = true;
3114
+ if (!isLayoutSwitch && this._prevLayout) {
3115
+ if (layout.RowGroupValues?.RowGroupDefaultBehavior &&
3116
+ this._prevLayout?.RowGroupValues?.RowGroupDefaultBehavior !=
3117
+ layout.RowGroupValues?.RowGroupDefaultBehavior) {
3118
+ shouldUpdateExpandState = true;
3119
+ }
3120
+ else {
3121
+ const prevLayoutExceptionGroupKeys = (0, LayoutHelpers_1.getLayoutRowGroupValuesExceptionGroupKeys)(this._prevLayout)
3122
+ .flat()
3123
+ .join(',');
3124
+ const currentLayoutExceptionGroupKeys = (0, LayoutHelpers_1.getLayoutRowGroupValuesExceptionGroupKeys)(layout)
3125
+ .flat()
3126
+ .join(',');
3127
+ if (prevLayoutExceptionGroupKeys !== currentLayoutExceptionGroupKeys) {
3128
+ shouldUpdateExpandState = true;
3129
+ }
3130
+ }
3120
3131
  }
3121
3132
  this._prevLayout = layout;
3122
3133
  const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
@@ -429,6 +429,7 @@ class AgGridAdapter {
429
429
  const isFdc3MainActionColumn = this.adaptableApi.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
430
430
  let friendlyName;
431
431
  const isGeneratedRowGroupColumn = columnApi.isAutoRowGroupColumn(ColumnId);
432
+ const isGeneratedSelectionColumn = columnApi.isSelectionColumn(ColumnId);
432
433
  const isGeneratedPivotResultColumn = columnApi.isPivotResultColumn(ColumnId) && !agGridColumn.isPrimary();
433
434
  const colExists = columnApi.doesColumnExist(ColumnId) ||
434
435
  isGeneratedRowGroupColumn ||
@@ -468,7 +469,7 @@ class AgGridAdapter {
468
469
  colDef.lockVisible === true &&
469
470
  colDef.suppressColumnsToolPanel === true &&
470
471
  colDef.suppressFiltersToolPanel === true;
471
- const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn;
472
+ const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn || isGeneratedSelectionColumn;
472
473
  const abColumn = {
473
474
  Uuid: (0, Uuid_1.createUuid)(),
474
475
  isTreeColumn,
@@ -495,6 +496,7 @@ class AgGridAdapter {
495
496
  hideable: this.isColumnHideable(colDef),
496
497
  isGrouped: isGenerated ? false : this.isColumnRowGrouped(colDef),
497
498
  isGeneratedRowGroupColumn,
499
+ isGeneratedSelectionColumn,
498
500
  isGeneratedPivotResultColumn,
499
501
  isFixed: this.isColumnFixed(colDef),
500
502
  pinned: this.getColumnPinnedPosition(colDef),
@@ -680,6 +682,9 @@ class AgGridAdapter {
680
682
  this.adaptableApi.columnApi.isAutoRowGroupColumn(colDef.colId)) {
681
683
  return false;
682
684
  }
685
+ if (this.adaptableApi.columnApi.isSelectionColumn(colDef.colId)) {
686
+ return false;
687
+ }
683
688
  if (colDef.lockVisible != null && colDef.lockVisible == true) {
684
689
  return false;
685
690
  }
@@ -36,6 +36,7 @@ export declare class AgGridColumnAdapter {
36
36
  private setupColumnValueSetter;
37
37
  private setupColumnComparator;
38
38
  private setupColumnGetFindText;
39
+ private getCellSearchText;
39
40
  private isCellSearchable;
40
41
  private isQuickSearchActive;
41
42
  private getEditableCellClass;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgGridColumnAdapter = exports.getEditorForColumnDataType = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
5
6
  const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
6
7
  const FilterWrapper_1 = require("./FilterWrapper");
7
8
  const FloatingFilterWrapper_1 = require("./FloatingFilterWrapper");
@@ -92,12 +93,16 @@ class AgGridColumnAdapter {
92
93
  }
93
94
  shouldSkipColumn(colId) {
94
95
  /**
95
- * This skips columns like `ag-Grid-SelectionColumn` and possibly other columns
96
- * that ag grid will implement in the future
96
+ * This skips special columns that ag grid will likely implement in the future
97
97
  *
98
- * BUT DOES NOT SKIP GROUP COLUMNS!!!
98
+ * BUT DOES NOT SKIP GROUP COLUMNS or SELECTION COLUMNS!!!
99
+ *
100
+ * It's probably here for historical reasons - previously it used to skip the selection column
101
+ * but now it's not skipping it anymore
99
102
  */
100
- return colId.startsWith('ag-Grid-') && !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId);
103
+ return (colId.startsWith('ag-Grid-') &&
104
+ !this.adaptableApi.columnApi.isAutoRowGroupColumn(colId) &&
105
+ !this.adaptableApi.columnApi.isSelectionColumn(colId));
101
106
  }
102
107
  setupColumns() {
103
108
  const pivotMode = this.agGridApi.isPivotMode();
@@ -157,10 +162,8 @@ class AgGridColumnAdapter {
157
162
  setupColumnCellClass({ col, colId, abColumn }) {
158
163
  this.setColDefProperty(col, 'cellClass', (userCellClass) => {
159
164
  const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
160
- const quickSearchStyleClassName = this.adaptableApi.quickSearchApi.getQuickSearchStyle().ClassName;
161
165
  const quickSearchTextMatchStyle = this.getQuickSearchTextMatchStyle();
162
166
  const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
163
- const hasQuickSearchStyleClassName = StringExtensions_1.default.IsNotNullOrEmpty(quickSearchStyleClassName);
164
167
  const cellClass = (params) => {
165
168
  const gridCell = this.adaptableApi.gridApi.getGridCellFromRowNode(params.node, abColumn.columnId);
166
169
  if (!gridCell.column) {
@@ -187,7 +190,7 @@ class AgGridColumnAdapter {
187
190
  !hasStyledColumn && formatColumns.length
188
191
  ? this.getFormatColumnCellClass(formatColumns, abColumn, params)
189
192
  : null,
190
- isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
193
+ // isQuickSearchActive && hasQuickSearchStyleClassName ? quickSearchStyleClassName : null,
191
194
  isQuickSearchActive && (quickSearchTextMatchStyle || quickSearchCurrentTextMatchStyle)
192
195
  ? 'ab-QuickSearchFind'
193
196
  : null,
@@ -215,15 +218,17 @@ class AgGridColumnAdapter {
215
218
  const quickSearchCurrentTextMatchStyle = this.getQuickSearchCurrentTextMatchStyle();
216
219
  const textMatchStyle = quickSearchTextMatchStyle
217
220
  ? Object.entries(quickSearchTextMatchStyle).reduce((acc, [key, value]) => {
221
+ // needed as AG-Grid vanilla turns all CSS props
222
+ // to kebab, while AG Grid React does not
218
223
  // @ts-ignore
219
- acc[`--ab-dynamic-${key}`] = value;
224
+ acc[`--ab-dynamic-${(0, kebabCase_1.default)(key)}`] = value;
220
225
  return acc;
221
226
  }, {})
222
227
  : undefined;
223
228
  const currentTextMatchStyle = quickSearchCurrentTextMatchStyle
224
229
  ? Object.entries(quickSearchCurrentTextMatchStyle).reduce((acc, [key, value]) => {
225
230
  // @ts-ignore
226
- acc[`--ab-dynamic-${key}`] = value;
231
+ acc[`--ab-dynamic-${(0, kebabCase_1.default)(key)}`] = value;
227
232
  return acc;
228
233
  }, {})
229
234
  : undefined;
@@ -690,18 +695,25 @@ class AgGridColumnAdapter {
690
695
  }
691
696
  const getCellSearchText = this.adaptableOptions.quickSearchOptions.getCellSearchText;
692
697
  if (getCellSearchText) {
693
- const quickSearchValue = this.adaptableApi.quickSearchApi.getQuickSearchValue();
694
- const quickSearchContext = {
695
- ...this.adaptableApi.internalApi.buildBaseContext(),
696
- gridCell,
697
- quickSearchValue,
698
- };
699
- return getCellSearchText(quickSearchContext);
698
+ return this.getCellSearchText(gridCell);
700
699
  }
701
700
  return userGetFindText?.(params) ?? gridCell.displayValue;
702
701
  };
703
702
  });
704
703
  }
704
+ getCellSearchText(gridCell) {
705
+ const getCellSearchText = this.adaptableOptions.quickSearchOptions.getCellSearchText;
706
+ if (getCellSearchText) {
707
+ const quickSearchValue = this.adaptableApi.quickSearchApi.getQuickSearchValue();
708
+ const quickSearchContext = {
709
+ ...this.adaptableApi.internalApi.buildBaseContext(),
710
+ gridCell,
711
+ quickSearchValue,
712
+ };
713
+ return getCellSearchText(quickSearchContext);
714
+ }
715
+ return gridCell.displayValue;
716
+ }
705
717
  isCellSearchable(gridCell) {
706
718
  const isCellSearchableFn = this.adaptableOptions.quickSearchOptions.isCellSearchable;
707
719
  if (!gridCell.column) {
@@ -737,6 +749,16 @@ class AgGridColumnAdapter {
737
749
  if (!column) {
738
750
  return false;
739
751
  }
752
+ const isServerSideRowModel = this.adaptableApi.gridApi.getAgGridRowModelType() === 'serverSide';
753
+ if (isServerSideRowModel) {
754
+ const isCaseSensitive = this.adaptableOptions.quickSearchOptions.isQuickSearchCaseSensitive;
755
+ const cellDisplayValue = String(this.getCellSearchText(gridCell));
756
+ const displayValue = isCaseSensitive
757
+ ? cellDisplayValue
758
+ : cellDisplayValue.toLocaleLowerCase();
759
+ const searchText = isCaseSensitive ? quickSearchValue : quickSearchValue.toLocaleLowerCase();
760
+ return displayValue.indexOf(searchText) !== -1;
761
+ }
740
762
  return (this.agGridApi.findGetNumMatches({
741
763
  column,
742
764
  node: gridCell.rowNode,
@@ -833,7 +855,7 @@ class AgGridColumnAdapter {
833
855
  return classNames;
834
856
  }
835
857
  getQuickSearchCellStyle() {
836
- const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchStyle();
858
+ const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchCellMatchStyle();
837
859
  if (!quickSearchStyle || StringExtensions_1.default.IsNotNullOrEmpty(quickSearchStyle.ClassName)) {
838
860
  return undefined;
839
861
  }