@adaptabletools/adaptable 18.0.0-canary.16 → 18.0.0-canary.17
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.
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -3
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +0 -3
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +10 -1
- package/src/PredefinedConfig/Common/Menu.js +71 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +3 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/Strategy/AdaptableModuleBase.d.ts +6 -5
- package/src/Strategy/AdaptableModuleBase.js +9 -8
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +7 -6
- package/src/Strategy/CellSummaryModule.js +37 -12
- package/src/Strategy/ColumnFilterModule.js +8 -7
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/CommentModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -1
- package/src/Strategy/DashboardModule.js +8 -7
- package/src/Strategy/DataImportModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -4
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/LayoutModule.js +32 -23
- package/src/Strategy/NoteModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -0
- package/src/Strategy/StyledColumnModule.js +23 -5
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +124 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +26 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +26 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +7 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Datepicker/index.js +3 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +6 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/ISummaryService.d.ts +0 -17
- package/src/Utilities/Services/Interface/ISummaryService.js +0 -12
- package/src/Utilities/Services/SummaryService.d.ts +0 -10
- package/src/Utilities/Services/SummaryService.js +0 -17
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
|
|
2
1
|
import { ExpressionEvaluationError } from '../../parser/src/ExpressionEvaluationError';
|
|
3
|
-
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
4
2
|
import { SumArray } from '../Extensions/ArrayExtensions';
|
|
3
|
+
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
4
|
+
import { extractColumnParameter, extractColumnParameters, extractParameter, getNumericValue, handleColumnFunction, validateColumnType, } from './expressionFunctionUtils';
|
|
5
|
+
import isAfter from 'date-fns/isAfter';
|
|
6
|
+
import { parseDateValue } from '../Helpers/DateHelper';
|
|
5
7
|
export const aggregatedExpressionFunctions = [
|
|
6
8
|
'SUM',
|
|
7
9
|
'PERCENTAGE',
|
|
@@ -351,6 +353,7 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
351
353
|
return aggregatedValue;
|
|
352
354
|
},
|
|
353
355
|
done: (aggregatedValue) => {
|
|
356
|
+
var _a;
|
|
354
357
|
const sorted = [...aggregatedValue.entries()].sort(([aVal, aFreq], [bVal, bFreq]) => {
|
|
355
358
|
if (aFreq < bFreq) {
|
|
356
359
|
return 1;
|
|
@@ -362,7 +365,7 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
362
365
|
return aVal === bVal ? 0 : 1;
|
|
363
366
|
}
|
|
364
367
|
});
|
|
365
|
-
return sorted[0][0];
|
|
368
|
+
return (_a = sorted === null || sorted === void 0 ? void 0 : sorted[0]) === null || _a === void 0 ? void 0 : _a[0];
|
|
366
369
|
},
|
|
367
370
|
},
|
|
368
371
|
},
|
|
@@ -908,6 +911,124 @@ export const aggregatedScalarExpressionFunctions = {
|
|
|
908
911
|
examples: ['[col1]', 'COL("col1")'],
|
|
909
912
|
category: 'special',
|
|
910
913
|
},
|
|
914
|
+
OLDEST: {
|
|
915
|
+
handler(args, context) {
|
|
916
|
+
const minColumnParameter = extractColumnParameter('OLDEST', args);
|
|
917
|
+
const minColumnName = minColumnParameter.value;
|
|
918
|
+
validateColumnType(minColumnName, ['Date'], 'OLDEST', context.adaptableApi);
|
|
919
|
+
const groupByParameter = extractParameter('OLDEST', 'operand', ['GROUP_BY'], args, {
|
|
920
|
+
isOptional: true,
|
|
921
|
+
});
|
|
922
|
+
const aggregationExpressionEvaluation = {
|
|
923
|
+
aggregationParams: {
|
|
924
|
+
reducers: {
|
|
925
|
+
OLDEST: {
|
|
926
|
+
name: 'OLDEST',
|
|
927
|
+
field: minColumnName,
|
|
928
|
+
initialValue: null,
|
|
929
|
+
reducer: (minValue, rowValue) => {
|
|
930
|
+
if (!minValue) {
|
|
931
|
+
return rowValue;
|
|
932
|
+
}
|
|
933
|
+
if (!rowValue) {
|
|
934
|
+
return minValue;
|
|
935
|
+
}
|
|
936
|
+
if (isAfter(parseDateValue(minValue), parseDateValue(rowValue))) {
|
|
937
|
+
return rowValue;
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
return minValue;
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
done: (minValue, arr) => {
|
|
944
|
+
if (minValue !== null) {
|
|
945
|
+
return minValue;
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
},
|
|
949
|
+
},
|
|
950
|
+
},
|
|
951
|
+
rowFilterFn: context.filterFn,
|
|
952
|
+
getRowNodes: context.getRowNodes,
|
|
953
|
+
};
|
|
954
|
+
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
955
|
+
const result = {
|
|
956
|
+
name: 'OLDEST',
|
|
957
|
+
type: 'aggregationScalar',
|
|
958
|
+
value: aggregationExpressionEvaluation,
|
|
959
|
+
};
|
|
960
|
+
return result;
|
|
961
|
+
},
|
|
962
|
+
description: 'Aggregates a column over multiple rows by computing the minimum of the column values\nOptionally the aggregation may be computed within provided individual groups',
|
|
963
|
+
signatures: [
|
|
964
|
+
'OLDEST( [colName] )',
|
|
965
|
+
'OLDEST( COL(name: string))',
|
|
966
|
+
'OLDEST( [colNameA], GROUP_BY( [colNameB] ))',
|
|
967
|
+
'OLDEST( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
968
|
+
],
|
|
969
|
+
examples: ['OLDEST([colA])', 'OLDEST([colA], GROUP_BY([colB]))'],
|
|
970
|
+
category: 'aggregation',
|
|
971
|
+
inputs: ['date'],
|
|
972
|
+
},
|
|
973
|
+
YOUNGEST: {
|
|
974
|
+
handler(args, context) {
|
|
975
|
+
const minColumnParameter = extractColumnParameter('YOUNGEST', args);
|
|
976
|
+
const minColumnName = minColumnParameter.value;
|
|
977
|
+
validateColumnType(minColumnName, ['Date'], 'YOUNGEST', context.adaptableApi);
|
|
978
|
+
const groupByParameter = extractParameter('YOUNGEST', 'operand', ['GROUP_BY'], args, {
|
|
979
|
+
isOptional: true,
|
|
980
|
+
});
|
|
981
|
+
const aggregationExpressionEvaluation = {
|
|
982
|
+
aggregationParams: {
|
|
983
|
+
reducers: {
|
|
984
|
+
YOUNGEST: {
|
|
985
|
+
name: 'YOUNGEST',
|
|
986
|
+
field: minColumnName,
|
|
987
|
+
initialValue: null,
|
|
988
|
+
reducer: (minValue, rowValue) => {
|
|
989
|
+
if (!minValue) {
|
|
990
|
+
return rowValue;
|
|
991
|
+
}
|
|
992
|
+
if (!rowValue) {
|
|
993
|
+
return minValue;
|
|
994
|
+
}
|
|
995
|
+
if (isAfter(parseDateValue(minValue), parseDateValue(rowValue))) {
|
|
996
|
+
return minValue;
|
|
997
|
+
}
|
|
998
|
+
else {
|
|
999
|
+
return rowValue;
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
done: (minValue, arr) => {
|
|
1003
|
+
if (minValue !== null) {
|
|
1004
|
+
return minValue;
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
rowFilterFn: context.filterFn,
|
|
1011
|
+
getRowNodes: context.getRowNodes,
|
|
1012
|
+
};
|
|
1013
|
+
addGroupByParams(groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value, aggregationExpressionEvaluation);
|
|
1014
|
+
const result = {
|
|
1015
|
+
name: 'YOUNGEST',
|
|
1016
|
+
type: 'aggregationScalar',
|
|
1017
|
+
value: aggregationExpressionEvaluation,
|
|
1018
|
+
};
|
|
1019
|
+
return result;
|
|
1020
|
+
},
|
|
1021
|
+
description: 'Aggregates a column over multiple rows by computing the minimum of the column values\nOptionally the aggregation may be computed within provided individual groups',
|
|
1022
|
+
signatures: [
|
|
1023
|
+
'YOUNGEST( [colName] )',
|
|
1024
|
+
'YOUNGEST( COL(name: string))',
|
|
1025
|
+
'YOUNGEST( [colNameA], GROUP_BY( [colNameB] ))',
|
|
1026
|
+
'YOUNGEST( COL(nameA: string), GROUP_BY( COL(nameB: string)))',
|
|
1027
|
+
],
|
|
1028
|
+
examples: ['YOUNGEST([colA])', 'YOUNGEST([colA], GROUP_BY([colB]))'],
|
|
1029
|
+
category: 'aggregation',
|
|
1030
|
+
inputs: ['date'],
|
|
1031
|
+
},
|
|
911
1032
|
};
|
|
912
1033
|
const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, context) => {
|
|
913
1034
|
const aggregationEvaluation = aggregationParameter.value;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as Redux from 'redux';
|
|
2
2
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
3
|
-
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
3
|
+
import { AdaptableMenuItem, AdaptableMenuItemName } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableIcon, AdaptableSystemIconName } from '../PredefinedConfig/Common/AdaptableIcon';
|
|
6
6
|
export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
7
|
-
constructor(label: string, module: AdaptableModule, reduxAction: Redux.Action, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
7
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, reduxAction: Redux.Action, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
8
|
+
name: AdaptableMenuItemName;
|
|
8
9
|
reduxAction: Redux.Action;
|
|
9
10
|
label: string;
|
|
10
11
|
module: AdaptableModule;
|
|
@@ -12,7 +13,8 @@ export declare class MenuItemDoReduxAction implements AdaptableMenuItem {
|
|
|
12
13
|
icon: AdaptableIcon;
|
|
13
14
|
}
|
|
14
15
|
export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
15
|
-
constructor(label: string, module: AdaptableModule, clickFunction: () => void, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
16
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, clickFunction: () => void, icon: AdaptableSystemIconName, isVisible: boolean);
|
|
17
|
+
name: AdaptableMenuItemName;
|
|
16
18
|
onClick: () => void;
|
|
17
19
|
label: string;
|
|
18
20
|
module: AdaptableModule;
|
|
@@ -20,7 +22,8 @@ export declare class MenuItemDoClickFunction implements AdaptableMenuItem {
|
|
|
20
22
|
icon: AdaptableIcon;
|
|
21
23
|
}
|
|
22
24
|
export declare class MenuItemShowPopup implements AdaptableMenuItem {
|
|
23
|
-
constructor(label: string, module: AdaptableModule, componentName: string, icon: AdaptableSystemIconName, isVisible: boolean, popupParams?: ModuleParams);
|
|
25
|
+
constructor(name: AdaptableMenuItemName, label: string, module: AdaptableModule, componentName: string, icon: AdaptableSystemIconName, isVisible: boolean, popupParams?: ModuleParams);
|
|
26
|
+
name: AdaptableMenuItemName;
|
|
24
27
|
reduxAction: Redux.Action;
|
|
25
28
|
label: string;
|
|
26
29
|
module: AdaptableModule;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as PopupRedux from '../Redux/ActionsReducers/PopupRedux';
|
|
2
2
|
// A menu item which performs a Redux Action when it is clicke
|
|
3
3
|
export class MenuItemDoReduxAction {
|
|
4
|
-
constructor(label, module, reduxAction, icon, isVisible) {
|
|
4
|
+
constructor(name, label, module, reduxAction, icon, isVisible) {
|
|
5
|
+
this.name = name;
|
|
5
6
|
this.label = label;
|
|
6
7
|
this.module = module;
|
|
7
8
|
this.isVisible = isVisible;
|
|
@@ -12,7 +13,8 @@ export class MenuItemDoReduxAction {
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
export class MenuItemDoClickFunction {
|
|
15
|
-
constructor(label, module, clickFunction, icon, isVisible) {
|
|
16
|
+
constructor(name, label, module, clickFunction, icon, isVisible) {
|
|
17
|
+
this.name = name;
|
|
16
18
|
this.label = label;
|
|
17
19
|
this.module = module;
|
|
18
20
|
this.isVisible = isVisible;
|
|
@@ -24,7 +26,8 @@ export class MenuItemDoClickFunction {
|
|
|
24
26
|
}
|
|
25
27
|
// A menu item which shows a popup screen when it is clieked
|
|
26
28
|
export class MenuItemShowPopup {
|
|
27
|
-
constructor(label, module, componentName, icon, isVisible, popupParams) {
|
|
29
|
+
constructor(name, label, module, componentName, icon, isVisible, popupParams) {
|
|
30
|
+
this.name = name;
|
|
28
31
|
this.label = label;
|
|
29
32
|
this.module = module;
|
|
30
33
|
this.isVisible = isVisible;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SystemLicenseDisablePersistence as e,SystemLicenseShowWatermark as a}from"../../../Redux/ActionsReducers/SystemRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import
|
|
1
|
+
import{SystemLicenseDisablePersistence as e,SystemLicenseShowWatermark as a}from"../../../Redux/ActionsReducers/SystemRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",d=10,p=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",(()=>{requestAnimationFrame((()=>{this.init()}))}))}init(){let e=null;if(this.licenseKey)try{e=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const i=new Date;i.setHours(0,0,0,0);let n=0;e instanceof Error||!(null==e?void 0:e.end)||(n=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-i.getTime())/p),n=s(n,0,1/0));let h="",E="";!e||e instanceof Error||!e.appName||e.appName==r||(h=e.appName,E=" for application [APP_NAME]");const I=(e,a=o,t=c,i=n,s=h)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",s).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(I("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(I("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(I("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(I("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(n<=d)this.adaptable.logger.consoleLogByMessageType(I(`This AdapTable license${E} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{l()&&this.adaptable.logger.consoleLogByMessageType(I(`Thank you for using a valid AdapTable license${E}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(I(`This AdapTable license${E} 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(I(`This AdapTable license${E} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
|
|
@@ -39,7 +39,7 @@ export const AdaptableObjectListItemView = (props) => {
|
|
|
39
39
|
var _a;
|
|
40
40
|
let labelEl = tag.label;
|
|
41
41
|
if (typeof tag.label === 'function') {
|
|
42
|
-
labelEl = React.createElement(tag.label, { data: props.abObject });
|
|
42
|
+
labelEl = React.createElement(tag.label, { key: index, data: props.abObject });
|
|
43
43
|
}
|
|
44
44
|
labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
|
|
45
45
|
return (React.createElement(Flex, { "data-name": tag.name, key: `${index}-${tag.name}`, mb: 2, className: `${baseClassName}__row` },
|
|
@@ -129,5 +129,8 @@ export const AdaptableObjectListItem = (props) => {
|
|
|
129
129
|
};
|
|
130
130
|
export const AdaptableObjectList = (props) => {
|
|
131
131
|
var _a;
|
|
132
|
-
return (React.createElement("ul", { className: LIST_BASE_CLASS_NAME }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) =>
|
|
132
|
+
return (React.createElement("ul", { className: LIST_BASE_CLASS_NAME }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
|
|
133
|
+
var _a;
|
|
134
|
+
return (React.createElement(AdaptableObjectListItem, Object.assign({ key: (_a = item.abObject.Uuid) !== null && _a !== void 0 ? _a : index, data: item, module: props.module }, props.itemProps)));
|
|
135
|
+
})));
|
|
133
136
|
};
|
|
@@ -148,7 +148,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
if (predicateInput.type === 'date' && !showDatePicker) {
|
|
151
|
-
return (React.createElement(AdaptableDateInlineInput, { value: value, onKeyDownCapture: onKeyDownCapture, onChange: (value) => this.changeColumnPredicateInput(value, index) }));
|
|
151
|
+
return (React.createElement(AdaptableDateInlineInput, { value: value, key: index, onKeyDownCapture: onKeyDownCapture, onChange: (value) => this.changeColumnPredicateInput(value, index) }));
|
|
152
152
|
}
|
|
153
153
|
return (React.createElement(AdaptableInput, { disabled: this.isFilterDisabled(), key: index, type: predicateInput.type === 'number' ? 'text' : predicateInput.type,
|
|
154
154
|
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
@@ -62,7 +62,7 @@ export function ValueSelector(props) {
|
|
|
62
62
|
const label = !allowReorder ? preparedToLabel(option) : null;
|
|
63
63
|
const reorderable = typeof allowReorder === 'function' ? allowReorder(option) : allowReorder;
|
|
64
64
|
const renderNode = (props, dragHandleProps) => {
|
|
65
|
-
return (React.createElement(Flex, Object.assign({ className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props),
|
|
65
|
+
return (React.createElement(Flex, Object.assign({ className: `${baseClassName}__option`, alignItems: "center", mt: index ? 1 : 0, key: identifier !== null && identifier !== void 0 ? identifier : index, backgroundColor: 'primary', padding: 2, "data-index": index, "data-id": identifier, "data-name": "option" }, props),
|
|
66
66
|
React.createElement(Flex, { flex: 1, flexDirection: "row", alignItems: "center" },
|
|
67
67
|
reorderable ? (React.createElement(Box, Object.assign({ mr: 3 }, dragHandleProps),
|
|
68
68
|
React.createElement(Icon, { name: "drag", style: { cursor: 'grab' } }))) : null,
|
|
@@ -14,7 +14,8 @@ import { AggregationsSection, AggregationsSectionSummary, isAggregationsSectionV
|
|
|
14
14
|
import { SortSection, SortSectionSummary } from './sections/SortSection';
|
|
15
15
|
import { FilterSection, FilterSectionSummary, isColumnFiltersValid, } from './sections/FilterSection';
|
|
16
16
|
import { GridFilterSection, GridFilterSectionSummary, isGridFiltersValid, } from './sections/GridFilterSection';
|
|
17
|
-
import { RowSummarySection } from './sections/RowSummarySection';
|
|
17
|
+
import { areSummaryRowsValid, RowSummarySection } from './sections/RowSummarySection';
|
|
18
|
+
import { WEIGHTED_AVERAGE_AGGREATED_FUNCTION } from '../../../PredefinedConfig/Common/RowSummary';
|
|
18
19
|
export const LayoutWizard = (props) => {
|
|
19
20
|
var _a, _b;
|
|
20
21
|
const dispatch = useDispatch();
|
|
@@ -103,6 +104,7 @@ export const LayoutWizard = (props) => {
|
|
|
103
104
|
{
|
|
104
105
|
title: 'Row Groups',
|
|
105
106
|
isVisible: () => layoutSupportedFeatures.RowGroupedColumns,
|
|
107
|
+
isValid: areSummaryRowsValid,
|
|
106
108
|
details: 'Configure Row Grouping',
|
|
107
109
|
renderSummary: () => React.createElement(RowGroupingSectionSummary, null),
|
|
108
110
|
render: () => (React.createElement(Box, { p: 2, style: { height: '100%' } },
|
|
@@ -115,7 +117,29 @@ export const LayoutWizard = (props) => {
|
|
|
115
117
|
renderSummary: () => React.createElement(AggregationsSectionSummary, null),
|
|
116
118
|
isValid: (data) => isAggregationsSectionValid(data),
|
|
117
119
|
render: () => (React.createElement(Box, { p: 2, style: { height: '100%' } },
|
|
118
|
-
React.createElement(AggregationsSection, { onChange:
|
|
120
|
+
React.createElement(AggregationsSection, { onChange: (layout) => {
|
|
121
|
+
let newLayout = cloneObject(layout);
|
|
122
|
+
// if we do not have an weighted avg col, we need to clear the row summary if one exists
|
|
123
|
+
if (newLayout.RowSummaries) {
|
|
124
|
+
newLayout.RowSummaries = newLayout.RowSummaries.map((rowSummary) => {
|
|
125
|
+
return Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.entries(rowSummary.ColumnsMap).reduce((acc, [columnId, aggFunc]) => {
|
|
126
|
+
if (
|
|
127
|
+
// see if it is weighted avg
|
|
128
|
+
aggFunc === WEIGHTED_AVERAGE_AGGREATED_FUNCTION &&
|
|
129
|
+
// see if we have a weight in the agg columns
|
|
130
|
+
newLayout.AggregationColumns[columnId] &&
|
|
131
|
+
(typeof newLayout.AggregationColumns[columnId] !== 'object' ||
|
|
132
|
+
newLayout.AggregationColumns[columnId].weightColumnId)) {
|
|
133
|
+
// need to remove the row summary
|
|
134
|
+
return acc;
|
|
135
|
+
}
|
|
136
|
+
acc[columnId] = aggFunc;
|
|
137
|
+
return acc;
|
|
138
|
+
}, {}) });
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
setLayout(newLayout);
|
|
142
|
+
} }))),
|
|
119
143
|
},
|
|
120
144
|
{
|
|
121
145
|
title: 'Row Summaries',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Layout } from '../../../../../types';
|
|
3
|
+
export declare const areSummaryRowsValid: (layout: Layout) => true | string;
|
|
3
4
|
export declare const RowGroupingSectionSummary: React.FunctionComponent;
|
|
4
5
|
interface RowSummarySectionProps {
|
|
5
6
|
onChange: (data: Layout) => void;
|
|
@@ -6,14 +6,30 @@ import { Select } from '../../../../components/Select';
|
|
|
6
6
|
import SimpleButton from '../../../../components/SimpleButton';
|
|
7
7
|
import { Tabs } from '../../../../components/Tabs';
|
|
8
8
|
import { Tag } from '../../../../components/Tag';
|
|
9
|
+
import { summarySupportedExpressions, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } from '../../../../PredefinedConfig/Common/RowSummary';
|
|
9
10
|
import { mapColumnDataTypeToExpressionFunctionType } from '../../../../Utilities/adaptableQlUtils';
|
|
10
11
|
import { LayoutModuleId } from '../../../../Utilities/Constants/ModuleConstants';
|
|
11
|
-
import { summarySupportedExpressions } from '../../../../Utilities/Services/Interface/ISummaryService';
|
|
12
12
|
import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
|
|
13
13
|
import { useAdaptable } from '../../../AdaptableContext';
|
|
14
14
|
import { ValueSelector } from '../../../Components/ValueSelector';
|
|
15
15
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
16
16
|
import { columnFilter } from './Utilities';
|
|
17
|
+
export const areSummaryRowsValid = (layout) => {
|
|
18
|
+
var _a;
|
|
19
|
+
if (!layout.RowSummaries)
|
|
20
|
+
return true;
|
|
21
|
+
let valid = true;
|
|
22
|
+
(_a = layout.RowSummaries) === null || _a === void 0 ? void 0 : _a.find((rowSummary) => {
|
|
23
|
+
var _a;
|
|
24
|
+
for (const [_, fn] of Object.entries((_a = rowSummary.ColumnsMap) !== null && _a !== void 0 ? _a : {})) {
|
|
25
|
+
if (!fn) {
|
|
26
|
+
valid = 'All row summary columns must have an aggregation function.';
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return valid;
|
|
32
|
+
};
|
|
17
33
|
const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
|
|
18
34
|
const inputType = mapColumnDataTypeToExpressionFunctionType(columnType);
|
|
19
35
|
return Object.entries(availableScalarExpressions !== null && availableScalarExpressions !== void 0 ? availableScalarExpressions : {})
|
|
@@ -53,7 +69,7 @@ const RowSummaryEditor = ({ rowSummary, onChange, availableScalarExpressions, on
|
|
|
53
69
|
.getColumns()
|
|
54
70
|
.filter((column) => {
|
|
55
71
|
var _a, _b;
|
|
56
|
-
if (!['Number', 'String'].includes(column.dataType))
|
|
72
|
+
if (!['Number', 'String', 'Date'].includes(column.dataType))
|
|
57
73
|
return false;
|
|
58
74
|
return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
|
|
59
75
|
})
|
|
@@ -96,6 +112,14 @@ const RowSummaryEditor = ({ rowSummary, onChange, availableScalarExpressions, on
|
|
|
96
112
|
label: expression,
|
|
97
113
|
value: expression,
|
|
98
114
|
}));
|
|
115
|
+
// check out if this layout has a aggregation with wighted column
|
|
116
|
+
const aggregation = layout.AggregationColumns[column.columnId];
|
|
117
|
+
if (aggregation && typeof aggregation === 'object' && aggregation.weightedColumnId) {
|
|
118
|
+
expressionOptions.push({
|
|
119
|
+
label: 'WEIGHTERD_AVG',
|
|
120
|
+
value: WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
99
123
|
const expression = rowSummary.ColumnsMap[column.columnId];
|
|
100
124
|
return (React.createElement(Flex, null,
|
|
101
125
|
React.createElement(Flex, { mr: 2, alignItems: 'center' }, label),
|
|
@@ -26,7 +26,6 @@ import { RenderReactRootFn } from '../renderReactRoot';
|
|
|
26
26
|
import { AgGridOptionsService } from './AgGridOptionsService';
|
|
27
27
|
import { AgGridColumnAdapter } from './AgGridColumnAdapter';
|
|
28
28
|
import { RowEditService } from '../Utilities/Services/RowEditService';
|
|
29
|
-
import { ISummaryService } from '../Utilities/Services/Interface/ISummaryService';
|
|
30
29
|
export type AdaptableVariant = 'vanilla' | 'react' | 'angular';
|
|
31
30
|
export type AdaptableLifecycleState = 'initial' | 'preprocessOptions' | 'initAdaptableState' | 'setupAgGrid' | 'initAgGrid' | 'available' | 'ready' | 'preDestroyed';
|
|
32
31
|
type RenderAgGridFrameworkComponentResult = false | GridApi;
|
|
@@ -82,7 +81,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
82
81
|
RowEditService: RowEditService;
|
|
83
82
|
Fdc3Service: Fdc3Service;
|
|
84
83
|
CellPopupService: CellPopupService;
|
|
85
|
-
SummaryService: ISummaryService;
|
|
86
84
|
private LicenseService;
|
|
87
85
|
private ChartingService;
|
|
88
86
|
private ThemeService;
|
|
@@ -95,7 +95,6 @@ import { AdaptableUpgradeHelper } from '../migration/AdaptableUpgradeHelper';
|
|
|
95
95
|
import { ensurePortalElement } from '../components/Modal';
|
|
96
96
|
import { AdaptableLoadingScreen } from '../View/Components/Popups/AdaptableLoadingScreen';
|
|
97
97
|
import { createElement } from 'react';
|
|
98
|
-
import { SummaryService } from '../Utilities/Services/SummaryService';
|
|
99
98
|
import { removeUuidAndSource } from '../Utilities/Helpers/AdaptableHelper';
|
|
100
99
|
const RowNodeProto = RowNode.prototype;
|
|
101
100
|
const RowNode_dispatchLocalEvent = RowNodeProto.dispatchLocalEvent;
|
|
@@ -898,7 +897,7 @@ export class AdaptableAgGrid {
|
|
|
898
897
|
*/
|
|
899
898
|
// this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
900
899
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
|
|
901
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
900
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
902
901
|
const providedColumnTypes = original_columnTypes || {};
|
|
903
902
|
const gridOptionsColumnTypes = gridOptions.columnTypes || {};
|
|
904
903
|
const patchedColumnTypes = Object.assign(providedColumnTypes, {
|
|
@@ -915,6 +914,12 @@ export class AdaptableAgGrid {
|
|
|
915
914
|
abColDefTupleNumberArray: (_j = gridOptionsColumnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
|
|
916
915
|
abColDefObjectNumberArray: (_k = gridOptionsColumnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
|
|
917
916
|
});
|
|
917
|
+
const customColumnTypes = (_l = this.api.columnApi.getColumnTypes()) !== null && _l !== void 0 ? _l : [];
|
|
918
|
+
for (const customColumnType of customColumnTypes) {
|
|
919
|
+
if (!patchedColumnTypes[customColumnType]) {
|
|
920
|
+
patchedColumnTypes[customColumnType] = {};
|
|
921
|
+
}
|
|
922
|
+
}
|
|
918
923
|
if (patchedColumnTypes.abColDefNumber.cellEditor == undefined) {
|
|
919
924
|
patchedColumnTypes.abColDefNumber.cellEditor =
|
|
920
925
|
this.variant === 'react' ? ReactAdaptableNumberEditor : AdaptableNumberEditor;
|
|
@@ -1569,7 +1574,6 @@ export class AdaptableAgGrid {
|
|
|
1569
1574
|
this.AlertService = new AlertService(this.api);
|
|
1570
1575
|
this.TeamSharingService = new TeamSharingService(this.api);
|
|
1571
1576
|
this.Fdc3Service = new Fdc3Service(this.api);
|
|
1572
|
-
this.SummaryService = new SummaryService(this.api);
|
|
1573
1577
|
this.CellPopupService = new CellPopupService(this.api);
|
|
1574
1578
|
this.RowEditService = new RowEditService(this.api);
|
|
1575
1579
|
this.MetamodelService = new MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
@@ -6,12 +6,12 @@ import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core';
|
|
|
6
6
|
interface AdaptableNumberCellEditorParams extends ICellEditorParams {
|
|
7
7
|
/**
|
|
8
8
|
* Whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
|
|
9
|
-
* @
|
|
9
|
+
* @defaultValue true
|
|
10
10
|
*/
|
|
11
11
|
showClearButton: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Value to set for the cell, when the clear button is pressed
|
|
14
|
-
* @
|
|
14
|
+
* @defaultValue '' (empty string)
|
|
15
15
|
*/
|
|
16
16
|
emptyValue: string;
|
|
17
17
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { IAggFuncParams } from '@ag-grid-community/core';
|
|
2
|
-
import { CellSummaryOperationContext } from '../types';
|
|
3
2
|
export declare const getNumericValue: (input: unknown) => number | null;
|
|
4
3
|
export declare const weightedAverage: (params: IAggFuncParams, columnId: string, weightColumnId: string) => {
|
|
5
4
|
[x: string]: number | (() => number | "");
|
|
6
5
|
toString: () => number | "";
|
|
7
6
|
valueOf: () => number;
|
|
8
7
|
};
|
|
9
|
-
export declare const cellSummaryWeightedAverage: ({ numericColumns, selectedCellInfo, adaptableApi, }: CellSummaryOperationContext) => any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import FormatHelper from '../Utilities/Helpers/FormatHelper';
|
|
2
1
|
import toNumber from 'lodash/toNumber';
|
|
3
2
|
export const getNumericValue = (input) => {
|
|
4
3
|
if (typeof input === 'number') {
|
|
@@ -46,56 +45,3 @@ export const weightedAverage = (params, columnId, weightColumnId) => {
|
|
|
46
45
|
[weightColumnId]: weightedColumnValueSum,
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
|
-
export const cellSummaryWeightedAverage = ({ numericColumns, selectedCellInfo, adaptableApi, }) => {
|
|
50
|
-
if ((numericColumns === null || numericColumns === void 0 ? void 0 : numericColumns.length) != 1) {
|
|
51
|
-
return '';
|
|
52
|
-
}
|
|
53
|
-
const columnId = numericColumns[0];
|
|
54
|
-
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
55
|
-
const selectedColumnAgg = currentLayout.AggregationColumns[columnId];
|
|
56
|
-
if (!selectedColumnAgg ||
|
|
57
|
-
typeof selectedColumnAgg !== 'object' ||
|
|
58
|
-
selectedColumnAgg.type !== 'weightedAverage') {
|
|
59
|
-
return '';
|
|
60
|
-
}
|
|
61
|
-
const weightedColumnId = selectedColumnAgg.weightedColumnId;
|
|
62
|
-
if (weightedColumnId) {
|
|
63
|
-
let sumWeightedValue = 0;
|
|
64
|
-
let sumPrimaryValues = 0;
|
|
65
|
-
let isValid = true;
|
|
66
|
-
selectedCellInfo.gridCells.forEach((gridCell) => {
|
|
67
|
-
if (adaptableApi.gridApi.isGroupRowNode(gridCell.rowNode)) {
|
|
68
|
-
isValid = false;
|
|
69
|
-
}
|
|
70
|
-
if (isValid) {
|
|
71
|
-
const weightedGridCell = adaptableApi.gridApi.getGridCellFromRowNode(gridCell.rowNode, weightedColumnId);
|
|
72
|
-
sumWeightedValue += weightedGridCell.rawValue;
|
|
73
|
-
sumPrimaryValues += weightedGridCell.rawValue * gridCell.normalisedValue;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
if (!isValid) {
|
|
77
|
-
return '';
|
|
78
|
-
}
|
|
79
|
-
const abColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
80
|
-
if (!abColumn) {
|
|
81
|
-
return '';
|
|
82
|
-
}
|
|
83
|
-
const activeFormatColumnsWithDisplayFormat = adaptableApi.formatColumnApi.internalApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
|
|
84
|
-
if (activeFormatColumnsWithDisplayFormat.length === 1 &&
|
|
85
|
-
activeFormatColumnsWithDisplayFormat[0].DisplayFormat.Formatter === 'NumberFormatter') {
|
|
86
|
-
// there only one FormatColumn on this column, so we will use it to format the aggregated value
|
|
87
|
-
const [singleActiveFormatColumnsWithDisplayFormat] = activeFormatColumnsWithDisplayFormat;
|
|
88
|
-
const options = singleActiveFormatColumnsWithDisplayFormat
|
|
89
|
-
.DisplayFormat.Options;
|
|
90
|
-
if (options) {
|
|
91
|
-
return FormatHelper.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
// there are multiple (possibly conflicting) FormatColumns for this column, we cannot know which to use
|
|
96
|
-
return FormatHelper.NumberFormatter(sumPrimaryValues / sumWeightedValue, {
|
|
97
|
-
FractionDigits: 2,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
@@ -100,7 +100,9 @@ export const Datepicker = React.forwardRef((props, ref) => {
|
|
|
100
100
|
setVisible(true);
|
|
101
101
|
}
|
|
102
102
|
} }),
|
|
103
|
-
React.createElement(AdaptableDateInlineInput, { ref: ref, value: inputValue,
|
|
103
|
+
React.createElement(AdaptableDateInlineInput, { ref: ref, value: inputValue,
|
|
104
|
+
// We do not want to show the format when the date-picker is visible
|
|
105
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : '', onChange: (value) => {
|
|
104
106
|
const date = new Date(value);
|
|
105
107
|
if (isValid(date)) {
|
|
106
108
|
updateValue(date);
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "18.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1711543401633 || Date.now(),
|
|
4
|
+
VERSION: "18.0.0-canary.17" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -563,6 +563,12 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
563
563
|
desc: string;
|
|
564
564
|
isOpt?: undefined;
|
|
565
565
|
ref?: undefined;
|
|
566
|
+
} | {
|
|
567
|
+
name: string;
|
|
568
|
+
kind: string;
|
|
569
|
+
desc: string;
|
|
570
|
+
ref: string;
|
|
571
|
+
isOpt?: undefined;
|
|
566
572
|
} | {
|
|
567
573
|
name: string;
|
|
568
574
|
kind: string;
|