@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
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;
|
|
@@ -13,11 +13,49 @@ class agGridMenuHelper {
|
|
|
13
13
|
constructor(adaptable, gridOptions) {
|
|
14
14
|
this.adaptable = adaptable;
|
|
15
15
|
this.gridOptions = gridOptions;
|
|
16
|
+
this.buildGroupedModuleItems = (sortedMenuItems, adaptableMenuItems) => {
|
|
17
|
+
return sortedMenuItems
|
|
18
|
+
.map((moduleOrGroup) => {
|
|
19
|
+
if (typeof moduleOrGroup === 'object') {
|
|
20
|
+
const submenuItems = this.buildGroupedModuleItems(moduleOrGroup.modules, adaptableMenuItems);
|
|
21
|
+
// if there is only one item in the submenu, we don't need to show the submenu
|
|
22
|
+
if (submenuItems.length === 1) {
|
|
23
|
+
return submenuItems[0];
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
label: moduleOrGroup.title,
|
|
27
|
+
icon: moduleOrGroup.icon,
|
|
28
|
+
subItems: submenuItems,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return adaptableMenuItems.find((menuItem) => menuItem.module === moduleOrGroup);
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
.filter((menuItem) => {
|
|
36
|
+
if (!menuItem) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (menuItem.subItems && menuItem.subItems.length === 0) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
16
45
|
}
|
|
17
46
|
destroy() {
|
|
18
47
|
this.adaptable = null;
|
|
19
48
|
this.gridOptions = null;
|
|
20
49
|
}
|
|
50
|
+
mapAdaptableMenuItemToSystemMenuItems(adaptableMenuItems) {
|
|
51
|
+
return (adaptableMenuItems !== null && adaptableMenuItems !== void 0 ? adaptableMenuItems : []).map((menuItem) => {
|
|
52
|
+
let subItems = menuItem.subItems;
|
|
53
|
+
if (subItems && subItems.length > 0) {
|
|
54
|
+
subItems = subItems.map((subItem) => this.mapAdaptableMenuItemToSystemMenuItems(subItem.subItems));
|
|
55
|
+
}
|
|
56
|
+
return Object.assign(Object.assign({}, menuItem), { menuType: 'Adaptable', subItems });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
21
59
|
buildColumnMenu(params, originalGetMainMenuItems) {
|
|
22
60
|
var _a;
|
|
23
61
|
const menuOptions = this.adaptable.adaptableOptions.menuOptions;
|
|
@@ -31,11 +69,7 @@ class agGridMenuHelper {
|
|
|
31
69
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
32
70
|
const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
|
|
33
71
|
// sort Adaptable menu items by default order
|
|
34
|
-
|
|
35
|
-
const firstPriority = MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER.indexOf(first.module);
|
|
36
|
-
const secondPriority = MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER.indexOf(second.module);
|
|
37
|
-
return firstPriority - secondPriority;
|
|
38
|
-
});
|
|
72
|
+
const structuredAdaptableMenuItems = this.buildGroupedModuleItems(MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_ORDER, adaptableMenuItems);
|
|
39
73
|
// 1. first check if there is a custom column menu defined
|
|
40
74
|
if (typeof menuOptions.customColumnMenu === 'function') {
|
|
41
75
|
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
|
|
@@ -45,7 +79,7 @@ class agGridMenuHelper {
|
|
|
45
79
|
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
46
80
|
const customMenuItems = menuOptions
|
|
47
81
|
.customColumnMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
48
|
-
defaultAdaptableMenuItems }))
|
|
82
|
+
defaultAdaptableMenuItems, structuredAdaptableMenuItems: this.mapAdaptableMenuItemToSystemMenuItems(structuredAdaptableMenuItems) }))
|
|
49
83
|
.filter(Boolean);
|
|
50
84
|
return customMenuItems
|
|
51
85
|
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
@@ -58,7 +92,7 @@ class agGridMenuHelper {
|
|
|
58
92
|
const defaultContextMenu = [
|
|
59
93
|
...agGridMenuItems,
|
|
60
94
|
'separator',
|
|
61
|
-
...
|
|
95
|
+
...structuredAdaptableMenuItems.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
62
96
|
];
|
|
63
97
|
return defaultContextMenu;
|
|
64
98
|
}
|
|
@@ -78,11 +112,7 @@ class agGridMenuHelper {
|
|
|
78
112
|
const menuContext = this.createContextMenuContextObject(params, adaptableColumn);
|
|
79
113
|
const adaptableMenuItems = this.createAdaptableContextMenuItems(menuContext);
|
|
80
114
|
// sort Adaptable menu items by default order
|
|
81
|
-
|
|
82
|
-
const firstPriority = MenuOptions_1.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER.indexOf(first.module);
|
|
83
|
-
const secondPriority = MenuOptions_1.DEFAULT_ADAPTABLE_CONTEXT_MENU_ORDER.indexOf(second.module);
|
|
84
|
-
return firstPriority - secondPriority;
|
|
85
|
-
});
|
|
115
|
+
const structuredAdaptableMenuItems = this.buildGroupedModuleItems(MenuOptions_1.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE, adaptableMenuItems);
|
|
86
116
|
// 1. first check if there is a custom context menu defined
|
|
87
117
|
if (typeof menuOptions.customContextMenu === 'function') {
|
|
88
118
|
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
|
|
@@ -92,7 +122,7 @@ class agGridMenuHelper {
|
|
|
92
122
|
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
93
123
|
const customMenuItems = menuOptions
|
|
94
124
|
.customContextMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
95
|
-
defaultAdaptableMenuItems }))
|
|
125
|
+
defaultAdaptableMenuItems, structuredAdaptableMenuItems: this.mapAdaptableMenuItemToSystemMenuItems(structuredAdaptableMenuItems) }))
|
|
96
126
|
.filter(Boolean);
|
|
97
127
|
return customMenuItems
|
|
98
128
|
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
@@ -105,7 +135,7 @@ class agGridMenuHelper {
|
|
|
105
135
|
const defaultContextMenu = [
|
|
106
136
|
...agGridMenuItems,
|
|
107
137
|
'separator',
|
|
108
|
-
...
|
|
138
|
+
...structuredAdaptableMenuItems.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
109
139
|
];
|
|
110
140
|
return defaultContextMenu;
|
|
111
141
|
}
|
|
@@ -346,12 +376,30 @@ class agGridMenuHelper {
|
|
|
346
376
|
let isSingleSelectedColumn = false;
|
|
347
377
|
let isSelectedCell = false;
|
|
348
378
|
let isSelectedRow = false;
|
|
349
|
-
|
|
350
|
-
if (adaptableColumn) {
|
|
351
|
-
|
|
379
|
+
// row group columns dont provide an AdapTable Column so return bare minimum
|
|
380
|
+
if (!adaptableColumn) {
|
|
381
|
+
return {
|
|
382
|
+
isSelectedCell: false,
|
|
383
|
+
isSelectedRow: false,
|
|
384
|
+
gridCell: undefined,
|
|
385
|
+
adaptableColumn: undefined,
|
|
386
|
+
agGridColumn: params.column,
|
|
387
|
+
rowNode: params.node,
|
|
388
|
+
isGroupedNode: params.node ? params.node.group : false,
|
|
389
|
+
isSingleSelectedColumn: false,
|
|
390
|
+
isSingleSelectedCell: false,
|
|
391
|
+
primaryKeyValue: undefined,
|
|
392
|
+
adaptableApi: this.adaptable.api,
|
|
393
|
+
userName: this.adaptable.adaptableOptions.userName,
|
|
394
|
+
adaptableId: this.adaptable.adaptableOptions.adaptableId,
|
|
395
|
+
selectedCellInfo: undefined,
|
|
396
|
+
selectedRowInfo: undefined,
|
|
397
|
+
isRowGroupColumn: this.adaptable.api.columnApi.isAutoRowGroupColumn(params.column.getColId()),
|
|
398
|
+
};
|
|
352
399
|
}
|
|
353
|
-
|
|
354
|
-
|
|
400
|
+
const clickedCell = this.adaptable.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
|
|
401
|
+
const selectedCellInfo = this.adaptable.api.gridApi.getSelectedCellInfo();
|
|
402
|
+
if (selectedCellInfo) {
|
|
355
403
|
let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
|
|
356
404
|
gc.column == clickedCell.column &&
|
|
357
405
|
gc.primaryKeyValue == clickedCell.primaryKeyValue);
|
|
@@ -360,9 +408,9 @@ class agGridMenuHelper {
|
|
|
360
408
|
isSingleSelectedColumn = ArrayExtensions_1.ArrayExtensions.CorrectLength(selectedCellInfo.columns, 1);
|
|
361
409
|
}
|
|
362
410
|
}
|
|
363
|
-
|
|
411
|
+
const selectedRowInfo = this.adaptable.api.gridApi.getSelectedRowInfo();
|
|
364
412
|
if (selectedRowInfo) {
|
|
365
|
-
|
|
413
|
+
const matchedPKValue = selectedRowInfo.gridRows.find((gr) => gr != null && gr.primaryKeyValue == clickedCell.primaryKeyValue);
|
|
366
414
|
isSelectedRow = matchedPKValue != null;
|
|
367
415
|
}
|
|
368
416
|
return {
|
|
@@ -395,8 +443,8 @@ class agGridMenuHelper {
|
|
|
395
443
|
}
|
|
396
444
|
createAdaptableContextMenuItems(menuContext) {
|
|
397
445
|
let contextMenuItems = [];
|
|
398
|
-
this.adaptable.adaptableModules.forEach((
|
|
399
|
-
let menuItems =
|
|
446
|
+
this.adaptable.adaptableModules.forEach((module) => {
|
|
447
|
+
let menuItems = module.addContextMenuItems(menuContext);
|
|
400
448
|
if (menuItems) {
|
|
401
449
|
contextMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
|
|
402
450
|
}
|
|
@@ -537,8 +585,8 @@ class agGridMenuHelper {
|
|
|
537
585
|
adaptableMenuItems.push(...allAdaptableMenuItems);
|
|
538
586
|
}
|
|
539
587
|
adaptableMenuItems.sort((first, second) => {
|
|
540
|
-
const firstPriority = MenuOptions_1.
|
|
541
|
-
const secondPriority = MenuOptions_1.
|
|
588
|
+
const firstPriority = MenuOptions_1.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE.indexOf(first.module);
|
|
589
|
+
const secondPriority = MenuOptions_1.DEFAULT_ADAPTABLE_CONTEXT_MENU_STRUCTURE.indexOf(second.module);
|
|
542
590
|
return firstPriority - secondPriority;
|
|
543
591
|
});
|
|
544
592
|
// }
|
|
@@ -17,13 +17,13 @@ const DatepickerContext_1 = require("./DatepickerContext");
|
|
|
17
17
|
const addDays_1 = tslib_1.__importDefault(require("date-fns/addDays"));
|
|
18
18
|
const addBusinessDays_1 = tslib_1.__importDefault(require("date-fns/addBusinessDays"));
|
|
19
19
|
const react_day_picker_1 = require("react-day-picker");
|
|
20
|
-
const DatepickerOverlay = ({ onHide, children, onKeyDown, }) => {
|
|
20
|
+
const DatepickerOverlay = ({ onHide, children, onKeyDown, onMouseDown, }) => {
|
|
21
21
|
const domRef = React.useRef(null);
|
|
22
22
|
React.useEffect(() => {
|
|
23
23
|
var _a;
|
|
24
24
|
(_a = domRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
25
25
|
}, []);
|
|
26
|
-
return (React.createElement("div", { className: "ab-Datepicker-Overlay", ref: domRef, tabIndex: -1, onKeyDown: onKeyDown, onBlur: (e) => {
|
|
26
|
+
return (React.createElement("div", { className: "ab-Datepicker-Overlay", ref: domRef, tabIndex: -1, onKeyDown: onKeyDown, onMouseDown: onMouseDown, onBlur: (e) => {
|
|
27
27
|
var _a;
|
|
28
28
|
const { relatedTarget } = e;
|
|
29
29
|
const node = domRef.current;
|
|
@@ -87,7 +87,7 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
87
87
|
}, accessLevel: 'Full' })) : null;
|
|
88
88
|
const calendarButton = (React.createElement(SimpleButton_1.default, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, px: 0, py: 0, onClick: () => setVisible(true) }));
|
|
89
89
|
return (React.createElement(rebass_1.Flex, null,
|
|
90
|
-
React.createElement(OverlayTrigger_1.default, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
|
|
90
|
+
React.createElement(OverlayTrigger_1.default, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { onMouseDown: props.onMouseDown, onHide: () => setVisible(false), onKeyDown: (e) => {
|
|
91
91
|
if (e.key === 'Escape' || e.key === 'Enter') {
|
|
92
92
|
setVisible(false, e.key);
|
|
93
93
|
}
|
|
@@ -97,7 +97,7 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
97
97
|
borderRadius: style === null || style === void 0 ? void 0 : style.borderRadius,
|
|
98
98
|
width: style === null || style === void 0 ? void 0 : style.width,
|
|
99
99
|
maxWidth: style === null || style === void 0 ? void 0 : style.maxWidth,
|
|
100
|
-
}, onFocus: () => {
|
|
100
|
+
}, className: "ab-Datepicker", onFocus: () => {
|
|
101
101
|
if (!visible) {
|
|
102
102
|
setVisible(true);
|
|
103
103
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExpressionPreview = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const AdaptableContext_1 = require("../../View/AdaptableContext");
|
|
7
|
+
const ExpressionPreview = (props) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
10
|
+
const displayColumnFriendlyNames = (_a = adaptable.api.optionsApi.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.displayColumnFriendlyNamesForExpressions;
|
|
11
|
+
if (!displayColumnFriendlyNames) {
|
|
12
|
+
return React.createElement(React.Fragment, null, adaptable.api.expressionApi.getAdaptableQueryExpression(props.query));
|
|
13
|
+
}
|
|
14
|
+
const expressionWithFriendlyNames = adaptable.api.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(props.query);
|
|
15
|
+
// '[Column Name] > 2' => ['[Column Name]', '>', '2']
|
|
16
|
+
// not the prettiest
|
|
17
|
+
const strWithMarkedGroupes = expressionWithFriendlyNames.replace(/\]/gi, '],').split(',');
|
|
18
|
+
return (React.createElement(React.Fragment, null, strWithMarkedGroupes.map((part, index) => {
|
|
19
|
+
const partEl = part.includes('[') ? React.createElement("i", null, part.replace(/[\[\]]/g, '')) : part;
|
|
20
|
+
return React.createElement(React.Fragment, { key: index },
|
|
21
|
+
"\u00A0",
|
|
22
|
+
partEl);
|
|
23
|
+
})));
|
|
24
|
+
};
|
|
25
|
+
exports.ExpressionPreview = ExpressionPreview;
|
|
@@ -110,9 +110,9 @@ const QueryBuilder = (props) => {
|
|
|
110
110
|
} },
|
|
111
111
|
React.createElement(QueryBuilderContext.Provider, { value: context },
|
|
112
112
|
React.createElement(rebass_1.Box, { className: QUERY_BUILDER_CLASSNAME },
|
|
113
|
-
React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, fontSize: 3 }, "Build the Grid Filter by adding Column Conditions and AND / OR Groups as required"),
|
|
113
|
+
React.createElement(HelpBlock_1.default, { "data-name": "query-builder-help", mt: 2, mb: 2, p: 2, fontSize: 3 }, "Build the Grid Filter by adding Column Conditions and AND / OR Groups as required"),
|
|
114
114
|
errorOrEditor,
|
|
115
|
-
React.createElement(Panel_1.default, { variant: "default", header: "AdapTableQL Expression", mt: 3 },
|
|
115
|
+
React.createElement(Panel_1.default, { "data-name": "query-builder-expression-preview", variant: "default", header: "AdapTableQL Expression", mt: 3 },
|
|
116
116
|
React.createElement(rebass_1.Box, { className: `${QUERY_BUILDER_CLASSNAME}__expression`, minHeight: 48, my: 2, p: 3 }, expressionStr || 'Outputted Expression will display here'))))));
|
|
117
117
|
};
|
|
118
118
|
exports.QueryBuilder = QueryBuilder;
|
|
@@ -17,6 +17,12 @@ export declare const PrimiteValueInput: (props: {
|
|
|
17
17
|
*/
|
|
18
18
|
lefthandColumnIdParam: string;
|
|
19
19
|
}) => JSX.Element;
|
|
20
|
+
export declare const PrimitiveMultiValueInput: (props: {
|
|
21
|
+
inputType: ExpressionFunctionInputType;
|
|
22
|
+
value: any[];
|
|
23
|
+
onChange(values: any[]): void;
|
|
24
|
+
lefthandColumnIdParam: string;
|
|
25
|
+
}) => JSX.Element;
|
|
20
26
|
export declare const ExpressionSelector: (props: {
|
|
21
27
|
value: BooleanFunctionName;
|
|
22
28
|
dataType: AdaptableColumn['dataType'];
|