@adaptabletools/adaptable-cjs 22.0.0-canary.9 → 22.0.1-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/index.css +1157 -1319
- package/index.css.map +1 -1
- package/index.d.ts +8 -8
- package/index.js +8 -8
- package/package.json +1 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
- package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
- package/src/AdaptableState/Common/AggregationColumns.js +2 -1
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
- package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +8 -0
- package/src/Api/Implementation/ApiBase.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.js +1 -1
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
- package/src/Api/Implementation/GridApiImpl.js +9 -5
- package/src/Api/Implementation/LayoutHelpers.js +1 -1
- package/src/Api/Implementation/RowFormApiImpl.d.ts +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +13 -0
- package/src/Api/Internal/ActionColumnInternalApi.js +2 -19
- package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
- package/src/Api/Internal/ColumnInternalApi.js +5 -3
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/RowFormApi.d.ts +5 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
- package/src/Strategy/CellSummaryModule.d.ts +1 -0
- package/src/Strategy/CellSummaryModule.js +3 -0
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +23 -19
- package/src/Strategy/PlusMinusModule.d.ts +1 -0
- package/src/Strategy/PlusMinusModule.js +8 -2
- package/src/Strategy/StyledColumnModule.js +14 -6
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +26 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
- package/src/Utilities/Helpers/FormatHelper.js +2 -2
- package/src/Utilities/Hooks/index.d.ts +1 -2
- package/src/Utilities/Hooks/index.js +1 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +2 -2
- package/src/Utilities/getScopeViewItems.js +1 -1
- package/src/Utilities/only.d.ts +18 -0
- package/src/Utilities/only.js +44 -0
- package/src/Utilities/utils/chunk.d.ts +6 -0
- package/src/Utilities/utils/chunk.js +20 -0
- package/src/Utilities/utils/clamp.d.ts +5 -0
- package/src/Utilities/utils/clamp.js +10 -0
- package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
- package/src/Utilities/utils/cloneDeepWith.js +70 -0
- package/src/Utilities/utils/debounce.d.ts +20 -0
- package/src/Utilities/utils/debounce.js +124 -0
- package/src/Utilities/utils/flatten.d.ts +5 -0
- package/src/Utilities/utils/flatten.js +10 -0
- package/src/Utilities/utils/flattenDeep.d.ts +5 -0
- package/src/Utilities/utils/flattenDeep.js +10 -0
- package/src/Utilities/utils/get.d.ts +6 -0
- package/src/Utilities/utils/get.js +38 -0
- package/src/Utilities/utils/index.d.ts +22 -0
- package/src/Utilities/utils/index.js +48 -0
- package/src/Utilities/utils/isArray.d.ts +6 -0
- package/src/Utilities/utils/isArray.js +8 -0
- package/src/Utilities/utils/isEqual.d.ts +5 -0
- package/src/Utilities/utils/isEqual.js +127 -0
- package/src/Utilities/utils/isObject.d.ts +6 -0
- package/src/Utilities/utils/isObject.js +12 -0
- package/src/Utilities/utils/isPlainObject.d.ts +6 -0
- package/src/Utilities/utils/isPlainObject.js +20 -0
- package/src/Utilities/utils/kebabCase.d.ts +5 -0
- package/src/Utilities/utils/kebabCase.js +12 -0
- package/src/Utilities/utils/merge.d.ts +11 -0
- package/src/Utilities/utils/merge.js +44 -0
- package/src/Utilities/utils/mergeWith.d.ts +7 -0
- package/src/Utilities/utils/mergeWith.js +50 -0
- package/src/Utilities/utils/orderBy.d.ts +8 -0
- package/src/Utilities/utils/orderBy.js +33 -0
- package/src/Utilities/utils/parseInt.d.ts +6 -0
- package/src/Utilities/utils/parseInt.js +12 -0
- package/src/Utilities/utils/sentenceCase.d.ts +6 -0
- package/src/Utilities/utils/sentenceCase.js +19 -0
- package/src/Utilities/utils/startCase.d.ts +5 -0
- package/src/Utilities/utils/startCase.js +15 -0
- package/src/Utilities/utils/throttle.d.ts +17 -0
- package/src/Utilities/utils/throttle.js +23 -0
- package/src/Utilities/utils/toNumber.d.ts +5 -0
- package/src/Utilities/utils/toNumber.js +42 -0
- package/src/Utilities/utils/uniq.d.ts +7 -0
- package/src/Utilities/utils/uniq.js +12 -0
- package/src/Utilities/utils/uniqBy.d.ts +8 -0
- package/src/Utilities/utils/uniqBy.js +25 -0
- package/src/Utilities/utils/words.d.ts +7 -0
- package/src/Utilities/utils/words.js +13 -0
- package/src/Utilities/weightedAverage.d.ts +11 -0
- package/src/Utilities/weightedAverage.js +60 -46
- package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ValueSelector/index.js +7 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -3
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/Export/Wizard/NewReportWizard.js +8 -8
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +86 -0
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
- package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +0 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Note/NoteEditor.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +22 -22
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/Theme/ThemeEditor.js +1 -1
- package/src/View/Theme/ThemeField.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +28 -6
- package/src/agGrid/AgGridAdapter.js +4 -4
- package/src/agGrid/AgGridColumnAdapter.js +11 -4
- package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
- package/src/agGrid/AgGridExportAdapter.js +7 -6
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +4 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +12 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade22.js +9 -0
- package/themes/dark.css +2 -3
- package/themes/light.css +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
- package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
- package/src/Utilities/Hooks/useAdaptableState.js +0 -42
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
- /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
- /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -537,6 +537,10 @@ export interface GridApi {
|
|
|
537
537
|
* @param rowNodes AG Grid rows
|
|
538
538
|
*/
|
|
539
539
|
refreshRowNodes(rowNodes?: IRowNode[]): void;
|
|
540
|
+
/**
|
|
541
|
+
* Forces a re-render of the Grid Header
|
|
542
|
+
*/
|
|
543
|
+
refreshGridHeader(): void;
|
|
540
544
|
/**
|
|
541
545
|
* Forces a re-render of all Group Rows (including aggregations)
|
|
542
546
|
*/
|
|
@@ -596,6 +600,10 @@ export interface GridApi {
|
|
|
596
600
|
* Opens a window with a transposed view of Grid
|
|
597
601
|
*/
|
|
598
602
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
603
|
+
/**
|
|
604
|
+
* Closes the transposed view of the Grid (if open)
|
|
605
|
+
*/
|
|
606
|
+
closeTransposedView(): void;
|
|
599
607
|
/**
|
|
600
608
|
* Return all AG Grid columns
|
|
601
609
|
*/
|
|
@@ -19,7 +19,7 @@ export declare abstract class ApiBase {
|
|
|
19
19
|
protected _adaptable: IAdaptable;
|
|
20
20
|
/**
|
|
21
21
|
* Constructor for all the api classes which simply takes and assigns an instance of Adaptable
|
|
22
|
-
* @param _adaptable
|
|
22
|
+
* @param _adaptable core IAdaptable object - for INTERNAL USE ONLY and not part of public API
|
|
23
23
|
*/
|
|
24
24
|
constructor(_adaptable: IAdaptable);
|
|
25
25
|
protected getAdatableLogger(): AdaptableLogger;
|
|
@@ -9,7 +9,7 @@ class ApiBase {
|
|
|
9
9
|
_adaptable;
|
|
10
10
|
/**
|
|
11
11
|
* Constructor for all the api classes which simply takes and assigns an instance of Adaptable
|
|
12
|
-
* @param _adaptable
|
|
12
|
+
* @param _adaptable core IAdaptable object - for INTERNAL USE ONLY and not part of public API
|
|
13
13
|
*/
|
|
14
14
|
constructor(_adaptable) {
|
|
15
15
|
this._adaptable = _adaptable;
|
|
@@ -78,7 +78,7 @@ export declare class ColumnApiImpl extends ApiBase implements ColumnApi {
|
|
|
78
78
|
getAggregatableColumns(): AdaptableColumn[];
|
|
79
79
|
getQueryableColumns(): AdaptableColumn[];
|
|
80
80
|
getExportableColumns(): AdaptableColumn[];
|
|
81
|
-
|
|
81
|
+
getUIHiddenColumns(): AdaptableColumn[];
|
|
82
82
|
private logMissingColumnWarning;
|
|
83
83
|
getPrimaryKeyColumn(): AdaptableColumn<any>;
|
|
84
84
|
getDefaultAggFunc(columnId: string): string;
|
|
@@ -28,7 +28,7 @@ const ROW_GROUP_COLUMN_DEFAULTS = {
|
|
|
28
28
|
readOnly: false,
|
|
29
29
|
resizable: true,
|
|
30
30
|
visible: true,
|
|
31
|
-
|
|
31
|
+
isUIHiddenColumn: false,
|
|
32
32
|
fieldOnly: false,
|
|
33
33
|
queryable: false,
|
|
34
34
|
sortable: false,
|
|
@@ -131,7 +131,7 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
131
131
|
return this.getGridApi().getInternalState().Columns ?? [];
|
|
132
132
|
}
|
|
133
133
|
getUIAvailableColumns() {
|
|
134
|
-
return this.getColumns().filter((c) => !c.
|
|
134
|
+
return this.getColumns().filter((c) => !c.isUIHiddenColumn &&
|
|
135
135
|
!c.isGeneratedSelectionColumn &&
|
|
136
136
|
// currently (20.0.7) we don't display Pivot Totals in UI
|
|
137
137
|
!c.isPivotTotalColumn);
|
|
@@ -480,8 +480,8 @@ class ColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
480
480
|
getExportableColumns() {
|
|
481
481
|
return this.getColumns().filter((c) => c.exportable);
|
|
482
482
|
}
|
|
483
|
-
|
|
484
|
-
return this.getColumns().filter((c) => c.
|
|
483
|
+
getUIHiddenColumns() {
|
|
484
|
+
return this.getColumns().filter((c) => c.isUIHiddenColumn);
|
|
485
485
|
}
|
|
486
486
|
logMissingColumnWarning(columnId) {
|
|
487
487
|
if (this.getColumnOptions().showMissingColumnsWarning === true) {
|
|
@@ -138,6 +138,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
138
138
|
refreshRowNode(rowNode: IRowNode): void;
|
|
139
139
|
refreshRowNodes(rowNodes?: IRowNode[]): void;
|
|
140
140
|
refreshGroupRowNodes(): void;
|
|
141
|
+
refreshGridHeader(): void;
|
|
141
142
|
isCellEditable(gridCell: GridCell): boolean;
|
|
142
143
|
isCellEdited(gridCell: GridCell): boolean;
|
|
143
144
|
isEveryCellEditable(gridCells: GridCell[]): boolean;
|
|
@@ -152,6 +153,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
152
153
|
openGridInfoSettingsPanel(): void;
|
|
153
154
|
getAgGridRowModelType(): RowModelType;
|
|
154
155
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
156
|
+
closeTransposedView(): void;
|
|
155
157
|
getAllAgGridColumns(): Column<any>[];
|
|
156
158
|
updateAgGridColumnState(columnState: ColumnState): void;
|
|
157
159
|
updateAgGridColumnStates(columnStates: ColumnState[]): void;
|
|
@@ -102,15 +102,15 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
102
102
|
async manageGridData(dataRowConfig, dataUpdateConfig) {
|
|
103
103
|
const transactionResult = await this._adaptable.manageGridRows(dataRowConfig, dataUpdateConfig);
|
|
104
104
|
if (Array.isArray(transactionResult.removedRows) && transactionResult.removedRows.length) {
|
|
105
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.
|
|
105
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.deleteRows, transactionResult.removedRows, 'Delete');
|
|
106
106
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
107
107
|
}
|
|
108
108
|
if (Array.isArray(transactionResult.updatedRows) && transactionResult.updatedRows.length) {
|
|
109
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.
|
|
109
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.updateRows, transactionResult.updatedRows, 'Update');
|
|
110
110
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
111
111
|
}
|
|
112
112
|
if (Array.isArray(transactionResult.addedRows) && transactionResult.addedRows.length) {
|
|
113
|
-
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.
|
|
113
|
+
const rowDataChangedInfo = this.getAdaptableInternalApi().buildRowDataChangedInfo(dataRowConfig.addRows, transactionResult.addedRows, 'Add');
|
|
114
114
|
this.getAdaptableInternalApi().getDataService().CreateRowDataChangedEvent(rowDataChangedInfo);
|
|
115
115
|
}
|
|
116
116
|
return transactionResult;
|
|
@@ -551,6 +551,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
551
551
|
this.getAgGridApi().refreshClientSideRowModel('group');
|
|
552
552
|
this._adaptable.updateRowGroupsAndColumnGroupsExpandedState();
|
|
553
553
|
}
|
|
554
|
+
refreshGridHeader() {
|
|
555
|
+
this._adaptable.refreshGridHeader();
|
|
556
|
+
}
|
|
554
557
|
isCellEditable(gridCell) {
|
|
555
558
|
// If not Grid Cell or Column then return false - GridCell.column may be undefined for cells from synthetic columns created by AG Grid (ex. autoGroup columns)
|
|
556
559
|
if (!gridCell || !gridCell.column || !gridCell.rowNode) {
|
|
@@ -611,7 +614,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
611
614
|
showTransposedView(transposeConfig = {}) {
|
|
612
615
|
const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
|
|
613
616
|
const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
|
|
614
|
-
const autosize = transposeConfig.autosize ?? true;
|
|
615
617
|
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
616
618
|
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
617
619
|
this.getAdaptableInternalApi().showPopupWindow({
|
|
@@ -622,12 +624,14 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
622
624
|
popupProps: {
|
|
623
625
|
transposedColumnId,
|
|
624
626
|
hideTransposedColumn,
|
|
625
|
-
autosize,
|
|
626
627
|
columnsToTranspose,
|
|
627
628
|
rowsToTranspose,
|
|
628
629
|
},
|
|
629
630
|
});
|
|
630
631
|
}
|
|
632
|
+
closeTransposedView() {
|
|
633
|
+
this.getUserInterfaceApi().closeCustomWindowPopup('WINDOW_SHOW_TRANSPOSED_VIEW');
|
|
634
|
+
}
|
|
631
635
|
getAllAgGridColumns() {
|
|
632
636
|
return this._adaptable.getAllGridColumns();
|
|
633
637
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isPivotLayout = exports.pivotLayoutModelToPivotLayout = exports.tableLayoutModelToTableLayout = exports.pivotLayoutToPivotLayoutModel = exports.tableLayoutToTableLayoutModel = exports.checkForDuplicateColumns = exports.toRowGroupValuesForLayoutModel = exports.toRowGroupValuesForLayoutState = exports.getLayoutRowGroupValuesExceptionGroupKeys = exports.normalizePivotLayout = exports.normalizeTableLayout = exports.normalizeLayout = exports.areLayoutsEqual = exports.layoutModelToLayoutState = exports.layoutStateToLayoutModel = void 0;
|
|
4
4
|
exports.columnWidthsToColumnSizing = columnWidthsToColumnSizing;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const isEqual_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
|
|
7
7
|
const isPivotLayoutModel_1 = require("../../layout-manager/src/isPivotLayoutModel");
|
|
8
8
|
const normalizeLayoutModel_1 = require("../../layout-manager/src/normalizeLayoutModel");
|
|
9
9
|
const simplifyLayoutModel_1 = require("../../layout-manager/src/simplifyLayoutModel");
|
|
@@ -47,5 +47,18 @@ class RowFormApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
},
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
50
|
+
displayDeleteRowForm(primaryKey) {
|
|
51
|
+
const rowNode = this.getGridApi().getRowNodeForPrimaryKey(primaryKey);
|
|
52
|
+
if (!rowNode) {
|
|
53
|
+
this.logWarn(`Can NOT delete row: rowNode not found for primaryKey ${primaryKey}`);
|
|
54
|
+
}
|
|
55
|
+
const eventInfo = {
|
|
56
|
+
type: 'rowDeleted',
|
|
57
|
+
rowNode: rowNode,
|
|
58
|
+
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
59
|
+
};
|
|
60
|
+
this.getEventApi().internalApi.fireRowFormSubmittedEvent(eventInfo);
|
|
61
|
+
this.getRowFormOptions().onRowFormSubmit?.(eventInfo);
|
|
62
|
+
}
|
|
50
63
|
}
|
|
51
64
|
exports.RowFormApiImpl = RowFormApiImpl;
|
|
@@ -112,27 +112,10 @@ class ActionColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
112
112
|
break;
|
|
113
113
|
case 'delete':
|
|
114
114
|
button.onClick = (button, context) => {
|
|
115
|
-
|
|
116
|
-
type: 'rowDeleted',
|
|
117
|
-
rowNode: context.rowNode,
|
|
118
|
-
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
119
|
-
};
|
|
120
|
-
this.getEventApi().internalApi.fireRowFormSubmittedEvent(eventInfo);
|
|
121
|
-
this.getRowFormOptions().onRowFormSubmit?.(eventInfo);
|
|
115
|
+
this.getRowFormApi().displayDeleteRowForm(context.primaryKeyValue);
|
|
122
116
|
};
|
|
123
117
|
button.tooltip = button.tooltip ? button.tooltip : 'Delete Row';
|
|
124
|
-
button.icon = button.icon ?? {
|
|
125
|
-
name: 'delete',
|
|
126
|
-
};
|
|
127
|
-
break;
|
|
128
|
-
case 'edit':
|
|
129
|
-
button.onClick = (button, context) => {
|
|
130
|
-
this.getRowFormApi().displayEditRowForm(context.primaryKeyValue);
|
|
131
|
-
};
|
|
132
|
-
button.tooltip = button.tooltip ? button.tooltip : 'Edit Row';
|
|
133
|
-
button.icon = button.icon ?? {
|
|
134
|
-
name: 'edit',
|
|
135
|
-
};
|
|
118
|
+
button.icon = button.icon ?? { name: 'delete' };
|
|
136
119
|
break;
|
|
137
120
|
}
|
|
138
121
|
}
|
|
@@ -32,6 +32,6 @@ export declare class ColumnInternalApi extends ApiBase {
|
|
|
32
32
|
private buildColumnHeaderContext;
|
|
33
33
|
hasArrayDataType(column: AdaptableColumn): boolean;
|
|
34
34
|
getQueryableColumnsForUIEditor(): AdaptableColumn[];
|
|
35
|
-
|
|
35
|
+
isColumnUIHidden(columnIdentifier: string | ColDef): boolean;
|
|
36
36
|
getColumnDateTypes(): AdaptableColumnDataType[];
|
|
37
37
|
}
|
|
@@ -5,7 +5,7 @@ exports.getAutoRowGroupColumnIdFor = getAutoRowGroupColumnIdFor;
|
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
7
7
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
|
-
const uniq_1 = tslib_1.__importDefault(require("
|
|
8
|
+
const uniq_1 = tslib_1.__importDefault(require("../../Utilities/utils/uniq"));
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
10
10
|
const ColumnApiImpl_1 = require("../Implementation/ColumnApiImpl");
|
|
11
11
|
const destructurePivotColumnId_1 = require("../../layout-manager/src/destructurePivotColumnId");
|
|
@@ -282,9 +282,11 @@ class ColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
282
282
|
getQueryableColumnsForUIEditor() {
|
|
283
283
|
return this.getColumnApi()
|
|
284
284
|
.getQueryableColumns()
|
|
285
|
-
.filter((column) => !column.isGeneratedPivotResultColumn &&
|
|
285
|
+
.filter((column) => !column.isGeneratedPivotResultColumn &&
|
|
286
|
+
!column.isGeneratedRowGroupColumn &&
|
|
287
|
+
!column.isGeneratedSelectionColumn);
|
|
286
288
|
}
|
|
287
|
-
|
|
289
|
+
isColumnUIHidden(columnIdentifier) {
|
|
288
290
|
return this.getColumnApi().hasColumnType(columnIdentifier, AdaptableColumn_1.HIDDEN_COLUMN_TYPE);
|
|
289
291
|
}
|
|
290
292
|
getColumnDateTypes() {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EventInternalApi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
6
|
-
const isEqual_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
|
|
7
7
|
class EventInternalApi extends ApiBase_1.ApiBase {
|
|
8
8
|
fireGridSortedEvent() {
|
|
9
9
|
if (this.isAdapTableReady()) {
|
|
@@ -45,7 +45,7 @@ class ExportInternalApi extends ApiBase_1.ApiBase {
|
|
|
45
45
|
}
|
|
46
46
|
break;
|
|
47
47
|
case 'VisibleColumns':
|
|
48
|
-
// hope that
|
|
48
|
+
// hope that visible column property is updated whenever the layout changes... (need to check!)
|
|
49
49
|
if (!cellDataChangedInfo.column.visible) {
|
|
50
50
|
return false;
|
|
51
51
|
}
|
package/src/Api/RowFormApi.d.ts
CHANGED
|
@@ -16,4 +16,9 @@ export interface RowFormApi {
|
|
|
16
16
|
* @param primaryKey - Primary Key of the duplicated row
|
|
17
17
|
*/
|
|
18
18
|
displayCloneRowForm(primaryKey?: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* Deletes row from grid (with event fired) - note: no visible Row Form is displayed
|
|
21
|
+
* @param primaryKey - Primary Key of the deleted row
|
|
22
|
+
*/
|
|
23
|
+
displayDeleteRowForm(primaryKey?: any): void;
|
|
19
24
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createEngine = createEngine;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const debounce_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
|
|
6
6
|
const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
|
|
7
7
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
8
8
|
const buildAdaptableStateFunctionConfig_1 = require("./buildAdaptableStateFunctionConfig");
|
|
@@ -6,11 +6,10 @@ exports.ProcessKeepUserDefinedRevision = ProcessKeepUserDefinedRevision;
|
|
|
6
6
|
exports.MergeStateFunction = MergeStateFunction;
|
|
7
7
|
exports.MergeState = MergeState;
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
|
-
const mergeWith_1 = tslib_1.__importDefault(require("
|
|
10
|
-
const merge_1 = tslib_1.__importDefault(require("
|
|
11
|
-
const isArray_1 = tslib_1.__importDefault(require("
|
|
12
|
-
const
|
|
13
|
-
const isObject_1 = tslib_1.__importDefault(require("lodash/isObject"));
|
|
9
|
+
const mergeWith_1 = tslib_1.__importDefault(require("../../Utilities/utils/mergeWith"));
|
|
10
|
+
const merge_1 = tslib_1.__importDefault(require("../../Utilities/utils/merge"));
|
|
11
|
+
const isArray_1 = tslib_1.__importDefault(require("../../Utilities/utils/isArray"));
|
|
12
|
+
const isObject_1 = tslib_1.__importDefault(require("../../Utilities/utils/isObject"));
|
|
14
13
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
15
14
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
16
15
|
function customizer(objValue, srcValue) {
|
|
@@ -120,7 +119,7 @@ function MergeStateFunction(oldState, newState) {
|
|
|
120
119
|
}
|
|
121
120
|
// main merge function
|
|
122
121
|
function MergeState(oldState, newState) {
|
|
123
|
-
const result =
|
|
122
|
+
const result = Object.assign({}, oldState);
|
|
124
123
|
for (const key in newState) {
|
|
125
124
|
if (!newState.hasOwnProperty(key)) {
|
|
126
125
|
continue;
|
|
@@ -18,6 +18,7 @@ export type WeightedAverageConfig = {
|
|
|
18
18
|
export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
|
|
19
19
|
cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmaryInfo>;
|
|
20
20
|
constructor(api: AdaptableApi);
|
|
21
|
+
isModuleAvailable(): boolean;
|
|
21
22
|
getViewAccessLevel(): AccessLevel;
|
|
22
23
|
createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemShowPopup<"separator" | "calculated-column-edit" | "cell-summary-show" | "chart-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">[];
|
|
23
24
|
createContextMenuItems(menuContext: ContextMenuContext): import("../Utilities/MenuItem").MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-all-data" | "export-all-data-excel-download" | "export-all-data-visualexcel-download" | "export-all-data-csv" | "export-all-data-csv-download" | "export-all-data-csv-clipboard" | "export-all-data-json" | "export-all-data-json-download" | "export-all-data-json-clipboard" | "export-current-layout" | "export-current-layout-excel-download" | "export-current-layout-visualexcel-download" | "export-current-layout-csv" | "export-current-layout-csv-download" | "export-current-layout-csv-clipboard" | "export-current-layout-json" | "export-current-layout-json-download" | "export-current-layout-json-clipboard" | "export-selected-data" | "export-selected-data-excel-download" | "export-selected-data-visualexcel-download" | "export-selected-data-csv" | "export-selected-data-csv-download" | "export-selected-data-csv-clipboard" | "export-selected-data-json" | "export-selected-data-json-download" | "export-selected-data-json-clipboard" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
|
|
@@ -16,6 +16,9 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
16
16
|
constructor(api) {
|
|
17
17
|
super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of numeric cells using multiple summary operations', api);
|
|
18
18
|
}
|
|
19
|
+
isModuleAvailable() {
|
|
20
|
+
return super.isModuleAvailable() && this.api.gridApi.isGridRangeSelectable();
|
|
21
|
+
}
|
|
19
22
|
getViewAccessLevel() {
|
|
20
23
|
return 'Full';
|
|
21
24
|
}
|
|
@@ -13,7 +13,7 @@ const MoveFormatColumn_1 = require("../View/FormatColumn/MoveFormatColumn");
|
|
|
13
13
|
const getObjectTagsViewItems_1 = require("../Utilities/getObjectTagsViewItems");
|
|
14
14
|
const getRuleViewItems_1 = require("../Utilities/getRuleViewItems");
|
|
15
15
|
const getScopeViewItems_1 = require("../Utilities/getScopeViewItems");
|
|
16
|
-
const
|
|
16
|
+
const getFormatColumnRowTargetItems_1 = require("./Utilities/FormatColumn/getFormatColumnRowTargetItems");
|
|
17
17
|
const FormatColumnStyleWizardSection_1 = require("../View/FormatColumn/Wizard/FormatColumnStyleWizardSection");
|
|
18
18
|
class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
19
19
|
constructor(api) {
|
|
@@ -91,7 +91,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
91
91
|
values: [formatColumn.Name],
|
|
92
92
|
},
|
|
93
93
|
(0, getScopeViewItems_1.getScopeViewItems)(formatColumn.Scope, this.api),
|
|
94
|
-
(0,
|
|
94
|
+
(0, getFormatColumnRowTargetItems_1.getFormatColumnRowTargetItems)(formatColumn),
|
|
95
95
|
formatColumn.Rule && (0, getRuleViewItems_1.getRuleViewItems)(formatColumn.Rule, this.api),
|
|
96
96
|
{
|
|
97
97
|
name: 'Style',
|
|
@@ -15,7 +15,7 @@ const getLayoutFilterViewItems_1 = require("./Utilities/Layout/getLayoutFilterVi
|
|
|
15
15
|
const getLayoutSortViewItems_1 = require("./Utilities/Layout/getLayoutSortViewItems");
|
|
16
16
|
const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
|
|
17
17
|
const windowFactory_1 = require("../View/Components/Popups/WindowPopups/windowFactory");
|
|
18
|
-
const flattenDeep_1 = tslib_1.__importDefault(require("
|
|
18
|
+
const flattenDeep_1 = tslib_1.__importDefault(require("../Utilities/utils/flattenDeep"));
|
|
19
19
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
20
20
|
const getGridFilterPreview_1 = require("../View/Layout/Wizard/getGridFilterPreview");
|
|
21
21
|
const RowSummaryService_1 = require("../Utilities/Services/RowSummaryService");
|
|
@@ -147,24 +147,26 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
147
147
|
this.api.columnApi.hideColumn(column.columnId);
|
|
148
148
|
}));
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this.
|
|
150
|
+
if (this.api.gridApi.isGridRangeSelectable()) {
|
|
151
|
+
const hasExistingSelection = this.api.gridApi.getSelectedCellInfo()?.gridCells?.length;
|
|
152
|
+
if (hasExistingSelection) {
|
|
153
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-preserve', 'Select Column (Preserve Selection)', 'select-fwd', () => {
|
|
154
|
+
this.api.columnApi.addColumnToSelection(column.columnId);
|
|
155
|
+
}));
|
|
156
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select-reset', 'Select Column (Reset Selection)', 'tab-unselected', () => {
|
|
157
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-column-select', 'Select Column', 'tab-unselected', () => {
|
|
162
|
+
this.api.columnApi.selectColumn(column.columnId);
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-grid-select', 'Select Grid', 'select-all', () => {
|
|
166
|
+
this.api.gridApi.selectAll();
|
|
162
167
|
}));
|
|
163
168
|
}
|
|
164
169
|
}
|
|
165
|
-
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-grid-select', 'Select Grid', 'select-all', () => {
|
|
166
|
-
this.api.gridApi.selectAll();
|
|
167
|
-
}));
|
|
168
170
|
return returnColumnMenuItems;
|
|
169
171
|
}
|
|
170
172
|
createContextMenuItems(menuContext) {
|
|
@@ -183,9 +185,11 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
183
185
|
this.api.gridApi.deselectAll();
|
|
184
186
|
}));
|
|
185
187
|
}
|
|
186
|
-
|
|
187
|
-
this.
|
|
188
|
-
|
|
188
|
+
if (this.api.gridApi.isGridRangeSelectable()) {
|
|
189
|
+
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-select-all', 'Select Grid', 'select-all', () => {
|
|
190
|
+
this.api.gridApi.selectAll();
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
189
193
|
returnColumnMenuItems.push(this.createMenuItemClickFunction('layout-auto-size', 'Auto Size', 'arrow-expand', () => {
|
|
190
194
|
this.api.columnApi.autosizeAllColumns();
|
|
191
195
|
}));
|
|
@@ -12,6 +12,7 @@ export declare class PlusMinusModule extends AdaptableModuleBase implements IPlu
|
|
|
12
12
|
private shouldHandleKeyDown;
|
|
13
13
|
private adaptable;
|
|
14
14
|
constructor(api: AdaptableApi);
|
|
15
|
+
isModuleAvailable(): boolean;
|
|
15
16
|
getModuleAdaptableObjects(config?: LayoutExtendedConfig): AdaptableObject[];
|
|
16
17
|
getExplicitlyReferencedColumnIds(plusMinusNudge: PlusMinusNudge): string[];
|
|
17
18
|
getReferencedNamedQueryNames(plusMinusNudge: PlusMinusNudge): string[];
|
|
@@ -22,6 +22,9 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
22
22
|
this.shouldHandleKeyDown = false;
|
|
23
23
|
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
24
24
|
}
|
|
25
|
+
isModuleAvailable() {
|
|
26
|
+
return super.isModuleAvailable() && this.api.gridApi.isGridRangeSelectable();
|
|
27
|
+
}
|
|
25
28
|
getModuleAdaptableObjects(config) {
|
|
26
29
|
return this.api.plusMinusApi.getAllPlusMinus(config);
|
|
27
30
|
}
|
|
@@ -40,11 +43,14 @@ class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
40
43
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(plusMinusNudge.Rule?.BooleanExpression);
|
|
41
44
|
}
|
|
42
45
|
onAdaptableReady() {
|
|
43
|
-
|
|
44
|
-
this.shouldHandleKeyDown =
|
|
46
|
+
const hasPlusMinusNudges = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.api.plusMinusApi.getAllPlusMinus());
|
|
47
|
+
this.shouldHandleKeyDown = this.isModuleAvailable() && hasPlusMinusNudges;
|
|
45
48
|
if (this.shouldHandleKeyDown) {
|
|
46
49
|
this.setupKeyDownListener();
|
|
47
50
|
}
|
|
51
|
+
else if (hasPlusMinusNudges && !this.api.gridApi.isGridRangeSelectable()) {
|
|
52
|
+
this.api.consoleWarn('Plus/Minus module is not available because AG Grid is not selectable');
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
setupKeyDownListener() {
|
|
50
56
|
this.adaptable._on('KeyDown', (keyDownEvent) => {
|
|
@@ -191,14 +191,22 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
if (styledColumn.BadgeStyle) {
|
|
194
|
+
let rowTypes = [];
|
|
195
|
+
if (!styledColumn.BadgeStyle?.RowScope?.ExcludeDataRows) {
|
|
196
|
+
rowTypes.push('Data');
|
|
197
|
+
}
|
|
198
|
+
if (!styledColumn.BadgeStyle?.RowScope?.ExcludeGroupRows) {
|
|
199
|
+
rowTypes.push('Group');
|
|
200
|
+
}
|
|
201
|
+
if (!styledColumn.BadgeStyle?.RowScope?.ExcludeSummaryRows) {
|
|
202
|
+
rowTypes.push('Summary');
|
|
203
|
+
}
|
|
204
|
+
if (!styledColumn.BadgeStyle?.RowScope?.ExcludeTotalRows) {
|
|
205
|
+
rowTypes.push('Total');
|
|
206
|
+
}
|
|
194
207
|
specificTypeItems.push({
|
|
195
208
|
name: 'Rows',
|
|
196
|
-
values:
|
|
197
|
-
`Data Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeDataRows ? 'No' : 'Yes'}`,
|
|
198
|
-
`Group Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeGroupRows ? 'No' : 'Yes'}`,
|
|
199
|
-
`Summary Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeSummaryRows ? 'No' : 'Yes'}`,
|
|
200
|
-
`Total Rows: ${styledColumn.BadgeStyle?.RowScope?.ExcludeTotalRows ? 'No' : 'Yes'}`,
|
|
201
|
-
],
|
|
209
|
+
values: rowTypes
|
|
202
210
|
});
|
|
203
211
|
}
|
|
204
212
|
if (styledColumn.BadgeStyle) {
|
|
@@ -6,13 +6,13 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const TeamSharingRedux_1 = require("../Redux/ActionsReducers/TeamSharingRedux");
|
|
8
8
|
const TeamSharingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/TeamSharingRedux"));
|
|
9
|
-
const isEqual_1 = tslib_1.__importDefault(require("
|
|
9
|
+
const isEqual_1 = tslib_1.__importDefault(require("../Utilities/utils/isEqual"));
|
|
10
10
|
const LayoutRedux_1 = require("../Redux/ActionsReducers/LayoutRedux");
|
|
11
11
|
const SharedEntityObjectView_1 = require("../View/TeamSharing/SharedEntityObjectView");
|
|
12
12
|
const TeamSharingApplyButton_1 = require("../View/TeamSharing/TeamSharingApplyButton");
|
|
13
13
|
const SharedEntityDependencies_1 = require("../View/TeamSharing/SharedEntityDependencies");
|
|
14
14
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
15
|
-
const flatten_1 = tslib_1.__importDefault(require("
|
|
15
|
+
const flatten_1 = tslib_1.__importDefault(require("../Utilities/utils/flatten"));
|
|
16
16
|
const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
|
|
17
17
|
class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
18
18
|
SKIP_TEAMSHARING_UPDATE_ACTIONS = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatColumn } from '../../../AdaptableState/FormatColumnState';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const getFormatColumnRowTargetItems: (formatColumn: FormatColumn) => {
|
|
3
3
|
name: string;
|
|
4
4
|
values: string[];
|
|
5
5
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFormatColumnRowTargetItems = void 0;
|
|
4
|
+
const getFormatColumnRowTargetItems = (formatColumn) => {
|
|
5
|
+
let values = [];
|
|
6
|
+
if (formatColumn.RowScope) {
|
|
7
|
+
if (!formatColumn.RowScope.ExcludeDataRows) {
|
|
8
|
+
values.push('Data');
|
|
9
|
+
}
|
|
10
|
+
if (!formatColumn.RowScope.ExcludeGroupRows) {
|
|
11
|
+
values.push('Group');
|
|
12
|
+
}
|
|
13
|
+
if (!formatColumn.RowScope.ExcludeSummaryRows) {
|
|
14
|
+
values.push('Summary');
|
|
15
|
+
}
|
|
16
|
+
if (!formatColumn.RowScope.ExcludeTotalRows) {
|
|
17
|
+
values.push('Total');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
values = values.filter(Boolean);
|
|
21
|
+
return {
|
|
22
|
+
name: 'Rows',
|
|
23
|
+
values: values.length > 0 ? values : ['-'],
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.getFormatColumnRowTargetItems = getFormatColumnRowTargetItems;
|
|
@@ -3,19 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFormatColumnSettingsViewItems = void 0;
|
|
4
4
|
const getFormatColumnSettingsViewItems = (formatColumn) => {
|
|
5
5
|
let values = [];
|
|
6
|
-
if (formatColumn.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
values.push('Exclude Group Rows');
|
|
12
|
-
}
|
|
13
|
-
if (formatColumn.RowScope.ExcludeSummaryRows) {
|
|
14
|
-
values.push('Exclude Summary Rows');
|
|
15
|
-
}
|
|
16
|
-
if (formatColumn.RowScope.ExcludeTotalRows) {
|
|
17
|
-
values.push('Exclude Total Rows');
|
|
18
|
-
}
|
|
6
|
+
if (!formatColumn.Target || formatColumn.Target === 'cell') {
|
|
7
|
+
values.push('Target: Column Cells');
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
values.push('Target: Column Header');
|
|
19
11
|
}
|
|
20
12
|
if (formatColumn.ColumnGroupScope) {
|
|
21
13
|
values.push(`Column Groups: ${formatColumn.ColumnGroupScope === 'Both' ? 'Always' : formatColumn.ColumnGroupScope}`);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.aggregatedBooleanExpressionFunctionNames = exports.aggregatedBooleanExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const parseInt_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const parseInt_1 = tslib_1.__importDefault(require("../utils/parseInt"));
|
|
6
6
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
7
7
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
8
8
|
const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
|
|
@@ -454,7 +454,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
454
454
|
handler(args, context) {
|
|
455
455
|
const distinctColumnParameter = (0, expressionFunctionUtils_1.extractColumnParameter)('ONLY', args);
|
|
456
456
|
const onlyColumnName = distinctColumnParameter.value;
|
|
457
|
-
const columnType = (0, expressionFunctionUtils_1.validateColumnType)(onlyColumnName, ['number'], 'ONLY', context.adaptableApi);
|
|
457
|
+
const columnType = (0, expressionFunctionUtils_1.validateColumnType)(onlyColumnName, ['number', 'text'], 'ONLY', context.adaptableApi);
|
|
458
458
|
const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)('ONLY', 'operand', ['GROUP_BY'], args, {
|
|
459
459
|
isOptional: true,
|
|
460
460
|
});
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
6
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
7
7
|
const operators_1 = require("rxjs/operators");
|
|
8
|
-
const toNumber_1 = tslib_1.__importDefault(require("
|
|
8
|
+
const toNumber_1 = tslib_1.__importDefault(require("../utils/toNumber"));
|
|
9
9
|
const evaluator_1 = require("../../parser/src/evaluator");
|
|
10
10
|
// string functions may be case (in)sensitive, see internalApi.isTextComparisonCaseSensitive()
|
|
11
11
|
// if case is insensitive, we convert ALL involved strings to lower case
|
|
@@ -4,7 +4,7 @@ exports.observableExpressionFunctionNames = exports.observableExpressionFunction
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const rxjs_1 = require("rxjs");
|
|
6
6
|
const operators_1 = require("rxjs/operators");
|
|
7
|
-
const parseInt_1 = tslib_1.__importDefault(require("
|
|
7
|
+
const parseInt_1 = tslib_1.__importDefault(require("../utils/parseInt"));
|
|
8
8
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
9
9
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
10
10
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|