@adaptabletools/adaptable 11.2.4-canary.0 → 12.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +22 -4
- package/bundle.cjs.js +111 -111
- package/index.css +26 -4
- package/package.json +1 -1
- 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/{MasterDetailAgGridPluginOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- 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/{SmartEdit.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 +92 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +22 -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 +81 -54
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +6 -3
- 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 +18 -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/RowFormSubmitted.d.ts +19 -0
- package/src/Api/Events/RowFormSubmitted.js +2 -0
- package/src/Api/Events/SearchChanged.d.ts +3 -4
- package/src/Api/FilterApi.d.ts +1 -77
- package/src/Api/FinanceApi.d.ts +3 -2
- package/src/Api/FormatColumnApi.d.ts +28 -1
- 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 +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +6 -3
- 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/FilterApiImpl.d.ts +1 -16
- package/src/Api/Implementation/FilterApiImpl.js +5 -164
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +41 -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 +18 -1
- package/src/Api/Implementation/LayoutApiImpl.js +172 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -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 +88 -1
- 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 +6 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +35 -2
- 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/FDC3Context.d.ts +5 -1
- 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 +135 -1
- 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/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +28 -14
- 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 +24 -15
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +24 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +5 -6
- 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 +6 -2
- package/src/Utilities/Constants/GeneralConstants.js +6 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +22 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
- 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/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 +25 -0
- package/src/Utilities/Services/RowEditService.js +165 -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/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
- package/src/View/CellSummary/CellSummaryDetails.js +2 -2
- 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 +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +9 -7
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +21 -7
- 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/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- 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 +6 -5
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +11 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.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 +4 -4
- 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 +217 -87
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +6 -6
- package/src/agGrid/agGridHelper.js +34 -56
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +4 -0
- package/src/agGrid/rowEditIcons.js +9 -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/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 → data-set.d.ts} +0 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +242 -70
- package/src/metamodel/adaptable.metamodel.js +620 -376
- package/src/types.d.ts +19 -15
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
@@ -10,7 +10,6 @@ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlo
|
|
|
10
10
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
11
11
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
12
12
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
13
|
-
const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/FormatHelper"));
|
|
14
13
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
15
14
|
const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
|
|
16
15
|
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
@@ -18,6 +17,7 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
|
18
17
|
const Tabs_1 = require("../../../components/Tabs");
|
|
19
18
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
20
19
|
const Tag_1 = require("../../../components/Tag");
|
|
20
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
21
21
|
const DOLLAR_OPTIONS = {
|
|
22
22
|
FractionDigits: 2,
|
|
23
23
|
FractionSeparator: '.',
|
|
@@ -77,26 +77,45 @@ const DateFormatPresets = [
|
|
|
77
77
|
'yyyyMMdd',
|
|
78
78
|
'HH:mm:ss',
|
|
79
79
|
];
|
|
80
|
-
exports.getFormatColumnFormatSummaryValue = (data) => {
|
|
80
|
+
exports.getFormatColumnFormatSummaryValue = (data, formattedColumnApi) => {
|
|
81
81
|
let content = 'N/A';
|
|
82
82
|
if (!data.DisplayFormat) {
|
|
83
83
|
content = 'N/A';
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
if (data.DisplayFormat.Formatter === 'NumberFormatter') {
|
|
87
|
-
content =
|
|
87
|
+
content = formattedColumnApi.getNumberFormattedValue(12345.6789, data.DisplayFormat.Options);
|
|
88
88
|
}
|
|
89
89
|
if (data.DisplayFormat.Formatter === 'DateFormatter') {
|
|
90
|
-
content =
|
|
90
|
+
content = formattedColumnApi.getDateFormattedValue(new Date(), data.DisplayFormat.Options);
|
|
91
91
|
}
|
|
92
92
|
if (data.DisplayFormat.Formatter === 'StringFormatter') {
|
|
93
|
-
content =
|
|
93
|
+
content = formattedColumnApi.getStringFormattedValue('Hello World ', data.DisplayFormat.Options);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
return content;
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
function splitArrayInTwo(arr) {
|
|
99
|
+
const half = Math.floor(arr.length - 1 / 2);
|
|
100
|
+
return [arr.slice(0, half), arr.slice(half)];
|
|
101
|
+
}
|
|
102
|
+
const renderCustomFormatter = (data, customFormatter, setFormatOption) => {
|
|
103
|
+
var _a, _b, _c;
|
|
104
|
+
return (React.createElement(FormLayout_1.FormRow, { key: customFormatter.id, label: (_a = customFormatter.label) !== null && _a !== void 0 ? _a : customFormatter.id },
|
|
105
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_c = (_b = data.DisplayFormat.Options.CustomDisplayFormats) === null || _b === void 0 ? void 0 : _b.some) === null || _c === void 0 ? void 0 : _c.call(_b, (item) => item === customFormatter.id), onChange: (checked) => {
|
|
106
|
+
var _a, _b, _c;
|
|
107
|
+
let newCustomFormats = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.DisplayFormat) === null || _a === void 0 ? void 0 : _a.Options) === null || _b === void 0 ? void 0 : _b.CustomDisplayFormats) !== null && _c !== void 0 ? _c : [];
|
|
108
|
+
if (checked) {
|
|
109
|
+
newCustomFormats = [...newCustomFormats, customFormatter.id];
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
newCustomFormats = newCustomFormats.filter((item) => item !== customFormatter.id);
|
|
113
|
+
}
|
|
114
|
+
setFormatOption('CustomDisplayFormats', newCustomFormats);
|
|
115
|
+
} })));
|
|
116
|
+
};
|
|
117
|
+
exports.renderFormatColumnFormatSummary = (data, api) => {
|
|
118
|
+
return React.createElement(Tag_1.Tag, null, exports.getFormatColumnFormatSummaryValue(data, api.formatColumnApi));
|
|
100
119
|
};
|
|
101
120
|
exports.getFormatDisplayTypeForScope = (scope, api) => {
|
|
102
121
|
if (scope == undefined) {
|
|
@@ -131,7 +150,7 @@ exports.getFormatDisplayTypeForScope = (scope, api) => {
|
|
|
131
150
|
}
|
|
132
151
|
return undefined;
|
|
133
152
|
};
|
|
134
|
-
const renderDateFormat = (data, _onChange, setFormatOption) => {
|
|
153
|
+
const renderDateFormat = (data, _onChange, setFormatOption, customFormatters, formatColumnApi) => {
|
|
135
154
|
if (data.DisplayFormat.Formatter !== 'DateFormatter') {
|
|
136
155
|
return null;
|
|
137
156
|
}
|
|
@@ -147,7 +166,8 @@ const renderDateFormat = (data, _onChange, setFormatOption) => {
|
|
|
147
166
|
React.createElement(FormLayout_1.default, null,
|
|
148
167
|
React.createElement(FormLayout_1.FormRow, { label: "Pattern" },
|
|
149
168
|
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Pattern, onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), mr: 2 }),
|
|
150
|
-
React.createElement("span", null,
|
|
169
|
+
React.createElement("span", null, formatColumnApi.getDateFormattedValue(new Date(), data.DisplayFormat.Options))),
|
|
170
|
+
customFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption))))),
|
|
151
171
|
React.createElement(Tabs_1.Tabs, { marginTop: 2 },
|
|
152
172
|
React.createElement(Tabs_1.Tabs.Tab, null, "Presets"),
|
|
153
173
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -159,7 +179,7 @@ const renderDateFormat = (data, _onChange, setFormatOption) => {
|
|
|
159
179
|
DateFormatPresets.map((Pattern, index) => (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: index, colItems: [
|
|
160
180
|
{ Content: Pattern, Size: 1 },
|
|
161
181
|
{
|
|
162
|
-
Content:
|
|
182
|
+
Content: formatColumnApi.getDateFormattedValue(new Date(), { Pattern }),
|
|
163
183
|
Size: 1,
|
|
164
184
|
},
|
|
165
185
|
{
|
|
@@ -168,7 +188,7 @@ const renderDateFormat = (data, _onChange, setFormatOption) => {
|
|
|
168
188
|
},
|
|
169
189
|
] })))))));
|
|
170
190
|
};
|
|
171
|
-
const renderNumberFormat = (data, onChange, setFormatOption) => {
|
|
191
|
+
const renderNumberFormat = (data, onChange, setFormatOption, customFormatters, formatColumnApi) => {
|
|
172
192
|
if (data.DisplayFormat.Formatter !== 'NumberFormatter') {
|
|
173
193
|
return null;
|
|
174
194
|
}
|
|
@@ -220,6 +240,7 @@ const renderNumberFormat = (data, onChange, setFormatOption) => {
|
|
|
220
240
|
data.DisplayFormat.Options.Multiplier === MILLION_OPTIONS.Multiplier; //isEqual(data.DisplayFormat.Options, MILLION_OPTIONS);
|
|
221
241
|
const IS_DOLLAR = data.DisplayFormat.Options.Prefix === '$'; //isEqual(data.DisplayFormat.Options, DOLLAR_OPTIONS);
|
|
222
242
|
const IS_STERLING = data.DisplayFormat.Options.Prefix === '£'; //isEqual(data.DisplayFormat, STERLING_OPTIONS);
|
|
243
|
+
const [leftCustomFormatters, rightCustomFormatters] = splitArrayInTwo(customFormatters);
|
|
223
244
|
return (React.createElement(rebass_1.Box, { "data-name": 'format-column-display-format', padding: 2 },
|
|
224
245
|
React.createElement(Tabs_1.Tabs, null,
|
|
225
246
|
React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
|
|
@@ -233,7 +254,8 @@ const renderNumberFormat = (data, onChange, setFormatOption) => {
|
|
|
233
254
|
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
234
255
|
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Prefix, onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
235
256
|
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
236
|
-
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Suffix, onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) }))
|
|
257
|
+
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Suffix, onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })),
|
|
258
|
+
leftCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption))),
|
|
237
259
|
React.createElement(FormLayout_1.default, null,
|
|
238
260
|
React.createElement(FormLayout_1.FormRow, { label: "Fraction Digits" },
|
|
239
261
|
React.createElement(Input_1.default, { type: "number", min: "0",
|
|
@@ -250,7 +272,8 @@ const renderNumberFormat = (data, onChange, setFormatOption) => {
|
|
|
250
272
|
React.createElement(FormLayout_1.FormRow, { label: "Parentheses" },
|
|
251
273
|
React.createElement(CheckBox_1.CheckBox, { checked: data.DisplayFormat.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) })),
|
|
252
274
|
React.createElement(FormLayout_1.FormRow, { label: "Truncate" },
|
|
253
|
-
React.createElement(CheckBox_1.CheckBox, { checked: data.DisplayFormat.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) }))
|
|
275
|
+
React.createElement(CheckBox_1.CheckBox, { checked: data.DisplayFormat.Options.Truncate, onChange: (checked) => setFormatOption('Truncate', checked) })),
|
|
276
|
+
rightCustomFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)))))),
|
|
254
277
|
React.createElement(Tabs_1.Tabs, { marginTop: 2, autoFocus: false, keyboardNavigation: false },
|
|
255
278
|
React.createElement(Tabs_1.Tabs.Tab, null, "Presets"),
|
|
256
279
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -273,26 +296,26 @@ const renderNumberFormat = (data, onChange, setFormatOption) => {
|
|
|
273
296
|
React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
|
|
274
297
|
{ Content: '12345.6789', Size: 1 },
|
|
275
298
|
{
|
|
276
|
-
Content:
|
|
299
|
+
Content: formatColumnApi.getNumberFormattedValue(12345.6789, data.DisplayFormat.Options),
|
|
277
300
|
Size: 1,
|
|
278
301
|
},
|
|
279
302
|
] }),
|
|
280
303
|
React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
|
|
281
304
|
{ Content: '-12345.6789', Size: 1 },
|
|
282
305
|
{
|
|
283
|
-
Content:
|
|
306
|
+
Content: formatColumnApi.getNumberFormattedValue(-12345.6789, data.DisplayFormat.Options),
|
|
284
307
|
Size: 1,
|
|
285
308
|
},
|
|
286
309
|
] }),
|
|
287
310
|
React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: [
|
|
288
311
|
{ Content: '0.123', Size: 1 },
|
|
289
312
|
{
|
|
290
|
-
Content:
|
|
313
|
+
Content: formatColumnApi.getNumberFormattedValue(0.123, data.DisplayFormat.Options),
|
|
291
314
|
Size: 1,
|
|
292
315
|
},
|
|
293
316
|
] })))));
|
|
294
317
|
};
|
|
295
|
-
const renderStringFormat = (data, _onChange, setFormatOption) => {
|
|
318
|
+
const renderStringFormat = (data, _onChange, setFormatOption, customFormatters, formatColumnApi) => {
|
|
296
319
|
if (data.DisplayFormat.Formatter !== 'StringFormatter') {
|
|
297
320
|
return null;
|
|
298
321
|
}
|
|
@@ -311,7 +334,8 @@ const renderStringFormat = (data, _onChange, setFormatOption) => {
|
|
|
311
334
|
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
312
335
|
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Prefix, onChange: (e) => setFormatOption('Prefix', e.currentTarget.value) })),
|
|
313
336
|
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
314
|
-
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Suffix, onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) }))
|
|
337
|
+
React.createElement(Input_1.default, { value: data.DisplayFormat.Options.Suffix, onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })),
|
|
338
|
+
customFormatters.map((formatter) => renderCustomFormatter(data, formatter, setFormatOption)))))),
|
|
315
339
|
React.createElement(Tabs_1.Tabs, { marginTop: 2, keyboardNavigation: false },
|
|
316
340
|
React.createElement(Tabs_1.Tabs.Tab, null, "Example"),
|
|
317
341
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -323,14 +347,18 @@ const renderStringFormat = (data, _onChange, setFormatOption) => {
|
|
|
323
347
|
{ Content: '"Hello World "', Size: 1 },
|
|
324
348
|
{
|
|
325
349
|
Content: '"' +
|
|
326
|
-
|
|
350
|
+
formatColumnApi.getStringFormattedValue('Hello World ', data.DisplayFormat.Options) +
|
|
327
351
|
'"',
|
|
328
352
|
Size: 1,
|
|
329
353
|
},
|
|
330
354
|
] })))));
|
|
331
355
|
};
|
|
332
356
|
exports.FormatColumnFormatWizardSection = (props) => {
|
|
357
|
+
var _a, _b, _c;
|
|
333
358
|
const { data } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
359
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
360
|
+
const formatColumnApi = adaptable.api.formatColumnApi;
|
|
361
|
+
const customDisplayFormatters = (_c = (_b = (_a = adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
334
362
|
const update = (updated) => {
|
|
335
363
|
props.onChange(Object.assign(Object.assign({}, data), updated));
|
|
336
364
|
};
|
|
@@ -341,14 +369,15 @@ exports.FormatColumnFormatWizardSection = (props) => {
|
|
|
341
369
|
update({ DisplayFormat });
|
|
342
370
|
};
|
|
343
371
|
const Type = data.DisplayFormat && data.DisplayFormat.Formatter;
|
|
372
|
+
const customNumberFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.scopeApi.isScopeInScope(displayFormatter.scope, data.Scope));
|
|
344
373
|
if (Type === 'NumberFormatter') {
|
|
345
|
-
return renderNumberFormat(data, update, setFormatOption);
|
|
374
|
+
return renderNumberFormat(data, update, setFormatOption, customNumberFormatters, formatColumnApi);
|
|
346
375
|
}
|
|
347
376
|
if (Type === 'DateFormatter') {
|
|
348
|
-
return renderDateFormat(data, update, setFormatOption);
|
|
377
|
+
return renderDateFormat(data, update, setFormatOption, customNumberFormatters, formatColumnApi);
|
|
349
378
|
}
|
|
350
379
|
if (Type === 'StringFormatter') {
|
|
351
|
-
return renderStringFormat(data, update, setFormatOption);
|
|
380
|
+
return renderStringFormat(data, update, setFormatOption, customNumberFormatters, formatColumnApi);
|
|
352
381
|
}
|
|
353
382
|
return (React.createElement(HelpBlock_1.default, { margin: 3 },
|
|
354
383
|
"Setting a Display Format is only available if ",
|
|
@@ -125,7 +125,7 @@ function FormatColumnWizard(props) {
|
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
title: 'Display Format',
|
|
128
|
-
renderSummary: FormatColumnFormatWizardSection_1.renderFormatColumnFormatSummary,
|
|
128
|
+
renderSummary: (data) => FormatColumnFormatWizardSection_1.renderFormatColumnFormatSummary(data, api),
|
|
129
129
|
render: () => {
|
|
130
130
|
return React.createElement(FormatColumnFormatWizardSection_1.FormatColumnFormatWizardSection, { onChange: setFormatColumn });
|
|
131
131
|
},
|
|
@@ -57,7 +57,7 @@ exports.GridInfoPopup = (props) => {
|
|
|
57
57
|
const freeTextColumns = props.api.freeTextColumnApi
|
|
58
58
|
.getAllFreeTextColumn()
|
|
59
59
|
.map((c) => c.ColumnId);
|
|
60
|
-
const columnFilterDescription = props.api.
|
|
60
|
+
const columnFilterDescription = props.api.layoutApi.columnFiltersToString(props.api.layoutApi.getAllColumnFilter());
|
|
61
61
|
const sorts = ArrayExtensions_1.default.IsNotNullOrEmpty(props.api.gridApi.getColumnSorts())
|
|
62
62
|
? props.api.gridApi.getColumnSorts().map((gs) => {
|
|
63
63
|
return props.api.columnApi.getFriendlyNameFromColumnId(gs.ColumnId) + ': ' + gs.SortOrder;
|
|
@@ -3,32 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LayoutStatusBarSubPanelPopover = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
const SelectList_1 = require("../../components/SelectList");
|
|
8
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
-
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
10
|
-
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
11
|
-
const LayoutRadioSelector_1 = require("./LayoutRadioSelector");
|
|
12
|
-
const colItems = [
|
|
13
|
-
{ Content: 'Current', Size: 2 },
|
|
14
|
-
{ Content: 'Layout Name', Size: 4 },
|
|
15
|
-
];
|
|
16
8
|
exports.LayoutStatusBarSubPanelPopover = () => {
|
|
17
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
18
|
-
const accessLevel = adaptable.EntitlementService.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
|
|
19
10
|
const layouts = adaptable.api.layoutApi.getAllLayout();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Content: (React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { accessLevel: accessLevel, id: layout.Name, data: layout })),
|
|
26
|
-
Size: 1,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: layout.Name }, layout.Name)),
|
|
30
|
-
Size: 4,
|
|
31
|
-
},
|
|
32
|
-
] }));
|
|
33
|
-
})));
|
|
11
|
+
const options = layouts.map((layout) => ({ label: layout.Name, value: layout.Uuid }));
|
|
12
|
+
const handleChange = (option) => {
|
|
13
|
+
adaptable.api.layoutApi.setLayout(option.label);
|
|
14
|
+
};
|
|
15
|
+
return React.createElement(SelectList_1.SelectList, { options: options, onChange: handleChange });
|
|
34
16
|
};
|
|
@@ -223,7 +223,7 @@ exports.LayoutEditor = React.memo((props) => {
|
|
|
223
223
|
// JW: Not sure we do - why not just make it always visible as we ignore if if not required.
|
|
224
224
|
const aggregateEnabled = true;
|
|
225
225
|
const customHeader = headerColumnsMap[c.columnId];
|
|
226
|
-
const initialHeader = api.
|
|
226
|
+
const initialHeader = api.columnApi.getFriendlyNameFromColumnId(c.columnId);
|
|
227
227
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "stretch", "data-name": "drag-item", "data-col-id": c.columnId },
|
|
228
228
|
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", backgroundColor: "secondary", color: "text-on-secondary" },
|
|
229
229
|
React.createElement(rebass_1.Flex, { flex: 1, alignItems: "center" },
|
|
@@ -27,6 +27,7 @@ export declare class LayoutEditorWizard extends React.Component<LayoutEditorWiza
|
|
|
27
27
|
[columnId: string]: number;
|
|
28
28
|
};
|
|
29
29
|
ColumnSorts?: import("../../../types").ColumnSort[];
|
|
30
|
+
ColumnFilters?: import("../../../types").ColumnFilter[];
|
|
30
31
|
RowGroupedColumns?: string[];
|
|
31
32
|
ExpandedRowGroupValues?: any[];
|
|
32
33
|
AggregationColumns?: Record<string, string | true>;
|
|
@@ -43,7 +44,7 @@ export declare class LayoutEditorWizard extends React.Component<LayoutEditorWiza
|
|
|
43
44
|
Uuid?: string;
|
|
44
45
|
Source?: "Config" | "User";
|
|
45
46
|
IsReadOnly?: boolean;
|
|
46
|
-
Tags?:
|
|
47
|
+
Tags?: string[];
|
|
47
48
|
};
|
|
48
49
|
canNext(): boolean;
|
|
49
50
|
canBack(): boolean;
|
|
@@ -3,7 +3,7 @@ import * as SmartEditRedux from '../../Redux/ActionsReducers/SmartEditRedux';
|
|
|
3
3
|
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
4
4
|
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
6
|
-
import { SmartEditOperation } from '../../AdaptableOptions/
|
|
6
|
+
import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
7
7
|
interface SmartEditPopupProps extends ModuleViewPopupProps<SmartEditPopupComponent> {
|
|
8
8
|
SmartEditValue: number;
|
|
9
9
|
SmartEditOperation: SmartEditOperation;
|
|
@@ -27,7 +27,6 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
27
27
|
this.props.onSmartEditCheckSelectedCells();
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
var _a, _b, _c;
|
|
31
30
|
let col;
|
|
32
31
|
if (this.props.PreviewInfo) {
|
|
33
32
|
col = this.props.PreviewInfo.column;
|
|
@@ -43,12 +42,12 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
43
42
|
},
|
|
44
43
|
};
|
|
45
44
|
});
|
|
46
|
-
const customOperations =
|
|
45
|
+
const customOperations = this.props.api.smartEditApi.getSmartEditCustomOperations();
|
|
47
46
|
if (customOperations === null || customOperations === void 0 ? void 0 : customOperations.length) {
|
|
48
47
|
operationMenuItems.push(...customOperations.map((operation) => {
|
|
49
48
|
return {
|
|
50
49
|
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
51
|
-
label: operation.
|
|
50
|
+
label: operation.name,
|
|
52
51
|
};
|
|
53
52
|
}));
|
|
54
53
|
}
|
|
@@ -61,7 +60,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
61
60
|
} },
|
|
62
61
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "smart-edit-operation" },
|
|
63
62
|
React.createElement(DropdownButton_1.default, { items: operationMenuItems, columns: ['label'], onMouseDown: preventDefault }, typeof this.props.SmartEditOperation === 'object'
|
|
64
|
-
? this.props.SmartEditOperation.
|
|
63
|
+
? this.props.SmartEditOperation.name
|
|
65
64
|
: this.props.SmartEditOperation),
|
|
66
65
|
React.createElement(Input_1.default, { value: this.props.SmartEditValue.toString(), marginLeft: 2, marginRight: 2, type: "number", placeholder: "Enter a Number", onChange: (e) => this.onSmartEditValueChange(e) }),
|
|
67
66
|
React.createElement(SimpleButton_1.default, { tone: this.getButtonStyle(), variant: "raised", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
|
|
@@ -3,7 +3,7 @@ import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
|
3
3
|
import * as SmartEditRedux from '../../Redux/ActionsReducers/SmartEditRedux';
|
|
4
4
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { SmartEditOperation } from '../../AdaptableOptions/
|
|
6
|
+
import { SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
7
7
|
export interface SmartEditViewPanelComponentProps extends ViewPanelProps {
|
|
8
8
|
SmartEditValue: number | undefined;
|
|
9
9
|
SmartEditOperation: SmartEditOperation | undefined;
|
|
@@ -39,7 +39,6 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
39
39
|
(_a = this.cleanupEvent) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
var _a, _b, _c;
|
|
43
42
|
let statusColour = this.getStatusColour();
|
|
44
43
|
let selectedColumn = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.state.SelectedColumnId)
|
|
45
44
|
? this.props.api.columnApi.getColumnFromId(this.state.SelectedColumnId)
|
|
@@ -51,12 +50,12 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
51
50
|
label: mathOperation,
|
|
52
51
|
};
|
|
53
52
|
});
|
|
54
|
-
const customOperations =
|
|
53
|
+
const customOperations = this.props.api.smartEditApi.getSmartEditCustomOperations();
|
|
55
54
|
if (customOperations === null || customOperations === void 0 ? void 0 : customOperations.length) {
|
|
56
55
|
operationMenuItems.push(...customOperations.map((operation) => {
|
|
57
56
|
return {
|
|
58
57
|
onClick: () => this.props.onSmartEditOperationChange(operation),
|
|
59
|
-
label: operation.
|
|
58
|
+
label: operation.name,
|
|
60
59
|
};
|
|
61
60
|
}));
|
|
62
61
|
}
|
|
@@ -71,7 +70,7 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
71
70
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
72
71
|
React.createElement(rebass_1.Flex, null,
|
|
73
72
|
React.createElement(DropdownButton_1.default, { className: `ab-${elementType}__SmartEdit__select`, marginRight: 2, items: operationMenuItems, style: { fontSize: 'small' }, columns: ['label'], disabled: shouldDisable, variant: "outlined" }, typeof this.props.SmartEditOperation === 'object'
|
|
74
|
-
? this.props.SmartEditOperation.
|
|
73
|
+
? this.props.SmartEditOperation.name
|
|
75
74
|
: this.props.SmartEditOperation),
|
|
76
75
|
React.createElement(Input_1.default, { style: {
|
|
77
76
|
width: '5rem',
|
|
@@ -12,7 +12,7 @@ const AdaptableContext_1 = require("./AdaptableContext");
|
|
|
12
12
|
exports.SpecialColumnSettingsWizardStep = (props) => {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
15
|
-
const possibleColumnTypes = adaptable.api.internalApi.getAdaptableOptions().
|
|
15
|
+
const possibleColumnTypes = adaptable.api.internalApi.getAdaptableOptions().columnOptions.columnTypes;
|
|
16
16
|
const { Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = (_a = props.settings) !== null && _a !== void 0 ? _a : {};
|
|
17
17
|
const handleColumnTypeChange = (columnType, checked) => {
|
|
18
18
|
var _a, _b, _c;
|
|
@@ -39,6 +39,6 @@ exports.AdaptableStatusBar = (props) => {
|
|
|
39
39
|
dispatch(menuItem.reduxAction);
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
return (React.createElement(StatusBarPanel_1.StatusBarPanel, Object.assign({ "data-name": subPanel }, statusBarPanelProps, { onAction: onAction, icon: (_f = statusBarPanelProps.icon) !== null && _f !== void 0 ? _f : moduleInfo.Glyph, key: subPanel })));
|
|
42
|
+
return (React.createElement(StatusBarPanel_1.StatusBarPanel, Object.assign({ "data-name": subPanel }, statusBarPanelProps, { tooltip: moduleInfo.FriendlyName, onAction: onAction, icon: (_f = statusBarPanelProps.icon) !== null && _f !== void 0 ? _f : moduleInfo.Glyph, key: subPanel })));
|
|
43
43
|
})));
|
|
44
44
|
};
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
8
9
|
const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
9
10
|
/**
|
|
10
11
|
* Statusbar sub panel are similar to vs code:
|
|
@@ -14,7 +15,7 @@ const AdaptablePopover_1 = require("../AdaptablePopover");
|
|
|
14
15
|
*/
|
|
15
16
|
exports.StatusBarPanel = (props) => {
|
|
16
17
|
var _a;
|
|
17
|
-
const { icon, content, popover, popoverMinWidth, view, onAction, extraActions, triggerActionOnWrapperClick = true } = props, flexProps = tslib_1.__rest(props, ["icon", "content", "popover", "popoverMinWidth", "view", "onAction", "extraActions", "triggerActionOnWrapperClick"]);
|
|
18
|
+
const { icon, content, popover, popoverMinWidth, view, onAction, extraActions, triggerActionOnWrapperClick = true, tooltip } = props, flexProps = tslib_1.__rest(props, ["icon", "content", "popover", "popoverMinWidth", "view", "onAction", "extraActions", "triggerActionOnWrapperClick", "tooltip"]);
|
|
18
19
|
const handleAction = () => onAction();
|
|
19
20
|
if (view) {
|
|
20
21
|
const View = view;
|
|
@@ -39,7 +40,7 @@ exports.StatusBarPanel = (props) => {
|
|
|
39
40
|
? React.createElement(content)
|
|
40
41
|
: content;
|
|
41
42
|
return (React.createElement(rebass_1.Flex, Object.assign({}, flexProps, { alignItems: "center", justifyContent: "center", as: shouldTriggerActionOnWrapperClick ? 'button' : 'div', className: baseClassName, onClick: handleWrapperClick }),
|
|
42
|
-
props.icon && (React.createElement(SimpleButton_1.default, { color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
43
|
-
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent),
|
|
44
|
-
_a.call(extraActions, (action, index) => React.createElement(action, { key: index }))));
|
|
43
|
+
props.icon && (React.createElement(SimpleButton_1.default, { tooltip: tooltip, color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
44
|
+
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { tooltipText: tooltip, showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent),
|
|
45
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(extraActions) && (React.createElement(rebass_1.Box, { ml: 1 }, (_a = extraActions === null || extraActions === void 0 ? void 0 : extraActions.map) === null || _a === void 0 ? void 0 : _a.call(extraActions, (action, index) => React.createElement(action, { key: index }))))));
|
|
45
46
|
};
|
|
@@ -3,34 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ThemeStatusPanelPopover = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
6
|
+
const SelectList_1 = require("../../components/SelectList");
|
|
8
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
-
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
10
|
-
const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
|
|
11
|
-
const colItems = [
|
|
12
|
-
{ Content: 'Current', Size: 2 },
|
|
13
|
-
{ Content: 'Theme Name', Size: 4 },
|
|
14
|
-
];
|
|
15
8
|
exports.ThemeStatusPanelPopover = () => {
|
|
16
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
10
|
const themes = adaptable.api.themeApi.getAllTheme();
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
adaptable.api.themeApi.loadTheme(theme.Name);
|
|
11
|
+
const handleThemeChange = React.useCallback((option) => {
|
|
12
|
+
adaptable.api.themeApi.loadTheme(option.label);
|
|
21
13
|
}, []);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
themes.map((theme) => {
|
|
25
|
-
return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: theme.Name, colItems: [
|
|
26
|
-
{
|
|
27
|
-
Content: (React.createElement(Radio_1.default, { onClick: () => handleThemeChange(theme), id: theme.Name, checked: currentTheme === theme.Name })),
|
|
28
|
-
Size: 1,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: theme.Name }, theme.Name)),
|
|
32
|
-
Size: 4,
|
|
33
|
-
},
|
|
34
|
-
] }));
|
|
35
|
-
})));
|
|
14
|
+
const options = themes.map((theme) => ({ label: theme.Name, value: theme.Uuid }));
|
|
15
|
+
return React.createElement(SelectList_1.SelectList, { options: options, onChange: handleThemeChange });
|
|
36
16
|
};
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { EditableConfigEntityState } from './Components/SharedProps/EditableConf
|
|
|
3
3
|
import { StatusColour } from '../PredefinedConfig/Common/Enums';
|
|
4
4
|
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
5
5
|
import { Schedule, Weekday } from '../PredefinedConfig/Common/Schedule';
|
|
6
|
-
import { AdaptableOptions } from '../types';
|
|
6
|
+
import { AdaptableColumnDataType, AdaptableOptions } from '../types';
|
|
7
7
|
import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
8
8
|
import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessageType';
|
|
9
9
|
export declare const BLACK: string;
|
|
@@ -29,8 +29,8 @@ export declare const ORANGE: string;
|
|
|
29
29
|
export declare function getHexForName(name: string): string;
|
|
30
30
|
export declare function getDefaultColors(): string[];
|
|
31
31
|
export declare function getEmptyConfigState(): EditableConfigEntityState;
|
|
32
|
-
export declare function getDescriptionForDataType(dataType:
|
|
33
|
-
export declare function
|
|
32
|
+
export declare function getDescriptionForDataType(dataType: AdaptableColumnDataType): "string" | "number" | "date";
|
|
33
|
+
export declare function getPlaceholderForDataType(dataType: AdaptableColumnDataType): "Enter Value" | "Enter Number" | "Enter Date";
|
|
34
34
|
export declare function getModalContainer(adaptableOptions: AdaptableOptions, document: Document): HTMLElement;
|
|
35
35
|
export declare function IsEmptyStyle(style: AdaptableStyle): boolean;
|
|
36
36
|
export declare function IsNotEmptyStyle(style: AdaptableStyle): boolean;
|
|
@@ -58,7 +58,7 @@ export declare const UIHelper: {
|
|
|
58
58
|
getDefaultColors: typeof getDefaultColors;
|
|
59
59
|
getEmptyConfigState: typeof getEmptyConfigState;
|
|
60
60
|
getDescriptionForDataType: typeof getDescriptionForDataType;
|
|
61
|
-
getPlaceHolderforDataType: typeof
|
|
61
|
+
getPlaceHolderforDataType: typeof getPlaceholderForDataType;
|
|
62
62
|
getModalContainer: typeof getModalContainer;
|
|
63
63
|
IsEmptyStyle: typeof IsEmptyStyle;
|
|
64
64
|
IsNotEmptyStyle: typeof IsNotEmptyStyle;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.
|
|
3
|
+
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.getPlaceholderForDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const EditableConfigEntityState_1 = require("./Components/SharedProps/EditableConfigEntityState");
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
@@ -118,7 +118,7 @@ function getDescriptionForDataType(dataType) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
exports.getDescriptionForDataType = getDescriptionForDataType;
|
|
121
|
-
function
|
|
121
|
+
function getPlaceholderForDataType(dataType) {
|
|
122
122
|
switch (dataType) {
|
|
123
123
|
case Enums_1.DataType.String:
|
|
124
124
|
return 'Enter Value';
|
|
@@ -128,7 +128,7 @@ function getPlaceHolderforDataType(dataType) {
|
|
|
128
128
|
return 'Enter Date';
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
exports.
|
|
131
|
+
exports.getPlaceholderForDataType = getPlaceholderForDataType;
|
|
132
132
|
function getModalContainer(adaptableOptions, document) {
|
|
133
133
|
let modalContainer;
|
|
134
134
|
if (adaptableOptions.containerOptions.modalContainer) {
|
|
@@ -466,7 +466,7 @@ exports.UIHelper = {
|
|
|
466
466
|
getDefaultColors,
|
|
467
467
|
getEmptyConfigState,
|
|
468
468
|
getDescriptionForDataType,
|
|
469
|
-
getPlaceHolderforDataType,
|
|
469
|
+
getPlaceHolderforDataType: getPlaceholderForDataType,
|
|
470
470
|
getModalContainer,
|
|
471
471
|
IsEmptyStyle,
|
|
472
472
|
IsNotEmptyStyle,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { ICellRendererComp, ICellRendererParams } from '@ag-grid-community/all-modules';
|
|
2
|
+
import { ActionColumn } from '../AdaptableOptions/UserInterfaceOptions';
|
|
3
|
+
interface ActionColumnCellRendererParams extends ICellRendererParams {
|
|
4
|
+
actionColumn?: ActionColumn;
|
|
5
|
+
}
|
|
2
6
|
export declare class ActionColumnRenderer implements ICellRendererComp {
|
|
3
7
|
private eGui;
|
|
4
8
|
private eventListener;
|
|
5
|
-
init(params:
|
|
9
|
+
init(params: ActionColumnCellRendererParams): void;
|
|
6
10
|
render(): void;
|
|
7
11
|
getGui(): HTMLElement;
|
|
8
12
|
refresh(params: ICellRendererParams): boolean;
|
|
9
13
|
destroy(): void;
|
|
10
14
|
}
|
|
15
|
+
export {};
|
|
@@ -11,8 +11,10 @@ class ActionColumnRenderer {
|
|
|
11
11
|
init(params) {
|
|
12
12
|
var _a;
|
|
13
13
|
const adaptable = params.api.__adaptable;
|
|
14
|
-
const actionCol =
|
|
15
|
-
|
|
14
|
+
const actionCol = params.actionColumn
|
|
15
|
+
? params.actionColumn
|
|
16
|
+
: (_a = adaptable.api.userInterfaceApi
|
|
17
|
+
.getAllActionColumn()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == params.colDef.colId);
|
|
16
18
|
if (actionCol && actionCol.actionColumnButton) {
|
|
17
19
|
let actionButtons = Array.isArray(actionCol.actionColumnButton)
|
|
18
20
|
? actionCol.actionColumnButton
|
|
@@ -38,7 +40,7 @@ class ActionColumnRenderer {
|
|
|
38
40
|
adaptableApi: adaptable.api,
|
|
39
41
|
};
|
|
40
42
|
const renderActionButtons = (buttons, adaptableApi, context) => {
|
|
41
|
-
return (React.createElement(React.Fragment, null, buttons.map((button) => {
|
|
43
|
+
return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
|
|
42
44
|
var _a, _b;
|
|
43
45
|
if (button.hidden && button.hidden(button, context)) {
|
|
44
46
|
return;
|
|
@@ -49,7 +51,8 @@ class ActionColumnRenderer {
|
|
|
49
51
|
width: 15,
|
|
50
52
|
},
|
|
51
53
|
};
|
|
52
|
-
const
|
|
54
|
+
const buttonIcon = adaptableApi.internalApi.getIconForButton(button, context);
|
|
55
|
+
const iconProps = buttonIcon && Object.assign({}, defaultIconProps, buttonIcon);
|
|
53
56
|
const buttonStyle = adaptableApi.internalApi.getStyleForButton(button, context);
|
|
54
57
|
const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
|
|
55
58
|
const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
|
|
@@ -63,8 +66,8 @@ class ActionColumnRenderer {
|
|
|
63
66
|
}, 16);
|
|
64
67
|
};
|
|
65
68
|
const disabled = button.disabled && button.disabled(button, context);
|
|
66
|
-
return (React.createElement(SimpleButton_1.default, { key: button.Uuid, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' },
|
|
67
|
-
|
|
69
|
+
return (React.createElement(SimpleButton_1.default, { key: button.Uuid, "data-name": `action-button-${index + 1}`, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' },
|
|
70
|
+
buttonIcon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
68
71
|
buttonLabel));
|
|
69
72
|
})));
|
|
70
73
|
};
|