@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +2 -6
- 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.js +1 -2
- 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 +14 -11
- 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/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 +128 -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,65 +1,88 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NotesPopup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const lodash_1 = require("lodash");
|
|
6
5
|
const React = tslib_1.__importStar(require("react"));
|
|
7
6
|
const react_redux_1 = require("react-redux");
|
|
8
|
-
const
|
|
9
|
-
const Textarea_1 = tslib_1.__importDefault(require("../../components/Textarea"));
|
|
7
|
+
const InfiniteTable_1 = require("../../components/InfiniteTable");
|
|
10
8
|
const NotesRedux_1 = require("../../Redux/ActionsReducers/NotesRedux");
|
|
11
|
-
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
12
9
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const AdaptableButton_1 = require("../Components/AdaptableButton");
|
|
11
|
+
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
12
|
+
const tableDOMProps = {
|
|
13
|
+
style: {
|
|
14
|
+
height: '100%',
|
|
15
|
+
minWidth: '10rem',
|
|
16
|
+
// minHeight: 600,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
const NotesPopup = (props) => {
|
|
20
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
21
|
+
const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
|
|
22
|
+
const allNotes = (0, react_redux_1.useSelector)((state) => (0, NotesRedux_1.GetNotesSelector)(state.Notes));
|
|
23
|
+
const columnsMap = React.useMemo(() => {
|
|
24
|
+
const columns = {
|
|
25
|
+
primaryKey: {
|
|
26
|
+
field: 'PrimaryKeyValue',
|
|
27
|
+
header: primaryKeyHeader,
|
|
28
|
+
},
|
|
29
|
+
column: {
|
|
30
|
+
field: 'ColumnId',
|
|
31
|
+
valueGetter: (params) => {
|
|
32
|
+
return adaptable.api.columnApi.getFriendlyNameForColumnId(params.data.ColumnId);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
note: {
|
|
36
|
+
field: 'Value',
|
|
37
|
+
header: 'Note',
|
|
38
|
+
defaultEditable: true,
|
|
39
|
+
defaultFlex: 3,
|
|
40
|
+
},
|
|
41
|
+
timestamp: {
|
|
42
|
+
field: 'Timestamp',
|
|
43
|
+
valueGetter: (params) => {
|
|
44
|
+
return new Date(params.data.Timestamp).toDateString();
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
author: {
|
|
48
|
+
header: 'Author',
|
|
49
|
+
valueGetter: (params) => params.data.Author.UserName,
|
|
50
|
+
},
|
|
51
|
+
delete: {
|
|
52
|
+
defaultWidth: 50,
|
|
53
|
+
render: (params) => {
|
|
54
|
+
return (React.createElement(AdaptableButton_1.AdaptableButtonComponent, { variant: "text", icon: "delete", onClick: () => {
|
|
55
|
+
const note = adaptable.api.notesApi.getNoteByUuid(params.data.Uuid);
|
|
56
|
+
adaptable.api.notesApi.deleteNote(note);
|
|
57
|
+
} }));
|
|
58
|
+
},
|
|
59
|
+
},
|
|
22
60
|
};
|
|
61
|
+
return columns;
|
|
23
62
|
}, []);
|
|
24
|
-
React.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const handleNoteChange = (value) => {
|
|
49
|
-
api.notesApi.updateNoteText(value, note);
|
|
50
|
-
};
|
|
51
|
-
const isReadonly = api.entitlementApi.isModuleReadOnlyEntitlement('Notes');
|
|
52
|
-
const enableEditMode = () => {
|
|
53
|
-
if (!editMode) {
|
|
54
|
-
api.notesApi.showNotes(noteGridCell, true);
|
|
55
|
-
cellPopupRef === null || cellPopupRef === void 0 ? void 0 : cellPopupRef.current.refreshContent();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
if (!noteGridCell) {
|
|
59
|
-
return React.createElement(React.Fragment, null);
|
|
60
|
-
}
|
|
61
|
-
return (React.createElement(CellPopup_1.CellPopup, { ref: cellPopupRef, key: `${noteGridCell.PrimaryKeyValue}-${noteGridCell.ColumnId}`, isOpen: true, primaryKeyValue: noteGridCell.PrimaryKeyValue, columnId: noteGridCell.ColumnId },
|
|
62
|
-
React.createElement(rebass_1.Flex, { onClick: () => enableEditMode(), flexDirection: "column", className: "ab-NotesPopup" },
|
|
63
|
-
React.createElement(NoteEditor, { isReadonly: isReadonly, editMode: editMode, key: note === null || note === void 0 ? void 0 : note.Uuid, onClose: () => api.notesApi.hideNote(), note: (_a = note === null || note === void 0 ? void 0 : note.Value) !== null && _a !== void 0 ? _a : '', onNoteChange: (value) => handleNoteChange(value) }))));
|
|
63
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Notes', glyphicon: 'import', infoLink: props.moduleInfo.HelpPage },
|
|
64
|
+
React.createElement(InfiniteTable_1.DataSource, { data: allNotes, primaryKey: "Uuid", onDataMutations: (params) => {
|
|
65
|
+
for (const mutation of params.mutations) {
|
|
66
|
+
const [uuid, changes] = mutation;
|
|
67
|
+
for (const change of changes) {
|
|
68
|
+
if (change.type === 'update') {
|
|
69
|
+
const data = change.data;
|
|
70
|
+
const prevNote = allNotes.find((x) => x.Uuid === uuid);
|
|
71
|
+
if (prevNote.Value !== data.Value) {
|
|
72
|
+
adaptable.api.notesApi.updateNoteText(data.Value, prevNote);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
} },
|
|
78
|
+
React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: {
|
|
79
|
+
default: {
|
|
80
|
+
align: 'start',
|
|
81
|
+
defaultFlex: 1,
|
|
82
|
+
defaultSortable: false,
|
|
83
|
+
},
|
|
84
|
+
}, headerOptions: {
|
|
85
|
+
alwaysReserveSpaceForSortIcon: false,
|
|
86
|
+
}, rowHeight: 40, columnHeaderHeight: 65, domProps: tableDOMProps, columns: columnsMap }))));
|
|
64
87
|
};
|
|
65
|
-
exports.
|
|
88
|
+
exports.NotesPopup = NotesPopup;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MovePlusMinus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
7
|
+
const PlusMinusRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PlusMinusRedux"));
|
|
8
|
+
const react_redux_1 = require("react-redux");
|
|
9
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
10
|
+
const MovePlusMinus = (props) => {
|
|
11
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
12
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
+
const plusMinusNudges = (0, react_redux_1.useSelector)((state) => state.PlusMinus.PlusMinusNudges);
|
|
14
|
+
const handleMoveUp = React.useCallback(() => {
|
|
15
|
+
dispatch(PlusMinusRedux.PlusMinusMoveUp(props.data));
|
|
16
|
+
}, []);
|
|
17
|
+
const handleMoveDown = React.useCallback(() => {
|
|
18
|
+
dispatch(PlusMinusRedux.PlusMinusMoveDown(props.data));
|
|
19
|
+
}, []);
|
|
20
|
+
if ((plusMinusNudges === null || plusMinusNudges === void 0 ? void 0 : plusMinusNudges.length) <= 1) {
|
|
21
|
+
return React.createElement(React.Fragment, null);
|
|
22
|
+
}
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(SimpleButton_1.default, { "data-id": "move-up", title: "move up", onClick: handleMoveUp, variant: "text", icon: "arrow-up" }),
|
|
25
|
+
React.createElement(SimpleButton_1.default, { "data-name": "move-down", title: "move down", onClick: handleMoveDown, variant: "text", icon: "arrow-down" })));
|
|
26
|
+
};
|
|
27
|
+
exports.MovePlusMinus = MovePlusMinus;
|
|
@@ -66,15 +66,6 @@ const getScheduleSettingsValues = (data) => {
|
|
|
66
66
|
},
|
|
67
67
|
];
|
|
68
68
|
}
|
|
69
|
-
if (data.ScheduleType === Enums_1.ScheduleType.Glue42) {
|
|
70
|
-
const report = data;
|
|
71
|
-
return [
|
|
72
|
-
{
|
|
73
|
-
label: 'Report',
|
|
74
|
-
value: (report === null || report === void 0 ? void 0 : report.Glue42Report.ReportName) || 'Not Specified',
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
}
|
|
78
69
|
if (data.ScheduleType === Enums_1.ScheduleType.OpenFin) {
|
|
79
70
|
const report = data;
|
|
80
71
|
return [
|
|
@@ -9,7 +9,6 @@ const ScheduleSettingsReminder_1 = require("./ScheduleSettingsReminder");
|
|
|
9
9
|
const ScheduleSettingsReport_1 = require("./ScheduleSettingsReport");
|
|
10
10
|
const ScheduleSettingsIPushPull_1 = require("./ScheduleSettingsIPushPull");
|
|
11
11
|
const ScheduleSettingsOpenFin_1 = require("./ScheduleSettingsOpenFin");
|
|
12
|
-
const ScheduleSettingsGlue42_1 = require("./ScheduleSettingsGlue42");
|
|
13
12
|
const ScheduleSettingsWizard = (props) => {
|
|
14
13
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
15
14
|
const allReports = api.exportApi.getReports();
|
|
@@ -30,9 +29,6 @@ const ScheduleSettingsWizard = (props) => {
|
|
|
30
29
|
if ((data === null || data === void 0 ? void 0 : data.ScheduleType) === Enums_1.ScheduleType.OpenFin) {
|
|
31
30
|
return (React.createElement(ScheduleSettingsOpenFin_1.ScheduleSettingsOpenFin, { allReports: allReports || [], openFin: data, onChange: props.onChange }));
|
|
32
31
|
}
|
|
33
|
-
if ((data === null || data === void 0 ? void 0 : data.ScheduleType) === Enums_1.ScheduleType.Glue42) {
|
|
34
|
-
return (React.createElement(ScheduleSettingsGlue42_1.ScheduleSettingsGlue42, { allReports: allReports || [], glue42: data, onChange: props.onChange }));
|
|
35
|
-
}
|
|
36
32
|
return React.createElement(React.Fragment, null);
|
|
37
33
|
};
|
|
38
34
|
exports.ScheduleSettingsWizard = ScheduleSettingsWizard;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Enums_1 = require("../../../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
7
7
|
const isSettingsValid = (schedule) => {
|
|
8
|
-
var _a, _b, _c, _d
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
9
|
if (schedule.ScheduleType === Enums_1.ScheduleType.Reminder) {
|
|
10
10
|
const reminder = schedule;
|
|
11
11
|
if (!reminder.MessageType) {
|
|
@@ -39,15 +39,9 @@ const isSettingsValid = (schedule) => {
|
|
|
39
39
|
return 'Report page not selected';
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
if (schedule.ScheduleType === Enums_1.ScheduleType.Glue42) {
|
|
43
|
-
const glue43 = schedule;
|
|
44
|
-
if (StringExtensions_1.default.IsNullOrEmpty((_d = glue43 === null || glue43 === void 0 ? void 0 : glue43.Glue42Report) === null || _d === void 0 ? void 0 : _d.ReportName)) {
|
|
45
|
-
return 'Report not selected';
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
42
|
if (schedule.ScheduleType === Enums_1.ScheduleType.OpenFin) {
|
|
49
43
|
const openfin = schedule;
|
|
50
|
-
if (StringExtensions_1.default.IsNullOrEmpty((
|
|
44
|
+
if (StringExtensions_1.default.IsNullOrEmpty((_d = openfin === null || openfin === void 0 ? void 0 : openfin.OpenFinReport) === null || _d === void 0 ? void 0 : _d.ReportName)) {
|
|
51
45
|
return 'Report not selected';
|
|
52
46
|
}
|
|
53
47
|
}
|
|
@@ -33,9 +33,6 @@ const ScheduleWizard = (props) => {
|
|
|
33
33
|
case Enums_1.ScheduleType.ipushpull:
|
|
34
34
|
scheduleState = ObjectFactory_1.default.CreateEmptyIPushPullSchedule();
|
|
35
35
|
break;
|
|
36
|
-
case Enums_1.ScheduleType.Glue42:
|
|
37
|
-
scheduleState = ObjectFactory_1.default.CreateEmptyGlue42Schedule();
|
|
38
|
-
break;
|
|
39
36
|
case Enums_1.ScheduleType.OpenFin:
|
|
40
37
|
scheduleState = ObjectFactory_1.default.CreateEmptyOpenFinSchedule();
|
|
41
38
|
break;
|
|
@@ -57,8 +54,6 @@ const ScheduleWizard = (props) => {
|
|
|
57
54
|
case Enums_1.ScheduleType.ipushpull:
|
|
58
55
|
action = ScheduleRedux.IPushPullScheduleEdit(schedule);
|
|
59
56
|
break;
|
|
60
|
-
case Enums_1.ScheduleType.Glue42:
|
|
61
|
-
action = ScheduleRedux.Glue42ScheduleEdit(schedule);
|
|
62
57
|
break;
|
|
63
58
|
case Enums_1.ScheduleType.OpenFin:
|
|
64
59
|
action = ScheduleRedux.OpenFinScheduleEdit(schedule);
|
|
@@ -76,9 +71,6 @@ const ScheduleWizard = (props) => {
|
|
|
76
71
|
case Enums_1.ScheduleType.ipushpull:
|
|
77
72
|
action = ScheduleRedux.IPushPullScheduleAdd(schedule);
|
|
78
73
|
break;
|
|
79
|
-
case Enums_1.ScheduleType.Glue42:
|
|
80
|
-
action = ScheduleRedux.Glue42ScheduleAdd(schedule);
|
|
81
|
-
break;
|
|
82
74
|
case Enums_1.ScheduleType.OpenFin:
|
|
83
75
|
action = ScheduleRedux.OpenFinScheduleAdd(schedule);
|
|
84
76
|
break;
|
|
@@ -27,7 +27,9 @@ const BadgeEditor = (props) => {
|
|
|
27
27
|
// badges evaluate predicate per value
|
|
28
28
|
const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
|
|
29
29
|
const dataType = api.columnApi.getColumnDataTypeForColumnId(columnId);
|
|
30
|
-
const previewValue = dataType === 'Number' || dataType == 'NumberArray'
|
|
30
|
+
const previewValue = dataType === 'Number' || dataType == 'NumberArray'
|
|
31
|
+
? GeneralConstants_1.DEFAULT_INTEGER_DISPLAY_VALUE
|
|
32
|
+
: GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE;
|
|
31
33
|
return (React.createElement(
|
|
32
34
|
rebass_1.Flex,
|
|
33
35
|
{ className: "ab-Badge-Definition-Editor", mb: 15, p: 3 },
|
|
@@ -72,8 +72,7 @@ const StyledColumnWizard = (props) => {
|
|
|
72
72
|
React.createElement(StyledColumnSparklineSettingsSection_1.StyledColumnSparklineSettingsSection, { onChange: setStyledColumn }))),
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
else if (styledColumn.GradientStyle ||
|
|
76
|
-
styledColumn.PercentBarStyle) {
|
|
75
|
+
else if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
|
|
77
76
|
specificSteps.push({
|
|
78
77
|
details: 'Create the Style to apply',
|
|
79
78
|
renderSummary: StyledColumnWizardStyleSection_1.renderStyledColumnStyleSummary,
|
|
@@ -40,8 +40,12 @@ import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService
|
|
|
40
40
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
41
41
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
42
42
|
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
43
|
+
import { CellPopupService } from '../Utilities/Services/CellPopupService';
|
|
43
44
|
type RuntimeConfig = {
|
|
44
45
|
waitForAgGrid?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
45
49
|
renderReactRoot?: RenderReactRootFn;
|
|
46
50
|
variant?: AdaptableVariant;
|
|
47
51
|
gridOptions: AgGridConfig['gridOptions'];
|
|
@@ -66,6 +70,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
66
70
|
MetamodelService: IMetamodelService;
|
|
67
71
|
RowEditService: IRowEditService;
|
|
68
72
|
Fdc3Service: Fdc3Service;
|
|
73
|
+
CellPopupService: CellPopupService;
|
|
69
74
|
private LicenseService;
|
|
70
75
|
private ChartingService;
|
|
71
76
|
private ThemeService;
|
|
@@ -185,6 +190,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
185
190
|
private getAlertRowStyle;
|
|
186
191
|
private getFlashingCellStyle;
|
|
187
192
|
private getNoteCellClassName;
|
|
193
|
+
private getCommentCellClassName;
|
|
188
194
|
private getFlashingCellClass;
|
|
189
195
|
private getCellHighlightStyle;
|
|
190
196
|
private getRowHighlightStyle;
|
|
@@ -362,6 +368,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
362
368
|
closeAllRowGroups(): void;
|
|
363
369
|
expandRowGroupsForValues(columnValues: any[]): void;
|
|
364
370
|
getAgGridColumnForColumnId(columnId: string): Column;
|
|
371
|
+
getAgGridAllGridColumns(): Column<any>[];
|
|
365
372
|
setRowGroupColumns(columnIds: string[]): void;
|
|
366
373
|
clearRowGroupColumns(): void;
|
|
367
374
|
getExpandRowGroupsKeys(): any[];
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -51,7 +51,6 @@ const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
|
51
51
|
const AdaptableNumberEditor_1 = require("./editors/AdaptableNumberEditor");
|
|
52
52
|
const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
|
|
53
53
|
const waitForCondition_1 = require("../Utilities/waitForCondition");
|
|
54
|
-
const package_json_1 = require("../../package.json");
|
|
55
54
|
const MetamodelService_1 = require("../Utilities/Services/MetamodelService");
|
|
56
55
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
57
56
|
const DateHelper_1 = require("../Utilities/Helpers/DateHelper");
|
|
@@ -68,7 +67,10 @@ const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
|
68
67
|
const attachAddaptableColumnTypes_1 = require("./attachAddaptableColumnTypes");
|
|
69
68
|
const FormatHelper_1 = require("../Utilities/Helpers/FormatHelper");
|
|
70
69
|
const Fdc3Service_1 = require("../Utilities/Services/Fdc3Service");
|
|
70
|
+
const CellPopupService_1 = require("../Utilities/Services/CellPopupService");
|
|
71
71
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
72
|
+
const env_1 = tslib_1.__importDefault(require("../env"));
|
|
73
|
+
const publishTimestamp = Number(env_1.default.PUBLISH_TIMESTAMP);
|
|
72
74
|
const GROUP_PATH_SEPARATOR = '/';
|
|
73
75
|
// IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
|
|
74
76
|
const assignColId = (colDef, logger) => {
|
|
@@ -361,24 +363,6 @@ class Adaptable {
|
|
|
361
363
|
async init(adaptableOptions, runtimeConfig, _staticInit) {
|
|
362
364
|
this.logger = new AdaptableLogger_1.AdaptableLogger(adaptableOptions.adaptableId || String(Date.now()));
|
|
363
365
|
const perfAdaptableInit = this.logger.beginPerf(`Adaptable init()`);
|
|
364
|
-
if (runtimeConfig.renderReactRoot) {
|
|
365
|
-
this.renderReactRoot = (el, container) => {
|
|
366
|
-
const unmount = runtimeConfig.renderReactRoot(el, container);
|
|
367
|
-
return () => {
|
|
368
|
-
// we used to capture here because of FloatingFilters/Filters - see FloatingFilterWrapper and FilterWrapper
|
|
369
|
-
// as we didn't have a native React implementation for our React wrapper
|
|
370
|
-
// but we might need to do this again in the future for some other components that are not native React
|
|
371
|
-
// captureReactWarnings();
|
|
372
|
-
if (typeof unmount === 'function') {
|
|
373
|
-
// rAF is required, otherwise the unmount would be performed during the rendering phase and React doesn't like that
|
|
374
|
-
requestAnimationFrame(() => {
|
|
375
|
-
unmount();
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
// releaseReactWarnings();
|
|
379
|
-
};
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
366
|
if (runtimeConfig.variant) {
|
|
383
367
|
this.variant = runtimeConfig.variant;
|
|
384
368
|
}
|
|
@@ -447,6 +431,7 @@ class Adaptable {
|
|
|
447
431
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
448
432
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
449
433
|
this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
|
|
434
|
+
this.CellPopupService = new CellPopupService_1.CellPopupService(this.api);
|
|
450
435
|
// @ts-ignore
|
|
451
436
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
452
437
|
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions());
|
|
@@ -1167,6 +1152,20 @@ class Adaptable {
|
|
|
1167
1152
|
}
|
|
1168
1153
|
return 'ab-Cell-Note';
|
|
1169
1154
|
}
|
|
1155
|
+
getCommentCellClassName(gridCell, params) {
|
|
1156
|
+
if (!this.api.internalApi.getModuleService().isModuleAvailable('Comments')) {
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
const position = {
|
|
1160
|
+
PrimaryKeyValue: gridCell.primaryKeyValue,
|
|
1161
|
+
ColumnId: gridCell.column.columnId,
|
|
1162
|
+
};
|
|
1163
|
+
const cellComments = this.api.commentApi.getCommentThread(position);
|
|
1164
|
+
if (!cellComments) {
|
|
1165
|
+
return undefined;
|
|
1166
|
+
}
|
|
1167
|
+
return 'ab-Cell-Comment';
|
|
1168
|
+
}
|
|
1170
1169
|
getFlashingCellClass(gridcell, params) {
|
|
1171
1170
|
var _a, _b, _c;
|
|
1172
1171
|
const primaryKey = params.node.aggData ? params.node.id : gridcell.primaryKeyValue;
|
|
@@ -1802,7 +1801,7 @@ class Adaptable {
|
|
|
1802
1801
|
};
|
|
1803
1802
|
this.api.gridApi.internalApi.setSelectedCells(selectedCellInfo);
|
|
1804
1803
|
this._emit('CellsSelected');
|
|
1805
|
-
this.agGridHelper.
|
|
1804
|
+
this.agGridHelper.fireCellSelectionChangedEvent();
|
|
1806
1805
|
return selectedCellInfo;
|
|
1807
1806
|
}
|
|
1808
1807
|
setSelectedRows() {
|
|
@@ -1836,7 +1835,7 @@ class Adaptable {
|
|
|
1836
1835
|
}
|
|
1837
1836
|
const selectedRowInfo = { gridRows: selectedRows };
|
|
1838
1837
|
this.api.gridApi.internalApi.setSelectedRows(selectedRowInfo);
|
|
1839
|
-
this.agGridHelper.
|
|
1838
|
+
this.agGridHelper.fireRowSelectionChangedEvent();
|
|
1840
1839
|
return selectedRowInfo;
|
|
1841
1840
|
}
|
|
1842
1841
|
setDataValue(value, column, primaryKeyValue, rowNode) {
|
|
@@ -2678,6 +2677,18 @@ class Adaptable {
|
|
|
2678
2677
|
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
2679
2678
|
}
|
|
2680
2679
|
const isExternalEvaluation = !this.api.expressionApi.internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
2680
|
+
const valueGetter = (params) => {
|
|
2681
|
+
var _a, _b;
|
|
2682
|
+
if (isExternalEvaluation) {
|
|
2683
|
+
return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
|
|
2684
|
+
}
|
|
2685
|
+
// if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
|
|
2686
|
+
if (this.api.gridApi.getAgGridRowModelType() !== 'clientSide' &&
|
|
2687
|
+
StringExtensions_1.StringExtensions.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
|
|
2688
|
+
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
2689
|
+
}
|
|
2690
|
+
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2691
|
+
};
|
|
2681
2692
|
const newColDef = {
|
|
2682
2693
|
headerName: calculatedColumn.FriendlyName
|
|
2683
2694
|
? calculatedColumn.FriendlyName
|
|
@@ -2696,13 +2707,7 @@ class Adaptable {
|
|
|
2696
2707
|
suppressMenu: calculatedColumnSettings.SuppressMenu,
|
|
2697
2708
|
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
2698
2709
|
type: columnTypes,
|
|
2699
|
-
valueGetter
|
|
2700
|
-
var _a;
|
|
2701
|
-
if (isExternalEvaluation) {
|
|
2702
|
-
return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
|
|
2703
|
-
}
|
|
2704
|
-
return this.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
2705
|
-
},
|
|
2710
|
+
valueGetter,
|
|
2706
2711
|
};
|
|
2707
2712
|
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
2708
2713
|
calculatedColumnSettings.ShowToolTip == true) {
|
|
@@ -3481,6 +3486,7 @@ class Adaptable {
|
|
|
3481
3486
|
const styledColumn = this.api.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
3482
3487
|
const hasStyledColumn = !!styledColumn && !styledColumn.IsSuspended;
|
|
3483
3488
|
const noteClassName = this.getNoteCellClassName(gridCell, params);
|
|
3489
|
+
const commentsClassName = this.getCommentCellClassName(gridCell, params);
|
|
3484
3490
|
const returnValue = [
|
|
3485
3491
|
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
3486
3492
|
!hasStyledColumn && formatColumns.length
|
|
@@ -3492,6 +3498,7 @@ class Adaptable {
|
|
|
3492
3498
|
highlightAlertClassName,
|
|
3493
3499
|
flashingClassName,
|
|
3494
3500
|
noteClassName,
|
|
3501
|
+
commentsClassName,
|
|
3495
3502
|
]
|
|
3496
3503
|
// we flatten the array because some rules ('userCellClass' etc) might return a string[]
|
|
3497
3504
|
.flat()
|
|
@@ -3637,20 +3644,23 @@ class Adaptable {
|
|
|
3637
3644
|
return userPropertyValue(params);
|
|
3638
3645
|
}
|
|
3639
3646
|
const value = params.value;
|
|
3640
|
-
|
|
3641
|
-
if (!unbalancedGroupsKey) {
|
|
3647
|
+
if (this.gridOptions.groupAllowUnbalanced) {
|
|
3642
3648
|
return value;
|
|
3643
3649
|
}
|
|
3644
|
-
|
|
3645
|
-
|
|
3650
|
+
const balancedGroupsKey = (_a = adaptableOptions.groupingOptions) === null || _a === void 0 ? void 0 : _a.balancedGroupsKey;
|
|
3651
|
+
if (!balancedGroupsKey) {
|
|
3652
|
+
return value;
|
|
3653
|
+
}
|
|
3654
|
+
let groupBalancedGroupsUnderKeyValue = typeof balancedGroupsKey === 'function'
|
|
3655
|
+
? balancedGroupsKey({
|
|
3646
3656
|
adaptableApi: adaptableApi,
|
|
3647
3657
|
userName: this.adaptableOptions.userName,
|
|
3648
3658
|
adaptableId: this.adaptableOptions.adaptableId,
|
|
3649
3659
|
adaptableColumn: abColumn,
|
|
3650
3660
|
params,
|
|
3651
3661
|
})
|
|
3652
|
-
:
|
|
3653
|
-
return value === null || value === undefined ?
|
|
3662
|
+
: balancedGroupsKey;
|
|
3663
|
+
return value === null || value === undefined ? groupBalancedGroupsUnderKeyValue : value;
|
|
3654
3664
|
};
|
|
3655
3665
|
});
|
|
3656
3666
|
}
|
|
@@ -4179,6 +4189,9 @@ class Adaptable {
|
|
|
4179
4189
|
getAgGridColumnForColumnId(columnId) {
|
|
4180
4190
|
return this.gridOptions.columnApi.getColumn(columnId);
|
|
4181
4191
|
}
|
|
4192
|
+
getAgGridAllGridColumns() {
|
|
4193
|
+
return this.gridOptions.columnApi.getAllGridColumns();
|
|
4194
|
+
}
|
|
4182
4195
|
setRowGroupColumns(columnIds) {
|
|
4183
4196
|
this.gridOptions.columnApi.setRowGroupColumns(columnIds);
|
|
4184
4197
|
}
|
|
@@ -4615,6 +4628,7 @@ class Adaptable {
|
|
|
4615
4628
|
return this.getAgGridLightThemeName();
|
|
4616
4629
|
}
|
|
4617
4630
|
applyAdaptableTheme(theme) {
|
|
4631
|
+
theme = this.ThemeService.mapOsTheme(theme);
|
|
4618
4632
|
const themeName = typeof theme === 'string' ? theme : theme.Name;
|
|
4619
4633
|
const isSystemTheme = this.api.themeApi.internalApi.isSystemTheme(themeName);
|
|
4620
4634
|
const themeClassNamesToRemove = [];
|
|
@@ -5114,7 +5128,7 @@ class Adaptable {
|
|
|
5114
5128
|
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
5115
5129
|
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY || this.api.optionsApi.getLicenseKey();
|
|
5116
5130
|
return new LicenseService_1.LicenseService(this, licenseKey, {
|
|
5117
|
-
publishedAt:
|
|
5131
|
+
publishedAt: publishTimestamp,
|
|
5118
5132
|
});
|
|
5119
5133
|
}
|
|
5120
5134
|
showCharts(chartsDefinitions, chartContainer) {
|
|
@@ -22,7 +22,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
22
22
|
this.eGui.className = 'ab-Badge__wrapper';
|
|
23
23
|
const includeGrouped = Boolean(styledColumn.IncludeGroupedRows);
|
|
24
24
|
const isGrouped = params.node.group;
|
|
25
|
-
if (
|
|
25
|
+
if (includeGrouped === false && isGrouped) {
|
|
26
26
|
const formattedValue = (_c = (_b = (_a = params.formatValue) === null || _a === void 0 ? void 0 : _a.call(params, params.value)) !== null && _b !== void 0 ? _b : params.value) !== null && _c !== void 0 ? _c : '';
|
|
27
27
|
this.eGui.innerHTML = formattedValue;
|
|
28
28
|
return;
|
|
@@ -88,10 +88,12 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
88
88
|
this.eGui.innerHTML = formattedValue;
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
this.renderBadges([
|
|
91
|
+
this.renderBadges([
|
|
92
|
+
{
|
|
92
93
|
badge,
|
|
93
94
|
value: formattedValue,
|
|
94
|
-
}
|
|
95
|
+
},
|
|
96
|
+
], api, params);
|
|
95
97
|
}
|
|
96
98
|
renderBadges(config, api, params) {
|
|
97
99
|
const adaptable = this.getAdaptableInstance(params);
|
|
@@ -103,10 +105,12 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
103
105
|
children: value,
|
|
104
106
|
icon: badge.Icon,
|
|
105
107
|
iconPosition: (_a = badge.IconPosition) !== null && _a !== void 0 ? _a : 'start',
|
|
106
|
-
gap: 5
|
|
108
|
+
gap: 5,
|
|
107
109
|
});
|
|
108
110
|
});
|
|
109
|
-
this.unmountReactRoot = api.internalApi
|
|
111
|
+
this.unmountReactRoot = api.internalApi
|
|
112
|
+
.getAdaptableInstance()
|
|
113
|
+
.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(React.Fragment, { children: badges }), adaptable), this.eGui);
|
|
110
114
|
}
|
|
111
115
|
getGui() {
|
|
112
116
|
return this.eGui;
|
|
@@ -30,7 +30,8 @@ export declare class agGridHelper {
|
|
|
30
30
|
isSideBarDefObject(sidebarDef: unknown): sidebarDef is SideBarDef;
|
|
31
31
|
mapToolPanelDefs(toolPanelDefs?: (ToolPanelDef | string)[]): (ToolPanelDef | string)[];
|
|
32
32
|
reselectSelectedCells(): void;
|
|
33
|
-
|
|
33
|
+
fireCellSelectionChangedEvent(): void;
|
|
34
|
+
fireRowSelectionChangedEvent(): void;
|
|
34
35
|
private isColumnReadonly;
|
|
35
36
|
private isColumnFieldonly;
|
|
36
37
|
private isColumnSortable;
|
|
@@ -47,6 +47,7 @@ const Helper_1 = require("../Utilities/Helpers/Helper");
|
|
|
47
47
|
const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
|
|
48
48
|
const BadgeRenderer_1 = require("./BadgeRenderer");
|
|
49
49
|
const PercentBarRenderer_1 = require("./PercentBarRenderer");
|
|
50
|
+
const CommentsModule_1 = require("../Strategy/CommentsModule");
|
|
50
51
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
51
52
|
/**
|
|
52
53
|
* Adaptable AG Grid implementation is getting really big and unwieldy
|
|
@@ -113,6 +114,7 @@ class agGridHelper {
|
|
|
113
114
|
modules.set(ModuleConstants.Fdc3ModuleId, new Fdc3Module_1.Fdc3Module(api));
|
|
114
115
|
modules.set(ModuleConstants.GridFilterModuleId, new GridFilterModule_1.GridFilterModule(api));
|
|
115
116
|
modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule_1.NamedQueryModule(api));
|
|
117
|
+
modules.set(ModuleConstants.CommentsModuleId, new CommentsModule_1.CommentsModule(api));
|
|
116
118
|
return modules;
|
|
117
119
|
}
|
|
118
120
|
TrySetUpNodeIds(hasAutogeneratedPrimaryKey) {
|
|
@@ -300,15 +302,25 @@ class agGridHelper {
|
|
|
300
302
|
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
|
-
|
|
304
|
-
let
|
|
305
|
+
fireCellSelectionChangedEvent() {
|
|
306
|
+
let cellSelectionChangedInfo = {
|
|
305
307
|
adaptableApi: this.adaptable.api,
|
|
306
308
|
selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
|
|
309
|
+
// selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
|
|
310
|
+
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
311
|
+
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
312
|
+
};
|
|
313
|
+
this.adaptable.api.eventApi.emit('CellSelectionChanged', cellSelectionChangedInfo);
|
|
314
|
+
}
|
|
315
|
+
fireRowSelectionChangedEvent() {
|
|
316
|
+
let rowSelectionChangedInfo = {
|
|
317
|
+
adaptableApi: this.adaptable.api,
|
|
318
|
+
// selectedCellInfo: this.adaptable.api.gridApi.getGridState().SelectedCellInfo,
|
|
307
319
|
selectedRowInfo: this.adaptable.api.gridApi.getGridState().SelectedRowInfo,
|
|
308
320
|
userName: this.adaptable.api.optionsApi.getUserName(),
|
|
309
321
|
adaptableId: this.adaptable.api.optionsApi.getAdaptableId(),
|
|
310
322
|
};
|
|
311
|
-
this.adaptable.api.eventApi.emit('
|
|
323
|
+
this.adaptable.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
|
|
312
324
|
}
|
|
313
325
|
isColumnReadonly(colDef) {
|
|
314
326
|
// if the column has conditional/dynamic editability, we assume some rows may be editable
|
|
@@ -7,6 +7,8 @@ export declare class agGridMenuHelper {
|
|
|
7
7
|
private gridOptions;
|
|
8
8
|
constructor(adaptable: IAdaptable, gridOptions: GridOptions);
|
|
9
9
|
destroy(): void;
|
|
10
|
+
private buildGroupedModuleItems;
|
|
11
|
+
private mapAdaptableMenuItemToSystemMenuItems;
|
|
10
12
|
buildColumnMenu(params: GetMainMenuItemsParams, originalGetMainMenuItems: GetMainMenuItems): (string | MenuItemDef)[];
|
|
11
13
|
buildContextMenu(params: GetContextMenuItemsParams, originalGetContextMenuItems: GetContextMenuItems): (string | MenuItemDef)[];
|
|
12
14
|
private createAdaptableColumnMenuItems;
|