@adaptabletools/adaptable 10.0.0 → 10.0.4-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 +77 -29
- package/index.css +89 -31
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +88 -4
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +39 -0
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/GridApi.d.ts +34 -8
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +16 -9
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnApiImpl.js +69 -36
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -17
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
- package/src/Api/Implementation/GridApiImpl.js +25 -10
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -1
- package/src/Api/Implementation/InternalApiImpl.js +20 -4
- package/src/Api/Implementation/LayoutApiImpl.js +3 -3
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +3 -0
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +12 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +59 -86
- package/src/Api/InternalApi.d.ts +3 -1
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/Api/UserInterfaceApi.d.ts +16 -6
- package/src/PredefinedConfig/AlertState.d.ts +10 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +33 -33
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +3 -2
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → PredefinedConfig/Common/SpecialColumnSettings.js} +0 -0
- package/src/PredefinedConfig/FilterState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -1
- package/src/Redux/Store/AdaptableStore.js +7 -3
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.js +12 -11
- package/src/Strategy/BulkUpdateModule.js +5 -5
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +0 -2
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +5 -5
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/LayoutModule.js +3 -3
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.js +6 -6
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +8 -2
- package/src/Utilities/Helpers/DateHelper.js +42 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/MetamodelService.js +1 -0
- package/src/Utilities/Services/ModuleService.js +31 -24
- package/src/Utilities/Services/ReportService.js +12 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +53 -32
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +72 -31
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -6
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +2 -2
- package/src/View/CustomSort/CustomSortPopup.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -3
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +6 -8
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +20 -3
- package/src/agGrid/Adaptable.d.ts +20 -4
- package/src/agGrid/Adaptable.js +234 -102
- package/src/agGrid/agGridHelper.js +32 -32
- package/src/agGrid/agGridMenuHelper.js +2 -2
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +8 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/metamodel/adaptable.metamodel.d.ts +125 -7
- package/src/metamodel/adaptable.metamodel.js +416 -101
- package/src/types.d.ts +4 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
|
@@ -215,33 +215,33 @@ class agGridHelper {
|
|
|
215
215
|
let ColumnGroup = colsToGroups === null || colsToGroups === void 0 ? void 0 : colsToGroups[ColumnId];
|
|
216
216
|
const abColumn = {
|
|
217
217
|
Uuid: Uuid_1.createUuid(),
|
|
218
|
-
ColumnId,
|
|
219
|
-
FriendlyName,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
ColumnGroup,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
218
|
+
columnId: ColumnId,
|
|
219
|
+
friendlyName: FriendlyName,
|
|
220
|
+
isPrimaryKey: ColumnId === pkColumn,
|
|
221
|
+
dataType: this.getColumnDataType(vendorColumn, false),
|
|
222
|
+
visible: vendorColumn.isVisible(),
|
|
223
|
+
readOnly: this.isColumnReadonly(colDef),
|
|
224
|
+
columnGroup: ColumnGroup,
|
|
225
|
+
sortable: this.isColumnSortable(colDef),
|
|
226
|
+
filterable: this.isColumnFilterable(colDef),
|
|
227
|
+
groupable: this.isColumnGroupable(colDef),
|
|
228
|
+
pivotable: this.isColumnPivotable(colDef),
|
|
229
|
+
aggregatable: this.isColumnAggregetable(colDef),
|
|
230
|
+
availableAggregationFunctions: null,
|
|
231
|
+
aggregationFunction: null,
|
|
232
|
+
moveable: this.isColumnMoveable(colDef),
|
|
233
|
+
hideable: this.isColumnHideable(colDef),
|
|
234
|
+
queryable: this.isColumnQueryable(colDef, ColumnId),
|
|
235
|
+
isGrouped: this.isColumnGrouped(colDef),
|
|
236
|
+
isFixed: this.isColumnFixed(colDef),
|
|
237
237
|
//TODO add IsPinned??
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
isSparkline: this.adaptable.api.sparklineColumnApi.isSparklineColumn(colId),
|
|
239
|
+
isExcludedFromQuickSearch: false,
|
|
240
240
|
};
|
|
241
|
-
if (abColumn.
|
|
242
|
-
abColumn.
|
|
241
|
+
if (abColumn.aggregatable) {
|
|
242
|
+
abColumn.availableAggregationFunctions = this.getColumnAggregationFunctions(colDef);
|
|
243
243
|
if (typeof colDef.aggFunc === 'string') {
|
|
244
|
-
abColumn.
|
|
244
|
+
abColumn.aggregationFunction = colDef.aggFunc;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
// lets set this here one as the function cannot change the result so dont need to run it each time
|
|
@@ -249,7 +249,7 @@ class agGridHelper {
|
|
|
249
249
|
.excludeColumnFromQuickSearch;
|
|
250
250
|
if (excludeColumnFromQuickSearch) {
|
|
251
251
|
if (excludeColumnFromQuickSearch(abColumn)) {
|
|
252
|
-
abColumn.
|
|
252
|
+
abColumn.isExcludedFromQuickSearch = true;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return abColumn;
|
|
@@ -435,8 +435,8 @@ class agGridHelper {
|
|
|
435
435
|
let dataType = Enums_1.DataType.Unknown;
|
|
436
436
|
// get the column type if already in store (and not unknown)
|
|
437
437
|
const existingColumn = this.adaptable.api.columnApi.getColumnFromId(column.getId(), logWarning);
|
|
438
|
-
if (existingColumn && existingColumn.
|
|
439
|
-
return existingColumn.
|
|
438
|
+
if (existingColumn && existingColumn.dataType != Enums_1.DataType.Unknown) {
|
|
439
|
+
return existingColumn.dataType;
|
|
440
440
|
}
|
|
441
441
|
// check for column type
|
|
442
442
|
const colType = column.getColDef().type;
|
|
@@ -574,7 +574,7 @@ class agGridHelper {
|
|
|
574
574
|
return function compareItemsOfCustomSort(nodeA, nodeB) {
|
|
575
575
|
let firstGroupedColumn = adaptable.getFirstGroupedColumn();
|
|
576
576
|
if (firstGroupedColumn) {
|
|
577
|
-
const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.
|
|
577
|
+
const definedColumnComparator = adaptable.getActiveColumnComparator(firstGroupedColumn.columnId, adaptable.api.customSortApi.getCustomSortByColumn(firstGroupedColumn.columnId), adaptable.api.internalApi.getCustomSortComparer(firstGroupedColumn));
|
|
578
578
|
if (definedColumnComparator) {
|
|
579
579
|
return definedColumnComparator(nodeA.key, nodeB.key);
|
|
580
580
|
}
|
|
@@ -610,10 +610,10 @@ class agGridHelper {
|
|
|
610
610
|
headerFontWeight: headerColStyle.fontWeight,
|
|
611
611
|
height: Number(headerColStyle.height.replace('px', '')),
|
|
612
612
|
Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
|
|
613
|
-
const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.
|
|
613
|
+
const headerColumn = document.querySelector(`.ag-header-cell[col-id='${col.columnId}']`);
|
|
614
614
|
const headerColumnStyle = window.getComputedStyle(headerColumn || headerFirstCol, null);
|
|
615
615
|
return {
|
|
616
|
-
columnFriendlyName: col.
|
|
616
|
+
columnFriendlyName: col.friendlyName,
|
|
617
617
|
width: Number(headerColumnStyle.width.replace('px', '')),
|
|
618
618
|
textAlign: headerColumnStyle.textAlign,
|
|
619
619
|
};
|
|
@@ -629,10 +629,10 @@ class agGridHelper {
|
|
|
629
629
|
fontWeight: firstRowStyle.fontWeight,
|
|
630
630
|
height: Number(firstRowStyle.height.replace('px', '')),
|
|
631
631
|
Columns: this.adaptable.api.columnApi.getColumns().map((col) => {
|
|
632
|
-
const cellElement = document.querySelector(`.ag-cell[col-id='${col.
|
|
632
|
+
const cellElement = document.querySelector(`.ag-cell[col-id='${col.columnId}']`);
|
|
633
633
|
const headerColumnStyle = window.getComputedStyle(cellElement || firstRow, null);
|
|
634
634
|
return {
|
|
635
|
-
columnFriendlyName: col.
|
|
635
|
+
columnFriendlyName: col.friendlyName,
|
|
636
636
|
width: Number(headerColumnStyle.width.replace('px', '')),
|
|
637
637
|
textAlign: headerColumnStyle.textAlign,
|
|
638
638
|
};
|
|
@@ -223,12 +223,12 @@ class agGridMenuHelper {
|
|
|
223
223
|
let isSelectedCell = false;
|
|
224
224
|
let clickedCell = undefined;
|
|
225
225
|
if (adaptableColumn) {
|
|
226
|
-
clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.
|
|
226
|
+
clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
|
|
227
227
|
}
|
|
228
228
|
let selectedCellInfo = this.adaptable.setSelectedCells();
|
|
229
229
|
if (clickedCell && selectedCellInfo) {
|
|
230
230
|
let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
|
|
231
|
-
gc.
|
|
231
|
+
gc.column == clickedCell.column &&
|
|
232
232
|
gc.primaryKeyValue == clickedCell.primaryKeyValue);
|
|
233
233
|
isSelectedCell = matchedCell != null;
|
|
234
234
|
if (isSelectedCell) {
|
|
@@ -44,7 +44,7 @@ function Dashboard(props) {
|
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
const activeTabTitle = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[activeTabIndex]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Select Toolbar';
|
|
47
|
-
return (React.createElement(DropdownButton_1.default, { ml: 1, items: React.Children.map(children, (child, index) => ({
|
|
47
|
+
return (React.createElement(DropdownButton_1.default, { ml: 1, columns: ['label'], items: React.Children.map(children, (child, index) => ({
|
|
48
48
|
value: String(index),
|
|
49
49
|
label: child.props.title,
|
|
50
50
|
onClick: () => setActiveTabIndex(index),
|
|
@@ -17,7 +17,7 @@ const defaultListItemStyle = {
|
|
|
17
17
|
padding: 'var(--ab-cmp-dropdownbutton-list-item__padding)',
|
|
18
18
|
};
|
|
19
19
|
const DropdownButton = React.forwardRef((props, ref) => {
|
|
20
|
-
let { columns, overlayProps, listOffset = 10, collapseOnItemClick = true, focusOnClear = true, idProperty = 'id', isItemDisabled, items, children, listMinWidth = 100, listStyle, listItemStyle, listItemClassName, constrainTo, showClearButton = false, onClear, clearButtonProps } = props, domProps = tslib_1.__rest(props, ["columns", "overlayProps", "listOffset", "collapseOnItemClick", "focusOnClear", "idProperty", "isItemDisabled", "items", "children", "listMinWidth", "listStyle", "listItemStyle", "listItemClassName", "constrainTo", "showClearButton", "onClear", "clearButtonProps"]);
|
|
20
|
+
let { columns, overlayProps, listOffset = 10, collapseOnItemClick = true, focusOnClear = true, idProperty = 'id', isItemDisabled, items, children, listMinWidth = 100, listStyle, listItemStyle, listItemClassName, constrainTo, showClearButton = false, onClear, clearButtonProps, onExpand, onCollapse } = props, domProps = tslib_1.__rest(props, ["columns", "overlayProps", "listOffset", "collapseOnItemClick", "focusOnClear", "idProperty", "isItemDisabled", "items", "children", "listMinWidth", "listStyle", "listItemStyle", "listItemClassName", "constrainTo", "showClearButton", "onClear", "clearButtonProps", "onExpand", "onCollapse"]);
|
|
21
21
|
isItemDisabled = isItemDisabled || ((item) => item.disabled);
|
|
22
22
|
if (!columns) {
|
|
23
23
|
columns = ['icon', 'label'];
|
|
@@ -23,6 +23,7 @@ const ButtonInfo_1 = require("../../View/Components/Buttons/ButtonInfo");
|
|
|
23
23
|
const CodeBlock_1 = require("../CodeBlock");
|
|
24
24
|
const NamedQueryContext_1 = require("./NamedQueryContext");
|
|
25
25
|
const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
26
|
+
const DateHelper_1 = require("../../Utilities/Helpers/DateHelper");
|
|
26
27
|
function ExpressionEditor(props) {
|
|
27
28
|
var _a;
|
|
28
29
|
const { type, module } = props;
|
|
@@ -46,7 +47,7 @@ function ExpressionEditor(props) {
|
|
|
46
47
|
// currently only boolean and scalar expressions support nested calculated columns (calc cols which reference other calc cols)
|
|
47
48
|
const queryableColumns = type === 'scalar' || type === 'boolean'
|
|
48
49
|
? props.columns
|
|
49
|
-
: props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.
|
|
50
|
+
: props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.columnId));
|
|
50
51
|
const dataTableEditor = (React.createElement(React.Fragment, null,
|
|
51
52
|
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
|
|
52
53
|
React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked), style: {
|
|
@@ -55,16 +56,16 @@ function ExpressionEditor(props) {
|
|
|
55
56
|
paddingTop: 'var(--ab-space-1)',
|
|
56
57
|
paddingBottom: 'var(--ab-space-1)',
|
|
57
58
|
} }, 'Show Column IDs')),
|
|
58
|
-
React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.
|
|
59
|
+
React.createElement(FormLayout_1.default, { className: "ab-ExpressionEditor__columns", gridColumnGap: "var(--ab-space-1)", gridRowGap: "var(--ab-space-1)", sizes: ['auto', '100px'], style: { alignItems: 'stretch' } }, queryableColumns.map((column) => (React.createElement(FormLayout_1.FormRow, { key: column.columnId, label: React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
|
|
59
60
|
background: 'var(--ab-color-primary)',
|
|
60
61
|
cursor: 'grab',
|
|
61
62
|
marginRight: 'var(--ab-space-1)',
|
|
62
|
-
}, data: `[${column.
|
|
63
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.
|
|
64
|
-
? new Date(data[column.
|
|
63
|
+
}, data: `[${column.columnId}]`, "data-name": "column", icon: "drag" },
|
|
64
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, showColumnIds ? `[${column.columnId}]` : column.friendlyName)) }, column.dataType === 'Number' ? (React.createElement(Input_1.default, { type: "number", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: Number(e.target.value) })), width: "100%", disabled: column.readOnly })) : column.dataType === 'String' ? (React.createElement(Input_1.default, { type: "text", "data-name": "column-input", value: data[column.columnId], onChange: (e) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: e.target.value })), width: "100%", disabled: column.readOnly })) : column.dataType === 'Date' ? (React.createElement(AdaptableInput_1.default, { type: "date", "data-name": "column-input", value: data[column.columnId] && DateHelper_1.isValueValidDate(data[column.columnId])
|
|
65
|
+
? new Date(data[column.columnId]).toISOString().substr(0, 10)
|
|
65
66
|
: '', onChange: (e) => {
|
|
66
|
-
setData(Object.assign(Object.assign({}, data), { [column.
|
|
67
|
-
}, style: { width: '100%' }, disabled: column.
|
|
67
|
+
setData(Object.assign(Object.assign({}, data), { [column.columnId]: new Date(e.target.value) }));
|
|
68
|
+
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", checked: data[column.columnId], onChange: (checked) => setData(Object.assign(Object.assign({}, data), { [column.columnId]: checked })), disabled: column.readOnly })) : null))))));
|
|
68
69
|
const namedQueries = (React.createElement("div", null, props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: { padding: 3, marginTop: 'var(--ab-space-2)', marginBottom: 'var(--ab-space-2)' }, backgroundColor: "primarylight" },
|
|
69
70
|
' ',
|
|
70
71
|
React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Loader = exports.LoaderSpinner = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
exports.LoaderSpinner = (props) => {
|
|
7
|
+
return React.createElement("div", { style: props.style, className: "ab-Loader__Spinner" });
|
|
8
|
+
};
|
|
9
|
+
exports.Loader = (props) => {
|
|
10
|
+
return (React.createElement("div", { style: props.style, className: "ab-Loader" },
|
|
11
|
+
React.createElement(exports.LoaderSpinner, null),
|
|
12
|
+
React.createElement("span", { className: "ab-Loader__text" }, props.children)));
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoaderSpinner = exports.Loader = void 0;
|
|
4
|
+
var Loader_1 = require("./Loader");
|
|
5
|
+
Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return Loader_1.Loader; } });
|
|
6
|
+
var Loader_2 = require("./Loader");
|
|
7
|
+
Object.defineProperty(exports, "LoaderSpinner", { enumerable: true, get: function () { return Loader_2.LoaderSpinner; } });
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProgressIndicator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const Loader_1 = require("../Loader");
|
|
9
|
+
const AdaptableContext_1 = require("../../View/AdaptableContext");
|
|
10
|
+
exports.ProgressIndicator = () => {
|
|
11
|
+
const { active, label } = react_redux_1.useSelector((state) => state.System.ProgressIndicator);
|
|
12
|
+
const [visible, setVisible] = react_1.useState(false);
|
|
13
|
+
const [progressIndicatorCoordinates, setProgressIndicatorCoordinates] = react_1.useState({
|
|
14
|
+
top: 0,
|
|
15
|
+
left: 0,
|
|
16
|
+
height: 0,
|
|
17
|
+
width: 0,
|
|
18
|
+
});
|
|
19
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
20
|
+
const adaptableContainerRef = react_1.useRef(adaptable.getAdaptableContainerElement());
|
|
21
|
+
const gridContainerRef = react_1.useRef(adaptable.getGridContainerElement());
|
|
22
|
+
const disableAdaptableGrid = (elemRef, disabled) => {
|
|
23
|
+
const DISABLING_CSS_CLASS = 'ab-wait-for-progress-indicator';
|
|
24
|
+
if (!elemRef.current) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (disabled) {
|
|
28
|
+
elemRef.current.classList.add(DISABLING_CSS_CLASS);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
elemRef.current.classList.remove(DISABLING_CSS_CLASS);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const updateGridContainerCoordinates = () => {
|
|
35
|
+
if (!gridContainerRef.current) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const { top, left, height, width } = gridContainerRef.current.getBoundingClientRect();
|
|
39
|
+
setProgressIndicatorCoordinates({ top, left, height, width });
|
|
40
|
+
};
|
|
41
|
+
react_1.useEffect(() => {
|
|
42
|
+
disableAdaptableGrid(adaptableContainerRef, active);
|
|
43
|
+
disableAdaptableGrid(gridContainerRef, active);
|
|
44
|
+
updateGridContainerCoordinates();
|
|
45
|
+
// without RAF the progress indicator would be rendered instantly, without the 'transition-delay' defined via CSS
|
|
46
|
+
requestAnimationFrame(() => {
|
|
47
|
+
setVisible(active);
|
|
48
|
+
});
|
|
49
|
+
}, [active]);
|
|
50
|
+
return (React.createElement(React.Fragment, null, active && (React.createElement("div", { className: `ab-progress-indicator-wrapper ${visible ? 'ab-progress-indicator-wrapper--visible' : ''}`, style: progressIndicatorCoordinates },
|
|
51
|
+
React.createElement("div", { className: "ab-progress-indicator-body" },
|
|
52
|
+
React.createElement(Loader_1.LoaderSpinner, null),
|
|
53
|
+
React.createElement("span", { style: { marginLeft: 'var(--ab-space-2)' } }, label))))));
|
|
54
|
+
};
|
|
@@ -14,12 +14,21 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
14
14
|
description: string;
|
|
15
15
|
uiLabel: string;
|
|
16
16
|
isOptional?: undefined;
|
|
17
|
+
reference?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
name: string;
|
|
20
|
+
kind: string;
|
|
21
|
+
description: string;
|
|
22
|
+
uiLabel: string;
|
|
23
|
+
isOptional: boolean;
|
|
24
|
+
reference: string;
|
|
17
25
|
} | {
|
|
18
26
|
name: string;
|
|
19
27
|
kind: string;
|
|
20
28
|
description: string;
|
|
21
29
|
uiLabel: string;
|
|
22
30
|
isOptional: boolean;
|
|
31
|
+
reference?: undefined;
|
|
23
32
|
})[];
|
|
24
33
|
};
|
|
25
34
|
ActionColumnButtonContext: {
|
|
@@ -40,6 +49,26 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
40
49
|
reference?: undefined;
|
|
41
50
|
})[];
|
|
42
51
|
};
|
|
52
|
+
ActionColumnSettings: {
|
|
53
|
+
name: string;
|
|
54
|
+
kind: string;
|
|
55
|
+
description: string;
|
|
56
|
+
properties: ({
|
|
57
|
+
name: string;
|
|
58
|
+
kind: string;
|
|
59
|
+
description: string;
|
|
60
|
+
uiLabel: string;
|
|
61
|
+
isOptional: boolean;
|
|
62
|
+
defaultValue: string;
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
kind: string;
|
|
66
|
+
description: string;
|
|
67
|
+
uiLabel: string;
|
|
68
|
+
isOptional: boolean;
|
|
69
|
+
defaultValue?: undefined;
|
|
70
|
+
})[];
|
|
71
|
+
};
|
|
43
72
|
ActionHandler: {
|
|
44
73
|
name: string;
|
|
45
74
|
kind: string;
|
|
@@ -736,6 +765,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
736
765
|
uiLabel: string;
|
|
737
766
|
}[];
|
|
738
767
|
};
|
|
768
|
+
BulkUpdatePermittedValues: {
|
|
769
|
+
name: string;
|
|
770
|
+
kind: string;
|
|
771
|
+
description: string;
|
|
772
|
+
};
|
|
739
773
|
ButtonStyle: {
|
|
740
774
|
name: string;
|
|
741
775
|
kind: string;
|
|
@@ -804,14 +838,14 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
804
838
|
description: string;
|
|
805
839
|
uiLabel: string;
|
|
806
840
|
isOptional: boolean;
|
|
807
|
-
defaultValue
|
|
841
|
+
defaultValue?: undefined;
|
|
808
842
|
} | {
|
|
809
843
|
name: string;
|
|
810
844
|
kind: string;
|
|
811
845
|
description: string;
|
|
812
846
|
uiLabel: string;
|
|
813
847
|
isOptional: boolean;
|
|
814
|
-
defaultValue
|
|
848
|
+
defaultValue: string;
|
|
815
849
|
})[];
|
|
816
850
|
};
|
|
817
851
|
CalculatedColumnState: {
|
|
@@ -905,6 +939,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
905
939
|
kind: string;
|
|
906
940
|
description: string;
|
|
907
941
|
};
|
|
942
|
+
CellValuesList: {
|
|
943
|
+
name: string;
|
|
944
|
+
kind: string;
|
|
945
|
+
description: string;
|
|
946
|
+
};
|
|
908
947
|
ChartApi: {
|
|
909
948
|
name: string;
|
|
910
949
|
kind: string;
|
|
@@ -1155,6 +1194,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1155
1194
|
uiLabel: string;
|
|
1156
1195
|
}[];
|
|
1157
1196
|
};
|
|
1197
|
+
CustomSortPermittedValues: {
|
|
1198
|
+
name: string;
|
|
1199
|
+
kind: string;
|
|
1200
|
+
description: string;
|
|
1201
|
+
};
|
|
1158
1202
|
CustomSortState: {
|
|
1159
1203
|
name: string;
|
|
1160
1204
|
kind: string;
|
|
@@ -1367,8 +1411,15 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1367
1411
|
kind: string;
|
|
1368
1412
|
description: string;
|
|
1369
1413
|
uiLabel: string;
|
|
1370
|
-
isOptional?: undefined;
|
|
1371
1414
|
reference?: undefined;
|
|
1415
|
+
isOptional?: undefined;
|
|
1416
|
+
} | {
|
|
1417
|
+
name: string;
|
|
1418
|
+
kind: string;
|
|
1419
|
+
description: string;
|
|
1420
|
+
uiLabel: string;
|
|
1421
|
+
reference: string;
|
|
1422
|
+
isOptional?: undefined;
|
|
1372
1423
|
} | {
|
|
1373
1424
|
name: string;
|
|
1374
1425
|
kind: string;
|
|
@@ -1488,6 +1539,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1488
1539
|
defaultValue: string;
|
|
1489
1540
|
}[];
|
|
1490
1541
|
};
|
|
1542
|
+
EditLookUpPermittedValues: {
|
|
1543
|
+
name: string;
|
|
1544
|
+
kind: string;
|
|
1545
|
+
description: string;
|
|
1546
|
+
};
|
|
1491
1547
|
EditOptions: {
|
|
1492
1548
|
name: string;
|
|
1493
1549
|
kind: string;
|
|
@@ -1773,6 +1829,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1773
1829
|
defaultValue?: undefined;
|
|
1774
1830
|
})[];
|
|
1775
1831
|
};
|
|
1832
|
+
FilterPermittedValues: {
|
|
1833
|
+
name: string;
|
|
1834
|
+
kind: string;
|
|
1835
|
+
description: string;
|
|
1836
|
+
properties: {
|
|
1837
|
+
name: string;
|
|
1838
|
+
kind: string;
|
|
1839
|
+
description: string;
|
|
1840
|
+
uiLabel: string;
|
|
1841
|
+
isOptional: boolean;
|
|
1842
|
+
}[];
|
|
1843
|
+
};
|
|
1776
1844
|
FilterState: {
|
|
1777
1845
|
name: string;
|
|
1778
1846
|
kind: string;
|
|
@@ -1843,6 +1911,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1843
1911
|
description: string;
|
|
1844
1912
|
uiLabel: string;
|
|
1845
1913
|
isOptional: boolean;
|
|
1914
|
+
defaultValue: string;
|
|
1846
1915
|
reference: string;
|
|
1847
1916
|
} | {
|
|
1848
1917
|
name: string;
|
|
@@ -1850,6 +1919,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1850
1919
|
description: string;
|
|
1851
1920
|
uiLabel: string;
|
|
1852
1921
|
isOptional: boolean;
|
|
1922
|
+
defaultValue: string;
|
|
1853
1923
|
reference?: undefined;
|
|
1854
1924
|
})[];
|
|
1855
1925
|
};
|
|
@@ -1925,6 +1995,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1925
1995
|
uiLabel: string;
|
|
1926
1996
|
isOptional?: undefined;
|
|
1927
1997
|
defaultValue?: undefined;
|
|
1998
|
+
reference?: undefined;
|
|
1928
1999
|
} | {
|
|
1929
2000
|
name: string;
|
|
1930
2001
|
kind: string;
|
|
@@ -1932,6 +2003,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1932
2003
|
uiLabel: string;
|
|
1933
2004
|
isOptional: boolean;
|
|
1934
2005
|
defaultValue: string;
|
|
2006
|
+
reference?: undefined;
|
|
1935
2007
|
} | {
|
|
1936
2008
|
name: string;
|
|
1937
2009
|
kind: string;
|
|
@@ -1939,6 +2011,15 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1939
2011
|
uiLabel: string;
|
|
1940
2012
|
isOptional: boolean;
|
|
1941
2013
|
defaultValue?: undefined;
|
|
2014
|
+
reference?: undefined;
|
|
2015
|
+
} | {
|
|
2016
|
+
name: string;
|
|
2017
|
+
kind: string;
|
|
2018
|
+
description: string;
|
|
2019
|
+
uiLabel: string;
|
|
2020
|
+
isOptional: boolean;
|
|
2021
|
+
reference: string;
|
|
2022
|
+
defaultValue?: undefined;
|
|
1942
2023
|
})[];
|
|
1943
2024
|
};
|
|
1944
2025
|
FreeTextColumnApi: {
|
|
@@ -1952,6 +2033,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1952
2033
|
uiLabel: string;
|
|
1953
2034
|
}[];
|
|
1954
2035
|
};
|
|
2036
|
+
FreeTextColumnSettings: {
|
|
2037
|
+
name: string;
|
|
2038
|
+
kind: string;
|
|
2039
|
+
description: string;
|
|
2040
|
+
};
|
|
1955
2041
|
FreeTextColumnState: {
|
|
1956
2042
|
name: string;
|
|
1957
2043
|
kind: string;
|
|
@@ -2097,22 +2183,22 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2097
2183
|
kind: string;
|
|
2098
2184
|
description: string;
|
|
2099
2185
|
uiLabel: string;
|
|
2186
|
+
reference: string;
|
|
2100
2187
|
isOptional?: undefined;
|
|
2101
|
-
reference?: undefined;
|
|
2102
2188
|
} | {
|
|
2103
2189
|
name: string;
|
|
2104
2190
|
kind: string;
|
|
2105
2191
|
description: string;
|
|
2106
2192
|
uiLabel: string;
|
|
2107
|
-
isOptional: boolean;
|
|
2108
2193
|
reference?: undefined;
|
|
2194
|
+
isOptional?: undefined;
|
|
2109
2195
|
} | {
|
|
2110
2196
|
name: string;
|
|
2111
2197
|
kind: string;
|
|
2112
2198
|
description: string;
|
|
2113
2199
|
uiLabel: string;
|
|
2114
|
-
|
|
2115
|
-
|
|
2200
|
+
isOptional: boolean;
|
|
2201
|
+
reference?: undefined;
|
|
2116
2202
|
})[];
|
|
2117
2203
|
};
|
|
2118
2204
|
GridDataChangedInfo: {
|
|
@@ -2529,6 +2615,18 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2529
2615
|
kind: string;
|
|
2530
2616
|
description: string;
|
|
2531
2617
|
};
|
|
2618
|
+
PermittedValues: {
|
|
2619
|
+
name: string;
|
|
2620
|
+
kind: string;
|
|
2621
|
+
description: string;
|
|
2622
|
+
properties: {
|
|
2623
|
+
name: string;
|
|
2624
|
+
kind: string;
|
|
2625
|
+
description: string;
|
|
2626
|
+
uiLabel: string;
|
|
2627
|
+
isOptional: boolean;
|
|
2628
|
+
}[];
|
|
2629
|
+
};
|
|
2532
2630
|
PluginsApi: {
|
|
2533
2631
|
name: string;
|
|
2534
2632
|
kind: string;
|
|
@@ -3023,6 +3121,26 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3023
3121
|
isOptional: boolean;
|
|
3024
3122
|
}[];
|
|
3025
3123
|
};
|
|
3124
|
+
SpecialColumnSettings: {
|
|
3125
|
+
name: string;
|
|
3126
|
+
kind: string;
|
|
3127
|
+
description: string;
|
|
3128
|
+
properties: ({
|
|
3129
|
+
name: string;
|
|
3130
|
+
kind: string;
|
|
3131
|
+
description: string;
|
|
3132
|
+
uiLabel: string;
|
|
3133
|
+
isOptional: boolean;
|
|
3134
|
+
defaultValue: string;
|
|
3135
|
+
} | {
|
|
3136
|
+
name: string;
|
|
3137
|
+
kind: string;
|
|
3138
|
+
description: string;
|
|
3139
|
+
uiLabel: string;
|
|
3140
|
+
isOptional: boolean;
|
|
3141
|
+
defaultValue?: undefined;
|
|
3142
|
+
})[];
|
|
3143
|
+
};
|
|
3026
3144
|
StateOptions: {
|
|
3027
3145
|
name: string;
|
|
3028
3146
|
kind: string;
|