@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +568 -273
- package/bundle.cjs.js +114 -114
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -0
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -7
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +9 -8
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +25 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +88 -57
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +9 -4
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +26 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +4 -5
- package/src/Api/ExportApi.d.ts +2 -2
- package/src/Api/FilterApi.d.ts +28 -36
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.js +17 -16
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +11 -11
- package/src/Api/Implementation/FilterApiImpl.js +59 -72
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +7 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +14 -3
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +20 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PredicateApiImpl.js +19 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
- package/src/Api/InternalApi.d.ts +3 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +8 -2
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/FormContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/FormContext.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +134 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/BulkUpdateModule.js +3 -4
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +29 -16
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +26 -20
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +25 -2
- package/src/Strategy/PlusMinusModule.js +1 -4
- package/src/Strategy/SmartEditModule.js +3 -3
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +8 -2
- package/src/Utilities/Constants/GeneralConstants.js +8 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +17 -15
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +6 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +1 -0
- package/src/Utilities/Services/RowEditService.js +34 -2
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +8 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +3 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +18 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +87 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +18 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +16 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +2 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +2 -75
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +3 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +9 -4
- package/src/View/AdaptableWizardView/Utils.d.ts +1 -0
- package/src/View/AdaptableWizardView/Utils.js +24 -0
- package/src/View/AdaptableWizardView/Wizard.d.ts +54 -0
- package/src/View/AdaptableWizardView/Wizard.js +98 -0
- package/src/View/AdaptableWizardView/index.d.ts +1 -22
- package/src/View/AdaptableWizardView/index.js +2 -103
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -6
- package/src/View/CellSummary/CellSummaryDetails.js +4 -4
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +10 -8
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/PreviewResultsPanel.js +3 -3
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Components/WizardSummaryPage.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +5 -4
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +10 -13
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +5 -6
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +2 -2
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleSummary.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +2 -2
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +10 -10
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -2
- package/src/View/Wizard/ObjectTagsWizardSection.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +5 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +35 -169
- package/src/View/Wizard/OnePageWizards.d.ts +37 -0
- package/src/View/Wizard/OnePageWizards.js +187 -0
- package/src/View/Wizard/useKeyboardNavigation.d.ts +1 -1
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +99 -58
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +7 -8
- package/src/agGrid/agGridHelper.js +68 -86
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +1 -0
- package/src/agGrid/rowEditIcons.js +2 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/InfiniteTable/index.js +1 -0
- package/src/components/List/GridList/index.js +1 -1
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/WindowModal/WindowModal.js +13 -7
- package/src/components/icons/{data-source.d.ts → add-row.d.ts} +0 -0
- package/src/components/icons/add-row.js +7 -0
- package/src/components/icons/data-set.d.ts +3 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +4 -2
- package/src/metamodel/adaptable.metamodel.d.ts +163 -78
- package/src/metamodel/adaptable.metamodel.js +402 -322
- package/src/types.d.ts +16 -12
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const useSelection: (columns: {
|
|
2
2
|
[key: string]: any;
|
|
3
|
-
}[], defaultValue: boolean
|
|
3
|
+
}[], defaultValue: boolean | {
|
|
4
|
+
[key: string]: boolean;
|
|
5
|
+
}, fieldName: string | null, changeListeners?: {
|
|
4
6
|
onChange?: (column: any, flag: boolean) => void;
|
|
5
7
|
onBatchChange?: (flag: boolean) => void;
|
|
6
8
|
}) => {
|
|
@@ -5,10 +5,15 @@ const useSelection = (columns, defaultValue, fieldName, changeListeners) => {
|
|
|
5
5
|
changeListeners = changeListeners || {};
|
|
6
6
|
const onChange = changeListeners.onChange || ((column, flag) => { });
|
|
7
7
|
const onBatchChange = changeListeners.onBatchChange || ((flag) => { });
|
|
8
|
-
const [selected, setSelected] = react_1.useState(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const [selected, setSelected] = react_1.useState(typeof defaultValue === 'object'
|
|
9
|
+
? defaultValue
|
|
10
|
+
: columns.reduce((acc, col) => {
|
|
11
|
+
const flag = fieldName ? col[fieldName] : defaultValue;
|
|
12
|
+
if (flag) {
|
|
13
|
+
acc[col.field] = flag;
|
|
14
|
+
}
|
|
15
|
+
return acc;
|
|
16
|
+
}, {}));
|
|
12
17
|
const getColumn = (field) => columns.filter((c) => c.field === field)[0];
|
|
13
18
|
const result = {
|
|
14
19
|
selected,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validDataSource: (dataSourceInfo: any) => boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validDataSource = void 0;
|
|
4
|
+
exports.validDataSource = (dataSourceInfo) => {
|
|
5
|
+
if (!dataSourceInfo || !Array.isArray(dataSourceInfo.columns)) {
|
|
6
|
+
throw `We can't find any columns in your configuration`;
|
|
7
|
+
}
|
|
8
|
+
if (!dataSourceInfo.columns.length) {
|
|
9
|
+
throw 'You should have at least one column';
|
|
10
|
+
}
|
|
11
|
+
const allStringColumns = dataSourceInfo.columns.reduce((acc, col) => {
|
|
12
|
+
if (!col || typeof col !== 'string') {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return acc;
|
|
16
|
+
}, true);
|
|
17
|
+
if (!allStringColumns) {
|
|
18
|
+
throw `Some of your columns are not strings`;
|
|
19
|
+
}
|
|
20
|
+
if (!Array.isArray(dataSourceInfo.data)) {
|
|
21
|
+
throw `We can't find the data array in your configuration`;
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Reducer, ReactNode } from 'react';
|
|
3
|
+
import { AdaptableOptions } from '../../types';
|
|
4
|
+
import { ConfigurationWizardProps } from './AdaptableConfigurationDialog/ConfigurationWizard';
|
|
5
|
+
export interface AdaptableWizardViewProps {
|
|
6
|
+
adaptableOptions?: Omit<AdaptableOptions, 'primaryKey'> & {
|
|
7
|
+
primaryKey?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Default true.
|
|
11
|
+
*/
|
|
12
|
+
ddEnabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* When true the the configuration wizard will be shown.
|
|
15
|
+
* It will use the available information in adaptableOptions & gridOptions.
|
|
16
|
+
* This mode skips over interpreting data to figure-out columns.
|
|
17
|
+
*/
|
|
18
|
+
skipToWizard?: boolean;
|
|
19
|
+
onInit: (adaptableOptions: AdaptableOptions) => any;
|
|
20
|
+
fileContentsToJSON?: (str: string) => Promise<any> | any;
|
|
21
|
+
readFile?: (file: File) => Promise<any>;
|
|
22
|
+
fileAccept?: string;
|
|
23
|
+
helpText?: React.ReactNode;
|
|
24
|
+
loadingMessage?: ReactNode;
|
|
25
|
+
defaultActionMessage?: ReactNode;
|
|
26
|
+
dragOverActionMessage?: ReactNode;
|
|
27
|
+
fetchData?: () => Promise<Record<string, any>[]>;
|
|
28
|
+
showFetchDataWizard?: boolean;
|
|
29
|
+
startSections?: ConfigurationWizardProps['startSections'];
|
|
30
|
+
prepareData?: (data: any, file?: File) => {
|
|
31
|
+
columns: string[];
|
|
32
|
+
data: any[];
|
|
33
|
+
primaryKey?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare const initialState: Partial<WizardState>;
|
|
37
|
+
export declare const reducer: Reducer<WizardState, any>;
|
|
38
|
+
interface WizardState {
|
|
39
|
+
dropped: boolean;
|
|
40
|
+
error: any;
|
|
41
|
+
adaptableOptions: AdaptableOptions;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The wizard in a few modes:
|
|
45
|
+
*
|
|
46
|
+
* 1. Based on data:
|
|
47
|
+
* 1.1 Drag and drop a file
|
|
48
|
+
* 1.2 Fetch data from a url
|
|
49
|
+
*
|
|
50
|
+
* 2. Based on configuration:
|
|
51
|
+
* Provide a schema, on how the data looks like.
|
|
52
|
+
*/
|
|
53
|
+
export declare const Wizard: (props: AdaptableWizardViewProps) => JSX.Element;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Wizard = exports.reducer = exports.initialState = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const helper_1 = require("./helper");
|
|
8
|
+
const rebass_1 = require("rebass");
|
|
9
|
+
const AdaptableConfigurationDialog_1 = tslib_1.__importDefault(require("./AdaptableConfigurationDialog"));
|
|
10
|
+
const FileDroppable_1 = tslib_1.__importDefault(require("../../components/FileDroppable"));
|
|
11
|
+
const Utils_1 = require("./Utils");
|
|
12
|
+
exports.initialState = {
|
|
13
|
+
dropped: false,
|
|
14
|
+
};
|
|
15
|
+
exports.reducer = (state, action) => {
|
|
16
|
+
if (action.type === 'DROPPED') {
|
|
17
|
+
return Object.assign(Object.assign({}, state), { adaptableOptions: action.payload, dropped: true, error: null });
|
|
18
|
+
}
|
|
19
|
+
if (action.type === 'ERROR') {
|
|
20
|
+
return Object.assign(Object.assign({}, state), { dropped: false, error: action.payload });
|
|
21
|
+
}
|
|
22
|
+
if (action.type === 'CANCEL') {
|
|
23
|
+
return Object.assign(Object.assign({}, state), { error: null, dropped: false });
|
|
24
|
+
}
|
|
25
|
+
return state;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The wizard in a few modes:
|
|
29
|
+
*
|
|
30
|
+
* 1. Based on data:
|
|
31
|
+
* 1.1 Drag and drop a file
|
|
32
|
+
* 1.2 Fetch data from a url
|
|
33
|
+
*
|
|
34
|
+
* 2. Based on configuration:
|
|
35
|
+
* Provide a schema, on how the data looks like.
|
|
36
|
+
*/
|
|
37
|
+
exports.Wizard = (props) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const [state, dispatch] = react_1.useReducer(exports.reducer, Object.assign(Object.assign({}, exports.initialState), { adaptableOptions: props.adaptableOptions }));
|
|
40
|
+
const [droppableKey, setDroppableKey] = react_1.useState(Date.now());
|
|
41
|
+
const [isDataLoading, setIsDataLoading] = react_1.useState(false);
|
|
42
|
+
const handleDataSource = (array, file) => {
|
|
43
|
+
const dataSourceInfo = (props.prepareData || helper_1.prepareDataSource)(array, file);
|
|
44
|
+
try {
|
|
45
|
+
Utils_1.validDataSource(dataSourceInfo);
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
return dispatch({
|
|
49
|
+
type: 'ERROR',
|
|
50
|
+
payload: `Invalid adaptable configuration - ${err}`,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const gridOptions = helper_1.prepareGridOptions(dataSourceInfo);
|
|
54
|
+
const adaptableOptions = Object.assign({}, props.adaptableOptions);
|
|
55
|
+
adaptableOptions.adaptableId = adaptableOptions.adaptableId || (file ? file.name : '');
|
|
56
|
+
adaptableOptions.gridOptions = gridOptions;
|
|
57
|
+
if (dataSourceInfo.primaryKey) {
|
|
58
|
+
adaptableOptions.primaryKey = dataSourceInfo.primaryKey;
|
|
59
|
+
}
|
|
60
|
+
const shouldShowWizard = props.fetchData ? Boolean(props.showFetchDataWizard) : true;
|
|
61
|
+
if (shouldShowWizard) {
|
|
62
|
+
dispatch({
|
|
63
|
+
type: 'DROPPED',
|
|
64
|
+
payload: adaptableOptions,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
props.onInit(adaptableOptions);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
let wizard;
|
|
72
|
+
if (props.skipToWizard || state.dropped) {
|
|
73
|
+
wizard = (React.createElement(AdaptableConfigurationDialog_1.default, { startSections: props.startSections, adaptableOptions: state.adaptableOptions, onCancel: () => {
|
|
74
|
+
// change the file droppable component key
|
|
75
|
+
// so it's remounted and it's in the initial state
|
|
76
|
+
setDroppableKey(Date.now());
|
|
77
|
+
dispatch({
|
|
78
|
+
type: 'CANCEL',
|
|
79
|
+
});
|
|
80
|
+
}, onFinish: (adaptableOptions) => {
|
|
81
|
+
props.onInit(adaptableOptions);
|
|
82
|
+
} }));
|
|
83
|
+
}
|
|
84
|
+
react_1.useEffect(() => {
|
|
85
|
+
if (props.fetchData) {
|
|
86
|
+
setIsDataLoading(true);
|
|
87
|
+
props.fetchData().then((data) => {
|
|
88
|
+
handleDataSource(data);
|
|
89
|
+
setIsDataLoading(false);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}, []);
|
|
93
|
+
const ddEnabled = (_a = props.ddEnabled) !== null && _a !== void 0 ? _a : !props.fetchData;
|
|
94
|
+
return (React.createElement(React.Fragment, null,
|
|
95
|
+
ddEnabled && (React.createElement(FileDroppable_1.default, { key: droppableKey, className: 'ab-nocode-wizard', toJSON: props.fileContentsToJSON, readFile: props.readFile, fileAccept: props.fileAccept, helpText: props.helpText, message: state.error, defaultText: props.defaultActionMessage, dragOverText: props.dragOverActionMessage, loadingText: props.loadingMessage, onDropSuccess: handleDataSource })),
|
|
96
|
+
isDataLoading && (React.createElement(rebass_1.Flex, { className: 'ab-nocode-wizard', alignItems: "center", justifyContent: "center", flexDirection: "column" }, props.loadingMessage || 'Loading ...')),
|
|
97
|
+
wizard));
|
|
98
|
+
};
|
|
@@ -1,25 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions';
|
|
4
|
-
interface AdaptableWizardViewProps {
|
|
5
|
-
adaptableOptions?: Omit<AdaptableOptions, 'primaryKey'> & {
|
|
6
|
-
primaryKey?: string;
|
|
7
|
-
};
|
|
8
|
-
onInit: (adaptableOptions: AdaptableOptions) => any;
|
|
9
|
-
fileContentsToJSON?: (str: string) => Promise<any> | any;
|
|
10
|
-
readFile?: (file: File) => Promise<any>;
|
|
11
|
-
fileAccept?: string;
|
|
12
|
-
helpText?: React.ReactNode;
|
|
13
|
-
loadingMessage?: ReactNode;
|
|
14
|
-
defaultActionMessage?: ReactNode;
|
|
15
|
-
dragOverActionMessage?: ReactNode;
|
|
16
|
-
fetchData?: () => Promise<Record<string, any>[]>;
|
|
17
|
-
showFetchDataWizard?: boolean;
|
|
18
|
-
prepareData?: (data: any, file?: File) => {
|
|
19
|
-
columns: string[];
|
|
20
|
-
data: any[];
|
|
21
|
-
primaryKey?: string;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
2
|
+
import { AdaptableWizardViewProps } from './Wizard';
|
|
24
3
|
declare const AdaptableWizardView: React.FunctionComponent<AdaptableWizardViewProps>;
|
|
25
4
|
export default AdaptableWizardView;
|
|
@@ -3,109 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
5
|
const styled_components_1 = require("styled-components");
|
|
6
|
-
const react_1 = require("react");
|
|
7
6
|
const theme_1 = tslib_1.__importDefault(require("../../theme"));
|
|
8
|
-
const
|
|
9
|
-
const helper_1 = require("./helper");
|
|
10
|
-
const rebass_1 = require("rebass");
|
|
11
|
-
const AdaptableConfigurationDialog_1 = tslib_1.__importDefault(require("./AdaptableConfigurationDialog"));
|
|
7
|
+
const Wizard_1 = require("./Wizard");
|
|
12
8
|
const AdaptableWizardView = (props) => (React.createElement(styled_components_1.ThemeProvider, { theme: theme_1.default },
|
|
13
|
-
React.createElement(Wizard, Object.assign({}, props))));
|
|
14
|
-
const initialState = {
|
|
15
|
-
dropped: false,
|
|
16
|
-
};
|
|
17
|
-
const reducer = (state, action) => {
|
|
18
|
-
if (action.type === 'DROPPED') {
|
|
19
|
-
return Object.assign(Object.assign({}, state), { adaptableOptions: action.payload, dropped: true, error: null });
|
|
20
|
-
}
|
|
21
|
-
if (action.type === 'ERROR') {
|
|
22
|
-
return Object.assign(Object.assign({}, state), { dropped: false, error: action.payload });
|
|
23
|
-
}
|
|
24
|
-
if (action.type === 'CANCEL') {
|
|
25
|
-
return Object.assign(Object.assign({}, state), { error: null, dropped: false });
|
|
26
|
-
}
|
|
27
|
-
return state;
|
|
28
|
-
};
|
|
29
|
-
const validDataSource = (dataSourceInfo) => {
|
|
30
|
-
if (!dataSourceInfo || !Array.isArray(dataSourceInfo.columns)) {
|
|
31
|
-
throw `We can't find any columns in your configuration`;
|
|
32
|
-
}
|
|
33
|
-
if (!dataSourceInfo.columns.length) {
|
|
34
|
-
throw 'You should have at least one column';
|
|
35
|
-
}
|
|
36
|
-
const allStringColumns = dataSourceInfo.columns.reduce((acc, col) => {
|
|
37
|
-
if (!col || typeof col !== 'string') {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
return acc;
|
|
41
|
-
}, true);
|
|
42
|
-
if (!allStringColumns) {
|
|
43
|
-
throw `Some of your columns are not strings`;
|
|
44
|
-
}
|
|
45
|
-
if (!Array.isArray(dataSourceInfo.data)) {
|
|
46
|
-
throw `We can't find the data array in your configuration`;
|
|
47
|
-
}
|
|
48
|
-
return true;
|
|
49
|
-
};
|
|
50
|
-
const Wizard = (props) => {
|
|
51
|
-
const [state, dispatch] = react_1.useReducer(reducer, Object.assign(Object.assign({}, initialState), { adaptableOptions: props.adaptableOptions }));
|
|
52
|
-
const [droppableKey, setDroppableKey] = react_1.useState(Date.now());
|
|
53
|
-
const [isDataLoading, setIsDataLoading] = react_1.useState(false);
|
|
54
|
-
const handleDataSource = (array, file) => {
|
|
55
|
-
const dataSourceInfo = (props.prepareData || helper_1.prepareDataSource)(array, file);
|
|
56
|
-
try {
|
|
57
|
-
validDataSource(dataSourceInfo);
|
|
58
|
-
}
|
|
59
|
-
catch (err) {
|
|
60
|
-
return dispatch({
|
|
61
|
-
type: 'ERROR',
|
|
62
|
-
payload: `Invalid adaptable configuration - ${err}`,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
const gridOptions = helper_1.prepareGridOptions(dataSourceInfo);
|
|
66
|
-
const adaptableOptions = Object.assign({}, props.adaptableOptions);
|
|
67
|
-
adaptableOptions.adaptableId = adaptableOptions.adaptableId || (file ? file.name : '');
|
|
68
|
-
adaptableOptions.gridOptions = gridOptions;
|
|
69
|
-
if (dataSourceInfo.primaryKey) {
|
|
70
|
-
adaptableOptions.primaryKey = dataSourceInfo.primaryKey;
|
|
71
|
-
}
|
|
72
|
-
const shouldShowWizard = props.fetchData ? Boolean(props.showFetchDataWizard) : true;
|
|
73
|
-
if (shouldShowWizard) {
|
|
74
|
-
dispatch({
|
|
75
|
-
type: 'DROPPED',
|
|
76
|
-
payload: adaptableOptions,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
props.onInit(adaptableOptions);
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
let wizard;
|
|
84
|
-
if (state.dropped) {
|
|
85
|
-
wizard = (React.createElement(AdaptableConfigurationDialog_1.default, { adaptableOptions: state.adaptableOptions, onCancel: () => {
|
|
86
|
-
// change the file droppable component key
|
|
87
|
-
// so it's remounted and it's in the initial state
|
|
88
|
-
setDroppableKey(Date.now());
|
|
89
|
-
dispatch({
|
|
90
|
-
type: 'CANCEL',
|
|
91
|
-
});
|
|
92
|
-
}, onFinish: (adaptableOptions) => {
|
|
93
|
-
props.onInit(adaptableOptions);
|
|
94
|
-
} }));
|
|
95
|
-
}
|
|
96
|
-
react_1.useEffect(() => {
|
|
97
|
-
if (props.fetchData) {
|
|
98
|
-
setIsDataLoading(true);
|
|
99
|
-
props.fetchData().then((data) => {
|
|
100
|
-
handleDataSource(data);
|
|
101
|
-
setIsDataLoading(false);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}, []);
|
|
105
|
-
const ddEnabled = !props.fetchData;
|
|
106
|
-
return (React.createElement(React.Fragment, null,
|
|
107
|
-
ddEnabled && (React.createElement(FileDroppable_1.default, { key: droppableKey, className: 'ab-nocode-wizard', toJSON: props.fileContentsToJSON, readFile: props.readFile, fileAccept: props.fileAccept, helpText: props.helpText, message: state.error, defaultText: props.defaultActionMessage, dragOverText: props.dragOverActionMessage, loadingText: props.loadingMessage, onDropSuccess: handleDataSource })),
|
|
108
|
-
isDataLoading && (React.createElement(rebass_1.Flex, { className: 'ab-nocode-wizard', alignItems: "center", justifyContent: "center", flexDirection: "column" }, props.loadingMessage || 'Loading ...')),
|
|
109
|
-
wizard));
|
|
110
|
-
};
|
|
9
|
+
React.createElement(Wizard_1.Wizard, Object.assign({}, props))));
|
|
111
10
|
exports.default = AdaptableWizardView;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActiveAlertsPanel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
7
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
|
+
const AdaptableObjectCompactList_1 = require("../Components/AdaptableObjectList/AdaptableObjectCompactList");
|
|
9
|
+
const react_redux_1 = require("react-redux");
|
|
10
|
+
exports.ActiveAlertsPanel = () => {
|
|
11
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
12
|
+
const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
13
|
+
const alerts = react_redux_1.useSelector((state) => state.System.AdaptableAlerts);
|
|
14
|
+
return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
|
|
15
|
+
};
|
|
@@ -5,16 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
-
const AlertsPanel_1 = require("./AlertsPanel");
|
|
9
8
|
const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
|
|
10
9
|
const StatusBarPanel_1 = require("../StatusBar/StatusBarPanel");
|
|
11
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
12
10
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
11
|
+
const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
|
|
13
12
|
const initialStyle = { color: '', background: '' };
|
|
14
13
|
exports.AlertStatusPanel = () => {
|
|
15
14
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
15
|
const [style, setStyle] = React.useState(initialStyle);
|
|
17
|
-
const dispatch = react_redux_1.useDispatch();
|
|
18
16
|
const module = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
19
17
|
const statusbarHighlightDuration = adaptable.adaptableOptions.alertOptions.statusbarHighlightDuration;
|
|
20
18
|
/**
|
|
@@ -49,9 +47,6 @@ exports.AlertStatusPanel = () => {
|
|
|
49
47
|
setStyle(initialStyle);
|
|
50
48
|
}, statusbarHighlightDuration);
|
|
51
49
|
}, [alerts]);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const handleDeleteAllAlerts = React.useCallback((alerts) => dispatch(SystemRedux.SystemAlertDeleteAll(alerts)), []);
|
|
55
|
-
let alertsPanel = (React.createElement(AlertsPanel_1.AlertsPanel, { Alerts: alerts, ShowPanel: true, ShowHeader: false, onClearAlert: handleDeleteAlert, onClearAllAlerts: handleDeleteAllAlerts }));
|
|
56
|
-
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
|
|
50
|
+
let alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
|
|
51
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, { tooltip: module.moduleInfo.ModuleName, "data-name": module.moduleInfo.ModuleName, color: style.color, backgroundColor: style.background, onAction: handleAction, icon: module.moduleInfo.Glyph, popover: alerts.length ? alertsPanel : null, content: text }));
|
|
57
52
|
};
|
|
@@ -6,10 +6,10 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
8
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
9
|
-
const AlertsPanel_1 = require("./AlertsPanel");
|
|
10
9
|
const rebass_1 = require("rebass");
|
|
11
10
|
const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
|
|
12
11
|
const getAlertButtonStyle_1 = require("./Utilities/getAlertButtonStyle");
|
|
12
|
+
const ActiveAlertsPanel_1 = require("./ActiveAlertsPanel");
|
|
13
13
|
class AlertViewPanelComponent extends React.Component {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
@@ -31,7 +31,7 @@ class AlertViewPanelComponent extends React.Component {
|
|
|
31
31
|
: this.props.AdaptableAlerts.length == 1
|
|
32
32
|
? '1 Alert'
|
|
33
33
|
: this.props.AdaptableAlerts.length + ' Alerts';
|
|
34
|
-
const alertsPanel =
|
|
34
|
+
const alertsPanel = React.createElement(ActiveAlertsPanel_1.ActiveAlertsPanel, null);
|
|
35
35
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
36
36
|
return (React.createElement(rebass_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__Alert__wrap` },
|
|
37
37
|
React.createElement(rebass_1.Flex, { style: { borderRadius: 'var(--ab__border-radius)' }, className: `ab-${elementType}__Alert__text`, marginRight: 2, padding: 2, color: buttonTextColor, backgroundColor: buttonBackground, fontSize: 'var( --ab-font-size-2)', alignItems: "center" }, collapsedText),
|
|
@@ -83,7 +83,7 @@ exports.renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
|
83
83
|
} }));
|
|
84
84
|
};
|
|
85
85
|
exports.AlertBehaviourWizardSection = (props) => {
|
|
86
|
-
const { data, api } = OnePageAdaptableWizard_1.
|
|
86
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
87
87
|
const { AlertProperties = {} } = data;
|
|
88
88
|
const rowAddedAlert = api.internalApi.isAlertDefinitionForAddedRowChangeEvent(data);
|
|
89
89
|
const rowRemovedAlert = api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(data);
|
|
@@ -22,7 +22,7 @@ const DEFAULT_BUTTONS = [
|
|
|
22
22
|
];
|
|
23
23
|
exports.renderAlertDisplaySummary = () => {
|
|
24
24
|
var _a;
|
|
25
|
-
const { data, api } = OnePageAdaptableWizard_1.
|
|
25
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
26
26
|
if (!((_a = data.AlertProperties) === null || _a === void 0 ? void 0 : _a.DisplayNotification)) {
|
|
27
27
|
return (React.createElement(rebass_1.Text, { fontSize: 2 },
|
|
28
28
|
"Alert type ",
|
|
@@ -53,11 +53,11 @@ exports.AlertPreview = (_a) => {
|
|
|
53
53
|
return result;
|
|
54
54
|
}, [alertDefinition]);
|
|
55
55
|
return (React.createElement(rebass_1.Box, Object.assign({}, boxProps, { style: Object.assign({ border: '1px solid var(--ab-color-inputborder)' }, boxProps.style) }),
|
|
56
|
-
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview,
|
|
56
|
+
React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, focusFirstButton: focusFirstButton, adaptableAlert: alertToPreview, onClose: () => { } })));
|
|
57
57
|
};
|
|
58
58
|
exports.AlertDisplayWizardSection = (props) => {
|
|
59
59
|
var _a, _b, _c, _d;
|
|
60
|
-
const { data, api } = OnePageAdaptableWizard_1.
|
|
60
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
61
61
|
const messageType = data.MessageType;
|
|
62
62
|
const messageText = api.alertApi.getAlertDescription(data);
|
|
63
63
|
const adaptableAlert = {
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
7
7
|
const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
8
8
|
exports.BaseAlertRulesWizardSection = (props) => {
|
|
9
|
-
const { data, api, moduleInfo } = OnePageAdaptableWizard_1.
|
|
9
|
+
const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
10
10
|
const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
|
|
11
11
|
const predicateDefs = api.alertApi.getAlertPredicateDefsForScope(data.Scope);
|
|
12
12
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
|
|
@@ -8,7 +8,7 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
|
8
8
|
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
9
9
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
10
10
|
exports.BaseAlertScopeWizardSection = (props) => {
|
|
11
|
-
const { data, api } = OnePageAdaptableWizard_1.
|
|
11
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
12
12
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
|
|
13
13
|
React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
14
14
|
rowScope: 'Changes anywhere in the row will trigger an alert',
|
|
@@ -41,7 +41,7 @@ exports.BaseAlertScopeWizardSection = (props) => {
|
|
|
41
41
|
} })));
|
|
42
42
|
};
|
|
43
43
|
exports.renderBaseAlertScopeSummary = (data) => {
|
|
44
|
-
const { api: { scopeApi }, } = OnePageAdaptableWizard_1.
|
|
44
|
+
const { api: { scopeApi }, } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
45
45
|
const columnsInScope = scopeApi.getColumnsForScope(data.Scope);
|
|
46
46
|
return (React.createElement(React.Fragment, null,
|
|
47
47
|
React.createElement(rebass_1.Box, null,
|
|
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const BulkUpdateRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/BulkUpdateRedux"));
|
|
8
8
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
9
|
-
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const PanelWithImage_1 = require("../Components/Panels/PanelWithImage");
|
|
11
10
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
12
11
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
@@ -34,7 +33,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
34
33
|
let dataTypeErrorMessage = '';
|
|
35
34
|
if (col && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue)) {
|
|
36
35
|
// check that the update value is a number for a numeric column. not issue for dates as we dont allow free text
|
|
37
|
-
if (col.dataType ==
|
|
36
|
+
if (col.dataType == 'Number') {
|
|
38
37
|
if (isNaN(Number(this.props.BulkUpdateValue))) {
|
|
39
38
|
hasDataTypeError = true;
|
|
40
39
|
dataTypeErrorMessage = 'This column only accepts numbers';
|
|
@@ -50,7 +49,7 @@ class BulkUpdatePopupComponent extends React.Component {
|
|
|
50
49
|
return null;
|
|
51
50
|
}
|
|
52
51
|
return (React.createElement(PanelWithImage_1.PanelWithImage, { bodyProps: { padding: 2 }, flex: 1, glyphicon: this.props.moduleInfo.Glyph, header: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), variant: "primary" },
|
|
53
|
-
col.dataType ==
|
|
52
|
+
col.dataType == 'Date' ? (React.createElement(React.Fragment, null,
|
|
54
53
|
React.createElement(HelpBlock_1.default, { marginTop: 2, marginBottom: 2 }, "Enter a date value. Alternatively, tick the checkbox and select from an existing column value."),
|
|
55
54
|
React.createElement(rebass_1.Box, null,
|
|
56
55
|
React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, onChange: (checked) => this.onUseColumnValuesSelectorChanged(checked), checked: this.state.useSelector },
|
|
@@ -59,7 +59,7 @@ class BulkUpdateViewPanelComponent extends React.Component {
|
|
|
59
59
|
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply_1.ButtonApply, { marginLeft: 2, className: `ab-${elementType}__BulkUpdate__apply`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
|
|
60
60
|
(this.props.PreviewInfo != null &&
|
|
61
61
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
|
|
62
|
-
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
|
|
62
|
+
!shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
|
|
63
63
|
}
|
|
64
64
|
onColumnValueSelectedChanged(selectedColumnValue) {
|
|
65
65
|
this.props.onBulkUpdateValueChange(selectedColumnValue);
|
|
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
11
10
|
const Tabs_1 = require("../../../components/Tabs");
|
|
12
11
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
@@ -43,7 +42,7 @@ QueryTab.defaultProps = {
|
|
|
43
42
|
isTabsTab: true,
|
|
44
43
|
};
|
|
45
44
|
exports.CalculatedColumnExpressionWizardSection = (props) => {
|
|
46
|
-
const { api, data, moduleInfo } = OnePageAdaptableWizard_1.
|
|
45
|
+
const { api, data, moduleInfo } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
47
46
|
const initialData = react_1.useMemo(() => api.internalApi.getQueryPreviewData(), []);
|
|
48
47
|
const type = data.Query.AggregatedScalarExpression != undefined
|
|
49
48
|
? 'AggregatedScalarExpression'
|
|
@@ -65,8 +64,8 @@ exports.CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
65
64
|
const setCalculatedColumnExpression = (calculatedColumnQuery) => {
|
|
66
65
|
const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
|
|
67
66
|
const dataType = calculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumnQuery);
|
|
68
|
-
const Pivotable = dataType ==
|
|
69
|
-
const Aggregatable = dataType ==
|
|
67
|
+
const Pivotable = dataType == 'String';
|
|
68
|
+
const Aggregatable = dataType == 'Number';
|
|
70
69
|
props.onChange(Object.assign(Object.assign({}, data), { Query: calculatedColumnQuery, CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Pivotable,
|
|
71
70
|
Aggregatable }) }));
|
|
72
71
|
};
|
|
@@ -4,7 +4,6 @@ exports.CalculatedColumnSettingsWizardSection = exports.isValidCalculatedColumnS
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
-
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
8
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
8
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
10
9
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
@@ -45,7 +44,7 @@ exports.isValidCalculatedColumnSettings = (data, api) => {
|
|
|
45
44
|
};
|
|
46
45
|
exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
47
46
|
var _a, _b;
|
|
48
|
-
const { data, api } = OnePageAdaptableWizard_1.
|
|
47
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
49
48
|
const calculatedColumnExpressionService = react_1.useMemo(() => api.internalApi.getCalculatedColumnExpressionService(), []);
|
|
50
49
|
const handleColumnIdChange = (event) => {
|
|
51
50
|
let e = event.target;
|
|
@@ -64,10 +63,10 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
64
63
|
const validCheck = exports.isValidCalculatedColumnSettings(data, api);
|
|
65
64
|
const ErrorMessage = validCheck === true ? null : validCheck;
|
|
66
65
|
let options = [
|
|
67
|
-
{ value:
|
|
68
|
-
{ value:
|
|
69
|
-
{ value:
|
|
70
|
-
{ value:
|
|
66
|
+
{ value: 'Number', label: 'Number' },
|
|
67
|
+
{ value: 'String', label: 'String' },
|
|
68
|
+
{ value: 'Date', label: 'Date' },
|
|
69
|
+
{ value: 'Boolean', label: 'Boolean' },
|
|
71
70
|
];
|
|
72
71
|
const [ColumnNameFocused, setColumnNameFocused] = react_1.useState(false);
|
|
73
72
|
const ColumnName = data.FriendlyName;
|
|
@@ -6,14 +6,14 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const EmptyContent_1 = tslib_1.__importDefault(require("../../components/EmptyContent"));
|
|
7
7
|
const InfiniteTable_1 = require("../../components/InfiniteTable");
|
|
8
8
|
const columnsMap = new Map([
|
|
9
|
-
['Operation', { field: 'Operation',
|
|
10
|
-
['Value', { field: 'Value',
|
|
9
|
+
['Operation', { field: 'Operation', defaultFlex: 1 }],
|
|
10
|
+
['Value', { field: 'Value', defaultFlex: 1 }],
|
|
11
11
|
]);
|
|
12
12
|
const tableDOMProps = {
|
|
13
13
|
style: {
|
|
14
14
|
height: '100%',
|
|
15
|
-
minWidth: '
|
|
16
|
-
minHeight:
|
|
15
|
+
minWidth: '20rem',
|
|
16
|
+
minHeight: 380,
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
class CellSummaryDetails extends React.Component {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CellSummmary } from '../../PredefinedConfig/Common/CellSummary';
|
|
3
|
-
export interface CellSummaryPopoverProps
|
|
3
|
+
export interface CellSummaryPopoverProps {
|
|
4
4
|
CellSummary: CellSummmary;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
7
|
-
render(): any;
|
|
8
|
-
}
|
|
6
|
+
export declare const CellSummaryPopover: React.FunctionComponent<CellSummaryPopoverProps>;
|
|
@@ -4,9 +4,6 @@ exports.CellSummaryPopover = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const CellSummaryDetails_1 = require("./CellSummaryDetails");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.CellSummaryPopover = CellSummaryPopover;
|
|
7
|
+
exports.CellSummaryPopover = (props) => {
|
|
8
|
+
return React.createElement(CellSummaryDetails_1.CellSummaryDetails, { CellSummary: props.CellSummary });
|
|
9
|
+
};
|