@adaptabletools/adaptable-cjs 18.0.0-canary.1 → 18.0.0-canary.10
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/agGrid.d.ts +4 -21
- package/agGrid.js +5 -21
- package/base.css +11 -3
- package/base.css.map +1 -1
- package/index.css +88 -70
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
- package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
- package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.js +2 -6
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +18 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +4 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
- package/src/Api/Implementation/CommentsApiImpl.js +7 -1
- package/src/Api/Implementation/ConfigApiImpl.js +13 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
- package/src/Api/Implementation/GridApiImpl.js +33 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +15 -0
- package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
- package/src/Api/Implementation/NotesApiImpl.js +9 -8
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
- package/src/Api/Implementation/OptionsApiImpl.js +12 -2
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
- package/src/Api/Internal/ActionRowInternalApi.js +107 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +10 -8
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +71 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +18 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +60 -0
- package/src/Api/Internal/GridFilterInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.d.ts +21 -3
- package/src/Api/Internal/GridInternalApi.js +126 -7
- package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
- package/src/Api/Internal/NotesInternalApi.js +18 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +11 -0
- package/src/Api/OptionsApi.d.ts +5 -1
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +8 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
- package/src/PredefinedConfig/Common/RowSummary.js +4 -0
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/NotesState.d.ts +10 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
- package/src/PredefinedConfig/SystemState.d.ts +7 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +22 -1
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
- package/src/Redux/ActionsReducers/NotesRedux.js +10 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -3
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +33 -50
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
- package/src/Strategy/AdaptableModuleBase.js +4 -7
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +2 -55
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +5 -25
- package/src/Strategy/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +50 -21
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -64
- package/src/Strategy/CommentsModule.d.ts +1 -0
- package/src/Strategy/CommentsModule.js +5 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +1 -8
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +2 -15
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +0 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +0 -30
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +8 -3
- package/src/Strategy/LayoutModule.js +108 -53
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/NotesModule.js +3 -4
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +0 -1
- package/src/Strategy/StyledColumnModule.js +0 -21
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +6 -1
- package/src/Utilities/ObjectFactory.js +6 -6
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
- package/src/Utilities/Services/CellPopupService.js +0 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +19 -7
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -1
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/SummaryService.d.ts +19 -0
- package/src/Utilities/Services/SummaryService.js +33 -0
- package/src/View/AdaptableView.js +1 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsPopup.js +12 -8
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +199 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
- package/src/View/Notes/NotesPopup.js +8 -10
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +7 -5291
- package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
- package/src/agGrid/AdaptableAgGrid.js +3941 -0
- package/src/agGrid/AdaptableLogger.js +78 -13
- package/src/agGrid/AgGridAdapter.d.ts +62 -0
- package/src/agGrid/AgGridAdapter.js +582 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +829 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +276 -0
- package/src/agGrid/AgGridOptionsService.d.ts +12 -0
- package/src/agGrid/AgGridOptionsService.js +58 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +73 -10
- package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +6 -4
- package/src/components/Select/Select.d.ts +2 -0
- package/src/components/Select/Select.js +2 -2
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +74 -11
- package/src/metamodel/adaptable.metamodel.js +147 -34
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +52 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +15 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +347 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +10 -0
- package/src/parser/src/types.d.ts +5 -0
- package/src/types.d.ts +7 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/Utilities/Services/Interface/IRowEditService.js +0 -2
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -138
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -691
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -673
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
|
@@ -11,18 +11,18 @@ const logOnce = (message, loggingFn) => {
|
|
|
11
11
|
doOnceFlags[message] = true;
|
|
12
12
|
};
|
|
13
13
|
class AggregatedScalarLiveValue {
|
|
14
|
-
constructor(source, requestingModule, adaptableApi) {
|
|
14
|
+
constructor(source, requestingModule, adaptableApi, getRowNodes) {
|
|
15
15
|
this.source = source;
|
|
16
16
|
this.requestingModule = requestingModule;
|
|
17
17
|
this.adaptableApi = adaptableApi;
|
|
18
|
+
this.getRowNodes = getRowNodes;
|
|
18
19
|
if (source.aggregatedScalarExpression) {
|
|
19
20
|
this.aggregatedScalarExpression = source.aggregatedScalarExpression;
|
|
20
21
|
}
|
|
21
22
|
this.expressionEvaluation = source.aggregatedScalarExpression
|
|
22
23
|
? this.adaptableApi.internalApi
|
|
23
24
|
.getQueryLanguageService()
|
|
24
|
-
.evaluateAggregatedScalarExpression(source.aggregatedScalarExpression, requestingModule)
|
|
25
|
-
.value
|
|
25
|
+
.evaluateAggregatedScalarExpression(source.aggregatedScalarExpression, requestingModule, getRowNodes).value
|
|
26
26
|
: source.aggregatedScalarExpressionEvaluation;
|
|
27
27
|
// currently we support only one reducer
|
|
28
28
|
this.aggregationReducerName = Object.keys(this.expressionEvaluation.aggregationParams.reducers)[0];
|
|
@@ -32,7 +32,7 @@ class AggregatedScalarLiveValue {
|
|
|
32
32
|
if (this.aggregatedScalarExpression) {
|
|
33
33
|
this.expressionEvaluation = this.adaptableApi.internalApi
|
|
34
34
|
.getQueryLanguageService()
|
|
35
|
-
.evaluateAggregatedScalarExpression(this.aggregatedScalarExpression, this.requestingModule).value;
|
|
35
|
+
.evaluateAggregatedScalarExpression(this.aggregatedScalarExpression, this.requestingModule, this.getRowNodes).value;
|
|
36
36
|
}
|
|
37
37
|
// currently we support only one reducer
|
|
38
38
|
this.aggregationReducerName = Object.keys(this.expressionEvaluation.aggregationParams.reducers)[0];
|
|
@@ -41,7 +41,9 @@ class AggregatedScalarLiveValue {
|
|
|
41
41
|
getAggregatedValueForRow(rowNode) {
|
|
42
42
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
43
43
|
if (aggregationValue == undefined) {
|
|
44
|
-
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`,
|
|
44
|
+
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`, (message) => {
|
|
45
|
+
this.adaptableApi.internalApi.getAdaptableInstance().logger.warn(message);
|
|
46
|
+
});
|
|
45
47
|
return;
|
|
46
48
|
}
|
|
47
49
|
if (this.expressionEvaluation.rowValueGetter) {
|
|
@@ -71,9 +73,11 @@ class AggregatedScalarLiveValue {
|
|
|
71
73
|
}
|
|
72
74
|
computeAggregatedValue(expressionEvaluation) {
|
|
73
75
|
var _a;
|
|
74
|
-
const gridRowNodes =
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
const gridRowNodes = expressionEvaluation.getRowNodes
|
|
77
|
+
? expressionEvaluation.getRowNodes()
|
|
78
|
+
: this.adaptableApi.gridApi.getAllRowNodes({
|
|
79
|
+
filterFn: expressionEvaluation.rowFilterFn,
|
|
80
|
+
});
|
|
77
81
|
// we iterate over the RowNode list (we need this to handle complex column values (nested values, valueGetters etc)
|
|
78
82
|
// so we will map the fieldNames to RowNode.data
|
|
79
83
|
const mapReducerValueGetter = (fieldName) => {
|
|
@@ -109,7 +113,8 @@ class AggregatedScalarLiveValue {
|
|
|
109
113
|
return 0;
|
|
110
114
|
});
|
|
111
115
|
}
|
|
112
|
-
|
|
116
|
+
const result = (0, scalarAggregationHelper_1.aggregate)(expressionEvaluation.aggregationParams, aggregatedRowNodes);
|
|
117
|
+
return result;
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
exports.AggregatedScalarLiveValue = AggregatedScalarLiveValue;
|
|
@@ -10,7 +10,6 @@ class CellPopupService {
|
|
|
10
10
|
constructor(api) {
|
|
11
11
|
this.api = api;
|
|
12
12
|
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
13
|
-
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
14
13
|
this.adaptable.api.eventApi.on('AdaptableReady', () => this.handleAdaptableReady());
|
|
15
14
|
}
|
|
16
15
|
getAdaptableState() {
|
|
@@ -15,7 +15,7 @@ export interface IQueryLanguageService extends IAdaptableService {
|
|
|
15
15
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
|
|
16
16
|
evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo | GridDataChangedInfo>;
|
|
17
17
|
evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): BooleanAggregationParameter;
|
|
18
|
-
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): ScalarAggregationParameter;
|
|
18
|
+
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter;
|
|
19
19
|
validateBoolean(expression: string, module: AdaptableModule, config?: {
|
|
20
20
|
force?: boolean;
|
|
21
21
|
}): {
|
|
@@ -13,9 +13,12 @@ export declare enum LicenseValidityType {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class LicenseService implements ILicenseService {
|
|
15
15
|
private adaptable;
|
|
16
|
+
private licenseKey;
|
|
17
|
+
private packageDetails;
|
|
16
18
|
constructor(adaptable: IAdaptable, licenseKey: string | undefined, packageDetails: {
|
|
17
19
|
publishedAt: number | Date;
|
|
18
20
|
});
|
|
21
|
+
init(): void;
|
|
19
22
|
getValidityType(details: LicenseDetails | Error | null, packageDetails: {
|
|
20
23
|
publishedAt: number | Date;
|
|
21
24
|
}): LicenseValidityType;
|
|
@@ -26,34 +26,46 @@ var LicenseValidityType;
|
|
|
26
26
|
const SANDPACK_REGEX = /(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g;
|
|
27
27
|
const SANDBOX_REGEX = /(https):\/\/\S+(\.csb\.app)/g;
|
|
28
28
|
const DEMO_REGEX = /(https):\/\/\S+(\.adaptabletools\.com)/g;
|
|
29
|
-
const
|
|
29
|
+
const getOrigin = () => {
|
|
30
|
+
return typeof window !== 'undefined' ? window.location.origin : '';
|
|
31
|
+
};
|
|
30
32
|
const isInsideSandpack = () => {
|
|
31
|
-
const [_fullUrl, protocol, sandpackUrl] = Array.from(SANDPACK_REGEX.exec(
|
|
33
|
+
const [_fullUrl, protocol, sandpackUrl] = Array.from(SANDPACK_REGEX.exec(getOrigin()) || []);
|
|
32
34
|
return protocol === 'https' && sandpackUrl === 'sandpack.codesandbox.io';
|
|
33
35
|
};
|
|
34
36
|
const isInsideSandbox = () => {
|
|
35
|
-
const [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(
|
|
37
|
+
const [_fullUrl, protocol, sandboxUrl] = Array.from(SANDBOX_REGEX.exec(getOrigin()) || []);
|
|
36
38
|
return protocol === 'https' && sandboxUrl === '.csb.app';
|
|
37
39
|
};
|
|
38
40
|
const isDemoApp = () => {
|
|
39
|
-
const [_fullUrl, protocol, demoAppUrl] = Array.from(DEMO_REGEX.exec(
|
|
41
|
+
const [_fullUrl, protocol, demoAppUrl] = Array.from(DEMO_REGEX.exec(getOrigin()) || []);
|
|
40
42
|
return protocol === 'https' && demoAppUrl === '.adaptabletools.com';
|
|
41
43
|
};
|
|
42
44
|
class LicenseService {
|
|
43
45
|
constructor(adaptable, licenseKey, packageDetails) {
|
|
44
46
|
this.adaptable = adaptable;
|
|
47
|
+
this.licenseKey = licenseKey;
|
|
48
|
+
this.packageDetails = packageDetails;
|
|
45
49
|
this.adaptable = adaptable;
|
|
50
|
+
this.adaptable.api.eventApi.on('AdaptableReady', () => {
|
|
51
|
+
requestAnimationFrame(() => {
|
|
52
|
+
// using a rAF because we want to make sure that the window.location.origin is available (Master/Detail is fidgity sometimes)
|
|
53
|
+
this.init();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
init() {
|
|
46
58
|
let details = null;
|
|
47
|
-
if (licenseKey) {
|
|
59
|
+
if (this.licenseKey) {
|
|
48
60
|
try {
|
|
49
|
-
details = (0, decode_1.decode)(licenseKey);
|
|
61
|
+
details = (0, decode_1.decode)(this.licenseKey);
|
|
50
62
|
}
|
|
51
63
|
catch (error) {
|
|
52
64
|
details = error;
|
|
53
65
|
}
|
|
54
66
|
}
|
|
55
67
|
if (!isInsideSandpack() && !isInsideSandbox() && !isDemoApp()) {
|
|
56
|
-
this.handleLicenseValidation(details, this.getValidityType(details, packageDetails));
|
|
68
|
+
this.handleLicenseValidation(details, this.getValidityType(details, this.packageDetails));
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
getValidityType(details, packageDetails) {
|
|
@@ -3,7 +3,7 @@ import { AdaptableOptions } from '../../../types';
|
|
|
3
3
|
export declare class MetamodelService implements IMetamodelService {
|
|
4
4
|
private gridInfoOptions;
|
|
5
5
|
getAdaptableOptions: () => AdaptableOptions;
|
|
6
|
-
constructor(getAdaptableOptions: () => AdaptableOptions);
|
|
6
|
+
constructor(getAdaptableOptions: () => AdaptableOptions, validateOptions?: boolean);
|
|
7
7
|
getGridInfoOptions(): GridInfoOptions;
|
|
8
8
|
getGridInfoNoCodeOptions(): GridInfoOptions;
|
|
9
9
|
validateAdaptableOptionsValues(): void;
|
|
@@ -3,17 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MetamodelService = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
6
|
-
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
7
6
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
8
7
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
9
8
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
9
|
+
const defaultAdaptableOptions_1 = require("../../agGrid/defaultAdaptableOptions");
|
|
10
10
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
11
11
|
class MetamodelService {
|
|
12
|
-
constructor(getAdaptableOptions) {
|
|
12
|
+
constructor(getAdaptableOptions, validateOptions) {
|
|
13
13
|
this.gridInfoOptions = new Map();
|
|
14
14
|
this.getAdaptableOptions = () => null;
|
|
15
15
|
this.getAdaptableOptions = getAdaptableOptions;
|
|
16
16
|
this.gridInfoOptions = this.buildGridInfoOptions();
|
|
17
|
+
if (validateOptions) {
|
|
18
|
+
this.validateAdaptableOptionsValues();
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
getGridInfoOptions() {
|
|
19
22
|
return this.gridInfoOptions;
|
|
@@ -144,7 +147,7 @@ class MetamodelService {
|
|
|
144
147
|
});
|
|
145
148
|
}
|
|
146
149
|
getAdaptableOptionsDefaultValues() {
|
|
147
|
-
return
|
|
150
|
+
return (0, defaultAdaptableOptions_1.getDefaultAdaptableOptions)();
|
|
148
151
|
}
|
|
149
152
|
getAdaptableMetamodel() {
|
|
150
153
|
return adaptable_metamodel_1.ADAPTABLE_METAMODEL;
|
|
@@ -16,7 +16,7 @@ export declare class QueryLanguageService implements IQueryLanguageService {
|
|
|
16
16
|
constructor(adaptableApi: AdaptableApi);
|
|
17
17
|
evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any): any;
|
|
18
18
|
evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: IRowNode): any;
|
|
19
|
-
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): ScalarAggregationParameter;
|
|
19
|
+
evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule, getRowNodes?: () => IRowNode[]): ScalarAggregationParameter;
|
|
20
20
|
evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo | GridDataChangedInfo>;
|
|
21
21
|
evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): BooleanAggregationParameter;
|
|
22
22
|
validateBoolean(expressionInput: string, module: AdaptableModule, config?: {
|
|
@@ -36,7 +36,7 @@ class QueryLanguageService {
|
|
|
36
36
|
// currently scalar and boolean expressions are evaluated the same
|
|
37
37
|
return this.evaluateBooleanExpression(expression, module, rowNode);
|
|
38
38
|
}
|
|
39
|
-
evaluateAggregatedScalarExpression(expression, module) {
|
|
39
|
+
evaluateAggregatedScalarExpression(expression, module, getRowNodes) {
|
|
40
40
|
const aggregatedScalarFunctions = this.getModuleExpressionFunctionsMap(module).aggregatedScalarFunctions;
|
|
41
41
|
return parser.evaluate(expression, {
|
|
42
42
|
node: null,
|
|
@@ -45,6 +45,7 @@ class QueryLanguageService {
|
|
|
45
45
|
adaptableId: this.adaptableApi.optionsApi.getAdaptableId(),
|
|
46
46
|
functions: aggregatedScalarFunctions,
|
|
47
47
|
evaluateCustomQueryVariable: this.evaluateCustomQueryVariable,
|
|
48
|
+
getRowNodes,
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
evaluateObservableExpression(reactiveExpression, module) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IRowEditService } from './Interface/IRowEditService';
|
|
2
1
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
|
-
|
|
2
|
+
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
3
|
+
export declare class RowEditService implements IAdaptableService {
|
|
4
4
|
private adaptableApi;
|
|
5
5
|
constructor(adaptableApi: AdaptableApi);
|
|
6
6
|
private autoHandleActionRowButtons;
|
|
7
|
+
destroy(): void;
|
|
7
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RowEditService = void 0;
|
|
4
|
-
// @ts-ignore
|
|
5
4
|
class RowEditService {
|
|
6
5
|
constructor(adaptableApi) {
|
|
7
6
|
this.adaptableApi = adaptableApi;
|
|
@@ -40,5 +39,8 @@ class RowEditService {
|
|
|
40
39
|
adaptableApi.gridApi.addGridData([newRowData], config);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
42
|
+
destroy() {
|
|
43
|
+
// nothing yet
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
exports.RowEditService = RowEditService;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IRowNode } from '@ag-grid-community/core';
|
|
2
|
+
import { AggregatedScalarLiveValue } from './AggregatedScalarLiveValue';
|
|
3
|
+
import { AdaptableApi, AdaptableModule } from '../../types';
|
|
4
|
+
export declare const summarySupportedExpressions: readonly ["SUM", "AVG", "MIN", "MAX", "COUNT", "MEDIAN", "MODE", "DISTINCT", "ONLY", "STD_DEVIATION"];
|
|
5
|
+
export type SummarySupportedExpression = (typeof summarySupportedExpressions)[number];
|
|
6
|
+
export type SumaryConfig = {
|
|
7
|
+
expression: {
|
|
8
|
+
function: SummarySupportedExpression;
|
|
9
|
+
};
|
|
10
|
+
columnId: string;
|
|
11
|
+
getRowNodes?: () => IRowNode[];
|
|
12
|
+
};
|
|
13
|
+
export declare class SummaryService {
|
|
14
|
+
private adaptableApi;
|
|
15
|
+
constructor(adaptableApi: AdaptableApi);
|
|
16
|
+
evaluateExpressionValue(config: SumaryConfig, moduleId: AdaptableModule): any;
|
|
17
|
+
evaluateScalarLiveValue(config: SumaryConfig, moduleId: AdaptableModule): AggregatedScalarLiveValue;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SummaryService = exports.summarySupportedExpressions = void 0;
|
|
4
|
+
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
5
|
+
exports.summarySupportedExpressions = [
|
|
6
|
+
'SUM',
|
|
7
|
+
'AVG',
|
|
8
|
+
'MIN',
|
|
9
|
+
'MAX',
|
|
10
|
+
'COUNT',
|
|
11
|
+
'MEDIAN',
|
|
12
|
+
'MODE',
|
|
13
|
+
'DISTINCT',
|
|
14
|
+
'ONLY',
|
|
15
|
+
'STD_DEVIATION',
|
|
16
|
+
];
|
|
17
|
+
class SummaryService {
|
|
18
|
+
constructor(adaptableApi) {
|
|
19
|
+
this.adaptableApi = adaptableApi;
|
|
20
|
+
}
|
|
21
|
+
evaluateExpressionValue(config, moduleId) {
|
|
22
|
+
return this.evaluateScalarLiveValue(config, moduleId).getGlobalAggregatedValue();
|
|
23
|
+
}
|
|
24
|
+
evaluateScalarLiveValue(config, moduleId) {
|
|
25
|
+
return new AggregatedScalarLiveValue_1.AggregatedScalarLiveValue({
|
|
26
|
+
aggregatedScalarExpression: `${config.expression.function}([${config.columnId}])`,
|
|
27
|
+
}, moduleId, this.adaptableApi, config.getRowNodes);
|
|
28
|
+
}
|
|
29
|
+
destroy() {
|
|
30
|
+
this.adaptableApi = null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SummaryService = SummaryService;
|
|
@@ -7,7 +7,6 @@ const react_redux_1 = require("react-redux");
|
|
|
7
7
|
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
8
8
|
const Toastify_1 = require("../components/Toastify");
|
|
9
9
|
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
10
|
-
const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
|
|
11
10
|
const AdaptablePopup_1 = require("./Components/Popups/AdaptablePopup");
|
|
12
11
|
const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
|
|
13
12
|
const AdaptablePopupPrompt_1 = require("./Components/Popups/AdaptablePopupPrompt");
|
|
@@ -27,7 +26,6 @@ class AdaptableView extends React.Component {
|
|
|
27
26
|
React.createElement(GridCellPopup_1.GridCellPopup, null),
|
|
28
27
|
React.createElement(FloatingQuickSearch_1.QuickSearchDrawer, null),
|
|
29
28
|
this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
|
|
30
|
-
this.props.AdaptableApi.optionsApi.getUserInterfaceOptions().showLoadingScreen && (React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup })),
|
|
31
29
|
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
32
30
|
Boolean(this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup) && (React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi })),
|
|
33
31
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
@@ -37,7 +35,7 @@ class AdaptableView extends React.Component {
|
|
|
37
35
|
, {
|
|
38
36
|
// we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
|
|
39
37
|
// instance is destroyed and re-created many times
|
|
40
|
-
containerId: adaptableOptions.adaptableId
|
|
38
|
+
containerId: `Toastify-${adaptableOptions.adaptableId}`, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
41
39
|
(watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
|
|
42
40
|
React.createElement(WindowPopups_1.WindowPopups, null),
|
|
43
41
|
React.createElement(FormPopups_1.FormPopups, null),
|
|
@@ -11,7 +11,7 @@ const GridOptionsForm_1 = tslib_1.__importDefault(require("./GridOptionsForm"));
|
|
|
11
11
|
const EntitlementsForm_1 = tslib_1.__importDefault(require("./EntitlementsForm"));
|
|
12
12
|
const UiOptionsForm_1 = require("./UIOptions/UiOptionsForm");
|
|
13
13
|
const AdaptableOptionsForm_1 = require("./AdaptableOptionsForm");
|
|
14
|
-
const
|
|
14
|
+
const defaultAdaptableOptions_1 = require("../../../agGrid/defaultAdaptableOptions");
|
|
15
15
|
const ConfigurationWizard = (props) => {
|
|
16
16
|
const [isPrimaryKeySelected, setIsValid] = React.useState(true);
|
|
17
17
|
const [adaptableConfig, setAdaptableConfig] = (0, react_1.useState)(() => {
|
|
@@ -21,7 +21,7 @@ const ConfigurationWizard = (props) => {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
const gridOptions = Object.assign(Object.assign({}, gridOptionDefaults), props.adaptableConfig.gridOptions);
|
|
24
|
-
const adaptableOptions =
|
|
24
|
+
const adaptableOptions = (0, defaultAdaptableOptions_1.applyDefaultAdaptableOptions)(props.adaptableConfig.adaptableOptions);
|
|
25
25
|
return { gridOptions, adaptableOptions };
|
|
26
26
|
});
|
|
27
27
|
const [selectedColumns, setSelectedColumns] = (0, react_1.useState)(() => {
|
|
@@ -55,7 +55,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
55
55
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All', onClick: () => {
|
|
56
56
|
this.onApplyClick();
|
|
57
57
|
}, variant: "raised", tone: "accent" }, "Apply to Grid")))) : (React.createElement(React.Fragment, null,
|
|
58
|
-
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Select an existing
|
|
58
|
+
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Select an existing Column value from the dropdown, or enter a new value"),
|
|
59
59
|
React.createElement(rebass_1.Flex, { marginTop: 2, flexDirection: "row", alignItems: "center" },
|
|
60
60
|
React.createElement(rebass_1.Flex, { alignItems: "center", flexDirection: "row", flex: 1, marginRight: 2 },
|
|
61
61
|
React.createElement(ColumnValueSelector_1.ColumnValueSelector, { selectedGridCells: this.props.SelectedGridCells, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: col, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns), style: { width: '100%', maxWidth: 'inherit' } })),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AdaptableApi, CalculatedColumn } from '../../types';
|
|
2
|
-
export declare const getExpressionType: (calculatedColumn: CalculatedColumn, api: AdaptableApi) => "
|
|
2
|
+
export declare const getExpressionType: (calculatedColumn: CalculatedColumn, api: AdaptableApi) => "AggregatedScalarExpression" | "ScalarExpression" | "CumulativeAggregatedExpression" | "QuantileAggregatedExpression";
|
|
@@ -15,7 +15,7 @@ class CellSummaryPopupComponent extends React.Component {
|
|
|
15
15
|
// afterwards, we will go on with the cell summary logic, as that will evaluate the current(column) cell selection
|
|
16
16
|
this.props.api.columnApi.selectColumn((_c = this.props.popupParams) === null || _c === void 0 ? void 0 : _c.column.columnId);
|
|
17
17
|
// we also need to update the internal state of the selected cells
|
|
18
|
-
this.props.api.internalApi.getAdaptableInstance().
|
|
18
|
+
this.props.api.internalApi.getAdaptableInstance().refreshSelectedCellsState();
|
|
19
19
|
}
|
|
20
20
|
this.props.onCreateCellSummary();
|
|
21
21
|
}
|
|
@@ -33,8 +33,8 @@ const CellComments = (props) => {
|
|
|
33
33
|
return (0, dateUtils_1.formatDate)(params.data.Timestamp, 'MM.DD.YYYY HH:mm');
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
header: '
|
|
36
|
+
text: {
|
|
37
|
+
header: 'Text',
|
|
38
38
|
field: 'Value',
|
|
39
39
|
defaultFlex: 3,
|
|
40
40
|
},
|
|
@@ -42,15 +42,19 @@ const CellComments = (props) => {
|
|
|
42
42
|
return columns;
|
|
43
43
|
}, []);
|
|
44
44
|
const cellValue = adaptable.api.gridApi.getCellDisplayValue(props.commentThread.PrimaryKeyValue, props.commentThread.ColumnId);
|
|
45
|
+
const primaryKeyHeader = React.useMemo(() => {
|
|
46
|
+
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
47
|
+
return adaptable.api.columnApi.getFriendlyNameForColumnId(primaryKey);
|
|
48
|
+
}, []);
|
|
45
49
|
const columnFriendlyName = adaptable.api.columnApi.getFriendlyNameForColumnId(props.commentThread.ColumnId);
|
|
46
50
|
return (React.createElement(Panel_1.default, { mb: 2, header: React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
|
|
47
51
|
React.createElement(rebass_1.Box, { mr: 2 },
|
|
48
52
|
"Cell Value: ",
|
|
49
53
|
cellValue),
|
|
50
54
|
React.createElement(rebass_1.Box, { mr: 2 },
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
primaryKeyHeader,
|
|
56
|
+
": ",
|
|
57
|
+
props.commentThread.PrimaryKeyValue),
|
|
54
58
|
React.createElement(rebass_1.Box, null,
|
|
55
59
|
"Column: ",
|
|
56
60
|
columnFriendlyName),
|
|
@@ -76,12 +80,12 @@ const CellComments = (props) => {
|
|
|
76
80
|
}, rowHeight: 30, columnHeaderHeight: 30, domProps: tableDOMProps, columns: columnsMap }))));
|
|
77
81
|
};
|
|
78
82
|
const CommentsPopup = (props) => {
|
|
79
|
-
const
|
|
83
|
+
const commentThreads = (0, react_redux_1.useSelector)((state) => {
|
|
80
84
|
return state.Comment.CommentThreads;
|
|
81
85
|
});
|
|
82
|
-
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (
|
|
86
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Comments', glyphicon: 'comments', infoLink: props.moduleInfo.HelpPage }, (commentThreads !== null && commentThreads !== void 0 ? commentThreads : []).map((commentThread, index) => {
|
|
83
87
|
var _a;
|
|
84
|
-
return React.createElement(CellComments, { key: (_a =
|
|
88
|
+
return React.createElement(CellComments, { key: (_a = commentThread === null || commentThread === void 0 ? void 0 : commentThread.Uuid) !== null && _a !== void 0 ? _a : index, commentThread: commentThread });
|
|
85
89
|
})));
|
|
86
90
|
};
|
|
87
91
|
exports.CommentsPopup = CommentsPopup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableInputProps } from '../AdaptableInput';
|
|
3
3
|
export type AdaptableDateInputProps = AdaptableInputProps;
|
|
4
|
-
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "
|
|
4
|
+
declare const AdaptableDateInput: React.ForwardRefExoticComponent<Pick<import("../../../components/Input").InputProps, "children" | "size" | "name" | "tabIndex" | "color" | "style" | "cite" | "data" | "form" | "label" | "p" | "slot" | "span" | "summary" | "title" | "pattern" | "start" | "hidden" | "content" | "default" | "flex" | "wrap" | "open" | "padding" | "multiple" | "disabled" | "checked" | "download" | "list" | "order" | "target" | "rows" | "src" | "className" | "onTransitionEnd" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEndCapture" | "opacity" | "value" | "key" | "sizes" | "variant" | "tx" | "as" | "css" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "bg" | "backgroundColor" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "sx" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "srcDoc" | "srcLang" | "srcSet" | "step" | "type" | "useMap" | "wmode" | "placehoder"> & React.RefAttributes<HTMLInputElement>>;
|
|
5
5
|
export default AdaptableDateInput;
|
|
@@ -62,6 +62,7 @@ const renderScopeSummary = (scope, labels) => {
|
|
|
62
62
|
exports.renderScopeSummary = renderScopeSummary;
|
|
63
63
|
const DATA_TYPES_OPTIONS = Object.values(DATA_TYPES_MAP);
|
|
64
64
|
const NewScopeComponent = (props) => {
|
|
65
|
+
var _a, _b;
|
|
65
66
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
66
67
|
const { scopeApi, columnApi } = api;
|
|
67
68
|
const [columnsSearchText, setColumnsSearchText] = (0, react_1.useState)('');
|
|
@@ -85,6 +86,9 @@ const NewScopeComponent = (props) => {
|
|
|
85
86
|
if (scopeApi.scopeHasDataType(props.scope)) {
|
|
86
87
|
return 'DataType';
|
|
87
88
|
}
|
|
89
|
+
if (scopeApi.scopeHasColumnType(props.scope)) {
|
|
90
|
+
return 'ColumnType';
|
|
91
|
+
}
|
|
88
92
|
return undefined;
|
|
89
93
|
};
|
|
90
94
|
const onScopeSelectChanged = (value) => {
|
|
@@ -99,6 +103,11 @@ const NewScopeComponent = (props) => {
|
|
|
99
103
|
DataTypes: [],
|
|
100
104
|
};
|
|
101
105
|
}
|
|
106
|
+
else if (value == 'ColumnType') {
|
|
107
|
+
newScope = {
|
|
108
|
+
ColumnTypes: [],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
102
111
|
else {
|
|
103
112
|
newScope = {
|
|
104
113
|
All: true,
|
|
@@ -134,6 +143,10 @@ const NewScopeComponent = (props) => {
|
|
|
134
143
|
if (Array.isArray(props.availableDataTypes)) {
|
|
135
144
|
dataTypeOptions = props.availableDataTypes.map((dataType) => DATA_TYPES_MAP[dataType]);
|
|
136
145
|
}
|
|
146
|
+
const hasColumnTypes = React.useMemo(() => {
|
|
147
|
+
var _a;
|
|
148
|
+
return ((_a = api.optionsApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
149
|
+
}, []);
|
|
137
150
|
return (React.createElement(Tabs_1.Tabs, { "data-name": 'scope-component', className: "ab-ScopeComponent", value: scopeChoice, style: Object.assign({ height: '100%' }, props.style), onValueChange: onScopeSelectChanged },
|
|
138
151
|
props.hideWholeRow ? null : (React.createElement(Tabs_1.Tabs.Tab, { value: "Row" },
|
|
139
152
|
React.createElement(Radio_1.default, { margin: 0, checked: scopeChoice == 'All', tabIndex: -1 }, "All Columns"))),
|
|
@@ -141,6 +154,8 @@ const NewScopeComponent = (props) => {
|
|
|
141
154
|
React.createElement(Radio_1.default, { margin: 0, value: "Column", checked: scopeChoice == 'Column', tabIndex: -1 }, "Selected Columns"))),
|
|
142
155
|
!props.disableDataTypes && (React.createElement(Tabs_1.Tabs.Tab, { value: "DataType" },
|
|
143
156
|
React.createElement(Radio_1.default, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "Data Types"))),
|
|
157
|
+
hasColumnTypes && (React.createElement(Tabs_1.Tabs.Tab, { value: "ColumnType" },
|
|
158
|
+
React.createElement(Radio_1.default, { margin: 0, value: "ColumnType", checked: scopeChoice == 'ColumnType', tabIndex: -1 }, "Column Types"))),
|
|
144
159
|
props.hideWholeRow ? null : (React.createElement(Tabs_1.Tabs.Content, { value: "Row", style: { flex: 'none' }, "data-name": "row-scope" },
|
|
145
160
|
React.createElement(rebass_1.Text, { padding: 2, pl: 0, fontSize: 2 }, props.descriptions.rowScope))),
|
|
146
161
|
!props.disableColumns && (React.createElement(Tabs_1.Tabs.Content, { value: "Column", style: { flex: 1, overflow: 'auto' }, "data-name": "column-scope", padding: 0 },
|
|
@@ -153,6 +168,24 @@ const NewScopeComponent = (props) => {
|
|
|
153
168
|
!props.disableDataTypes && (React.createElement(Tabs_1.Tabs.Content, { value: "DataType", style: { flex: 'none' }, "data-name": "datatype-scope" },
|
|
154
169
|
React.createElement(rebass_1.Box, null,
|
|
155
170
|
props.descriptions.dataTypeScope && (React.createElement(rebass_1.Text, { p: 2, pl: 0, mb: 2, fontSize: 2 }, props.descriptions.dataTypeScope)),
|
|
156
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label)))))))
|
|
171
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column" }, dataTypeOptions.map((dataTypeOption) => (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": dataTypeOption.value, key: dataTypeOption.value, checked: dataTypesInScope && dataTypesInScope.includes(dataTypeOption.value), onChange: (checked) => onCheckBoxDataTypeChecked(checked, dataTypeOption.value) }, dataTypeOption.label))))))),
|
|
172
|
+
hasColumnTypes && (React.createElement(Tabs_1.Tabs.Content, { value: "ColumnType", style: { flex: 'none' }, "data-name": "column-type-scope" },
|
|
173
|
+
React.createElement(rebass_1.Box, null,
|
|
174
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column" }, (_b = (_a = api.optionsApi.getColumnTypes()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, (columnType) => {
|
|
175
|
+
var _a;
|
|
176
|
+
return (React.createElement(CheckBox_1.CheckBox, { "data-name": "scope", "data-value": columnType, key: columnType, checked: 'ColumnTypes' in props.scope && ((_a = props.scope.ColumnTypes) === null || _a === void 0 ? void 0 : _a.includes(columnType)), onChange: (checked) => {
|
|
177
|
+
let columnTypes = [].concat(props.scope.ColumnTypes);
|
|
178
|
+
if (checked) {
|
|
179
|
+
columnTypes.push(columnType);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
columnTypes = columnTypes.filter((ct) => ct !== columnType);
|
|
183
|
+
}
|
|
184
|
+
let newScope = {
|
|
185
|
+
ColumnTypes: columnTypes,
|
|
186
|
+
};
|
|
187
|
+
props.updateScope(newScope);
|
|
188
|
+
} }, columnType));
|
|
189
|
+
})))))));
|
|
157
190
|
};
|
|
158
191
|
exports.NewScopeComponent = NewScopeComponent;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export interface IAdaptableLoadingScreenProps
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IAdaptableLoadingScreenProps {
|
|
3
3
|
showLoadingScreen: boolean;
|
|
4
|
+
loadingScreenDelay?: number;
|
|
5
|
+
loadingScreenTitle?: string;
|
|
6
|
+
loadingScreenText?: string;
|
|
4
7
|
onClose?: () => {};
|
|
5
8
|
}
|
|
6
|
-
export declare
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|
|
9
|
+
export declare function AdaptableLoadingScreen(props: IAdaptableLoadingScreenProps): JSX.Element;
|
|
@@ -5,14 +5,24 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Dialog_1 = tslib_1.__importDefault(require("../../../components/Dialog"));
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
function AdaptableLoadingScreen(props) {
|
|
9
|
+
const { showLoadingScreen, loadingScreenDelay, loadingScreenTitle, loadingScreenText } = props;
|
|
10
|
+
const [delayElapsed, setDelayElapsed] = React.useState(typeof loadingScreenDelay === 'number' ? false : showLoadingScreen);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (typeof loadingScreenDelay === 'number') {
|
|
13
|
+
const timeoutId = setTimeout(() => {
|
|
14
|
+
setDelayElapsed(true);
|
|
15
|
+
}, loadingScreenDelay);
|
|
16
|
+
return () => {
|
|
17
|
+
clearTimeout(timeoutId);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}, [loadingScreenDelay]);
|
|
21
|
+
return (React.createElement(Dialog_1.default, { modal: true, isOpen: delayElapsed ? showLoadingScreen : false, onDismiss: props.onClose, showCloseButton: false, className: "ab-LoadingScreen", style: {
|
|
22
|
+
minHeight: 'auto',
|
|
23
|
+
} },
|
|
24
|
+
React.createElement(rebass_1.Box, { padding: 3 },
|
|
25
|
+
React.createElement("h4", null, loadingScreenTitle !== null && loadingScreenTitle !== void 0 ? loadingScreenTitle : 'Initialising Grid'),
|
|
26
|
+
React.createElement("p", null, loadingScreenText !== null && loadingScreenText !== void 0 ? loadingScreenText : 'Retrieving your settings and setting up the grid...'))));
|
|
17
27
|
}
|
|
18
28
|
exports.AdaptableLoadingScreen = AdaptableLoadingScreen;
|