@adaptabletools/adaptable-cjs 20.0.0-canary.2 → 20.0.0-canary.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +1288 -898
- package/base.css.map +1 -1
- package/index.css +428 -898
- package/index.css.map +1 -1
- package/package.json +4 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
- package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
- package/src/AdaptableOptions/EditOptions.d.ts +14 -3
- package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
- package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
- package/src/Api/ExportApi.d.ts +1 -6
- package/src/Api/Fdc3Api.d.ts +5 -3
- package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
- package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
- package/src/Api/Implementation/ExportApiImpl.js +17 -10
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
- package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutHelpers.js +8 -27
- package/src/Api/Implementation/PredicateApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +3 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
- package/src/Api/Internal/AdaptableInternalApi.js +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +1 -2
- package/src/Api/Internal/EventInternalApi.js +6 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
- package/src/Api/Internal/ExportInternalApi.js +105 -136
- package/src/Api/Internal/RowFormInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +32 -48
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +6 -2
- package/src/PredefinedConfig/ExportState.d.ts +10 -17
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +17 -17
- package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +4 -3
- package/src/Redux/ActionsReducers/LayoutRedux.js +3 -3
- package/src/Redux/Store/AdaptableStore.js +2 -2
- package/src/Strategy/ColumnFilterModule.js +4 -4
- package/src/Strategy/StyledColumnModule.js +6 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +5 -6
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +9 -10
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +27 -27
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
- package/src/Utilities/Helpers/DateHelper.js +3 -5
- package/src/Utilities/Helpers/FormatHelper.js +19 -6
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
- package/src/Utilities/Services/Fdc3Service.js +7 -2
- package/src/Utilities/Services/ThemeService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.js +5 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
- package/src/View/ColumnInfo/ColumnInfo.js +0 -1
- package/src/View/Comments/CommentsEditor.js +5 -2
- package/src/View/Comments/CommentsPopup.js +5 -2
- package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +4 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -1
- package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +6 -2
- package/src/View/Components/ColumnFilter/utils.js +2 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +3 -3
- package/src/View/Dashboard/CustomToolbar.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +6 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
- package/src/View/Note/NotePopup.js +5 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +7 -5
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -8
- package/src/agGrid/AdaptableAgGrid.js +71 -117
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +5 -6
- package/src/agGrid/AgGridColumnAdapter.js +5 -10
- package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
- package/src/agGrid/AgGridExportAdapter.js +24 -25
- package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
- package/src/agGrid/AgGridThemeAdapter.js +126 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +2 -2
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
- package/src/components/Datepicker/index.d.ts +1 -0
- package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
- package/src/components/Select/Select.d.ts +1 -0
- package/src/components/Select/Select.js +30 -7
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +23 -15
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade20.d.ts +3 -0
- package/src/migration/VersionUpgrade20.js +141 -12
- package/src/types.d.ts +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -72,4 +72,4 @@ export type SystemFlashingCellPredicateIds = SystemFlashingCellPredicateId[];
|
|
|
72
72
|
/**
|
|
73
73
|
* List of System Predicates available for Flashing Cells
|
|
74
74
|
*/
|
|
75
|
-
export type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | '
|
|
75
|
+
export type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'In' | 'NotIn' | 'AnyChange';
|
|
@@ -51,7 +51,7 @@ export interface LayoutBase extends AdaptableObject {
|
|
|
51
51
|
*/
|
|
52
52
|
ColumnHeaders?: ColumnStringMap;
|
|
53
53
|
/**
|
|
54
|
-
* Whether to include aggFunc name in
|
|
54
|
+
* Whether to include aggFunc name in Column header: e.g. 'sum(Price)' becomes 'Price'
|
|
55
55
|
*/
|
|
56
56
|
SuppressAggFuncInHeader?: boolean;
|
|
57
57
|
/**
|
|
@@ -88,7 +88,7 @@ export interface TableLayout extends LayoutBase {
|
|
|
88
88
|
*/
|
|
89
89
|
RowSummaries?: RowSummary[];
|
|
90
90
|
/**
|
|
91
|
-
* Columns showing aggregated values in
|
|
91
|
+
* Columns showing aggregated values in Grouped Rows; a record of ColumnId and aggfunc (e.g. sum) or 'true' (to use default aggfunc)
|
|
92
92
|
*/
|
|
93
93
|
TableAggregationColumns?: TableAggregationColumns;
|
|
94
94
|
/**
|
|
@@ -100,19 +100,19 @@ export interface TableLayout extends LayoutBase {
|
|
|
100
100
|
*/
|
|
101
101
|
RowGroupDisplayType?: 'single' | 'multi';
|
|
102
102
|
/**
|
|
103
|
-
* Pivot Columns -
|
|
103
|
+
* Pivot Columns - must NOT be provided
|
|
104
104
|
*/
|
|
105
105
|
PivotColumns?: never;
|
|
106
106
|
/**
|
|
107
|
-
* Pivot Group Columns -
|
|
107
|
+
* Pivot Group Columns - must NOT be provided
|
|
108
108
|
*/
|
|
109
109
|
PivotGroupedColumns?: never;
|
|
110
110
|
/**
|
|
111
|
-
* Pivot Expansions -
|
|
111
|
+
* Pivot Expansions - must NOT be provided
|
|
112
112
|
*/
|
|
113
113
|
PivotExpandLevel?: never;
|
|
114
114
|
/**
|
|
115
|
-
* Pivot Aggregation Columns -
|
|
115
|
+
* Pivot Aggregation Columns - must NOT be provided
|
|
116
116
|
*/
|
|
117
117
|
PivotAggregationColumns?: never;
|
|
118
118
|
}
|
|
@@ -125,7 +125,7 @@ export interface PivotLayout extends LayoutBase {
|
|
|
125
125
|
*/
|
|
126
126
|
PivotColumns: string[];
|
|
127
127
|
/**
|
|
128
|
-
* How deep to expand
|
|
128
|
+
* How deep to expand Pivot Columns (0 for none, 1 for 1st level only etc, -1 to expand all)
|
|
129
129
|
*/
|
|
130
130
|
PivotExpandLevel?: number;
|
|
131
131
|
/**
|
|
@@ -137,31 +137,31 @@ export interface PivotLayout extends LayoutBase {
|
|
|
137
137
|
*/
|
|
138
138
|
PivotGroupedColumns?: string[];
|
|
139
139
|
/**
|
|
140
|
-
* Table Columns -
|
|
140
|
+
* Table Columns - must NOT be provided
|
|
141
141
|
*/
|
|
142
142
|
TableColumns?: never;
|
|
143
143
|
/**
|
|
144
|
-
* Table Aggregation Columns -
|
|
144
|
+
* Table Aggregation Columns - must NOT be provided
|
|
145
145
|
*/
|
|
146
146
|
TableAggregationColumns?: never;
|
|
147
147
|
/**
|
|
148
|
-
* Row Grouped Columns Columns -
|
|
148
|
+
* Row Grouped Columns Columns - must NOT be provided
|
|
149
149
|
*/
|
|
150
150
|
RowGroupedColumns?: never;
|
|
151
151
|
}
|
|
152
|
-
/**
|
|
153
|
-
* Object used for defining which Row Group Values are Expanded or Collapsed
|
|
154
|
-
*/
|
|
155
|
-
export type RowGroupValuesWithExceptionKeys = {
|
|
156
|
-
RowGroupDefaultBehavior: 'expanded' | 'collapsed';
|
|
157
|
-
ExceptionGroupKeys?: any[][];
|
|
158
|
-
};
|
|
159
152
|
/**
|
|
160
153
|
* Manages how (and which) Row Group values are stored
|
|
161
154
|
*/
|
|
162
155
|
export type RowGroupValues = {
|
|
163
156
|
RowGroupDefaultBehavior: 'always-expanded' | 'always-collapsed';
|
|
164
157
|
} | RowGroupValuesWithExceptionKeys;
|
|
158
|
+
/**
|
|
159
|
+
* Defines which Row Group Values are expanded or collapsed
|
|
160
|
+
*/
|
|
161
|
+
export type RowGroupValuesWithExceptionKeys = {
|
|
162
|
+
RowGroupDefaultBehavior: 'expanded' | 'collapsed';
|
|
163
|
+
ExceptionGroupKeys?: any[][];
|
|
164
|
+
};
|
|
165
165
|
/**
|
|
166
166
|
* Defines a map of Columns with a String value
|
|
167
167
|
*/
|
|
@@ -99,7 +99,8 @@ export interface LayoutColumnFilterEditAction extends LayoutColumnFilterAction {
|
|
|
99
99
|
}
|
|
100
100
|
export interface LayoutColumnFilterSetAction extends LayoutColumnFilterAction {
|
|
101
101
|
}
|
|
102
|
-
export interface LayoutColumnFilterClearAction extends
|
|
102
|
+
export interface LayoutColumnFilterClearAction extends Redux.Action {
|
|
103
|
+
columnId: string;
|
|
103
104
|
}
|
|
104
105
|
export interface LayoutColumnFilterClearAllAction extends Redux.Action {
|
|
105
106
|
}
|
|
@@ -121,7 +122,7 @@ export declare const LayoutColumnFilterAdd: (columnFilter: ColumnFilter) => Layo
|
|
|
121
122
|
export declare const LayoutColumnFilterEdit: (columnFilter: ColumnFilter) => LayoutColumnFilterEditAction;
|
|
122
123
|
export declare const LayoutColumnFilterSet: (columnFilter: ColumnFilter) => LayoutColumnFilterSetAction;
|
|
123
124
|
export declare const LayoutColumnFilterClearAll: () => LayoutColumnFilterClearAllAction;
|
|
124
|
-
export declare const LayoutColumnFilterClear: (
|
|
125
|
+
export declare const LayoutColumnFilterClear: (columnId: string) => LayoutColumnFilterClearAction;
|
|
125
126
|
export declare const LayoutColumnFilterSuspend: (columnFilter: ColumnFilter) => LayoutColumnFilterSuspendAction;
|
|
126
127
|
export declare const LayoutColumnFilterUnSuspend: (columnFilter: ColumnFilter) => LayoutColumnFilterUnSuspendAction;
|
|
127
128
|
export declare const LayoutColumnFilterSuspendAll: () => LayoutColumnFilterSuspendAllAction;
|
|
@@ -180,7 +181,7 @@ export declare const getCurrentLayoutSelector: (state: AdaptableState) => Layout
|
|
|
180
181
|
export declare const getColumnFilterSelector: (state: AdaptableState, columnId: string) => {
|
|
181
182
|
ColumnId: string;
|
|
182
183
|
Predicates: import("../../types").ColumnFilterPredicate[];
|
|
183
|
-
|
|
184
|
+
PredicatesOperator?: import("../../types").PredicatesOperator;
|
|
184
185
|
IsSuspended?: boolean;
|
|
185
186
|
Uuid?: string;
|
|
186
187
|
Source?: "Config" | "User";
|
|
@@ -113,9 +113,9 @@ const LayoutColumnFilterClearAll = () => ({
|
|
|
113
113
|
type: exports.LAYOUT_COLUMN_FILTER_CLEAR_ALL,
|
|
114
114
|
});
|
|
115
115
|
exports.LayoutColumnFilterClearAll = LayoutColumnFilterClearAll;
|
|
116
|
-
const LayoutColumnFilterClear = (
|
|
116
|
+
const LayoutColumnFilterClear = (columnId) => ({
|
|
117
117
|
type: exports.LAYOUT_COLUMN_FILTER_CLEAR,
|
|
118
|
-
|
|
118
|
+
columnId,
|
|
119
119
|
});
|
|
120
120
|
exports.LayoutColumnFilterClear = LayoutColumnFilterClear;
|
|
121
121
|
const LayoutColumnFilterSuspend = (columnFilter) => ({
|
|
@@ -366,7 +366,7 @@ const LayoutReducer = (state = initialState, action) => {
|
|
|
366
366
|
const actionTypedDelete = action;
|
|
367
367
|
const columnFilters = (currentLayout.ColumnFilters ?? []).filter((cf) => {
|
|
368
368
|
// make sure we are deleting all filters on the same column
|
|
369
|
-
return cf.ColumnId !== actionTypedDelete.
|
|
369
|
+
return cf.ColumnId !== actionTypedDelete.columnId;
|
|
370
370
|
});
|
|
371
371
|
const Layouts = state.Layouts.map((layout) => {
|
|
372
372
|
if (layout.Name === currentLayout.Name) {
|
|
@@ -507,7 +507,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
507
507
|
let returnAction = next(action);
|
|
508
508
|
adaptable.api.gridApi.refreshAllCells(true);
|
|
509
509
|
// if set then return a query on the text
|
|
510
|
-
if (adaptable.adaptableOptions.quickSearchOptions.
|
|
510
|
+
if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
|
|
511
511
|
const actionTyped = action;
|
|
512
512
|
const searchText = actionTyped.quickSearchText;
|
|
513
513
|
if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
|
|
@@ -667,7 +667,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
|
|
|
667
667
|
}
|
|
668
668
|
return ret;
|
|
669
669
|
}
|
|
670
|
-
case InternalRedux.
|
|
670
|
+
case InternalRedux.HIGHLIGHT_ROW_DELETE_ALL: {
|
|
671
671
|
const rowHighlightInfos = middlewareAPI.getState().Internal.RowHighlightInfo;
|
|
672
672
|
const ret = next(action);
|
|
673
673
|
rowHighlightInfos.forEach((rowHighlightInfo) => {
|
|
@@ -59,7 +59,7 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
59
59
|
}
|
|
60
60
|
const existingColumnFilter = this.api.filterApi.columnFilterApi.getColumnFilterForColumn(column.columnId);
|
|
61
61
|
if (existingColumnFilter) {
|
|
62
|
-
columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
62
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter.ColumnId)));
|
|
63
63
|
columnFilterMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
64
64
|
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
65
65
|
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
@@ -92,7 +92,7 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
return [
|
|
95
|
-
this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)),
|
|
95
|
+
this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter.ColumnId)),
|
|
96
96
|
this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
97
97
|
? 'column-filter-unsuspend'
|
|
98
98
|
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
@@ -149,8 +149,8 @@ class ColumnFilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
149
149
|
getCompactUnSuspendAction: (columnFilter) => LayoutRedux.LayoutColumnFilterUnSuspend(columnFilter),
|
|
150
150
|
getSuspendAllAction: () => LayoutRedux.LayoutColumnFilterSuspendAll(),
|
|
151
151
|
getUnSuspendAllAction: () => LayoutRedux.LayoutColumnFilterUnSuspendAll(),
|
|
152
|
-
getDeleteAction: LayoutRedux.LayoutColumnFilterClear,
|
|
153
|
-
getCompactDeleteAction: LayoutRedux.LayoutColumnFilterClear,
|
|
152
|
+
getDeleteAction: (columnFilter) => LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId),
|
|
153
|
+
getCompactDeleteAction: (columnFilter) => LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId),
|
|
154
154
|
getDeleteAllAction: LayoutRedux.LayoutColumnFilterClearAll,
|
|
155
155
|
emptyView: `
|
|
156
156
|
There are no Column Filters applied. \n
|
|
@@ -39,12 +39,12 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
39
39
|
// because if just one then it was created in AG Grid and we dont want to edit it
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
|
-
const hasSparklineStyle = styledColumn != null && styledColumn.
|
|
42
|
+
const hasSparklineStyle = styledColumn != null && styledColumn.SparklineStyle != null;
|
|
43
43
|
if (!hasSparklineStyle) {
|
|
44
44
|
styledColumn = {
|
|
45
45
|
...ObjectFactory_1.default.CreateEmptyStyledColumn(),
|
|
46
46
|
ColumnId: column.columnId,
|
|
47
|
-
|
|
47
|
+
SparklineStyle: {},
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
let label = hasSparklineStyle ? 'Edit ' : 'Create ';
|
|
@@ -52,7 +52,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
52
52
|
? 'styled-column-sparkline-edit'
|
|
53
53
|
: 'styled-column-sparkline-add';
|
|
54
54
|
let popupParam = {
|
|
55
|
-
action:
|
|
55
|
+
action: hasSparklineStyle ? 'Edit' : 'New',
|
|
56
56
|
source: 'ColumnMenu',
|
|
57
57
|
value: styledColumn,
|
|
58
58
|
config: {
|
|
@@ -165,7 +165,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
165
165
|
else if (styledColumn.PercentBarStyle) {
|
|
166
166
|
return 'percent';
|
|
167
167
|
}
|
|
168
|
-
else if (styledColumn.
|
|
168
|
+
else if (styledColumn.SparklineStyle) {
|
|
169
169
|
return 'spark-line';
|
|
170
170
|
}
|
|
171
171
|
else if (styledColumn.BadgeStyle) {
|
|
@@ -252,7 +252,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
252
252
|
else if (styledColumn.PercentBarStyle) {
|
|
253
253
|
type = 'Percent Bar';
|
|
254
254
|
}
|
|
255
|
-
else if (styledColumn.
|
|
255
|
+
else if (styledColumn.SparklineStyle) {
|
|
256
256
|
type = 'Spark Line';
|
|
257
257
|
}
|
|
258
258
|
else if (styledColumn.BadgeStyle) {
|
|
@@ -268,7 +268,7 @@ class StyledColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
268
268
|
else if (styledColumn.PercentBarStyle) {
|
|
269
269
|
type = 'styled-column-percent-bar-edit';
|
|
270
270
|
}
|
|
271
|
-
else if (styledColumn.
|
|
271
|
+
else if (styledColumn.SparklineStyle) {
|
|
272
272
|
type = 'styled-column-sparkline-edit';
|
|
273
273
|
}
|
|
274
274
|
else if (styledColumn.BadgeStyle) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addGroupByParams = exports.aggregatedScalarExpressionFunctionNames = exports.aggregatedScalarExpressionFunctions = exports.quantileAggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = exports.aggregatedExpressionFunctions = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
5
|
const ArrayExtensions_1 = require("../Extensions/ArrayExtensions");
|
|
7
6
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
8
7
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
9
|
-
const
|
|
8
|
+
const date_fns_1 = require("date-fns");
|
|
10
9
|
const DateHelper_1 = require("../Helpers/DateHelper");
|
|
11
10
|
exports.aggregatedExpressionFunctions = [
|
|
12
11
|
'SUM',
|
|
@@ -589,7 +588,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
589
588
|
}
|
|
590
589
|
else {
|
|
591
590
|
// Date
|
|
592
|
-
return (0,
|
|
591
|
+
return (0, date_fns_1.isAfter)((0, DateHelper_1.parseDateValue)(rowValue), (0, DateHelper_1.parseDateValue)(minValue))
|
|
593
592
|
? minValue
|
|
594
593
|
: rowValue;
|
|
595
594
|
}
|
|
@@ -653,7 +652,7 @@ exports.aggregatedScalarExpressionFunctions = {
|
|
|
653
652
|
}
|
|
654
653
|
else {
|
|
655
654
|
// Date
|
|
656
|
-
return (0,
|
|
655
|
+
return (0, date_fns_1.isAfter)((0, DateHelper_1.parseDateValue)(rowValue), (0, DateHelper_1.parseDateValue)(maxValue))
|
|
657
656
|
? rowValue
|
|
658
657
|
: maxValue;
|
|
659
658
|
}
|
|
@@ -1245,7 +1244,7 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
1245
1244
|
if (isDefinedValue(rowValue)) {
|
|
1246
1245
|
if (aggregationEvaluation.columnType === 'date') {
|
|
1247
1246
|
if (cumulationBag.currentValue === aggregationReducer.initialValue ||
|
|
1248
|
-
(0,
|
|
1247
|
+
(0, date_fns_1.isAfter)((0, DateHelper_1.parseDateValue)(cumulationBag.currentValue), (0, DateHelper_1.parseDateValue)(rowValue))) {
|
|
1249
1248
|
cumulationBag.currentValue = rowValue;
|
|
1250
1249
|
}
|
|
1251
1250
|
}
|
|
@@ -1271,7 +1270,7 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
|
|
|
1271
1270
|
if (isDefinedValue(rowValue)) {
|
|
1272
1271
|
if (aggregationEvaluation.columnType === 'date') {
|
|
1273
1272
|
if (cumulationBag.currentValue === aggregationReducer.initialValue ||
|
|
1274
|
-
(0,
|
|
1273
|
+
(0, date_fns_1.isAfter)((0, DateHelper_1.parseDateValue)(rowValue), (0, DateHelper_1.parseDateValue)(cumulationBag.currentValue))) {
|
|
1275
1274
|
cumulationBag.currentValue = rowValue;
|
|
1276
1275
|
}
|
|
1277
1276
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isBooleanAdaptableQlFunction = exports.booleanExpressionFunctionsNames = exports.booleanExpressionFunctions = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const isEqual_1 = tslib_1.__importDefault(require("date-fns/isEqual"));
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
const date_fns_2 = require("date-fns");
|
|
6
|
+
const date_fns_3 = require("date-fns");
|
|
8
7
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
9
8
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
10
9
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
@@ -69,7 +68,7 @@ exports.booleanExpressionFunctions = {
|
|
|
69
68
|
EQ: {
|
|
70
69
|
handler(args, context) {
|
|
71
70
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
72
|
-
return (0,
|
|
71
|
+
return (0, date_fns_3.isEqual)(args[0], args[1]);
|
|
73
72
|
}
|
|
74
73
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
75
74
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -93,7 +92,7 @@ exports.booleanExpressionFunctions = {
|
|
|
93
92
|
NEQ: {
|
|
94
93
|
handler(args, context) {
|
|
95
94
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
96
|
-
return !(0,
|
|
95
|
+
return !(0, date_fns_3.isEqual)(args[0], args[1]);
|
|
97
96
|
}
|
|
98
97
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
99
98
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -117,7 +116,7 @@ exports.booleanExpressionFunctions = {
|
|
|
117
116
|
LT: {
|
|
118
117
|
handler(args, context) {
|
|
119
118
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
120
|
-
return (0,
|
|
119
|
+
return (0, date_fns_2.isBefore)(args[0], args[1]);
|
|
121
120
|
}
|
|
122
121
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
123
122
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -144,7 +143,7 @@ exports.booleanExpressionFunctions = {
|
|
|
144
143
|
LTE: {
|
|
145
144
|
handler(args, context) {
|
|
146
145
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
147
|
-
return (0,
|
|
146
|
+
return (0, date_fns_2.isBefore)(args[0], args[1]) || (0, date_fns_3.isEqual)(args[0], args[1]);
|
|
148
147
|
}
|
|
149
148
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
150
149
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -171,7 +170,7 @@ exports.booleanExpressionFunctions = {
|
|
|
171
170
|
GT: {
|
|
172
171
|
handler(args, context) {
|
|
173
172
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
174
|
-
return (0,
|
|
173
|
+
return (0, date_fns_1.isAfter)(args[0], args[1]);
|
|
175
174
|
}
|
|
176
175
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
177
176
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -198,7 +197,7 @@ exports.booleanExpressionFunctions = {
|
|
|
198
197
|
GTE: {
|
|
199
198
|
handler(args, context) {
|
|
200
199
|
if (args[0] instanceof Date && args[1] instanceof Date) {
|
|
201
|
-
return (0,
|
|
200
|
+
return (0, date_fns_1.isAfter)(args[0], args[1]) || (0, date_fns_3.isEqual)(args[0], args[1]);
|
|
202
201
|
}
|
|
203
202
|
if (typeof args[0] === 'string' || typeof args[1] === 'string') {
|
|
204
203
|
const [first, second] = (0, expressionFunctionUtils_1.getStringValues)(context, String(args[0]), String(args[1]));
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.scalarExpressionFunctionNames = exports.scalarExpressionFunctions = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
6
|
+
const date_fns_1 = require("date-fns");
|
|
7
|
+
const date_fns_2 = require("date-fns");
|
|
8
|
+
const date_fns_3 = require("date-fns");
|
|
9
|
+
const date_fns_4 = require("date-fns");
|
|
10
|
+
const date_fns_5 = require("date-fns");
|
|
11
|
+
const date_fns_6 = require("date-fns");
|
|
12
|
+
const date_fns_7 = require("date-fns");
|
|
13
|
+
const date_fns_8 = require("date-fns");
|
|
14
|
+
const date_fns_9 = require("date-fns");
|
|
15
|
+
const date_fns_10 = require("date-fns");
|
|
16
|
+
const date_fns_11 = require("date-fns");
|
|
17
|
+
const date_fns_12 = require("date-fns");
|
|
18
|
+
const date_fns_13 = require("date-fns");
|
|
19
19
|
const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
|
|
20
20
|
const dateUtils_1 = require("./dateUtils");
|
|
21
21
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
@@ -377,7 +377,7 @@ exports.scalarExpressionFunctions = {
|
|
|
377
377
|
},
|
|
378
378
|
DATE: {
|
|
379
379
|
handler(args) {
|
|
380
|
-
return (0,
|
|
380
|
+
return (0, date_fns_1.parseISO)(args[0]);
|
|
381
381
|
},
|
|
382
382
|
description: 'Returns a new date by parsing the given string in ISO 8601 format',
|
|
383
383
|
signatures: [
|
|
@@ -402,7 +402,7 @@ exports.scalarExpressionFunctions = {
|
|
|
402
402
|
},
|
|
403
403
|
CURRENT_DAY: {
|
|
404
404
|
handler() {
|
|
405
|
-
return (0,
|
|
405
|
+
return (0, date_fns_2.startOfDay)(new Date());
|
|
406
406
|
},
|
|
407
407
|
description: 'Returns the current day',
|
|
408
408
|
signatures: ['CURRENT_DAY()'],
|
|
@@ -412,7 +412,7 @@ exports.scalarExpressionFunctions = {
|
|
|
412
412
|
},
|
|
413
413
|
DAY: {
|
|
414
414
|
handler(args) {
|
|
415
|
-
return (0,
|
|
415
|
+
return (0, date_fns_2.startOfDay)(args[0]);
|
|
416
416
|
},
|
|
417
417
|
description: 'Returns the day from a date',
|
|
418
418
|
signatures: ['DAY(input: date)'],
|
|
@@ -422,7 +422,7 @@ exports.scalarExpressionFunctions = {
|
|
|
422
422
|
},
|
|
423
423
|
WEEK: {
|
|
424
424
|
handler(args) {
|
|
425
|
-
return (0,
|
|
425
|
+
return (0, date_fns_3.startOfWeek)(args[0]);
|
|
426
426
|
},
|
|
427
427
|
description: 'Returns the week from a date',
|
|
428
428
|
signatures: ['WEEK(input: date)'],
|
|
@@ -432,7 +432,7 @@ exports.scalarExpressionFunctions = {
|
|
|
432
432
|
},
|
|
433
433
|
MONTH: {
|
|
434
434
|
handler(args) {
|
|
435
|
-
return (0,
|
|
435
|
+
return (0, date_fns_4.startOfMonth)(args[0]);
|
|
436
436
|
},
|
|
437
437
|
description: 'Returns the month from a date',
|
|
438
438
|
signatures: ['MONTH(input: date)'],
|
|
@@ -442,7 +442,7 @@ exports.scalarExpressionFunctions = {
|
|
|
442
442
|
},
|
|
443
443
|
YEAR: {
|
|
444
444
|
handler(args) {
|
|
445
|
-
return (0,
|
|
445
|
+
return (0, date_fns_5.startOfYear)(args[0]);
|
|
446
446
|
},
|
|
447
447
|
description: 'Returns the year from a date',
|
|
448
448
|
signatures: ['YEAR(input: date)'],
|
|
@@ -452,7 +452,7 @@ exports.scalarExpressionFunctions = {
|
|
|
452
452
|
},
|
|
453
453
|
ADD_DAYS: {
|
|
454
454
|
handler(args) {
|
|
455
|
-
return (0,
|
|
455
|
+
return (0, date_fns_6.addDays)(args[0], args[1]);
|
|
456
456
|
},
|
|
457
457
|
description: 'Returns a date based on input data and days to add',
|
|
458
458
|
signatures: ['ADD_DAYS(input: date, days: number)'],
|
|
@@ -462,7 +462,7 @@ exports.scalarExpressionFunctions = {
|
|
|
462
462
|
},
|
|
463
463
|
ADD_WEEKS: {
|
|
464
464
|
handler(args) {
|
|
465
|
-
return (0,
|
|
465
|
+
return (0, date_fns_7.addWeeks)(args[0], args[1]);
|
|
466
466
|
},
|
|
467
467
|
description: 'Returns a date based on input data and weeks to add',
|
|
468
468
|
signatures: ['ADD_WEEKS(input: date, weeks: number)'],
|
|
@@ -472,7 +472,7 @@ exports.scalarExpressionFunctions = {
|
|
|
472
472
|
},
|
|
473
473
|
ADD_MONTHS: {
|
|
474
474
|
handler(args) {
|
|
475
|
-
return (0,
|
|
475
|
+
return (0, date_fns_8.addMonths)(args[0], args[1]);
|
|
476
476
|
},
|
|
477
477
|
description: 'Returns a date based on input data and months to add',
|
|
478
478
|
signatures: ['ADD_MONTHS(input: date, months: number)'],
|
|
@@ -482,7 +482,7 @@ exports.scalarExpressionFunctions = {
|
|
|
482
482
|
},
|
|
483
483
|
ADD_YEARS: {
|
|
484
484
|
handler(args) {
|
|
485
|
-
return (0,
|
|
485
|
+
return (0, date_fns_9.addYears)(args[0], args[1]);
|
|
486
486
|
},
|
|
487
487
|
description: 'Returns a date based on input data and years to add',
|
|
488
488
|
signatures: ['ADD_YEARS(input: date, years: number)'],
|
|
@@ -493,7 +493,7 @@ exports.scalarExpressionFunctions = {
|
|
|
493
493
|
DIFF_DAYS: {
|
|
494
494
|
handler(args) {
|
|
495
495
|
const [first, second] = (0, dateUtils_1.normalizeDateParams)(args);
|
|
496
|
-
const result = (0,
|
|
496
|
+
const result = (0, date_fns_10.differenceInDays)(first, second);
|
|
497
497
|
return sanitizeNumericResult(result);
|
|
498
498
|
},
|
|
499
499
|
description: 'Returns the difference in days between 2 dates',
|
|
@@ -505,7 +505,7 @@ exports.scalarExpressionFunctions = {
|
|
|
505
505
|
DIFF_WEEKS: {
|
|
506
506
|
handler(args) {
|
|
507
507
|
const [first, second] = (0, dateUtils_1.normalizeDateParams)(args);
|
|
508
|
-
const result = (0,
|
|
508
|
+
const result = (0, date_fns_11.differenceInWeeks)(first, second);
|
|
509
509
|
return sanitizeNumericResult(result);
|
|
510
510
|
},
|
|
511
511
|
description: 'Returns the difference in weeks between 2 dates',
|
|
@@ -517,7 +517,7 @@ exports.scalarExpressionFunctions = {
|
|
|
517
517
|
DIFF_MONTHS: {
|
|
518
518
|
handler(args) {
|
|
519
519
|
const [first, second] = (0, dateUtils_1.normalizeDateParams)(args);
|
|
520
|
-
const result = (0,
|
|
520
|
+
const result = (0, date_fns_12.differenceInMonths)(first, second);
|
|
521
521
|
return sanitizeNumericResult(result);
|
|
522
522
|
},
|
|
523
523
|
description: 'Returns the difference in months between 2 dates',
|
|
@@ -529,7 +529,7 @@ exports.scalarExpressionFunctions = {
|
|
|
529
529
|
DIFF_YEARS: {
|
|
530
530
|
handler(args) {
|
|
531
531
|
const [first, second] = (0, dateUtils_1.normalizeDateParams)(args);
|
|
532
|
-
const result = (0,
|
|
532
|
+
const result = (0, date_fns_13.differenceInYears)(first, second);
|
|
533
533
|
return sanitizeNumericResult(result);
|
|
534
534
|
},
|
|
535
535
|
description: 'Returns the difference in years between 2 dates',
|
|
@@ -4,6 +4,7 @@ import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
|
|
|
4
4
|
export declare function initPredefinedConfigWithUuids(predefinedConfig: PredefinedConfig): PredefinedConfig;
|
|
5
5
|
export declare function getAccessLevelForObject(adaptableObject: AdaptableObject, moduleAccessLevel: AccessLevel): AccessLevel;
|
|
6
6
|
export declare function addAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
7
|
+
export declare function removeAdaptableObjectPrimitivesInline(target: any): any;
|
|
7
8
|
export declare function removeAdaptableObjectPrimitives<T extends AdaptableObject>(adaptableObject: T): T;
|
|
8
9
|
export declare function isAdaptableObject(object: unknown): object is AdaptableObject;
|
|
9
10
|
export declare const AdaptableHelper: {
|
|
@@ -11,6 +12,7 @@ export declare const AdaptableHelper: {
|
|
|
11
12
|
getAccessLevelForObject: typeof getAccessLevelForObject;
|
|
12
13
|
addAdaptableObjectPrimitives: typeof addAdaptableObjectPrimitives;
|
|
13
14
|
removeAdaptableObjectPrimitives: typeof removeAdaptableObjectPrimitives;
|
|
15
|
+
removeAdaptableObjectPrimitivesInline: typeof removeAdaptableObjectPrimitivesInline;
|
|
14
16
|
isAdaptableObject: typeof isAdaptableObject;
|
|
15
17
|
};
|
|
16
18
|
export default AdaptableHelper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.initPredefinedConfigWithUuids = void 0;
|
|
3
|
+
exports.AdaptableHelper = exports.isAdaptableObject = exports.removeAdaptableObjectPrimitives = exports.removeAdaptableObjectPrimitivesInline = exports.addAdaptableObjectPrimitives = exports.getAccessLevelForObject = exports.initPredefinedConfigWithUuids = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
|
|
6
6
|
const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
|
|
@@ -50,6 +50,16 @@ function addAdaptableObjectPrimitives(adaptableObject) {
|
|
|
50
50
|
return adaptableObject;
|
|
51
51
|
}
|
|
52
52
|
exports.addAdaptableObjectPrimitives = addAdaptableObjectPrimitives;
|
|
53
|
+
function removeAdaptableObjectPrimitivesInline(target) {
|
|
54
|
+
if (!target || typeof target !== 'object') {
|
|
55
|
+
return target;
|
|
56
|
+
}
|
|
57
|
+
delete target.Source;
|
|
58
|
+
delete target.Uuid;
|
|
59
|
+
delete target.AdaptableVersion;
|
|
60
|
+
return target;
|
|
61
|
+
}
|
|
62
|
+
exports.removeAdaptableObjectPrimitivesInline = removeAdaptableObjectPrimitivesInline;
|
|
53
63
|
function removeAdaptableObjectPrimitives(adaptableObject) {
|
|
54
64
|
const clonedObject = structuredClone(adaptableObject);
|
|
55
65
|
const sanitiseObject = (object) => {
|
|
@@ -79,6 +89,7 @@ exports.AdaptableHelper = {
|
|
|
79
89
|
getAccessLevelForObject,
|
|
80
90
|
addAdaptableObjectPrimitives,
|
|
81
91
|
removeAdaptableObjectPrimitives,
|
|
92
|
+
removeAdaptableObjectPrimitivesInline,
|
|
82
93
|
isAdaptableObject,
|
|
83
94
|
};
|
|
84
95
|
exports.default = exports.AdaptableHelper;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseFilterInputDate = exports.parseDateValue = exports.parseToISO = exports.dateToISO = exports.isValueValidDate = exports.isValidDate = void 0;
|
|
4
|
-
const
|
|
5
|
-
const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
|
|
6
|
-
const parse_1 = tslib_1.__importDefault(require("date-fns/parse"));
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
7
5
|
const FormatHelper_1 = require("./FormatHelper");
|
|
8
6
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
9
7
|
const isValidDate = (date) => {
|
|
@@ -46,10 +44,10 @@ const parseDateValue = (dateValue, dateFormat) => {
|
|
|
46
44
|
else {
|
|
47
45
|
// typeof dateValue === 'string'
|
|
48
46
|
if (dateFormat) {
|
|
49
|
-
dateInstance = (0,
|
|
47
|
+
dateInstance = (0, date_fns_1.parse)(dateValue, dateFormat, new Date());
|
|
50
48
|
}
|
|
51
49
|
else {
|
|
52
|
-
dateInstance = (0,
|
|
50
|
+
dateInstance = (0, date_fns_1.parseISO)(dateValue);
|
|
53
51
|
}
|
|
54
52
|
if (!(0, exports.isValidDate)(dateInstance)) {
|
|
55
53
|
// last chance: try to use the native Date.parse(), https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
|