@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
|
@@ -25,6 +25,7 @@ import { ChartingState } from './ChartingState';
|
|
|
25
25
|
import { StyledColumnState } from './StyledColumnState';
|
|
26
26
|
import { NotesState } from './NotesState';
|
|
27
27
|
import { NamedQueryState } from './NamedQueryState';
|
|
28
|
+
import { CommentState } from './CommentState';
|
|
28
29
|
/**
|
|
29
30
|
* The main state object of Adaptable
|
|
30
31
|
*/
|
|
@@ -58,8 +59,8 @@ export interface AdaptablePersistentState {
|
|
|
58
59
|
Charting: ChartingState;
|
|
59
60
|
Notes: NotesState;
|
|
60
61
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
* @deprecated
|
|
63
|
+
*/
|
|
63
64
|
Query: QueryState;
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
@@ -69,6 +70,7 @@ export interface AdaptableTransientState {
|
|
|
69
70
|
Popup: PopupState;
|
|
70
71
|
Grid: GridState;
|
|
71
72
|
System: SystemState;
|
|
73
|
+
Comment: CommentState;
|
|
72
74
|
Plugins: {
|
|
73
75
|
[key: string]: any;
|
|
74
76
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AdaptableObject } from '../types';
|
|
2
|
+
import { ConfigState } from './ConfigState';
|
|
3
|
+
/**
|
|
4
|
+
* Note that can be applied to a Cell in AdapTable
|
|
5
|
+
*/
|
|
6
|
+
export interface AdaptableComment extends AdaptableObject {
|
|
7
|
+
/**
|
|
8
|
+
* When Note was made
|
|
9
|
+
*/
|
|
10
|
+
Timestamp: number;
|
|
11
|
+
/**
|
|
12
|
+
* Value of the Note
|
|
13
|
+
*/
|
|
14
|
+
Value: string;
|
|
15
|
+
/**
|
|
16
|
+
* Author of the Note
|
|
17
|
+
*/
|
|
18
|
+
Author?: {
|
|
19
|
+
UserName: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Id of this AdapTable instance
|
|
23
|
+
*/
|
|
24
|
+
AdaptableId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CommentThread extends AdaptableObject {
|
|
27
|
+
/**
|
|
28
|
+
* Value in Primary Key Column
|
|
29
|
+
*/
|
|
30
|
+
PrimaryKeyValue: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* Id of Column containing the Note
|
|
33
|
+
*/
|
|
34
|
+
ColumnId: string;
|
|
35
|
+
/**
|
|
36
|
+
* Collection of Comments for this Cell
|
|
37
|
+
*/
|
|
38
|
+
Comments: AdaptableComment[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Predefined Configuration for Notes Module
|
|
42
|
+
*/
|
|
43
|
+
export interface CommentState extends ConfigState {
|
|
44
|
+
/**
|
|
45
|
+
* Collection of AdapTable Notes
|
|
46
|
+
*/
|
|
47
|
+
CommentThreads?: CommentThread[];
|
|
48
|
+
}
|
|
@@ -54,4 +54,4 @@ export interface AdaptableBaseIcon {
|
|
|
54
54
|
/**
|
|
55
55
|
* All AdapTable System Icon names
|
|
56
56
|
*/
|
|
57
|
-
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
|
|
57
|
+
export type AdaptableSystemIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'fdc3' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'comments' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'dollar' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'interactions' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'mail' | 'menu' | 'minus' | 'multiplication' | 'money' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'order' | 'organisation' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'contact' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'science' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'resume' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold' | 'note' | 'import' | 'grid-filter';
|
|
@@ -38,7 +38,8 @@ exports.SystemPredicateDefs = [
|
|
|
38
38
|
}
|
|
39
39
|
if (column.dataType === 'Date') {
|
|
40
40
|
return inputs.some((input) => {
|
|
41
|
-
if (adaptableApi.optionsApi.getColumnFilterOptions().valuesFilterOptions
|
|
41
|
+
if (adaptableApi.optionsApi.getColumnFilterOptions().valuesFilterOptions
|
|
42
|
+
.filterValuesUsingTime) {
|
|
42
43
|
return (0, isEqual_1.default)(input, value);
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
@@ -22,7 +22,6 @@ var ScheduleType;
|
|
|
22
22
|
(function (ScheduleType) {
|
|
23
23
|
ScheduleType["Report"] = "Report";
|
|
24
24
|
ScheduleType["ipushpull"] = "ipushpull";
|
|
25
|
-
ScheduleType["Glue42"] = "Glue42";
|
|
26
25
|
ScheduleType["Reminder"] = "Reminder";
|
|
27
26
|
ScheduleType["OpenFin"] = "OpenFin";
|
|
28
27
|
})(ScheduleType = exports.ScheduleType || (exports.ScheduleType = {}));
|
|
@@ -32,7 +32,7 @@ export interface BaseSchedule extends SuspendableObject {
|
|
|
32
32
|
/**
|
|
33
33
|
* The type of Schedule
|
|
34
34
|
*/
|
|
35
|
-
ScheduleType: 'Report' | 'ipushpull' | '
|
|
35
|
+
ScheduleType: 'Report' | 'ipushpull' | 'Reminder' | 'OpenFin';
|
|
36
36
|
}
|
|
37
37
|
export type Weekdays = Weekday[];
|
|
38
38
|
export type Weekday = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday';
|
|
@@ -6,7 +6,7 @@ export type AdaptableDashboardToolbars = AdaptableDashboardToolbar[];
|
|
|
6
6
|
/**
|
|
7
7
|
* List of all the Toolbars that Adaptable provides
|
|
8
8
|
*/
|
|
9
|
-
export type AdaptableDashboardToolbar = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | '
|
|
9
|
+
export type AdaptableDashboardToolbar = 'Alert' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | 'IPushPull' | 'Layout' | 'GridFilter' | 'OpenFin' | 'QuickSearch' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'Theme';
|
|
10
10
|
export declare const ALL_TOOLBARS: AdaptableDashboardToolbar[];
|
|
11
11
|
/**
|
|
12
12
|
* Modules which can appear in the AdapTable Status Bar
|
|
@@ -28,18 +28,18 @@ export type AdaptableModuleButtons = AdaptableModuleButton[];
|
|
|
28
28
|
/**
|
|
29
29
|
* List of all the Module buttons Adaptable provides - each Module has a popup for which this is a shortcut button
|
|
30
30
|
*/
|
|
31
|
-
export type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'NamedQuery' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | '
|
|
31
|
+
export type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'ColumnFilter' | 'GridFilter' | 'NamedQuery' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme';
|
|
32
32
|
export type AdaptableStateKeys = AdaptableStateKey[];
|
|
33
|
-
export type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFin' | '
|
|
33
|
+
export type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFin' | 'IPushPull';
|
|
34
34
|
/**
|
|
35
35
|
* Modules provided by AdapTable, subject to Entitlements and usually have Predefined Config
|
|
36
36
|
*/
|
|
37
|
-
export type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | '
|
|
37
|
+
export type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport' | 'GridFilter' | 'NamedQuery' | 'Comments';
|
|
38
38
|
export declare const ALL_MODULES: AdaptableModule[];
|
|
39
39
|
/**
|
|
40
40
|
* Modules which can appear in the Settings Panel
|
|
41
41
|
*/
|
|
42
|
-
export type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport' | 'GridFilter' | 'NamedQuery';
|
|
42
|
+
export type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'ColumnFilter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport' | 'GridFilter' | 'NamedQuery' | 'Comments';
|
|
43
43
|
export type TypeHint<Base, Literals> = (Base & {
|
|
44
44
|
__subType?: true;
|
|
45
45
|
}) | Literals;
|
|
@@ -14,7 +14,6 @@ exports.ALL_TOOLBARS = [
|
|
|
14
14
|
'DataChangeHistory',
|
|
15
15
|
'DataSet',
|
|
16
16
|
'Export',
|
|
17
|
-
'Glue42',
|
|
18
17
|
'IPushPull',
|
|
19
18
|
'Layout',
|
|
20
19
|
'ColumnFilter',
|
|
@@ -93,7 +92,6 @@ exports.ALL_MODULES = [
|
|
|
93
92
|
ModuleConstants.FlashingCellModuleId,
|
|
94
93
|
ModuleConstants.FormatColumnModuleId,
|
|
95
94
|
ModuleConstants.FreeTextColumnModuleId,
|
|
96
|
-
ModuleConstants.Glue42ModuleId,
|
|
97
95
|
ModuleConstants.GridInfoModuleId,
|
|
98
96
|
ModuleConstants.IPushPullModuleId,
|
|
99
97
|
ModuleConstants.LayoutModuleId,
|
|
@@ -44,16 +44,3 @@ export interface NotesState extends ConfigState {
|
|
|
44
44
|
*/
|
|
45
45
|
Notes?: AdaptableNotes;
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Cell that contains a Note
|
|
49
|
-
*/
|
|
50
|
-
export type NoteGridCell = {
|
|
51
|
-
/**
|
|
52
|
-
* Value in Primary Key Column
|
|
53
|
-
*/
|
|
54
|
-
PrimaryKeyValue: string | number;
|
|
55
|
-
/**
|
|
56
|
-
* Id of Column containing the Note
|
|
57
|
-
*/
|
|
58
|
-
ColumnId: string;
|
|
59
|
-
};
|
|
@@ -43,6 +43,9 @@ export interface PredefinedConfig {
|
|
|
43
43
|
* Supplies a collection of *Custom Sort* objects to allow some columns to be sorted in non-standard (e.g. non alphabetical) ways
|
|
44
44
|
*/
|
|
45
45
|
CustomSort?: CustomSortState;
|
|
46
|
+
/**
|
|
47
|
+
* Collection of notes that can be edited on cell level
|
|
48
|
+
*/
|
|
46
49
|
Notes?: NotesState;
|
|
47
50
|
/**
|
|
48
51
|
* Large series of properties to give users full control over the look and feel of the *Dashboard* - the section above the grid with toolbars and buttons
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ConfigState } from './ConfigState';
|
|
2
|
-
import { Glue42Schedule } from './Glue42State';
|
|
3
2
|
import { IPushPullSchedule } from './IPushPullState';
|
|
4
3
|
import { OpenFinSchedule } from './OpenFinState';
|
|
5
4
|
import { AdaptableMessageType, ReportSchedule } from '../types';
|
|
@@ -21,10 +20,6 @@ export interface ScheduleState extends ConfigState {
|
|
|
21
20
|
* Schedules connected to ipushpull Reports - available if ipushpull plugin is running
|
|
22
21
|
*/
|
|
23
22
|
IPushPullSchedules?: IPushPullSchedule[];
|
|
24
|
-
/**
|
|
25
|
-
* Schedules connected to Glue42 exports - available if Glue42 plugin is running
|
|
26
|
-
*/
|
|
27
|
-
Glue42Schedules?: Glue42Schedule[];
|
|
28
23
|
/**
|
|
29
24
|
* Schedules connected to OpenFin exports - available if OpenFin plugin is running
|
|
30
25
|
*/
|
|
@@ -3,7 +3,6 @@ import { InternalState } from './InternalState';
|
|
|
3
3
|
import { BulkUpdateValidationResult } from '../Strategy/Interface/IBulkUpdateModule';
|
|
4
4
|
import { CellDataChangedInfo, GridCell, SmartEditOperation } from '../types';
|
|
5
5
|
import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPullState';
|
|
6
|
-
import { Glue42State, Glue42Report } from './Glue42State';
|
|
7
6
|
import { OpenFinState, OpenFinReport } from './OpenFinState';
|
|
8
7
|
import { AdaptableAlert } from './Common/AdaptableAlert';
|
|
9
8
|
import { CellHighlightInfo } from './Common/CellHighlightInfo';
|
|
@@ -13,11 +12,10 @@ import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
|
|
|
13
12
|
import { TypeUuid } from './Uuid';
|
|
14
13
|
import { SummaryOperation } from './Common/Enums';
|
|
15
14
|
import { ChartModel } from '@ag-grid-community/core';
|
|
16
|
-
import {
|
|
15
|
+
import { CellAddress } from './CellAddress';
|
|
17
16
|
import { ExternalChartDefinition } from './ChartingState';
|
|
18
17
|
import { CachedQuery } from './NamedQueryState';
|
|
19
18
|
export type { IPushPullReport, IPushPullDomain };
|
|
20
|
-
export type { Glue42Report };
|
|
21
19
|
export type { OpenFinReport };
|
|
22
20
|
type ROW_PRIMARY_KEY = string;
|
|
23
21
|
type COLUMN_ID_OR_WHOLE_ROW_LABEL = string;
|
|
@@ -25,7 +23,7 @@ export type DataChangeHistoryMode = 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
|
|
|
25
23
|
/**
|
|
26
24
|
* Internal state, used by Adaptable during a session; none of it is provided through Predefined Config, nor is it persisted
|
|
27
25
|
*/
|
|
28
|
-
export interface SystemState extends InternalState, IPushPullState,
|
|
26
|
+
export interface SystemState extends InternalState, IPushPullState, OpenFinState {
|
|
29
27
|
AdaptableAlerts: AdaptableAlert[];
|
|
30
28
|
AdaptableFlashingCells: Record<ROW_PRIMARY_KEY, Record<COLUMN_ID_OR_WHOLE_ROW_LABEL, TypeUuid>>;
|
|
31
29
|
AdaptableFlashingCellsMap: Record<TypeUuid, AdaptableFlashingCell>;
|
|
@@ -100,9 +98,10 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
|
|
|
100
98
|
QuickSearch?: {
|
|
101
99
|
floatingVisible?: boolean;
|
|
102
100
|
};
|
|
103
|
-
|
|
101
|
+
NotesAndComments?: {
|
|
104
102
|
editMode?: boolean;
|
|
105
|
-
|
|
103
|
+
focusedEntity?: 'Note' | 'Comment';
|
|
104
|
+
popupPosition?: CellAddress | null;
|
|
106
105
|
};
|
|
107
106
|
}
|
|
108
107
|
export interface ProgressIndicator {
|
|
@@ -8,7 +8,7 @@ export interface ThemeState extends ConfigState {
|
|
|
8
8
|
/**
|
|
9
9
|
* Name of current theme (or theme to set at startup); leave blank if using 'Light Theme', set to 'dark' for 'Dark Theme' or provide name of Custom Theme
|
|
10
10
|
*/
|
|
11
|
-
CurrentTheme?: TypeHint<string, 'light' | 'dark'>;
|
|
11
|
+
CurrentTheme?: TypeHint<string, 'light' | 'dark' | 'os'>;
|
|
12
12
|
/**
|
|
13
13
|
* Which, if any, of the 2 themes shipped by Adaptable should be available; leave unset to provide both, or an empty array to provide neither.
|
|
14
14
|
*/
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as Redux from 'redux';
|
|
2
|
+
import { CommentThread, AdaptableComment, CommentState } from '../../PredefinedConfig/CommentState';
|
|
3
|
+
import { CellAddress } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* @ReduxAction A Comments has been added
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMMENTS_ADD = "COMMENTS_ADD";
|
|
8
|
+
/**
|
|
9
|
+
* @ReduxAction Cell Comments has been added
|
|
10
|
+
*/
|
|
11
|
+
export declare const COMMENTS_CELL_ADD = "COMMENTS_CELL_ADD";
|
|
12
|
+
/**
|
|
13
|
+
* @ReduxAction Cell comments have been removed
|
|
14
|
+
*/
|
|
15
|
+
export declare const COMMENTS_CELL_DELETE = "COMMENTS_CELL_DELETE";
|
|
16
|
+
/**
|
|
17
|
+
* @ReduxAction A Comments has been edited
|
|
18
|
+
*/
|
|
19
|
+
export declare const COMMENTS_EDIT = "COMMENTS_EDIT";
|
|
20
|
+
/**
|
|
21
|
+
* @ReduxAction A Comments has been deleted
|
|
22
|
+
*/
|
|
23
|
+
export declare const COMMENTS_DELETE = "COMMENTS_DELETE";
|
|
24
|
+
/**
|
|
25
|
+
* @ReduxAction Comments Module is ready
|
|
26
|
+
*/
|
|
27
|
+
export declare const COMMENTS_READY = "COMMENTS_READY";
|
|
28
|
+
export declare const COMMENTS_LOAD = "COMMENTS_LOAD";
|
|
29
|
+
export interface AdaptableCommentAction extends Redux.Action {
|
|
30
|
+
comment: AdaptableComment;
|
|
31
|
+
cellAddress: CellAddress;
|
|
32
|
+
}
|
|
33
|
+
export interface AdaptableCommentsAddAction extends AdaptableCommentAction {
|
|
34
|
+
}
|
|
35
|
+
export interface AdaptableCommentsCellAddAction extends Redux.Action {
|
|
36
|
+
commentThread: CommentThread;
|
|
37
|
+
}
|
|
38
|
+
export interface AdaptableCommentsSetAction extends Redux.Action {
|
|
39
|
+
commentThread: CommentThread[];
|
|
40
|
+
}
|
|
41
|
+
export interface AdaptableCommentsCellDeleteAction extends Redux.Action {
|
|
42
|
+
cellAddress: CellAddress;
|
|
43
|
+
}
|
|
44
|
+
export interface AdaptableCommentsEditAction extends AdaptableCommentAction {
|
|
45
|
+
}
|
|
46
|
+
export interface AdaptableCommentsDeleteAction extends Redux.Action {
|
|
47
|
+
commentUuid: AdaptableComment['Uuid'];
|
|
48
|
+
cellAddress: CellAddress;
|
|
49
|
+
}
|
|
50
|
+
export interface NoteReadyAction extends Redux.Action {
|
|
51
|
+
commentState: CommentState;
|
|
52
|
+
}
|
|
53
|
+
export declare const CommentsSet: ({ commentThread, }: {
|
|
54
|
+
commentThread: CommentThread[];
|
|
55
|
+
}) => AdaptableCommentsSetAction;
|
|
56
|
+
export declare const CommentsAdd: ({ comment, cellAddress, }: {
|
|
57
|
+
comment: AdaptableComment;
|
|
58
|
+
cellAddress: CellAddress;
|
|
59
|
+
}) => AdaptableCommentsAddAction;
|
|
60
|
+
export declare const CommentsCellAdd: ({ commentThread, }: {
|
|
61
|
+
commentThread: CommentThread;
|
|
62
|
+
}) => AdaptableCommentsCellAddAction;
|
|
63
|
+
export declare const CommentsCellDelete: ({ cellAddress: cellAddress, }: {
|
|
64
|
+
cellAddress: CellAddress;
|
|
65
|
+
}) => AdaptableCommentsCellDeleteAction;
|
|
66
|
+
export declare const CommentsEdit: ({ comment, cellAddress, }: {
|
|
67
|
+
comment: AdaptableComment;
|
|
68
|
+
cellAddress: CellAddress;
|
|
69
|
+
}) => AdaptableCommentsEditAction;
|
|
70
|
+
export declare const CommentsDelete: ({ commentUuid, cellAddress, }: {
|
|
71
|
+
commentUuid: AdaptableComment['Uuid'];
|
|
72
|
+
cellAddress: CellAddress;
|
|
73
|
+
}) => AdaptableCommentsDeleteAction;
|
|
74
|
+
export declare const CommentsReady: (commentstate: CommentState) => NoteReadyAction;
|
|
75
|
+
export declare const GetGridCellCommentsSelector: (state: CommentState, address: CellAddress) => CommentThread;
|
|
76
|
+
export declare const GetCommentsSelector: (state: CommentState, address: CellAddress) => AdaptableComment[] | undefined;
|
|
77
|
+
export declare const GetGetCommentsByUuidSelector: (state: CommentState, uuid: string) => AdaptableComment | undefined;
|
|
78
|
+
export declare const GetCellCommentSelector: (state: CommentState, address: CellAddress) => CommentThread | undefined;
|
|
79
|
+
export declare const CommentsReducer: Redux.Reducer<CommentState>;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommentsReducer = exports.GetCellCommentSelector = exports.GetGetCommentsByUuidSelector = exports.GetCommentsSelector = exports.GetGridCellCommentsSelector = exports.CommentsReady = exports.CommentsDelete = exports.CommentsEdit = exports.CommentsCellDelete = exports.CommentsCellAdd = exports.CommentsAdd = exports.CommentsSet = exports.COMMENTS_LOAD = exports.COMMENTS_READY = exports.COMMENTS_DELETE = exports.COMMENTS_EDIT = exports.COMMENTS_CELL_DELETE = exports.COMMENTS_CELL_ADD = exports.COMMENTS_ADD = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
6
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
7
|
+
const CellPopupService_1 = require("../../Utilities/Services/CellPopupService");
|
|
8
|
+
/**
|
|
9
|
+
* @ReduxAction A Comments has been added
|
|
10
|
+
*/
|
|
11
|
+
exports.COMMENTS_ADD = 'COMMENTS_ADD';
|
|
12
|
+
/**
|
|
13
|
+
* @ReduxAction Cell Comments has been added
|
|
14
|
+
*/
|
|
15
|
+
exports.COMMENTS_CELL_ADD = 'COMMENTS_CELL_ADD';
|
|
16
|
+
/**
|
|
17
|
+
* @ReduxAction Cell comments have been removed
|
|
18
|
+
*/
|
|
19
|
+
exports.COMMENTS_CELL_DELETE = 'COMMENTS_CELL_DELETE';
|
|
20
|
+
/**
|
|
21
|
+
* @ReduxAction A Comments has been edited
|
|
22
|
+
*/
|
|
23
|
+
exports.COMMENTS_EDIT = 'COMMENTS_EDIT';
|
|
24
|
+
/**
|
|
25
|
+
* @ReduxAction A Comments has been deleted
|
|
26
|
+
*/
|
|
27
|
+
exports.COMMENTS_DELETE = 'COMMENTS_DELETE';
|
|
28
|
+
/**
|
|
29
|
+
* @ReduxAction Comments Module is ready
|
|
30
|
+
*/
|
|
31
|
+
exports.COMMENTS_READY = 'COMMENTS_READY';
|
|
32
|
+
exports.COMMENTS_LOAD = 'COMMENTS_LOAD';
|
|
33
|
+
const CommentsSet = ({ commentThread, }) => ({
|
|
34
|
+
type: exports.COMMENTS_LOAD,
|
|
35
|
+
commentThread,
|
|
36
|
+
});
|
|
37
|
+
exports.CommentsSet = CommentsSet;
|
|
38
|
+
const CommentsAdd = ({ comment, cellAddress, }) => ({
|
|
39
|
+
type: exports.COMMENTS_ADD,
|
|
40
|
+
comment,
|
|
41
|
+
cellAddress,
|
|
42
|
+
});
|
|
43
|
+
exports.CommentsAdd = CommentsAdd;
|
|
44
|
+
const CommentsCellAdd = ({ commentThread, }) => ({
|
|
45
|
+
type: exports.COMMENTS_CELL_ADD,
|
|
46
|
+
commentThread,
|
|
47
|
+
});
|
|
48
|
+
exports.CommentsCellAdd = CommentsCellAdd;
|
|
49
|
+
const CommentsCellDelete = ({ cellAddress: cellAddress, }) => ({
|
|
50
|
+
type: exports.COMMENTS_CELL_DELETE,
|
|
51
|
+
cellAddress: cellAddress,
|
|
52
|
+
});
|
|
53
|
+
exports.CommentsCellDelete = CommentsCellDelete;
|
|
54
|
+
const CommentsEdit = ({ comment, cellAddress, }) => ({
|
|
55
|
+
type: exports.COMMENTS_EDIT,
|
|
56
|
+
comment,
|
|
57
|
+
cellAddress,
|
|
58
|
+
});
|
|
59
|
+
exports.CommentsEdit = CommentsEdit;
|
|
60
|
+
const CommentsDelete = ({ commentUuid, cellAddress, }) => ({
|
|
61
|
+
type: exports.COMMENTS_DELETE,
|
|
62
|
+
cellAddress,
|
|
63
|
+
commentUuid,
|
|
64
|
+
});
|
|
65
|
+
exports.CommentsDelete = CommentsDelete;
|
|
66
|
+
const CommentsReady = (commentstate) => ({
|
|
67
|
+
type: exports.COMMENTS_READY,
|
|
68
|
+
commentState: commentstate,
|
|
69
|
+
});
|
|
70
|
+
exports.CommentsReady = CommentsReady;
|
|
71
|
+
const GetGridCellCommentsSelector = (state, address) => {
|
|
72
|
+
var _a;
|
|
73
|
+
if (!address) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
|
|
77
|
+
return CellPopupService_1.CellPopupService.isSameAddress(cellComments, address);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.GetGridCellCommentsSelector = GetGridCellCommentsSelector;
|
|
81
|
+
const GetCommentsSelector = (state, address) => {
|
|
82
|
+
var _a, _b;
|
|
83
|
+
if (!address) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
const comments = (_b = ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((cellComments) => {
|
|
87
|
+
return CellPopupService_1.CellPopupService.isSameAddress(cellComments, address);
|
|
88
|
+
})) === null || _b === void 0 ? void 0 : _b.Comments;
|
|
89
|
+
return comments;
|
|
90
|
+
};
|
|
91
|
+
exports.GetCommentsSelector = GetCommentsSelector;
|
|
92
|
+
const GetGetCommentsByUuidSelector = (state, uuid) => {
|
|
93
|
+
var _a;
|
|
94
|
+
for (const commentThread of (_a = state.CommentThreads) !== null && _a !== void 0 ? _a : []) {
|
|
95
|
+
for (const comment of commentThread.Comments) {
|
|
96
|
+
if (comment.Uuid === uuid) {
|
|
97
|
+
return comment;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return undefined;
|
|
102
|
+
};
|
|
103
|
+
exports.GetGetCommentsByUuidSelector = GetGetCommentsByUuidSelector;
|
|
104
|
+
const GetCellCommentSelector = (state, address) => {
|
|
105
|
+
var _a;
|
|
106
|
+
if (!address) {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
return ((_a = state === null || state === void 0 ? void 0 : state.CommentThreads) !== null && _a !== void 0 ? _a : []).find((commentThread) => {
|
|
110
|
+
return CellPopupService_1.CellPopupService.isSameAddress(commentThread, address);
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
exports.GetCellCommentSelector = GetCellCommentSelector;
|
|
114
|
+
const initialState = {
|
|
115
|
+
CommentThreads: GeneralConstants_1.EMPTY_ARRAY,
|
|
116
|
+
};
|
|
117
|
+
const CommentsReducer = (state = initialState, action) => {
|
|
118
|
+
var _a, _b, _c, _d, _e;
|
|
119
|
+
switch (action.type) {
|
|
120
|
+
case exports.COMMENTS_ADD: {
|
|
121
|
+
const addAction = action;
|
|
122
|
+
const commentThread = (_a = state.CommentThreads) !== null && _a !== void 0 ? _a : [];
|
|
123
|
+
const cellCommentIndex = commentThread.findIndex((cellComments) => {
|
|
124
|
+
return CellPopupService_1.CellPopupService.isSameAddress(cellComments, addAction.cellAddress);
|
|
125
|
+
});
|
|
126
|
+
let comments = [...commentThread];
|
|
127
|
+
if (cellCommentIndex === -1) {
|
|
128
|
+
// new comments
|
|
129
|
+
comments.push(Object.assign(Object.assign({}, ObjectFactory_1.default.CreateEmptyCommentThread(addAction.cellAddress)), { Comments: [addAction.comment] }));
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const existing = Object.assign(Object.assign({}, commentThread[cellCommentIndex]), { Comments: [...commentThread[cellCommentIndex].Comments, addAction.comment] });
|
|
133
|
+
comments[cellCommentIndex] = existing;
|
|
134
|
+
}
|
|
135
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: comments });
|
|
136
|
+
}
|
|
137
|
+
case exports.COMMENTS_CELL_ADD: {
|
|
138
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: [
|
|
139
|
+
...((_b = state.CommentThreads) !== null && _b !== void 0 ? _b : []),
|
|
140
|
+
action.commentThread,
|
|
141
|
+
] });
|
|
142
|
+
}
|
|
143
|
+
case exports.COMMENTS_CELL_DELETE: {
|
|
144
|
+
const deleteAction = action;
|
|
145
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: ((_c = state.CommentThreads) !== null && _c !== void 0 ? _c : []).filter((cellComments) => !CellPopupService_1.CellPopupService.isSameAddress(cellComments, deleteAction.cellAddress)) });
|
|
146
|
+
}
|
|
147
|
+
case exports.COMMENTS_EDIT: {
|
|
148
|
+
const editAction = action;
|
|
149
|
+
let edited = false;
|
|
150
|
+
const adaptableCellComments = ((_d = state.CommentThreads) !== null && _d !== void 0 ? _d : []).map((cellComments) => {
|
|
151
|
+
if (CellPopupService_1.CellPopupService.isSameAddress(cellComments, editAction.cellAddress)) {
|
|
152
|
+
// found the place
|
|
153
|
+
edited = true;
|
|
154
|
+
return Object.assign(Object.assign({}, cellComments), { Comments: cellComments.Comments.map((comment) => {
|
|
155
|
+
if (comment.Uuid === editAction.comment.Uuid) {
|
|
156
|
+
return editAction.comment;
|
|
157
|
+
}
|
|
158
|
+
return comment;
|
|
159
|
+
}) });
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: adaptableCellComments });
|
|
163
|
+
}
|
|
164
|
+
case exports.COMMENTS_DELETE: {
|
|
165
|
+
const deleteAction = action;
|
|
166
|
+
const adaptableCellComments = ((_e = state.CommentThreads) !== null && _e !== void 0 ? _e : [])
|
|
167
|
+
.map((cellComments) => {
|
|
168
|
+
if (CellPopupService_1.CellPopupService.isSameAddress(cellComments, deleteAction.cellAddress)) {
|
|
169
|
+
// found the place
|
|
170
|
+
const newComments = cellComments.Comments.filter((comment) => comment.Uuid !== deleteAction.commentUuid);
|
|
171
|
+
if (newComments.length === 0) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
const newCellComments = Object.assign(Object.assign({}, cellComments), { Comments: newComments });
|
|
175
|
+
return newCellComments;
|
|
176
|
+
}
|
|
177
|
+
return cellComments;
|
|
178
|
+
})
|
|
179
|
+
.filter((cellComments) => cellComments !== null);
|
|
180
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: adaptableCellComments });
|
|
181
|
+
}
|
|
182
|
+
case exports.COMMENTS_LOAD: {
|
|
183
|
+
return Object.assign(Object.assign({}, state), { CommentThreads: action.commentThread });
|
|
184
|
+
}
|
|
185
|
+
default:
|
|
186
|
+
return state;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
exports.CommentsReducer = CommentsReducer;
|
|
@@ -35,5 +35,5 @@ export declare const NotesReady: (note: NotesState) => NoteReadyAction;
|
|
|
35
35
|
export declare const GetNotesSelector: (state: NotesState, config?: {
|
|
36
36
|
PrimaryKeyValue: string | number;
|
|
37
37
|
ColumnId: string;
|
|
38
|
-
}) =>
|
|
38
|
+
}) => AdaptableNote[];
|
|
39
39
|
export declare const NotesReducer: Redux.Reducer<NotesState>;
|
|
@@ -41,11 +41,11 @@ const NotesReady = (note) => ({
|
|
|
41
41
|
});
|
|
42
42
|
exports.NotesReady = NotesReady;
|
|
43
43
|
const GetNotesSelector = (state, config) => {
|
|
44
|
-
var _a
|
|
44
|
+
var _a;
|
|
45
45
|
if (!config) {
|
|
46
|
-
return
|
|
46
|
+
return [];
|
|
47
47
|
}
|
|
48
|
-
return ((
|
|
48
|
+
return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
|
|
49
49
|
if (note.PrimaryKeyValue === config.PrimaryKeyValue && note.ColumnId === config.ColumnId) {
|
|
50
50
|
// happy check
|
|
51
51
|
return true;
|
|
@@ -69,8 +69,7 @@ const NotesReducer = (state = initialState, action) => {
|
|
|
69
69
|
case exports.NOTES_ADD: {
|
|
70
70
|
const note = action.adaptableNote;
|
|
71
71
|
AdaptableHelper_1.default.addUuidAndSource(note);
|
|
72
|
-
adaptableNotes = [
|
|
73
|
-
adaptableNotes.push(note);
|
|
72
|
+
adaptableNotes = [...state.Notes, note];
|
|
74
73
|
return Object.assign(Object.assign({}, state), { Notes: adaptableNotes });
|
|
75
74
|
}
|
|
76
75
|
case exports.NOTES_EDIT: {
|