@adaptabletools/adaptable 12.1.4 → 12.1.7
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/bundle.cjs.js +116 -143
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -4
- package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +31 -24
- package/src/Api/ColumnApi.d.ts +1 -1
- package/src/Api/FilterApi.d.ts +6 -0
- package/src/Api/FlashingCellApi.d.ts +8 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +2 -2
- package/src/Api/Implementation/DataSetApiImpl.js +1 -1
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +20 -2
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
- package/src/Api/Implementation/GridApiImpl.js +4 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
- package/src/Api/Implementation/LayoutApiImpl.js +4 -3
- package/src/Api/Implementation/QueryApiImpl.js +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
- package/src/Api/LayoutApi.d.ts +1 -1
- package/src/Api/SystemStatusApi.d.ts +1 -1
- package/src/Api/ToolPanelApi.d.ts +1 -1
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableColumn.js +3 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +23 -7
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +6 -6
- package/src/PredefinedConfig/Common/Types.d.ts +1 -0
- package/src/PredefinedConfig/Common/Types.js +38 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -2
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -2
- package/src/Redux/Store/AdaptableStore.js +15 -10
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/DashboardModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.js +1 -1
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StateManagementModule.js +1 -1
- package/src/Strategy/StatusBarModule.js +1 -1
- package/src/Strategy/SystemStatusModule.js +1 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +68 -0
- package/src/Utilities/Constants/ModuleConstants.js +70 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -1
- package/src/Utilities/Extensions/ArrayExtensions.js +6 -0
- package/src/Utilities/Helpers/CalendarHelper.js +10 -7
- package/src/Utilities/Helpers/DateHelper.d.ts +0 -26
- package/src/Utilities/Helpers/DateHelper.js +2 -32
- package/src/Utilities/ObjectFactory.d.ts +2 -2
- package/src/Utilities/ObjectFactory.js +14 -14
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +5 -0
- package/src/Utilities/Services/MetamodelService.d.ts +4 -4
- package/src/Utilities/Services/MetamodelService.js +19 -12
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +193 -135
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +23 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +3 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +148 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +33 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +82 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +6 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +109 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +16 -0
- package/src/View/AdaptableWizardView/Wizard.js +2 -1
- package/src/View/AdaptableWizardView/helper.d.ts +1 -1
- package/src/View/AdaptableWizardView/helper.js +3 -10
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +2 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +10 -10
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +4 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +2 -2
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +18 -11
- package/src/components/ProgressIndicator/ProgressIndicator.js +10 -12
- package/src/metamodel/adaptable.metamodel.d.ts +74 -6
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +1 -1
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,36 +1,105 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ConditionalStyleFriendlyName = exports.ConditionalStyleModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
|
|
4
|
+
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = void 0;
|
|
4
5
|
exports.AlertModuleId = 'Alert';
|
|
6
|
+
exports.AlertModuleFriendlyName = 'Alert';
|
|
5
7
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
8
|
+
exports.FlashingCellFriendlyName = 'Flashing Cell';
|
|
6
9
|
exports.BulkUpdateModuleId = 'BulkUpdate';
|
|
10
|
+
exports.BulkUpdateFriendlyName = 'Bulk Update';
|
|
7
11
|
exports.CalculatedColumnModuleId = 'CalculatedColumn';
|
|
12
|
+
exports.CalculatedColumnFriendlyName = 'Calculated Column';
|
|
8
13
|
exports.CellSummaryModuleId = 'CellSummary';
|
|
14
|
+
exports.CellSummaryFriendlyName = 'Cell Summary';
|
|
9
15
|
exports.ChartingModuleId = 'Charting';
|
|
16
|
+
exports.ChartingFriendlyName = 'Charts';
|
|
10
17
|
exports.ConditionalStyleModuleId = 'ConditionalStyle';
|
|
18
|
+
exports.ConditionalStyleFriendlyName = 'Conditional Style';
|
|
11
19
|
exports.CustomSortModuleId = 'CustomSort';
|
|
20
|
+
exports.CustomSortFriendlyName = 'Custom Sort';
|
|
12
21
|
exports.DashboardModuleId = 'Dashboard';
|
|
22
|
+
exports.DashboardFriendlyName = 'Dashboard';
|
|
13
23
|
exports.DataChangeHistoryModuleId = 'DataChangeHistory';
|
|
24
|
+
exports.DataChangeHistoryFriendlyName = 'Data Changes';
|
|
14
25
|
exports.DataSetModuleId = 'DataSet';
|
|
26
|
+
exports.DataSetFriendlyName = 'Data Set';
|
|
15
27
|
exports.ExportModuleId = 'Export';
|
|
28
|
+
exports.ExportFriendlyName = 'Export';
|
|
16
29
|
exports.FilterModuleId = 'Filter';
|
|
30
|
+
exports.FilterFriendlyName = 'Filter';
|
|
17
31
|
exports.FormatColumnModuleId = 'FormatColumn';
|
|
32
|
+
exports.FormatColumnFriendlyName = 'Format Column';
|
|
18
33
|
exports.FreeTextColumnModuleId = 'FreeTextColumn';
|
|
34
|
+
exports.FreeTextColumnFriendlyName = 'Free Text Column';
|
|
19
35
|
exports.Glue42ModuleId = 'Glue42';
|
|
36
|
+
exports.Glue42FriendlyName = 'Glue42';
|
|
20
37
|
exports.GridInfoModuleId = 'GridInfo';
|
|
38
|
+
exports.GridInfoFriendlyName = 'Grid Info';
|
|
21
39
|
exports.IPushPullModuleId = 'IPushPull';
|
|
40
|
+
exports.IPushPullFriendlyName = 'IPushPull';
|
|
22
41
|
exports.LayoutModuleId = 'Layout';
|
|
42
|
+
exports.LayoutFriendlyName = 'Layout';
|
|
23
43
|
exports.OpenFinModuleId = 'OpenFin';
|
|
44
|
+
exports.OpenFinFriendlyName = 'OpenFin';
|
|
24
45
|
exports.PlusMinusModuleId = 'PlusMinus';
|
|
46
|
+
exports.PlusMinusFriendlyName = 'Plus Minus';
|
|
25
47
|
exports.QueryModuleId = 'Query';
|
|
48
|
+
exports.QueryFriendlyName = 'Query';
|
|
26
49
|
exports.QuickSearchModuleId = 'QuickSearch';
|
|
50
|
+
exports.QuickSearchFriendlyName = 'Quick Search';
|
|
27
51
|
exports.ScheduleModuleId = 'Schedule';
|
|
52
|
+
exports.ScheduleFriendlyName = 'Schedule';
|
|
28
53
|
exports.ShortcutModuleId = 'Shortcut';
|
|
54
|
+
exports.ShortcutFriendlyName = 'Shortcut';
|
|
29
55
|
exports.SmartEditModuleId = 'SmartEdit';
|
|
56
|
+
exports.SmartEditFriendlyName = 'Smart Edit';
|
|
30
57
|
exports.StateManagementModuleId = 'StateManagement';
|
|
58
|
+
exports.StateManagementFriendlyName = 'Manage State';
|
|
31
59
|
exports.SystemStatusModuleId = 'SystemStatus';
|
|
60
|
+
exports.SystemStatusFriendlyName = 'System Status';
|
|
32
61
|
exports.TeamSharingModuleId = 'TeamSharing';
|
|
62
|
+
exports.TeamSharingFriendlyName = 'Team Sharing';
|
|
33
63
|
exports.ThemeModuleId = 'Theme';
|
|
64
|
+
exports.ThemeFriendlyName = 'Theme';
|
|
34
65
|
exports.ToolPanelModuleId = 'ToolPanel';
|
|
66
|
+
exports.ToolPanelFriendlyName = 'Tool Panel';
|
|
35
67
|
exports.SettingsPanelModuleId = 'SettingsPanel';
|
|
68
|
+
exports.SettingsPanelFriendlyName = 'Settings Panel';
|
|
36
69
|
exports.StatusBarModuleId = 'StatusBar';
|
|
70
|
+
exports.StatusBarFriendlyName = 'Status Bar';
|
|
71
|
+
exports.ADAPTABLE_MODULE_MAP = {
|
|
72
|
+
[exports.AlertModuleId]: exports.AlertModuleFriendlyName,
|
|
73
|
+
[exports.FlashingCellModuleId]: exports.FlashingCellFriendlyName,
|
|
74
|
+
[exports.BulkUpdateModuleId]: exports.BulkUpdateFriendlyName,
|
|
75
|
+
[exports.CalculatedColumnModuleId]: exports.CalculatedColumnFriendlyName,
|
|
76
|
+
[exports.CellSummaryModuleId]: exports.CellSummaryFriendlyName,
|
|
77
|
+
[exports.ChartingModuleId]: exports.ChartingFriendlyName,
|
|
78
|
+
[exports.ConditionalStyleModuleId]: exports.ConditionalStyleFriendlyName,
|
|
79
|
+
[exports.CustomSortModuleId]: exports.CustomSortFriendlyName,
|
|
80
|
+
[exports.DashboardModuleId]: exports.DashboardFriendlyName,
|
|
81
|
+
[exports.DataChangeHistoryModuleId]: exports.DataChangeHistoryFriendlyName,
|
|
82
|
+
[exports.DataSetModuleId]: exports.DataSetFriendlyName,
|
|
83
|
+
[exports.ExportModuleId]: exports.ExportFriendlyName,
|
|
84
|
+
[exports.FilterModuleId]: exports.FilterFriendlyName,
|
|
85
|
+
[exports.FormatColumnModuleId]: exports.FormatColumnFriendlyName,
|
|
86
|
+
[exports.FreeTextColumnModuleId]: exports.FreeTextColumnFriendlyName,
|
|
87
|
+
[exports.Glue42ModuleId]: exports.Glue42FriendlyName,
|
|
88
|
+
[exports.GridInfoModuleId]: exports.GridInfoFriendlyName,
|
|
89
|
+
[exports.IPushPullModuleId]: exports.IPushPullFriendlyName,
|
|
90
|
+
[exports.LayoutModuleId]: exports.LayoutFriendlyName,
|
|
91
|
+
[exports.OpenFinModuleId]: exports.OpenFinFriendlyName,
|
|
92
|
+
[exports.PlusMinusModuleId]: exports.PlusMinusFriendlyName,
|
|
93
|
+
[exports.QueryModuleId]: exports.QueryFriendlyName,
|
|
94
|
+
[exports.QuickSearchModuleId]: exports.QuickSearchFriendlyName,
|
|
95
|
+
[exports.ScheduleModuleId]: exports.ScheduleFriendlyName,
|
|
96
|
+
[exports.ShortcutModuleId]: exports.ShortcutFriendlyName,
|
|
97
|
+
[exports.SmartEditModuleId]: exports.SmartEditFriendlyName,
|
|
98
|
+
[exports.StateManagementModuleId]: exports.StateManagementFriendlyName,
|
|
99
|
+
[exports.SystemStatusModuleId]: exports.SystemStatusFriendlyName,
|
|
100
|
+
[exports.TeamSharingModuleId]: exports.TeamSharingFriendlyName,
|
|
101
|
+
[exports.ThemeModuleId]: exports.ThemeFriendlyName,
|
|
102
|
+
[exports.ToolPanelModuleId]: exports.ToolPanelFriendlyName,
|
|
103
|
+
[exports.SettingsPanelModuleId]: exports.SettingsPanelFriendlyName,
|
|
104
|
+
[exports.StatusBarModuleId]: exports.StatusBarFriendlyName,
|
|
105
|
+
};
|
|
@@ -12,6 +12,7 @@ const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/a
|
|
|
12
12
|
const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
|
|
13
13
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
14
14
|
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
15
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
15
16
|
// change type to DeepRequired<AdaptableOptions> to check which properties have no default values defined
|
|
16
17
|
exports.DefaultAdaptableOptions = {
|
|
17
18
|
adaptableId: GeneralConstants.ADAPTABLE_ID,
|
|
@@ -204,6 +205,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
204
205
|
maxFilterValuesToDisplay: 2000,
|
|
205
206
|
systemFilters: AdaptablePredicate_1.SystemFilterPredicateIds,
|
|
206
207
|
showQuickFilter: true,
|
|
208
|
+
showDistinctFilteredValuesOnly: false,
|
|
207
209
|
},
|
|
208
210
|
searchOptions: {
|
|
209
211
|
excludeColumnFromQuickSearch: undefined,
|
|
@@ -260,7 +262,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
260
262
|
},
|
|
261
263
|
settingsPanelOptions: {
|
|
262
264
|
popupType: 'window',
|
|
263
|
-
title:
|
|
265
|
+
title: ModuleConstants.SettingsPanelFriendlyName,
|
|
264
266
|
icon: 'ConfigurationIcon',
|
|
265
267
|
navigation: {},
|
|
266
268
|
alwaysShowInDashboard: false,
|
|
@@ -109,6 +109,12 @@ function moveArray(array, from, to) {
|
|
|
109
109
|
exports.moveArray = moveArray;
|
|
110
110
|
//This deliberately only checks contents equality and not positional so [1, 2, 3]== [1, 3, 2]
|
|
111
111
|
function areArraysEqual(arr1, arr2) {
|
|
112
|
+
if (IsNullOrEmpty(arr1) && IsNotNullOrEmpty(arr2)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
if (IsNotNullOrEmpty(arr1) && IsNullOrEmpty(arr2)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
112
118
|
if (arr1.length !== arr2.length) {
|
|
113
119
|
return false;
|
|
114
120
|
}
|
|
@@ -298,7 +298,7 @@ function getNextWorkingDay(days = 1) {
|
|
|
298
298
|
let counterDate = new Date();
|
|
299
299
|
while (count < days) {
|
|
300
300
|
counterDate.setDate(counterDate.getDate() + 1);
|
|
301
|
-
if (
|
|
301
|
+
if (isNotWorkingDay(counterDate)) {
|
|
302
302
|
count++;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
@@ -310,7 +310,7 @@ function getPreviousWorkingDay(days = 1) {
|
|
|
310
310
|
let counterDate = new Date();
|
|
311
311
|
while (count < days) {
|
|
312
312
|
counterDate.setDate(counterDate.getDate() - 1);
|
|
313
|
-
if (
|
|
313
|
+
if (isNotWorkingDay(counterDate)) {
|
|
314
314
|
count++;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -319,14 +319,17 @@ function getPreviousWorkingDay(days = 1) {
|
|
|
319
319
|
exports.getPreviousWorkingDay = getPreviousWorkingDay;
|
|
320
320
|
// pretty sure this can be improved as pretty expensive - though rarely used to be honest
|
|
321
321
|
function isNotWorkingDay(dateToCheck) {
|
|
322
|
-
|
|
322
|
+
/*
|
|
323
|
+
// Removing lookups to current calendar until we decide what to do
|
|
324
|
+
let currentCalendar: string = this.getGeneralOptions().currentCalendar;
|
|
323
325
|
let currentHoliday = getAvailableCalendars().find((c) => c.Name == currentCalendar);
|
|
324
326
|
for (let holiday of currentHoliday.CalendarEntries) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
let holidayDate = new Date(holiday.HolidayDate);
|
|
328
|
+
if (holidayDate.setHours(0, 0, 0, 0) == dateToCheck.setHours(0, 0, 0, 0)) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
329
331
|
}
|
|
332
|
+
*/
|
|
330
333
|
return dateToCheck.getDay() != 0 && dateToCheck.getDay() != 6;
|
|
331
334
|
}
|
|
332
335
|
exports.isNotWorkingDay = isNotWorkingDay;
|
|
@@ -8,30 +8,4 @@ export declare const isValueValidDate: (data: any) => boolean;
|
|
|
8
8
|
export declare const dateToISO: (date: Date | number | string) => string;
|
|
9
9
|
export declare const parseToISO: (date: string | Date | number, dateFormat?: string) => string;
|
|
10
10
|
export declare const parseDateValue: (dateValue: string | Date | number, dateFormat?: string) => Date | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a date with the same day/month/year/hour with the current timezone.
|
|
13
|
-
* '2022-06-01T17:00:00.000Z' => '2022-06-01T17:00:00.000+03:00' // RO time
|
|
14
|
-
*
|
|
15
|
-
* new Date() always creates the date using the current timezone.
|
|
16
|
-
* To compare two dates, they need to be in the same timezone.
|
|
17
|
-
*
|
|
18
|
-
* @param date Date
|
|
19
|
-
*/
|
|
20
|
-
export declare const utcDateToSameDateInLocale: (date: Date) => Date;
|
|
21
|
-
/**
|
|
22
|
-
* To make sure selected/input date is correct and in the current time-zone.
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
* '2022-06-14' is considered to be '2022-06-13 00:00:00.
|
|
26
|
-
* And when date object is created it uses the current timezone.
|
|
27
|
-
*
|
|
28
|
-
* '2022-06-14' => Mon Jun 13 2022 20:00:00 GMT-0400 (Eastern Daylight Time)
|
|
29
|
-
*
|
|
30
|
-
* @param stringDate date string
|
|
31
|
-
*/
|
|
32
11
|
export declare const parseFilterInputDate: (stringDate: string) => Date;
|
|
33
|
-
/**
|
|
34
|
-
* Used to parse the date from rowDate inside date predicates.
|
|
35
|
-
* The date is parsed in moved to local timezone.
|
|
36
|
-
*/
|
|
37
|
-
export declare const parseFilterValueDate: (value: any) => Date;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.parseFilterInputDate = exports.parseDateValue = exports.parseToISO = exports.dateToISO = exports.isValueValidDate = exports.isValidDate = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
|
|
6
6
|
const parse_1 = tslib_1.__importDefault(require("date-fns/parse"));
|
|
@@ -63,35 +63,5 @@ const parseDateValue = (dateValue, dateFormat) => {
|
|
|
63
63
|
return dateInstance;
|
|
64
64
|
};
|
|
65
65
|
exports.parseDateValue = parseDateValue;
|
|
66
|
-
|
|
67
|
-
* Creates a date with the same day/month/year/hour with the current timezone.
|
|
68
|
-
* '2022-06-01T17:00:00.000Z' => '2022-06-01T17:00:00.000+03:00' // RO time
|
|
69
|
-
*
|
|
70
|
-
* new Date() always creates the date using the current timezone.
|
|
71
|
-
* To compare two dates, they need to be in the same timezone.
|
|
72
|
-
*
|
|
73
|
-
* @param date Date
|
|
74
|
-
*/
|
|
75
|
-
const utcDateToSameDateInLocale = (date) => {
|
|
76
|
-
return new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
|
|
77
|
-
};
|
|
78
|
-
exports.utcDateToSameDateInLocale = utcDateToSameDateInLocale;
|
|
79
|
-
/**
|
|
80
|
-
* To make sure selected/input date is correct and in the current time-zone.
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
* '2022-06-14' is considered to be '2022-06-13 00:00:00.
|
|
84
|
-
* And when date object is created it uses the current timezone.
|
|
85
|
-
*
|
|
86
|
-
* '2022-06-14' => Mon Jun 13 2022 20:00:00 GMT-0400 (Eastern Daylight Time)
|
|
87
|
-
*
|
|
88
|
-
* @param stringDate date string
|
|
89
|
-
*/
|
|
90
|
-
const parseFilterInputDate = (stringDate) => exports.utcDateToSameDateInLocale(new Date(stringDate));
|
|
66
|
+
const parseFilterInputDate = (stringDate) => new Date(stringDate);
|
|
91
67
|
exports.parseFilterInputDate = parseFilterInputDate;
|
|
92
|
-
/**
|
|
93
|
-
* Used to parse the date from rowDate inside date predicates.
|
|
94
|
-
* The date is parsed in moved to local timezone.
|
|
95
|
-
*/
|
|
96
|
-
const parseFilterValueDate = (value) => exports.utcDateToSameDateInLocale(exports.parseDateValue(value));
|
|
97
|
-
exports.parseFilterValueDate = parseFilterValueDate;
|
|
@@ -29,7 +29,7 @@ import { RowNode } from '@ag-grid-community/all-modules';
|
|
|
29
29
|
import { AdaptableApi } from '../../types';
|
|
30
30
|
import { ToastOptions } from '../components/Toastify';
|
|
31
31
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
32
|
-
export declare function CreateEmptyCalculatedColumn(
|
|
32
|
+
export declare function CreateEmptyCalculatedColumn(): CalculatedColumn;
|
|
33
33
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
34
34
|
export declare function CreateEmptyPlusMinusNudge(): PlusMinusNudge;
|
|
35
35
|
export declare function CreateGenericAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition): AdaptableGenericAlert;
|
|
@@ -55,7 +55,7 @@ export declare function CreateEmptySchedule(): Schedule;
|
|
|
55
55
|
export declare function CreateEmptyShortcut(): Shortcut;
|
|
56
56
|
export declare function CreateEmptyConditionalStyle(): ConditionalStyle;
|
|
57
57
|
export declare function CreateEmptyFormatColumn(): FormatColumn;
|
|
58
|
-
export declare function CreateEmptyFreeTextColumn(
|
|
58
|
+
export declare function CreateEmptyFreeTextColumn(): FreeTextColumn;
|
|
59
59
|
export declare function CreateEmptyLayout(layout?: Partial<Layout> & {
|
|
60
60
|
Name: string;
|
|
61
61
|
}, adaptableColumns?: AdaptableColumn[]): Layout;
|
|
@@ -9,7 +9,7 @@ function CreateEmptyCustomSort() {
|
|
|
9
9
|
return { Uuid: Uuid_1.createUuid(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
10
10
|
}
|
|
11
11
|
exports.CreateEmptyCustomSort = CreateEmptyCustomSort;
|
|
12
|
-
function CreateEmptyCalculatedColumn(
|
|
12
|
+
function CreateEmptyCalculatedColumn() {
|
|
13
13
|
return {
|
|
14
14
|
Uuid: Uuid_1.createUuid(),
|
|
15
15
|
ColumnId: GeneralConstants_1.EMPTY_STRING,
|
|
@@ -18,12 +18,12 @@ function CreateEmptyCalculatedColumn(isFilterable) {
|
|
|
18
18
|
},
|
|
19
19
|
// need to create some defaults - which we will change later
|
|
20
20
|
CalculatedColumnSettings: {
|
|
21
|
-
Filterable:
|
|
22
|
-
Resizable:
|
|
23
|
-
Groupable:
|
|
24
|
-
Sortable:
|
|
25
|
-
Pivotable:
|
|
26
|
-
Aggregatable:
|
|
21
|
+
Filterable: false,
|
|
22
|
+
Resizable: false,
|
|
23
|
+
Groupable: false,
|
|
24
|
+
Sortable: false,
|
|
25
|
+
Pivotable: false,
|
|
26
|
+
Aggregatable: false,
|
|
27
27
|
SuppressMenu: false,
|
|
28
28
|
SuppressMovable: false,
|
|
29
29
|
},
|
|
@@ -283,7 +283,7 @@ function CreateEmptyFormatColumn() {
|
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
285
|
exports.CreateEmptyFormatColumn = CreateEmptyFormatColumn;
|
|
286
|
-
function CreateEmptyFreeTextColumn(
|
|
286
|
+
function CreateEmptyFreeTextColumn() {
|
|
287
287
|
return {
|
|
288
288
|
Uuid: Uuid_1.createUuid(),
|
|
289
289
|
ColumnId: GeneralConstants_1.EMPTY_STRING,
|
|
@@ -292,12 +292,12 @@ function CreateEmptyFreeTextColumn(isFilterable) {
|
|
|
292
292
|
TextEditor: 'Inline',
|
|
293
293
|
DataType: 'String',
|
|
294
294
|
FreeTextColumnSettings: {
|
|
295
|
-
Filterable:
|
|
296
|
-
Resizable:
|
|
297
|
-
Groupable:
|
|
298
|
-
Sortable:
|
|
299
|
-
Pivotable:
|
|
300
|
-
Aggregatable:
|
|
295
|
+
Filterable: false,
|
|
296
|
+
Resizable: false,
|
|
297
|
+
Groupable: false,
|
|
298
|
+
Sortable: false,
|
|
299
|
+
Pivotable: false,
|
|
300
|
+
Aggregatable: false,
|
|
301
301
|
SuppressMenu: false,
|
|
302
302
|
SuppressMovable: false,
|
|
303
303
|
},
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AdaptableOptions } from '../../../../types';
|
|
2
|
+
import { MetamodelItemPropertyKind } from '../../../metamodel/adaptable-metamodel-model';
|
|
1
3
|
import { IAdaptableService } from './IAdaptableService';
|
|
2
4
|
export declare type GridInfoOptions = Map<string, {
|
|
3
5
|
containerLabel: string;
|
|
@@ -7,9 +9,12 @@ export interface GridInfoOption {
|
|
|
7
9
|
name: string;
|
|
8
10
|
value: any;
|
|
9
11
|
description: string;
|
|
12
|
+
kind: MetamodelItemPropertyKind;
|
|
10
13
|
defaultValue?: any;
|
|
11
14
|
}
|
|
12
15
|
export interface IMetamodelService extends IAdaptableService {
|
|
16
|
+
getAdaptableOptions: () => AdaptableOptions;
|
|
13
17
|
getGridInfoOptions(): GridInfoOptions;
|
|
18
|
+
getGridInfoNoCodeOptions(): GridInfoOptions;
|
|
14
19
|
validateAdaptableOptionsValues(): void;
|
|
15
20
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { GridInfoOptions, IMetamodelService } from './Interface/IMetamodelService';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableOptions } from '../../../types';
|
|
3
3
|
export declare class MetamodelService implements IMetamodelService {
|
|
4
|
-
private adaptableApi;
|
|
5
4
|
private gridInfoOptions;
|
|
6
|
-
|
|
5
|
+
getAdaptableOptions: () => AdaptableOptions;
|
|
6
|
+
constructor(getAdaptableOptions: () => AdaptableOptions);
|
|
7
7
|
getGridInfoOptions(): GridInfoOptions;
|
|
8
|
+
getGridInfoNoCodeOptions(): GridInfoOptions;
|
|
8
9
|
validateAdaptableOptionsValues(): void;
|
|
9
10
|
private validateOptionsObject;
|
|
10
11
|
private getExpectedOptionsValueType;
|
|
@@ -13,5 +14,4 @@ export declare class MetamodelService implements IMetamodelService {
|
|
|
13
14
|
private getAdaptableOptionsDefaultValues;
|
|
14
15
|
private getAdaptableMetamodel;
|
|
15
16
|
private getAdaptableOptionsMetamodel;
|
|
16
|
-
private getAdaptableOptions;
|
|
17
17
|
}
|
|
@@ -14,15 +14,23 @@ const supportedMetamodelTypes = [
|
|
|
14
14
|
'REFERENCE',
|
|
15
15
|
];
|
|
16
16
|
class MetamodelService {
|
|
17
|
-
constructor(
|
|
18
|
-
this.adaptableApi = adaptableApi;
|
|
17
|
+
constructor(getAdaptableOptions) {
|
|
19
18
|
this.gridInfoOptions = new Map();
|
|
20
|
-
this.
|
|
19
|
+
this.getAdaptableOptions = () => null;
|
|
20
|
+
this.getAdaptableOptions = getAdaptableOptions;
|
|
21
21
|
this.gridInfoOptions = this.buildGridInfoOptions();
|
|
22
22
|
}
|
|
23
23
|
getGridInfoOptions() {
|
|
24
24
|
return this.gridInfoOptions;
|
|
25
25
|
}
|
|
26
|
+
getGridInfoNoCodeOptions() {
|
|
27
|
+
return this.buildGridInfoOptions({
|
|
28
|
+
filterItemProperty: (itemProperty) => {
|
|
29
|
+
return itemProperty.noCode === 'item';
|
|
30
|
+
},
|
|
31
|
+
filterEmptyAdaptableOptions: false,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
26
34
|
validateAdaptableOptionsValues() {
|
|
27
35
|
var _a;
|
|
28
36
|
LoggingHelper_1.LogAdaptableInfo('Validating Adaptable Options...');
|
|
@@ -79,7 +87,8 @@ class MetamodelService {
|
|
|
79
87
|
return metamodelPropertyKind;
|
|
80
88
|
}
|
|
81
89
|
}
|
|
82
|
-
buildGridInfoOptions() {
|
|
90
|
+
buildGridInfoOptions(options) {
|
|
91
|
+
const { filterItemProperty, filterEmptyAdaptableOptions = true } = options || {};
|
|
83
92
|
const gridInfoOptions = new Map();
|
|
84
93
|
const adaptableMetamodel = this.getAdaptableMetamodel();
|
|
85
94
|
const adaptableOptionsMetamodel = this.getAdaptableOptionsMetamodel();
|
|
@@ -107,12 +116,12 @@ class MetamodelService {
|
|
|
107
116
|
// @ts-ignore
|
|
108
117
|
const containerOptionsDefaultValues = adaptableOptionsDefaultValues[adaptableOptionsName];
|
|
109
118
|
if (!containerOptionsMetamodel ||
|
|
110
|
-
!containerOptionsValues ||
|
|
119
|
+
(!containerOptionsValues && filterEmptyAdaptableOptions) ||
|
|
111
120
|
!containerOptionsDefaultValues) {
|
|
112
121
|
// should never happen
|
|
113
122
|
return;
|
|
114
123
|
}
|
|
115
|
-
const optionItems = this.mapGridInfoContainerItems(containerOptionsMetamodel, containerOptionsValues, containerOptionsDefaultValues);
|
|
124
|
+
const optionItems = this.mapGridInfoContainerItems(containerOptionsMetamodel, containerOptionsValues, containerOptionsDefaultValues, filterItemProperty);
|
|
116
125
|
gridInfoOptions.set(containerOptionItem.name, {
|
|
117
126
|
containerLabel: containerOptionItem.uiLabel,
|
|
118
127
|
items: optionItems,
|
|
@@ -120,13 +129,14 @@ class MetamodelService {
|
|
|
120
129
|
});
|
|
121
130
|
return gridInfoOptions;
|
|
122
131
|
}
|
|
123
|
-
mapGridInfoContainerItems(optionItemContainer, adaptableOptionsValues, defaultAdaptableOptionsValues) {
|
|
132
|
+
mapGridInfoContainerItems(optionItemContainer, adaptableOptionsValues, defaultAdaptableOptionsValues, filter = (itemProperty) => itemProperty.gridInfo === 'item') {
|
|
124
133
|
var _a;
|
|
125
|
-
return (_a = optionItemContainer.properties) === null || _a === void 0 ? void 0 : _a.filter(
|
|
134
|
+
return (_a = optionItemContainer.properties) === null || _a === void 0 ? void 0 : _a.filter(filter).map((itemProperty) => {
|
|
126
135
|
return {
|
|
127
136
|
name: itemProperty.name,
|
|
128
|
-
value: adaptableOptionsValues[itemProperty.name],
|
|
137
|
+
value: adaptableOptionsValues === null || adaptableOptionsValues === void 0 ? void 0 : adaptableOptionsValues[itemProperty.name],
|
|
129
138
|
defaultValue: defaultAdaptableOptionsValues[itemProperty.name],
|
|
139
|
+
kind: itemProperty.kind,
|
|
130
140
|
description: itemProperty.description,
|
|
131
141
|
};
|
|
132
142
|
});
|
|
@@ -140,8 +150,5 @@ class MetamodelService {
|
|
|
140
150
|
getAdaptableOptionsMetamodel() {
|
|
141
151
|
return this.getAdaptableMetamodel()['AdaptableOptions'];
|
|
142
152
|
}
|
|
143
|
-
getAdaptableOptions() {
|
|
144
|
-
return this.adaptableApi.internalApi.getAdaptableOptions();
|
|
145
|
-
}
|
|
146
153
|
}
|
|
147
154
|
exports.MetamodelService = MetamodelService;
|