@adaptabletools/adaptable 19.2.2 → 19.2.3
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 +1 -1
- package/src/AdaptableOptions/CustomSortOptions.d.ts +1 -1
- package/src/Api/Internal/CustomSortInternalApi.d.ts +1 -0
- package/src/Api/Internal/CustomSortInternalApi.js +4 -0
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +14 -17
- package/src/Strategy/Interface/IModule.d.ts +1 -1
- package/src/Strategy/LayoutModule.js +5 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -2
- package/src/Strategy/StyledColumnModule.js +3 -8
- package/src/Strategy/Utilities/CustomSort/getCustomSortSortOrderViewItems.d.ts +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +6 -0
- package/src/agGrid/AdaptableAgGrid.js +7 -4
- package/src/env.js +3 -3
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.3",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnScope } from '../../types';
|
|
2
2
|
import { AdaptableComparerFunction } from '../PredefinedConfig/Common/AdaptableComparerFunction';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Used to provide Custom Sorts comparers
|
|
5
5
|
*/
|
|
6
6
|
export interface CustomSortOptions<TData = any> {
|
|
7
7
|
/**
|
|
@@ -4,4 +4,5 @@ import { AdaptableComparerFunction } from '../../PredefinedConfig/Common/Adaptab
|
|
|
4
4
|
export declare class CustomSortInternalApi extends ApiBase {
|
|
5
5
|
getCustomSortComparer(columnId: string): ColumnValuesComparer | undefined;
|
|
6
6
|
getDefaultCustomSortComparer(columnId: string, columnValues: any[]): AdaptableComparerFunction;
|
|
7
|
+
columnHasCustomSortComparer(columnId: string): boolean;
|
|
7
8
|
}
|
|
@@ -35,4 +35,8 @@ export class CustomSortInternalApi extends ApiBase {
|
|
|
35
35
|
return indexFirstElement - indexSecondElement;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
+
columnHasCustomSortComparer(columnId) {
|
|
39
|
+
const columnSortComparer = this.getCustomSortComparer(columnId);
|
|
40
|
+
return columnSortComparer ? true : false;
|
|
41
|
+
}
|
|
38
42
|
}
|
|
@@ -20,24 +20,21 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
20
20
|
}
|
|
21
21
|
createColumnMenuItems(column) {
|
|
22
22
|
if (column && this.isModuleEditable() && column.sortable) {
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
if (!this.api.customSortApi.internalApi.columnHasCustomSortComparer(column.columnId)) {
|
|
24
|
+
let customSort = this.api.customSortApi
|
|
25
|
+
.getCustomSorts()
|
|
26
|
+
.find((x) => x.ColumnId == column.columnId);
|
|
27
|
+
let label = customSort ? 'Edit ' : 'Create ';
|
|
28
|
+
let popupParam = {
|
|
29
|
+
column: column,
|
|
30
|
+
action: customSort ? 'Edit' : 'New',
|
|
31
|
+
source: 'ColumnMenu',
|
|
32
|
+
};
|
|
33
|
+
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
34
|
+
return [
|
|
35
|
+
this.createMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
36
|
+
];
|
|
31
37
|
}
|
|
32
|
-
let popupParam = {
|
|
33
|
-
column: column,
|
|
34
|
-
action: customSort ? 'Edit' : 'New',
|
|
35
|
-
source: 'ColumnMenu',
|
|
36
|
-
};
|
|
37
|
-
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
38
|
-
return [
|
|
39
|
-
this.createMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
40
|
-
];
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
getTeamSharingAction() {
|
|
@@ -22,7 +22,7 @@ export interface ModuleInfo {
|
|
|
22
22
|
}
|
|
23
23
|
export type TeamSharingReferences = TeamSharingReference[];
|
|
24
24
|
export type TeamSharingReference = {
|
|
25
|
-
Module: StrictExtract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'NamedQuery' | 'Alert' | 'CustomSort' | 'FlashingCell' | 'FormatColumn' | 'PlusMinus' | 'Shortcut' | 'Schedule'>;
|
|
25
|
+
Module: StrictExtract<AdaptableModule, 'CalculatedColumn' | 'FreeTextColumn' | 'NamedQuery' | 'Alert' | 'CustomSort' | 'FlashingCell' | 'FormatColumn' | 'PlusMinus' | 'Shortcut' | 'Schedule' | 'StyledColumn'>;
|
|
26
26
|
Reference: AdaptableObject;
|
|
27
27
|
};
|
|
28
28
|
export interface AdaptableObjectItemView {
|
|
@@ -77,6 +77,10 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
77
77
|
Reference: formatColumn,
|
|
78
78
|
Module: 'FormatColumn',
|
|
79
79
|
}));
|
|
80
|
+
this.api.styledColumnApi.getStyledColumns(loadConfig).forEach((styledcolumn) => layoutAssociatedObjectReferences.push({
|
|
81
|
+
Reference: styledcolumn,
|
|
82
|
+
Module: 'StyledColumn',
|
|
83
|
+
}));
|
|
80
84
|
this.api.plusMinusApi.getAllPlusMinus(loadConfig).forEach((plusMinusNudge) => layoutAssociatedObjectReferences.push({
|
|
81
85
|
Reference: plusMinusNudge,
|
|
82
86
|
Module: 'PlusMinus',
|
|
@@ -388,7 +392,7 @@ export class LayoutModule extends AdaptableModuleBase {
|
|
|
388
392
|
.getModuleService()
|
|
389
393
|
.getModuleById('Schedule')
|
|
390
394
|
.setUpScheduleJobs();
|
|
391
|
-
// CustomSort, FlashingCell, FormatColumn
|
|
395
|
+
// CustomSort, FlashingCell, FormatColumn, StyledColumn
|
|
392
396
|
// we need to re-setup the column defs, as some colDefs properties may be changed
|
|
393
397
|
this.api.internalApi
|
|
394
398
|
.getAdaptableInstance()
|
|
@@ -2,7 +2,6 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
2
2
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
|
-
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
6
5
|
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
7
6
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
8
7
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -12,7 +11,7 @@ export declare class StyledColumnModule extends AdaptableModuleBase implements I
|
|
|
12
11
|
getModuleAdaptableObjects(config?: {
|
|
13
12
|
includeLayoutNotAssociatedObjects?: boolean;
|
|
14
13
|
}): AdaptableObject[];
|
|
15
|
-
getExplicitlyReferencedColumnIds(
|
|
14
|
+
getExplicitlyReferencedColumnIds(styledColumn: StyledColumn): string[];
|
|
16
15
|
hasNamedQueryReferences(): boolean;
|
|
17
16
|
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar">[];
|
|
18
17
|
private getGlyphForStyledColumn;
|
|
@@ -9,18 +9,13 @@ import { StyledColumnBadgePreview } from '../View/StyledColumn/Wizard/StyledColu
|
|
|
9
9
|
export class StyledColumnModule extends AdaptableModuleBase {
|
|
10
10
|
constructor(api) {
|
|
11
11
|
super(ModuleConstants.StyledColumnModuleId, ModuleConstants.StyledColumnFriendlyName, 'brush', 'StyledColumnPopup', // to change
|
|
12
|
-
'Create a Special Column Style e.g Gradient
|
|
12
|
+
'Create a Special Column Style e.g Gradient, Percent Bar or Badge', api);
|
|
13
13
|
}
|
|
14
14
|
getModuleAdaptableObjects(config) {
|
|
15
15
|
return this.api.styledColumnApi.getStyledColumns(config);
|
|
16
16
|
}
|
|
17
|
-
getExplicitlyReferencedColumnIds(
|
|
18
|
-
|
|
19
|
-
return this.api.columnScopeApi
|
|
20
|
-
.getColumnsForScope(formatColumn.Scope)
|
|
21
|
-
.map((adaptableColumn) => adaptableColumn.columnId);
|
|
22
|
-
}
|
|
23
|
-
return [];
|
|
17
|
+
getExplicitlyReferencedColumnIds(styledColumn) {
|
|
18
|
+
return [styledColumn.ColumnId];
|
|
24
19
|
}
|
|
25
20
|
hasNamedQueryReferences() {
|
|
26
21
|
return false;
|
|
@@ -20,6 +20,9 @@ export const CustomSortColumnWizardSection = (props) => {
|
|
|
20
20
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
21
21
|
const sortableCols = React.useMemo(() => {
|
|
22
22
|
const sortableColumns = api.columnApi.getSortableColumns();
|
|
23
|
+
const nonComparerSortableColumns = sortableColumns.filter((c) => {
|
|
24
|
+
return api.customSortApi.internalApi.columnHasCustomSortComparer(c.columnId);
|
|
25
|
+
});
|
|
23
26
|
const customSorts = api.customSortApi.getCustomSorts();
|
|
24
27
|
const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
|
|
25
28
|
const usedColumnIds = [
|
|
@@ -28,6 +31,9 @@ export const CustomSortColumnWizardSection = (props) => {
|
|
|
28
31
|
];
|
|
29
32
|
// filter out used colum ids, but include the current one
|
|
30
33
|
return sortableColumns.filter((column) => {
|
|
34
|
+
if (api.customSortApi.internalApi.columnHasCustomSortComparer(column.columnId)) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
31
37
|
if (!props.isNew && column.columnId === (data === null || data === void 0 ? void 0 : data.ColumnId)) {
|
|
32
38
|
return true;
|
|
33
39
|
}
|
|
@@ -1789,7 +1789,8 @@ export class AdaptableAgGrid {
|
|
|
1789
1789
|
return acc;
|
|
1790
1790
|
}
|
|
1791
1791
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
1792
|
-
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1792
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1793
|
+
.marryChildren;
|
|
1793
1794
|
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
1794
1795
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
1795
1796
|
columnsInGroup.forEach((col) => {
|
|
@@ -3648,7 +3649,9 @@ export class AdaptableAgGrid {
|
|
|
3648
3649
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
3649
3650
|
this.logger.info(`Undo data change: PK(${cellDataChangedInfo.primaryKeyValue}) Col(${cellDataChangedInfo.column}) RevertedValue(${cellDataChangedInfo.oldValue}) OriginalValue(${cellDataChangedInfo.newValue})`);
|
|
3650
3651
|
}
|
|
3651
|
-
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
3652
|
+
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
3653
|
+
cellDataChangedInfo.trigger === 'undo' ||
|
|
3654
|
+
cellDataChangedInfo.trigger === 'tick') {
|
|
3652
3655
|
this.checkChangedCellCurrentlySelected(cellDataChangedInfo);
|
|
3653
3656
|
this.api.freeTextColumnApi.internalApi.handleFreeTextColumnDataChange(cellDataChangedInfo);
|
|
3654
3657
|
}
|
|
@@ -3757,14 +3760,14 @@ export class AdaptableAgGrid {
|
|
|
3757
3760
|
let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == cellDataChangedInfo.primaryKeyValue &&
|
|
3758
3761
|
gc.column == cellDataChangedInfo.column);
|
|
3759
3762
|
if (matchingCell) {
|
|
3760
|
-
this.
|
|
3763
|
+
this.debouncedSetSelectedCells();
|
|
3761
3764
|
}
|
|
3762
3765
|
}
|
|
3763
3766
|
let selectedRowInfo = this.api.gridApi.getSelectedRowInfo();
|
|
3764
3767
|
if (selectedRowInfo && ArrayExtensions.IsNotNullOrEmpty(selectedRowInfo.gridRows)) {
|
|
3765
3768
|
let matchingRow = selectedRowInfo.gridRows.find((gr) => gr.primaryKeyValue == cellDataChangedInfo.primaryKeyValue);
|
|
3766
3769
|
if (matchingRow) {
|
|
3767
|
-
this.
|
|
3770
|
+
this.debouncedSetSelectedRows();
|
|
3768
3771
|
}
|
|
3769
3772
|
}
|
|
3770
3773
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
INFINITE_TABLE_LICENSE_KEY:
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "19.2.
|
|
2
|
+
INFINITE_TABLE_LICENSE_KEY: process.env.INFINITE_TABLE_LICENSE_KEY || '',
|
|
3
|
+
PUBLISH_TIMESTAMP: 1736417144748 || Date.now(),
|
|
4
|
+
VERSION: "19.2.3" || '--current-version--',
|
|
5
5
|
};
|