@adaptabletools/adaptable 18.1.13 → 18.1.15-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/package.json +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -5
- package/src/AdaptableOptions/AlertOptions.d.ts +2 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +5 -1
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +5 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +5 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +5 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +6 -2
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +5 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ChartingApi.d.ts +2 -2
- package/src/Api/ColumnApi.d.ts +6 -0
- package/src/Api/ConfigApi.d.ts +22 -2
- package/src/Api/Events/LiveDataChanged.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +3 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +4 -1
- package/src/Api/Implementation/ConfigApiImpl.js +16 -1
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +4 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +31 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -7
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +2 -6
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -6
- package/src/Api/Internal/AdaptableInternalApi.js +5 -11
- package/src/Api/Internal/EntitlementInternalApi.d.ts +4 -0
- package/src/Api/Internal/EntitlementInternalApi.js +11 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +33 -8
- package/src/Api/Internal/ExportInternalApi.js +576 -5
- package/src/Api/Internal/NamedQueryInternalApi.d.ts +0 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -5
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +2 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -6
- package/src/Redux/ActionsReducers/GridRedux.js +8 -8
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +9 -9
- package/src/Redux/ActionsReducers/NamedQueryRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +1 -1
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +2 -2
- package/src/Redux/ActionsReducers/PluginsRedux.js +2 -2
- package/src/Redux/Store/AdaptableReduxMerger.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +2 -4
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/ColumnFilterModule.js +1 -2
- package/src/Strategy/ExportModule.js +17 -44
- package/src/Strategy/FlashingCellModule.js +2 -10
- package/src/Strategy/ScheduleModule.js +4 -6
- package/src/Strategy/SmartEditModule.js +1 -7
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +1 -3
- package/src/Utilities/Constants/FilterConstants.d.ts +10 -0
- package/src/Utilities/Constants/FilterConstants.js +8 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +41 -4
- package/src/Utilities/Constants/GeneralConstants.js +42 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +0 -5
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +14 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +65 -0
- package/src/Utilities/Extensions/EnumExtensions.d.ts +0 -4
- package/src/Utilities/Extensions/EnumExtensions.js +2 -12
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +4 -10
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -59
- package/src/Utilities/Helpers/FormatHelper.d.ts +9 -0
- package/src/Utilities/Helpers/FormatHelper.js +26 -14
- package/src/Utilities/Helpers/Helper.d.ts +0 -10
- package/src/Utilities/Helpers/Helper.js +0 -70
- package/src/Utilities/Services/ChartingService.d.ts +2 -2
- package/src/Utilities/Services/ChartingService.js +5 -11
- package/src/Utilities/Services/ModuleService.js +35 -31
- package/src/Utilities/Services/RowEditService.js +1 -6
- package/src/Utilities/Services/RowSummaryService.js +2 -2
- package/src/Utilities/Services/ValidationService.js +2 -16
- package/src/View/Alert/AlertEmptyView.js +1 -2
- package/src/View/Charting/ChartingStatusBarPopover.js +1 -2
- package/src/View/Charting/useChartingElements.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -12
- package/src/View/Components/ModuleValueSelector/index.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -5
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -3
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +6 -12
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +3 -23
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -3
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +2 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -6
- package/src/View/Dashboard/CustomToolbar.js +2 -9
- package/src/View/Dashboard/Dashboard.js +2 -4
- package/src/View/Dashboard/DashboardPopup.js +1 -3
- package/src/View/Dashboard/DashboardToolbarFactory.js +1 -2
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -2
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -3
- package/src/View/Export/ExportViewPanel.js +2 -4
- package/src/View/Export/Wizard/ReportSummaryWizard.js +2 -6
- package/src/View/GridFilter/GridFilterExpressionEditor.js +2 -2
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +2 -6
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -7
- package/src/View/Layout/SaveLayoutButton.js +1 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +3 -3
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/SystemStatus/SystemStatusPopup.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +8 -22
- package/src/agGrid/AdaptableAgGrid.d.ts +5 -7
- package/src/agGrid/AdaptableAgGrid.js +159 -148
- package/src/agGrid/AgGridAdapter.d.ts +0 -1
- package/src/agGrid/AgGridAdapter.js +8 -11
- package/src/agGrid/AgGridColumnAdapter.d.ts +3 -1
- package/src/agGrid/AgGridColumnAdapter.js +40 -14
- package/src/agGrid/BadgeRenderer.js +4 -22
- package/src/agGrid/FloatingFilterWrapper.js +21 -0
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +1 -1
- package/src/agGrid/buildSortedColumnStateForLayout.js +2 -2
- package/src/agGrid/defaultAdaptableOptions.js +35 -30
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -15
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +84 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +9 -9
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Redux/ActionsReducers/QueryRedux.d.ts +0 -10
- package/src/Redux/ActionsReducers/QueryRedux.js +0 -20
- package/src/Utilities/Helpers/FormatContentHelper.d.ts +0 -22
- package/src/Utilities/Helpers/FormatContentHelper.js +0 -34
- package/src/Utilities/Services/EntitlementService.d.ts +0 -14
- package/src/Utilities/Services/EntitlementService.js +0 -63
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -10
- package/src/Utilities/Services/Interface/IEntitlementService.js +0 -1
- package/src/Utilities/Services/Interface/IReportService.d.ts +0 -27
- package/src/Utilities/Services/Interface/IReportService.js +0 -1
- package/src/Utilities/Services/ReportService.d.ts +0 -41
- package/src/Utilities/Services/ReportService.js +0 -603
- package/src/Utilities/isAdaptableObject.d.ts +0 -2
- package/src/Utilities/isAdaptableObject.js +0 -4
- package/src/Utilities/reorder.d.ts +0 -1
- package/src/Utilities/reorder.js +0 -13
- package/src/Utilities/sortWithOrder.d.ts +0 -11
- package/src/Utilities/sortWithOrder.js +0 -50
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export function sortWithOrderArray(arr, order,
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* The array can contain items which are not listed in the order array.
|
|
5
|
-
* So sortUnorderedItems decides whether to leave these items untouched
|
|
6
|
-
* in the current order in which they are in the array (sortUnorderedItems: false)
|
|
7
|
-
* or to sort them using normal comparison rules
|
|
8
|
-
*/
|
|
9
|
-
{ sortUnorderedItems: sortUnorderedItems }) {
|
|
10
|
-
const itemsToIndex = arr.reduce((acc, x, i) => {
|
|
11
|
-
acc.set(x, i);
|
|
12
|
-
return acc;
|
|
13
|
-
}, new Map());
|
|
14
|
-
const orderItemsToIndex = order.reduce((acc, x, i) => {
|
|
15
|
-
acc.set(x, i);
|
|
16
|
-
return acc;
|
|
17
|
-
}, new Map());
|
|
18
|
-
function compareItemsOfCustomSort(valueA, valueB) {
|
|
19
|
-
const orderContainsFirstElement = orderItemsToIndex.has(valueA);
|
|
20
|
-
const indexInOrderOfFirstElement = orderContainsFirstElement
|
|
21
|
-
? orderItemsToIndex.get(valueA)
|
|
22
|
-
: -1;
|
|
23
|
-
const orderContainsSecondElement = orderItemsToIndex.has(valueB);
|
|
24
|
-
const indexInOrderSecondElement = orderContainsSecondElement
|
|
25
|
-
? orderItemsToIndex.get(valueB)
|
|
26
|
-
: -1;
|
|
27
|
-
//if none of the element are in the order list we just return normal compare
|
|
28
|
-
if (!orderContainsFirstElement && !orderContainsSecondElement) {
|
|
29
|
-
if (!sortUnorderedItems) {
|
|
30
|
-
// keep the original order
|
|
31
|
-
return itemsToIndex.get(valueA) - itemsToIndex.get(valueB);
|
|
32
|
-
}
|
|
33
|
-
if (valueA == valueB) {
|
|
34
|
-
return 0;
|
|
35
|
-
}
|
|
36
|
-
return valueA < valueB ? -1 : 1;
|
|
37
|
-
}
|
|
38
|
-
//if first item not in the list make sure we put it after the second item
|
|
39
|
-
if (!orderContainsFirstElement) {
|
|
40
|
-
return 1;
|
|
41
|
-
}
|
|
42
|
-
//if second item not in the list make sure we put it after the first item
|
|
43
|
-
if (!orderContainsSecondElement) {
|
|
44
|
-
return -1;
|
|
45
|
-
}
|
|
46
|
-
//return the comparison from the list if the two items are in the list
|
|
47
|
-
return indexInOrderOfFirstElement - indexInOrderSecondElement;
|
|
48
|
-
}
|
|
49
|
-
return [].concat(arr).sort(compareItemsOfCustomSort);
|
|
50
|
-
}
|