@adaptabletools/adaptable 12.1.8-canary.0 → 12.2.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 +116 -22
- package/bundle.cjs.js +108 -108
- package/index.css +132 -23
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +44 -10
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +5 -11
- package/src/AdaptableOptions/GeneralOptions.d.ts +19 -1
- package/src/AdaptableOptions/StateOptions.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +1 -2
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +5 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +23 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
- package/src/Api/Implementation/InternalApiImpl.js +34 -0
- package/src/Api/Implementation/LayoutApiImpl.js +2 -2
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -0
- package/src/Api/InternalApi.d.ts +6 -1
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +0 -13
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +3 -4
- package/src/Strategy/Utilities/getExpressionViewItems.js +3 -3
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +14 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -0
- package/src/Utilities/Services/QueryLanguageService.d.ts +2 -1
- package/src/Utilities/Services/QueryLanguageService.js +45 -19
- package/src/Utilities/Services/ReportService.js +1 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +10 -10
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +3 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +9 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +13 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +7 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +280 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +1 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +5 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -3
- package/src/View/AdaptableWizardView/Wizard.js +2 -2
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -8
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +6 -5
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectCollection/index.d.ts +3 -4
- package/src/View/Components/AdaptableObjectCollection/index.js +7 -8
- package/src/View/Components/AdaptableObjectRow/index.js +1 -4
- package/src/View/Components/EntityRulesEditor/index.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +9 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
- package/src/View/Components/ValueSelector/index.js +8 -19
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +11 -10
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +4 -3
- package/src/View/Filter/FilterViewPanel.js +3 -2
- package/src/View/GridInfo/AdaptableObjectsSummary.js +5 -3
- package/src/View/GridInfo/AdaptableOptionsComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -7
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +3 -4
- package/src/View/StateManagement/StateManagementPopup.js +18 -19
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +78 -30
- package/src/agGrid/weightedAverage.d.ts +2 -0
- package/src/agGrid/weightedAverage.js +52 -1
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
- package/src/components/DragAndDropContext/ModuleManager.js +3 -4
- package/src/components/DragAndDropContext/TabList.js +9 -30
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -7
- package/src/components/DropdownButton/index.js +2 -2
- package/src/components/EmptyContent/index.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -0
- package/src/components/ExpressionEditor/index.js +24 -14
- package/src/metamodel/adaptable.metamodel.d.ts +34 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +14 -10
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinanceForm = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
9
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
11
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
12
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
13
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
14
|
+
const FormBox_1 = require("../Components/FormBox");
|
|
15
|
+
const LocalDropdownButton = (props) => (React.createElement(DropdownButton_1.default, Object.assign({}, props, { width: "100%", columns: ['label'] })));
|
|
16
|
+
const AlertMessage = (props) => (React.createElement(rebass_1.Box, Object.assign({ color: "var(--ab-color-error)" }, props)));
|
|
17
|
+
const fdc3ColumnDefinitions = {
|
|
18
|
+
instrumentColumns: {
|
|
19
|
+
fields: [
|
|
20
|
+
{ label: 'Ticker', id: 'tickerColumnId' },
|
|
21
|
+
{ label: 'ISIN', id: 'isinColumnId' },
|
|
22
|
+
{ label: 'CUSIP', id: 'cusipColumnId' },
|
|
23
|
+
{ label: 'SEDOL', id: 'sedolColumnId' },
|
|
24
|
+
{ label: 'RIC', id: 'ricColumnId' },
|
|
25
|
+
{ label: 'BBG', id: 'bbgColumnId' },
|
|
26
|
+
{ label: 'PERMID', id: 'permidColumnId' },
|
|
27
|
+
{ label: 'FIGI', id: 'figiColumnId' },
|
|
28
|
+
],
|
|
29
|
+
intents: ['ViewChart', 'ViewQuote', 'ViewNews', 'ViewAnalysis', 'ViewInstrument'],
|
|
30
|
+
},
|
|
31
|
+
positionColumns: {
|
|
32
|
+
fields: [{ label: 'Instrument', id: 'instrumentColumnId', required: true }],
|
|
33
|
+
intents: ['ViewChart', 'ViewNews', 'ViewAnalysis'],
|
|
34
|
+
},
|
|
35
|
+
contactColumns: {
|
|
36
|
+
fields: [
|
|
37
|
+
{ label: 'Email', id: 'emailColumnId' },
|
|
38
|
+
{ label: 'FDS_ID', id: 'fds_idColumnId' },
|
|
39
|
+
],
|
|
40
|
+
intents: ['StartCall', 'StartChat', 'ViewContact'],
|
|
41
|
+
},
|
|
42
|
+
countryColumns: {
|
|
43
|
+
fields: [
|
|
44
|
+
{ label: 'ISOALPHA2', id: 'isoalpha2ColumnId' },
|
|
45
|
+
{ label: 'ISOALPHA3', id: 'isoalpha3ColumnId' },
|
|
46
|
+
],
|
|
47
|
+
intents: ['ViewChart'],
|
|
48
|
+
},
|
|
49
|
+
organizationColumns: {
|
|
50
|
+
fields: [
|
|
51
|
+
{ label: 'LEI', id: 'leiColumnId' },
|
|
52
|
+
{ label: 'PERM ID', id: 'permidColumnId' },
|
|
53
|
+
{ label: 'FDS ID', id: 'fds_idColumnId' },
|
|
54
|
+
],
|
|
55
|
+
intents: ['ViewNews', 'ViewAnalysis'],
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const FDC3ColumnSelector = (props) => {
|
|
59
|
+
const options = React.useMemo(() => {
|
|
60
|
+
return props.columnOptions.map((columnOption) => (Object.assign(Object.assign({}, columnOption), { onClick: () => props.onChange(columnOption.value) })));
|
|
61
|
+
}, [props.onChange]);
|
|
62
|
+
return (React.createElement(FormLayout_1.FormRow, { label: React.createElement(React.Fragment, null,
|
|
63
|
+
props.label,
|
|
64
|
+
" ",
|
|
65
|
+
props.required && React.createElement(AlertMessage, { as: "span" }, "*"),
|
|
66
|
+
' ') },
|
|
67
|
+
React.createElement(LocalDropdownButton, { items: options }, StringExtensions_1.default.Humanize(props.value) || 'Select Column')));
|
|
68
|
+
};
|
|
69
|
+
const FDC3InstrumentColumnBuilder = (props) => {
|
|
70
|
+
const fields = fdc3ColumnDefinitions.instrumentColumns.fields;
|
|
71
|
+
return (React.createElement(rebass_1.Flex, null,
|
|
72
|
+
React.createElement(FormLayout_1.default, { mr: 2 }, fields.slice(0, 4).map((field) => {
|
|
73
|
+
var _a;
|
|
74
|
+
return (React.createElement(FDC3ColumnSelector, Object.assign({}, field, { value: (_a = props.column[field.id]) !== null && _a !== void 0 ? _a : 'Select Column', onChange: (columnId) => props.onColumnFieldChange(field.id, columnId), columnOptions: props.columnOptions })));
|
|
75
|
+
})),
|
|
76
|
+
React.createElement(FormLayout_1.default, null, fields.slice(4).map((field) => {
|
|
77
|
+
var _a;
|
|
78
|
+
return (React.createElement(FDC3ColumnSelector, Object.assign({}, field, { value: (_a = props.column[field.id]) !== null && _a !== void 0 ? _a : 'Select Column', onChange: (columnId) => props.onColumnFieldChange(field.id, columnId), columnOptions: props.columnOptions })));
|
|
79
|
+
})),
|
|
80
|
+
React.createElement(rebass_1.Flex, { ml: 3, flexDirection: "column" }, fdc3ColumnDefinitions.instrumentColumns.intents.map((intent) => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
return (React.createElement(CheckBox_1.CheckBox, { checked: (_b = (_a = props.column.intents) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, intent), onClick: () => props.onIntentToggle(intent), key: intent }, intent));
|
|
83
|
+
}))));
|
|
84
|
+
};
|
|
85
|
+
const FDC3BaseColumnBuilder = (props) => {
|
|
86
|
+
const fields = fdc3ColumnDefinitions[props.fdc3ColumnType].fields;
|
|
87
|
+
const intents = fdc3ColumnDefinitions[props.fdc3ColumnType].intents;
|
|
88
|
+
return (React.createElement(rebass_1.Flex, null,
|
|
89
|
+
React.createElement(FormLayout_1.default, null,
|
|
90
|
+
fields.map((field) => {
|
|
91
|
+
var _a, _b;
|
|
92
|
+
return (React.createElement(FDC3ColumnSelector, Object.assign({}, field, { columnOptions: props.columnOptions, onChange: (columnId) => props.onColumnFieldChange(field.id, columnId), value: (_b = (_a = props.column) === null || _a === void 0 ? void 0 : _a[field.id]) !== null && _b !== void 0 ? _b : '' })));
|
|
93
|
+
}),
|
|
94
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
95
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column" }, intents.map((intent) => {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
return (React.createElement(CheckBox_1.CheckBox, { checked: ((_b = (_a = props.column) === null || _a === void 0 ? void 0 : _a.intents) !== null && _b !== void 0 ? _b : []).includes(intent), onClick: () => props.onIntentToggle(intent), key: intent }, intent));
|
|
98
|
+
}))))));
|
|
99
|
+
};
|
|
100
|
+
const FDC3ColumnBuilder = (props) => {
|
|
101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
102
|
+
const handleColumnFieldChange = React.useCallback((fieldId, columnId) => {
|
|
103
|
+
props.onChange(Object.assign(Object.assign({}, props.fdc3Column), { [fieldId]: columnId }));
|
|
104
|
+
}, [props.fdc3Column, props.onChange]);
|
|
105
|
+
const handleIntentToggle = React.useCallback((intent) => {
|
|
106
|
+
var _a;
|
|
107
|
+
const newFDC3Column = Object.assign({}, props.fdc3Column);
|
|
108
|
+
newFDC3Column.intents = (_a = newFDC3Column.intents) !== null && _a !== void 0 ? _a : [];
|
|
109
|
+
if (newFDC3Column.intents.includes(intent)) {
|
|
110
|
+
newFDC3Column.intents = newFDC3Column.intents.filter((i) => i !== intent);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
newFDC3Column.intents.push(intent);
|
|
114
|
+
}
|
|
115
|
+
props.onChange(newFDC3Column);
|
|
116
|
+
}, [props.fdc3Column]);
|
|
117
|
+
const columnOptions = React.useMemo(() => {
|
|
118
|
+
return props.columnOptions.map((columnOption) => (Object.assign(Object.assign({}, columnOption), { onClick: () => {
|
|
119
|
+
props.onChange(Object.assign(Object.assign({}, props.fdc3Column), { columnId: columnOption.value }));
|
|
120
|
+
} })));
|
|
121
|
+
}, [props.fdc3Column]);
|
|
122
|
+
const handleNameColumnIdChange = React.useCallback((event) => {
|
|
123
|
+
var _a;
|
|
124
|
+
props.onChange(Object.assign(Object.assign({}, props.fdc3Column), { nameColumnId: (_a = event.target.value) !== null && _a !== void 0 ? _a : '' }));
|
|
125
|
+
}, [props.fdc3Column]);
|
|
126
|
+
const handleShowBroadcastToggle = React.useCallback(() => {
|
|
127
|
+
var _a;
|
|
128
|
+
props.onChange(Object.assign(Object.assign({}, props.fdc3Column), { showBroadcastContextMenu: !((_a = props.fdc3Column) === null || _a === void 0 ? void 0 : _a.showBroadcastContextMenu) }));
|
|
129
|
+
}, [props.fdc3Column]);
|
|
130
|
+
const handleBroadcastLabelChange = React.useCallback((event) => {
|
|
131
|
+
var _a;
|
|
132
|
+
props.onChange(Object.assign(Object.assign({}, props.fdc3Column), { broadcastContextMenuLabel: (_a = event.target.value) !== null && _a !== void 0 ? _a : '' }));
|
|
133
|
+
}, [props.fdc3Column]);
|
|
134
|
+
return (React.createElement(FormBox_1.NocodeWizardFormBox, null,
|
|
135
|
+
React.createElement(rebass_1.Flex, null,
|
|
136
|
+
React.createElement(FormLayout_1.default, { mr: 3, mb: 3 },
|
|
137
|
+
props.beforeContent,
|
|
138
|
+
React.createElement(FormLayout_1.FormRow, { label: React.createElement(React.Fragment, null,
|
|
139
|
+
"Column ",
|
|
140
|
+
React.createElement(AlertMessage, { as: "span" }, "*"),
|
|
141
|
+
' ') },
|
|
142
|
+
React.createElement(LocalDropdownButton, { disabled: props.disabled, items: columnOptions }, (_b = (_a = columnOptions.find((item) => { var _a; return item.value === ((_a = props.fdc3Column) === null || _a === void 0 ? void 0 : _a.columnId); })) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : 'Select Column')),
|
|
143
|
+
React.createElement(FormLayout_1.FormRow, { label: "FDC3 Name" },
|
|
144
|
+
React.createElement(Input_1.default, { disabled: props.disabled, onChange: handleNameColumnIdChange, value: (_d = (_c = props.fdc3Column) === null || _c === void 0 ? void 0 : _c.nameColumnId) !== null && _d !== void 0 ? _d : '' })),
|
|
145
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
146
|
+
React.createElement(CheckBox_1.CheckBox, { disabled: props.disabled, checked: Boolean((_e = props.fdc3Column) === null || _e === void 0 ? void 0 : _e.showBroadcastContextMenu), onChange: handleShowBroadcastToggle },
|
|
147
|
+
"Show Broadcast ",
|
|
148
|
+
React.createElement("br", null),
|
|
149
|
+
" Context Menu")),
|
|
150
|
+
React.createElement(FormLayout_1.FormRow, { label: "Broadcast Label" },
|
|
151
|
+
React.createElement(Input_1.default, { disabled: props.disabled || !Boolean((_f = props.fdc3Column) === null || _f === void 0 ? void 0 : _f.showBroadcastContextMenu), onChange: handleBroadcastLabelChange, value: typeof ((_g = props.fdc3Column) === null || _g === void 0 ? void 0 : _g.broadcastContextMenuLabel) === 'string'
|
|
152
|
+
? (_h = props.fdc3Column) === null || _h === void 0 ? void 0 : _h.broadcastContextMenuLabel
|
|
153
|
+
: '' }))),
|
|
154
|
+
React.createElement(rebass_1.Box, { flex: 1 }, props.fdc3ColumnType === 'instrumentColumns' ? (React.createElement(FDC3InstrumentColumnBuilder, { onIntentToggle: handleIntentToggle, onColumnFieldChange: (...args) => handleColumnFieldChange(...args), column: props.fdc3Column, columnOptions: props.columnOptions })) : (props.fdc3ColumnType && (React.createElement(FDC3BaseColumnBuilder, { onColumnFieldChange: (...args) => handleColumnFieldChange(...args), onIntentToggle: handleIntentToggle, column: props.fdc3Column, fdc3ColumnType: props.fdc3ColumnType, columnOptions: props.columnOptions }))))),
|
|
155
|
+
props.footer));
|
|
156
|
+
};
|
|
157
|
+
const FDC3ColumnEditor = (props) => {
|
|
158
|
+
return (React.createElement(FDC3ColumnBuilder, { columnOptions: props.columnOptions, fdc3Column: props.fdc3Column, fdc3ColumnType: props.fdc3ColumnType, onChange: props.onChange, footer: props.footer }));
|
|
159
|
+
};
|
|
160
|
+
const FDC3ColumnCreator = (props) => {
|
|
161
|
+
var _a, _b;
|
|
162
|
+
const [fdc3Column, setFDC3Column] = React.useState();
|
|
163
|
+
const [fdc3ColumnType, setFDC3ColumnType] = React.useState();
|
|
164
|
+
const handleOnNew = React.useCallback(() => {
|
|
165
|
+
props.onNew(fdc3ColumnType, fdc3Column);
|
|
166
|
+
setFDC3Column(null);
|
|
167
|
+
setFDC3ColumnType(null);
|
|
168
|
+
}, [fdc3Column]);
|
|
169
|
+
const fdc3ColumnOptions = React.useMemo(() => {
|
|
170
|
+
return [
|
|
171
|
+
{
|
|
172
|
+
label: 'Instrument',
|
|
173
|
+
columnField: 'instrumentColumns',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: 'Position',
|
|
177
|
+
columnField: 'positionColumns',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: 'Contact',
|
|
181
|
+
columnField: 'contactColumns',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
label: 'Country',
|
|
185
|
+
columnField: 'countryColumns',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
label: 'Organization',
|
|
189
|
+
columnField: 'organizationColumns',
|
|
190
|
+
},
|
|
191
|
+
].map((item) => (Object.assign(Object.assign({}, item), { onClick: () => {
|
|
192
|
+
setFDC3ColumnType(item.columnField);
|
|
193
|
+
setFDC3Column({ columnId: '' });
|
|
194
|
+
} })));
|
|
195
|
+
}, []);
|
|
196
|
+
const typeSelector = (React.createElement(FormLayout_1.FormRow, { label: "FDC3 Type" },
|
|
197
|
+
React.createElement(LocalDropdownButton, { items: fdc3ColumnOptions }, (_b = (_a = fdc3ColumnOptions.find((item) => item.columnField === fdc3ColumnType)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : 'Select Column')));
|
|
198
|
+
const fieldsDisabled = !fdc3ColumnType;
|
|
199
|
+
const errors = [];
|
|
200
|
+
if (fdc3Column && !fdc3Column.columnId) {
|
|
201
|
+
errors.push('Column is required.');
|
|
202
|
+
}
|
|
203
|
+
if (fdc3Column) {
|
|
204
|
+
const fields = fdc3ColumnDefinitions[fdc3ColumnType].fields;
|
|
205
|
+
fields.forEach((field) => {
|
|
206
|
+
if (field.required && !fdc3Column[field.id]) {
|
|
207
|
+
errors.push(`${field.label} is required.`);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
return (React.createElement(FDC3ColumnBuilder, { disabled: fieldsDisabled, columnOptions: props.columnOptions, fdc3Column: fdc3Column, fdc3ColumnType: fdc3ColumnType, onChange: (newFDC3Column) => setFDC3Column(newFDC3Column), beforeContent: typeSelector, footer: React.createElement(rebass_1.Flex, null,
|
|
212
|
+
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
213
|
+
React.createElement(rebass_1.Flex, { alignItems: "center", mr: 3 }, errors.slice(0, 1).map((error) => (React.createElement(AlertMessage, { ml: 2 }, error)))),
|
|
214
|
+
React.createElement(SimpleButton_1.default, { disabled: fieldsDisabled || !fdc3Column.columnId, onClick: handleOnNew, icon: "plus", variant: "raised" }, "Add FDC3 Column")) }));
|
|
215
|
+
};
|
|
216
|
+
const FinanceFormSectionTitle = (props) => (React.createElement(rebass_1.Box, Object.assign({}, props, { mb: 2 }),
|
|
217
|
+
React.createElement(HelpBlock_1.default, null, props.children)));
|
|
218
|
+
const FinanceForm = (props) => {
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
220
|
+
const columnOptions = (_d = (_c = (_b = (_a = props.adaptableOptions) === null || _a === void 0 ? void 0 : _a.gridOptions) === null || _b === void 0 ? void 0 : _b.columnDefs) === null || _c === void 0 ? void 0 : _c.map) === null || _d === void 0 ? void 0 : _d.call(_c, (item) => {
|
|
221
|
+
var _a;
|
|
222
|
+
return ({
|
|
223
|
+
label: StringExtensions_1.default.Humanize((_a = item.headerName) !== null && _a !== void 0 ? _a : item.field),
|
|
224
|
+
value: item.field,
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
const financePlugin = (_f = (_e = props.adaptableOptions) === null || _e === void 0 ? void 0 : _e.plugins) === null || _f === void 0 ? void 0 : _f.find((item) => item.pluginId === 'finance');
|
|
228
|
+
const financePluginOptions = ((_g = financePlugin === null || financePlugin === void 0 ? void 0 : financePlugin.options) !== null && _g !== void 0 ? _g : {});
|
|
229
|
+
const fdc3Columns = (_h = financePluginOptions === null || financePluginOptions === void 0 ? void 0 : financePluginOptions.fdc3Columns) !== null && _h !== void 0 ? _h : {};
|
|
230
|
+
const handleSetFdc3Columns = (key, newFDC3Columns) => {
|
|
231
|
+
var _a;
|
|
232
|
+
// Unfurtunatly finance plugin options need to be mutated.
|
|
233
|
+
// It is the only was without instanciating the plugin again.
|
|
234
|
+
// But that would mean to inport the finance plugin inside the nocode plugin.
|
|
235
|
+
financePluginOptions.fdc3Columns = (_a = financePluginOptions.fdc3Columns) !== null && _a !== void 0 ? _a : {};
|
|
236
|
+
financePluginOptions.fdc3Columns[key] = newFDC3Columns;
|
|
237
|
+
// on change is called with a new array of plugins so the component refreshes.
|
|
238
|
+
props.onChangeadAptableOptions(Object.assign(Object.assign({}, props.adaptableOptions), { plugins: [...props.adaptableOptions.plugins] }));
|
|
239
|
+
};
|
|
240
|
+
const renderEditor = (fdc3ColumnType, fdc3ColumnsItems) => {
|
|
241
|
+
return fdc3ColumnsItems.map((fdc3Column, currentFDCColumnId) => (React.createElement(rebass_1.Box, { mb: 3 },
|
|
242
|
+
React.createElement(FDC3ColumnEditor, { key: currentFDCColumnId, columnOptions: columnOptions, fdc3Column: fdc3Column, fdc3ColumnType: fdc3ColumnType, onChange: (editedFDC3Column) => {
|
|
243
|
+
const newFDC3Columns = fdc3ColumnsItems.map((fdc3Column, index) => {
|
|
244
|
+
if (index === currentFDCColumnId) {
|
|
245
|
+
return editedFDC3Column;
|
|
246
|
+
}
|
|
247
|
+
return fdc3Column;
|
|
248
|
+
});
|
|
249
|
+
handleSetFdc3Columns(fdc3ColumnType, newFDC3Columns);
|
|
250
|
+
}, footer: React.createElement(rebass_1.Flex, null,
|
|
251
|
+
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
252
|
+
React.createElement(SimpleButton_1.default, { onClick: () => {
|
|
253
|
+
const newFDC3Columns = fdc3ColumnsItems.filter((_, index) => index !== currentFDCColumnId);
|
|
254
|
+
handleSetFdc3Columns(fdc3ColumnType, newFDC3Columns);
|
|
255
|
+
}, tone: "error", variant: "raised", icon: "delete" }, "Delete")) }))));
|
|
256
|
+
};
|
|
257
|
+
return (React.createElement(rebass_1.Box, { p: 2, className: "ab-FinanceForm" },
|
|
258
|
+
React.createElement(rebass_1.Box, { mb: 3 },
|
|
259
|
+
React.createElement(HelpBlock_1.default, { mb: 3 }, "Create FDC3 Column"),
|
|
260
|
+
React.createElement(FDC3ColumnCreator, { columnOptions: columnOptions, onNew: (type, fdc3Column) => {
|
|
261
|
+
var _a;
|
|
262
|
+
handleSetFdc3Columns(type, [...((_a = fdc3Columns[type]) !== null && _a !== void 0 ? _a : []), fdc3Column]);
|
|
263
|
+
} })),
|
|
264
|
+
Boolean((_j = fdc3Columns.instrumentColumns) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement(rebass_1.Box, null,
|
|
265
|
+
React.createElement(FinanceFormSectionTitle, null, "Instrument Columns"),
|
|
266
|
+
renderEditor('instrumentColumns', fdc3Columns.instrumentColumns))),
|
|
267
|
+
Boolean((_k = fdc3Columns.positionColumns) === null || _k === void 0 ? void 0 : _k.length) && (React.createElement(rebass_1.Box, null,
|
|
268
|
+
React.createElement(FinanceFormSectionTitle, null, "Position Columns"),
|
|
269
|
+
renderEditor('positionColumns', fdc3Columns.positionColumns))),
|
|
270
|
+
Boolean((_l = fdc3Columns.contactColumns) === null || _l === void 0 ? void 0 : _l.length) && (React.createElement(rebass_1.Box, null,
|
|
271
|
+
React.createElement(FinanceFormSectionTitle, null, "Contact Columns"),
|
|
272
|
+
renderEditor('contactColumns', fdc3Columns.contactColumns))),
|
|
273
|
+
Boolean((_m = fdc3Columns.countryColumns) === null || _m === void 0 ? void 0 : _m.length) && (React.createElement(rebass_1.Box, null,
|
|
274
|
+
React.createElement(FinanceFormSectionTitle, null, "Country Columns"),
|
|
275
|
+
renderEditor('countryColumns', fdc3Columns.countryColumns))),
|
|
276
|
+
Boolean((_o = fdc3Columns.organizationColumns) === null || _o === void 0 ? void 0 : _o.length) && (React.createElement(rebass_1.Box, null,
|
|
277
|
+
React.createElement(FinanceFormSectionTitle, null, "Organization Columns"),
|
|
278
|
+
renderEditor('organizationColumns', fdc3Columns.organizationColumns)))));
|
|
279
|
+
};
|
|
280
|
+
exports.FinanceForm = FinanceForm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FinanceForm } from './FinanceForm';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinanceForm = void 0;
|
|
4
|
+
var FinanceForm_1 = require("./FinanceForm");
|
|
5
|
+
Object.defineProperty(exports, "FinanceForm", { enumerable: true, get: function () { return FinanceForm_1.FinanceForm; } });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
interface GridOptionsFormOptions {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangeadAptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
declare const GridOptionsForm: (props: GridOptionsFormOptions) => JSX.Element;
|
|
8
8
|
export default GridOptionsForm;
|
|
@@ -18,7 +18,7 @@ const GridOptionsForm = (props) => {
|
|
|
18
18
|
abOptions = Object.assign({}, abOptions);
|
|
19
19
|
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
20
20
|
abOptions.gridOptions.enableRangeSelection = enableRangeSelection;
|
|
21
|
-
props.
|
|
21
|
+
props.onChangeadAptableOptions(abOptions);
|
|
22
22
|
} })),
|
|
23
23
|
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
24
24
|
React.createElement(CheckBox_1.CheckBox, { checked: (_a = gridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter, onChange: (floatingFilter) => {
|
|
@@ -27,21 +27,21 @@ const GridOptionsForm = (props) => {
|
|
|
27
27
|
abOptions.gridOptions.defaultColDef = {
|
|
28
28
|
floatingFilter,
|
|
29
29
|
};
|
|
30
|
-
props.
|
|
30
|
+
props.onChangeadAptableOptions(abOptions);
|
|
31
31
|
} })),
|
|
32
32
|
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
33
33
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressColumnVirtualisation, onChange: (suppressColumnVirtualisation) => {
|
|
34
34
|
abOptions = Object.assign({}, abOptions);
|
|
35
35
|
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
36
36
|
abOptions.gridOptions.suppressColumnVirtualisation = suppressColumnVirtualisation;
|
|
37
|
-
props.
|
|
37
|
+
props.onChangeadAptableOptions(abOptions);
|
|
38
38
|
} })),
|
|
39
39
|
React.createElement(FormLayout_1.FormRow, { label: "Show Column Menu Button" },
|
|
40
40
|
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.suppressMenuHide, onChange: (suppressMenuHide) => {
|
|
41
41
|
abOptions = Object.assign({}, abOptions);
|
|
42
42
|
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
43
43
|
abOptions.gridOptions.suppressMenuHide = suppressMenuHide;
|
|
44
|
-
props.
|
|
44
|
+
props.onChangeadAptableOptions(abOptions);
|
|
45
45
|
} })))));
|
|
46
46
|
};
|
|
47
47
|
exports.default = GridOptionsForm;
|
|
@@ -10,6 +10,7 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLa
|
|
|
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 DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
13
|
+
const FormBox_1 = require("../Components/FormBox");
|
|
13
14
|
const UIOptionsStatusbarForm = (props) => {
|
|
14
15
|
var _a, _b, _c, _d;
|
|
15
16
|
const allPanels = (_c = (_b = (_a = props.abOptions.gridOptions) === null || _a === void 0 ? void 0 : _a.statusBar) === null || _b === void 0 ? void 0 : _b.statusPanels) !== null && _c !== void 0 ? _c : [];
|
|
@@ -82,14 +83,7 @@ const UIOptionsStatusbarForm = (props) => {
|
|
|
82
83
|
return (React.createElement(rebass_1.Box, null,
|
|
83
84
|
React.createElement(HelpBlock_1.default, null, "Status Bar"),
|
|
84
85
|
React.createElement(rebass_1.Box, { p: 2 },
|
|
85
|
-
React.createElement(
|
|
86
|
-
border: '1px solid var(--ab-color-primarydark)',
|
|
87
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
88
|
-
marginBottom: 'var(--ab-space-2)',
|
|
89
|
-
paddingBottom: 'var(--ab-space-1)',
|
|
90
|
-
backgroundColor: 'var(--ab-color-defaultbackground)',
|
|
91
|
-
padding: 'var(--ab-space-2)',
|
|
92
|
-
} },
|
|
86
|
+
React.createElement(FormBox_1.NocodeWizardFormBox, null,
|
|
93
87
|
React.createElement(rebass_1.Box, { as: "b" }, "Create Adaptable Statusbar Panel"),
|
|
94
88
|
React.createElement(FormLayout_1.default, { mt: 2 },
|
|
95
89
|
React.createElement(FormLayout_1.FormRow, { label: "Panel Name" },
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AdaptableOptions } from '../../../../types';
|
|
3
3
|
interface UIElementsOptionsProps {
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
|
-
|
|
5
|
+
onChangeadAptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const UIElementsForm: React.FunctionComponent<UIElementsOptionsProps>;
|
|
8
8
|
export {};
|
package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js
CHANGED
|
@@ -9,8 +9,8 @@ const UIOptionsStatusbarForm_1 = require("./UIOptionsStatusbarForm");
|
|
|
9
9
|
const UIElementsForm = (props) => {
|
|
10
10
|
let abOptions = props.adaptableOptions;
|
|
11
11
|
return (React.createElement(React.Fragment, null,
|
|
12
|
-
React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: abOptions, onChange: props.
|
|
13
|
-
React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, { abOptions: abOptions, onChange: props.
|
|
14
|
-
React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { abOptions: abOptions, onChange: props.
|
|
12
|
+
React.createElement(UIOptionsActionColumnsForm_1.UIOptionsActionColumnsForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions }),
|
|
13
|
+
React.createElement(UIOptionsSidebarForm_1.UIOptionsSidebarForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions }),
|
|
14
|
+
React.createElement(UIOptionsStatusbarForm_1.UIOptionsStatusbarForm, { abOptions: abOptions, onChange: props.onChangeadAptableOptions })));
|
|
15
15
|
};
|
|
16
16
|
exports.UIElementsForm = UIElementsForm;
|
|
@@ -94,8 +94,8 @@ const Wizard = (props) => {
|
|
|
94
94
|
}, []);
|
|
95
95
|
const ddEnabled = (_a = props.ddEnabled) !== null && _a !== void 0 ? _a : !props.fetchData;
|
|
96
96
|
return (React.createElement(React.Fragment, null,
|
|
97
|
-
ddEnabled && (React.createElement(FileDroppable_1.default, { key: droppableKey, className: 'ab-
|
|
98
|
-
isDataLoading && (React.createElement(rebass_1.Flex, { className: 'ab-
|
|
97
|
+
ddEnabled && (React.createElement(FileDroppable_1.default, { key: droppableKey, className: 'ab-NocodeWizard', toJSON: props.fileContentsToJSON, readFile: props.readFile, fileAccept: props.fileAccept, helpText: props.helpText, message: state.error, defaultText: props.defaultActionMessage, dragOverText: props.dragOverActionMessage, loadingText: props.loadingMessage, onDropSuccess: handleDataSource })),
|
|
98
|
+
isDataLoading && (React.createElement(rebass_1.Flex, { className: 'ab-NocodeWizard', alignItems: "center", justifyContent: "center", flexDirection: "column" }, props.loadingMessage || 'Loading ...')),
|
|
99
99
|
wizard));
|
|
100
100
|
};
|
|
101
101
|
exports.Wizard = Wizard;
|
|
@@ -14,6 +14,5 @@ export declare class CalculatedColumnSummaryComponent extends React.Component<Ca
|
|
|
14
14
|
onEdit(calculatedColumn: CalculatedColumn): void;
|
|
15
15
|
onCloseWizard(): void;
|
|
16
16
|
onFinishWizard: (calculatedColumn: CalculatedColumn) => void;
|
|
17
|
-
canFinishWizard(): boolean;
|
|
18
17
|
}
|
|
19
18
|
export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, import("react-redux").Omit<React.ClassAttributes<CalculatedColumnSummaryComponent> & CalculatedColumnSummaryProps, "ref" | "key" | "api" | "onSuspend" | "accessLevel" | "popupParams" | "onClearPopupParams" | "teamSharingActivated" | "onClosePopup" | "moduleInfo" | "onUnSuspend" | "modalContainer" | "onShare" | "onEdit" | "summarisedColumn" | "CalculatedColumns" | "onDeleteConfirm">>;
|
|
@@ -9,7 +9,6 @@ const CalculatedColumnRedux = tslib_1.__importStar(require("../../Redux/ActionsR
|
|
|
9
9
|
const EditableConfigEntityState_1 = require("../Components/SharedProps/EditableConfigEntityState");
|
|
10
10
|
const UIHelper_1 = require("../UIHelper");
|
|
11
11
|
const ModuleDetail_1 = require("../Components/ModuleSummary/ModuleDetail");
|
|
12
|
-
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
13
12
|
const CalculatedColumnWizard_1 = require("./Wizard/CalculatedColumnWizard");
|
|
14
13
|
class CalculatedColumnSummaryComponent extends React.Component {
|
|
15
14
|
constructor(props) {
|
|
@@ -26,10 +25,9 @@ class CalculatedColumnSummaryComponent extends React.Component {
|
|
|
26
25
|
}
|
|
27
26
|
render() {
|
|
28
27
|
let detailRow;
|
|
29
|
-
let sharing = this.props.teamSharingActivated;
|
|
30
28
|
this.props.CalculatedColumns.map((item, index) => {
|
|
31
29
|
if (item.ColumnId == this.props.summarisedColumn.columnId) {
|
|
32
|
-
detailRow = (React.createElement(ModuleDetail_1.ModuleDetail, { key: 'UF' + index, item1: this.props.moduleInfo.FriendlyName, item2: this.props.api.
|
|
30
|
+
detailRow = (React.createElement(ModuleDetail_1.ModuleDetail, { key: 'UF' + index, item1: this.props.moduleInfo.FriendlyName, item2: this.props.api.internalApi.getAdaptableQueryExpressionText(item.Query), configEnity: item, showShare: this.props.teamSharingActivated, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(item), onShare: (config) => this.props.onShare(item, config), onDelete: CalculatedColumnRedux.CalculatedColumnDelete(item), showBold: true, accessLevel: this.props.accessLevel }));
|
|
33
31
|
}
|
|
34
32
|
});
|
|
35
33
|
return (React.createElement("div", null,
|
|
@@ -50,11 +48,6 @@ class CalculatedColumnSummaryComponent extends React.Component {
|
|
|
50
48
|
wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
|
-
canFinishWizard() {
|
|
54
|
-
let calculatedColumn = this.state.editedAdaptableObject;
|
|
55
|
-
return (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(calculatedColumn.ColumnId) &&
|
|
56
|
-
StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query)));
|
|
57
|
-
}
|
|
58
51
|
}
|
|
59
52
|
exports.CalculatedColumnSummaryComponent = CalculatedColumnSummaryComponent;
|
|
60
53
|
function mapStateToProps(state) {
|
|
@@ -11,10 +11,11 @@ const Tabs_1 = require("../../../components/Tabs");
|
|
|
11
11
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
12
12
|
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
13
13
|
const renderCalculatedColumnExpressionSummary = (data) => {
|
|
14
|
-
|
|
14
|
+
const { api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
15
15
|
return (React.createElement(rebass_1.Box, { fontSize: 2 },
|
|
16
|
-
"Column scalar expression:
|
|
17
|
-
|
|
16
|
+
"Column scalar expression:",
|
|
17
|
+
' ',
|
|
18
|
+
React.createElement(CodeBlock_1.CodeBlock, null, api.internalApi.getAdaptableQueryExpressionText(data.Query))));
|
|
18
19
|
};
|
|
19
20
|
exports.renderCalculatedColumnExpressionSummary = renderCalculatedColumnExpressionSummary;
|
|
20
21
|
const isValidCalculatedColumnExpression = (data, api) => {
|
|
@@ -78,10 +79,10 @@ const CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
78
79
|
React.createElement(QueryTab, { value: "ScalarExpression", type: selectedTab, label: "Scalar" }),
|
|
79
80
|
React.createElement(Tabs_1.Tabs.Content, { value: 'ScalarExpression' },
|
|
80
81
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), isFullExpression: true, api: api })),
|
|
81
|
-
React.createElement(QueryTab, { value: "AggregatedScalarExpression", type: selectedTab, label: "
|
|
82
|
+
React.createElement(QueryTab, { value: "AggregatedScalarExpression", type: selectedTab, label: "Aggregated Scalar" }),
|
|
82
83
|
React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedScalarExpression' },
|
|
83
84
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedScalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), isFullExpression: true, api: api })),
|
|
84
|
-
React.createElement(QueryTab, { value: "CumulativeAggregateExpression", type: selectedTab, label: "
|
|
85
|
+
React.createElement(QueryTab, { value: "CumulativeAggregateExpression", type: selectedTab, label: "Cumulative" }),
|
|
85
86
|
React.createElement(Tabs_1.Tabs.Content, { value: 'CumulativeAggregateExpression' },
|
|
86
87
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'cumulativeAggregatedScalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), isFullExpression: true, api: api }))));
|
|
87
88
|
};
|
|
@@ -38,7 +38,7 @@ class CellSummaryViewPanelComponent extends React.Component {
|
|
|
38
38
|
onClick: () => this.props.onCellSummaryOperationChange(summaryOperation),
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
-
const cellSummaryOperationDefinitions = this.props.api.
|
|
41
|
+
const cellSummaryOperationDefinitions = this.props.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
42
42
|
const operationDefinitions = ArrayExtensions_1.default.IsNullOrEmpty(cellSummaryOperationDefinitions)
|
|
43
43
|
? []
|
|
44
44
|
: cellSummaryOperationDefinitions.map((operationDefinition) => {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IColItem } from '../../UIInterfaces';
|
|
3
|
-
|
|
3
|
+
import { BoxProps } from 'rebass';
|
|
4
|
+
export interface AdaptableObjectCollectionProps extends BoxProps {
|
|
4
5
|
colItems: IColItem[];
|
|
5
6
|
items: any[];
|
|
6
7
|
allowOverflow?: boolean;
|
|
7
8
|
style?: React.CSSProperties;
|
|
8
9
|
headerAlign?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare
|
|
11
|
-
render(): any;
|
|
12
|
-
}
|
|
11
|
+
export declare const AdaptableObjectCollection: React.FunctionComponent<AdaptableObjectCollectionProps>;
|
|
@@ -5,12 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
/// <reference path="../../typings/.d.ts" />
|
|
7
7
|
const PanelWithRow_1 = require("../Panels/PanelWithRow");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
8
|
+
const rebass_1 = require("rebass");
|
|
9
|
+
const AdaptableObjectCollection = (props) => {
|
|
10
|
+
const allowOverflow = props.allowOverflow ? 'visible' : 'auto';
|
|
11
|
+
return (React.createElement(rebass_1.Box, { style: Object.assign({}, props.style), className: "ab-ObjectCollection" },
|
|
12
|
+
React.createElement(PanelWithRow_1.PanelWithRow, { border: "none", colItems: props.colItems, headerAlign: props.headerAlign }),
|
|
13
|
+
React.createElement("div", { className: "ab-ObjectCollection__items", style: { overflowY: allowOverflow, boxShadow: 'none' } }, props.items)));
|
|
14
|
+
};
|
|
16
15
|
exports.AdaptableObjectCollection = AdaptableObjectCollection;
|
|
@@ -15,10 +15,7 @@ class AdaptableObjectRow extends React.Component {
|
|
|
15
15
|
overflow: 'hidden',
|
|
16
16
|
}, "data-name": "list-group-cell", paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
17
17
|
const className = join_1.default('ab-AdaptableObjectRow', this.props.isSuspended && 'ab-AdaptableObjectRow--is-suspended');
|
|
18
|
-
return (React.createElement(
|
|
19
|
-
React.createElement(rebass_1.Flex, { "data-name": "list-group-item", className: "list-group-item", alignItems: "center", padding: 2, margin: 0, style: {
|
|
20
|
-
overflowY: 'visible',
|
|
21
|
-
} }, colItems)));
|
|
18
|
+
return (React.createElement(rebass_1.Flex, { className: className, onClick: this.props.onClick, style: this.props.style }, colItems));
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
exports.AdaptableObjectRow = AdaptableObjectRow;
|
|
@@ -47,8 +47,8 @@ QueryTab.defaultProps = {
|
|
|
47
47
|
};
|
|
48
48
|
const EntityRulesSummary = (props) => {
|
|
49
49
|
const { data } = props;
|
|
50
|
-
const { api: { predicateApi,
|
|
51
|
-
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(
|
|
50
|
+
const { api: { predicateApi, internalApi }, } = AdaptableContext_1.useAdaptable();
|
|
51
|
+
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(internalApi.getAdaptableQueryExpressionText(data.Rule))))));
|
|
52
52
|
};
|
|
53
53
|
exports.EntityRulesSummary = EntityRulesSummary;
|
|
54
54
|
const EntityRulesEditor = (props) => {
|
|
@@ -191,7 +191,7 @@ const EntityRulesEditor = (props) => {
|
|
|
191
191
|
showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
|
|
192
192
|
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { value: 'ObservableExpression', paddingLeft: 0 },
|
|
193
193
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
194
|
-
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "
|
|
194
|
+
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
|
|
195
195
|
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
196
196
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null)));
|
|
197
197
|
};
|
|
@@ -56,7 +56,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
componentDidMount() {
|
|
59
|
-
var _a, _b;
|
|
59
|
+
var _a, _b, _c;
|
|
60
60
|
if (this.hasValuesPredicate((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.Predicate)) {
|
|
61
61
|
this.loadPermittedValues();
|
|
62
62
|
}
|
|
@@ -67,6 +67,14 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
67
67
|
// there is no way to find out if the changed rows are relevant for this filter, so we have to update it every time :/
|
|
68
68
|
this.handleGridValueChange();
|
|
69
69
|
});
|
|
70
|
+
if ((_c = this.props.api.internalApi.getAdaptableOptions().filterOptions) === null || _c === void 0 ? void 0 : _c.showDistinctFilteredValuesOnly) {
|
|
71
|
+
this.props.api.internalApi.getAdaptableInstance()._on('GridFiltered', () => {
|
|
72
|
+
const filter = this.getFilterFromProps();
|
|
73
|
+
if (this.hasValuesPredicate(filter === null || filter === void 0 ? void 0 : filter.Predicate)) {
|
|
74
|
+
this.loadPermittedValues();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
70
78
|
}
|
|
71
79
|
componentWillUnmount() {
|
|
72
80
|
var _a, _b;
|
|
@@ -4,11 +4,12 @@ exports.PopupPanel = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
+
const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
|
|
7
8
|
const ButtonInfo_1 = require("../../Buttons/ButtonInfo");
|
|
8
9
|
const Noop = () => React.createElement(React.Fragment, null);
|
|
9
10
|
const PopupPanel = (props) => {
|
|
10
11
|
const baseClassName = 'ab-Adaptable-Popup__Panel';
|
|
11
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: "1 1 0", className:
|
|
12
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: "1 1 0", className: join_1.default(props.className, baseClassName) },
|
|
12
13
|
React.createElement("div", { className: `${baseClassName}__Header` },
|
|
13
14
|
React.createElement(rebass_1.Flex, { alignItems: "center" },
|
|
14
15
|
React.createElement(rebass_1.Box, { marginRight: 0, "data-name": "space-before" }),
|