@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.1
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 +62 -14
- package/base.css.map +1 -1
- package/index.css +267 -165
- package/index.css.map +1 -1
- package/package.json +5 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
- package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -6
- package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
- package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
- package/src/AdaptableOptions/MenuOptions.js +14 -6
- package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
- package/src/Api/AdaptableApi.d.ts +6 -1
- package/src/Api/CommentApi.d.ts +58 -0
- package/src/Api/EventApi.d.ts +48 -12
- package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
- package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
- package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
- package/src/Api/Events/LiveDataChanged.d.ts +3 -3
- package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
- package/src/Api/GridApi.d.ts +0 -6
- package/src/Api/GridFilterApi.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
- package/src/Api/Implementation/CommentsApiImpl.js +46 -0
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
- package/src/Api/Implementation/GridApiImpl.js +0 -4
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
- package/src/Api/Implementation/NotesApiImpl.d.ts +3 -7
- package/src/Api/Implementation/NotesApiImpl.js +1 -15
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
- package/src/Api/Implementation/PluginsApiImpl.js +3 -15
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
- package/src/Api/Internal/DashboardInternalApi.js +5 -0
- package/src/Api/Internal/DataImportInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/GridInternalApi.d.ts +3 -1
- package/src/Api/Internal/GridInternalApi.js +32 -9
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +11 -11
- package/src/Api/InteropioPluginApi.d.ts +10 -0
- package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +3 -13
- package/src/Api/ScheduleApi.d.ts +1 -48
- package/src/Api/ThemeApi.d.ts +5 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
- package/src/PredefinedConfig/CellAddress.d.ts +13 -0
- package/src/PredefinedConfig/CellAddress.js +5 -0
- package/src/PredefinedConfig/CommentState.d.ts +48 -0
- package/src/PredefinedConfig/CommentState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -1
- package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/NotesState.d.ts +0 -13
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -6
- package/src/PredefinedConfig/ThemeState.d.ts +1 -1
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
- package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.js +4 -5
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
- package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
- package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +107 -46
- package/src/Strategy/CommentsModule.d.ts +16 -0
- package/src/Strategy/CommentsModule.js +82 -0
- package/src/Strategy/LayoutModule.d.ts +12 -4
- package/src/Strategy/LayoutModule.js +19 -14
- package/src/Strategy/NotesModule.d.ts +0 -13
- package/src/Strategy/NotesModule.js +9 -88
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +0 -23
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
- package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
- package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
- package/src/Utilities/Constants/ConfigConstants.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +8 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
- package/src/Utilities/Constants/ModuleConstants.js +4 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
- package/src/Utilities/Helpers/PreviewHelper.js +5 -2
- package/src/Utilities/ObjectFactory.d.ts +19 -22
- package/src/Utilities/ObjectFactory.js +51 -60
- package/src/Utilities/Services/CellPopupService.d.ts +23 -0
- package/src/Utilities/Services/CellPopupService.js +138 -0
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.d.ts +3 -0
- package/src/Utilities/Services/ThemeService.js +33 -1
- package/src/Utilities/Services/ValidationService.js +11 -11
- package/src/View/AdaptableView.js +3 -3
- package/src/View/AdaptableViewFactory.js +4 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Charting/useChartingElements.js +8 -3
- package/src/View/Comments/CommentsEditor.d.ts +7 -0
- package/src/View/Comments/CommentsEditor.js +100 -0
- package/src/View/Comments/CommentsPopup.d.ts +2 -0
- package/src/View/Comments/CommentsPopup.js +87 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +8 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
- package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
- package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
- package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
- package/src/View/Dashboard/PinnedDashboard.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
- package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
- package/src/View/GridFilter/GridFilterPopup.js +10 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +51 -14
- package/src/View/GridFilter/NamedQuerySelector.js +1 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
- package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Notes/NoteEditor.d.ts +8 -0
- package/src/View/Notes/NoteEditor.js +33 -0
- package/src/View/Notes/NotesPopup.d.ts +2 -2
- package/src/View/Notes/NotesPopup.js +78 -55
- package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
- package/src/View/PlusMinus/MovePlusMinus.js +27 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
- package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
- package/src/agGrid/Adaptable.d.ts +7 -0
- package/src/agGrid/Adaptable.js +49 -35
- package/src/agGrid/BadgeRenderer.js +9 -5
- package/src/agGrid/agGridHelper.d.ts +2 -1
- package/src/agGrid/agGridHelper.js +15 -3
- package/src/agGrid/agGridMenuHelper.d.ts +2 -0
- package/src/agGrid/agGridMenuHelper.js +73 -25
- package/src/components/Datepicker/index.js +4 -4
- package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
- package/src/components/ExpressionEditor/index.js +4 -7
- package/src/components/InputGroup/InputGroup.d.ts +7 -0
- package/src/components/InputGroup/InputGroup.js +12 -0
- package/src/components/InputGroup/index.d.ts +1 -0
- package/src/components/InputGroup/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +7 -2
- package/src/components/Select/Select.d.ts +1 -2
- package/src/components/Select/Select.js +63 -23
- package/src/components/Textarea/index.d.ts +9 -0
- package/src/components/Textarea/index.js +50 -2
- package/src/components/Toastify/index.d.ts +2 -2
- package/src/components/Toastify/index.js +1 -1
- package/src/components/icons/comments.d.ts +3 -0
- package/src/components/icons/comments.js +7 -0
- package/src/components/icons/index.js +3 -1
- package/src/env.d.ts +3 -1
- package/src/env.js +3 -1
- package/src/metamodel/adaptable.metamodel.d.ts +72 -158
- package/src/metamodel/adaptable.metamodel.js +138 -260
- package/src/parser/src/parser.d.ts +2 -0
- package/src/parser/src/parser.js +1880 -705
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
- package/src/parser/src/predicate/types.d.ts +1 -1
- package/src/parser/src/types.d.ts +1 -1
- package/src/renderReactRoot.js +15 -0
- package/src/themes/index.js +4 -0
- package/src/types.d.ts +10 -13
- package/themes/dark.css +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
- package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
- package/src/Api/Events/SelectionChanged.d.ts +0 -16
- package/src/Api/FinsembleApi.d.ts +0 -10
- package/src/Api/Glue42Api.d.ts +0 -75
- package/src/Api/Glue42WebApi.d.ts +0 -10
- package/src/PredefinedConfig/Glue42State.d.ts +0 -46
- package/src/View/Notes/NotesListing.d.ts +0 -2
- package/src/View/Notes/NotesListing.js +0 -88
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
- package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
- package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
- /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
- /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
- /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
- /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
- /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
- /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
- /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
- /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
- /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeDateParam = exports.normalizeDateParams = void 0;
|
|
3
|
+
exports.formatDate = exports.normalizeDateParam = exports.normalizeDateParams = void 0;
|
|
4
4
|
const normalizeDateParams = (args) => {
|
|
5
5
|
let [first, second] = args;
|
|
6
6
|
if (typeof first === 'string') {
|
|
@@ -22,3 +22,20 @@ const normalizeDateParam = (args) => {
|
|
|
22
22
|
return args;
|
|
23
23
|
};
|
|
24
24
|
exports.normalizeDateParam = normalizeDateParam;
|
|
25
|
+
const formatDate = (date, format) => {
|
|
26
|
+
date = (0, exports.normalizeDateParam)(date);
|
|
27
|
+
const day = date.getDate();
|
|
28
|
+
const month = date.getMonth() + 1;
|
|
29
|
+
const year = date.getFullYear();
|
|
30
|
+
const hour = date.getHours();
|
|
31
|
+
const minute = date.getMinutes();
|
|
32
|
+
const second = date.getSeconds();
|
|
33
|
+
return format
|
|
34
|
+
.replace('DD', day.toString().padStart(2, '0'))
|
|
35
|
+
.replace('MM', month.toString().padStart(2, '0'))
|
|
36
|
+
.replace('YYYY', year.toString())
|
|
37
|
+
.replace('HH', hour.toString().padStart(2, '0'))
|
|
38
|
+
.replace('mm', minute.toString().padStart(2, '0'))
|
|
39
|
+
.replace('ss', second.toString().padStart(2, '0'));
|
|
40
|
+
};
|
|
41
|
+
exports.formatDate = formatDate;
|
|
@@ -2,6 +2,6 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of all the Scalar Functions available in AdaptableQL
|
|
4
4
|
*/
|
|
5
|
-
export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | '
|
|
5
|
+
export type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'ABS' | 'CEILING' | 'FLOOR' | 'ROUND' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'CURRENT_DAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'NULL' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'CASE' | 'COL' | 'VAR' | 'TO_ARRAY' | 'QUERY' | 'IS_BLANK' | 'IS_NOT_BLANK';
|
|
6
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
7
7
|
export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
|
|
@@ -151,7 +151,7 @@ exports.scalarExpressionFunctions = {
|
|
|
151
151
|
},
|
|
152
152
|
IS_NOT_BLANK: {
|
|
153
153
|
handler(args) {
|
|
154
|
-
return args[0] !== undefined && args[0] !== null &&
|
|
154
|
+
return args[0] !== undefined && args[0] !== null && String(args[0]).trim() !== '';
|
|
155
155
|
},
|
|
156
156
|
category: 'special',
|
|
157
157
|
description: 'Returns true if input value is not empty',
|
|
@@ -387,13 +387,13 @@ exports.scalarExpressionFunctions = {
|
|
|
387
387
|
category: 'dates',
|
|
388
388
|
returnType: 'date',
|
|
389
389
|
},
|
|
390
|
-
|
|
390
|
+
CURRENT_DAY: {
|
|
391
391
|
handler() {
|
|
392
392
|
return (0, startOfDay_1.default)(new Date());
|
|
393
393
|
},
|
|
394
394
|
description: 'Returns the current day',
|
|
395
|
-
signatures: ['
|
|
396
|
-
examples: ['[col1] >
|
|
395
|
+
signatures: ['CURRENT_DAY()'],
|
|
396
|
+
examples: ['[col1] > CURRENT_DAY()'],
|
|
397
397
|
category: 'dates',
|
|
398
398
|
returnType: 'date',
|
|
399
399
|
},
|
|
@@ -443,7 +443,7 @@ exports.scalarExpressionFunctions = {
|
|
|
443
443
|
},
|
|
444
444
|
description: 'Returns a date based on input data and days to add',
|
|
445
445
|
signatures: ['ADD_DAYS(input: date, days: number)'],
|
|
446
|
-
examples: ['ADD_DAYS(
|
|
446
|
+
examples: ['ADD_DAYS(CURRENT_DAY(), 5)', 'ADD_DAYS([col1], 5)'],
|
|
447
447
|
category: 'dates',
|
|
448
448
|
returnType: 'date',
|
|
449
449
|
},
|
|
@@ -453,7 +453,7 @@ exports.scalarExpressionFunctions = {
|
|
|
453
453
|
},
|
|
454
454
|
description: 'Returns a date based on input data and weeks to add',
|
|
455
455
|
signatures: ['ADD_WEEKS(input: date, weeks: number)'],
|
|
456
|
-
examples: ['ADD_WEEKS(
|
|
456
|
+
examples: ['ADD_WEEKS(CURRENT_DAY(), 5)', 'ADD_WEEKS([col1], 5)'],
|
|
457
457
|
category: 'dates',
|
|
458
458
|
returnType: 'date',
|
|
459
459
|
},
|
|
@@ -463,7 +463,7 @@ exports.scalarExpressionFunctions = {
|
|
|
463
463
|
},
|
|
464
464
|
description: 'Returns a date based on input data and months to add',
|
|
465
465
|
signatures: ['ADD_MONTHS(input: date, months: number)'],
|
|
466
|
-
examples: ['ADD_MONTHS(
|
|
466
|
+
examples: ['ADD_MONTHS(CURRENT_DAY(), 5)', 'ADD_MONTHS([col1], 5)'],
|
|
467
467
|
category: 'dates',
|
|
468
468
|
returnType: 'date',
|
|
469
469
|
},
|
|
@@ -473,7 +473,7 @@ exports.scalarExpressionFunctions = {
|
|
|
473
473
|
},
|
|
474
474
|
description: 'Returns a date based on input data and years to add',
|
|
475
475
|
signatures: ['ADD_YEARS(input: date, years: number)'],
|
|
476
|
-
examples: ['ADD_YEARS(
|
|
476
|
+
examples: ['ADD_YEARS(CURRENT_DAY(), 5)', 'ADD_YEARS([col1], 5)'],
|
|
477
477
|
category: 'dates',
|
|
478
478
|
returnType: 'date',
|
|
479
479
|
},
|
|
@@ -485,7 +485,7 @@ exports.scalarExpressionFunctions = {
|
|
|
485
485
|
},
|
|
486
486
|
description: 'Returns the difference in days between 2 dates',
|
|
487
487
|
signatures: ['DIFF_DAYS(a: date, b: date)'],
|
|
488
|
-
examples: ['DIFF_DAYS([col1],
|
|
488
|
+
examples: ['DIFF_DAYS([col1], CURRENT_DAY())'],
|
|
489
489
|
category: 'dates',
|
|
490
490
|
returnType: 'number',
|
|
491
491
|
},
|
|
@@ -497,7 +497,7 @@ exports.scalarExpressionFunctions = {
|
|
|
497
497
|
},
|
|
498
498
|
description: 'Returns the difference in weeks between 2 dates',
|
|
499
499
|
signatures: ['DIFF_WEEKS(a: date, b: date)'],
|
|
500
|
-
examples: ['DIFF_WEEKS([col1],
|
|
500
|
+
examples: ['DIFF_WEEKS([col1], CURRENT_DAY())'],
|
|
501
501
|
category: 'dates',
|
|
502
502
|
returnType: 'number',
|
|
503
503
|
},
|
|
@@ -509,7 +509,7 @@ exports.scalarExpressionFunctions = {
|
|
|
509
509
|
},
|
|
510
510
|
description: 'Returns the difference in months between 2 dates',
|
|
511
511
|
signatures: ['DIFF_MONTHS(a: date, b: date)'],
|
|
512
|
-
examples: ['DIFF_MONTHS([col1],
|
|
512
|
+
examples: ['DIFF_MONTHS([col1], CURRENT_DAY())'],
|
|
513
513
|
category: 'dates',
|
|
514
514
|
returnType: 'number',
|
|
515
515
|
},
|
|
@@ -521,7 +521,7 @@ exports.scalarExpressionFunctions = {
|
|
|
521
521
|
},
|
|
522
522
|
description: 'Returns the difference in years between 2 dates',
|
|
523
523
|
signatures: ['DIFF_YEARS(a: date, b: date)'],
|
|
524
|
-
examples: ['DIFF_YEARS([col1],
|
|
524
|
+
examples: ['DIFF_YEARS([col1], CURRENT_DAY())'],
|
|
525
525
|
category: 'dates',
|
|
526
526
|
returnType: 'number',
|
|
527
527
|
},
|
|
@@ -17,6 +17,7 @@ export declare function IsNotNullOrEmpty(arrayToCheck: any[] | undefined | null)
|
|
|
17
17
|
export declare function IsNullOrEmptyOrContainsSingleEmptyValue(arrayToCheck: any[]): boolean;
|
|
18
18
|
export declare function IsNotNullOrEmptyNorContainsSingleEmptyValue(arrayToCheck: any[]): boolean;
|
|
19
19
|
export declare function HasSingleEmptyValue(arrayToCheck: any[]): boolean;
|
|
20
|
+
export declare function getOccurrence(arrayToCheck: any[], valueToCheck: any): number;
|
|
20
21
|
export declare function hasOneItem(arrayToCheck: any[]): boolean;
|
|
21
22
|
export declare function hasItemsOfCount(arrayToCheck: any[], numberOfItems: number): boolean;
|
|
22
23
|
export declare function moveArray(array: any[], from: number, to: number): void;
|
|
@@ -50,6 +51,7 @@ export declare const ArrayExtensions: {
|
|
|
50
51
|
IsNullOrEmptyOrContainsSingleEmptyValue: typeof IsNullOrEmptyOrContainsSingleEmptyValue;
|
|
51
52
|
IsNotNullOrEmptyNorContainsSingleEmptyValue: typeof IsNotNullOrEmptyNorContainsSingleEmptyValue;
|
|
52
53
|
HasSingleEmptyValue: typeof HasSingleEmptyValue;
|
|
54
|
+
getOccurrence: typeof getOccurrence;
|
|
53
55
|
hasOneItem: typeof hasOneItem;
|
|
54
56
|
hasItemsOfCount: typeof hasItemsOfCount;
|
|
55
57
|
moveArray: typeof moveArray;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayExtensions = exports.createCommaSeparatedString = exports.groupArrayBy = exports.sortCellValueArrayDates = exports.sortCellValueArrayNumeric = exports.sortCellValueArray = exports.sortArray = exports.sortArrayWithProperty = exports.areArraysEqualWithOrderandProperties = exports.areArraysEqualWithOrder = exports.areArraysNotEqual = exports.areArraysEqual = exports.moveArray = exports.hasItemsOfCount = exports.hasOneItem = exports.HasSingleEmptyValue = exports.IsNotNullOrEmptyNorContainsSingleEmptyValue = exports.IsNullOrEmptyOrContainsSingleEmptyValue = exports.IsNotNullOrEmpty = exports.IsNullOrEmpty = exports.IsNotEmpty = exports.IsEmpty = exports.IsNotNull = exports.IsNull = exports.RetrieveDistinct = exports.NotContainsItem = exports.ContainsAnyItem = exports.ContainsItem = exports.AddItem = exports.NotCorrectLength = exports.CorrectLength = exports.GetLength = void 0;
|
|
3
|
+
exports.ArrayExtensions = exports.createCommaSeparatedString = exports.groupArrayBy = exports.sortCellValueArrayDates = exports.sortCellValueArrayNumeric = exports.sortCellValueArray = exports.sortArray = exports.sortArrayWithProperty = exports.areArraysEqualWithOrderandProperties = exports.areArraysEqualWithOrder = exports.areArraysNotEqual = exports.areArraysEqual = exports.moveArray = exports.hasItemsOfCount = exports.hasOneItem = exports.getOccurrence = exports.HasSingleEmptyValue = exports.IsNotNullOrEmptyNorContainsSingleEmptyValue = exports.IsNullOrEmptyOrContainsSingleEmptyValue = exports.IsNotNullOrEmpty = exports.IsNullOrEmpty = exports.IsNotEmpty = exports.IsEmpty = exports.IsNotNull = exports.IsNull = exports.RetrieveDistinct = exports.NotContainsItem = exports.ContainsAnyItem = exports.ContainsItem = exports.AddItem = exports.NotCorrectLength = exports.CorrectLength = exports.GetLength = void 0;
|
|
4
4
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
5
5
|
function GetLength(arrayToCheck) {
|
|
6
6
|
return IsNotNull(arrayToCheck) ? arrayToCheck.length : 0;
|
|
@@ -95,6 +95,12 @@ function HasSingleEmptyValue(arrayToCheck) {
|
|
|
95
95
|
return false;
|
|
96
96
|
}
|
|
97
97
|
exports.HasSingleEmptyValue = HasSingleEmptyValue;
|
|
98
|
+
function getOccurrence(arrayToCheck, valueToCheck) {
|
|
99
|
+
var count = 0;
|
|
100
|
+
arrayToCheck.forEach((v) => v === valueToCheck && count++);
|
|
101
|
+
return count;
|
|
102
|
+
}
|
|
103
|
+
exports.getOccurrence = getOccurrence;
|
|
98
104
|
function hasOneItem(arrayToCheck) {
|
|
99
105
|
return hasItemsOfCount(arrayToCheck, 1);
|
|
100
106
|
}
|
|
@@ -302,6 +308,7 @@ exports.ArrayExtensions = {
|
|
|
302
308
|
IsNullOrEmptyOrContainsSingleEmptyValue,
|
|
303
309
|
IsNotNullOrEmptyNorContainsSingleEmptyValue,
|
|
304
310
|
HasSingleEmptyValue,
|
|
311
|
+
getOccurrence,
|
|
305
312
|
hasOneItem,
|
|
306
313
|
hasItemsOfCount,
|
|
307
314
|
moveArray,
|
|
@@ -44,7 +44,8 @@ function GetCellInfosFromPreview(previewInfo, bypassValidationWarnings) {
|
|
|
44
44
|
normalisedValue: previewResult.computedValue,
|
|
45
45
|
rowNode: previewResult.rowNode,
|
|
46
46
|
column: previewInfo.column,
|
|
47
|
-
isPivotCell: false,
|
|
47
|
+
isPivotCell: false,
|
|
48
|
+
isRowGroupCell: false,
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -59,7 +60,9 @@ function GetCellInfosFromPreview(previewInfo, bypassValidationWarnings) {
|
|
|
59
60
|
rawValue: pr.computedValue,
|
|
60
61
|
displayValue: pr.computedValue,
|
|
61
62
|
normalisedValue: pr.computedValue,
|
|
62
|
-
rowNode: pr.rowNode,
|
|
63
|
+
rowNode: pr.rowNode,
|
|
64
|
+
isPivotCell: false,
|
|
65
|
+
isRowGroupCell: false,
|
|
63
66
|
});
|
|
64
67
|
});
|
|
65
68
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { ScheduleType } from '../PredefinedConfig/Common/Enums';
|
|
2
|
-
import { CustomSort } from '../PredefinedConfig/CustomSortState';
|
|
3
|
-
import { CalculatedColumn } from '../PredefinedConfig/CalculatedColumnState';
|
|
4
|
-
import { PlusMinusNudge } from '../PredefinedConfig/PlusMinusState';
|
|
5
1
|
import { AlertDefinition, AlertProperties } from '../PredefinedConfig/AlertState';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { CalculatedColumn } from '../PredefinedConfig/CalculatedColumnState';
|
|
3
|
+
import { AdaptableCellChangedAlert, AdaptableGenericAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
8
4
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
5
|
+
import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessageType';
|
|
6
|
+
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
7
|
+
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
8
|
+
import { ScheduleType } from '../PredefinedConfig/Common/Enums';
|
|
9
9
|
import { BaseSchedule, Schedule } from '../PredefinedConfig/Common/Schedule';
|
|
10
|
-
import {
|
|
10
|
+
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
11
|
+
import { CustomSort } from '../PredefinedConfig/CustomSortState';
|
|
12
|
+
import { Report, ReportSchedule } from '../PredefinedConfig/ExportState';
|
|
11
13
|
import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
|
|
12
14
|
import { FreeTextColumn } from '../PredefinedConfig/FreeTextColumnState';
|
|
13
|
-
import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
|
|
14
|
-
import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
|
|
15
|
-
import { Glue42Report, Glue42Schedule } from '../PredefinedConfig/Glue42State';
|
|
16
|
-
import { IPushPullReport } from '../PredefinedConfig/SystemState';
|
|
17
15
|
import { IPushPullSchedule } from '../PredefinedConfig/IPushPullState';
|
|
16
|
+
import { Layout } from '../PredefinedConfig/LayoutState';
|
|
18
17
|
import { OpenFinReport, OpenFinSchedule } from '../PredefinedConfig/OpenFinState';
|
|
18
|
+
import { PlusMinusNudge } from '../PredefinedConfig/PlusMinusState';
|
|
19
19
|
import { ReminderSchedule } from '../PredefinedConfig/ScheduleState';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
20
|
+
import { Shortcut } from '../PredefinedConfig/ShortcutState';
|
|
21
|
+
import { IPushPullReport } from '../PredefinedConfig/SystemState';
|
|
23
22
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
24
23
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
25
|
-
import { AdaptableTheme, BaseContext, ChartDefinition, ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
24
|
+
import { AdaptableTheme, BaseContext, ChartDefinition, ColumnFilter, CommentThread, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
26
25
|
import { IRowNode } from '@ag-grid-community/core';
|
|
27
|
-
import { AdaptableApi, BadgeStyleDefinition, NamedQuery } from '../../types';
|
|
26
|
+
import { AdaptableApi, AdaptableComment, BadgeStyleDefinition, CellAddress, NamedQuery } from '../../types';
|
|
28
27
|
import { ToastOptions } from '../components/Toastify';
|
|
29
28
|
import { StyledColumn } from '../PredefinedConfig/StyledColumnState';
|
|
30
29
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
30
|
+
export declare function CreateAdaptableComment(text: string, api: AdaptableApi): AdaptableComment;
|
|
31
31
|
export declare function CreateEmptyCalculatedColumn(): CalculatedColumn;
|
|
32
32
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
33
33
|
export declare function CreateEmptyPlusMinusNudge(): PlusMinusNudge;
|
|
@@ -43,13 +43,10 @@ export declare function CreateEmptyBaseSchedule(scheduleType: ScheduleType): Bas
|
|
|
43
43
|
export declare function CreateEmptyReminderSchedule(): ReminderSchedule;
|
|
44
44
|
export declare function CreateEmptyReportSchedule(): ReportSchedule;
|
|
45
45
|
export declare function CreateEmptyIPushPullReport(): IPushPullReport;
|
|
46
|
-
export declare function CreateEmptyGlue42Report(): Glue42Report;
|
|
47
46
|
export declare function CreateEmptyOpenFinReport(): OpenFinReport;
|
|
48
47
|
export declare function CreateEmptyIPushPullSchedule(): IPushPullSchedule;
|
|
49
|
-
export declare function CreateEmptyGlue42Schedule(): Glue42Schedule;
|
|
50
48
|
export declare function CreateEmptyOpenFinSchedule(): OpenFinSchedule;
|
|
51
49
|
export declare function CreateIPushPullSchedule(iPushPullReport: IPushPullReport): IPushPullSchedule;
|
|
52
|
-
export declare function CreateGlue42Schedule(glue42Report: Glue42Report): Glue42Schedule;
|
|
53
50
|
export declare function CreateReportSchedule(reportName: string): ReportSchedule;
|
|
54
51
|
export declare function CreateEmptySchedule(): Schedule;
|
|
55
52
|
export declare function CreateEmptyShortcut(): Shortcut;
|
|
@@ -68,6 +65,7 @@ export declare function CreateEmptyChartDefinition(chartDefinition?: ChartDefini
|
|
|
68
65
|
export declare function CreateCustomDisplayFormatterContext(value: any, node: IRowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
69
66
|
export declare const createBaseContext: (adaptableApi: AdaptableApi) => BaseContext;
|
|
70
67
|
export declare function CreateEmptyTheme(name?: string): AdaptableTheme;
|
|
68
|
+
export declare function CreateEmptyCommentThread(cellAddress: CellAddress): CommentThread;
|
|
71
69
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
72
70
|
onClose?: VoidFunction;
|
|
73
71
|
containerId: string;
|
|
@@ -93,7 +91,6 @@ export declare const ObjectFactory: {
|
|
|
93
91
|
CreateEmptyIPushPullSchedule: typeof CreateEmptyIPushPullSchedule;
|
|
94
92
|
CreateEmptyIPushPullReport: typeof CreateEmptyIPushPullReport;
|
|
95
93
|
CreateIPushPullSchedule: typeof CreateIPushPullSchedule;
|
|
96
|
-
CreateGlue42Schedule: typeof CreateGlue42Schedule;
|
|
97
94
|
CreateReportSchedule: typeof CreateReportSchedule;
|
|
98
95
|
CreateEmptyOpenFinReport: typeof CreateEmptyOpenFinReport;
|
|
99
96
|
CreateEmptyOpenFinSchedule: typeof CreateEmptyOpenFinSchedule;
|
|
@@ -105,8 +102,6 @@ export declare const ObjectFactory: {
|
|
|
105
102
|
CreateColumnFilter: typeof CreateColumnFilter;
|
|
106
103
|
CreateEmptyStyle: typeof CreateEmptyStyle;
|
|
107
104
|
CreateEmptyCellSummmary: typeof CreateEmptyCellSummmary;
|
|
108
|
-
CreateEmptyGlue42Schedule: typeof CreateEmptyGlue42Schedule;
|
|
109
|
-
CreateEmptyGlue42Report: typeof CreateEmptyGlue42Report;
|
|
110
105
|
CreateSystemStatusMessageInfo: typeof CreateSystemStatusMessageInfo;
|
|
111
106
|
CreateToastOptions: typeof CreateToastOptions;
|
|
112
107
|
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
@@ -114,5 +109,7 @@ export declare const ObjectFactory: {
|
|
|
114
109
|
CreateDefaultStyledColumnBadge: typeof CreateDefaultStyledColumnBadge;
|
|
115
110
|
CreateEmptyChartDefinition: typeof CreateEmptyChartDefinition;
|
|
116
111
|
CreateEmptyTheme: typeof CreateEmptyTheme;
|
|
112
|
+
CreateEmptyCommentThread: typeof CreateEmptyCommentThread;
|
|
113
|
+
CreateAdaptableComment: typeof CreateAdaptableComment;
|
|
117
114
|
};
|
|
118
115
|
export default ObjectFactory;
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyTheme = exports.createBaseContext = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateDefaultStyledColumnBadge = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyCommentThread = exports.CreateEmptyTheme = exports.createBaseContext = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateDefaultStyledColumnBadge = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateExternalReport = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateAdaptableComment = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
|
-
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
5
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
6
|
+
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
7
7
|
const Toastify_1 = require("../components/Toastify");
|
|
8
8
|
const UIHelper_1 = require("../View/UIHelper");
|
|
9
9
|
function CreateEmptyCustomSort() {
|
|
10
10
|
return { Uuid: (0, Uuid_1.createUuid)(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
11
11
|
}
|
|
12
12
|
exports.CreateEmptyCustomSort = CreateEmptyCustomSort;
|
|
13
|
+
function CreateAdaptableComment(text, api) {
|
|
14
|
+
const comment = {
|
|
15
|
+
Value: text,
|
|
16
|
+
AdaptableId: api.optionsApi.getAdaptableId(),
|
|
17
|
+
Author: {
|
|
18
|
+
UserName: api.optionsApi.getUserName(),
|
|
19
|
+
},
|
|
20
|
+
Timestamp: Date.now(),
|
|
21
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
22
|
+
};
|
|
23
|
+
return comment;
|
|
24
|
+
}
|
|
25
|
+
exports.CreateAdaptableComment = CreateAdaptableComment;
|
|
13
26
|
function CreateEmptyCalculatedColumn() {
|
|
14
27
|
return {
|
|
15
28
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -184,13 +197,6 @@ function CreateEmptyIPushPullReport() {
|
|
|
184
197
|
};
|
|
185
198
|
}
|
|
186
199
|
exports.CreateEmptyIPushPullReport = CreateEmptyIPushPullReport;
|
|
187
|
-
function CreateEmptyGlue42Report() {
|
|
188
|
-
return {
|
|
189
|
-
Uuid: (0, Uuid_1.createUuid)(),
|
|
190
|
-
ReportName: GeneralConstants_1.EMPTY_STRING,
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
exports.CreateEmptyGlue42Report = CreateEmptyGlue42Report;
|
|
194
200
|
function CreateEmptyOpenFinReport() {
|
|
195
201
|
return {
|
|
196
202
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -208,16 +214,6 @@ function CreateEmptyIPushPullSchedule() {
|
|
|
208
214
|
};
|
|
209
215
|
}
|
|
210
216
|
exports.CreateEmptyIPushPullSchedule = CreateEmptyIPushPullSchedule;
|
|
211
|
-
function CreateEmptyGlue42Schedule() {
|
|
212
|
-
return {
|
|
213
|
-
Uuid: (0, Uuid_1.createUuid)(),
|
|
214
|
-
ScheduleType: Enums_1.ScheduleType.Glue42,
|
|
215
|
-
Schedule: CreateEmptySchedule(),
|
|
216
|
-
Glue42Report: CreateEmptyGlue42Report(),
|
|
217
|
-
Transmission: 'Snapshot',
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
exports.CreateEmptyGlue42Schedule = CreateEmptyGlue42Schedule;
|
|
221
217
|
function CreateEmptyOpenFinSchedule() {
|
|
222
218
|
return {
|
|
223
219
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -238,16 +234,6 @@ function CreateIPushPullSchedule(iPushPullReport) {
|
|
|
238
234
|
};
|
|
239
235
|
}
|
|
240
236
|
exports.CreateIPushPullSchedule = CreateIPushPullSchedule;
|
|
241
|
-
function CreateGlue42Schedule(glue42Report) {
|
|
242
|
-
return {
|
|
243
|
-
Uuid: (0, Uuid_1.createUuid)(),
|
|
244
|
-
ScheduleType: Enums_1.ScheduleType.Glue42,
|
|
245
|
-
Schedule: CreateEmptySchedule(),
|
|
246
|
-
Glue42Report: glue42Report,
|
|
247
|
-
Transmission: 'Snapshot',
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
exports.CreateGlue42Schedule = CreateGlue42Schedule;
|
|
251
237
|
function CreateReportSchedule(reportName) {
|
|
252
238
|
return {
|
|
253
239
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -411,6 +397,40 @@ function CreateEmptyTheme(name) {
|
|
|
411
397
|
};
|
|
412
398
|
}
|
|
413
399
|
exports.CreateEmptyTheme = CreateEmptyTheme;
|
|
400
|
+
function CreateEmptyCommentThread(cellAddress) {
|
|
401
|
+
return Object.assign(Object.assign({}, cellAddress), { Comments: [] });
|
|
402
|
+
}
|
|
403
|
+
exports.CreateEmptyCommentThread = CreateEmptyCommentThread;
|
|
404
|
+
function getToastPosition(position) {
|
|
405
|
+
switch (position) {
|
|
406
|
+
case 'BottomLeft':
|
|
407
|
+
return 'bottom-left';
|
|
408
|
+
case 'BottomCenter':
|
|
409
|
+
return 'bottom-center';
|
|
410
|
+
case 'BottomRight':
|
|
411
|
+
return 'bottom-right';
|
|
412
|
+
case 'TopLeft':
|
|
413
|
+
return 'top-left';
|
|
414
|
+
case 'TopCenter':
|
|
415
|
+
return 'top-center';
|
|
416
|
+
case 'TopRight':
|
|
417
|
+
return 'top-right';
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
function getToastTransition(transition) {
|
|
421
|
+
switch (transition) {
|
|
422
|
+
case 'Bounce':
|
|
423
|
+
return Toastify_1.Bounce;
|
|
424
|
+
case 'Slide':
|
|
425
|
+
return Toastify_1.Slide;
|
|
426
|
+
case 'Zoom':
|
|
427
|
+
return Toastify_1.Zoom;
|
|
428
|
+
case 'Flip':
|
|
429
|
+
return Toastify_1.Flip;
|
|
430
|
+
default:
|
|
431
|
+
return Toastify_1.Bounce;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
414
434
|
function CreateToastOptions(notificationsOptions, { onClose, containerId }, overides) {
|
|
415
435
|
var _a;
|
|
416
436
|
const adaptableToastPosition = notificationsOptions.position;
|
|
@@ -437,34 +457,6 @@ function CreateToastOptions(notificationsOptions, { onClose, containerId }, over
|
|
|
437
457
|
return toastProps;
|
|
438
458
|
}
|
|
439
459
|
exports.CreateToastOptions = CreateToastOptions;
|
|
440
|
-
function getToastPosition(position) {
|
|
441
|
-
switch (position) {
|
|
442
|
-
case 'BottomLeft':
|
|
443
|
-
return Toastify_1.toast.POSITION.BOTTOM_LEFT;
|
|
444
|
-
case 'BottomCenter':
|
|
445
|
-
return Toastify_1.toast.POSITION.BOTTOM_CENTER;
|
|
446
|
-
case 'BottomRight':
|
|
447
|
-
return Toastify_1.toast.POSITION.BOTTOM_RIGHT;
|
|
448
|
-
case 'TopLeft':
|
|
449
|
-
return Toastify_1.toast.POSITION.TOP_LEFT;
|
|
450
|
-
case 'TopCenter':
|
|
451
|
-
return Toastify_1.toast.POSITION.TOP_CENTER;
|
|
452
|
-
case 'TopRight':
|
|
453
|
-
return Toastify_1.toast.POSITION.TOP_RIGHT;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
function getToastTransition(transition) {
|
|
457
|
-
switch (transition) {
|
|
458
|
-
case 'Bounce':
|
|
459
|
-
return Toastify_1.Bounce;
|
|
460
|
-
case 'Slide':
|
|
461
|
-
return Toastify_1.Slide;
|
|
462
|
-
case 'Zoom':
|
|
463
|
-
return Toastify_1.Zoom;
|
|
464
|
-
case 'Flip':
|
|
465
|
-
return Toastify_1.Flip;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
460
|
exports.ObjectFactory = {
|
|
469
461
|
CreateEmptyCustomSort,
|
|
470
462
|
CreateEmptyCalculatedColumn,
|
|
@@ -484,7 +476,6 @@ exports.ObjectFactory = {
|
|
|
484
476
|
CreateEmptyIPushPullSchedule,
|
|
485
477
|
CreateEmptyIPushPullReport,
|
|
486
478
|
CreateIPushPullSchedule,
|
|
487
|
-
CreateGlue42Schedule,
|
|
488
479
|
CreateReportSchedule,
|
|
489
480
|
CreateEmptyOpenFinReport,
|
|
490
481
|
CreateEmptyOpenFinSchedule,
|
|
@@ -496,8 +487,6 @@ exports.ObjectFactory = {
|
|
|
496
487
|
CreateColumnFilter,
|
|
497
488
|
CreateEmptyStyle,
|
|
498
489
|
CreateEmptyCellSummmary,
|
|
499
|
-
CreateEmptyGlue42Schedule,
|
|
500
|
-
CreateEmptyGlue42Report,
|
|
501
490
|
CreateSystemStatusMessageInfo,
|
|
502
491
|
CreateToastOptions,
|
|
503
492
|
CreateCustomDisplayFormatterContext,
|
|
@@ -505,5 +494,7 @@ exports.ObjectFactory = {
|
|
|
505
494
|
CreateDefaultStyledColumnBadge,
|
|
506
495
|
CreateEmptyChartDefinition,
|
|
507
496
|
CreateEmptyTheme,
|
|
497
|
+
CreateEmptyCommentThread,
|
|
498
|
+
CreateAdaptableComment,
|
|
508
499
|
};
|
|
509
500
|
exports.default = exports.ObjectFactory;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
|
+
import { AdaptableApi, CellAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* This service controls the interaction between notes and comments
|
|
5
|
+
*/
|
|
6
|
+
export declare class CellPopupService {
|
|
7
|
+
private api;
|
|
8
|
+
adaptable: IAdaptable;
|
|
9
|
+
constructor(api: AdaptableApi);
|
|
10
|
+
private getAdaptableState;
|
|
11
|
+
private dispatchAction;
|
|
12
|
+
static isSameAddress(a: CellAddress, b: CellAddress): boolean;
|
|
13
|
+
private handleAdaptableReady;
|
|
14
|
+
private getCellPositionFromEvent;
|
|
15
|
+
private handleMouseEnter;
|
|
16
|
+
private handleCellSelected;
|
|
17
|
+
getOpenCellAddress(): CellAddress | undefined;
|
|
18
|
+
getEditMode(): boolean;
|
|
19
|
+
hidePopup(): void;
|
|
20
|
+
showPopup(cellAddress: CellAddress, editMode: boolean): void;
|
|
21
|
+
editFocusedEntity(entity: 'Note' | 'Comment'): void;
|
|
22
|
+
getNotePopupEditMode(): boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CellPopupService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
6
|
+
/**
|
|
7
|
+
* This service controls the interaction between notes and comments
|
|
8
|
+
*/
|
|
9
|
+
class CellPopupService {
|
|
10
|
+
constructor(api) {
|
|
11
|
+
this.api = api;
|
|
12
|
+
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
13
|
+
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
14
|
+
this.adaptable.api.eventApi.on('AdaptableReady', () => this.handleAdaptableReady());
|
|
15
|
+
}
|
|
16
|
+
getAdaptableState() {
|
|
17
|
+
return this.api.internalApi.getAdaptableState();
|
|
18
|
+
}
|
|
19
|
+
dispatchAction(action) {
|
|
20
|
+
this.api.internalApi.dispatchReduxAction(action);
|
|
21
|
+
}
|
|
22
|
+
static isSameAddress(a, b) {
|
|
23
|
+
if (!a || !b) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if ((a === null || a === void 0 ? void 0 : a.ColumnId) === (b === null || b === void 0 ? void 0 : b.ColumnId) && (a === null || a === void 0 ? void 0 : a.PrimaryKeyValue) === (b === null || b === void 0 ? void 0 : b.PrimaryKeyValue)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
// Primary keys retreived from the grid dom are always strings, so we must also consider them strings
|
|
30
|
+
if ((typeof a.PrimaryKeyValue === 'number' && typeof b.PrimaryKeyValue === 'string') ||
|
|
31
|
+
(typeof b.PrimaryKeyValue === 'string' && typeof a.PrimaryKeyValue === 'number')) {
|
|
32
|
+
return (a.PrimaryKeyValue.toString() === b.PrimaryKeyValue.toString() && a.ColumnId === b.ColumnId);
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
handleAdaptableReady() {
|
|
37
|
+
this.adaptable._on('MouseEnter', (event) => this.handleMouseEnter(event));
|
|
38
|
+
this.api.eventApi.on('CellSelectionChanged', (params) => {
|
|
39
|
+
var _a;
|
|
40
|
+
const cells = params.selectedCellInfo.gridCells;
|
|
41
|
+
if ((cells === null || cells === void 0 ? void 0 : cells.length) === 1 && ((_a = cells[0].column) === null || _a === void 0 ? void 0 : _a.columnId) && cells[0].primaryKeyValue) {
|
|
42
|
+
const selectedCell = cells[0];
|
|
43
|
+
const cellSelected = {
|
|
44
|
+
PrimaryKeyValue: selectedCell.primaryKeyValue,
|
|
45
|
+
ColumnId: selectedCell.column.columnId,
|
|
46
|
+
};
|
|
47
|
+
this.handleCellSelected(cellSelected);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getCellPositionFromEvent(event) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
const target = event.target;
|
|
54
|
+
if (!((_b = (_a = target === null || target === void 0 ? void 0 : target.classList) === null || _a === void 0 ? void 0 : _a.contains) === null || _b === void 0 ? void 0 : _b.call(_a, 'ag-cell'))) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const PrimaryKeyValue = target.parentElement.getAttribute('row-id');
|
|
59
|
+
return {
|
|
60
|
+
PrimaryKeyValue,
|
|
61
|
+
ColumnId: target.getAttribute('col-id'),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
handleMouseEnter(event) {
|
|
69
|
+
const editMode = this.getEditMode();
|
|
70
|
+
if (editMode) {
|
|
71
|
+
// ignore
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const cellPosition = this.getCellPositionFromEvent(event);
|
|
75
|
+
const openCellAddress = this.getOpenCellAddress();
|
|
76
|
+
// Hovering over someting that is not a cell and there is no open note
|
|
77
|
+
if (!cellPosition && openCellAddress) {
|
|
78
|
+
// need to close if the new cell does not have a note
|
|
79
|
+
this.hidePopup();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const cellNotes = this.adaptable.api.notesApi.getCellNotes(cellPosition);
|
|
83
|
+
const cellComments = this.adaptable.api.commentApi.getCommentThread(cellPosition);
|
|
84
|
+
const hasNotesOrComments = (cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length) || cellComments;
|
|
85
|
+
// call only if it is different
|
|
86
|
+
if (CellPopupService.isSameAddress(openCellAddress, cellPosition)) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (hasNotesOrComments) {
|
|
90
|
+
this.showPopup(cellPosition, false);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
handleCellSelected(cellAddress) {
|
|
94
|
+
// if already opened - do nothing
|
|
95
|
+
const openCellAddress = this.getOpenCellAddress();
|
|
96
|
+
if (CellPopupService.isSameAddress(openCellAddress, cellAddress)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// if open but this has no note, close
|
|
100
|
+
const cellNotes = this.adaptable.api.notesApi.getCellNotes(cellAddress);
|
|
101
|
+
const cellComments = this.adaptable.api.commentApi.getCommentThread(cellAddress);
|
|
102
|
+
const hasNotesOrComments = (cellNotes === null || cellNotes === void 0 ? void 0 : cellNotes.length) || cellComments;
|
|
103
|
+
if (openCellAddress && !hasNotesOrComments) {
|
|
104
|
+
// hide only if in edit mode
|
|
105
|
+
// because if you select a cell and move the mouse fast over another cell
|
|
106
|
+
// with a note, you do not want to close that note
|
|
107
|
+
// the selection is debounced, so the moment goes over the new cell this event is triggered
|
|
108
|
+
if (this.getEditMode()) {
|
|
109
|
+
this.hidePopup();
|
|
110
|
+
}
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
// if open but the new selection has a note open that one in edit mode (because of click)
|
|
114
|
+
if (openCellAddress && hasNotesOrComments) {
|
|
115
|
+
this.showPopup(cellAddress, true);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
getOpenCellAddress() {
|
|
120
|
+
return SystemRedux.SystemCommentsAndNotesSelector(this.getAdaptableState().System);
|
|
121
|
+
}
|
|
122
|
+
getEditMode() {
|
|
123
|
+
return SystemRedux.SystemCommentsAndNotesEditModeSelector(this.getAdaptableState().System);
|
|
124
|
+
}
|
|
125
|
+
hidePopup() {
|
|
126
|
+
this.dispatchAction(SystemRedux.SystemCellPopupHide());
|
|
127
|
+
}
|
|
128
|
+
showPopup(cellAddress, editMode) {
|
|
129
|
+
this.dispatchAction(SystemRedux.SystemCellPopupShow(cellAddress, editMode));
|
|
130
|
+
}
|
|
131
|
+
editFocusedEntity(entity) {
|
|
132
|
+
this.dispatchAction(SystemRedux.SystemCellPopupEditFocusedEntity(entity));
|
|
133
|
+
}
|
|
134
|
+
getNotePopupEditMode() {
|
|
135
|
+
return SystemRedux.SystemCommentsAndNotesEditModeSelector(this.getAdaptableState().System);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.CellPopupService = CellPopupService;
|
|
@@ -17,7 +17,7 @@ export interface IReportService extends IAdaptableService {
|
|
|
17
17
|
GetReportColumnScopeShortDescription(report: Report): string[];
|
|
18
18
|
GetReportColumnScopeLongDescription(report: Report): string;
|
|
19
19
|
GetReportExpressionDescription(Report: Report, cols: AdaptableColumn[]): string;
|
|
20
|
-
PublishLiveLiveDataChangedEvent(reportDestination: 'OpenFin' | 'ipushpull'
|
|
20
|
+
PublishLiveLiveDataChangedEvent(reportDestination: 'OpenFin' | 'ipushpull', liveDataChangedTrigger: 'Connected' | 'Disconnected' | 'SnapshotSent' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
|
|
21
21
|
getReportDataColumns(report: Report, includePrimaryKey?: boolean): AdaptableColumnBase[];
|
|
22
22
|
getReportDataRows(report: Report, columns: AdaptableColumnBase[], includePrimaryKey?: boolean): Record<string, any>[];
|
|
23
23
|
getReportData(report: Report, includePrimaryKey?: boolean): ReportData;
|