@adaptabletools/adaptable 11.2.4 → 12.0.0-canary.1
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 +120 -120
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -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 +91 -4
- 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/AdaptableOptions/{SmartEdit.js → 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 +95 -50
- 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/Api/{DataSourceApi.js → DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +29 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/RowFormSubmitted.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/FormatColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +15 -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.d.ts +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +45 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
- package/src/Api/Implementation/InternalApiImpl.js +51 -10
- 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 +5 -2
- package/src/Api/Implementation/SmartEditApiImpl.js +9 -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 +7 -25
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +14 -3
- 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/CalculatedColumnState.d.ts +5 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -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 +4 -2
- 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 +23 -1
- 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.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +7 -8
- 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 +24 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -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/Interface/IRowEditService.d.ts +8 -0
- package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +26 -0
- package/src/Utilities/Services/RowEditService.js +197 -0
- 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/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/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +13 -7
- 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/AdaptablePopup/AdaptablePopupDialog.js +2 -0
- 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/Popups/FormPopups/FormPopups.js +2 -2
- 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/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/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/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -7
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +4 -5
- 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 +2 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
- 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/agGrid/ActionColumnRenderer.d.ts +6 -1
- package/src/agGrid/ActionColumnRenderer.js +9 -6
- package/src/agGrid/Adaptable.d.ts +7 -2
- package/src/agGrid/Adaptable.js +213 -69
- 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 +5 -0
- package/src/agGrid/rowEditIcons.js +10 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +19 -18
- 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.d.ts +2 -0
- package/src/components/WindowModal/WindowModal.js +1 -1
- 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 +226 -69
- package/src/metamodel/adaptable.metamodel.js +532 -311
- package/src/types.d.ts +18 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -9
- package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
- 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/Components/Forms/AdaptableForm.d.ts +0 -6
- package/src/View/Components/Forms/AdaptableForm.js +0 -21
- 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
|
@@ -67,7 +67,7 @@ class CellSummaryViewPanelComponent extends React.Component {
|
|
|
67
67
|
React.createElement(DropdownButton_1.default, { style: { fontSize: 'small', width: '100%' }, marginRight: 2, columns: ['label'], className: `ab-${elementType}__CellSummary__select`, items: [...operationMenuItems, ...operationDefinitions], disabled: shouldDisable, variant: "outlined", tone: 'neutral' }, this.props.CellSummaryOperation)),
|
|
68
68
|
React.createElement(rebass_1.Flex, { alignItems: "center" }, React.createElement(React.Fragment, null,
|
|
69
69
|
renderOperationValue(),
|
|
70
|
-
this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur" }))))));
|
|
70
|
+
this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur" }))))));
|
|
71
71
|
}
|
|
72
72
|
checkSelectedCells() {
|
|
73
73
|
this.props.onCreateCellSummary();
|
|
@@ -11,31 +11,41 @@ const ValueSelector_1 = require("../ValueSelector");
|
|
|
11
11
|
const baseClassName = 'ab-Adaptable-Object-Compact-List';
|
|
12
12
|
const ICON_SIZE = 20;
|
|
13
13
|
exports.AdaptableObjectCompactListItem = (props) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15
15
|
const dispatch = react_redux_1.useDispatch();
|
|
16
16
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
17
|
const objectView = props.module.toViewCompact(props.abObject);
|
|
18
18
|
const viewOptions = (_b = (_a = props.module) === null || _a === void 0 ? void 0 : _a.getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
19
|
-
const deleteAction = (_c = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.
|
|
19
|
+
const deleteAction = (_c = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getCompactDeleteAction) === null || _c === void 0 ? void 0 : _c.call(viewOptions, props.abObject);
|
|
20
20
|
const moduleAccessLevel = adaptable.api.internalApi
|
|
21
21
|
.getEntitlementService()
|
|
22
22
|
.getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
|
|
23
23
|
const handleDelete = React.useCallback(() => {
|
|
24
24
|
dispatch(deleteAction);
|
|
25
25
|
}, []);
|
|
26
|
+
const name = (_d = objectView.item.label) !== null && _d !== void 0 ? _d : objectView.item.name;
|
|
26
27
|
return (React.createElement(rebass_1.Flex, { className: `${baseClassName}__Item`, alignItems: "center" },
|
|
27
|
-
React.createElement(rebass_1.Flex, { className: `${baseClassName}__Item__Name` }, (
|
|
28
|
+
name && (React.createElement(rebass_1.Flex, { className: `${baseClassName}__Item__Name` }, (_e = objectView.item.label) !== null && _e !== void 0 ? _e : objectView.item.name)),
|
|
28
29
|
React.createElement(rebass_1.Box, { flex: 1 },
|
|
29
30
|
objectView.item.view &&
|
|
30
31
|
React.createElement(objectView.item.view, {
|
|
31
32
|
data: props.abObject,
|
|
32
33
|
}),
|
|
33
|
-
Boolean(((
|
|
34
|
+
Boolean(((_f = objectView.item) === null || _f === void 0 ? void 0 : _f.values) && ((_h = (_g = objectView.item) === null || _g === void 0 ? void 0 : _g.values) === null || _h === void 0 ? void 0 : _h.length)) && (React.createElement(rebass_1.Box, { mb: 2, className: `${baseClassName}__Item__Values` },
|
|
34
35
|
React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: objectView.item.values, value: objectView.item.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))),
|
|
35
|
-
React.createElement(rebass_1.Flex,
|
|
36
|
+
React.createElement(rebass_1.Flex, { ml: 1 }, deleteAction && (React.createElement(SimpleButton_1.default, { iconSize: ICON_SIZE, icon: "delete", variant: "text", onClick: handleDelete, accessLevel: moduleAccessLevel })))));
|
|
36
37
|
};
|
|
37
38
|
exports.AdaptableObjectCompactList = (props) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
const viewProperties = (_b = (_a = props.module).getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
41
|
+
const deleteAllAction = (_c = viewProperties === null || viewProperties === void 0 ? void 0 : viewProperties.getDeleteAllAction) === null || _c === void 0 ? void 0 : _c.call(viewProperties);
|
|
42
|
+
const dispatch = react_redux_1.useDispatch();
|
|
43
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column", className: baseClassName },
|
|
44
|
+
React.createElement(rebass_1.Flex, { className: `${baseClassName}__Header`, fontSize: 3 },
|
|
45
|
+
React.createElement(rebass_1.Box, { className: `${baseClassName}__Title` }, props.module.moduleInfo.FriendlyName),
|
|
46
|
+
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
47
|
+
deleteAllAction && (React.createElement(SimpleButton_1.default, { onClick: () => dispatch(deleteAllAction), variant: "raised", tone: "neutral", accessLevel: 'Full' }, "Clear All"))),
|
|
48
|
+
React.createElement(rebass_1.Box, { className: `${baseClassName}__Body` }, props.abObjects.map((abObject) => {
|
|
49
|
+
return (React.createElement(exports.AdaptableObjectCompactListItem, { key: abObject.Uuid, abObject: abObject, module: props.module }));
|
|
50
|
+
}))));
|
|
41
51
|
};
|
|
@@ -7,7 +7,6 @@ const react_redux_1 = require("react-redux");
|
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
8
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
9
9
|
const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
|
|
10
|
-
const TeamSharingRedux_1 = require("../../../Redux/ActionsReducers/TeamSharingRedux");
|
|
11
10
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
|
|
12
11
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
13
12
|
const ButtonDelete_1 = require("../Buttons/ButtonDelete");
|
|
@@ -76,7 +75,7 @@ exports.AdaptableObjectListItem = (props) => {
|
|
|
76
75
|
React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${baseClassName}__buttons` },
|
|
77
76
|
React.createElement(rebass_1.Flex, { justifyContent: "end" },
|
|
78
77
|
actions,
|
|
79
|
-
teamSharingActivated && (React.createElement(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${entityType}`, accessLevel: accessLevel, onShare: (config) =>
|
|
78
|
+
teamSharingActivated && (React.createElement(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${entityType}`, accessLevel: accessLevel, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config) })),
|
|
80
79
|
deleteAction && (React.createElement(ButtonDelete_1.ButtonDelete, { iconSize: ICON_SIZE, ConfirmationMsg: `Are you sure you want to delete this ${entityType}?`, ConfirmationTitle: `Delete ${entityType}`, ConfirmAction: deleteAction, accessLevel: accessLevel })),
|
|
81
80
|
React.createElement(ButtonEdit_1.ButtonEdit, { iconSize: ICON_SIZE, disabled: isEditDisabled, accessLevel: accessLevel, onClick: () => handleOnEdit() })),
|
|
82
81
|
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
node: HTMLDivElement;
|
|
6
|
-
adaptableApi: AdaptableApi;
|
|
7
|
-
}) => string | null;
|
|
2
|
+
import { CustomRenderContext } from '../../../types';
|
|
3
|
+
import { AdaptableFrameworkComponent } from '../../types';
|
|
4
|
+
declare type Render = (customRenderContext: CustomRenderContext) => string | null;
|
|
8
5
|
interface ExternalRendererProps {
|
|
9
6
|
componentName?: string;
|
|
10
7
|
render?: Render;
|
|
@@ -10,21 +10,21 @@ exports.ExternalRenderer = (_a) => {
|
|
|
10
10
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
11
11
|
const [contentsHTML, setContentsHTML] = React.useState('');
|
|
12
12
|
React.useLayoutEffect(() => {
|
|
13
|
-
const
|
|
13
|
+
const element = ref.current;
|
|
14
14
|
const adaptableApi = adaptable.api;
|
|
15
15
|
if (render) {
|
|
16
|
-
const html = render({ visible: true,
|
|
16
|
+
const html = render({ visible: true, element, adaptableApi });
|
|
17
17
|
setContentsHTML(html);
|
|
18
18
|
}
|
|
19
19
|
else if (frameworkComponent) {
|
|
20
|
-
adaptableApi.internalApi.createFrameworkComponent(
|
|
20
|
+
adaptableApi.internalApi.createFrameworkComponent(element, frameworkComponent, 'toolbar');
|
|
21
21
|
}
|
|
22
22
|
return () => {
|
|
23
23
|
if (render) {
|
|
24
|
-
render({ visible: false,
|
|
24
|
+
render({ visible: false, element: element, adaptableApi });
|
|
25
25
|
}
|
|
26
26
|
else if (frameworkComponent) {
|
|
27
|
-
adaptableApi.internalApi.destroyFrameworkComponent(
|
|
27
|
+
adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent, componentName);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}, []);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColumnFilterContext } from '../../../Utilities/Interface/ColumnFilterContext';
|
|
3
3
|
import { ColumnMenuTab } from '../../../PredefinedConfig/Common/Enums';
|
|
4
|
-
import { ColumnFilter } from '../../../
|
|
4
|
+
import { ColumnFilter } from '../../../types';
|
|
5
5
|
export interface FilterFormState {
|
|
6
6
|
columnFilters: ColumnFilter[];
|
|
7
7
|
distinctColumnValues: {
|
|
@@ -4,7 +4,8 @@ exports.FilterFormReact = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
|
-
const
|
|
7
|
+
const LayoutRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/LayoutRedux"));
|
|
8
|
+
const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
|
|
8
9
|
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
9
10
|
const ListBoxFilterForm_1 = require("./ListBoxFilterForm");
|
|
10
11
|
const ButtonClose_1 = require("../Buttons/ButtonClose");
|
|
@@ -22,6 +23,7 @@ const renderWithAdaptableContext_1 = require("../../renderWithAdaptableContext")
|
|
|
22
23
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
23
24
|
const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
|
|
24
25
|
const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
|
|
26
|
+
const LayoutRedux_1 = require("../../../Redux/ActionsReducers/LayoutRedux");
|
|
25
27
|
const panelStyle = {
|
|
26
28
|
width: '100%',
|
|
27
29
|
minWidth: 150,
|
|
@@ -103,7 +105,7 @@ class FilterFormComponent extends React.Component {
|
|
|
103
105
|
this._isMounted = false;
|
|
104
106
|
}
|
|
105
107
|
componentDidMount() {
|
|
106
|
-
if (this.props.currentColumn.dataType !=
|
|
108
|
+
if (this.props.currentColumn.dataType != 'Boolean') {
|
|
107
109
|
this.loadPermittedValues();
|
|
108
110
|
}
|
|
109
111
|
}
|
|
@@ -264,18 +266,18 @@ function mapStateToProps(state, ownProps) {
|
|
|
264
266
|
return {
|
|
265
267
|
currentColumn: ownProps.currentColumn,
|
|
266
268
|
columns: state.Grid.Columns,
|
|
267
|
-
columnFilters: state
|
|
269
|
+
columnFilters: LayoutRedux_1.getColumnFilterSelector(state),
|
|
268
270
|
showCloseButton: ownProps.showCloseButton,
|
|
269
271
|
};
|
|
270
272
|
}
|
|
271
273
|
function mapDispatchToProps(dispatch) {
|
|
272
274
|
return {
|
|
273
275
|
onMenuItemClick: (action) => dispatch(action),
|
|
274
|
-
onClearColumnFilter: (columnFilter) => dispatch(
|
|
275
|
-
onAddColumnFilter: (columnFilter) => dispatch(
|
|
276
|
-
onEditColumnFilter: (columnFilter) => dispatch(
|
|
277
|
-
onSetColumnFilter: (columnFilter) => dispatch(
|
|
278
|
-
onHideFilterForm: () => dispatch(
|
|
276
|
+
onClearColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterClear(columnFilter)),
|
|
277
|
+
onAddColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterAdd(columnFilter)),
|
|
278
|
+
onEditColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterEdit(columnFilter)),
|
|
279
|
+
onSetColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterSet(columnFilter)),
|
|
280
|
+
onHideFilterForm: () => dispatch(SystemRedux.SystemFilterFormHide()),
|
|
279
281
|
};
|
|
280
282
|
}
|
|
281
283
|
const FilterForm = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(FilterFormComponent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColumnFilterContext } from '../../../Utilities/Interface/ColumnFilterContext';
|
|
3
|
-
import { ColumnFilter } from '../../../
|
|
3
|
+
import { ColumnFilter } from '../../../types';
|
|
4
4
|
export interface QuickFilterFormState {
|
|
5
5
|
filter: ColumnFilter;
|
|
6
6
|
distinctColumnValues: any[];
|
|
@@ -4,7 +4,7 @@ exports.QuickFilterFormReact = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
|
-
const
|
|
7
|
+
const LayoutRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/LayoutRedux"));
|
|
8
8
|
const react_redux_1 = require("react-redux");
|
|
9
9
|
const ObjectFactory_1 = require("../../../Utilities/ObjectFactory");
|
|
10
10
|
const OverlayTrigger_1 = tslib_1.__importDefault(require("../../../components/OverlayTrigger"));
|
|
@@ -20,6 +20,7 @@ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
|
20
20
|
const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
|
|
21
21
|
const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
|
|
22
22
|
const date_fns_1 = require("date-fns");
|
|
23
|
+
const LayoutRedux_1 = require("../../../Redux/ActionsReducers/LayoutRedux");
|
|
23
24
|
class QuickFilterFormComponent extends React.Component {
|
|
24
25
|
constructor(props) {
|
|
25
26
|
super(props);
|
|
@@ -329,13 +330,13 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
329
330
|
function mapStateToProps(state, ownProps) {
|
|
330
331
|
return {
|
|
331
332
|
currentColumn: ownProps.currentColumn,
|
|
332
|
-
columnFilters: state
|
|
333
|
+
columnFilters: LayoutRedux_1.getColumnFilterSelector(state),
|
|
333
334
|
};
|
|
334
335
|
}
|
|
335
336
|
function mapDispatchToProps(dispatch) {
|
|
336
337
|
return {
|
|
337
|
-
onAddColumnFilter: (columnFilter) => dispatch(
|
|
338
|
-
onEditColumnFilter: (columnFilter) => dispatch(
|
|
338
|
+
onAddColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterAdd(columnFilter)),
|
|
339
|
+
onEditColumnFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterEdit(columnFilter)),
|
|
339
340
|
};
|
|
340
341
|
}
|
|
341
342
|
const QuickFilterForm = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(QuickFilterFormComponent);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
|
-
import { SystemFilterPredicateId } from '../../../
|
|
2
|
+
import { SystemFilterPredicateId } from '../../../types';
|
|
3
3
|
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "Before" | "After" | "Blanks" | "NonBlanks" | "Equals" | "NotEquals" | "GreaterThan" | "LessThan" | "Positive" | "Negative" | "Zero" | "Between" | "NotBetween" | "Is" | "IsNot" | "Contains" | "NotContains" | "StartsWith" | "EndsWith" | "Regex" | "Today" | "Yesterday" | "Tomorrow" | "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "InPast" | "InFuture" | "On" | "NotOn" | "NextWorkDay" | "LastWorkDay" | "True" | "False" | "Values" | "ExcludeValues" | "InRange" | "BooleanToggle" | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
|
|
@@ -32,6 +32,8 @@ const WindowDialog = (props) => {
|
|
|
32
32
|
handleSelector: isActionModule
|
|
33
33
|
? `.${baseClassName} .ab-Panel__header`
|
|
34
34
|
: '.ab-Adaptable-Popup__TopBar',
|
|
35
|
+
minHeight: 460,
|
|
36
|
+
minWidth: 400,
|
|
35
37
|
size: popupSettings.size,
|
|
36
38
|
position: popupSettings.position,
|
|
37
39
|
onChange: handleWindowSettings,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AdaptableAlert } from '../../../PredefinedConfig/Common/AdaptableAlert';
|
|
3
|
-
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
4
3
|
export interface AdaptablePopupAlertProps {
|
|
5
4
|
onClose: () => void;
|
|
6
|
-
api: AdaptableApi;
|
|
7
5
|
adaptableAlert: AdaptableAlert;
|
|
8
6
|
headless?: boolean;
|
|
9
7
|
focusFirstButton?: boolean;
|
|
@@ -43,7 +43,10 @@ exports.AdaptablePopupAlert = (props) => {
|
|
|
43
43
|
};
|
|
44
44
|
}, [JSON.stringify(formData), props.adaptableAlert]);
|
|
45
45
|
const adaptableForm = React.useMemo(() => {
|
|
46
|
-
|
|
46
|
+
if (api.isDestroyed()) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return api.internalApi.getAdaptableFormFromAlertForm(props.adaptableAlert.alertDefinition.AlertForm || defaultForm, context, messageType);
|
|
47
50
|
}, [props.adaptableAlert.alertDefinition.AlertForm, defaultForm, messageType, context]);
|
|
48
51
|
const renderApplicationIcon = (icon) => {
|
|
49
52
|
if (!icon) {
|
|
@@ -68,16 +71,15 @@ exports.AdaptablePopupAlert = (props) => {
|
|
|
68
71
|
React.createElement("br", null))));
|
|
69
72
|
})
|
|
70
73
|
: msg),
|
|
71
|
-
React.createElement(rebass_1.Box, { margin: 2 },
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} })))));
|
|
74
|
+
React.createElement(rebass_1.Box, { margin: 2 }, adaptableForm ? (React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { focusFirstButton: props.focusFirstButton, data: formData, formDef: adaptableForm, displayTitle: true, onChange: setFormData, api: api, context: context, onButtonClick: (button) => {
|
|
75
|
+
props.onClose();
|
|
76
|
+
// we want to give the current popup time to close
|
|
77
|
+
// and we reopen with a delay in case this button action causes another popup
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
var _a;
|
|
80
|
+
(_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, context);
|
|
81
|
+
}, 20);
|
|
82
|
+
} })) : null))));
|
|
81
83
|
return props.headless ? (content) : (React.createElement(Dialog_1.default, { "data-name": `alert-popup alert-popup-${messageType.toLowerCase()}`, showCloseButton: false, isOpen: true, onDismiss: props.onClose, style: {
|
|
82
84
|
minHeight: 'auto',
|
|
83
85
|
minWidth: '20vw',
|
|
@@ -6,27 +6,47 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
7
7
|
const AdaptablePopupAlert_1 = require("./AdaptablePopupAlert");
|
|
8
8
|
const react_toastify_1 = require("react-toastify");
|
|
9
|
+
const apiInstances = new WeakMap();
|
|
10
|
+
const weakMapKeys = new Map();
|
|
9
11
|
exports.showToast = (props) => {
|
|
10
12
|
// we're doing this hack and not simply using props.api in order not to have a memory
|
|
11
13
|
// leak where the api is still kept around in memory by the toaster
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
+
const adaptableOptions = props.api.internalApi.getAdaptableOptions();
|
|
15
|
+
const adaptableId = adaptableOptions.adaptableId;
|
|
16
|
+
let weakMapKey = weakMapKeys.get(adaptableId);
|
|
17
|
+
if (!weakMapKey) {
|
|
18
|
+
weakMapKeys.set(adaptableId, { adaptableId });
|
|
19
|
+
}
|
|
20
|
+
weakMapKey = weakMapKeys.get(adaptableId);
|
|
21
|
+
const off = props.api.eventApi.on('AdaptableDestroy', () => {
|
|
14
22
|
react_toastify_1.toast.dismiss(); // remove all toasts
|
|
15
|
-
|
|
23
|
+
let weakMapKey = weakMapKeys.get(adaptableId);
|
|
24
|
+
if (weakMapKey) {
|
|
25
|
+
apiInstances.delete(weakMapKey);
|
|
26
|
+
weakMapKeys.delete(adaptableId);
|
|
27
|
+
}
|
|
16
28
|
});
|
|
17
|
-
|
|
29
|
+
apiInstances.set(weakMapKey, props.api);
|
|
30
|
+
const toastProps = ObjectFactory_1.default.CreateToastOptions(adaptableOptions.notificationsOptions, {
|
|
31
|
+
containerId: adaptableId,
|
|
18
32
|
onClose: () => {
|
|
19
|
-
|
|
33
|
+
const weakMapKey = weakMapKeys.get(adaptableId);
|
|
34
|
+
const adaptableApi = weakMapKey ? apiInstances.get(weakMapKey) : null;
|
|
35
|
+
if (adaptableApi) {
|
|
20
36
|
off();
|
|
21
|
-
if (!
|
|
22
|
-
|
|
37
|
+
if (!adaptableApi.isDestroyed()) {
|
|
38
|
+
adaptableApi.internalApi.hidePopupAlert();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
apiInstances.delete(weakMapKey);
|
|
42
|
+
weakMapKeys.delete(adaptableId);
|
|
23
43
|
}
|
|
24
44
|
}
|
|
25
45
|
},
|
|
26
46
|
});
|
|
27
|
-
const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert,
|
|
47
|
+
const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, adaptableAlert: props.adaptableAlert, onClose: () => {
|
|
28
48
|
react_toastify_1.toast.dismiss(toastId);
|
|
29
|
-
} }))
|
|
49
|
+
} }));
|
|
30
50
|
let toastId;
|
|
31
51
|
switch (props.adaptableAlert.alertDefinition.MessageType) {
|
|
32
52
|
case 'Info':
|
|
@@ -20,8 +20,8 @@ exports.FormDialog = ({ id, formProps, form, prepareContext, }) => {
|
|
|
20
20
|
dispatch(PopupRedux_1.PopupHideForm(id));
|
|
21
21
|
};
|
|
22
22
|
const context = Object.assign({ adaptableApi: adaptable.api, formData: data }, formProps);
|
|
23
|
-
return (React.createElement(Dialog_1.default, { isOpen: true, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400 }, onDismiss: handleDismiss },
|
|
24
|
-
React.createElement(rebass_1.
|
|
23
|
+
return (React.createElement(Dialog_1.default, { isOpen: true, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400, maxHeight: '80vh' }, onDismiss: handleDismiss },
|
|
24
|
+
React.createElement(rebass_1.Flex, { flexDirection: 'column', "data-name": "form-dialog", padding: 4, height: '100%' },
|
|
25
25
|
React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { formDef: form, data: data, context: context, onChange: setData, api: adaptable.api, displayTitle: true, onButtonClick: async (button) => {
|
|
26
26
|
var _a;
|
|
27
27
|
handleDismiss();
|
|
@@ -9,9 +9,9 @@ const check_1 = tslib_1.__importDefault(require("../../components/icons/check"))
|
|
|
9
9
|
const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
|
|
10
10
|
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
11
11
|
const columnsMap = new Map([
|
|
12
|
-
['InitialValue', { field: 'InitialValue',
|
|
13
|
-
['ComputedValue', { field: 'ComputedValue',
|
|
14
|
-
['ValidInfo', { field: 'ValidInfo',
|
|
12
|
+
['InitialValue', { field: 'InitialValue', defaultFlex: 1, header: 'Current', align: 'center' }],
|
|
13
|
+
['ComputedValue', { field: 'ComputedValue', defaultFlex: 1, header: 'New', align: 'center' }],
|
|
14
|
+
['ValidInfo', { field: 'ValidInfo', defaultWidth: 80, header: 'Valid', align: 'center' }],
|
|
15
15
|
]);
|
|
16
16
|
const tableDOMProps = {
|
|
17
17
|
style: { flex: 1 },
|
|
@@ -155,11 +155,12 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
155
155
|
width: 'var(--ab-cmp-simple-button__width)',
|
|
156
156
|
},
|
|
157
157
|
};
|
|
158
|
-
const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
|
|
159
158
|
const toolPanelContext = {
|
|
160
159
|
adaptableApi: props.api,
|
|
161
160
|
toolPanelState: props.api.toolPanelApi.getToolPanelState(),
|
|
162
161
|
};
|
|
162
|
+
const buttonIcon = props.api.internalApi.getIconForButton(button, toolPanelContext);
|
|
163
|
+
const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
|
|
163
164
|
let buttonStyle = props.api.internalApi.getStyleForButton(button, toolPanelContext);
|
|
164
165
|
let buttonLabel = props.api.internalApi.getLabelForButton(button, toolPanelContext);
|
|
165
166
|
let buttonTooltip = props.api.internalApi.getTooltipForButton(button, toolPanelContext);
|
|
@@ -171,7 +172,7 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
171
172
|
const buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none';
|
|
172
173
|
const uniqueKey = buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : uuid_1.createUuid();
|
|
173
174
|
return (React.createElement(SimpleButton_1.default, { key: uniqueKey, variant: buttonVariant, tone: buttonTone, className: `ab-ToolPanel__Home__${kebabCase_1.default(buttonLabel)} ${(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || ''}`, tooltip: buttonTooltip, disabled: disabled, onClick: () => button.onClick(button, toolPanelContext), accessLevel: 'Full' },
|
|
174
|
-
|
|
175
|
+
buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
175
176
|
buttonLabel));
|
|
176
177
|
});
|
|
177
178
|
};
|
|
@@ -17,24 +17,25 @@ exports.CustomToolPanelContent = (props) => {
|
|
|
17
17
|
const buttonsDivId = `ab-ToolPanel__${customToolPanel.name}__buttons`;
|
|
18
18
|
const [contentsHTML, setContentsHTML] = react_1.useState('');
|
|
19
19
|
react_1.useLayoutEffect(() => {
|
|
20
|
-
const
|
|
20
|
+
const element = contentsDivDomRef.current;
|
|
21
21
|
if (hasCustomRenderFn(customToolPanel)) {
|
|
22
|
-
const
|
|
22
|
+
const customRenderContext = {
|
|
23
23
|
visible: true,
|
|
24
|
-
|
|
24
|
+
element,
|
|
25
25
|
adaptableApi: api,
|
|
26
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const html = customToolPanel.render(customRenderContext);
|
|
27
28
|
setContentsHTML(html);
|
|
28
29
|
}
|
|
29
30
|
else if (hasCustomFrameworkComponent(customToolPanel)) {
|
|
30
|
-
api.internalApi.createFrameworkComponent(
|
|
31
|
+
api.internalApi.createFrameworkComponent(element, customToolPanel.frameworkComponent, 'toolPanel');
|
|
31
32
|
}
|
|
32
33
|
return () => {
|
|
33
34
|
if (hasCustomRenderFn(customToolPanel)) {
|
|
34
|
-
customToolPanel.render({ visible: false,
|
|
35
|
+
customToolPanel.render({ visible: false, element, adaptableApi: api });
|
|
35
36
|
}
|
|
36
37
|
else if (hasCustomFrameworkComponent(customToolPanel)) {
|
|
37
|
-
api.internalApi.destroyFrameworkComponent(
|
|
38
|
+
api.internalApi.destroyFrameworkComponent(element, customToolPanel.frameworkComponent, 'toolPanel');
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
41
|
}, []);
|
|
@@ -50,12 +51,13 @@ exports.CustomToolPanelContent = (props) => {
|
|
|
50
51
|
width: 'var(--ab-cmp-simple-button__width)',
|
|
51
52
|
},
|
|
52
53
|
};
|
|
53
|
-
const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
|
|
54
54
|
const toolPanelContext = {
|
|
55
55
|
adaptableApi: api,
|
|
56
56
|
toolPanelState: api.toolPanelApi.getToolPanelState(),
|
|
57
57
|
customToolPanel: customToolPanel,
|
|
58
58
|
};
|
|
59
|
+
const buttonIcon = api.internalApi.getIconForButton(button, toolPanelContext);
|
|
60
|
+
const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
|
|
59
61
|
let buttonStyle = api.internalApi.getStyleForButton(button, toolPanelContext);
|
|
60
62
|
let buttonLabel = api.internalApi.getLabelForButton(button, toolPanelContext);
|
|
61
63
|
let buttonTooltip = api.internalApi.getTooltipForButton(button, toolPanelContext);
|
|
@@ -67,7 +69,7 @@ exports.CustomToolPanelContent = (props) => {
|
|
|
67
69
|
const buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none';
|
|
68
70
|
const uniqueKey = buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : uuid_1.createUuid();
|
|
69
71
|
return (React.createElement(SimpleButton_1.default, { key: uniqueKey, variant: buttonVariant, tone: buttonTone, className: `ab-ToolPanel__Home__${kebabCase_1.default(buttonLabel)} ${(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || ''}`, tooltip: buttonTooltip, disabled: disabled, onClick: () => button.onClick(button, toolPanelContext), accessLevel: 'Full' },
|
|
70
|
-
|
|
72
|
+
buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
71
73
|
buttonLabel));
|
|
72
74
|
})))));
|
|
73
75
|
};
|
|
@@ -6,8 +6,8 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const WizardPanel_1 = tslib_1.__importDefault(require("../../components/WizardPanel"));
|
|
7
7
|
const InfiniteTable_1 = require("../../components/InfiniteTable");
|
|
8
8
|
const columnsMap = new Map([
|
|
9
|
-
['Key', { field: 'Key', header: 'Property',
|
|
10
|
-
['Value', { field: 'Value', header: 'Value',
|
|
9
|
+
['Key', { field: 'Key', header: 'Property', defaultFlex: 1 }],
|
|
10
|
+
['Value', { field: 'Value', header: 'Value', defaultFlex: 3 }],
|
|
11
11
|
]);
|
|
12
12
|
const tableDOMProps = {
|
|
13
13
|
className: 'ab-WizardSummary__list',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
3
|
+
import { DashboardButtonContext } from '../../AdaptableOptions/DashboardOptions';
|
|
4
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
5
|
+
import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
|
|
6
|
+
export interface CustomDashboardButtonProps {
|
|
7
|
+
button: AdaptableButton<DashboardButtonContext>;
|
|
8
|
+
api: AdaptableApi;
|
|
9
|
+
accessLevel: AccessLevel;
|
|
10
|
+
}
|
|
11
|
+
export declare const CustomDashboardButton: (props: CustomDashboardButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomDashboardButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
+
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
9
|
+
exports.CustomDashboardButton = (props) => {
|
|
10
|
+
const { button } = props;
|
|
11
|
+
const [componentRevision, setComponentRevision] = react_1.useState(1);
|
|
12
|
+
// TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
|
|
13
|
+
// with the next opportunity we should abstract it
|
|
14
|
+
const dashboardContext = {
|
|
15
|
+
adaptableApi: props.api,
|
|
16
|
+
dashboardState: props.api.dashboardApi.getDashboardState(),
|
|
17
|
+
};
|
|
18
|
+
const defaultIconProps = {
|
|
19
|
+
style: {
|
|
20
|
+
height: 'var(--ab-cmp-simple-button__height)',
|
|
21
|
+
width: 'var(--ab-cmp-simple-button__width)',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
const buttonIcon = props.api.internalApi.getIconForButton(button, dashboardContext);
|
|
25
|
+
const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
|
|
26
|
+
// const iconProps: any = button.icon ? { ...button.icon } : null;
|
|
27
|
+
// if (iconProps) {
|
|
28
|
+
// delete iconProps.Uuid;
|
|
29
|
+
// }
|
|
30
|
+
let buttonStyle = props.api.internalApi.getStyleForButton(button, dashboardContext);
|
|
31
|
+
let buttonLabel = props.api.internalApi.getLabelForButton(button, dashboardContext);
|
|
32
|
+
let buttonTooltip = props.api.internalApi.getTooltipForButton(button, dashboardContext);
|
|
33
|
+
if (button.hidden && button.hidden(button, dashboardContext)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const disabled = button.disabled && button.disabled(button, dashboardContext);
|
|
37
|
+
return (React.createElement(SimpleButton_1.default, { key: buttonLabel, variant: buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'text', tone: buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none', className: `ab-DashboardToolbar__Home__${kebabCase_1.default(buttonLabel)} ${(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || ''}`, tooltip: buttonTooltip, disabled: disabled || props.accessLevel == 'ReadOnly', onClick: () => {
|
|
38
|
+
var _a;
|
|
39
|
+
(_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, dashboardContext);
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
// mutate state to force a re-rendering
|
|
42
|
+
setComponentRevision(componentRevision + 1);
|
|
43
|
+
}, 16);
|
|
44
|
+
}, accessLevel: 'Full' },
|
|
45
|
+
buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
46
|
+
buttonLabel));
|
|
47
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { CustomToolbar } from '../../AdaptableOptions/DashboardOptions';
|
|
3
3
|
interface CustomToolbarWrapperProps {
|
|
4
4
|
customToolbar: CustomToolbar;
|
|
5
|
+
dashboardRevision: number;
|
|
5
6
|
}
|
|
6
7
|
export declare const CustomToolbarWrapper: (props: CustomToolbarWrapperProps) => JSX.Element;
|
|
7
8
|
export {};
|