@adaptabletools/adaptable-cjs 22.0.0-canary.8 → 22.0.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/agGrid.d.ts +9 -9
- package/agGrid.js +1 -0
- package/index.css +1157 -1319
- package/index.css.map +1 -1
- package/index.d.ts +66 -0
- package/index.js +85 -0
- package/package.json +3 -6
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +13 -13
- 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 +4 -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 +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +6 -5
- package/src/Api/Implementation/LayoutHelpers.js +1 -1
- 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/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +1 -1
- 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 +15 -0
- package/src/Utilities/only.js +58 -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.js +1 -1
- 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.js +25 -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/src/types.d.ts +2 -2
- 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
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAggFuncName = exports.isWeightedAverageAggregation = exports.isWeightedAverageAggFuncName = exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
|
|
3
|
+
exports.getAggFuncName = exports.isWeightedAverageAggregation = exports.isWeightedAverageAggFuncName = exports.ONLY_AGG_FN_NAME = exports.WEIGHTED_AVERAGE_AGG_FN_NAME = void 0;
|
|
4
4
|
exports.WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
5
|
+
exports.ONLY_AGG_FN_NAME = 'only';
|
|
5
6
|
const isWeightedAverageAggFuncName = (aggFunc) => {
|
|
6
7
|
return aggFunc === exports.WEIGHTED_AVERAGE_AGG_FN_NAME;
|
|
7
8
|
};
|
|
@@ -19,10 +19,20 @@ export interface DataUpdateConfig {
|
|
|
19
19
|
*/
|
|
20
20
|
addIndex?: number;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Config object using for passing in rows to manageGridData function
|
|
24
|
+
*/
|
|
22
25
|
export interface DataRowConfig {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Rows to add
|
|
28
|
+
*/
|
|
29
|
+
addRows?: any[];
|
|
30
|
+
/**
|
|
31
|
+
* Rows to update
|
|
32
|
+
*/
|
|
33
|
+
updateRows?: any[];
|
|
34
|
+
/**
|
|
35
|
+
* Rows to delete
|
|
36
|
+
*/
|
|
37
|
+
deleteRows?: any[];
|
|
28
38
|
}
|
|
@@ -5,7 +5,7 @@ import type { TypeHint } from './Types';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface TransposeConfig {
|
|
7
7
|
/**
|
|
8
|
-
* Column to use to do
|
|
8
|
+
* Column to use to do Transposition
|
|
9
9
|
* @defaultValue Primary Key Column
|
|
10
10
|
*/
|
|
11
11
|
transposedColumnId?: string;
|
|
@@ -15,17 +15,12 @@ export interface TransposeConfig {
|
|
|
15
15
|
*/
|
|
16
16
|
hideTransposedColumn?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @defaultValue
|
|
20
|
-
*/
|
|
21
|
-
autosize?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* ColumnIds of Columns to Transpose
|
|
24
|
-
* @defaultValue all Columns in Grid
|
|
18
|
+
* Ids of Columns to Transpose
|
|
19
|
+
* @defaultValue all Grid Columns
|
|
25
20
|
*/
|
|
26
21
|
columnsToTranspose?: string[] | ((context: AdaptableColumnsContext) => string[]);
|
|
27
22
|
/**
|
|
28
|
-
* Rows to Transpose: All,
|
|
23
|
+
* Rows to Transpose: All, Visible or via Expression
|
|
29
24
|
* @defaultValue All
|
|
30
25
|
*/
|
|
31
26
|
rowsToTranspose?: TypeHint<string, 'VisibleOnly' | 'All'>;
|
|
@@ -203,7 +203,7 @@ export interface PredefinedConfig {
|
|
|
203
203
|
*/
|
|
204
204
|
ToolPanel?: ToolPanelState;
|
|
205
205
|
/**
|
|
206
|
-
* Controls
|
|
206
|
+
* Controls AdapTable UI including visibility of AdapTable components
|
|
207
207
|
*/
|
|
208
208
|
UserInterface?: UserInterfaceState;
|
|
209
209
|
}
|
|
@@ -6,7 +6,7 @@ import { BaseState } from './BaseState';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface UserInterfaceState extends BaseState {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Hides all AdapTable UI elements (i.e. Dashboard, Tool Panel, Status Bar, Column & Context Menus etc.)
|
|
10
10
|
*
|
|
11
11
|
* @defaultValue false
|
|
12
12
|
*/
|
package/src/Api/ColumnApi.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export interface ColumnApi {
|
|
|
92
92
|
/**
|
|
93
93
|
* Returns Columns that are always hidden in UI (but available for Expressions)
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
getUIHiddenColumns(): AdaptableColumn[];
|
|
96
96
|
/**
|
|
97
97
|
* Returns all Exportable Columns
|
|
98
98
|
*/
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -596,6 +596,10 @@ export interface GridApi {
|
|
|
596
596
|
* Opens a window with a transposed view of Grid
|
|
597
597
|
*/
|
|
598
598
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
599
|
+
/**
|
|
600
|
+
* Closes the transposed view of the Grid (if open)
|
|
601
|
+
*/
|
|
602
|
+
closeTransposedView(): void;
|
|
599
603
|
/**
|
|
600
604
|
* Return all AG Grid columns
|
|
601
605
|
*/
|
|
@@ -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,12 +78,12 @@ 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;
|
|
85
85
|
openColumnInfoSettingsPanel(): void;
|
|
86
|
-
getColumnTypes(): import("../../AdaptableState/Common/Types").TypeHint<string, import("../../types").
|
|
86
|
+
getColumnTypes(): import("../../AdaptableState/Common/Types").TypeHint<string, import("../../types").AdaptableColumnTypeName>[];
|
|
87
87
|
getColumnsByColumnType(columnType: string): AdaptableColumn[];
|
|
88
88
|
getRowGroupedColumns(): AdaptableColumn[];
|
|
89
89
|
setColumnCaption(columnId: string, caption: string): void;
|
|
@@ -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) {
|
|
@@ -152,6 +152,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
152
152
|
openGridInfoSettingsPanel(): void;
|
|
153
153
|
getAgGridRowModelType(): RowModelType;
|
|
154
154
|
showTransposedView(transposeConfig?: TransposeConfig): void;
|
|
155
|
+
closeTransposedView(): void;
|
|
155
156
|
getAllAgGridColumns(): Column<any>[];
|
|
156
157
|
updateAgGridColumnState(columnState: ColumnState): void;
|
|
157
158
|
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;
|
|
@@ -611,7 +611,6 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
611
611
|
showTransposedView(transposeConfig = {}) {
|
|
612
612
|
const transposedColumnId = transposeConfig.transposedColumnId ?? this.getOptionsApi().getPrimaryKey();
|
|
613
613
|
const hideTransposedColumn = transposeConfig.hideTransposedColumn ?? true;
|
|
614
|
-
const autosize = transposeConfig.autosize ?? true;
|
|
615
614
|
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
616
615
|
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
617
616
|
this.getAdaptableInternalApi().showPopupWindow({
|
|
@@ -622,12 +621,14 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
622
621
|
popupProps: {
|
|
623
622
|
transposedColumnId,
|
|
624
623
|
hideTransposedColumn,
|
|
625
|
-
autosize,
|
|
626
624
|
columnsToTranspose,
|
|
627
625
|
rowsToTranspose,
|
|
628
626
|
},
|
|
629
627
|
});
|
|
630
628
|
}
|
|
629
|
+
closeTransposedView() {
|
|
630
|
+
this.getUserInterfaceApi().closeCustomWindowPopup('WINDOW_SHOW_TRANSPOSED_VIEW');
|
|
631
|
+
}
|
|
631
632
|
getAllAgGridColumns() {
|
|
632
633
|
return this._adaptable.getAllGridColumns();
|
|
633
634
|
}
|
|
@@ -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");
|
|
@@ -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()) {
|
|
@@ -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;
|
|
@@ -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");
|
|
@@ -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");
|
|
@@ -22,7 +22,7 @@ exports.IsNumeric = IsNumeric;
|
|
|
22
22
|
exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
|
|
23
23
|
exports.ReplaceAllOccurencesExceptLastOne = ReplaceAllOccurencesExceptLastOne;
|
|
24
24
|
const tslib_1 = require("tslib");
|
|
25
|
-
const startCase_1 = tslib_1.__importDefault(require("
|
|
25
|
+
const startCase_1 = tslib_1.__importDefault(require("../utils/startCase"));
|
|
26
26
|
function IsNull(stringToCheck) {
|
|
27
27
|
return stringToCheck == null || stringToCheck == undefined;
|
|
28
28
|
}
|
|
@@ -9,8 +9,8 @@ exports.removeAdaptableObjectPrimitivesInline = removeAdaptableObjectPrimitivesI
|
|
|
9
9
|
exports.removeAdaptableObjectPrimitives = removeAdaptableObjectPrimitives;
|
|
10
10
|
exports.isAdaptableObject = isAdaptableObject;
|
|
11
11
|
const tslib_1 = require("tslib");
|
|
12
|
-
const cloneDeepWith_1 = tslib_1.__importDefault(require("
|
|
13
|
-
const isPlainObject_1 = tslib_1.__importDefault(require("
|
|
12
|
+
const cloneDeepWith_1 = tslib_1.__importDefault(require("../utils/cloneDeepWith"));
|
|
13
|
+
const isPlainObject_1 = tslib_1.__importDefault(require("../utils/isPlainObject"));
|
|
14
14
|
const Uuid_1 = require("../../AdaptableState/Uuid");
|
|
15
15
|
const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
|
|
16
16
|
const GET_CURRENT_VERSION = () => {
|
|
@@ -6,7 +6,7 @@ exports.StringFormatter = StringFormatter;
|
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
// TODO inspect why the following is erroring on angular build
|
|
8
8
|
const date_fns_1 = require("date-fns");
|
|
9
|
-
const
|
|
9
|
+
const sentenceCase_1 = tslib_1.__importDefault(require("../utils/sentenceCase"));
|
|
10
10
|
const GeneralConstants_1 = require("../Constants/GeneralConstants");
|
|
11
11
|
const Helper_1 = tslib_1.__importDefault(require("./Helper"));
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
@@ -175,7 +175,7 @@ function StringFormatter(input, options = {}, rowNode, column, api) {
|
|
|
175
175
|
s = s.toUpperCase();
|
|
176
176
|
}
|
|
177
177
|
else if (options.Case == 'Sentence') {
|
|
178
|
-
s = (0,
|
|
178
|
+
s = (0, sentenceCase_1.default)(s);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
if (options.Trim !== undefined && options.Trim == true) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { useAdaptableColumn } from './useAdaptableColumn';
|
|
2
2
|
import { useAdaptableOptions } from './useAdaptableOptions';
|
|
3
|
-
|
|
4
|
-
export { useAdaptableColumn, useAdaptableOptions, useAdaptableState };
|
|
3
|
+
export { useAdaptableColumn, useAdaptableOptions };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useAdaptableOptions = exports.useAdaptableColumn = void 0;
|
|
4
4
|
const useAdaptableColumn_1 = require("./useAdaptableColumn");
|
|
5
5
|
Object.defineProperty(exports, "useAdaptableColumn", { enumerable: true, get: function () { return useAdaptableColumn_1.useAdaptableColumn; } });
|
|
6
6
|
const useAdaptableOptions_1 = require("./useAdaptableOptions");
|
|
7
7
|
Object.defineProperty(exports, "useAdaptableOptions", { enumerable: true, get: function () { return useAdaptableOptions_1.useAdaptableOptions; } });
|
|
8
|
-
const useAdaptableState_1 = require("./useAdaptableState");
|
|
9
|
-
Object.defineProperty(exports, "useAdaptableState", { enumerable: true, get: function () { return useAdaptableState_1.useAdaptableState; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("../../utils/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
|