@adaptabletools/adaptable 12.1.7 → 12.2.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +127 -71
- package/bundle.cjs.js +108 -108
- package/index.css +145 -83
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +44 -10
- package/src/AdaptableOptions/FilterOptions.d.ts +12 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +10 -1
- package/src/AdaptableOptions/StateOptions.d.ts +25 -12
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/FilterApi.d.ts +23 -0
- package/src/Api/GridApi.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +5 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ExportApiImpl.js +19 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +5 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +34 -3
- package/src/Api/Implementation/PredicateApiImpl.js +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +14 -1
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
- package/src/PredefinedConfig/Common/Enums.js +1 -18
- package/src/PredefinedConfig/ExportState.d.ts +12 -4
- package/src/PredefinedConfig/LayoutState.d.ts +2 -1
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +15 -6
- package/src/Strategy/AlertModule.d.ts +1 -0
- package/src/Strategy/AlertModule.js +20 -0
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.js +3 -3
- package/src/Strategy/ExportModule.d.ts +0 -1
- package/src/Strategy/ExportModule.js +0 -16
- package/src/Strategy/FilterModule.js +6 -0
- package/src/Strategy/Interface/IModule.d.ts +4 -0
- package/src/Strategy/LayoutModule.js +20 -20
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +0 -13
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +3 -4
- package/src/Strategy/Utilities/getExpressionViewItems.js +3 -3
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +25 -7
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +31 -5
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
- package/src/Utilities/ObjectFactory.d.ts +4 -2
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
- package/src/Utilities/Services/AlertService.d.ts +0 -1
- package/src/Utilities/Services/AlertService.js +5 -17
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +8 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +8 -4
- package/src/Utilities/Services/QueryLanguageService.js +68 -25
- package/src/Utilities/Services/ReportService.js +48 -48
- package/src/View/AdaptableView.js +1 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +10 -10
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +3 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +9 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +14 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +7 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +280 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +1 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +5 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -3
- package/src/View/AdaptableWizardView/Wizard.js +2 -2
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -8
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
- package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +24 -14
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -52
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/Components/AdaptableObjectCollection/index.d.ts +3 -4
- package/src/View/Components/AdaptableObjectCollection/index.js +7 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -4
- package/src/View/Components/EntityRulesEditor/index.js +28 -7
- package/src/View/Components/FilterForm/FilterForm.js +8 -4
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
- package/src/View/Components/FilterForm/QuickFilterForm.js +19 -7
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
- package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
- package/src/View/Components/PermittedValuesSelector/index.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
- package/src/View/Components/Popups/AdaptableToaster.js +2 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
- package/src/View/Components/ValueSelector/index.js +8 -19
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +11 -10
- package/src/View/Export/ExportViewPanel.d.ts +1 -2
- package/src/View/Export/ExportViewPanel.js +4 -8
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +4 -3
- package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
- package/src/View/Filter/FilterViewPanel.js +21 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +5 -3
- package/src/View/GridInfo/AdaptableOptionsComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -7
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +3 -4
- package/src/View/StateManagement/StateManagementPopup.js +18 -19
- package/src/agGrid/Adaptable.d.ts +12 -3
- package/src/agGrid/Adaptable.js +264 -148
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +5 -3
- package/src/agGrid/agGridMenuHelper.d.ts +1 -0
- package/src/agGrid/agGridMenuHelper.js +4 -2
- package/src/agGrid/weightedAverage.d.ts +6 -0
- package/src/agGrid/weightedAverage.js +66 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
- package/src/components/DragAndDropContext/ModuleManager.js +3 -4
- package/src/components/DragAndDropContext/TabList.js +9 -30
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -7
- package/src/components/DropdownButton/index.js +2 -2
- package/src/components/EmptyContent/index.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +24 -4
- package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
- package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
- package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +50 -19
- package/src/metamodel/adaptable.metamodel.d.ts +86 -5
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +14 -10
- package/src/types.d.ts +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
- package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
- package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
- package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
- package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
- package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
- package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
- package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
|
@@ -20,11 +20,11 @@ export interface ExpressionContext extends BaseContext {
|
|
|
20
20
|
*/
|
|
21
21
|
node: any;
|
|
22
22
|
/**
|
|
23
|
-
* All Expression Functions available to
|
|
23
|
+
* All Expression Functions available to AdaptableQL
|
|
24
24
|
*/
|
|
25
25
|
functions: ExpressionFunctionMap;
|
|
26
26
|
/**
|
|
27
|
-
* Expression Functions available to
|
|
27
|
+
* Expression Functions available to AdaptableQL in (optional) WHERE clause
|
|
28
28
|
*/
|
|
29
29
|
whereClauseFunctions?: ExpressionFunctionMap;
|
|
30
30
|
/**
|
|
@@ -35,14 +35,18 @@ export interface ExpressionContext extends BaseContext {
|
|
|
35
35
|
* All Named Query evaluations: tracked in order to detect circular dependencies
|
|
36
36
|
*/
|
|
37
37
|
namedQueryCallStack?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Evaluate custom variables
|
|
40
|
+
*/
|
|
41
|
+
evaluateCustomQueryVariable: (functionName: string, args?: any[]) => any;
|
|
38
42
|
}
|
|
39
43
|
export declare type ExpressionFunctionMap = Record<string, ExpressionFunction>;
|
|
40
44
|
/**
|
|
41
|
-
* Defines an
|
|
45
|
+
* Defines an AdaptableQL Function used in an Adaptable Expression
|
|
42
46
|
*/
|
|
43
47
|
export interface ExpressionFunction {
|
|
44
48
|
/**
|
|
45
|
-
* Actual
|
|
49
|
+
* Actual AdaptableQL Function called by the Expression (mandatory prop)
|
|
46
50
|
*/
|
|
47
51
|
handler: ExpressionFunctionHandler;
|
|
48
52
|
/**
|
|
@@ -50,19 +54,19 @@ export interface ExpressionFunction {
|
|
|
50
54
|
*/
|
|
51
55
|
isHiddenFromMenu?: boolean;
|
|
52
56
|
/**
|
|
53
|
-
* Whether the
|
|
57
|
+
* Whether the AdaptableQL Function returns true, if so can be used as Query
|
|
54
58
|
*/
|
|
55
59
|
isPredicate?: boolean;
|
|
56
60
|
/**
|
|
57
|
-
* What the
|
|
61
|
+
* What the AdaptableQL Function does
|
|
58
62
|
*/
|
|
59
63
|
description?: string;
|
|
60
64
|
/**
|
|
61
|
-
* How the
|
|
65
|
+
* How the AdaptableQL Function should be called
|
|
62
66
|
*/
|
|
63
67
|
signatures?: string[];
|
|
64
68
|
/**
|
|
65
|
-
* Examples that use the
|
|
69
|
+
* Examples that use the AdaptableQL Function
|
|
66
70
|
*/
|
|
67
71
|
examples?: string[];
|
|
68
72
|
/**
|
|
@@ -71,7 +75,7 @@ export interface ExpressionFunction {
|
|
|
71
75
|
hasEagerEvaluation?: boolean;
|
|
72
76
|
}
|
|
73
77
|
/**
|
|
74
|
-
* Defines how an
|
|
78
|
+
* Defines how an AdaptableQL Function is described in Expression Editor
|
|
75
79
|
*/
|
|
76
80
|
export declare type ExpressionFunctionDocBlock = {
|
|
77
81
|
type: 'code';
|
|
@@ -81,7 +85,7 @@ export declare type ExpressionFunctionDocBlock = {
|
|
|
81
85
|
content: string;
|
|
82
86
|
};
|
|
83
87
|
/**
|
|
84
|
-
* The javascript function which is invoked by an
|
|
88
|
+
* The javascript function which is invoked by an AdaptableQL Function
|
|
85
89
|
*/
|
|
86
90
|
export declare type ExpressionFunctionHandler = (
|
|
87
91
|
/**
|
package/src/types.d.ts
CHANGED
|
@@ -18,15 +18,15 @@ export type { ExportOptions, SystemExportDestination, SystemExportDestinations,
|
|
|
18
18
|
export type { GeneralOptions, ColumnValuesComparer, DataSet, DataSetFormContext, } from './AdaptableOptions/GeneralOptions';
|
|
19
19
|
export type { Glue42PluginOptions } from './AdaptableOptions/Glue42PluginOptions';
|
|
20
20
|
export type { IPushPullPluginOptions } from './AdaptableOptions/IPushPullPluginOptions';
|
|
21
|
-
export type { LayoutOptions, LayoutViewOptions, LayoutTagOptions, LayoutAvailableContext, AutoGenerateTagsForLayoutsContext, LayoutAssociatedObject, } from './AdaptableOptions/LayoutOptions';
|
|
21
|
+
export type { LayoutOptions, LayoutViewOptions, LayoutTagOptions, LayoutAvailableContext, AutoGenerateTagsForLayoutsContext, GroupUnbalancedGroupsUnderKeyContext, LayoutAssociatedObject, } from './AdaptableOptions/LayoutOptions';
|
|
22
22
|
export type { OpenFinPluginOptions } from './AdaptableOptions/OpenFinPluginOptions';
|
|
23
23
|
export type { MasterDetailPluginOptions } from './AdaptableOptions/MasterDetailPluginOptions';
|
|
24
|
-
export type { FinancePluginOptions, WeightedAverageColumn, FDC3Column, InstrumentColumn, PositionColumn, CountryColumn, InstrumentIntent, InstrumentIntents, PositionIntent, PositionIntents, ContactIntent, ContactIntents, CountryIntent, CountryIntents, ContactColumn, OrganizationColumn, OrganizationIntent, OrganizationIntents, FDC3Intent, RaiseFDC3IntentContext, CustomFDC3Column, CustomFDC3Intent, } from './AdaptableOptions/FinancePluginOptions';
|
|
24
|
+
export type { FinancePluginOptions, WeightedAverageColumn, FDC3Column, InstrumentColumn, PositionColumn, CountryColumn, InstrumentIntent, InstrumentIntents, PositionIntent, PositionIntents, ContactIntent, ContactIntents, CountryIntent, CountryIntents, ContactColumn, OrganizationColumn, OrganizationIntent, OrganizationIntents, FDC3Intent, RaiseFDC3IntentContext, FDC3DesktopAgent, CustomFDC3Column, CustomFDC3Intent, } from './AdaptableOptions/FinancePluginOptions';
|
|
25
25
|
export type { DateInputOptions } from './AdaptableOptions/DateInputOptions';
|
|
26
26
|
export type { FilterOptions } from './AdaptableOptions/FilterOptions';
|
|
27
27
|
export type { SearchOptions } from './AdaptableOptions/SearchOptions';
|
|
28
28
|
export type { ColumnOptions, ColumnFriendlyNameContext } from './AdaptableOptions/ColumnOptions';
|
|
29
|
-
export type { AdaptablePersistStateFunction, AdaptableStateFunctionConfig, AdaptableLoadStateFunction, StateOptions, } from './AdaptableOptions/StateOptions';
|
|
29
|
+
export type { AdaptablePersistStateFunction, AdaptableStateFunctionConfig, AdaptableLoadStateFunction, AdaptableSaveStateFunction, AdaptableClearStateFunction, StateOptions, } from './AdaptableOptions/StateOptions';
|
|
30
30
|
export type { AccessLevel, Entitlement } from './PredefinedConfig/Common/Entitlement';
|
|
31
31
|
export type { FilterActionOnDataChange } from './PredefinedConfig/Common/FilterActionOnDataChange';
|
|
32
32
|
export type { ConfigState } from './PredefinedConfig/ConfigState';
|
|
@@ -147,7 +147,7 @@ export type { ConditionalStyle, ConditionalStyleRule, ConditionalStyleState, } f
|
|
|
147
147
|
export type { ChartDefinition, ChartingState } from './PredefinedConfig/ChartingState';
|
|
148
148
|
export type { CustomSort, CustomSortState } from './PredefinedConfig/CustomSortState';
|
|
149
149
|
export type { DashboardState, DashboardTab, AdaptableCoordinate, } from './PredefinedConfig/DashboardState';
|
|
150
|
-
export type { ExportState, Report, ReportData, ReportSchedule, SystemReportName, SystemReportNames, } from './PredefinedConfig/ExportState';
|
|
150
|
+
export type { ExportState, Report, ReportData, ReportSchedule, SystemReportName, SystemReportNames, ReportRowScope, ReportColumnScope, } from './PredefinedConfig/ExportState';
|
|
151
151
|
export type { ColumnFilter, ColumnFilterPredicate, SystemFilterPredicateIds, SystemFilterPredicateId, } from './PredefinedConfig/Common/ColumnFilter';
|
|
152
152
|
export type { FormatColumn, ColumnStyle, PercentBarStyle, GradientStyle, CellColorRange, ColumnComparison, CellTextOptions, CellTextOption, FormatColumnState, } from './PredefinedConfig/FormatColumnState';
|
|
153
153
|
export type { FreeTextColumn, FreeTextColumnState, FreeTextStoredValue, FreeTextColumnSettings, } from './PredefinedConfig/FreeTextColumnState';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "12.
|
|
1
|
+
declare const _default: "12.2.0-canary.0";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '12.
|
|
3
|
+
exports.default = '12.2.0-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutEditorStandalonePopup = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_redux_1 = require("react-redux");
|
|
7
|
-
const uuid_1 = require("../../components/utils/uuid");
|
|
8
|
-
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
9
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
10
|
-
const AdaptableContext_1 = require("../AdaptableContext");
|
|
11
|
-
const PanelFooter_1 = require("../Components/Panels/PanelFooter");
|
|
12
|
-
const LayoutEditorWizard_1 = require("./Wizard/LayoutEditorWizard");
|
|
13
|
-
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
14
|
-
const rebass_1 = require("rebass");
|
|
15
|
-
const LayoutEditorStandalonePopup = (props) => {
|
|
16
|
-
/**
|
|
17
|
-
* This is here because the old code mutates the object.
|
|
18
|
-
* And we need a way to trigger an update/render.
|
|
19
|
-
*
|
|
20
|
-
* I've left the mutation because we might want to use the old PopupWizard.
|
|
21
|
-
* And it currently, the refactoring of the editor out of the scope of this feature.
|
|
22
|
-
*/
|
|
23
|
-
const [stateLayout, setStateLayout] = React.useState(null);
|
|
24
|
-
const adaptable = AdaptableContext_1.useAdaptable();
|
|
25
|
-
const dispatch = react_redux_1.useDispatch();
|
|
26
|
-
const layoutModule = adaptable.ModuleService.getModuleById('Layout');
|
|
27
|
-
const layouts = react_redux_1.useSelector((state) => state.Layout.Layouts);
|
|
28
|
-
const layoutData = React.useMemo(() => {
|
|
29
|
-
var _a;
|
|
30
|
-
let layoutData = null;
|
|
31
|
-
const layoutToCloneOrEdit = (_a = props === null || props === void 0 ? void 0 : props.popupProps) === null || _a === void 0 ? void 0 : _a.layout;
|
|
32
|
-
switch (props.popupProps.action) {
|
|
33
|
-
case 'Clone':
|
|
34
|
-
layoutData = Helper_1.default.cloneObject(layoutToCloneOrEdit);
|
|
35
|
-
layoutData.Name = '';
|
|
36
|
-
layoutData.IsReadOnly = false;
|
|
37
|
-
layoutData.Uuid = uuid_1.createUuid();
|
|
38
|
-
break;
|
|
39
|
-
case 'New':
|
|
40
|
-
layoutData = ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
|
|
41
|
-
break;
|
|
42
|
-
case 'Edit':
|
|
43
|
-
layoutData = Helper_1.default.cloneObject(layoutToCloneOrEdit);
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
return layoutData;
|
|
47
|
-
}, []);
|
|
48
|
-
const handleCancel = React.useCallback(() => {
|
|
49
|
-
props.onDismiss();
|
|
50
|
-
}, []);
|
|
51
|
-
const handleAccept = React.useCallback(() => {
|
|
52
|
-
var _a;
|
|
53
|
-
switch ((_a = props === null || props === void 0 ? void 0 : props.popupProps) === null || _a === void 0 ? void 0 : _a.action) {
|
|
54
|
-
case 'Edit':
|
|
55
|
-
const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
|
|
56
|
-
dispatch(LayoutRedux.LayoutSave(layoutData));
|
|
57
|
-
if (currentLayout.Uuid === layoutData.Uuid) {
|
|
58
|
-
dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
|
|
59
|
-
}
|
|
60
|
-
break;
|
|
61
|
-
case 'Clone':
|
|
62
|
-
dispatch(LayoutRedux.LayoutAdd(layoutData));
|
|
63
|
-
dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
|
|
64
|
-
break;
|
|
65
|
-
case 'New':
|
|
66
|
-
dispatch(LayoutRedux.LayoutAdd(layoutData));
|
|
67
|
-
dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
|
|
68
|
-
}
|
|
69
|
-
props.onDismiss();
|
|
70
|
-
}, []);
|
|
71
|
-
const finishDisabled = !layoutData.Name;
|
|
72
|
-
return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column" },
|
|
73
|
-
React.createElement(LayoutEditorWizard_1.LayoutEditorWizard, { data: layoutData, api: adaptable.api, Layouts: layouts, moduleInfo: layoutModule.moduleInfo, onLayoutChange: setStateLayout,
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
updateGoBackState: () => null }),
|
|
76
|
-
React.createElement(PanelFooter_1.PanelFooter, { acceptDisabled: finishDisabled, onAccept: handleAccept, onCancel: handleCancel })));
|
|
77
|
-
};
|
|
78
|
-
exports.LayoutEditorStandalonePopup = LayoutEditorStandalonePopup;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableColumn } from '../../../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
-
import { CSSProperties } from 'react';
|
|
4
|
-
export declare type OnDragEnd = (result: {
|
|
5
|
-
destination?: {
|
|
6
|
-
index: number;
|
|
7
|
-
droppableId: string;
|
|
8
|
-
};
|
|
9
|
-
source: {
|
|
10
|
-
index: number;
|
|
11
|
-
columnId?: string;
|
|
12
|
-
column?: AdaptableColumn;
|
|
13
|
-
droppableId: string;
|
|
14
|
-
};
|
|
15
|
-
}) => void;
|
|
16
|
-
export interface ColumnListProps {
|
|
17
|
-
columns: AdaptableColumn[];
|
|
18
|
-
isDropDisabled?: boolean;
|
|
19
|
-
getItemStyle: (c: AdaptableColumn, { isDragging, draggingOver }: {
|
|
20
|
-
isDragging: boolean;
|
|
21
|
-
draggingOver?: string;
|
|
22
|
-
}, draggableStyle: CSSProperties) => CSSProperties;
|
|
23
|
-
onReady?: (onDragEnd: OnDragEnd) => void;
|
|
24
|
-
onColumnOrderChange: (columns: AdaptableColumn[]) => void;
|
|
25
|
-
renderItem?: (c: AdaptableColumn) => React.ReactNode;
|
|
26
|
-
}
|
|
27
|
-
export declare const ColumnList: (props: ColumnListProps) => JSX.Element;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
|
7
|
-
const AdaptableColumn_1 = require("../../../../PredefinedConfig/Common/AdaptableColumn");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const react_2 = require("react");
|
|
10
|
-
const droppableIds_1 = require("./droppableIds");
|
|
11
|
-
const utils_1 = require("./utils");
|
|
12
|
-
const rebass_1 = require("rebass");
|
|
13
|
-
const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/AdaptableFormControlTextClear");
|
|
14
|
-
const reorder_1 = require("../../../../Utilities/reorder");
|
|
15
|
-
const ColumnList = (props) => {
|
|
16
|
-
const [columns, setColumns] = react_2.useState(props.columns);
|
|
17
|
-
const [search, setSearch] = react_2.useState('');
|
|
18
|
-
const onDragEnd = React.useCallback((result) => {
|
|
19
|
-
const { source, destination } = result;
|
|
20
|
-
if (!destination) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (source.droppableId !== droppableIds_1.LayoutEditorDroppableIds.ColumnList ||
|
|
24
|
-
source.droppableId !== destination.droppableId) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (!source.column || !source.column.moveable) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (destination.index === source.index) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const newColumns = reorder_1.reorder(columns, source.index, destination.index);
|
|
34
|
-
const newDropIndex = newColumns.indexOf(source.column);
|
|
35
|
-
if (search && source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList) {
|
|
36
|
-
// cannot drop on this list while searching
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (!source.column.isFixed &&
|
|
40
|
-
newColumns.slice(newDropIndex).filter((c) => c.isFixed).length) {
|
|
41
|
-
// there are fixed cols after this one, so it's an invalid drop
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
if (!AdaptableColumn_1.isValidOrderForColumnGroups({
|
|
45
|
-
oldColumns: columns,
|
|
46
|
-
newColumns,
|
|
47
|
-
})) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
setColumns(newColumns);
|
|
51
|
-
if (props.onColumnOrderChange) {
|
|
52
|
-
props.onColumnOrderChange(newColumns);
|
|
53
|
-
}
|
|
54
|
-
}, [columns, setColumns, props.onColumnOrderChange, search]);
|
|
55
|
-
react_1.useEffect(() => {
|
|
56
|
-
if (props.onReady) {
|
|
57
|
-
props.onReady(onDragEnd);
|
|
58
|
-
}
|
|
59
|
-
}, [onDragEnd]);
|
|
60
|
-
const renderColumn = react_2.useCallback((c) => {
|
|
61
|
-
const defaultRenderColumn = (c) => {
|
|
62
|
-
return React.createElement(React.Fragment, null, c.friendlyName);
|
|
63
|
-
};
|
|
64
|
-
return (props.renderItem || defaultRenderColumn)(c);
|
|
65
|
-
}, [props.renderItem]);
|
|
66
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.ColumnList, isDropDisabled: search ? true : props.isDropDisabled }, (provided, snapshot) => {
|
|
67
|
-
return (React.createElement("div", Object.assign({ className: "ab-LayoutEditor__ColumnList" }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
|
|
68
|
-
React.createElement(rebass_1.Box, { px: 2, mb: 2 },
|
|
69
|
-
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { placeholder: "Search a column", width: "100%", value: search, OnTextChange: setSearch })),
|
|
70
|
-
columns.map((c, index) => {
|
|
71
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.columnId}-column`, draggableId: c.columnId, index: index }, (provided, snapshot) => {
|
|
72
|
-
const style = props.getItemStyle(c, snapshot, provided.draggableProps.style);
|
|
73
|
-
style.padding = 0;
|
|
74
|
-
// required in case of non-string values returned by `headerValueGetter`
|
|
75
|
-
const columnFriendlyName = typeof c.friendlyName === 'string' ? c.friendlyName : `${c.friendlyName}`;
|
|
76
|
-
if (search &&
|
|
77
|
-
columnFriendlyName.toLowerCase().indexOf(search.toLowerCase()) == -1) {
|
|
78
|
-
style.display = 'none';
|
|
79
|
-
}
|
|
80
|
-
return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__ColumnList__column", style: style }), renderColumn(c)));
|
|
81
|
-
}));
|
|
82
|
-
}),
|
|
83
|
-
provided.placeholder));
|
|
84
|
-
}));
|
|
85
|
-
};
|
|
86
|
-
exports.ColumnList = ColumnList;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CSSProperties } from 'react';
|
|
3
|
-
import { ColumnSort } from '../../../../PredefinedConfig/Common/ColumnSort';
|
|
4
|
-
import { OnDragEnd } from './ColumnList';
|
|
5
|
-
export interface ColumnSortListProps {
|
|
6
|
-
columnSorts?: ColumnSort[];
|
|
7
|
-
isDropDisabled?: boolean;
|
|
8
|
-
onReady?: (onDragEnd: OnDragEnd) => void;
|
|
9
|
-
onColumnSortsChange: (sorts: ColumnSort[]) => void;
|
|
10
|
-
getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
|
|
11
|
-
isDragging: boolean;
|
|
12
|
-
draggingOver?: string;
|
|
13
|
-
}, draggableStyle: CSSProperties) => CSSProperties;
|
|
14
|
-
renderItem: (c: ColumnSort, clear: () => void, toggleSort: () => void) => React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const ColumnSortList: (props: ColumnSortListProps) => JSX.Element;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnSortList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
|
8
|
-
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
9
|
-
const droppableIds_1 = require("./droppableIds");
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
const reorder_1 = require("../../../../Utilities/reorder");
|
|
12
|
-
const ColumnSortList = (props) => {
|
|
13
|
-
const columnSorts = props.columnSorts || [];
|
|
14
|
-
const setColumnSorts = (columnSorts) => {
|
|
15
|
-
props.onColumnSortsChange(columnSorts);
|
|
16
|
-
};
|
|
17
|
-
const onDragEnd = React.useCallback((result) => {
|
|
18
|
-
const { destination, source } = result;
|
|
19
|
-
if (!destination) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
23
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList;
|
|
24
|
-
const sortDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList &&
|
|
25
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList;
|
|
26
|
-
const valid = columnDrag || sortDrag;
|
|
27
|
-
if (!valid) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (sortDrag) {
|
|
31
|
-
if (destination.index === source.index) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const newColumnSorts = reorder_1.reorder(columnSorts, source.index, destination.index);
|
|
35
|
-
setColumnSorts(newColumnSorts);
|
|
36
|
-
if (props.onColumnSortsChange) {
|
|
37
|
-
props.onColumnSortsChange(newColumnSorts);
|
|
38
|
-
}
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (columnDrag) {
|
|
42
|
-
if (!source.column.sortable) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (columnSorts.filter((c) => c.ColumnId === source.columnId)[0]) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
const newColumnSorts = [...columnSorts];
|
|
49
|
-
newColumnSorts.splice(destination.index, 0, {
|
|
50
|
-
SortOrder: 'Asc',
|
|
51
|
-
ColumnId: source.columnId,
|
|
52
|
-
});
|
|
53
|
-
setColumnSorts(newColumnSorts);
|
|
54
|
-
if (props.onColumnSortsChange) {
|
|
55
|
-
props.onColumnSortsChange(newColumnSorts);
|
|
56
|
-
}
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
}, [columnSorts, setColumnSorts, props.onColumnSortsChange]);
|
|
60
|
-
const toggleSort = (c) => {
|
|
61
|
-
setColumnSorts(columnSorts.map((sort) => {
|
|
62
|
-
if (sort.ColumnId === c.ColumnId) {
|
|
63
|
-
sort = Object.assign(Object.assign({}, sort), { SortOrder: c.SortOrder === 'Asc' ? 'Desc' : 'Asc' });
|
|
64
|
-
}
|
|
65
|
-
return sort;
|
|
66
|
-
}));
|
|
67
|
-
};
|
|
68
|
-
react_1.useEffect(() => {
|
|
69
|
-
if (props.onReady) {
|
|
70
|
-
props.onReady(onDragEnd);
|
|
71
|
-
}
|
|
72
|
-
}, [onDragEnd]);
|
|
73
|
-
const renderItem = (c) => {
|
|
74
|
-
return props.renderItem(c, () => {
|
|
75
|
-
setColumnSorts(props.columnSorts.filter((sort) => sort.ColumnId !== c.ColumnId));
|
|
76
|
-
}, () => {
|
|
77
|
-
toggleSort(c);
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.ColumnSortList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__ColumnSortList ${!columnSorts.length ? 'ab-LayoutEditor__ColumnSortList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
|
|
81
|
-
!columnSorts.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to create sort order") : null,
|
|
82
|
-
columnSorts.map((c, index) => {
|
|
83
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.ColumnId}-sort`, draggableId: `${c.ColumnId}-sort`, index: index }, (provided, snapshot) => {
|
|
84
|
-
return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__ColumnSortList__column", style: props.getItemStyle(c.ColumnId, snapshot, provided.draggableProps.style) }), renderItem(c)));
|
|
85
|
-
}));
|
|
86
|
-
}),
|
|
87
|
-
provided.placeholder))));
|
|
88
|
-
};
|
|
89
|
-
exports.ColumnSortList = ColumnSortList;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CSSProperties } from 'react';
|
|
3
|
-
import { OnDragEnd } from './ColumnList';
|
|
4
|
-
export interface PivotListProps {
|
|
5
|
-
pivotColumns?: string[];
|
|
6
|
-
isDropDisabled?: boolean;
|
|
7
|
-
onReady?: (onDragEnd: OnDragEnd) => void;
|
|
8
|
-
onPivotColumnsChange: (rowGroups: string[]) => void;
|
|
9
|
-
getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
|
|
10
|
-
isDragging: boolean;
|
|
11
|
-
draggingOver?: string;
|
|
12
|
-
}, draggableStyle: CSSProperties) => CSSProperties;
|
|
13
|
-
renderItem?: (columnId: string, clear: () => void) => React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export declare const PivotList: (props: PivotListProps) => JSX.Element;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PivotList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
9
|
-
const droppableIds_1 = require("./droppableIds");
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
const reorder_1 = require("../../../../Utilities/reorder");
|
|
12
|
-
const PivotList = (props) => {
|
|
13
|
-
const pivotColumns = props.pivotColumns || [];
|
|
14
|
-
const setPivotColumns = (pivotColumns) => {
|
|
15
|
-
props.onPivotColumnsChange(pivotColumns);
|
|
16
|
-
};
|
|
17
|
-
const onDragEnd = React.useCallback((result) => {
|
|
18
|
-
const { destination, source } = result;
|
|
19
|
-
if (!destination) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
23
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList;
|
|
24
|
-
const pivotDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList &&
|
|
25
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList;
|
|
26
|
-
const valid = columnDrag || pivotDrag;
|
|
27
|
-
if (!valid) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (pivotDrag) {
|
|
31
|
-
if (destination.index === source.index) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const newPivotColumns = reorder_1.reorder(pivotColumns, source.index, destination.index);
|
|
35
|
-
setPivotColumns(newPivotColumns);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (columnDrag) {
|
|
39
|
-
if (!source.column.pivotable) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (pivotColumns.filter((colId) => colId === source.columnId)[0]) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
const newPivotColumns = [...pivotColumns];
|
|
46
|
-
newPivotColumns.splice(destination.index, 0, source.columnId);
|
|
47
|
-
setPivotColumns(newPivotColumns);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}, [pivotColumns, setPivotColumns, props.onPivotColumnsChange]);
|
|
51
|
-
react_1.useEffect(() => {
|
|
52
|
-
if (props.onReady) {
|
|
53
|
-
props.onReady(onDragEnd);
|
|
54
|
-
}
|
|
55
|
-
}, [onDragEnd]);
|
|
56
|
-
const renderItem = React.useCallback((colId) => {
|
|
57
|
-
return props.renderItem(colId, () => {
|
|
58
|
-
setPivotColumns(pivotColumns.filter((pivotColId) => pivotColId !== colId));
|
|
59
|
-
});
|
|
60
|
-
}, [props.renderItem]);
|
|
61
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.PivotList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__PivotList ${!pivotColumns.length ? 'ab-LayoutEditor__PivotList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
|
|
62
|
-
!pivotColumns.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to pivot") : null,
|
|
63
|
-
pivotColumns.map((colId, index) => {
|
|
64
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: colId, draggableId: `${colId}-pivot`, index: index }, (provided, snapshot) => {
|
|
65
|
-
return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__PivotList__column", style: props.getItemStyle(colId, snapshot, provided.draggableProps.style) }), renderItem(colId)));
|
|
66
|
-
}));
|
|
67
|
-
}),
|
|
68
|
-
provided.placeholder))));
|
|
69
|
-
};
|
|
70
|
-
exports.PivotList = PivotList;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CSSProperties } from 'react';
|
|
3
|
-
import { OnDragEnd } from './ColumnList';
|
|
4
|
-
export interface RowGroupsListProps {
|
|
5
|
-
rowGroups?: string[];
|
|
6
|
-
isDropDisabled?: boolean;
|
|
7
|
-
onReady?: (onDragEnd: OnDragEnd) => void;
|
|
8
|
-
onRowGroupsChange: (rowGroups: string[]) => void;
|
|
9
|
-
getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
|
|
10
|
-
isDragging: boolean;
|
|
11
|
-
draggingOver?: string;
|
|
12
|
-
}, draggableStyle: CSSProperties) => CSSProperties;
|
|
13
|
-
renderItem?: (columnId: string, clear: () => void) => React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export declare const RowGroupsList: (props: RowGroupsListProps) => JSX.Element;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RowGroupsList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
9
|
-
const droppableIds_1 = require("./droppableIds");
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
const reorder_1 = require("../../../../Utilities/reorder");
|
|
12
|
-
const RowGroupsList = (props) => {
|
|
13
|
-
const rowGroups = props.rowGroups || [];
|
|
14
|
-
const setRowGroups = (rowGroups) => {
|
|
15
|
-
props.onRowGroupsChange(rowGroups);
|
|
16
|
-
};
|
|
17
|
-
const onDragEnd = React.useCallback((result) => {
|
|
18
|
-
const { destination, source } = result;
|
|
19
|
-
if (!destination) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
|
|
23
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList;
|
|
24
|
-
const rowGroupsDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList &&
|
|
25
|
-
destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList;
|
|
26
|
-
const valid = columnDrag || rowGroupsDrag;
|
|
27
|
-
if (!valid) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (rowGroupsDrag) {
|
|
31
|
-
if (destination.index === source.index) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const newRowGroups = reorder_1.reorder(rowGroups, source.index, destination.index);
|
|
35
|
-
setRowGroups(newRowGroups);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (columnDrag) {
|
|
39
|
-
if (!source.column.groupable) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (rowGroups.filter((colId) => colId === source.columnId)[0]) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
const newRowGroups = [...rowGroups];
|
|
46
|
-
newRowGroups.splice(destination.index, 0, source.columnId);
|
|
47
|
-
setRowGroups(newRowGroups);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}, [rowGroups, setRowGroups, props.onRowGroupsChange]);
|
|
51
|
-
react_1.useEffect(() => {
|
|
52
|
-
if (props.onReady) {
|
|
53
|
-
props.onReady(onDragEnd);
|
|
54
|
-
}
|
|
55
|
-
}, [onDragEnd]);
|
|
56
|
-
const renderItem = React.useCallback((colId) => {
|
|
57
|
-
return props.renderItem(colId, () => {
|
|
58
|
-
setRowGroups(rowGroups.filter((rowGroup) => rowGroup !== colId));
|
|
59
|
-
});
|
|
60
|
-
}, [props.renderItem]);
|
|
61
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.RowGroupsList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__RowGroupsList ${!rowGroups.length ? 'ab-LayoutEditor__RowGroupsList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
|
|
62
|
-
!rowGroups.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to create row groups") : null,
|
|
63
|
-
rowGroups.map((colId, index) => {
|
|
64
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { key: colId, draggableId: `${colId}-rowGroup`, index: index }, (provided, snapshot) => {
|
|
65
|
-
return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__RowGroupsList__column", style: props.getItemStyle(colId, snapshot, provided.draggableProps.style) }), renderItem(colId)));
|
|
66
|
-
}));
|
|
67
|
-
}),
|
|
68
|
-
provided.placeholder))));
|
|
69
|
-
};
|
|
70
|
-
exports.RowGroupsList = RowGroupsList;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutEditorDroppableIds = void 0;
|
|
4
|
-
var LayoutEditorDroppableIds;
|
|
5
|
-
(function (LayoutEditorDroppableIds) {
|
|
6
|
-
LayoutEditorDroppableIds["None"] = "";
|
|
7
|
-
LayoutEditorDroppableIds["ColumnList"] = "ColumnList";
|
|
8
|
-
LayoutEditorDroppableIds["ColumnSortList"] = "ColumnSortList";
|
|
9
|
-
LayoutEditorDroppableIds["RowGroupsList"] = "RowGroupsList";
|
|
10
|
-
LayoutEditorDroppableIds["PivotList"] = "PivotList";
|
|
11
|
-
})(LayoutEditorDroppableIds = exports.LayoutEditorDroppableIds || (exports.LayoutEditorDroppableIds = {}));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { AdaptableColumn, Layout } from '../../../../types';
|
|
3
|
-
import { LayoutEditorDroppableIds } from './droppableIds';
|
|
4
|
-
import { DraggableSnapshot } from './utils';
|
|
5
|
-
export declare type LayoutGetItemStyle = (column: AdaptableColumn, layout: Layout, dragSource: LayoutEditorDroppableIds, { isDragging, draggingOver }: DraggableSnapshot, draggableStyle: CSSProperties) => CSSProperties;
|
|
6
|
-
export declare const getItemStyle: LayoutGetItemStyle;
|